1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00

135 Commits

Author SHA1 Message Date
Alexei Kotov
65aa222efa Move full help text after everything else (#7623) 2024-02-24 23:05:27 +03:00
Evil Eye
4ef68a8938 Split Class::getModel into Class::getCorrectedModel and Class::getModel so preloading can use string_view 2024-01-27 16:26:31 +01:00
Andrei Kortunov
fb16871c80 Avoid redundant string copies 2024-01-02 18:30:35 +04:00
Evil Eye
81b8328bdd Include UString 2023-11-23 19:52:18 +01:00
Evil Eye
da9b0c5119 Use MyGUI::UString's new string_view support 2023-11-22 22:02:06 +01:00
elsid
0601d7213e
Remove ESM::RefId::sEmpty
This variable is only required to return empty RefId as const reference. There
is no point in doing so for a type cheap to copy.
2023-04-26 21:15:16 +02:00
Petr Mikheev
f1beaa7b8c Put ESMStore to Environment 2023-04-20 21:45:49 +02:00
Petr Mikheev
227a993b94 Remove createRecord functions from World because the only forward the argument to ESMStore that can be used directly. 2023-04-20 21:45:49 +02: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
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
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
clang-format-bot
ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03: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
1d21330fcc Return string_view from getGameSettingString 2022-08-24 22:16:03 +02:00
Evil Eye
150d1840d6 Use more string_view and const string& 2022-08-22 16:55:53 +02:00
elsid
a66c095ec3
Cleanup openmw class and mechanics includes 2022-08-19 15:46:39 +02:00
Evil Eye
4ff12d8945 Make Class::getName return string_view 2022-08-16 21:15:03 +02:00
Evil Eye
eaa108d25d Return string_view from SoundId methods 2022-08-14 14:39:58 +02:00
Evil Eye
685906afdf Make getScript return string_view 2022-08-11 22:51:55 +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
jvoisin
0cc304e659 Clean up MyGUI includes
This should improve incremental compilation.
2022-06-04 15:26:36 +02:00
Evil Eye
3c83117e99 Replace new with make_unique in openmw 2022-05-29 13:24:48 +02:00
Evil Eye
a64979e25d Replace empty std::string assignments 2022-05-04 22:33:39 +02:00
elsid
ec3674b40a
Use unique_ptr instead of shared_ptr
for MWWorld::Action, ProjectileManager and ESSImport::Converter.

shared_ptr has additional cost of reference counter and requires additional
allocation when constructed as shared_ptr<T>(new T).
2022-04-08 16:12:36 +02:00
elsid
dc20e799e1
Use static object to register classes 2022-04-06 16:49:25 +02:00
ζeh Matt
08fae7be6e
Pass the prng from world where appropriate 2022-03-21 17:49:42 +02: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
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
fredzio
c795e0bce6 Some actors are supposed to spawn on an object that belongs to an adjacent cell.
Since actors can be active in 3x3 grid around the player, we need to
first load all objects in a 5x5 grid around the player.

Split load and unloading in 2 phases. Add an mInactiveCells set into the
scene, which contains all cells inside the aforementioned 5x5 grid.
These cells contains only heightfields and non-animated physics objects.

Animated objects are tied to the scene graph, which doesn't exists yet
in these cells, so we skip them.
2021-06-28 09:36:04 +02:00
Andrei Kortunov
7b727e4d70 Revert "Remove physics dependency on basenode"
This reverts commit 165c7314928dc281a364fa1a0143c45fd6d2adfd.
2021-01-29 16:51:13 +04:00
fredzio
165c731492 Remove physics dependency on basenode
Necessary to be able to load physics objects from inactive cells.
2021-01-24 14:10:27 +01:00
Capostrophic
718dbd3f9a Use object ID as the substitution for their name (bug #5158) 2019-09-11 00:06:50 +03:00
Capostrophic
6b74630f6e Preparation work
Phase out canBeActivated() to unify activation checks
Use getName() for the name caption in tooltips
Always use tooltips for non-activator objects
Invert hasTooltip default value
2019-09-10 23:38:16 +03:00
capostrophic
e5331aab28 Escape number signs in object names for tooltips 2019-08-17 21:53:52 +03:00
Andrei Kortunov
c77c50e92b Make Equip console command to bypass most of restrictions (bug #4460) 2018-07-11 00:06:21 +04:00
Bret Curtis
d785344fad purge all instances of <boost/shared_ptr.hpp>, clean up unused headers 2017-06-09 19:08:53 +02:00
Allofich
502a26a7ff Use getWeightString() to avoid casting to int 2016-08-14 19:38:53 +09:00
Allofich
caf025f93d Don't show 0 weight tooltips except for potions 2016-08-14 19:27:59 +09:00
scrawl
32d5dece58 Add count argument to getToolTipInfo 2015-12-19 16:29:07 +01:00
scrawl
b0894ea20d Accept a ConstPtr in hasToolTip 2015-12-19 16:15:45 +01:00
scrawl
04f7a8f8eb Remove redundant getId function 2015-12-18 16:58:38 +01:00
scrawl
c43f80633a Accept a ConstPtr in getEnchantmentPoints 2015-12-18 16:48:19 +01:00
scrawl
648ee6e7fb Accept a ConstPtr in applyEnchantment 2015-12-18 16:43:11 +01:00
scrawl
da7ebfde99 Accept a ConstPtr in copyToCell 2015-12-18 16:27:18 +01:00
scrawl
d77f785cbc Accept a ConstPtr in get*SoundId 2015-12-18 16:09:54 +01:00
scrawl
e0bb284804 Accept a ConstPtr in getWeight 2015-12-18 16:00:50 +01:00
scrawl
0047a2d330 Accept a ConstPtr in canSell 2015-12-18 15:58:45 +01:00
scrawl
2bc851c7d3 Accept a ConstPtr in getEnchantment 2015-12-18 15:56:45 +01:00