Evil Eye
5f406158b5
Zero initialize context index
2021-11-13 12:46:10 +01:00
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 .
2021-11-03 11:07:28 +01:00
jvoisin
7b32458aec
Improve a bit two esmreader logging call
2021-07-21 15:38:41 +02:00
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.
2021-07-11 21:43:40 +02:00
Evil Eye
080106e802
Merge branch 'inline' into 'master'
...
Inline a couple of methods in esmreader.cpp
See merge request OpenMW/openmw!945
2021-06-24 19:56:18 +00:00
jvoisin
aec3c74fa5
Sprinkle some [[noreturn]] where possible
2021-06-22 12:51:08 +02:00
jvoisin
6140c9c3fd
Don't catch exceptions in EsmReader::getExact
2021-06-21 20:06:45 +00:00
jvoisin
cff11fbca9
Inline a couple of methods in esmreader.cpp
2021-06-21 14:22:26 +02:00
psi29a
a6b695e15b
Merge branch 'esmcleanup' into 'master'
...
More ESM cleanup
See merge request OpenMW/openmw!903
2021-06-19 00:23:52 +00:00
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.
2021-06-15 17:57:14 +02:00
Dobrohotov Alexei
e68a454fd8
More ESM cleanup
2021-05-23 16:02:05 +03:00
Andrei Kortunov
f9d42ed396
Fix MSVC's C4267 warnings
2021-05-12 10:34:39 +04:00
psi29a
08e1a8e0fb
Merge branch 'esm_opti' into 'master'
...
Teensy optimisation for esmtool
See merge request OpenMW/openmw!826
2021-05-07 14:21:37 +00:00
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
2021-05-06 22:41:20 +02:00
Dobrohotov Alexei
57c372a50e
ESM code cleanup
2021-05-05 22:23:06 +03:00
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.
2021-03-16 19:58:02 +00:00
Bret Curtis
8c2f3ff007
clean up code; purge const_cast
2020-04-19 16:31:54 +02:00
Alexei Dobrohotov
2c956398c1
Actually fix bug 4938
2019-05-15 21:41:49 +03:00
Capostrophic
4b6fc5f720
Make sure the record hasn't ended in getHString hack (bug #4938 )
2019-03-30 20:11:22 +03:00
Adam Fandrejewski
75c204cdd8
Fix #4835 - undefined behavior - uninitialized mCtx
2019-02-23 13:35:25 +00:00
Andrei Kortunov
e06f0b797a
Replace all NULLs to nullptr
2018-10-09 10:21:12 +04:00
tri4ng1e
f5b7a230fc
ESMReader::close now clears mHeader
2018-05-05 14:40:58 +03:00
Roman Proskuryakov
d5dfa89060
Rewrite NAME_T into FIXED_STRING.
2016-05-07 23:27:33 +03:00
Stanislav Bas
4a16eba716
Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records
2015-07-22 19:26:00 +03:00
Stanislav Bas
ad353e6dd0
Refine DELE handling in ESM records. Add position-independent DELE search
2015-07-19 14:57:59 +03:00
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
2015-06-22 20:09:02 +02:00
scrawl
2ce269c0fc
Werewolf stats compatibility with old save files
2015-06-21 18:45:49 +02:00
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
2015-05-04 02:41:50 +02:00
Rohit Nirmal
997347b01e
Silence -Wreorder warnings.
2015-04-28 18:48:02 -05:00
scrawl
4e69e7cc0f
OpenMW compiles and runs w/o render window
2015-04-01 17:02:15 +02:00
scrawl
da690c91b3
Delete the old Ogre DataStream class
2015-02-22 14:19:00 +01:00
scrawl
8f0ab7d09f
ESM component no longer relies on Ogre DataStreams
2015-02-22 14:12:05 +01:00
scrawl
fec8cf91f5
Add exception handling to various uses of DataStream::read
2015-01-31 22:40:42 +01:00
scrawl
d473629dcd
Improve ESMReader error messages
2015-01-20 19:29:55 +01:00
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.
2015-01-20 00:42:25 +01:00
scrawl
fc663addfa
Fix null character issue in ESMReader::getString
2015-01-17 00:10:49 +01:00
scrawl
7252cb63a6
Fix cppcheck issues
2014-09-26 17:48:14 +02:00
Marc Zinnschlag
1cf1d49bc4
fix to content file reading error reporting in case of missing dependency
2013-12-16 11:39:24 +01:00
Marc Zinnschlag
674931a851
remove terminating 0 from strings read from ESM records
2013-12-06 14:24:14 +01:00
Marc Zinnschlag
35bf98a940
modified esm reader/writer to use UTF8 when no encoder is given
2013-11-19 13:46:24 +01:00
scrawl
7dc30a01cd
Some changes suggested by cppcheck
2013-07-31 18:46:32 +02:00
scrawl
8a3d3f954b
NPC/creature persistence flag
2013-05-16 18:50:26 +02:00
Marc Zinnschlag
75bd30844d
added optional format sub-record to tes3 record
2013-03-12 14:33:35 +01:00
Marc Zinnschlag
16570ce87b
moved header record struct to separate file
2013-03-12 09:16:03 +01:00
Marc Zinnschlag
731ac6a160
removed redundant copy of Header::Data
2013-03-12 08:30:51 +01:00
Marc Zinnschlag
9e68a420ae
restructuring tes3 record structs
2013-03-12 08:15:20 +01:00
Marc Zinnschlag
2e1a1fd11a
removing some remains of the removed GMST fixing feature
2013-03-11 16:30:47 +01:00
Marc Zinnschlag
64d517dd79
removed unused file type information from esm component
2013-03-11 14:42:49 +01:00
scrawl
6683e43efc
Removed commented code
2013-02-28 12:35:18 +01:00
scrawl
f75681d89b
Ignore ESX header version
2013-02-28 12:12:51 +01:00