Commit Graph

1798 Commits (c9279d413780096404f4785b99e6471c410c8e62)

Author SHA1 Message Date
Evil Eye d680aa26e9 Disallow switch fallthrough 3 years ago
psi29a 782e0710af Merge branch 'OpenCS-preserve-blocked' into 'master'
OpenCS - Preserve "blocked" record flags when saving. #6288

Closes #6288

See merge request OpenMW/openmw!1052
3 years ago
Evil Eye 831055f878 Merge branch 'OpenCS-fix-modify' into 'master'
OpenCS - Re-implement the fix for Issue #6067.

See merge request OpenMW/openmw!1173
3 years ago
psi29a 18f5762a76 Merge branch 'master' into 'OpenCS-preserve-blocked'
# Conflicts:
#   CHANGELOG.md
3 years ago
Cédric Mocquillon d4e26746a3 Use recurse subdirectory iterator to iterate over the VFS without exposing internal details 3 years ago
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.
3 years ago
elsid a8c16071dc
Fix -Wreturn-local-addr warning
/home/elsid/dev/openmw/apps/opencs/model/world/actoradapter.cpp: In member function ‘const string& CSMWorld::ActorAdapter::ActorData::getPart(ESM::PartReferenceType) const’:
/home/elsid/dev/openmw/apps/opencs/model/world/actoradapter.cpp:142:20: error: returning reference to temporary [-Werror=return-local-addr]
  142 |             return "";
      |                    ^~
3 years ago
jvoisin d4e3575f1d Don't use `const` for objects returned by value.
This prevents the usage of std::move semantics,
and makes clang-tidy sad.
3 years ago
cc9cii 0a5571f19e Disable editing for blocked records in both table and dialogue edit widget. 3 years ago
cc9cii 2eb210f31a Partially undo commit 71be4cdd20 so that moved references retain the original refnum. This is consistent with vanilla CS's behaviour. 3 years ago
cc9cii b2bd97f283 A different implementation to MR 1051 to fix Issue #6067.
This MR doesn't delete the original record, but instead the original record is updated with the moved record when loading.

Issue #4752 is no longer addressed in this MR.
3 years ago
cc9cii 7264a10c07 Partially revert commit dab1a9e7fb 3 years ago
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.
3 years ago
psi29a 66f028c4a1 Merge branch 'correctcommandimplementation' into 'master'
Don't do storage in constructors of the commands

See merge request OpenMW/openmw!1126
3 years ago
psi29a fff35dcb03 Merge branch 'Ignore-empty-pgrd' into 'master'
Do not store empty PGRD records.  Should resolve Issue #6209.

