1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-20 02:23:53 +00:00
Commit graph

251 commits

Author SHA1 Message Date
elsid
5abbc56bf2
Use proper cell size for ESM4 cells in CoordinateConverter 2023-08-13 02:24:22 +02:00
Petr Mikheev
f5ddffa087 Fix coverity warning in esm3/globalscript.cpp 2023-08-12 12:35:08 +02:00
Evil Eye
9e376f3783 Replace explicitly sized reads in cellid, cellref 2023-08-08 21:41:44 +02:00
Evil Eye
48484c9416 Replace explicitly sized reads in aisequence 2023-08-08 21:06:49 +02:00
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
2023-08-08 08:54:00 +00:00
psi29a
5160fbc2a0 Merge branch 'fixedtimestamp' into 'master'
Move TimeStamp to ESM3 and remove sized reads

See merge request OpenMW/openmw!3295
2023-08-02 08:11:33 +00:00
psi29a
c86eecb2ea Merge branch 'movable_objects' into 'master'
Move objects instead of copying where possible

See merge request OpenMW/openmw!3289
2023-08-01 10:43:44 +00:00
psi29a
23671ced33 Merge branch 'fix_use_after_move' into 'master'
Fix use after move in InfoOrder::insertInfo

See merge request OpenMW/openmw!3296
2023-08-01 07:25:17 +00:00
Andrei Kortunov
d3d7a663c6 Move some objects instead of copying 2023-07-31 20:43:46 +04:00
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.
2023-07-30 13:37:53 +02:00
Evil Eye
79b3855c5b Move TimeStamp to ESM3 and remove sized reads 2023-07-30 11:37:32 +02:00
Petr Mikheev
9a9f9d7081 Adjust FormId in FormIdRefId and for items in containers when loading saves 2023-07-30 02:01:09 +02:00
elsid
dd54857610
Add missing array include 2023-07-29 00:29:03 +02:00
psi29a
a6d6e16d48 Merge branch 'readsize' into 'master'
Disallow implicitly sized reads of ESM structs

See merge request OpenMW/openmw!3100
2023-07-28 07:01:32 +00:00
Mads Buvik Sandvei
364f2a98e9 Use refnum instead of slot for items during spellcast 2023-07-25 21:23:59 +00:00
Evil Eye
6e5d84ce37 inline 2023-07-22 08:40:02 +02:00
Evil Eye
9d4877d432 Treat std::array like regular arrays 2023-07-21 17:00:33 +02:00
Evil Eye
45ba05c0ed Disallow implicitly sized reads of ESM structs 2023-07-20 19:16:53 +02:00
psi29a
ec9b4c4563 Merge branch 'caius4friends' into 'master'
Fix dialogue insertion again

See merge request OpenMW/openmw!3212
2023-07-20 15:29:57 +00:00
psi29a
03dbe1c9f3 Merge branch 'stringrefidskills' into 'master'
Assign StringRefIds to skills

