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

6432 commits

Author SHA1 Message Date
florent.teppe
e7deffb376 Adds comment that explains what RefIds are 2022-12-27 19:15:57 +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
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
2022-12-27 19:15:56 +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
62d8fe3fc2 changed a few hardcoded refIds used in mutliple places to be defined only once in a variable 2022-12-27 19:15:55 +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
2f2e401559 is Hidden marker now takes a const RefId& instead of a string_view 2022-12-27 19:15:55 +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
ee941f9b09 RefId's mId can't be get as mutable from the outside
also removed useless operator= defintion
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
Alexei Kotov
cdd6a8c007 Merge branch 'models_for_the_model_god' into 'master'
Implement TestModels/T3D

Closes #7058

See merge request OpenMW/openmw!2506
2022-12-27 00:41:39 +00:00
psi29a
14afde4689 Merge branch 'recast_context' into 'master'
Check input and report errors via RecastContext (#7093)

Closes #7093

See merge request OpenMW/openmw!2544
2022-12-20 09:31:31 +00:00
psi29a
df92d76536 Merge branch 'drippy' into 'master'
Ignore non-3D agents in the navigator

Closes #7093

See merge request OpenMW/openmw!2537
2022-12-19 21:51:38 +00:00
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.
2022-12-19 19:46:45 +01:00
Cédric Mocquillon
7e77e69a3c Use a wider type when converting to a signed type 2022-12-18 21:31:51 +01:00
Evil Eye
d40c09c18c Ignore non-3D agents in the navigator 2022-12-09 16:43:15 +01:00
AnyOldName3
66b8d4fb29 Add a setting to control coverage adjustment
With it on, which was always the case before this setting was added,
vanilla content and poorly-made mods will look acceptable, but well-made
mods will have alpha-tested meshes appear to grow and potentially gain a
weird outline as they get further away.

With it off, which replicates the 0.46 behaviour, well-made mods will
look really good, but vanilla content and poorly-made mods will have
alpha-tested meshes shrink as they get further away.

It's been bugging me that this was forced on since 0.47 released, and
I'd hoped to figure out a solution for automatic detection at some point
before 0.48 branched off, but I didn't, so now this is what we're
getting to have Tamriel Rebuilt look right.
2022-12-09 00:22:08 +00:00
psi29a
1d55be8214 Merge branch 'lua_profiler' into 'master'
Lua profiler

See merge request OpenMW/openmw!2523
2022-12-07 10:53:47 +00:00
Petr Mikheev
55db95d4cf Update Lua profiler; add ability to run OpenMW with old LuaJit that doesn't allow custom allocator (Lua profiler will be disabled in this case) 2022-12-03 16:58:03 +01:00
Andrei Kortunov
b0d687964e Make sure that local path has a trailing slash on Linux and Windows 2022-12-03 11:27:42 +04:00
Petr Mikheev
6fa65e4729 Track memory and CPU usage per script in LuaUtil::LuaState 2022-11-30 00:06:14 +01:00
Evil Eye
bbbcc5e4b7 Add an early out to dialogue loading to match Morrowind.exe behaviour 2022-11-27 22:23:35 +01:00
AnyOldName3
66e5415895 Log screenshot capture 2022-11-22 19:26:28 +00:00
elsid
89884fae0b
Add link dependencies to libosgSim and collada-dom 2022-11-14 12:04:58 +01:00
Evil Eye
b94818b24a Tweak message and temporarily set model ttl to 0 2022-11-10 17:24:58 +01:00
Evil Eye
0ae5755abb Implement TestModels/T3D 2022-11-08 22:36:15 +01:00
elsid
baa39c06bb
Move fourCC to a separate file 2022-11-06 15:35:16 +01:00
glassmancody.info
87c0a6e6dc fix line numbers being off by one for each jump block 2022-10-24 08:40:33 -07:00
uramer
a2fa1fe0a5 Execute async callbacks on the main Lua stack 2022-10-18 22:12:11 +02:00
AnyOldName3
15c51dcbbc Restore false-positive unused includes
They're needed on MacOS as SDL_opengl_gletx.h doesn't define them there.

They don't actually work on MacOS, so long-term, the code that uses
these defines should be changed to use #ifdef to check they're available
before using them.
2022-10-13 00:49:24 +01:00
AnyOldName3
77de37b1ed Revert "Merge branch 'fix_macos_build' into 'master'"
As well as fixing the MacOS build, it meddled with a bunch of files that
already did the right thing.

This reverts commit 8162541a14, reversing
changes made to e16c451d08.
2022-10-12 22:48:34 +01:00
psi29a
8162541a14 Merge branch 'fix_macos_build' into 'master'
Use separate header to define missing GL constants

See merge request OpenMW/openmw!2464
2022-10-10 07:49:01 +00:00
psi29a
e16c451d08 Merge branch 'l10n' into 'master'
Separate l10n manager from lua

See merge request OpenMW/openmw!2451
2022-10-10 07:34:18 +00:00
psi29a
c164437d91 Merge branch 'classism' into 'master'
Use class service flags for autocalc NPCs

Closes #7044

See merge request OpenMW/openmw!2461
2022-10-10 07:32:46 +00:00
elsid
c324482338
Use separate header to define missing GL constants 2022-10-09 23:35:55 +02:00
elsid
843753da14
Remove unused includes 2022-10-09 16:44:18 +02:00
jvoisin
3cbf1dc042 First pass with include-what-you-use 2022-10-09 10:39:43 +00:00
Evil Eye
60c26832d2 Use class service flags for autocalc NPCs 2022-10-08 17:00:33 +02:00
Petr Mikheev
3697c9266b Separate l10n manager from lua 2022-10-07 17:19:04 +02:00
elsid
bb8b5e2108
Add META_Node to clang-format StatementMacros 2022-10-06 21:11:52 +02:00
psi29a
66e14fa3bd Merge branch 'fix_extra_semi_warning' into 'master'
Fix and prevent -Wextra-semi warning

See merge request OpenMW/openmw!2455
2022-10-06 11:10:06 +00:00
elsid
063fff7fa4
Fix and prevent -Wextra-semi warning 2022-10-06 00:26:43 +02:00
elsid
6b8ed4c64f
Use sorted vector for ViewData::contains implementation 2022-10-05 01:10:02 +02:00
elsid
624d8bc931
Support unsigned settings values 2022-10-04 01:34:53 +02:00
elsid
2388b21f63
Use std::from_chars to parse settings integral numbers and handle errors 2022-10-04 01:34:50 +02:00
psi29a
6e71804048 Merge branch 'keying_in' into 'master'
Add key flag on load

Closes #7034

See merge request OpenMW/openmw!2444
2022-09-30 13:16:14 +00:00