Commit Graph

55 Commits (cd37504d0eb8e23a3c88b278c37bdd3f9520097f)

Author SHA1 Message Date
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.
3 years ago
jvoisin 7b32458aec Improve a bit two esmreader logging call 4 years ago
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.
4 years ago
Evil Eye 080106e802 Merge branch 'inline' into 'master'
Inline a couple of methods in esmreader.cpp

See merge request OpenMW/openmw!945
4 years ago
jvoisin aec3c74fa5 Sprinkle some [[noreturn]] where possible 4 years ago
jvoisin 6140c9c3fd Don't catch exceptions in EsmReader::getExact 4 years ago
jvoisin cff11fbca9 Inline a couple of methods in esmreader.cpp 4 years ago
psi29a a6b695e15b Merge branch 'esmcleanup' into 'master'
More ESM cleanup

See merge request OpenMW/openmw!903
4 years ago
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.
4 years ago
Dobrohotov Alexei e68a454fd8 More ESM cleanup 4 years ago
Andrei Kortunov f9d42ed396 Fix MSVC's C4267 warnings 4 years ago
psi29a 08e1a8e0fb Merge branch 'esm_opti' into 'master'
Teensy optimisation for esmtool

See merge request OpenMW/openmw!826
4 years ago
jvoisin e97e4d07dd Teensy optimisation for esmtool
- Use an unordered_set instead of a list to
  keep track of skipped records.
- Reduce the number of conditions when parsing 4-letters
  records by using a switch-case instead of cascading conditions.
- Add a const
4 years ago
Dobrohotov Alexei 57c372a50e ESM code cleanup 4 years ago
Gleb Mazovetskiy b9c2f6ea1a Minor cleanup: Remove `using namespace std`
I came across these while trying to figure why MSVC build triggers
https://developercommunity.visualstudio.com/t/error-c2872-byte-ambiguous-symbol/93889

In the end, the issue was not in openmw but in OSG, but it's good to
clean up here anyway.
4 years ago
Bret Curtis 8c2f3ff007 clean up code; purge const_cast 5 years ago
Alexei Dobrohotov 2c956398c1
Actually fix bug 4938 6 years ago
Capostrophic 4b6fc5f720 Make sure the record hasn't ended in getHString hack (bug #4938) 6 years ago
Adam Fandrejewski 75c204cdd8 Fix #4835 - undefined behavior - uninitialized mCtx 6 years ago
Andrei Kortunov e06f0b797a Replace all NULLs to nullptr 6 years ago
tri4ng1e f5b7a230fc
ESMReader::close now clears mHeader 7 years ago
Roman Proskuryakov d5dfa89060 Rewrite NAME_T into FIXED_STRING. 9 years ago
Stanislav Bas 4a16eba716 Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
Stanislav Bas ad353e6dd0 Refine DELE handling in ESM records. Add position-independent DELE search 10 years ago
scrawl a5670b5133 Merge branch 'master' of https://github.com/OpenMW/openmw into osg
Conflicts:
	apps/opencs/CMakeLists.txt
	apps/opencs/main.cpp
	apps/openmw/mwworld/player.hpp
10 years ago
scrawl 2ce269c0fc Werewolf stats compatibility with old save files 10 years ago
scrawl e1f4a7f647 Merge branch 'master' of https://github.com/OpenMW/openmw into osg
Conflicts:
	apps/openmw/engine.cpp
	apps/openmw/mwgui/mainmenu.cpp
	apps/openmw/mwgui/windowmanagerimp.cpp
	apps/openmw/mwinput/inputmanagerimp.cpp
	apps/openmw/mwrender/animation.cpp
	apps/openmw/mwrender/debugging.cpp
	apps/openmw/mwrender/npcanimation.cpp
	apps/openmw/mwrender/renderingmanager.cpp
	apps/openmw/mwrender/sky.cpp
	components/nif/nifkey.hpp
	components/nif/nifstream.hpp
	components/nifbullet/bulletnifloader.cpp
	components/nifogre/ogrenifloader.hpp
	libs/openengine/bullet/physic.cpp
	libs/openengine/gui/manager.cpp
10 years ago
Rohit Nirmal 997347b01e Silence -Wreorder warnings. 10 years ago
scrawl 4e69e7cc0f OpenMW compiles and runs w/o render window 10 years ago
scrawl da690c91b3 Delete the old Ogre DataStream class 10 years ago
scrawl 8f0ab7d09f ESM component no longer relies on Ogre DataStreams 10 years ago
scrawl fec8cf91f5 Add exception handling to various uses of DataStream::read 10 years ago
scrawl d473629dcd Improve ESMReader error messages 10 years ago
scrawl 9014dc48ee Don't require the object type id for reading references from savegames
This is redundant, since we can look it up from the RefID.
10 years ago
scrawl fc663addfa Fix null character issue in ESMReader::getString 10 years ago
scrawl 7252cb63a6 Fix cppcheck issues 10 years ago
Marc Zinnschlag 1cf1d49bc4 fix to content file reading error reporting in case of missing dependency 11 years ago
Marc Zinnschlag 674931a851 remove terminating 0 from strings read from ESM records 11 years ago
Marc Zinnschlag 35bf98a940 modified esm reader/writer to use UTF8 when no encoder is given 11 years ago
scrawl 7dc30a01cd Some changes suggested by cppcheck 12 years ago
scrawl 8a3d3f954b NPC/creature persistence flag 12 years ago
Marc Zinnschlag 75bd30844d added optional format sub-record to tes3 record 12 years ago
Marc Zinnschlag 16570ce87b moved header record struct to separate file 12 years ago
Marc Zinnschlag 731ac6a160 removed redundant copy of Header::Data 12 years ago
Marc Zinnschlag 9e68a420ae restructuring tes3 record structs 12 years ago
Marc Zinnschlag 2e1a1fd11a removing some remains of the removed GMST fixing feature 12 years ago
Marc Zinnschlag 64d517dd79 removed unused file type information from esm component 12 years ago
scrawl 6683e43efc Removed commented code 12 years ago
scrawl f75681d89b Ignore ESX header version 12 years ago
Marc Zinnschlag 25815ab8f7 Merge remote-tracking branch 'potatoesmaster/to_utf8-rewrite' 12 years ago