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.
2023-05-22 22:09:08 +02:00
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.
2023-05-22 22:09:08 +02:00
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.
2023-05-22 22:09:06 +02:00
Alexei Dobrohotov
1b5e904285
Read BSMultiBound et al.
2023-05-22 23:05:10 +03:00
Alexei Kotov
401ebfd7f2
Merge branch 'fix_oblivion_loading' into 'master'
...
Fix Oblivion loading
See merge request OpenMW/openmw!3050
2023-05-22 18:18:35 +00:00
Evil Eye
9728024978
Replace compare with more idiomatic methods
2023-05-22 19:51:27 +02:00
jvoisin
7f191a2a8a
Merge branch 'if_all_the_asserts' into 'master'
...
Replace all the `asserts` with `throw` in components/esm4/reader.cpp
See merge request OpenMW/openmw!3047
2023-05-22 17:33:55 +00:00
Evil Eye
97bdc20b70
Merge branch 'copy_warn' into 'master'
...
Fix a gcc warning about copy
See merge request OpenMW/openmw!3046
2023-05-22 16:52:41 +00:00
jvoisin
a9bf671992
Fix Oblivion loading
...
Found by elsid@, and due to !3043
2023-05-22 18:24:39 +02:00
Evil Eye
3138eb406b
Fix case sensitive comparison
2023-05-22 18:18:01 +02:00
elsid
8f47da46ec
Show magic effect name instead of IndexRefId
2023-05-22 18:02:21 +02:00
jvoisin
8b654f276d
Replace all the asserts
with throw
in components/esm4/reader.cpp
2023-05-22 17:42:32 +02:00
elsid
bb1d040ac8
Use settings values for Cells settings
2023-05-22 17:36:23 +02:00
jvoisin
6da3c3e200
Fix a gcc warning about copy
...
```
/home/jvoisin/dev/openmw/openmw/components/fontloader/fontloader.cpp:532:29: warning: loop variable '[key, value]' creates a copy from type 'std::pair<const int, int> const' [-Wrange-loop-construct]
for (const auto [key, value] : additional)
^
/home/jvoisin/dev/openmw/openmw/components/fontloader/fontloader.cpp:532:18: note: use reference type 'std::pair<const int, int> const &' to prevent copying
for (const auto [key, value] : additional)
^~~~~~~~~~~~~~~~~~~~~~~~~
&
1 warning generated.
```
2023-05-22 17:18:43 +02:00
Evil Eye
45c84a2426
Merge branch 'fix_libc++_build' into 'master'
...
Use bool instead of std::stringstream::view
See merge request OpenMW/openmw!3045
2023-05-22 14:12:27 +00:00
elsid
585cf377ed
Use bool instead of std::stringstream::view
...
view is not supported by libc++ used for macOS builds.
2023-05-22 14:32:23 +02:00
psi29a
6f8c152487
Merge branch 'convert_camera_settings' into 'master'
...
Use settings values for Camera settings (#6876 )
See merge request OpenMW/openmw!3041
2023-05-22 09:14:06 +00:00
psi29a
dab616f4e2
Merge branch 'guiew' into 'master'
...
Use string_view in more places and reduce the number of empty string literals
See merge request OpenMW/openmw!3042
2023-05-22 09:12:45 +00:00
psi29a
c939781cfd
Merge branch 'cs_universal_id_ref_id' into 'master'
...
Fix verification error reporting in Editor (#7387 )
Closes #7387
See merge request OpenMW/openmw!3044
2023-05-22 09:08:57 +00:00
psi29a
def5839c8d
Merge branch 'assert_again' into 'master'
...
Replace another `assert` with a `throw`
See merge request OpenMW/openmw!3043
2023-05-22 09:07:02 +00:00
elsid
63e01d86a3
Use string based UniversalId to check script for blacklist
...
Blacklist is a vector of strings and isBlacklisted internally calls getId which
throws exception for RefId based UniversalId.
2023-05-22 03:14:00 +02:00
elsid
0aa569d4fe
Add UniversalId argument type to exception message on invalid access
2023-05-22 03:14:00 +02:00
elsid
292983d57a
Show UniversalId value for all argument types in reports
2023-05-22 03:14:00 +02:00
elsid
7ba397da7d
Use std::span and std::string to define UniversalId related TypeData
2023-05-22 03:14:00 +02:00
elsid
ceab7557f3
Add rudimentary support for ESM::RefId in UniversalId
...
Ideally std::string support should be removed but this may affect too much code.
2023-05-22 03:12:16 +02:00
elsid
4cd5efc6ee
Implement UniversalId with std::variant
2023-05-22 03:03:05 +02:00
elsid
f2a3462e59
Fix UniversalId constructor from ESM::RefId
2023-05-22 02:47:06 +02:00
elsid
6541ac43f5
Add UniversalId unit tests
2023-05-22 02:47:04 +02:00
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
```
2023-05-21 20:07:52 +02:00
Evil Eye
ed7b6dc2a7
Clarify CharacterCreation::setValue
2023-05-21 19:53:31 +02:00
psi29a
364bc91f5b
Merge branch 'fix_element_destroy' into 'master'
...
Fix bug in LuaUi::Element::destroy() that sometimes leads to an infinite loop on UI cleanup
See merge request OpenMW/openmw!3033
2023-05-21 17:33:56 +00:00
psi29a
458ee4abaa
Merge branch 'coc_destination' into 'master'
...
Improve coc destination search in ESM4 cells
See merge request OpenMW/openmw!3034
2023-05-21 17:33:36 +00:00
psi29a
e1754b840a
Merge branch 'fix_empty_vector' into 'master'
...
Guard an undefined behaviour
Closes #6725
See merge request OpenMW/openmw!3037
2023-05-21 17:33:13 +00:00
Tetramir
3d574f16a1
Merge branch 'grid_update' into 'master'
...
Update mHalfGridSize in Scene::changeCellGrid before using it
See merge request OpenMW/openmw!3030
2023-05-21 17:05:01 +00:00
Evil Eye
4e05dd3cd3
Make FontWrapper conditional
2023-05-21 18:21:42 +02:00
Evil Eye
492e336c0c
Use string_view in more UI code
2023-05-21 18:14:12 +02:00
Alexei Kotov
08dc48586e
Merge branch 'assert_throw' into 'master'
...
Replace an `assert` with a conditional throw
See merge request OpenMW/openmw!3038
2023-05-21 15:44:52 +00:00
Alexei Dobrohotov
3e8a9d1de4
Read BSTreeNode, handle as NiNode
2023-05-21 18:16:06 +03:00
Evil Eye
5491512905
Use string_view in more places and reduce the number of empty string literals
2023-05-21 16:39:32 +02:00
Petr Mikheev
9b6808f83d
Improve coc destination search in ESM4 cells
2023-05-21 00:42:25 +02:00
elsid
5d5e6844d1
Use settings values for Camera settings
2023-05-20 22:23:09 +02:00
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.
2023-05-20 19:35:06 +02:00
jvoisin
cde7aeac3d
Replace an asert
with a conditional throw
...
The assert is reachable, resulting in a brutal `abort`
instead of a nice exception.
2023-05-20 19:33:14 +02:00
Alexei Kotov
5b36ea0179
Merge branch 'fix_cell_settings_type' into 'master'
...
Map SettingValueType Cell to float setting type (#7382 )
Closes #7382
See merge request OpenMW/openmw!3035
2023-05-20 14:44:41 +00:00
elsid
4be43a2dca
Map SettingValueType Cell to float setting type
2023-05-20 15:00:00 +02:00
Petr Mikheev
fdd80f93e9
Merge branch 'bb_fix_lua' into 'master'
...
lua - fix bounding box in active grid
See merge request OpenMW/openmw!3031
2023-05-20 10:25:57 +00:00
Petr Mikheev
c6eed2a6c6
Fix bug in LuaUi::Element::destroy() that sometimes leads to an infinite loop on UI cleanup
2023-05-20 02:34:23 +02:00
glassmancody.info
06676fd623
lua - fix bounding box in active grid
2023-05-19 14:29:01 -07:00
Petr Mikheev
1d55844f26
Update mHalfGridSize in Scene::changeCellGrid before using it.
2023-05-19 17:58:59 +02:00
Alexei Kotov
5f6ca2a6d1
Merge branch 'fix_worldspaces' into 'master'
...
Bugfix: Unload active cells when teleporting to another exterior worldspace
See merge request OpenMW/openmw!3028
2023-05-19 14:20:42 +00:00