1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 18:59:57 +00:00
Commit graph

6504 commits

Author SHA1 Message Date
elsid
dd89403df0
Move ensureUtf8Encoding to named namespace
To follow https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#sf21-dont-use-an-unnamed-anonymous-namespace-in-a-header

Add QtGlobal include to define QT_VERSION and QT_VERSION_CHECK macroses before
they're used.
2023-01-18 22:58:35 +01:00
psi29a
ee980721b8 Merge branch 'debug_lua_memory' into 'master'
Additional information in Lua profiler

See merge request OpenMW/openmw!2612
2023-01-18 14:33:05 +00:00
psi29a
fbeacc1e0f Merge branch 'navigator_check_agent_bounds' into 'master'
Check agent bounds on adding agent to navigator

See merge request OpenMW/openmw!2629
2023-01-18 14:31:22 +00:00
psi29a
54c18ea86d Merge branch 'change-const-to-constexpr' into 'master'
change const to constexpr

Closes #6797

See merge request OpenMW/openmw!2630
2023-01-18 14:30:36 +00:00
elsid
cf1d8544e3
Check agent bounds on adding agent to navigator
Do not add agent bounds which are not supported by recastnavigation with given
settings and log such events.

To avoid reaching navmesh tile generation to find out it can't be generated for
such agent bounds.
2023-01-18 12:00:48 +01:00
James-Deciutiis
4e61fec14d change const to constexpr 2023-01-17 19:31:52 -08:00
Andrei Kortunov
ee9ab8d393 Use STL-style iterators instead of Java-style ones 2023-01-15 20:23:18 +04:00
Andrei Kortunov
792feae39e Do not use deprecated implicit conversion 2023-01-15 20:23:18 +04:00
Andrei Kortunov
0864d997d0 Add missing includes 2023-01-15 20:09:56 +04:00
psi29a
a7a89ba7c1 Merge branch 'launcher' into 'master'
Rework how OpenMW launcher looks

Closes #6922

See merge request OpenMW/openmw!2587
2023-01-15 16:00:59 +00:00
psi29a
dc3ec1a0a0 Merge branch 'mwscript' into 'master'
Multiple mwscript optimizations and some refactoring

See merge request OpenMW/openmw!2600
2023-01-15 15:59:30 +00:00
psi29a
32733d23fa Merge branch 'xanim' into 'master'
X-file handling fixes (bug #5371)

Closes #5371

See merge request OpenMW/openmw!2614
2023-01-15 15:57:27 +00:00
Andrei Kortunov
902c48d1bb Rework launcher UI 2023-01-15 12:36:08 +04:00
elsid
44429f0393
Limit NavMeshManager update range by player tile and max tiles
Object AABB may be much larger than area currently covered by navmesh. In this
case all tiles beyond covered range should be ignored. Attempt to iterate over
them will not result in any new tile updates but can take quite a while. At
maximum this can be pow(INT_MAX - INT_MIN, 2) iterations.

Use arbitrary time limit to check for update call to finish in the test.
2023-01-15 04:46:29 +01:00
Alexei Kotov
6ff9b5d326 Make use of ends_with for KF 2023-01-15 01:48:06 +03:00
Alexei Kotov
434b4deda1 Don't use xkf if xnif is merely the base model (bug #5371) 2023-01-14 04:55:12 +03:00
Alexei Kotov
4d0788e016 Use xnif if its xkf is present even if xnif isn't 2023-01-14 03:35:50 +03:00
elsid
d4ab1101eb
Change Interpreter type aliases to be fixed size types
Remove no longer relevant comment for float type.
2023-01-14 00:09:01 +01:00
elsid
b88f0d2dbd
Replace mwscript program serialization into a vector with simple struct
Mostly to avoid string literal lookup by index with iteration over all preciding
literals and calling strlen. This is very inefficient. In genral this makes code
much more straightforward but also makes it portable since now int and float of
different sizes are properly supported.
2023-01-14 00:07:37 +01:00
Petr Mikheev
d9e9db0983 Additional information in Lua profiler 2023-01-13 21:14:23 +01:00
psi29a
25d7ee7fdc Merge branch 'streams' into 'master'
Setup utf8qtextstream in the way consistent with other Qt components

See merge request OpenMW/openmw!2611
2023-01-13 11:23:44 +00:00
Andrei Kortunov
8da93d4b12 Setup utf8qtextstream in the way consistent with other Qt components 2023-01-13 13:10:34 +04:00
jvoisin
c90d22f3b2 Replace usage of QRegularExpression::anchoredPattern with ^ and $
Using `^` and `$` is shorter than `QRegularExpression::anchoredPattern`,
and even allows us in one case to get rid of a trailing `.*`.
2023-01-12 22:52:00 +01:00
Andrei Kortunov
bfcbc2350d Handle UTF-8 in Qt streams in the Qt6-compatible way 2023-01-12 15:39:50 +04:00
elsid
60eede6a1d
Fix variable naming styleguide 2023-01-11 23:47:42 +01:00
elsid
0ab3090385
Make Runtime::getPC and setPC inline 2023-01-11 23:47:42 +01:00
elsid
46b4427d2e
Remove user defined constructor for Runtime 2023-01-11 23:47:42 +01:00
elsid
9c8df09475
Remove user defined constructors for Interpreter 2023-01-11 23:47:42 +01:00
Andrei Kortunov
307a60e87c Migrate from QRegExp to more modern QRegularExpression 2023-01-11 11:21:46 +04:00
elsid
c173348cbe
Use default initializers for ESM::RefNum members
Instead of unset function that is removed now and assignments all over the code.
2023-01-10 00:44:51 +01:00
psi29a
6a250c5900 Merge branch 'baby_it_is_occluded_outside' into 'master'
Weather Particle Occlusion (#5492)

Closes #5492

See merge request OpenMW/openmw!1328
2023-01-07 22:18:45 +00:00
psi29a
83718878b2 Merge branch 'Load_ESM4' into 'master'
Loading ESM4 data and storing them in the ESMStore

See merge request OpenMW/openmw!2557
2023-01-07 22:17:17 +00:00
psi29a
a9d3186173 Merge branch 'fix_esm_fixed_string_warning' into 'master'
Fix gcc warning: array subscript n is outside array bounds of ‘const char [n]’

See merge request OpenMW/openmw!2585
2023-01-07 22:15:16 +00:00
Andrei Kortunov
9630246cae Sort quests in journal by name (bug 7054) 2023-01-07 18:55:51 +04:00
glassmancody.info
9a4977d334 rain occlusion 2023-01-06 22:23:03 -08:00
elsid
2bbed8cc06
Fix gcc warning: array subscript 5 is outside array bounds of ‘const char [5]’
In function ‘bool ESM::operator==(const FixedString<capacity>&, const T* const&) [with long unsigned int capacity = 5; T = char; <template-parameter-1-3> = void]’,
    inlined from ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = ESM::FixedString<5>; T2 = const char*]’ at /home/elsid/dev/googletest/build/gcc/release/install/include/gtest/gtest.h:1358:11,
    inlined from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = ESM::FixedString<5>; T2 = const char*; typename std::enable_if<((! std::is_integral<_Tp>::value) || (! std::is_pointer<_Dp>::value))>::type* <anonymous> = 0]’ at /home/elsid/dev/googletest/build/gcc/release/install/include/gtest/gtest.h:1377:64,
    inlined from ‘virtual void {anonymous}::EsmFixedString_equality_operator_for_not_convertible_to_uint32_with_const_char_pointer_Test::TestBody()’ at apps/openmw_test_suite/esm/test_fixed_string.cpp:165:9:
