elsid
dad0cb3349
Move transposeTextureData to unnamed namespace
1 year ago
elsid
a2f2b1a3d1
Remove redundant ESM::Land and LandData default constructors
1 year ago
elsid
95a39b3281
Use sized types for land records members
1 year ago
elsid
f15ccec0d9
Remove unused ESM::Land functions
1 year ago
psi29a
5389d32b5c
Merge branch 'applycontentfile_coverity' into 'master'
...
Fix coverity warning in esm3/globalscript.cpp
See merge request OpenMW/openmw!3325
1 year ago
psi29a
c9f03b4174
Merge branch 'sizeup' into 'master'
...
Replace more sized reads
See merge request OpenMW/openmw!3322
1 year ago
elsid
5abbc56bf2
Use proper cell size for ESM4 cells in CoordinateConverter
1 year ago
Petr Mikheev
f5ddffa087
Fix coverity warning in esm3/globalscript.cpp
1 year ago
Evil Eye
9e376f3783
Replace explicitly sized reads in cellid, cellref
1 year ago
Evil Eye
48484c9416
Replace explicitly sized reads in aisequence
1 year ago
psi29a
7b4f7b7f07
Merge branch 'adjust_refnum' into 'master'
...
Adjust FormId in FormIdRefId and for items in containers when loading saves
See merge request OpenMW/openmw!3293
1 year ago
psi29a
5160fbc2a0
Merge branch 'fixedtimestamp' into 'master'
...
Move TimeStamp to ESM3 and remove sized reads
See merge request OpenMW/openmw!3295
1 year ago
psi29a
c86eecb2ea
Merge branch 'movable_objects' into 'master'
...
Move objects instead of copying where possible
See merge request OpenMW/openmw!3289
1 year ago
psi29a
23671ced33
Merge branch 'fix_use_after_move' into 'master'
...
Fix use after move in InfoOrder::insertInfo
See merge request OpenMW/openmw!3296
1 year ago
Andrei Kortunov
d3d7a663c6
Move some objects instead of copying
1 year ago
elsid
66c5944ecf
Fix use after move in InfoOrder::insertInfo
...
When it->second.mPosition->mPrev != value.mPrev value is first moved into
*mPosition and then used to get mPrev. Since mPrev is RefId and it's copy-only
type there is no real problem but coverity complains about it.
Also enforce contract of insertInfo to support move-only types by adding a test
for a value type with deleted copy constructors.
1 year ago
Evil Eye
79b3855c5b
Move TimeStamp to ESM3 and remove sized reads
1 year ago
Petr Mikheev
9a9f9d7081
Adjust FormId in FormIdRefId and for items in containers when loading saves
1 year ago
elsid
dd54857610
Add missing array include
1 year ago
psi29a
a6d6e16d48
Merge branch 'readsize' into 'master'
...
Disallow implicitly sized reads of ESM structs
See merge request OpenMW/openmw!3100
1 year ago
Mads Buvik Sandvei
364f2a98e9
Use refnum instead of slot for items during spellcast
1 year ago
Evil Eye
6e5d84ce37
inline
1 year ago
Evil Eye
9d4877d432
Treat std::array like regular arrays
1 year ago
Evil Eye
45ba05c0ed
Disallow implicitly sized reads of ESM structs
1 year ago
psi29a
ec9b4c4563
Merge branch 'caius4friends' into 'master'
...
Fix dialogue insertion again
See merge request OpenMW/openmw!3212
1 year ago
psi29a
03dbe1c9f3
Merge branch 'stringrefidskills' into 'master'
...
Assign StringRefIds to skills
See merge request OpenMW/openmw!3146
1 year ago
Evil Eye
2a1d520c9e
Address feedback
1 year ago
Evil Eye
7573004efc
Implement the NegativeLight flag
1 year ago
Evil Eye
cd8f2355c0
Only allow StringRefId for Skill ids
1 year ago
Evil Eye
967b5d205b
Use StringRefId for skills
1 year ago
Evil Eye
ac9378fa08
Replace Skill::mIndex with Skill::refIdToIndex
1 year ago
Evil Eye
4eac137109
Change control flow to be easier to understand
1 year ago
Alexei Dobrohotov
66fd1f8862
Allow subrecords to overlap the following record (bug #6025 )
2 years ago
Evil Eye
d3c1928f01
Fix dialogue insertion again
2 years ago
elsid
f6fce5ee15
Cleanup includes
2 years ago
elsid
a6dbd819a1
Fix writing IndexRefId to ESM3
...
Use correct enum value.
2 years ago
Evil Eye
73c2387708
Merge schools into skills
2 years ago
psi29a
dd0d66513d
Merge branch 'clickbait' into 'master'
...
Mostly dehardcode attributes
See merge request OpenMW/openmw!3164
2 years ago
Zackhasacat
611a6429a9
Lua: Add effects to potionRecord, ingredientRecord
2 years ago
Evil Eye
bac6777fae
Reduce the number of magic numbers
2 years ago
psi29a
807893eb45
Merge branch 'clickbait' into 'master'
...
Mostly dehardcode skills
See merge request OpenMW/openmw!3112
2 years ago
Evil Eye
3c588900dd
Apply elsid's suggestion and revert 3a888ef543
2 years ago
Evil Eye
da4e04522b
More closely replicate Morrowind.exe's locks
2 years ago
Evil Eye
65b22975c9
Remove SkillEnum
2 years ago
Evil Eye
16c0f0d5cc
Use a regular TypedDynamicStore for ESM:Skill
2 years ago
Evil Eye
e01a3076dd
Use std::array in NpcStats
2 years ago
Evil Eye
a5bb6c7d8d
Use std::array in NPDTstruct52
2 years ago
Evil Eye
dd83da5eba
Use std::array in FADTstruct
2 years ago
Evil Eye
7be005c9a5
Use std::array in CLDTstruct
2 years ago
Evil Eye
8a474b9807
Use std::array in RADTstruct
2 years ago
Evil Eye
08f35fe839
Add ESM::Skill::mWerewolfValue
2 years ago
Evil Eye
eea730768b
Replace sIconNames with ESM::Skill::mIcon
2 years ago
Evil Eye
9c60a6fa4d
Replace sSkillNameIds with ESM::Skill::mName
2 years ago
florent.teppe
ad8cfde4e0
ESM::LandData no longer a virtual interface
...
instead it is constructed from ESM::Land or ESM4::Land
2 years ago
florent.teppe
f600730459
fixes functions that were virtual but not tagged as override.
2 years ago
florent.teppe
e0fa15b727
Abstracted Land data that can be used by esm3 and esm4.
2 years ago
psi29a
16a580eb21
Merge branch 'clickbait' into 'master'
...
Remove sAttributeIds and sSkillIds
See merge request OpenMW/openmw!3071
2 years ago
unknown
14600de185
Remove sAttributeIds and sSkillIds
2 years ago
jvoisin
c98c532213
Replace all asserts in components/esm[34] with throw
2 years ago
Evil Eye
877f6747be
Deduplicate specialization code
2 years ago
elsid
dc8dfe81ce
Add more details to exceptions
2 years ago
Mads Buvik Sandvei
410e8b100a
Elsid comments
2 years ago
Mads Buvik Sandvei
5a8c6df633
clang'd
2 years ago
Mads Buvik Sandvei
4bf23f152b
Revert use of string_view to std::string for effectIdTo* methods.
2 years ago
Mads Buvik Sandvei
6cfc06d7d8
There is no typo
2 years ago
Mads Buvik Sandvei
9a59330561
refactor effect names in loadmgef. Added a map from effect index to non-gmst effect name for use in lua scripts.
2 years ago
Mads Buvik Sandvei
b791ce9132
Remove redundant qualifiers
2 years ago
Mads Buvik Sandvei
7ba43c9426
actor.ActiveEffects and actor.ActiveSpells
2 years ago
elsid
8f47da46ec
Show magic effect name instead of IndexRefId
2 years ago
florent.teppe
56cb2a83ec
removed sDefaultWorldspace, only sDefaultWorldspaceId now.
...
sDefaultWorldspaceId is a StringRefId to be able to getvalue easily.
2 years ago
florent.teppe
a62e75fd19
Initial attempt at loading esm4 exteriors
2 years ago
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.
2 years ago
elsid
b33d12b8e1
Add missing and remove redundant includes
2 years ago
Petr Mikheev
f09a689a4f
Merge ESM::RefNum and ESM4::FormId
2 years ago
Evil Eye
8d8207b734
Refactor pathgrid indices to use size_t instead of int
2 years ago
florent.teppe
21bd28542a
Applies review advice
...
2d coord hash moved to hash.hpp file
format version adds suffix to be more coherent
don't use ESM::RefId::sEmpty
RefId equality with string_view, conversion to refId unecessary
action teleport remove test that mCellId is empty
removes some const references, when copy is enough
invalid refid => empty refid
removes useless change
2 years ago
florent.teppe
d782d37ee2
Make sure Vec2iRefId is trivially copyable on GCC 11.3
...
std::pair<int, int> isn't trivially copyable on some compilers
so a specific struct is defined, it's an int pair, but it should be recognised by GCC 11.3 as trivially copyable
Vec2iRefId => ESM3ExteriorCellRefId
more explcit name and use mX,mY instead of pair
renamed files and enum
2 years ago
florent.teppe
53b14c8b42
fix tests
...
hopefully also fixes clang tidy
2 years ago
florent.teppe
4c15064a83
Create new Vec2i RefId for ESM3 exterior cells.
...
Applies the necessary changes to use !2708 for the new Id type
2 years ago
florent.teppe
1e0c3bfdec
fixes integration tests
...
we still want to be able to write using old formats
2 years ago
florent.teppe
f99e65843a
Removes most cellId.hpp include, simplifies id generation for cells.
2 years ago
florent.teppe
c2182c2fcc
Get Rid of ESM::CellId almost everywhere
...
it was a competing concept from using RefIds for cell.
There is almost no point to it now, except to load older data.
2 years ago
florent.teppe
fb6701ac1a
ESM::CellId is no longer stored on saves.
2 years ago
florent.teppe
c39dd576f8
Gets rid of most ESM::CellId
2 years ago
florent.teppe
9f597ecfea
No more Cellid used by ESM4 cells
...
and that also means it is no longer used by MWWorld::Cell
fixes tests
2 years ago
florent.teppe
3f678c3b0a
Dest Door and teleport use ESM::RefId
...
This changes a lot of files as a consequence.
Still buggy, moving to exterior doesn't bring to the right place yet
coc "seyda neen" doesn't work. SO I broke somehting when fetching a cell from a name
2 years ago
florent.teppe
36502eaf75
ESM3 Cells have an Id.
...
Store<ESM::Cell> is updated to use it.
2 years ago
Andrei Kortunov
8c6616214b
Remove redundant quotes
2 years ago
elsid
9162eaa019
Test more ESM::Player records
2 years ago
elsid
452d1e7e49
Store original string id for Dialogue records
2 years ago
elsid
06f42ba69c
Use fixed size enum type for ESM::Dialogue::mType
2 years ago
elsid
4716583f3e
Set ESM::Dialogue::mType on blank and skip load
2 years ago
elsid
90ed24f4c9
Split type traits for ESM4, ESM3 and unite common
2 years ago
elsid
d5954aba68
Add suffix to the format version name
2 years ago
Evil Eye
54d6fb29c2
Don't store a save's cell name as a RefID
2 years ago
elsid
d1e8e56619
Make QuickKey type a fixed size enum class
2 years ago
elsid
eb79b29512
Use ranged for loop
2 years ago
elsid
2135eba103
Fix loading ESM3 QuickKeys
2 years ago
elsid
04d7781424
Support not only StringRefId for checking first person body part
2 years ago
elsid
e6cf516e12
Support index RefId as pair of record type and std::uint32_t
2 years ago
elsid
86293af084
Support generated RefId as std::uint64_t
2 years ago
elsid
0992624c8b
Support reading and writing typed ESM::RefId to ESM
2 years ago
psi29a
a60f657f5a
Merge branch 'fast_cell4_load' into 'master'
...
Lazy loading of ESM4::reference
See merge request OpenMW/openmw!2804
2 years ago
psi29a
2ff4a5a11a
Merge branch 'cs_fix_info_collection' into 'master'
...
Fix loading, inserting and moving topic info records
See merge request OpenMW/openmw!2806
2 years ago
Petr Mikheev
0b385d5db9
Create MWWorld::SafePtr
2 years ago
elsid
e032214fcb
Use common info ordering implementation for engine and editor
2 years ago
elsid
e892c62b10
Fix loading, inserting and moving topic info records
...
Topic info records need to have specific order defined via mNext and mPrev
fields (next and previous records). When loading multiple files a record may be
inserted into middle of the topic but neighborhood records may not be aware of
it. Having the order it's possible to move the records within one topic.
Sort the record once after loading all content files but preserve the order for
all other operations. Use std::map to group info ids by topic to make sure the
topics order is stable. Keep order within a topic for info ids on loading new
records. Use this order later for sorting the records.
2 years ago
florent.teppe
170b732854
readers cache keep a stateless encoder
...
to keep access to the current encoding configuration
build linux
2 years ago
psi29a
0ed1310417
Merge branch 'fix_fog_state_load' into 'master'
...
Fix loading fog state
See merge request OpenMW/openmw!2743
2 years ago
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.
2 years ago
elsid
959de6f4c1
Avoid UB on empty fog data record
2 years ago
elsid
996153f78d
Convert RefId to class
2 years ago
elsid
6d261d38dd
Add functions to read and write ESM::RefId and use them
...
To be later changed with another implementation.
2 years ago
elsid
80e6d6cbe3
Support variable size strings in ESM3
2 years ago
elsid
beb017e699
Do not truncate too long strings on writing ESM
2 years ago
elsid
c0c723bb1b
Add const to read only function
2 years ago
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.
2 years ago
elsid
a5ec108cfb
Add missing space
2 years ago
elsid
4f683d1ee9
Throw exception on failed write
2 years ago
elsid
080700f8fe
Name all custom ESM format versions and add tests
2 years ago
elsid
c79c14da91
Fix -Wnon-virtual-dtor warnings
2 years ago
florent.teppe
3780033837
Reverts Cell name to a string
2 years ago
elsid
c173348cbe
Use default initializers for ESM::RefNum members
...
Instead of unset function that is removed now and assignments all over the code.
2 years ago
elsid
755067f0f3
Remove redundant ESM::RefId member functions
2 years ago
Petr Mikheev
b8fb013edf
Merge MWLua::ObjectRegistry and MWWorld::WorldModel
2 years ago
florent.teppe
afed7e60ef
Upgraded Filesave version for RefIDs
...
Fix logic issue
2 years ago
florent.teppe
1ef1de974d
script blacklist => RefId
...
Applies changes from review
Fixed clang format
Clang format + review.
2 years ago
florent.teppe
2c30575b3b
CellName is now a RefId, makes more sense that way.
2 years ago
florent.teppe
6ff90b34a8
Fixed an issue with RefId in CellRefs where Ids wouldn't be loaded
...
Fixed multiple issues from the review.
2 years ago
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
2 years ago
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
2 years ago
fteppe
c8bb733360
removed clear() function, the only way to change the Id from the outside is from the assignment operator
...
replaced ciEqual with == operator
2 years ago
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!
2 years ago
Evil Eye
bbbcc5e4b7
Add an early out to dialogue loading to match Morrowind.exe behaviour
2 years ago
psi29a
c164437d91
Merge branch 'classism' into 'master'
...
Use class service flags for autocalc NPCs
Closes #7044
See merge request OpenMW/openmw!2461
2 years ago
elsid
843753da14
Remove unused includes
2 years ago
Evil Eye
60c26832d2
Use class service flags for autocalc NPCs
2 years ago
elsid
063fff7fa4
Fix and prevent -Wextra-semi warning
2 years ago
Evil Eye
e6592aa850
Add key flag on load
2 years ago
clang-format-bot
ddb0522bbf
Apply clang-format to code base
2 years ago
AnyOldName3
84f8a6848a
Renormalise line endings
...
This should replace accidental CRLF with LF
2 years ago
elsid
51314db2f1
Remove AI_CNDT from AI package types
...
AI_CNDT is a label of subrecord containing cell name. It's not AI package type.
2 years ago
elsid
52b7b66e9f
Add comma to the last array element to prevent putting multiple elements on a single line
2 years ago
Project579
a13709c510
Replace implicit convertions from std::filesystem::path to std::string with correctly converting functions.
2 years ago
Project579
e5c417c968
Make sure all paths are passed as std::filesystem::path instead of std::string where possible.
2 years ago
AnyOldName3
4e8e2e1c60
Eliminate &thing[0] pattern
2 years ago
Alexei Kotov
a8e561d885
Avoid issues with saved games that have no screenshot data
2 years ago
elsid
cc8c7002ea
Cleanup components includes
2 years ago
psi29a
b382e92953
Merge branch 'please_dont_copy_my_nfts' into 'master'
...
Prevent various values from being copied
See merge request OpenMW/openmw!2267
2 years ago
Andrei Kortunov
e3ad30a517
Do not copy data when it is not needed
2 years ago