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

19 commits

Author SHA1 Message Date
elsid
b7fdca0fe6
Use serialized ESM::RefId for Lua records 2023-03-25 18:19:46 +01:00
elsid
cd4027ffd6
Do not use ESM::RefId::getRefIdString for spell id 2023-03-24 01:57:35 +01:00
elsid
04d7781424
Support not only StringRefId for checking first person body part 2023-03-19 17:49:41 +01:00
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.
2023-03-19 17:20:43 +01:00
elsid
cd6a5b5a0e
Support asymmetric comparison between ESM::RefId and std::string_view 2023-03-03 15:44:18 +01:00
elsid
dfcea389be
Add helper functions for string comparison to RefId 2023-03-03 00:39:55 +01:00
elsid
2fcb94064d
Support RefId comparison with std::string_view 2023-02-28 23:04:48 +01: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
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
elsid
755067f0f3
Remove redundant ESM::RefId member functions 2022-12-30 00:32:47 +01:00
florent.teppe
dc21df97c8 Fixed issue with getSummonedCreature( that returned a reference to a non const static value
Fix compile, and apply review comment

Fixed greater vs more typo.

getCellname is back to a string view.

Because in most cases was used as a strong not a refId.
and there was a fundamental issue with region names used as a cellname
2022-12-27 19:16:22 +01:00
florent.teppe
d49f60d2d6 To change fewer things with the master implementation, the Id isn't changed to lower case on creation
lower case utility functions used in comparison functions
2022-12-27 19:15:57 +01:00
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
2022-12-27 19:15:57 +01:00
fteppe
c283ea0ae8 string_view& => string_view
fixed ref to temp variable
2022-12-27 19:15:56 +01:00
fteppe
7da38113be Changed more hardcoded RefId to be static to avoid multiple runtime creations
adresses multiple review comments
2022-12-27 19:15:56 +01:00
fteppe
0d68735e23 moved all code in CPP in ESM namespace since it was already necessary for << operator
in the equality operator, no longer need ciequal since the id is already always lowercase
2022-12-27 19:15:55 +01:00
fteppe
c8bb733360 removed clear() function, the only way to change the Id from the outside is from the assignment operator
replaced ciEqual with == operator
2022-12-27 19:15:55 +01:00
fteppe
d6d2a37d03 some clean and better comments 2022-12-27 19:15:54 +01:00
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!
2022-12-27 19:15:54 +01:00