components/esm/esmcommon.hpp:134:19: warning: array subscript 5 is outside array bounds of ‘const char [5]’ [-Warray-bounds]
  134 |         return rhs[capacity] == '\0';
      |                ~~~^
apps/openmw_test_suite/esm/test_fixed_string.cpp: In member function ‘virtual void {anonymous}::EsmFixedString_equality_operator_for_not_convertible_to_uint32_with_const_char_pointer_Test::TestBody()’:
apps/openmw_test_suite/esm/test_fixed_string.cpp:164:20: note: at offset 5 into object ‘other’ of size 5
  164 |         const char other[5] = { 'a', 'b', 'c', 'd', '\0' };
      |                    ^~~~~
2023-01-06 22:09:07 +01:00
psi29a
55ba5ed7ea Merge branch 'mygui_log' into 'master'
Use OpenMW logging levels for MyGUI log

Closes #7130

See merge request OpenMW/openmw!2582
2023-01-06 15:09:46 +00:00
Andrei Kortunov
b217d1fc36 Use OpenMW logging levels for MyGUI log (feature 7130) 2023-01-06 16:01:30 +04:00
psi29a
0d8d15a732 Merge branch 'fixcolladaanimopbug' into 'master'
Fix Collada animated object bug #7051

Closes #7051

See merge request OpenMW/openmw!2565
2023-01-06 10:10:27 +00:00
unelsson
5b0713517a Clang-format 2023-01-05 01:40:36 +02:00
psi29a
319aa11d84 Merge branch 'l10n_rename' into 'master'
Reorganize l10n files

See merge request OpenMW/openmw!2546
2023-01-04 21:48:00 +00:00
psi29a
1e62b84f9a Merge branch 'lua_initdata' into 'master'
Allow passing `initData` to the :addSript call (#7091)

Closes #7091

See merge request OpenMW/openmw!2568
2023-01-04 14:32:23 +00:00
florent.teppe
631fa26872 Applies review advice. 2023-01-04 12:22:16 +01:00
unelsson
ba9c2c9928 Add TemplateRef to animated Collada model 2023-01-03 22:51:46 +02:00
florent.teppe
3b2d9161c4 Applied review advice
better deals with templated functions meant for esm3 used by esm4s.
simplified loading of esm4 and dealing with unhandled record types.
2023-01-02 19:20:03 +01:00
florent.teppe
e9190bedc8 Reverts useless CmakeList formatting 2023-01-02 18:35:05 +01:00
Petr Mikheev
8c7d347179 Reorganize l10n files 2023-01-02 13:21:05 +01:00
florent.teppe
077cf97bc4 The esm4 reader logic is mutualised
to avoid copy pasting code, readerutils gives functions that take visitors as params to decide how a record must be handled

Check encoder exists, and get value of stateless encoder.

fixes code formatting conventions

Fixed output of record with RefId

also fixed readTypedRecord and readRecord to have the proper return types

Check if the type has a sRecordId
2023-01-01 19:22:27 +01:00
florent.teppe
c721a6cafa Initial commit to load ESM4
Some data is actually loaded and store in ESM Store
Any new ESM4 will go through the same code path and be automatically sent to the right store
2023-01-01 16:22:57 +01:00
Petr Mikheev
b248c3e173 Allow passing initData to the :addSript call (#7091) 2022-12-31 22:08:17 +01:00