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

52 Commits

Author SHA1 Message Date
florent.teppe
2c30575b3b CellName is now a RefId, makes more sense that way. 2022-12-27 19:16:21 +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
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
Alexei Kotov
1d31c5eb6f Remove the correct bound item when the effect expires 2022-11-10 01:18:46 +03:00
elsid
843753da14
Remove unused includes 2022-10-09 16:44:18 +02:00
clang-format-bot
ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
Evil Eye
7cc55022a1 Implement sun damage based on the research on the wiki 2022-09-19 19:05:22 +02:00
elsid
410a2881fe
Add comma to the last array element to prevent putting multiple elements on a single line 2022-09-14 00:36:02 +02:00
florent.teppe
0a5c863f27 fewer header includes 2022-09-08 21:08:59 +02:00
psi29a
1859c6eded Merge branch 'pcvisionbonus' into 'master'
Implement PCVisionBonus functions

Closes #6983

See merge request OpenMW/openmw!2371
2022-09-07 20:27:22 +00:00
psi29a
fcd9b78cac Merge branch 'REFACTOR_STORE' into 'master'
Refactoring the ESM store to better support many new ESM4 types

See merge request OpenMW/openmw!2161
2022-09-07 20:22:29 +00:00
florent.teppe
0dd529ab1d With the records include removed from store.hpp, need to include the relevant files accross the codebase.Lots of touched files, but very little done 2022-09-06 13:26:13 +02:00
Evil Eye
489c7a10b6 Implement PCVisionBonus functions 2022-09-05 20:21:19 +02:00
Evil Eye
9484d8ce51 Make the Sound magic effect make noise 2022-09-05 18:04:31 +02:00
florent.teppe
1ced0c912e partially revert "Store: moved all the template specialization to its own heaper file, included where it's needed"
This reverts commit 80a25bcd3021f7ebfaf2f864e34532009b9b8aeb.
It didn't really make sense to do all those changes in the same MR

partially Revert "Store refactoring: more forgotten storeSpecialization.hpp"

This reverts commit 9943a5bc96b9025f06cbaac5bb7f1bf51ebc746f.

removed remaining references to storeSpecialization  CMakeLists.txt,  and landmanager.cpp
2022-09-05 17:35:06 +02:00
florent.teppe
3a62ef3a99 Store added storespecialization to cmakelist, and removed the captial first letter 2022-09-05 17:34:40 +02:00
florent.teppe
0d85e7db7d Store: moved all the template specialization to its own heaper file, included where it's needed
in the esm store a function is defined in the cpp file to not rely on the knowledge of store.hpp in the header file
2022-09-05 17:34:22 +02:00
psi29a
a247bba981 Merge branch 'damage_over_time' into 'master'
Keep showing NPC health while dealing damage

Closes #6427

See merge request OpenMW/openmw!2362
2022-09-03 21:01:11 +00:00
unknown
d5b42bc843 Reflect non-harmful effects as well 2022-09-03 20:02:58 +02:00
unknown
f68e7ce0b5 Keep showing NPC health while dealing damage 2022-09-03 19:49:59 +02:00
Evil Eye
7729ef2e5b Only reflect spells that have a caster 2022-08-28 17:42:55 +02:00
Evil Eye
19bd2f3c3d Use more string_view and const string& 2022-08-27 13:07:59 +02:00
Evil Eye
42e59878c5 Use string_view in more animation code 2022-08-23 18:25:25 +02:00
Kindi
da4a72ab19 Sun Damage for QuasiExt 2022-08-19 14:51:52 +00:00
ζeh Matt
841fd9618f
Rename DrawState_ to DrawState and use enum class 2022-07-17 20:50:26 +03:00
elsid
49f8445f87
Move AiSetting out of MWMechanics::CreatureStats
To replace creaturestats.hpp include in mwworld/class.hpp with forward
declaration reducing total size of preprocessed code.
2022-07-16 16:43:33 +02:00
elsid
ce263af393
Use existing functions and objects to call correctMeshPath etc
Remove WindowManager wrappers.

