elsid
e6cf516e12
Support index RefId as pair of record type and std::uint32_t
2023-03-19 17:20:48 +01:00
elsid
86293af084
Support generated RefId as std::uint64_t
2023-03-19 17:20:48 +01:00
elsid
0992624c8b
Support reading and writing typed ESM::RefId to ESM
2023-03-19 17:20:48 +01: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
elsid
83d212fe0f
Use SFINAE to avoid conflicts between visit functions
2023-03-17 23:37:11 +01:00
elsid
cd6a5b5a0e
Support asymmetric comparison between ESM::RefId and std::string_view
2023-03-03 15:44:18 +01:00
elsid
dfcea389be
Add helper functions for string comparison to RefId
2023-03-03 00:39:55 +01:00
elsid
6518688120
Reorder RefId members
2023-03-02 23:29:40 +01:00
elsid
2fcb94064d
Support RefId comparison with std::string_view
2023-02-28 23:04:48 +01:00
elsid
996153f78d
Convert RefId to class
2023-02-15 23:20:44 +01:00
elsid
6d261d38dd
Add functions to read and write ESM::RefId and use them
...
To be later changed with another implementation.
2023-02-13 22:07:58 +01:00
elsid
80e6d6cbe3
Support variable size strings in ESM3
2023-02-13 10:18:32 +01:00
elsid
2e64155c0f
Use signed type for left record and files size in ESM3 reader context
...
Otherwise reading some of the records like ESM::CellRef without a subrecord
after could lead to underflow of ESM_Context::leftRec which makes
ESM::ESMReader::hasMoreSubs to return true and load hangs for a while trying to
read the same subrecord many times.
Fix ESM::Variant tests since it's now required to have a record for any ESM
data. Add 16 (size of record header) to all expected data sizes.
2023-02-11 16:09:14 +01:00
florent.teppe
084207af64
Avoids a lot a special cases for ESM3 vs ESM4 cells.
2023-02-04 23:25:06 +01:00
florent.teppe
1caed2de2a
Applies some review comments.
...
Proper visit for ESM::CellVariant
Fixed MWWorldCell constructor
2023-02-04 17:09:54 +01:00
florent.teppe
ebfee18e35
implements std::visit for CellVariant, fixes struct vs class forward decl
2023-01-29 11:28:39 +01:00
florent.teppe
aa29f86efe
fixed struct vs class.
2023-01-29 10:59:39 +01:00
florent.teppe
216ca71149
Applied review comments
...
getEditorName => getNameId
restored cosntructor in CoordinateConverter
2023-01-28 12:14:00 +01:00
florent.teppe
e6e27413d9
gives MWWorld::CellRef the MWWorld::Cell treatment
...
MWWorld::CellRef now has a variant, and datas that are part of the intersection of both ESM4::Reference and ESM::CellRef are part of MWWorld::CellRef
For ESM4 most data isn't filled in, so it returns default values.
2023-01-27 19:40:45 +01:00
florent.teppe
23614ae2ae
Renamed esm3esm4bridge => esmbridge
2023-01-27 18:40:15 +01:00
florent.teppe
5037dcf9bc
Fixes a crash on launch and some compile issue
...
also uses std::visit in cellstore comparison to avoid missing combinasion
split loadrefs in loadref of ESM4 and ESM3.
2023-01-27 16:41:00 +01:00
florent.teppe
cb8cdd8831
ESM::CellVariant aans MWWorld:Cell now take reference in constructor: signals that nullptr isn't accepted.
...
also applied other review comments.
2023-01-27 14:07:50 +01:00
florent.teppe
531e55e04c
Better handling of the esm3 vs esm4 cell problem
...
Common attribute are in one structure that has two constructors, one for ESM3 vs ESM4 Cell
Mood part of MWWorld::Cell
2023-01-27 13:39:39 +01:00
florent.teppe
3515c8e61a
Static references are created as refcells, nothing displayed yet.
2023-01-26 22:37:32 +01:00
florent.teppe
c896a2ca48
Crashfix on launch
2023-01-26 22:37:32 +01:00
florent.teppe
0018bcf7de
Should make cellvariant safer to use.
...
Hopefully clang tidy agrees.
2023-01-26 22:37:32 +01:00
florent.teppe
562e129bd0
encapsulations of esm3 cell and esm4 cells.
2023-01-26 22:37:31 +01:00
florent.teppe
08b68fcd48
Cannot load a cell yet, but getting more necessary parts in
2023-01-26 22:36:11 +01:00
psi29a
83718878b2
Merge branch 'Load_ESM4' into 'master'
...
Loading ESM4 data and storing them in the ESMStore
See merge request OpenMW/openmw!2557
2023-01-07 22:17:17 +00:00
elsid
2bbed8cc06
Fix gcc warning: array subscript 5 is outside array bounds of ‘const char [5]’
...
In function ‘bool ESM::operator==(const FixedString<capacity>&, const T* const&) [with long unsigned int capacity = 5; T = char; <template-parameter-1-3> = void]’,
inlined from ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = ESM::FixedString<5>; T2 = const char*]’ at /home/elsid/dev/googletest/build/gcc/release/install/include/gtest/gtest.h:1358:11,
inlined from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = ESM::FixedString<5>; T2 = const char*; typename std::enable_if<((! std::is_integral<_Tp>::value) || (! std::is_pointer<_Dp>::value))>::type* <anonymous> = 0]’ at /home/elsid/dev/googletest/build/gcc/release/install/include/gtest/gtest.h:1377:64,
inlined from ‘virtual void {anonymous}::EsmFixedString_equality_operator_for_not_convertible_to_uint32_with_const_char_pointer_Test::TestBody()’ at apps/openmw_test_suite/esm/test_fixed_string.cpp:165:9:
components/esm/esmcommon.hpp:134:19: warning: array subscript 5 is outside array bounds of ‘const char [5]’ [-Warray-bounds]
134 | return rhs[capacity] == '\0';
| ~~~^
apps/openmw_test_suite/esm/test_fixed_string.cpp: In member function ‘virtual void {anonymous}::EsmFixedString_equality_operator_for_not_convertible_to_uint32_with_const_char_pointer_Test::TestBody()’:
apps/openmw_test_suite/esm/test_fixed_string.cpp:164:20: note: at offset 5 into object ‘other’ of size 5
164 | const char other[5] = { 'a', 'b', 'c', 'd', '\0' };
| ^~~~~
2023-01-06 22:09:07 +01:00
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
2023-01-01 19:22:27 +01:00
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
2023-01-01 16:22:57 +01:00
elsid
755067f0f3
Remove redundant ESM::RefId member functions
2022-12-30 00:32:47 +01:00
elsid
fe57aec2a4
Move ESM::RefId comment to make sure IDEs recognize it and show in tooltips
2022-12-30 00:04:02 +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
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
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
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
elsid
baa39c06bb
Move fourCC to a separate file
2022-11-06 15:35:16 +01: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
clang-format-bot
ddb0522bbf
Apply clang-format to code base
2022-09-22 21:35:26 +03:00
elsid
52b7b66e9f
Add comma to the last array element to prevent putting multiple elements on a single line
2022-09-12 21:00:51 +02:00
Project579
e5c417c968
Make sure all paths are passed as std::filesystem::path instead of std::string where possible.
2022-09-11 14:41:15 +02:00
elsid
ac1688f9c1
Remove ESM::Reader base class
...
This class does not serve any useful purpose now. It was added as a first step
in attempt to define common interface for ESM3 and ESM4 readers. But this is not
going to happen.
2022-09-10 15:17:49 +02:00
florent.teppe
445d91d85d
adds missing include
2022-09-06 13:26:13 +02:00
florent.teppe
3cbd0e0762
Fixed naming convention
2022-09-05 17:35:36 +02:00
florent.teppe
9e40550a4a
improved readability of esm3Recname and esm4Recname
2022-09-05 17:35:36 +02:00
florent.teppe
7bd7105345
code cleanup
2022-09-05 17:35:36 +02:00
florent.teppe
252550d86f
Added records for ESM4s the throw std:: logic error ensures at compile time that there is no collision
...
static_assert doesn't work because the function can be called at run time
2022-09-05 17:35:35 +02:00
AnyOldName3
4e8e2e1c60
Eliminate &thing[0] pattern
2022-09-03 16:41:35 +01:00
Andrew Dunn
1d7d3d5765
Get build working on Apple Silicon
...
Will validate issues with Intel OSX later
2022-08-17 02:18:48 +10:00
elsid
da0a1ac9ba
Do compile time checks in compile time instead of tests
2022-08-03 21:47:00 +02:00
elsid
6c8ed4d19c
Move Files::IStreamPtr alias to a separate header
...
To avoid transitive include of Windows.h all over the engine.
2022-07-17 11:35:39 +02:00
elsid
bef15edf0b
Remove redundant ostream, istream, iostream and sstream includes
...
* Replace by std::to_string and operator+ where possible.
* Move the code requiring to include <sstream> from .hpp to .cpp files.
2022-07-05 01:41:28 +02:00
Petr Mikheev
a70d5831c5
Lua scripts configuration in omwaddon
2022-06-05 01:36:39 +02:00
elsid
d2510284ec
Support TES4 in esmtool dump
2022-04-25 17:35:26 +02:00
elsid
13c970b37a
Add const modifier to encoder type
2022-04-25 17:35:25 +02:00
psi29a
f99f818c0c
Merge branch 'esm4_cleanup' into 'master'
...
ESM4 cleanup
See merge request OpenMW/openmw!1792
2022-04-23 15:27:28 +00:00
elsid
761a04ce00
Remove duplicated enum definition
2022-04-23 00:32:52 +02:00
elsid
94c1d0cced
Use unique_ptr to store istream
2022-04-22 18:27:17 +02:00
Evil Eye
61ea678a96
Implement ignored records
2022-04-16 16:28:39 +02:00
elsid
5eb8c4aebe
Avoid redundant conversion to const char* and use make_shared
2022-04-10 22:33:08 +02:00
psi29a
6d55317d57
Merge branch 'refactor/prng-2' into 'master'
...
Save random state and refactor usage of generators
See merge request OpenMW/openmw!1715
2022-03-23 09:50:54 +00:00
ζeh Matt
b502dc12f0
Add prng to World instance and serialize state in Save
2022-03-21 17:49:42 +02:00
Petr Mikheev
d251c4e2a1
[Lua] Change behavior of obj.type
2022-03-15 23:35:36 +01:00
duncanspumpkin
3a117cac22
Switch to a constexpr for FourCC constant
...
Add static asssert on wrong size
2022-03-08 14:48:37 +00:00
Bret Curtis
0f43455dc3
merge in master
2022-02-16 16:57:59 +01:00
elsid
139ae9325a
Fix compile errors by using StatelessUtf8Encoder
2022-02-16 16:41:23 +01:00
elsid
3305b400dc
Use ESM::NAME instead of const char* and std::string as argument type
2022-02-14 23:40:40 +01:00
cc9cii
ba3ae448d4
Initial import of esm4 by cc9cii
2022-01-31 08:58:45 +01:00
jvoisin
4cd6d2dacf
Merge branch 'rework_fixed_string' into 'master'
...
Rework fixed string
See merge request OpenMW/openmw!1596
2022-01-30 18:47:06 +00:00
Petr Mikheev
68ef96410c
Make ESM::Position not packed (should fix #6566 )
2022-01-29 02:32:58 +01:00
elsid
45db56b382
Rework fixed string
...
* Avoid inheritance.
* Define equality operators out of the class definition.
* Replace toString with toStringView where it doesn't make sense to create a string.
2022-01-28 18:39:09 +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
Petr Mikheev
2d1b100239
Change terminology of gameSecond/gameHour to simulationTime/gameTime
2022-01-10 21:03:35 +01:00
psi29a
bafde5c9c4
Merge branch 'cleanup' into 'master'
...
Remove constant conditions
See merge request OpenMW/openmw!1527
2022-01-05 10:48:13 +00:00
jvoisin
421e6629ad
Fix unnecessary-copy-initialization
...
> warning: the variable 'key' is copy-constructed from a const reference but is
only used as const reference; consider making it a const reference
[performance-unnecessary-copy-initialization]
Found by clang-tidy.
2022-01-04 20:42:09 +01:00
Evil Eye
5a7a3a0d2d
Silence a signed/unsigned mismatch warning
2022-01-04 17:11:55 +01:00
Evil Eye
bdfad27e05
Remove constant conditions
2022-01-04 16:50:04 +01:00
psi29a
0766e1310b
Merge branch 'lunacy' into 'master'
...
Don't touch base stats when turning into a werewolf
Closes #6333
See merge request OpenMW/openmw!1511
2022-01-04 10:27:48 +00:00
Evil Eye
6f870a464b
Replace magic numbers with enums
2021-12-29 12:34:12 +00:00
Evil Eye
debdcf2953
Don't touch base stats when turning into a werewolf
2021-12-27 00:47:33 +01:00
Evil Eye
c1f59b1221
Automatically drop workaround when the format is next updated
2021-12-24 23:17:50 +01:00
elsid
5a6b39f8e0
Store mesh source data in recast mesh
2021-12-10 23:55:02 +01:00
psi29a
53e14eb238
Merge branch 'reset' into 'master'
...
AI reset argument
Closes #6177 and #1465
See merge request OpenMW/openmw!1405
2021-11-21 09:39:55 +00:00
Evil Eye
3c57ffd81f
Save repeat and duration
2021-11-20 11:03:07 +01:00
Evil Eye
231da19aa4
Load repeat flag and use reset argument
2021-11-20 11:02:58 +01:00
Petr Mikheev
ded8997362
Avoid problems if builtin.omwscripts
is above Morrowind.esm
in content list.
2021-11-19 20:37:21 +01:00
Bo Svensson
a62b22cd31
isolates groundcover content files ( #3208 )
...
Specifications developed in PR #3206 require that groundcover content files must not be allowed to corrupt normal content files. With this PR we simply isolate our existing loading logic by instantiating a separate `ESMStore` for `Groundcover`. In addition, we remove some outdated workarounds.
2021-11-13 23:37:53 +01:00
Evil Eye
5f406158b5
Zero initialize context index
2021-11-13 12:46:10 +01:00
Alexei Dobrohotov
7a0c13fcf8
Make better use of std::clamp
2021-11-06 08:47:32 +03:00
Bo Svensson
6cf74f7041
refactors ESM::Land ( #3213 )
...
With this PR we reduce coupling, simplify code, encapsulate a variable and separate actual `ESM` data from its context.
2021-11-04 16:55:32 +01:00
Bo Svensson
4657c655b1
refactors parentFileIndices ( #3211 )
...
This PR aims to start addressing `ESM` design issues that have silenced errors we incorporated into groundcover `ESM` loading approaches.
- We move the resolution of `parentFileIndices` from `ESMStore` to `ESMReader` as suggested in a `TODO` comment.
- We improve a highly misleading comment which downplayed the significance of `parentFileIndices`.
- We document important preconditions.
- We move a user facing error message to the highest level and improve its context.
- We remove an inappropriate `setGlobalReaderList` method. We now pass this reader list into the method that requires it.
- We remove a thoroughly pointless optimisation of `Store<ESM::LandTexture>`'s construction that has unnecessarily depended on `getGlobalReaderList`.
There should be no functional changes for `master`, but this PR should remove an issue blocking PR #3208 .
2021-11-03 11:07:28 +01:00
psi29a
4c81518abb
Merge branch 'puddle' into 'master'
...
Give each reflect and spell absorption effect a chance to apply
Closes #6255 and #6253
See merge request OpenMW/openmw!1279
2021-10-30 19:26:32 +00:00
Petr Mikheev
47c89567fb
Load LuaScriptsCfg from both *.omwscripts and *.omwaddon files.
2021-10-26 21:52:42 +02:00
Petr Mikheev
6aab246879
Add ESM records that are needed to store Lua scripts configuration;
...
Use ptr.getType() (i.e. esm record names) instead of typeid(ptr.getClass()) in apps/openmw/mwlua.
2021-10-26 21:32:02 +02:00
Evil Eye
4ec927829f
Give each reflect and spell absorption effect a chance to apply
2021-10-26 16:50:40 +02:00
Andrei Kortunov
0f3c0cb0a0
Fix argument types mismatch
2021-10-24 18:45:46 +04:00
elsid
18d3102148
Do not use union to access FIXED_STRING<4> as int
...
https://en.cppreference.com/w/cpp/language/union :
> It's undefined behavior to read from the member of the union that wasn't most recently written.
2021-10-17 17:16:21 +02:00
Petr Mikheev
a8acc19988
Avoid copying std::string in MWWorld::Ptr::getTypeDescription()
2021-10-12 00:18:23 +02:00
Evil Eye
dc1fe62dde
Overhaul magic effects to work with onApply and onEnd events
2021-09-29 19:25:10 +02:00
cc9cii
7227a83e60
Preserve "blocked" record flags when saving with OpenCS. This will help outputs of OpenCS to be used with vanilla Morrowind.
...
Sample use case: users are using the Morrowind Code Patch feature that allows modders to enable this flag to differentiate editor-made potions from player crafted potions for tooltips.
2021-08-28 09:42:54 +10:00
Bret Curtis
c99bddc8dc
Revert "Move reference to the right cell according to its geographical position"
...
This reverts commit d0677c3f07
.
2021-08-09 22:11:00 +02:00
psi29a
9b7e14ec00
Merge branch 'OpenCS-moved-reference' into 'master'
...
OpenCS - Fix moved reference - Issues #3514 and #4752
See merge request OpenMW/openmw!1051
(cherry picked from commit 2bee171c7990522da33c2667f7d079fa35f4ede0)
36c30f7f Fix for Issue #3514 where moving a reference to another cell is not handled properly.
40327681 Update the changelog.
2021-08-03 23:29:05 +00:00
Cédric Mocquillon
d0677c3f07
Move reference to the right cell according to its geographical position
2021-07-30 18:28:29 +02:00
Evil Eye
5f84494046
Fail on invalid water levels
2021-07-21 16:00:25 +00:00
jvoisin
7b32458aec
Improve a bit two esmreader logging call
2021-07-21 15:38:41 +02:00
elsid
aec4e02417
Ignore only CellRefs with preceding MVRF subrecord
...
MVRF subrecord means that only single following FRMR subrecord is moved not the
rest of subrecords.
2021-07-12 18:56:45 +02:00
elsid
cfdbd0d471
Indicate moved cell refs explicitly
...
This is less error prone approach than use of MovedCellRef fields.
Also make separate functions for skipping and reading moved cell refs to avoid
passing special flags logic and null pointers for unused arguments.
2021-07-12 18:56:42 +02:00
jvoisin
5aaac8e47e
Reduce a bit the size of getHT
...
Factoring common code parts outside of a template
is apparently a good practise to reduce code duplication
(and the size of openmw by around 0.5%),
and should improve a bit the performances,
since the whole `std::to_string` * 2 + string concatenation
dance results in quite a lot of code, preventing inlining on my machine.
2021-07-11 21:43:40 +02:00
Petr Mikheev
702eb19271
Fixes and refactoring
2021-07-09 20:48:54 +02:00
Petr Mikheev
8c6d303730
Saving/loading for Lua scripts (saves format is changed)
2021-07-09 20:24:56 +02:00
Petr Mikheev
6db2450c90
Initial support of generated RefNums with negative mContentFile.
2021-07-09 20:03:27 +02:00
Petr Mikheev
479856f812
Add components/lua/scriptscontainer and components/esm/luascripts
2021-07-09 20:03:27 +02:00
psi29a
c372c239a6
Merge branch 'master' into 'OpenCS_Bug6017'
...
# Conflicts:
# CHANGELOG.md
2021-07-06 07:52:49 +00:00
cc9cii
a47ebf5c9e
For consistency with TES CS, force DELE record writes to be 4 bytes (currently writes 1 byte).
2021-07-06 14:57:58 +10:00
cc9cii
fea1ac2c0f
Remove dead code from commit 024ad3276b
.
2021-07-06 14:21:17 +10:00
cc9cii
f68c81e631
Merge branch 'master' into 'OpenCS_Bug6017'
2021-07-06 03:10:46 +00:00
cc9cii
4b3de46bfa
Use enums in place of magic numbers. Ensure Creature and NPC cell references are always saved as persistent.
2021-07-06 12:37:02 +10:00
elsid
91cece5cc4
Define ESM::Land static constants as constexpr
...
To avoid linking issues.
2021-07-04 22:17:44 +02:00
cc9cii
f2a301653c
Remove redundant mPersistent member from ESM::NPC and ESM::Creature, replaced by mRecordFlags. Fixed the editing of the persistence flag value.
2021-06-30 08:20:29 +10:00
jvoisin
8561245fda
Minor refactor making use of std::clamp
2021-06-29 18:43:47 +02:00
cc9cii
2a76634f5f
Moved persistence flag from references to the header flags of referenceables (e.g. Static, Weapon, etc). Editing widget is not fully working.
2021-06-29 23:25:26 +10:00
cc9cii
024ad3276b
Partial fix for #6017 . The persistence flag of the references are saved but it is not yet possible to modify it via OpenCS.
2021-06-29 19:20:01 +10:00
jvoisin
2c8f328ac2
Use make_unique instead of unique_ptr+new
2021-06-25 20:55:38 +02:00
Evil Eye
080106e802
Merge branch 'inline' into 'master'
...
Inline a couple of methods in esmreader.cpp
See merge request OpenMW/openmw!945
2021-06-24 19:56:18 +00:00
Evil Eye
0998929608
Merge branch 'noreturn' into 'master'
...
Sprinkle some [[noreturn]] where possible
See merge request OpenMW/openmw!793
2021-06-24 19:21:29 +00:00
Evil Eye
1a421c3b2e
Merge branch 'multicast' into 'master'
...
Fix two excessive type casting instances
See merge request OpenMW/openmw!953
2021-06-24 17:32:25 +00:00
Evil Eye
7e9785941c
Merge branch 'default' into 'master'
...
Use `default` instead of empty constructors/destructors
See merge request OpenMW/openmw!957
2021-06-24 17:19:02 +00:00
jvoisin
5840279f16
Use default
instead of empty constructors/destructors
...
See https://pvs-studio.com/en/docs/warnings/v832/ for details
2021-06-24 00:26:15 +02:00
jvoisin
b2c170efa0
Use initialization lists where possible
2021-06-23 23:36:43 +02:00
jvoisin
33e035cc95
Fix two excessive type casting instances
...
No need to to a string -> char* -> string dance.
2021-06-23 22:19:08 +02:00
jvoisin
aec3c74fa5
Sprinkle some [[noreturn]] where possible
2021-06-22 12:51:08 +02:00
jvoisin
17e0c75d30
Some more constexpr in esm/variant.cpp
2021-06-22 12:49:09 +02:00
jvoisin
6140c9c3fd
Don't catch exceptions in EsmReader::getExact
2021-06-21 20:06:45 +00:00
jvoisin
cff11fbca9
Inline a couple of methods in esmreader.cpp
2021-06-21 14:22:26 +02:00
psi29a
afda721d4b
Merge branch 'race_floats' into 'master'
...
Display Race record height/weight as a float
See merge request OpenMW/openmw!880
2021-06-19 00:29:21 +00:00
psi29a
a6b695e15b
Merge branch 'esmcleanup' into 'master'
...
More ESM cleanup
See merge request OpenMW/openmw!903
2021-06-19 00:23:52 +00:00
jvoisin
22153cca7b
Reduce a bit the code bloat in hot paths/small functions
...
There is no need to bloat hot/small functions with
a ton of function calls and involving locales
for simple error messages.
2021-06-15 17:57:14 +02:00
Dobrohotov Alexei
e68a454fd8
More ESM cleanup
2021-05-23 16:02:05 +03:00
Benjamin Winger
21f04f0d0f
Fixed data subrecord name for Armour record used in error
2021-05-17 18:36:59 -04:00