See merge request OpenMW/openmw!3146
2023-07-20 07:15:49 +00:00
Evil Eye
2a1d520c9e Address feedback 2023-07-17 19:37:28 +02:00
Evil Eye
7573004efc Implement the NegativeLight flag 2023-07-17 18:00:15 +02:00
Evil Eye
cd8f2355c0 Only allow StringRefId for Skill ids 2023-07-14 17:33:32 +02:00
Evil Eye
967b5d205b Use StringRefId for skills 2023-07-13 18:55:22 +02:00
Evil Eye
ac9378fa08 Replace Skill::mIndex with Skill::refIdToIndex 2023-07-13 18:55:21 +02:00
Evil Eye
4eac137109 Change control flow to be easier to understand 2023-07-11 22:10:39 +02:00
Alexei Dobrohotov
66fd1f8862 Allow subrecords to overlap the following record (bug #6025) 2023-07-10 21:09:22 +03:00
Evil Eye
d3c1928f01 Fix dialogue insertion again 2023-07-09 15:24:52 +02:00
elsid
f6fce5ee15
Cleanup includes 2023-07-08 11:28:56 +02:00
elsid
a6dbd819a1
Fix writing IndexRefId to ESM3
Use correct enum value.
2023-07-04 11:34:52 +02:00
Evil Eye
73c2387708 Merge schools into skills 2023-06-26 20:42:52 +02:00
psi29a
dd0d66513d Merge branch 'clickbait' into 'master'
Mostly dehardcode attributes

See merge request OpenMW/openmw!3164
2023-06-25 20:11:19 +00:00
Zackhasacat
611a6429a9 Lua: Add effects to potionRecord, ingredientRecord 2023-06-20 10:00:05 +00:00
Evil Eye
bac6777fae Reduce the number of magic numbers 2023-06-18 16:21:06 +02:00
psi29a
807893eb45 Merge branch 'clickbait' into 'master'
Mostly dehardcode skills

See merge request OpenMW/openmw!3112
2023-06-15 07:03:13 +00:00
Evil Eye
3c588900dd Apply elsid's suggestion and revert 3a888ef543 2023-06-10 22:04:14 +02:00
Evil Eye
da4e04522b More closely replicate Morrowind.exe's locks 2023-06-08 20:10:32 +02:00
Evil Eye
65b22975c9 Remove SkillEnum 2023-06-08 18:35:50 +02:00
Evil Eye
16c0f0d5cc Use a regular TypedDynamicStore for ESM:Skill 2023-06-08 18:35:47 +02:00
Evil Eye
e01a3076dd Use std::array in NpcStats 2023-06-03 14:26:37 +02:00
Evil Eye
a5bb6c7d8d Use std::array in NPDTstruct52 2023-06-03 13:27:45 +02:00
Evil Eye
dd83da5eba Use std::array in FADTstruct 2023-06-03 13:11:49 +02:00
Evil Eye
7be005c9a5 Use std::array in CLDTstruct 2023-06-03 11:58:09 +02:00
Evil Eye
8a474b9807 Use std::array in RADTstruct 2023-06-03 10:45:32 +02:00
Evil Eye
08f35fe839 Add ESM::Skill::mWerewolfValue 2023-05-31 17:45:20 +02:00
Evil Eye
eea730768b Replace sIconNames with ESM::Skill::mIcon 2023-05-30 20:22:04 +02:00
Evil Eye
9c60a6fa4d Replace sSkillNameIds with ESM::Skill::mName 2023-05-29 17:56:14 +02:00
florent.teppe
ad8cfde4e0 ESM::LandData no longer a virtual interface
instead it is constructed from ESM::Land or ESM4::Land
2023-05-29 12:10:42 +02:00
florent.teppe
f600730459 fixes functions that were virtual but not tagged as override. 2023-05-29 12:10:41 +02:00
florent.teppe
e0fa15b727 Abstracted Land data that can be used by esm3 and esm4. 2023-05-29 11:31:37 +02:00
psi29a
16a580eb21 Merge branch 'clickbait' into 'master'
Remove sAttributeIds and sSkillIds

See merge request OpenMW/openmw!3071
2023-05-28 09:14:47 +00:00
unknown
14600de185 Remove sAttributeIds and sSkillIds 2023-05-27 21:54:13 +02:00
jvoisin
c98c532213 Replace all asserts in components/esm[34] with throw 2023-05-27 16:10:53 +02:00
Evil Eye
877f6747be Deduplicate specialization code 2023-05-26 12:16:47 +02:00
elsid
dc8dfe81ce
Add more details to exceptions 2023-05-25 20:56:07 +02:00
Mads Buvik Sandvei
410e8b100a Elsid comments 2023-05-23 19:30:29 +02:00
Mads Buvik Sandvei
5a8c6df633 clang'd 2023-05-23 18:12:06 +02:00
Mads Buvik Sandvei
4bf23f152b Revert use of string_view to std::string for effectIdTo* methods. 2023-05-23 18:12:06 +02:00
Mads Buvik Sandvei
6cfc06d7d8 There is no typo 2023-05-23 18:12:06 +02:00
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. 2023-05-23 18:11:59 +02:00
Mads Buvik Sandvei
b791ce9132 Remove redundant qualifiers 2023-05-23 18:11:44 +02:00
Mads Buvik Sandvei
7ba43c9426 actor.ActiveEffects and actor.ActiveSpells 2023-05-23 18:11:44 +02:00
elsid
8f47da46ec
Show magic effect name instead of IndexRefId 2023-05-22 18:02:21 +02:00
florent.teppe
56cb2a83ec removed sDefaultWorldspace, only sDefaultWorldspaceId now.
sDefaultWorldspaceId is a StringRefId to be able to getvalue easily.
2023-05-12 22:05:53 +02:00
florent.teppe
a62e75fd19 Initial attempt at loading esm4 exteriors 2023-05-12 22:05:52 +02: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
elsid
b33d12b8e1
Add missing and remove redundant includes 2023-04-17 22:02:36 +02:00
Petr Mikheev
f09a689a4f Merge ESM::RefNum and ESM4::FormId 2023-04-09 00:23:32 +02:00
Evil Eye
8d8207b734 Refactor pathgrid indices to use size_t instead of int 2023-04-08 00:32:43 +00:00
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
2023-04-03 14:17:35 +02:00
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
2023-04-03 14:17:31 +02:00
florent.teppe
53b14c8b42 fix tests
hopefully also fixes clang tidy
2023-04-03 14:17:17 +02:00
florent.teppe
4c15064a83 Create new Vec2i RefId for ESM3 exterior cells.
Applies the necessary changes to use !2708 for the new Id type
2023-04-03 14:17:16 +02:00
florent.teppe
1e0c3bfdec fixes integration tests
we still want to be able to write using old formats
2023-04-03 14:16:32 +02:00
florent.teppe
f99e65843a Removes most cellId.hpp include, simplifies id generation for cells. 2023-04-03 14:16:32 +02:00
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.
2023-04-03 14:16:05 +02:00
florent.teppe
fb6701ac1a ESM::CellId is no longer stored on saves. 2023-04-03 14:16:05 +02:00
florent.teppe
c39dd576f8 Gets rid of most ESM::CellId 2023-04-03 14:16:05 +02:00
florent.teppe
9f597ecfea No more Cellid used by ESM4 cells
and that also means it is no longer used by MWWorld::Cell
fixes tests
2023-04-03 14:16:04 +02:00
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
2023-04-03 14:16:03 +02:00
florent.teppe
36502eaf75 ESM3 Cells have an Id.
Store<ESM::Cell> is updated to use it.
2023-04-03 14:16:03 +02:00
Andrei Kortunov
8c6616214b Remove redundant quotes 2023-04-03 11:28:03 +04:00
elsid
9162eaa019
Test more ESM::Player records 2023-04-02 19:58:27 +02:00
elsid
452d1e7e49
Store original string id for Dialogue records 2023-03-26 19:07:32 +02:00
elsid
06f42ba69c
Use fixed size enum type for ESM::Dialogue::mType 2023-03-26 19:07:25 +02:00
elsid
4716583f3e
Set ESM::Dialogue::mType on blank and skip load 2023-03-26 19:07:25 +02:00
elsid
90ed24f4c9
Split type traits for ESM4, ESM3 and unite common 2023-03-26 19:07:23 +02:00
elsid
d5954aba68
Add suffix to the format version name 2023-03-26 15:21:25 +02:00
Evil Eye
54d6fb29c2 Don't store a save's cell name as a RefID 2023-03-22 22:57:52 +01:00
elsid
d1e8e56619
Make QuickKey type a fixed size enum class 2023-03-21 20:53:04 +01:00
elsid
eb79b29512
Use ranged for loop 2023-03-21 20:45:49 +01:00
elsid
2135eba103
Fix loading ESM3 QuickKeys 2023-03-21 20:44:42 +01:00
elsid
04d7781424
Support not only StringRefId for checking first person body part 2023-03-19 17:49:41 +01:00
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
psi29a
a60f657f5a Merge branch 'fast_cell4_load' into 'master'
Lazy loading of ESM4::reference

See merge request OpenMW/openmw!2804
2023-03-17 21:46:37 +00:00
psi29a
2ff4a5a11a Merge branch 'cs_fix_info_collection' into 'master'
Fix loading, inserting and moving topic info records

See merge request OpenMW/openmw!2806
2023-03-17 14:40:05 +00:00
Petr Mikheev
0b385d5db9 Create MWWorld::SafePtr 2023-03-13 23:44:00 +01:00
elsid
e032214fcb
Use common info ordering implementation for engine and editor 2023-03-13 21:57:41 +01:00