Commit Graph

240 Commits (master)

Author SHA1 Message Date
Alexei Kotov b7efdc4add Use the correct filenames for FO4 string tables 1 year ago
Alexei Kotov cb7e9f4a01 Maybe load FO4 quest records 1 year ago
Alexei Kotov db66149891 Skip LAND::MPCD subrecord 1 year ago
Alexei Kotov a2e185d0f9 Maybe load FO4 worldspace records 1 year ago
Alexei Kotov 47af96eb12 Generalize extended storage subrecord handling 1 year ago
Alexei Kotov ed75c0b311 Maybe load FO4 placed grenade subrecords 1 year ago
Alexei Kotov 3b3545fa58 Fix cell grid and owner subrecord loading for FO4 1 year ago
Alexei Kotov ae828064a4 ESM4::NAVM: fix loading of NVNM after XXXX 1 year ago
Alexei Kotov 8822df7e4a Maybe load FO4 placed NPC records 1 year ago
Alexei Kotov 0a514db0b5 Skip more FO4 navmesh data 1 year ago
Alexei Kotov 10e841b00f Fix formatting 1 year ago
Alexei Kotov 95488d6ec9 Maybe load FO4 cell references 1 year ago
Alexei Kotov 5a73b351e2 Maybe load FO4 cell records 1 year ago
Alexei Kotov 2b1ca84cb2 Skip FO4 navmesh data 1 year ago
Alexei Kotov 6c82aef29f Maybe load FO4 region records 1 year ago
Alexei Kotov bcaa402315 Maybe load FO4 levelled item records 1 year ago
Alexei Kotov 1b29077206 Maybe load FO4 terminal records 1 year ago
Alexei Kotov 32f8d08dd3 Maybe load FO4 note records 1 year ago
Alexei Kotov cfa19cf719 Maybe load FO4 levelled actor records 1 year ago
Alexei Kotov 4dc4add62d Maybe load FO4 NPC records 1 year ago
Alexei Kotov e9f9da98cf Maybe load FO4 ammunition records 1 year ago
Alexei Kotov dcb791083e Maybe load FO4 weapon records 1 year ago
Alexei Kotov ad8d691352 Load object templates in FO4 NPC and weapon records 1 year ago
Alexei Kotov a188a90023 Maybe load FO4 furniture records 1 year ago
Alexei Kotov 4237da5dfd Maybe load FO4 flora records 1 year ago
Alexei Kotov a9454fdc0a Improve FO3 idle marker record loading 1 year ago
Alexei Kotov 90d4f375b8 Maybe load FO4 moveable static records 1 year ago
Alexei Kotov 4d3edec59f Maybe load FO4 static collection records 1 year ago
Alexei Kotov a3069ea863 Maybe load FO4 misc records 1 year ago
Alexei Kotov f2449df2f7 Maybe load FO4 light records 1 year ago
Alexei Kotov 24d7a096ba Maybe load FO4 door records 1 year ago
Alexei Kotov 2b9b05c010 Maybe load FO4 container records 1 year ago
Alexei Kotov 60813345ae ESM4: Acknowledge all model data records 1 year ago
Alexei Kotov d9ebdc6e41 Maybe load FO4 book records 1 year ago
Alexei Kotov aedcc28294 Maybe load FO4 armor records 1 year ago
Alexei Kotov db6f76fea8 Skip more CIS1/CIS2 and skip all PRTN subrecords
Avoid formatting problems with newly added skipped FO4 blocks
1 year ago
Alexei Kotov 3118800dbd Skip ESM4 destructible data for all relevant records 1 year ago
Alexei Kotov 271c14030a Maybe load FO4 ingestible records 1 year ago
Alexei Kotov 0efc9865f6 Alphabetize SubRecordTypes and include all subrecords used in FO4
SUA_BTXT => SUB_BTXT
1 year ago
Alexei Kotov d15f301193 Load FO4 activator records 1 year ago
Alexei Kotov a2ed295f1f Update ESM4 LTEX loading
Load grasses into a list
Fix FO4 loading
Load Havok parameters for FNV
1 year ago
Alexei Kotov d74df61ce5 Load FO4 acoustic space records 1 year ago
Alexei Kotov 5bce6d8d44 Maybe load some FO4 static records 1 year ago
Alexei Kotov 1a7d68cd33 Skip FO4 SOUN::REPT 1 year ago
Alexei Kotov c706a46dc4 ESM4::RACE: fix loading more than 5 head parts in FO4 1 year ago
Alexei Kotov 426eae3843 ESM4::RACE: don't use current index if it's unset
To be safer. Doesn't help with FO4 segfaults though
1 year ago
Alexei Kotov 4605894a5a Updating RACE for FO4, first pass 1 year ago
Alexei Kotov 0c05bbea37 Skip CTDA target condition subrecords 1 year ago
Alexei Kotov 22fb744751 Skip PRPS object property subrecords 1 year ago
Alexei Kotov 84d693324b ESM4: read texture set material 1 year ago
Alexei Kotov e426dd045f Read string GMSTs correctly in >=TES5 1 year ago
Alexei Kotov 0e94ff4a73 Support unsigned int GMSTs 1 year ago
Alexei Kotov 891be9744d Skip TES4::TNAM 1 year ago
Zackhasacat 3e8a1cce7c Load ESM4 Terminal objects, add lua bindings for them 1 year ago
elsid 5abbc56bf2
Use proper cell size for ESM4 cells in CoordinateConverter 1 year ago
Petr Mikheev 5d54ca6fdb Refactor components/esm4 1 year ago
psi29a 9c2a2e1946 Merge branch 'nvpp_fixes' into 'master'
Improve safety of NVPP ESM records