It's not safe to use WindowManager in all places and it's not required.
Environment stores resource system providing VFS required to call these
functions. In the case of ObjectPaging it's available from the member variable.
Also ObjectPaging::createChunk may access WindowManager when it's already
destructed when exiting the game because it's destructed before CellPreloader
finishes all background jobs. Engine::mResourceSystem is destructed after all
other systems so it's safe to use it.
2022-06-29 00:58:49 +02:00
uramer
fd7965d77f Use correctMeshPath instead of string constants 2022-06-12 11:30:29 +02:00
ζeh Matt
08fae7be6e
Pass the prng from world where appropriate 2022-03-21 17:49:42 +02:00
Petr Mikheev
d8127fdad2 Merge branch 'refactor/aisequence-2' into 'master'
#6091: Optimize isInCombat

See merge request OpenMW/openmw!1636
2022-02-12 23:50:42 +00:00
Matt
367bdcf0cc #6091: Optimize isInCombat 2022-02-12 23:50:41 +00:00
Evil Eye
dc495a685a Remove a member variable that doesn't get saved and remove fortify maximum health code 2022-02-10 20:32:59 +01:00
Evil Eye
79dc600dae Uncap attribute and skill damage for drain and absorb effects 2022-01-29 16:29:50 +01:00
Bret Curtis
d1fb854521 move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4
esm typo

esm typo
2022-01-23 17:04:48 +01:00
psi29a
e16245278e Merge branch 'lit_ur' into 'master'
Fix Dagoth Ur's Fire Shield not being visible

See merge request OpenMW/openmw!1514
2022-01-04 10:22:45 +00:00
Evil Eye
97ab7cf457 Fix demoralize and rally being swapped 2022-01-03 19:17:56 +01:00
Evil Eye
dc946d0a47 Fix Dagoth Ur's Fire Shield not being visible 2021-12-27 22:30:25 +01:00
Evil Eye
9257c27fe1 Move target checking code so it applies to all sources 2021-12-10 18:51:37 +01:00
Evil Eye
4b67fe5351 Actually remove effects before proclaiming they've been removed 2021-12-08 17:18:08 +01:00
Evil Eye
dca0fa0a41 Remove teleportation effects after they've been applied 2021-12-01 21:39:53 +00:00
Alexei Dobrohotov
7a0c13fcf8 Make better use of std::clamp 2021-11-06 08:47:32 +03:00
Evil Eye
4ec927829f Give each reflect and spell absorption effect a chance to apply 2021-10-26 16:50:40 +02:00
Evil Eye
289e1544d2 Don't wait a frame to recalculate magicka 2021-10-25 16:54:50 +02:00
unknown
add6eb9c95 Fix particles and magnitudes for (damage) over time effects 2021-10-16 21:40:41 +02:00
Bo Svensson
ef906cbfa8
improves MWClass mapping (#3166)
Currently, we use a peculiar mapping of ESM classes by their std::type_info::name. This mapping is an undefined behaviour because std::type_info::name is strictly implementation defined. It could return a non-unique value on some platforms. With this PR we use the unsigned int sRecordId of the ESM class as a more efficient lookup type that does not build on undefined behaviour. We can expect marginally faster save-game loading with these changes as well.
2021-10-11 13:46:21 +02:00
psi29a
9c47fdcf7e Merge branch 'flip_sign' into 'master'
Fix regression #6328

Closes #6328

See merge request OpenMW/openmw!1267
2021-10-08 06:47:57 +00:00
Evil Eye
7540265432 Fix regression #6328 2021-10-06 17:14:00 +02:00
Evil Eye
d680aa26e9 Disallow switch fallthrough 2021-10-03 21:58:10 +02:00
Evil Eye
4abcb0d7b9 Remove applied magnitude instead of min magnitude 2021-09-29 19:25:12 +02:00