1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 10:53:53 +00:00
Commit graph

82 commits

Author SHA1 Message Date
elsid
1fbf50fb13
Use PROJECT_SOURCE_DIR in tests 2023-04-23 15:11:17 +02:00
elsid
6f6e452dfa
Add executable to run CS tests 2023-03-12 12:06:33 +01:00
elsid
1857d8a68c
Use target_compile_options to add --coverage 2023-03-10 15:34:08 +01:00
elsid
6f329f3d40
Add tests for ESM::RefId 2023-03-03 15:44:18 +01:00
elsid
beb017e699
Do not truncate too long strings on writing ESM 2023-02-13 10:18:32 +01:00
elsid
1e9e7b7607
Add tests to save and load some ESM3 records 2023-02-11 16:20:10 +01:00
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.
2022-12-28 00:04:04 +01:00
uramer
b13a4f6b01 Lua coroutine crash tests 2022-10-18 21:11:31 +02:00
elsid
d2e1f18924
Add tests for NifOsg::Loader 2022-09-24 19:10:39 +02:00
Project579
b82176410b Use std::filesystem for unit tests temporary files path. 2022-09-19 21:42:18 +02:00
Project579
928b131564 Implement std::filesystem::path conversion tests. 2022-09-11 14:41:20 +02:00
elsid
8e4f6fc4e4
Use FetchContent to get googletest 2022-08-04 01:12:11 +02:00
elsid
7e6c13630a Use target_precompile_headers for the most expensive headers 2022-07-01 14:05:17 +00:00
elsid
3affe9913f
Limit the number of simultaneously open not actively used content files
Use LRU cache for ESMReaders. When cache capacity is reached close least
recently used ESMReader. Remember the file name if a reader was open. Once the
reader requested again open the file if there is stored name for it. Put
released ESMReader to the back of the free items list. Close ESMReader's from
the front of the free items list.

Cached item can be used only by one client at the same time. If the same item is
requested twice exception is thrown. This should never happen in practice. If
this happens need to fix the client logic.

It's allowed to go over the capacity limit when requesting different readers.
Ideally this should never happen but there will be system error anyway
signalizing about too many open files. Need to fix client logic in this case.

All places that were using a vector of ESMReaders now using the cache. Cache is
local for each use case and there is no need for a thread safety.
2022-06-03 01:29:03 +02:00
Petr Mikheev
709d186b8d Put tests output files to a separate dir 2022-05-30 01:34:23 +02:00
cody glassman
04843fed6d moddable post-processing pipeline 2022-05-15 10:03:58 -07:00
madsbuvi
dc3045c970 mono-only version of the shader linking system introduced in the stereo MR 2022-04-26 19:54:24 +02:00
elsid
194c11f214
Fix loading order in EsmLoader
Need to load the last present record from a sequence of loaded records. That
means reverse should be called before unique or unique should be applied for
a reversed range. Since unique keeps only the first element from a sub
sequence of equal elements.

Use forEachUnique with reversed range to avoid redundant container
modifications.
2022-04-13 09:33:24 +02:00
Benjamin Winger
21ffbcc4b4 Lua i18n updates 2022-04-10 07:57:02 +00:00
Matt
49e21e121a Revert "Merge branch 'refactor/6677-2' into 'master'"
This reverts merge request !1733
2022-04-04 17:09:52 +00:00
psi29a
ca77ae336f Merge branch 'refactor/6677-2' into 'master'
Introduce IndexedVector

See merge request OpenMW/openmw!1733
2022-04-04 13:56:20 +00:00
Matt
21e4c10fa9 Introduce IndexedVector 2022-04-04 13:56:19 +00:00
Eris Caffee
14b5bef64f Issue 6558 Move away from md5 in cmake
Updated CMakeLists.txt files to use sha512 instead of md5 to verify downloads
2022-04-03 22:46:39 -05:00
Petr Mikheev
fa115418eb [Lua] Remove queries 2022-03-15 23:35:36 +01:00
elsid
57c1f2e231
Make sure everything compiles in ESM4 2022-02-19 02:52:49 +01:00
elsid
7884a01026
Add tests for Utf8Encoder 2022-02-13 17:19:08 +01:00
uramer
886dee57ee Always use /bigobj, clean up scattered uses into one 2022-01-17 08:05:19 +00:00
Petr Mikheev
a182fdeea1 Permanent storage for Lua data 2022-01-11 11:21:03 +01:00
Petr Mikheev
0f246e7365 Use a separate instance of Lua i18n for every context 2022-01-02 09:58:51 +01:00
elsid
96eb8d7be9
Write generated navmesh to navmeshdb
Perform all request to db in a single thread to avoid blocking navmesh
generator threads due to slow write operations.