See merge request OpenMW/openmw!3307
1 year ago
psi29a 4aaffa72e5 Merge branch 'more_coverity_fixes' into 'master'
More coverity fixes

See merge request OpenMW/openmw!3304
1 year ago
Andrei Kortunov 4e531524be Improve safety of NVPP ESM records 1 year ago
Andrei Kortunov 1ae2a994f0 Avoid null pointer dereference 1 year ago
elsid 798f3cc385
Support ESM4 record FullName, CellFlags, X, Y fields by esmtool 1 year ago
elsid fd01b4cad7
Avoid casts to read cell flags 1 year ago
Petr Mikheev 9b511fdf7a Load ESM4 actors 1 year ago
Alexei Kotov 32022e9b5c Read STAT::MNAM 1 year ago
Alexei Kotov 727e5c5af2 Read IDLM model data 1 year ago
Alexei Kotov 1e7fef979a Skip MISC destruction data 1 year ago
Alexei Kotov 09f6032c9b Skip TACT::VMAD/MODS 1 year ago
Alexei Kotov 332f38b7ab Read SCRL::YNAM/ZNAM 1 year ago
Alexei Kotov 7e1e43f9c6 Allow GMSTs with empty EDID 1 year ago
Alexei Kotov 22cc7f3020 Skip LIGH destruction data 1 year ago
Alexei Dobrohotov c6882dbc6b Skip REFR::XPTL
Needed by Yukichigai Unofficial Patch
1 year ago
elsid 11204d35d6
Use zlib directly for ESM4
Fallback to decompression by block of fixed size when decompressing the
whole archive fails.
2 years ago
elsid f841a1377f
Skip ATTR subrecord in CLAS record
Present in FalloutNV.esm.
2 years ago
elsid e8ef1a2a0c
Add default initialization for ESM4::TeleportDest::flags 2 years ago
jvoisin 3152078c7e Restore missing std::endl removed by an overeager regex 2 years ago
jvoisin 0e33730f5d Remove useless logging
As suggested in https://gitlab.com/OpenMW/openmw/-/merge_requests/3086#note_1413234840
2 years ago
jvoisin a58dc6fd30 Use the logging system instead of std::cout in components/esm4
- Remove debug-related includes
- Add some trivial missing includes
- Remove useless {}
- Move the known-but-skipped-records are the end of the switch-cases
- Always throw on unknown records
2 years ago
psi29a 27a879de9a Merge branch 'tree_and_furniture' into 'master'
Load ESM4::Tree and ESM4::Furniture

See merge request OpenMW/openmw!3040
2 years ago
Petr Mikheev 5cb4c66266 Avoid using ESM4::Cell with uninitialized fields 2 years ago
Petr Mikheev 1b669db017 Load ESM4::Tree and ESM4::Furniture 2 years ago
florent.teppe 12304d36aa std::cout => Log(Debug::Verbose) 2 years ago
florent.teppe ad8cfde4e0 ESM::LandData no longer a virtual interface
instead it is constructed from ESM::Land or ESM4::Land
2 years ago
florent.teppe f600730459 fixes functions that were virtual but not tagged as override. 2 years ago
florent.teppe 2bb17279df linux build
clang format 14.0

Arm64 build
2 years ago
florent.teppe d0211acf9e Fixes bug in terrain loading + collision heightmap works
although terrain rendering is 100% broken right now
2 years ago
florent.teppe c35c7b3640 ESM4::Land loaded, added to store and to land objects
it does not work yet. Some things are displayed, but it looks all wrong.
2 years ago
florent.teppe fffcf52316 land manager cache's key is an ExteriorCellLocation
ESM4::Land is now a ESM::LandData
2 years ago
jvoisin c98c532213 Replace all asserts in components/esm[34] with throw 2 years ago
jvoisin 44a65512e8 Replace another assert with a throw 2 years ago
elsid 2f18da08d7
Add missing include 2 years ago
elsid 7c16ecb258
Skip more unknown ESM4 subrecords
CNAM from HDPT is a part of Dawnguard.esm.
ATKR from RACE is a part of Dawnguard.esm.
CIS2 from SCRL is a part of Dragonborn.esm.
SPMV from RACE is a part of Dragonborn.esm.
2 years ago
elsid e537d1d0d4
Ignore missing localization string files by esmtool
Dawnguard.esm from Skyrim depends on files stored in Dawnguard.bsa which is not
processed by esmtool.
2 years ago
elsid 358b7ad3ec
Keep ESM4 localized strings in memory
Size of the files is in order of megabytes at max. Storing offset lookup table
to read from file on demand is less efficient than reading from memory for such
size.

