1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-30 12:32:36 +00:00

501 Commits

Author SHA1 Message Date
Evil Eye
fb4edda45d Validate INFO filters when loading the record 2024-04-11 16:55:00 +02:00
AnyOldName3
7c85755950 Warning that doesn't fire with MSVC 2022
Hopefully this fixes it.
I've only tried MSVC 2022 locally, so can't verify this fix.
2024-03-23 02:34:57 +00:00
AnyOldName3
1aff88e6a3 Even more warning fixes 2024-03-23 00:33:50 +00:00
elsid
ec9c829021
Use normalized path for correctSoundPath 2024-02-24 12:42:36 +01:00
psi29a
a060a7297c Merge branch 'dehardcode-skillprogression' into 'master'
Lua: Dehardcode skill and level progression

See merge request OpenMW/openmw!3779
2024-02-12 14:10:51 +00:00
Andrei Kortunov
292879d0fb Address Coverity Scan complaints left 2024-02-04 08:56:25 +04:00
Mads Buvik Sandvei
011d9d6493 Dehardcode skill and level progression 2024-01-30 21:25:36 +01:00
Evil Eye
194bcb0187 Drop support for save game format 0 (pre 0.37) 2023-12-01 16:37:29 +01:00
psi29a
5b3e2fbf1c Merge branch 'clickbait' into 'master'
Assign StringRefIds to attributes

See merge request OpenMW/openmw!3256
2023-08-21 18:59:44 +00:00
Petr Mikheev
36d22cff1c Improve GUI mode validation 2023-08-20 17:49:56 +02:00
Evil Eye
e660a9ca16 Assign StringRefIds to attributes 2023-08-20 10:28:46 +02:00
Andrei Kortunov
7ce9fc25c5 Implement Lua bindings for sound system 2023-08-15 10:28:29 +04:00
Andrei Kortunov
dee9ebd05e Fix operations order 2023-07-31 20:15:30 +04:00
Andrei Kortunov
d8ec78d732 Fix some Coverity warnings 2023-07-28 20:58:18 +04:00
elsid
d113f0fc44
Use settings values for GUI settings 2023-07-16 20:46:54 +02:00
psi29a
429e911da1 Merge branch 'lua_journal' into 'master'
Add Lua bindings for journal (second iteration of !3133)

See merge request OpenMW/openmw!3189
2023-07-11 07:37:13 +00:00
Petr Mikheev
a09fb8d8f8 Rework Lua bindings for journal 2023-07-08 14:32:58 +02:00
Tobias Tribble
c792582376 Add Lua bindings for journal 2023-07-08 13:37:39 +02:00
elsid
f6fce5ee15
Cleanup includes 2023-07-08 11:28:56 +02:00
elsid
6e8dcc16c6
Use settings values for Game settings 2023-07-01 00:59:35 +02:00
psi29a
dd0d66513d Merge branch 'clickbait' into 'master'
Mostly dehardcode attributes

See merge request OpenMW/openmw!3164
2023-06-25 20:11:19 +00:00
Evil Eye
c5344b7069 Return the actual topic the info came from 2023-06-24 11:40:25 +02:00
Evil Eye
abcebd49d2 Allow for more than 8 attributes 2023-06-19 20:41:54 +02:00
Evil Eye
47c1569961 Use RefId key for NPC skills 2023-06-08 18:35:48 +02:00
Evil Eye
dd83da5eba Use std::array in FADTstruct 2023-06-03 13:11:49 +02:00
Mads Buvik Sandvei
410e8b100a Elsid comments 2023-05-23 19:30:29 +02:00
Evil Eye
11f875d9c4 Detect service refusal in constant time 2023-05-22 22:24:04 +02:00
Evil Eye
5491512905 Use string_view in more places and reduce the number of empty string literals 2023-05-21 16:39:32 +02:00
Evil Eye
3cf0977c0b Remove dialogue related instances of getRefIdString 2023-05-04 19:46:49 +02:00
Petr Mikheev
f1beaa7b8c Put ESMStore to Environment 2023-04-20 21:45:49 +02:00
elsid
452d1e7e49
Store original string id for Dialogue records 2023-03-26 19:07:32 +02: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
Shi Han
a90e3b8c3b Move from std::atoi to std::from_char 2023-03-18 09:30:48 +00:00
elsid
b5ec584be2
Replace ESM::RefId::sEmpty by default constructed RefId where possible
Static const is only required to provide a reference or a pointer when it is not
possible with default constructed temporary.
2023-02-18 01:07:15 +01:00
elsid
996153f78d
Convert RefId to class 2023-02-15 23:20:44 +01:00
elsid
f09789002a
Define hardcoded global variable names as constants 2023-02-07 00:47:34 +01:00
Petr Mikheev
5983f22290 Remember actor in the actor's InventoryStore instead passing the actor in every call 2023-01-21 23:43:00 +01:00
Petr Mikheev
e9420b2b68 Remove implicit conversion MWWorld::Ptr -> bool 2023-01-18 02:40:56 +01:00
elsid
b88f0d2dbd
Replace mwscript program serialization into a vector with simple struct
Mostly to avoid string literal lookup by index with iteration over all preciding
literals and calling strlen. This is very inefficient. In genral this makes code
much more straightforward but also makes it portable since now int and float of
different sizes are properly supported.
2023-01-14 00:07:37 +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
1ef1de974d script blacklist => RefId
Applies changes from review

Fixed clang format

Clang format + review.
2022-12-27 19:16:21 +01:00
florent.teppe
2c30575b3b CellName is now a RefId, makes more sense that way. 2022-12-27 19:16:21 +01:00
florent.teppe
a7d0a8d9d1 Replaced some RefId* => RefId&
Rebase fix commit
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
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
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
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
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
Evil Eye
f61083d02c Replace switch statements 2022-11-04 12:20:37 +01:00
Evil Eye
29a46b0fc0 Reimplement --script-all-dialogue to be more useful to modders 2022-11-03 20:54:44 +01:00