Commit Graph

492 Commits (8e3576022a327c68c053f1869ff44997262aedd6)

Author SHA1 Message Date
Bret Curtis 0db31207dc remove remaining boost::filesystem cruft 2 years ago
elsid 7a7c20d49e
Define single UpdateGuard type in a separate file 2 years ago
elsid 2cbbdc2879
Add missing files to components/detournavigator list 2 years ago
psi29a ad25e9b154 Merge branch 'settings_storage' into 'master'
Typed settings storage (#6876)

See merge request OpenMW/openmw!2651
2 years ago
Petr Mikheev f09a689a4f Merge ESM::RefNum and ESM4::FormId 2 years ago
psi29a aad9ce53db Merge branch 'esm4_gmst' into 'master'
Support loading ESM4 GMST records

See merge request OpenMW/openmw!2892
2 years ago
elsid dbed00842e
Split components/esm4/common.hpp header 2 years ago
elsid 87ac85223a
Support loading ESM4 GMST records 2 years ago
florent.teppe 21bd28542a Applies review advice
2d coord hash moved to hash.hpp file
format version adds suffix to be more coherent
don't use ESM::RefId::sEmpty
RefId equality with string_view, conversion to refId unecessary
action teleport remove test that mCellId is empty
removes some const references, when copy is enough
invalid refid => empty refid
removes useless change
2 years ago
florent.teppe d782d37ee2 Make sure Vec2iRefId is trivially copyable on GCC 11.3
std::pair<int, int> isn't trivially copyable on some compilers
so a specific struct is defined, it's an int pair, but it should be recognised by GCC 11.3 as trivially copyable

Vec2iRefId => ESM3ExteriorCellRefId

more explcit name and use mX,mY instead of pair
renamed files and enum
2 years ago
florent.teppe 4c15064a83 Create new Vec2i RefId for ESM3 exterior cells.
Applies the necessary changes to use !2708 for the new Id type
2 years ago
elsid db7d0adfe8
Define settings values based on documentation
Using docs/source/reference/modding/settings/*.rst and
files/settings-default.cfg files content.
2 years ago
elsid 3bad40153c
Define typed settings storage with single time initialization
To make sure loaded settings have valid values doing the check once per loading.
And to make access more efficient.
2 years ago
elsid b7fdca0fe6
Use serialized ESM::RefId for Lua records 2 years ago
elsid e6cf516e12
Support index RefId as pair of record type and std::uint32_t 2 years ago
elsid 86293af084
Support generated RefId as std::uint64_t 2 years ago
elsid 069d4255b9
Make ESM::RefId to be fixed size cheap to copy
Use std::variant. Store refId strings in unordered_set and use pointer to an
item there. Inserts to unordered_set do not invalidate pointers to values so the
pointer is always valid. Elements are not removed. Assume there is finite number
of string refIds.
2 years ago
elsid e892c62b10
Fix loading, inserting and moving topic info records
Topic info records need to have specific order defined via mNext and mPrev
fields (next and previous records). When loading multiple files a record may be
inserted into middle of the topic but neighborhood records may not be aware of
it. Having the order it's possible to move the records within one topic.

Sort the record once after loading all content files but preserve the order for
all other operations. Use std::map to group info ids by topic to make sure the
topics order is stable. Keep order within a topic for info ids on loading new
records. Use this order later for sorting the records.
2 years ago
elsid 1cc4909144
Add --coverage to components_qt, benchmarks and openmw-cs 2 years ago
elsid 1857d8a68c
Use target_compile_options to add --coverage 2 years ago
elsid cc066efa11
Fix identation in CMakeLists.txt 2 years ago
Cédric Mocquillon 24272d07bf Share generateHash used in ba2dx10file and ba2gnrlfile 2 years ago
Cédric Mocquillon 974799c011 Handle DX10 case of ba2 format 2 years ago
Cédric Mocquillon c1fbe90953 Handle GNRL case of ba2 format 2 years ago
Petr Mikheev 71ba7b88e2 Move asyncpackage from apps/openmw/mwlua to components/lua 2 years ago
psi29a 944931c9bf Merge branch 'load_esm4_lights' into 'master'
Adds ESM4 light into ESM4 Cells

See merge request OpenMW/openmw!2692
2 years ago
florent.teppe 486d15b19e moved light common to its own file
moved esm4light to it's own file
2 years ago
psi29a 15b3af92df Merge branch 'macos_lua_fix' into 'master'
make sure lua works with macos packages

See merge request OpenMW/openmw!2687
2 years ago
psi29a 4f001d8736 Merge branch 'qt6' into 'master'
Add an initial Qt6 support

See merge request OpenMW/openmw!2684
2 years ago
Andrei Kortunov 7e2aedf637 Add an initial Qt6 support 2 years ago
Bret Curtis a708fb4a5c make sure lua works with macos packages 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 aee7716c3a Merge branch 'launcher_typed_settings' into 'master'
Typed launcher settings

See merge request OpenMW/openmw!2650
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 bbbef96087 Switch to loadInternalLib 2 years ago
uramer fc1430af95 Move implementation of UI Content to Lua 2 years ago
elsid d541436b15
Support parent, type and value fields in esmtool for ESM4 2 years ago
florent.teppe 23614ae2ae Renamed esm3esm4bridge => esmbridge 2 years ago
elsid cf75363290
Typed launcher settings
QMultiMap is not clear about what settings exist and it's not efficient way to
access them after they are loaded.
2 years ago
elsid 0961720835
Join path components using path::operator/ instead of string::operator+ 2 years ago
florent.teppe c896a2ca48 Crashfix on launch 2 years ago
florent.teppe 562e129bd0 encapsulations of esm3 cell and esm4 cells. 2 years ago
Andrei Kortunov 8da93d4b12 Setup utf8qtextstream in the way consistent with other Qt components 2 years ago
Andrei Kortunov bfcbc2350d Handle UTF-8 in Qt streams in the Qt6-compatible way 2 years ago
florent.teppe e9190bedc8 Reverts useless CmakeList formatting 2 years ago
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
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
fteppe 62d8fe3fc2 changed a few hardcoded refIds used in mutliple places to be defined only once in a variable 2 years ago
fteppe 125b21de20 Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID

Slowly going through all the changes to make, still hundreds of errors

a lot of functions/structures use std::string or stringview to designate an ID. So it takes time

Continues slowly replacing ids. There are technically more and more compilation errors

I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type

Continue moving forward, changes to the stores

slowly moving along

Starting to see the fruit of those changes.

still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.

More replacements. Things are starting to get easier

I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.

Still moving forward, and for the first time error count is going down!

Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably

Cells are back to using string for the name, haven't fixed everything yet. Many other changes

Under the bar of 400 compilation errors.

more good progress <100 compile errors!

More progress

Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string

some more progress on other fronts

Mostly game settings clean

one error opened a lot of other errors. Down to 18, but more will prbably appear

only link errors left??

Fixed link errors

OpenMW compiles, and launches, with some issues, but still!
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