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

26 commits

Author SHA1 Message Date
elsid
6451750890
Write AiSequence and Script data field by field via decompose function
Use the same function to load and save to have single place with field order
definition. Use concepts for overload over different types.
2024-01-14 23:04:56 +01:00
elsid
3592dc4c88
Add tests for saving and loading AiSequence::AiWander 2024-01-12 12:31:40 +01:00
Evil Eye
e63933efa6 Use NAM9 for stack count 2023-12-31 17:12:46 +00:00
elsid
66c5944ecf
Fix use after move in InfoOrder::insertInfo
When it->second.mPosition->mPrev != value.mPrev value is first moved into
*mPosition and then used to get mPrev. Since mPrev is RefId and it's copy-only
type there is no real problem but coverity complains about it.

Also enforce contract of insertInfo to support move-only types by adding a test
for a value type with deleted copy constructors.
2023-07-30 13:37:53 +02:00
psi29a
6601b0cb15 Merge branch 'fastandloose' into 'master'
Drop support for --fs-strict

Closes #7394

See merge request OpenMW/openmw!3093
2023-07-02 19:24:14 +00:00
Evil Eye
eeda48ec50 Drop support for --fs-strict 2023-06-08 21:10:09 +02:00
Evil Eye
da4e04522b More closely replicate Morrowind.exe's locks 2023-06-08 20:10:32 +02:00
Petr Mikheev
f09a689a4f Merge ESM::RefNum and ESM4::FormId 2023-04-09 00:23:32 +02:00
elsid
aa77e727b8
Fix build with clang and libc++
libc++ does not have such function:

apps/openmw_test_suite/esm3/testesmwriter.cpp:73:30: error: no member named 'view' in 'std::ostringstream'
            EXPECT_EQ(stream.view().size(), size);
                      ~~~~~~ ^
2023-04-08 13:41:28 +02:00
elsid
5b14ff4470
Add tests to verify RefId size written to ESM file 2023-04-08 01:06:11 +02:00
elsid
fd9f652f43
Add CurrentContentFormatVersion to Esm3SaveLoadRecordTest parameters 2023-04-07 20:18:02 +02:00
elsid
e3944f741e
Test save/load for all ESM::CellRef fields 2023-04-07 20:18:00 +02:00
florent.teppe
0d17e20490 Implements serialize/deserialize
fixes test compilation.
2023-04-03 18:41:25 +02:00
elsid
9162eaa019
Test more ESM::Player records 2023-04-02 19:58:27 +02:00
elsid
452d1e7e49
Store original string id for Dialogue records 2023-03-26 19:07:32 +02:00
elsid
d6c8c54dc5
Generate test cases for all ESM3 format versions since MaxStringRefIdFormatVersion 2023-03-26 19:07:25 +02:00
elsid
d1e8e56619
Make QuickKey type a fixed size enum class 2023-03-21 20:53:04 +01:00
elsid
2135eba103
Fix loading ESM3 QuickKeys 2023-03-21 20:44:42 +01:00
elsid
0992624c8b
Support reading and writing typed ESM::RefId to ESM 2023-03-19 17:20:48 +01:00
elsid
80e6d6cbe3
Support variable size strings in ESM3 2023-02-13 10:18:32 +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
clang-format-bot
ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
Project579
b82176410b Use std::filesystem for unit tests temporary files path. 2022-09-19 21:42:18 +02:00
Project579
e5c417c968 Make sure all paths are passed as std::filesystem::path instead of std::string where possible. 2022-09-11 14:41:15 +02: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