elsid
1857d8a68c
Use target_compile_options to add --coverage
2 years ago
Alexei Dobrohotov
562461a659
Unify collision shape transformations
2 years ago
Alexei Dobrohotov
2277bdc1ae
Improve btTriangleMesh abuse (bug #6027 , part 2)
2 years ago
Evil Eye
724c6ec425
Match unit test to Morrowind.exe behaviour
2 years ago
Petr Mikheev
e70ab80b90
Ignore duplicated preferred l10n locales
2 years ago
elsid
cd6a5b5a0e
Support asymmetric comparison between ESM::RefId and std::string_view
2 years ago
elsid
6f329f3d40
Add tests for ESM::RefId
2 years ago
elsid
eb17f0ba06
Use ESM::RefId as key in TestInterpreterContext::mMembers
2 years ago
elsid
dfcea389be
Add helper functions for string comparison to RefId
2 years ago
psi29a
340a2aa826
Merge branch 'ref_id_cmp_string_view' into 'master'
...
Support RefId comparison with std::string_view
See merge request OpenMW/openmw!2784
2 years ago
elsid
2fcb94064d
Support RefId comparison with std::string_view
2 years ago
Alexei Kotov
7fd9b27b54
Don't combine static node collision geometry (bug #6027 )
2 years ago
Petr Mikheev
b0a6e4e510
[Lua] Add memory usage test
2 years ago
Cody Glassman
ac4787aeec
shade refactor
2 years ago
psi29a
0f331a4fc5
Merge branch 'lua_callback' into 'master'
...
Fix potential memory leak in LuaUtil::Callback
See merge request OpenMW/openmw!2733
2 years ago
elsid
b5ec584be2
Replace ESM::RefId::sEmpty by default constructed RefId where possible
...
Static const is only required to provide a reference or a pointer when it is not
possible with default constructed temporary.
2 years ago
elsid
28f7a89530
Reuse dtNavMeshQuery
...
To avoid redundant allocations.
2 years ago
Petr Mikheev
eceeb15ee5
Fix bug in lua_ui/content.lua: getmetatable(ui.content{}) shouldn't return a global mutable table
2 years ago
Petr Mikheev
65885d994f
Don't expose LuaUtil::Callback to lua
2 years ago
Petr Mikheev
71ba7b88e2
Move asyncpackage from apps/openmw/mwlua to components/lua
2 years ago
elsid
80e6d6cbe3
Support variable size strings in ESM3
2 years ago
elsid
beb017e699
Do not truncate too long strings on writing ESM
2 years ago
elsid
12d36fb1d7
Add missing include
2 years ago
elsid
1e9e7b7607
Add tests to save and load some ESM3 records
2 years ago
elsid
2e64155c0f
Use signed type for left record and files size in ESM3 reader context
...
Otherwise reading some of the records like ESM::CellRef without a subrecord
after could lead to underflow of ESM_Context::leftRec which makes
ESM::ESMReader::hasMoreSubs to return true and load hangs for a while trying to
read the same subrecord many times.
Fix ESM::Variant tests since it's now required to have a record for any ESM
data. Add 16 (size of record header) to all expected data sizes.
2 years ago
elsid
080700f8fe
Name all custom ESM format versions and add tests
2 years ago
florent.teppe
dc961e3189
Adds the light into the scene.
...
Common struct for ESM3 and ESM4 light
2 years ago
psi29a
4032c447e9
Merge branch 'load-ESM4-Cell' into 'master'
...
Can load and coc into an interrior oblivion cell
See merge request OpenMW/openmw!2647
2 years ago
psi29a
68b3b90255
Merge branch 'ui_content_leak' into 'master'
...
Move implementation of UI Content to Lua (#7155 )
See merge request OpenMW/openmw!2661
2 years ago
uramer
e96681151c
Get rid of the LuaUI::Content namespace
2 years ago
uramer
d24c506b0e
Move metatable protection asserts to tests
2 years ago
uramer
bbbef96087
Switch to loadInternalLib
2 years ago
uramer
c17eedd348
Documentation and API fixes (part of !2529 )
2 years ago
uramer
259f104311
Clean up
2 years ago
uramer
3618b3f409
Fix Content::View::remove
2 years ago
uramer
fc1430af95
Move implementation of UI Content to Lua
2 years ago
florent.teppe
562e129bd0
encapsulations of esm3 cell and esm4 cells.
2 years ago
florent.teppe
a4137e941c
std::string_view can be used in map and unordered map
...
This avoids some unecessary dynamic allocations.
Also applies some review advice.
2 years ago
florent.teppe
150e2ba885
Revert "Use ESM::RefId for worldspace in detournavigator"
...
This reverts commit b4ab153418
.
# Conflicts:
# apps/navmeshtool/worldspacedata.cpp
2 years ago
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.
2 years ago
elsid
1cbe295030
Extend navigator tests for update with big object
...
Check for the number of generated recast mesh tiles and navmesh tiles.
2 years ago
psi29a
dc3ec1a0a0
Merge branch 'mwscript' into 'master'
...
Multiple mwscript optimizations and some refactoring
See merge request OpenMW/openmw!2600
2 years ago
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.
2 years ago
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.
2 years ago
psi29a
83718878b2
Merge branch 'Load_ESM4' into 'master'
...
Loading ESM4 data and storing them in the ESMStore
See merge request OpenMW/openmw!2557
2 years ago
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' };
| ^~~~~
2 years ago
elsid
c80ba92ab7
Add more tests for ESM::FixedString
2 years ago
elsid
7c60905266
Put ESM::FixedString tests into unnamed namespace
2 years ago
florent.teppe
400d51c099
Fix compile MSVC
2 years ago
florent.teppe
b88eee08c2
Store display's the ESM4's RecnameInt when not found
2 years ago
florent.teppe
631fa26872
Applies review advice.
2 years ago
florent.teppe
e80dbd7c95
Moved the test to test_store.cpp where it belongs
2 years ago
elsid
b4ab153418
Use ESM::RefId for worldspace in detournavigator
2 years ago
psi29a
80e2cd79ec
Merge branch 'boat_closer_to_todd' into 'master'
...
Ignore special characters preceding script commands
Closes #6807
See merge request OpenMW/openmw!2555
2 years ago
psi29a
7827d3ae8f
Merge branch 'fix_hour_modulo' into 'master'
...
Fix hour modulo expression (#7121 )
Closes #7121
See merge request OpenMW/openmw!2556
2 years ago
elsid
25ead80d8b
Fix hour modulo expression
...
Round result of std::fmod(hours, 24) to the nearest float below 24 on double to
float conversion when it is not. Add special type and conversion function along
with tests to be used in all places where such conversion happens.
To avoid producing hours equal to 24 due to double to float precision loss.
2 years ago
florent.teppe
30a020883e
Avoids unecessary copies
...
Fixed issue with lowerCase
Oups fixed compialtion on openMW_test_suite
2 years ago
florent.teppe
b61d5d8123
Some RefId == ESM::RefId::StringRefId('constString') still existed
2 years ago
florent.teppe
65cdd489fb
create a specific esm reader function for RefID to avoid allocation for string and then again for RefId
...
Fixed some types
removed useless header
applied clang format
fixed compile tests
fixed clang tidy, and closer to logic before this MR
Removed hardcoded refids
unless there is a returned value we don't use static RefIds
can use == between RefId and hardcoded string
Fix clang format
Fixed a few instances where std::string was used, when only const std::string& was needed
removed unused variable
2 years ago
florent.teppe
874ff88288
In the interpretter, the id is no longer passed by vallue, but as a const reference instead.
...
In getMembersLocal(, a reference to a reference wrapper is used, because the id can change, bu all we need to do is change a pointer.No need to change the value
2 years ago
fteppe
20da0892ef
openMW_test_suite compiles and runs
...
Slowly moving through the open-cs errors
Good progress in openCS
Very good progress on openCS
Getting closer with openCS
OpenCS compiles and runs! Didn't have time to test it all though
ix openMW
everything compiles on windows??
Fix gcc
Fix Clang
2 years ago
Evil Eye
b19ad079c2
Ignore special characters preceding script commands
2 years ago
elsid
0b399a9d1a
Fix detournavigator tests
...
d40c09c18c
changed the logic in parallel with
15e8f0b53c
making this check invalid.
2 years ago
elsid
15e8f0b53c
Check input and report errors via RecastContext
...
Recast functions have preconditions for arguments they don't validate. This may
produce garbage data which may lead to crash. Check arguments and log when they
are invalid.
Do not throw exceptions when these function calls fail, capture Recast reported
errors via RecastContext inherited from rcContext and log them.
2 years ago
Petr Mikheev
55db95d4cf
Update Lua profiler; add ability to run OpenMW with old LuaJit that doesn't allow custom allocator (Lua profiler will be disabled in this case)
2 years ago
Petr Mikheev
6fa65e4729
Track memory and CPU usage per script in LuaUtil::LuaState
2 years ago
uramer
b13a4f6b01
Lua coroutine crash tests
2 years ago
psi29a
e16c451d08
Merge branch 'l10n' into 'master'
...
Separate l10n manager from lua
See merge request OpenMW/openmw!2451
2 years ago
elsid
843753da14
Remove unused includes
2 years ago
Petr Mikheev
3697c9266b
Separate l10n manager from lua
2 years ago
elsid
063fff7fa4
Fix and prevent -Wextra-semi warning
2 years ago
elsid
d2e1f18924
Add tests for NifOsg::Loader
2 years ago
elsid
4b760e8846
Do not add redundant nullptr parent
...
There are no failed tests after this, so this is not really needed.
2 years ago
elsid
83bb2195b0
Move init functions for Nif nodes to a separate file
...
This will be used in other tests.
2 years ago
elsid
f2fb3d6de8
Separate NIFFileReader from NIFFile
...
NIFFile might not always be created from a file or stream containing NIF data.
Basically there are 2 different responsibilities for this class:
1. Read NIF file
2. Provide input for nifosg and bulletnifloader.
Remove no longer needed NIFFileMock since the state of NIFFfile can be
initialized independently from reading NIF file.
2 years ago
clang-format-bot
ddb0522bbf
Apply clang-format to code base
2 years ago
Project579
b82176410b
Use std::filesystem for unit tests temporary files path.
2 years ago
elsid
5b1d6917ef
Add comments to prevent line splitting on formatting
2 years ago
elsid
6ae15f08e0
Avoid chained operator() calls to prevent formatting issues
2 years ago
Project579
5456ef1d50
Add new functions and overloads to support std::u8string and std::filesystem::path.
2 years ago
Project579
928b131564
Implement std::filesystem::path conversion tests.
2 years ago
Project579
a13709c510
Replace implicit convertions from std::filesystem::path to std::string with correctly converting functions.
2 years ago
Project579
864112b5db
Fixed Windows build when using MSVC 14.26 and MacOS build.
2 years ago
Project579
e5c417c968
Make sure all paths are passed as std::filesystem::path instead of std::string where possible.
2 years ago
Project579
cf0af87c80
Revert changes from "4c8e1ccf - Fixed windows build and updated tests to reflect changes of escape character from "&" to "\"" in "apps/openmw_test_suite/openmw/options.cpp"
2 years ago
Project579
cd229a965b
Fixed windows build and updated tests to reflect changes of escape character from "&" to "\"
2 years ago
Project579
4bb07282c9
Replace all remaining occurrences of boost::filesystem with std::filesystem.
2 years ago
elsid
22ee592dd3
Lock TileCachedRecastMeshManager once per changing a cell
...
To save time on locking mutex and prevent AsyncNavMeshUpdater to use RecastMesh
for a tile in the middle of objects loading.
2 years ago
elsid
d15e1dca84
Use R-tree for objects to be used for navmesh generation
...
Instead of storing a set of objects per tile.
2 years ago
psi29a
fcd9b78cac
Merge branch 'REFACTOR_STORE' into 'master'
...
Refactoring the ESM store to better support many new ESM4 types
See merge request OpenMW/openmw!2161
2 years ago
elsid
180d609e0d
Check "wait until min distance to player" only for requiredTilesPresent wait condition
...
allJobsDone should wait even if "wait until min distance to player" is 0.
2 years ago
elsid
204ab6fea3
Use version instead of generation and revision for recast mesh
2 years ago
florent.teppe
0dd529ab1d
With the records include removed from store.hpp, need to include the relevant files accross the codebase.Lots of touched files, but very little done
2 years ago
elsid
e2d566b89d
Store changed tiles in TileCachedRecastMeshManager
2 years ago
Evil Eye
02bbb0be45
Improve format workaround and add unit tests
2 years ago
elsid
948e2f5db9
Do not use collision shapes with visual only collision to generate navmesh
...
These collision shapes are not used for actors movement physics simulation.
2 years ago
Evil Eye
0df45a90b3
Use string_view in the remaining Class methods and push string_views closer to the MyGUI boundary
2 years ago
elsid
5dc612aa54
Replace ciCompareLen with ciStartsWith where possible
...
`ciCompareLen(a, b, b.size()) == 0` expression is an equivalent of checking for
equality of `a` prefix with size `b.size()` with `b`.
`ciCompareLen(a, b, a.size()) == 0` is also the same thing but `a` is a prefix
`b` should start with.
2 years ago
elsid
e1bed86d7e
Do single navigator update per frame
...
Primarily for crossing cell border case. Each Navigator::update call has a cost.
Doing it multiple times per frame increased frame duration on cell loading.
Call Navigator::wait only when cell has changed but do not use
Scene::hasCellChanged because it doesn't always indicates it.
2 years ago
Evil Eye
51938f9ef7
Use string_view in Interpreter::Context
2 years ago