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

42 commits

Author SHA1 Message Date
elsid
6a3b6c6e4f
Fix handling deleted DIAL records
* Use composite RefId to remove INFO record of deleted DIAL record. OrderedInfo
  stores original RefId while InfoCollection stores composite one.
* Do not erase deleted topic from InfoOrderByTopic map. To keep all deleted
  record ids for InfoCollection::sort call to make sure reorderRowsImp is called
  with correct number of indices.
2023-06-01 23:35:40 +02:00
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.
2023-03-13 21:57:38 +01:00
psi29a
d846a9fc15 Merge branch 'cs_optimize_saving' into 'master'
Fix editor saving performance

See merge request OpenMW/openmw!2741
2023-02-17 13:30:20 +00:00
elsid
e618026c69
Use ESM::RefId as index key in collections 2023-02-17 11:08:46 +01:00
elsid
b2299ef914
Optimize saving in editor 2023-02-17 11:05:25 +01:00
elsid
b6a2fd8fc1
Simplify InfoCollection
There was additional logic to create topic infos index by topic id to make
getTopicInfos and removeDialogueInfos functions faster. In practice it makes
loading slower.

Move infos index by topic to CSMWorld::Data and use only on loading.
2023-02-15 23:10:35 +01:00
florent.teppe
6ff90b34a8 Fixed an issue with RefId in CellRefs where Ids wouldn't be loaded
Fixed multiple issues from the review.
2022-12-27 19:15:58 +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
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
2022-12-27 19:15:55 +01:00
jvoisin
1a326294c0 Run IWYU on the opencs 2022-10-31 21:04:01 +01:00
clang-format-bot
ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
elsid
f99ed6f1db
Split components/misc/stringops.hpp into multiple headers
Replace all ciEqual overloads with one having std::string_view as argument.
2022-08-03 22:06:24 +02:00
Andrei Kortunov
a5b0ef0912 Avoid possible null dereference 2022-07-12 13:43:47 +04:00
Andrei Kortunov
42b9a6daaf Do not use an invalid iterator 2022-07-12 12:45:11 +04:00
Evil Eye
db1a372e5b Replace new with make_unique in opencs 2022-05-29 13:25:17 +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
elsid
6b7434ca69
Pass std::string_view instead of const std::string&
* Starting with Actor::getBodyPartMesh and ending with
  Misc::StringUtils::ciEqual.
* Add tests for Misc::StringUtils::ciEqual.
2021-09-09 18:39:50 +02:00
cc9cii
67cad2c515 Fix CSMWorld::InfoCollection::getTopicRange() returning one too many. 2021-08-01 15:53:00 +10:00
cc9cii
fd67ebde25 Changes based on review comments, including:
* replace murmurhash with std::unordered_map
* plug potential leak from unique_ptr release
* replacing some sections with cleaner code
2021-07-24 09:17:48 +10:00
cc9cii
5fffcab94f Performance improvements for loading Info records.
- The order of info records with the same topic are maintained in Collection::mRecords
- The index lookup data structure are not ordered.  The topic string is hashed.  The infos for the topic are simply placed in a vector.
- The index values for appending or inserting a record takes prev/next values (if exist)
- FIXME: prev/next values are not adjusted for adding or removing records
- FIXME: undo after reordering does not reset the modified flag

(copied the changes from commit SHA-1: 06f9922822)
2021-07-23 16:05:58 +10:00
cc9cii
be45092e55 Use std::unique_ptr to store records in collections, RefidCollection and RefIdData.
(copied the changes from commit 23e7e3c165)
2021-07-23 14:21:21 +10:00
Allofich
ccacad51be Fix shadowing warnings 2016-10-16 01:34:54 +09:00
scrawl
b8e11cf197 Merge commit 'pull/upstream/678' into HEAD
Conflicts:
	apps/esmtool/record.cpp
	apps/opencs/model/doc/savingstages.cpp
	apps/opencs/model/world/land.cpp
	apps/opencs/model/world/land.hpp
	apps/opencs/model/world/landtexture.cpp
	apps/openmw/mwworld/store.cpp
	components/esm/loadland.cpp
	components/esm/loadland.hpp
2015-11-13 01:34:36 +01:00
scrawl
67bd6cd708 Remove empty line at the beginning of files
git ls-files -z | xargs -0 sed -i '1{/^$/d}'
2015-08-18 23:06:12 +02:00
Stanislav Bas
13bb6be238 Load methods (for ESM records) accept a deleted flag in OpenCS 2015-07-22 22:17:26 +03:00
Stanislav Bas
e04e32bcff Delete infos of deleted dialogue when loading a content file 2015-07-19 14:58:18 +03:00
Stanislav Bas
71e5fc7f04 Remove INAM handling from InfoCollection 2015-07-13 11:27:32 +03:00
Stanislav Bas
21f0b586ec Rows with the same topic but in different letter case can be reordered 2015-06-24 20:01:29 +03:00
cc9cii
f06ddd47c4 Return the correct range for a given topic. Should resolve Bug #2569. 2015-05-26 17:38:22 +10:00
cc9cii
fd86076db3 More warning fixes. 2015-03-14 08:09:19 +11:00
greye
15d946415e minor cleanup
Removed case folding via std::transform, excessive lowerCase()
replaced with ciEqual().
2014-01-14 12:46:53 +04:00
Marc Zinnschlag
780ea3a41f added support for record reordering to model (only implemented in info collection) 2013-11-14 11:39:14 +01:00
Marc Zinnschlag
583f1ae9c2 fixed info record ordering and performance problems by determining topic ranges in the record collection instead of in the index collection 2013-11-10 13:00:46 +01:00
Marc Zinnschlag
ec6018928c some fixes to info record sorting (doesn't address the main problem) 2013-11-10 12:09:49 +01:00
Marc Zinnschlag
935d9241d8 first attempt at proper info record loading: partially incorrect and way too slow 2013-11-09 11:42:19 +01:00
Marc Zinnschlag
3d8da2b9e0 proper sorting for newly created records and some case smashing fixes 2013-11-08 12:16:41 +01:00
Marc Zinnschlag
982024a328 Topic range access in InfoCollection 2013-11-08 11:52:30 +01:00
Marc Zinnschlag
c545b3682a compose info record IDs from actual record ID and parent topic ID (to make sure IDs are unique) 2013-11-05 12:57:55 +01:00
Marc Zinnschlag
2d4a6c0edf cleaned up ID handling in INFO record (including a ESMTool bug fix) 2013-11-05 12:56:20 +01:00
Marc Zinnschlag
15b7d3263c subclass ESM::DialInfo to keep track of parent topic 2013-11-01 17:43:45 +01:00
Marc Zinnschlag
69f28ee4be split info records between journal and topic info tables 2013-10-31 12:16:45 +01:00
Marc Zinnschlag
ba88c94d58 first attempt at an info record collection 2013-10-29 13:18:22 +01:00