Commit Graph

29788 Commits (3b2d9161c4189bb3dac9ad07f5a396269f4caadd)
 

Author SHA1 Message Date
florent.teppe 3b2d9161c4 Applied review advice
better deals with templated functions meant for esm3 used by esm4s.
simplified loading of esm4 and dealing with unhandled record types.
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 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
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 ba2ececa93 Merge branch 'resolution' into 'master'
Improve window mode change

Closes #7087

See merge request OpenMW/openmw!2530
2 years ago
psi29a 56b493877b Merge branch 'fonts' into 'master'
Improve Mystic cards font

See merge request OpenMW/openmw!2516
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
psi29a bad573a710 Merge branch 'refactor_refid_strong_type' into 'master'
Every instance where a string or string_view is used to designate a RefId, we use a specialized type

See merge request OpenMW/openmw!2438
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 afed7e60ef Upgraded Filesave version for RefIDs
Fix logic issue
2 years ago
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
2 years ago
florent.teppe 1ef1de974d script blacklist => RefId
Applies changes from review

Fixed clang format

Clang format + review.
2 years ago
florent.teppe 2c30575b3b CellName is now a RefId, makes more sense that way. 2 years ago
florent.teppe 6ff90b34a8 Fixed an issue with RefId in CellRefs where Ids wouldn't be loaded
Fixed multiple issues from the review.
2 years ago
florent.teppe 42e45723b7 Fixes issue in MW script compilation that would silently produce the wrong bytecode
Fixes issue when fetching MyGui values that were stored as RefId but fetched as String

Removed some uncessary copies, fixed issues with lowercase and uneeded changes
2 years ago
florent.teppe 0f3499f504 Renamed string => Id, makes more sense considering the new underlying type
Fixes unnecessary copies, and issues with case sensitive comparisons.

fixed modification that wasn't necessary

Fixed type mismatch, and unecessary copy
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 e7deffb376 Adds comment that explains what RefIds are 2 years ago
florent.teppe a7d0a8d9d1 Replaced some RefId* => RefId&
Rebase fix commit
2 years ago
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
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 09d461a8cd fixed Topic selected event
Fix rebase
2 years ago
fteppe c283ea0ae8 string_view& => string_view
fixed ref to temp variable
2 years ago
fteppe 7da38113be Changed more hardcoded RefId to be static to avoid multiple runtime creations
adresses multiple review comments
2 years ago
fteppe b57dd6d083 Fixed search random, it is a prefix so not a refId
Fixed situation where we return a const reference to a static variable that may change if the same function is called multiple times
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 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
fteppe 2f2e401559 is Hidden marker now takes a const RefId& instead of a string_view 2 years ago
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
2 years ago
fteppe c8bb733360 removed clear() function, the only way to change the Id from the outside is from the assignment operator
replaced ciEqual with == operator
2 years ago
fteppe ee941f9b09 RefId's mId can't be get as mutable from the outside
also removed useless operator= defintion
2 years ago
fteppe d6d2a37d03 some clean and better comments 2 years ago
fteppe 69d70d64f6 Fixed GUI that used RefId when it should have used strings 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
Evil Eye b19ad079c2 Ignore special characters preceding script commands 2 years ago
psi29a 8b0eba8906 Merge branch 'blockofcoal' into 'master'
Play blocked hit sound on the victim, not the attacker

See merge request OpenMW/openmw!2551
2 years ago
Andrei Kortunov 9e77654ab4 Add a hint about disabled resolution list in the Windowed Fullscreen mode 2 years ago
Andrei Kortunov 08f7554e38 Improve window mode change (feature #7087) 2 years ago
Alexei Kotov cdd6a8c007 Merge branch 'models_for_the_model_god' into 'master'
Implement TestModels/T3D

Closes #7058

See merge request OpenMW/openmw!2506
2 years ago
Alexei Kotov 83d563e2ff Merge branch 'classless' into 'master'
Don't call getClass on an empty Ptr

See merge request OpenMW/openmw!2552
2 years ago
Alexei Kotov f11d4b76d1 Merge branch 'stay_mad' into 'master'
Update a reference's base record pointer on resurrection

Closes #7084

See merge request OpenMW/openmw!2527
2 years ago
Alexei Kotov a943273397 Merge branch 'ptmikheev-master-patch-35294' into 'master'
Update install_luadocumentor_in_docker.sh (was broken by...

See merge request OpenMW/openmw!2547
2 years ago
Evil Eye 1cf0befd07 Don't call getClass on an empty Ptr 2 years ago
Alexei Kotov 00b142eed7 Merge branch 'bug-fix-7116' into 'master'
Fix #7116

Closes #7116

See merge request OpenMW/openmw!2550
2 years ago
Alexei Kotov 74225991ca Play blocked hit sound on the victim, not the attacker 2 years ago
Cédric Mocquillon 76d77bf3c3 Connect zoom in/out only when the option is allowed 2 years ago
psi29a 7a0635aeee Merge branch 'fix_tests' into 'master'
Fix detournavigator tests

See merge request OpenMW/openmw!2548
2 years ago