Read and store offsets first. Sort them to read values sequentially. Memoize
last offset and value to avoid reading the same value twice. Use seek only when
current possition does not match offset. Optimize seek for short distance by
calling read instead.
2 years ago
Alexei Kotov 401ebfd7f2 Merge branch 'fix_oblivion_loading' into 'master'
Fix Oblivion loading

See merge request OpenMW/openmw!3050
2 years ago
jvoisin a9bf671992 Fix Oblivion loading
Found by elsid@, and due to !3043
2 years ago
jvoisin 8b654f276d Replace all the `asserts` with `throw` in components/esm4/reader.cpp 2 years ago
jvoisin 534e20cf3a Replace another `assert` with a `throw`
It fixes the following crash:

```nasm
[----------------------------------registers-----------------------------------]
RAX: 0xffffffffffffffe4
RBX: 0x7fffffffbd88 --> 0x0
RCX: 0x555555861f01 --> 0xd6000055555582fa
RDX: 0x1
RSI: 0x0
RDI: 0xff
RBP: 0x2e94
RSP: 0x7fffffff9bb0 --> 0x0
RIP: 0x55555574e286 (<_ZN4ESM44Cell4loadERNS_6ReaderE+182>:	mov    eax,DWORD PTR [rax+0xc])
R8 : 0x0
R9 : 0x555555836bd0 --> 0x555555861f90 --> 0x100000000000000
R10: 0xffffffff
R11: 0x0
R12: 0x7fffffffbd88 --> 0x0
R13: 0x7fffffffbd30 --> 0x7fffffffbd28 --> 0xff0001
R14: 0x7fffffff9da0 --> 0x10fc
R15: 0x7fffffff9ea8 --> 0x7fffffff9eb8 --> 0x0
EFLAGS: 0x10206 (carry PARITY adjust zero sign trap INTERRUPT direction overflow)
[-------------------------------------code-------------------------------------]
   0x55555574e27c <_ZN4ESM44Cell4loadERNS_6ReaderE+172>:	mov    rdi,r12
   0x55555574e27f <_ZN4ESM44Cell4loadERNS_6ReaderE+175>:	xor    esi,esi
   0x55555574e281 <_ZN4ESM44Cell4loadERNS_6ReaderE+177>:	call   0x5555557edfb0 <_ZNK4ESM46Reader3grpEm>
=> 0x55555574e286 <_ZN4ESM44Cell4loadERNS_6ReaderE+182>:	mov    eax,DWORD PTR [rax+0xc]
   0x55555574e289 <_ZN4ESM44Cell4loadERNS_6ReaderE+185>:	cmp    eax,0xff
   0x55555574e28e <_ZN4ESM44Cell4loadERNS_6ReaderE+190>:	ja     0x55555574e314 <_ZN4ESM44Cell4loadERNS_6ReaderE+324>
   0x55555574e294 <_ZN4ESM44Cell4loadERNS_6ReaderE+196>:	cmp    al,0x5
   0x55555574e296 <_ZN4ESM44Cell4loadERNS_6ReaderE+198>:	jne    0x55555574e314 <_ZN4ESM44Cell4loadERNS_6ReaderE+324>
[------------------------------------stack-------------------------------------]
0000| 0x7fffffff9bb0 --> 0x0
0008| 0x7fffffff9bb8 --> 0x0
0016| 0x7fffffff9bc0 --> 0x0
0024| 0x7fffffff9bc8 --> 0x0
0032| 0x7fffffff9bd0 --> 0x0
0040| 0x7fffffff9bd8 --> 0x0
0048| 0x7fffffff9be0 --> 0x0
0056| 0x7fffffff9be8 --> 0x0
[------------------------------------------------------------------------------]
Legend: code, data, rodata, value
Stopped reason: SIGSEGV
0x000055555574e286 in ESM4::Cell::load (this=0x7fffffff9da0, reader=...) at /home/jvoisin/dev/openmw/openmw/components/esm4/loadcell.cpp:68
68	   if (reader.grp().type == ESM4::Grp_ExteriorSubCell && reader.grp().label.grid[1] == 0
gdb-peda$ bt
    this=<optimized out>, reader=...) at /home/jvoisin/dev/openmw/openmw/apps/esmtool/tes4.cpp:547
    recordInvocable=...) at /home/jvoisin/dev/openmw/openmw/./components/esm4/readerutils.hpp:31
    at /home/jvoisin/dev/openmw/openmw/./components/esm4/readerutils.hpp:23
    at ../csu/libc-start.c:381
```
2 years ago
psi29a e1754b840a Merge branch 'fix_empty_vector' into 'master'
Guard an undefined behaviour

Closes #6725

See merge request OpenMW/openmw!3037
2 years ago
jvoisin 81bd034a9e Guard an undefined behaviour
`std::vector.back()` on an empty `std::vector` is undefined.
This should fix #6725.

Thanks to @Capostrophic for the investigation.
2 years ago
jvoisin cde7aeac3d Replace an `asert` with a conditional throw
The assert is reachable, resulting in a brutal `abort`
instead of a nice exception.
2 years ago