mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-29 04:06:40 +00:00
Do not use architecture dependent type size_t in esm format (Fixes #3633)
This commit is contained in:
parent
c326564e20
commit
505250f6ec
2 changed files with 14 additions and 2 deletions
|
@ -21,7 +21,18 @@ namespace ESM
|
||||||
anim.mGroup = esm.getHString();
|
anim.mGroup = esm.getHString();
|
||||||
esm.getHNOT(anim.mTime, "TIME");
|
esm.getHNOT(anim.mTime, "TIME");
|
||||||
esm.getHNOT(anim.mAbsolute, "ABST");
|
esm.getHNOT(anim.mAbsolute, "ABST");
|
||||||
esm.getHNT(anim.mLoopCount, "COUN");
|
|
||||||
|
esm.getSubNameIs("COUN");
|
||||||
|
// workaround bug in earlier version where size_t was used
|
||||||
|
esm.getSubHeader();
|
||||||
|
if (esm.getSubSize() == 8)
|
||||||
|
esm.getT(anim.mLoopCount);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
uint32_t loopcount;
|
||||||
|
esm.getT(loopcount);
|
||||||
|
anim.mLoopCount = (uint64_t) loopcount;
|
||||||
|
}
|
||||||
|
|
||||||
mScriptedAnims.push_back(anim);
|
mScriptedAnims.push_back(anim);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
namespace ESM
|
namespace ESM
|
||||||
{
|
{
|
||||||
|
@ -20,7 +21,7 @@ namespace ESM
|
||||||
std::string mGroup;
|
std::string mGroup;
|
||||||
float mTime;
|
float mTime;
|
||||||
bool mAbsolute;
|
bool mAbsolute;
|
||||||
size_t mLoopCount;
|
uint64_t mLoopCount;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::vector<ScriptedAnimation> ScriptedAnimations;
|
typedef std::vector<ScriptedAnimation> ScriptedAnimations;
|
||||||
|
|
Loading…
Reference in a new issue