Write to db navmesh for all changes except update as it done for memory cache.

Batch multiple db operations into a single transaction to speed up writing by
not executing fsync after each insert/update query. All reads are performed in
the same transaction so they see uncommited data.
2021-12-11 00:22:04 +01:00
elsid
953a4c5550
Add a binary to generate navmesh from content files
Load content files based on the engine config files. Generate navmesh per cell
for all cells and store into SQLite database.
2021-12-11 00:21:56 +01:00
elsid
5325495f46
Move serialization detournavigator/ -> components/ 2021-12-10 23:55:04 +01:00
Petr Mikheev
d3df3efaf1 Precompile sol.hpp in order to reduce compilation time. 2021-12-04 11:32:39 +00:00
elsid
a665a38aca
Use MurmurHash3_x64_128 for file hash 2021-11-21 17:05:59 +01:00
uramer
68963538ae Lua UI API 2021-11-18 15:19:54 +00:00
Cédric Mocquillon
512d64e514 Extract correctSoundPath method to avoid code duplication. Add unit test for the new method 2021-11-10 23:06:35 +01:00
Evil Eye
e1ac871672 Start adding compiler tests 2021-10-30 10:42:08 +02:00
Petr Mikheev
33d71be81f Add LuaUtil::ScriptsConfiguration 2021-10-26 21:32:02 +02:00
elsid
a58f1a94e3
Add helpers for binary serialization
To construct serializer from given entities:
* Data source/destination - any value that has to be serialized/deserialized,
  usually already existing type.
* Format - functional object to define high level serialization logic to
  define specific format and data schema. Like order of fields, allocation.
* Visitor - functional object to define low level serialization logic to
  operator on given data part.
  * BinaryWriter - copies given value into provided buffer.
  * BinaryReader - copies value into given destination from provided buffer.
  * SizeAccumulator - calculates required buffer size for given data.
2021-10-24 14:20:44 +02:00
psi29a
1ffa02b2fd Merge branch 'fix_windows_tests' into 'master'
Fix tests on windows

See merge request OpenMW/openmw!1313
2021-10-22 12:35:10 +00:00
elsid
b5f0057ac9
Fix tests on windows 2021-10-21 19:48:31 +02:00
elsid
a3b6bc7263
Fix logic expression for not found value 2021-10-20 17:48:10 +02:00
elsid
e5413c0664
Add functions to compress/decompress vector of bytes 2021-10-18 20:46:22 +02:00
elsid
bb26ba30b6
Add progress reporter type
To log/report progress of long duration operations using given time period.
2021-10-18 01:26:10 +02:00
elsid
046b5f83ee
Add ESM data loader
A component to load ESM content files with limited support for record types and
selection which of them to load. Supported record types are:
ACTI, CELL, CONT, DOOR, GMST, LAND, STAT.
2021-10-17 19:55:29 +02:00
elsid
c88367b6a6
Add sqlite3 helpers 2021-10-16 17:43:08 +02:00
elsid
035307b012
Add tests for openmw options
In attempt to document current behaviour. Add commented out checks as desired
behaviour.
2021-10-05 22:51:12 +02:00
Petr Mikheev
702eb19271 Fixes and refactoring 2021-07-09 20:48:54 +02:00
Petr Mikheev
b53667d555 Queries. Data structures and lua bindings. 2021-07-09 20:03:27 +02:00
Petr Mikheev
479856f812 Add components/lua/scriptscontainer and components/esm/luascripts 2021-07-09 20:03:27 +02:00