Commit Graph

6897 Commits (simplify_debugging)

Author SHA1 Message Date
Bret Curtis 4578e4e6e1 oh tidy yourself 12 months ago
Bret Curtis 97fe5cab85 make sure unistd.h is only included if not windows 12 months ago
Bret Curtis d0077fba25 clang format run 1 12 months ago
Bret Curtis 31e90fb478 replace use of boost::iostreams::sink and tee 12 months ago
psi29a 05555947c3 Merge branch 'specialdedup' into 'master'
Deduplicate specialization code

See merge request OpenMW/openmw!3063
1 year ago
jvoisin 44a65512e8 Replace another assert with a throw 1 year ago
Evil Eye 877f6747be Deduplicate specialization code 1 year ago
elsid dc8dfe81ce
Add more details to exceptions 1 year ago
Pierre Mossler e6838cddc7 missing include in attr.cpp 1 year ago
psi29a d3ed04c551 Merge branch 'lua-activeeffects' into 'master'
Lua: Actor api for active effects and active spells

See merge request OpenMW/openmw!3036
1 year ago
Petr Mikheev e74161ea8e Merge branch 'slashrslashmarijuanaenthusiasts' into 'master'
Improve Skyrim tree loading (limited)

See merge request OpenMW/openmw!3054
1 year ago
elsid 89eccab7f1
Add missing include
In file included from /home/elsid/dev/openmw/apps/openmw_test_suite/settings/testvalues.cpp:1:
/home/elsid/dev/openmw/components/misc/strings/conversion.hpp: In function ‘std::string Misc::StringUtils::toHex(std::string_view)’:
/home/elsid/dev/openmw/components/misc/strings/conversion.hpp:139:87: error: ‘uint8_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
  139 |             const std::ptrdiff_t space = static_cast<std::ptrdiff_t>(static_cast<std::uint8_t>(v) <= 0xf);
      |                                                                                       ^~~~~~~
      |                                                                                       wint_t
/home/elsid/dev/openmw/components/misc/strings/conversion.hpp:140:97: error: ‘uint8_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
  140 |             const auto [ptr, ec] = std::to_chars(out + space, out + space + 2, static_cast<std::uint8_t>(v), 16);
      |                                                                                                 ^~~~~~~
      |                                                                                                 wint_t
1 year ago
Mads Buvik Sandvei 410e8b100a Elsid comments 1 year ago
Mads Buvik Sandvei 5a8c6df633 clang'd 1 year ago
Mads Buvik Sandvei 4bf23f152b Revert use of string_view to std::string for effectIdTo* methods. 1 year ago
Mads Buvik Sandvei 6cfc06d7d8 There is no typo 1 year ago
Mads Buvik Sandvei 9a59330561 refactor effect names in loadmgef. Added a map from effect index to non-gmst effect name for use in lua scripts. 1 year ago
Mads Buvik Sandvei b791ce9132 Remove redundant qualifiers 1 year ago
Mads Buvik Sandvei 7ba43c9426 actor.ActiveEffects and actor.ActiveSpells 1 year ago
elsid 2f18da08d7
Add missing include 1 year ago
psi29a 2545185d52 Merge branch 'cs_show_magic_effect_name' into 'master'
Show magic effect name instead of IndexRefId (#7366)

Closes #7366

See merge request OpenMW/openmw!3049
1 year ago
psi29a 64b07ee9f4 Merge branch 'esmtool_dawnguard_dragonborn' into 'master'
Partial support esmtool dump for Dragonborn.esm and Dawnguard.esm from Skyrim

See merge request OpenMW/openmw!3052
1 year ago
psi29a a61f955e9f Merge branch 'case.ext' into 'master'
Fix a regression and use more starts_with and ends_with

See merge request OpenMW/openmw!3051
1 year ago
Alexei Dobrohotov a983977e6a Fix NiSkinData loading for >4.2.1.0 1 year 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.
1 year 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.
1 year 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.
1 year ago
Alexei Dobrohotov 1b5e904285 Read BSMultiBound et al. 1 year ago
Alexei Kotov 401ebfd7f2 Merge branch 'fix_oblivion_loading' into 'master'
Fix Oblivion loading

See merge request OpenMW/openmw!3050
1 year ago
Evil Eye 9728024978 Replace compare with more idiomatic methods 1 year ago
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
1 year ago
jvoisin a9bf671992 Fix Oblivion loading
Found by elsid@, and due to !3043
1 year ago
Evil Eye 3138eb406b Fix case sensitive comparison 1 year ago
elsid 8f47da46ec
Show magic effect name instead of IndexRefId 1 year ago
jvoisin 8b654f276d Replace all the `asserts` with `throw` in components/esm4/reader.cpp 1 year ago
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.
```
1 year ago
psi29a 6f8c152487 Merge branch 'convert_camera_settings' into 'master'
Use settings values for Camera settings (#6876)

See merge request OpenMW/openmw!3041
1 year ago
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
1 year 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
```
1 year ago
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
1 year ago
psi29a e1754b840a Merge branch 'fix_empty_vector' into 'master'
Guard an undefined behaviour

Closes #6725

See merge request OpenMW/openmw!3037
1 year ago
Evil Eye 4e05dd3cd3 Make FontWrapper conditional 1 year ago
Evil Eye 492e336c0c Use string_view in more UI code 1 year ago
Alexei Dobrohotov 3e8a9d1de4 Read BSTreeNode, handle as NiNode 1 year ago
Evil Eye 5491512905 Use string_view in more places and reduce the number of empty string literals 1 year ago
elsid 5d5e6844d1
Use settings values for Camera settings 1 year 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.
1 year ago
jvoisin cde7aeac3d Replace an `asert` with a conditional throw
The assert is reachable, resulting in a brutal `abort`
instead of a nice exception.
1 year ago
Petr Mikheev c6eed2a6c6 Fix bug in LuaUi::Element::destroy() that sometimes leads to an infinite loop on UI cleanup 1 year ago
psi29a 1ce35fa9e7 Merge branch 'lua-bounding-box' into 'master'
Expose game object's bounding box in lua api

See merge request OpenMW/openmw!3009
1 year ago