See merge request OpenMW/openmw!1121
3 years ago
unelsson de3497d291 Fix undo-redo crash 3 years ago
unelsson 890ce1eefb Reverse action order for redo and undo 3 years ago
unelsson 0cfabd6f3b Move mapToSource back to constructor 3 years ago
unelsson b2fe591590 Don't do any storing in the constructor 3 years ago
unelsson 45549da0f5 For most commands, set mOld in redo, not in constructor 3 years ago
unelsson 7801f42005 Don't do mapToSource at executeModify 3 years ago
cc9cii bd3ef506cd Empty Pathgrid record is considered as the modder's intention to delete any existing record. 3 years ago
unelsson 298db2ef76 Initialize and check pointer. 3 years ago
unelsson f1d05a93bf Get index and model from proxy 3 years ago
psi29a b770373491 Merge branch 'OpenCS-enforce-str-length' into 'master'
OpenCS - Disallow entry of strings longer than the lengths allowed by the file format (#3066)

See merge request OpenMW/openmw!1088
3 years ago
glassmancody.info 09e03fde2e refactor and fix wobbly shores 3 years ago
cc9cii 8aee84c46e Disallow entry of strings longer than the lengths allowed by the file format.
It is possible to allow longer strings but that will require an extension in the omwaddon format as well as changes to the reader to handle that extension.  Such changes should be a separate MR.

(applied the patch in https://gitlab.com/OpenMW/openmw/-/issues/3066)
3 years ago
psi29a 9fa7521fc5 Merge branch 'OpenCS-no-charconv' into 'master'
OpenCS - Avoid the inclusion of charconv header

See merge request OpenMW/openmw!1087
3 years ago
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.
3 years ago
cc9cii bf06898a79 Retain the use of std::string_view in the function signature. 3 years ago
cc9cii 99e691fbe3 Avoid the inclusion of <charconv> header due to Ubuntu Bionic (18.04) which as gcc version less than 8.1
Partially reverts commit fd67ebde25
3 years ago
psi29a 4b48e62b64 Merge branch 'fixandclean' into 'master'
Fix opencs build and remove some clang warnings

See merge request OpenMW/openmw!1078
3 years ago
fredzio 1391194152 Remove unneeded return statement 3 years ago
fredzio 9ba459662d Remove unneeded std::move
[19/199] Building CXX object apps/opencs/CMakeFiles/openmw-cs.dir/model/world/commands.cpp.o
../../../apps/opencs/model/world/commands.cpp:298:12: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
    mOld = std::move(model.getRecord (id).clone());
           ^
../../../apps/opencs/model/world/commands.cpp:298:12: note: remove std::move call here
    mOld = std::move(model.getRecord (id).clone());
           ^~~~~~~~~~                            ~
../../../apps/opencs/model/world/commands.cpp:333:12: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
    mOld = std::move(model.getRecord (id).clone());
           ^
../../../apps/opencs/model/world/commands.cpp:333:12: note: remove std::move call here
    mOld = std::move(model.getRecord (id).clone());
           ^~~~~~~~~~                            ~
2 warnings generated.
3 years ago
fredzio 36e33b0cf2 Add missing override 3 years ago
fredzio bede1ea1ec Fix build 3 years ago
psi29a 15d278de55 Merge branch 'opt-out-compose' into 'master'
Make it possible to opt out of composing variables

Closes #6186

See merge request OpenMW/openmw!1076
3 years ago
cc9cii 67cad2c515 Fix `CSMWorld::InfoCollection::getTopicRange()` returning one too many. 3 years ago
AnyOldName3 4727ae4b3b Make it possible to opt out of composing variables 3 years ago
psi29a 141095b850 Merge branch 'OpenCS-loading-opt' into 'master'
OpenCS loading time improvements

See merge request OpenMW/openmw!1044
3 years ago
cc9cii 33dcd7585a OpenCS - Jump To Modified 3 years ago
cc9cii 3e466699c8 A better way to plug a potential memory leak in the event of an exception during push_back(). 3 years ago
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
4 years ago
cc9cii 725d689e8a Call push_back() if inserting to the end of the vector. It seems MSVC may be generating different code compared to insert().
(copied the changes from commit SHA-1: 257126ed69)
4 years ago
cc9cii 44a333b6db Don't attempt to open files yet to be created. 4 years ago
cc9cii 5c504e4d22 Convert the CellRef record index lookup maps to use integer keys rather than strings.
- Morrowind load over 300,000 references, so even small inefficiencies add up to longer loading times.
- std::map is used, but should try others, std::unordered_map or even std::vector

(copied the changes from commit SHA-1: 86945d1912)
4 years ago
cc9cii 10c6304a1f Fix typo from commit cfdbd0d471. 4 years ago
cc9cii fc2f68a465 Change the loader's top progress bar to show total number of records processed rather than the number of files.
(copied the changes from commit SHA-1: ff072441fd)
4 years ago
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)
4 years ago
cc9cii 66bda84240 Convert RefNum index map to use find().
(copied the changes from commits 68e16b6cee and 0de223c637)

NOTE: it is unclear how this change affects commit 61a4a0807b
4 years ago