1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-12-17 22:13:08 +00:00
Commit graph

8792 commits

Author SHA1 Message Date
Evil Eye
82914be8b2 Treat TES4+ BSA paths as VFS paths 2025-12-08 17:44:15 +01:00
Evil Eye
d45f252f69 Use vfs paths in MyGUI data manager 2025-12-08 16:40:39 +01:00
Evil Eye
6e8b6ef48e Don't use filesystem::path while looking for vfs files 2025-12-08 16:06:15 +01:00
Alexei Kotov
b917b146c5 Merge branch 'androidproof' into 'master'
Prevent UB when reading global variables

Closes #6494

See merge request OpenMW/openmw!5022
2025-12-07 21:38:18 +03:00
Alexei Kotov
ee9d7db3c1 Merge branch 'gmstl10n' into 'master'
Allow composition of GMST l10n values

See merge request OpenMW/openmw!4873
2025-12-07 14:02:12 +03:00
Evil Eye
e422c09820 Merge branch 'vfs_normalized_path_24' into 'master'
Use normalized path in LuaUi::TextureData and to implement correctResourcePath (#8138)

See merge request OpenMW/openmw!4920
2025-12-07 08:07:49 +00:00
Alexei Kotov
1223ca0228 Merge branch 'fix_std_23' into 'master'
Fix compilation with -std=23

See merge request OpenMW/openmw!5019
2025-12-06 04:10:49 +03:00
elsid
66923870da
Use normalized path to implement correctResourcePath 2025-12-06 00:12:43 +01:00
elsid
1b362140ae
Remove duplicated and leading slashes in normalizeFilenameInPlace
To be consistent with correctResourcePath.
2025-12-06 00:12:43 +01:00
elsid
60c7b3aa14
Move code from components/lua_ui/resources.cpp to header 2025-12-06 00:12:42 +01:00
elsid
2c142faaa9
Use normalized path in LuaUi::TextureData 2025-12-06 00:12:42 +01:00
elsid
538e5d5502
Use normalizeFilename in correctResourcePath 2025-12-06 00:12:42 +01:00
Alexei Kotov
e7b954a7b6 Merge branch 'feature/support-extra-gamepad-buttons' into 'master'
Add support for modern SDL controller buttons (Touchpad, Misc1, Paddles)

See merge request OpenMW/openmw!5017
2025-12-05 06:12:35 +03:00
Dima Katashov
d7ad994fb6 Add support for modern SDL controller buttons (Touchpad, Misc1, Paddles) 2025-12-05 06:12:35 +03:00
elsid
402e1b3096
Fix compilation with -std=23
/usr/include/c++/15.2.1/bits/unique_ptr.h: In instantiation of ‘constexpr std::__detail::__unique_ptr_t<_Tp> std::make_unique(_Args&& ...) [with _Tp = Shader::HotReloadManager; _Args = {}; __detail::__unique_ptr_t<_Tp> = __detail::__unique_ptr_t<Shader::HotReloadManager>]’:
/home/elsid/dev/openmw/components/shader/shadermanager.cpp:83:63:   required from here
   83 |         mHotReloadManager = std::make_unique<HotReloadManager>();
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/usr/include/c++/15.2.1/bits/unique_ptr.h:1085:30: error: invalid use of incomplete type ‘struct Shader::HotReloadManager’
 1085 |     { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
components/shader/shadermanager.hpp:24:12: note: forward declaration of ‘struct Shader::HotReloadManager’
   24 |     struct HotReloadManager;
      |            ^~~~~~~~~~~~~~~~
2025-12-03 23:21:11 +01:00
elsid
cef1bb1219
Log file stream errors 2025-12-03 23:21:11 +01:00
elsid
c7b0f99079
Do not read failed to open shader file 2025-12-03 23:20:52 +01:00
Evil Eye
8b79e5d459 Simplify fallback 2025-12-03 16:40:25 +01:00
Evil Eye
2c4559e507 Match x86 for every possible float value 2025-12-02 22:01:58 +01:00
Evil Eye
be73f2b019 Prevent UB when reading global variables 2025-12-01 20:58:25 +01:00
Evil Eye
b424929fce Address feedback 2025-12-01 17:02:28 +01:00
Alexei Kotov
20d14b57c1 Expose sunlight direction to post-processing (#8826) 2025-11-29 20:27:34 +03:00
Alexei Kotov
96565e9afb Merge branch 'fix_clang_tidy_warnings' into 'master'
Fix clang tidy warnings (version 21.1.6)

See merge request OpenMW/openmw!5015
2025-11-27 01:16:51 +03:00
Alexei Kotov
c31b4efc01 Merge branch 'globaltargetnumberone' into 'master'
Improve support for global script targets

Closes #2316, #7830, and #2311

See merge request OpenMW/openmw!4812
2025-11-27 01:16:25 +03:00
Evil Eye
0c95e5c7b8 Ensure thread safety 2025-11-25 22:20:27 +01:00
elsid
feb9cc004c
Fix portability-avoid-pragma-once warnings
components/misc/helpviewer.hpp:1:1: error: avoid 'pragma once' directive; use include guards instead [portability-avoid-pragma-once,-warnings-as-errors]
    1 | #pragma once
      | ^

apps/opencs/view/world/tableheadermouseeventhandler.hpp:1:1: error: avoid 'pragma once' directive; use include guards instead [portability-avoid-pragma-once,-warnings-as-errors]
    1 | #pragma once
      | ^
2025-11-25 21:16:50 +01:00
elsid
4186ca6ceb
Fix clang-analyzer-security.ArrayBound warning
Size of an array is not a valid index.

components/esm4/reader.cpp:925:15: error: Out of bound access to memory after the end of 'sGroupType' [clang-analyzer-security.ArrayBound,-warnings-as-errors]
  925 |         ss << sGroupType[std::min<std::size_t>(type, std::size(sGroupType))]; // avoid out of range
      |               ^
components/esm4/reader.cpp:627:13: note: Assuming field 'groupSize' is equal to field 'recHeaderSize'
  627 |         if (mCtx.recordHeader.group.groupSize == (std::uint32_t)mCtx.recHeaderSize)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:627:9: note: Taking true branch
  627 |         if (mCtx.recordHeader.group.groupSize == (std::uint32_t)mCtx.recHeaderSize)
      |         ^
components/esm4/reader.cpp:634:17: note: Assuming the condition is true
  634 |             if (!mCtx.groupStack.empty()) // top group may be empty (e.g. HAIR in Skyrim)
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:634:13: note: Taking true branch
  634 |             if (!mCtx.groupStack.empty()) // top group may be empty (e.g. HAIR in Skyrim)
      |             ^
components/esm4/reader.cpp:638:17: note: Calling 'Reader::exitGroupCheck'
  638 |                 exitGroupCheck();
      |                 ^~~~~~~~~~~~~~~~
components/esm4/reader.cpp:650:13: note: Assuming the condition is false
  650 |         if (mCtx.groupStack.empty())
      |             ^~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:650:9: note: Taking false branch
  650 |         if (mCtx.groupStack.empty())
      |         ^
components/esm4/reader.cpp:655:16: note: Assuming 'lastGroupSize' is <= field 'second'
  655 |         while (mCtx.groupStack.back().second >= lastGroupSize)
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:655:9: note: Loop condition is true.  Entering loop body
  655 |         while (mCtx.groupStack.back().second >= lastGroupSize)
      |         ^
components/esm4/reader.cpp:663:17: note: Assuming 'overshoot' is <= 0
  663 |             if (overshoot > 0)
      |                 ^~~~~~~~~~~~~
components/esm4/reader.cpp:663:13: note: Taking false branch
  663 |             if (overshoot > 0)
      |             ^
components/esm4/reader.cpp:676:17: note: Assuming the condition is false
  676 |             if (mCtx.groupStack.empty())
      |                 ^~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:676:13: note: Taking false branch
  676 |             if (mCtx.groupStack.empty())
      |             ^
components/esm4/reader.cpp:682:17: note: Assuming 'lastGroupSize' is >= field 'second'
  682 |             if (lastGroupSize < mCtx.groupStack.back().second)
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:682:13: note: Taking false branch
  682 |             if (lastGroupSize < mCtx.groupStack.back().second)
      |             ^
components/esm4/reader.cpp:686:17: note: Assuming 'lastGroupSize' is < field 'second'
  686 |             if (mCtx.groupStack.back().second > lastGroupSize) // FIXME: debugging only
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:686:13: note: Taking true branch
  686 |             if (mCtx.groupStack.back().second > lastGroupSize) // FIXME: debugging only
      |             ^
components/esm4/reader.cpp:687:30: note: Calling 'printLabel'
  687 |                 std::cerr << printLabel(mCtx.groupStack.back().first.label, mCtx.groupStack.back().first.type)
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:925:15: note: Access of 'sGroupType' at index 12, while it holds only 12 'class std::basic_string_view<char>' elements
  925 |         ss << sGroupType[std::min<std::size_t>(type, std::size(sGroupType))]; // avoid out of range
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-11-25 00:03:39 +01:00
jvoisin
472240526d Merge branch 'fix_niftest_afl_findings' into 'master'
Fix AFL findings in niftest

See merge request OpenMW/openmw!4988
2025-11-24 21:41:46 +00:00
Evil Eye
0a04bfa46d Fix rebase 2025-11-24 19:43:39 +01:00
Evil Eye
bb4937f827 Allow composition of GMST l10n values 2025-11-24 19:33:28 +01:00
Alexei Kotov
c687a21ccb Merge branch 'enum_naming' into 'master'
Fix and enforce enum naming (#8424)

See merge request OpenMW/openmw!4986
2025-11-23 22:36:23 +03:00
elsid
7e1c1e8625
Use proper type for bhkRagdollTemplate::mBones 2025-11-23 13:21:41 +01:00
elsid
246759ecd2
Only reserve capacity when reading collections
But do not initialize. If the meta information is invalid and has a big
value, initialization will take significant amount of time but there
might be no actual data in the file because it's too small.
2025-11-23 13:17:00 +01:00
elsid
434f450778
Check Nif::RecordPtrT in debug builds
To verify class invariant.
2025-11-23 13:17:00 +01:00
elsid
0c2164330b
Use at instead of operator[] to access nif record types
To fix crash on out of bounds access.
2025-11-23 13:17:00 +01:00
elsid
20c388a410
Replace asserts by exceptions in RecordPtrT
It's possible to fail when reading nif file.
2025-11-23 13:17:00 +01:00
elsid
aa4caae2bf
Use proper naming for Nif::RecordPtrT index 2025-11-23 13:16:59 +01:00
elsid
e882c1c722
Check if nif stream has requested amount of data
Memory allocation with initialization may take significat amount of time
if meta information does not match actual content.
2025-11-23 13:16:59 +01:00
elsid
1ae0aadfed
Use fail function to verify nif stream state
If there is a failure to read the file like incomplete read, bad returns
false, but fail returns true. This is important for reading number of
items more than the file actually has.
2025-11-23 13:16:59 +01:00
Alexei Kotov
b49b048f72 Merge branch 'warn-baby-warn-warning-inferno' into 'master'
Warning inferno - fix warnings, then fix warnings

Closes #8674

See merge request OpenMW/openmw!4927
2025-11-23 15:01:53 +03:00
elsid
d4ce5a2ac6
Fix and enforce enum naming 2025-11-22 11:19:18 +01:00
Evil Eye
c06f94fee8 Merge branch 'fix_esmtool_afl_findings' into 'master'
Check index for ESM4 race parts

See merge request OpenMW/openmw!4987
2025-11-16 13:18:27 +00:00
Dave Corley
307a131ca0 FIX: Correct compile error on newest clang 2025-11-11 11:25:52 -06:00
AnyOldName3
447e01504e Another capitalisation warning 2025-11-10 21:34:46 +00:00
jvoisin
c09cb5c0de Merge branch 'fileview' into 'master'
Use std::string_view in file collections

See merge request OpenMW/openmw!4909
2025-11-10 21:08:05 +00:00
AnyOldName3
9d0a8eb8c4 New warning from !4980
It didn't like snake case, and then MSVC wasn't happened that it shadowed the constexpr value with the same name
2025-11-10 19:08:09 +00:00
AnyOldName3
f8553f2e8a Resolve new warning from !4798 2025-11-10 16:03:02 +00:00
AnyOldName3
43fecf48c7 Fix new warnings from !4925
I don't understand why this needed doing now, as this was merged weeks ago and I thought I'd absorbed conflicts since then.
2025-11-10 16:02:36 +00:00
AnyOldName3
ef8e7d97cb Resolve merge conflicts from !4971 2025-11-10 16:01:47 +00:00
AnyOldName3
f31ec2b3a5 Merge branch 'printf' into 'master'
Bring messagebox format parsing more in line with printf/vanilla

Closes #8732

See merge request OpenMW/openmw!4878
2025-11-10 15:23:48 +00:00