1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 22:23:51 +00:00

change to TES3 record (moved format field to the top)

This commit is contained in:
Marc Zinnschlag 2013-11-19 13:44:18 +01:00
parent dc75627d53
commit 903e867c24

View file

@ -19,8 +19,6 @@ void ESM::Header::blank()
void ESM::Header::load (ESMReader &esm) void ESM::Header::load (ESMReader &esm)
{ {
esm.getHNT (mData, "HEDR", 300);
if (esm.isNextSub ("FORM")) if (esm.isNextSub ("FORM"))
{ {
esm.getHT (mFormat); esm.getHT (mFormat);
@ -30,6 +28,8 @@ void ESM::Header::load (ESMReader &esm)
else else
mFormat = 0; mFormat = 0;
esm.getHNT (mData, "HEDR", 300);
while (esm.isNextSub ("MAST")) while (esm.isNextSub ("MAST"))
{ {
MasterData m; MasterData m;
@ -41,11 +41,11 @@ void ESM::Header::load (ESMReader &esm)
void ESM::Header::save (ESMWriter &esm) void ESM::Header::save (ESMWriter &esm)
{ {
esm.writeHNT ("HEDR", mData, 300);
if (mFormat>0) if (mFormat>0)
esm.writeHNT ("FORM", mFormat); esm.writeHNT ("FORM", mFormat);
esm.writeHNT ("HEDR", mData, 300);
for (std::vector<Header::MasterData>::iterator iter = mMaster.begin(); for (std::vector<Header::MasterData>::iterator iter = mMaster.begin();
iter != mMaster.end(); ++iter) iter != mMaster.end(); ++iter)
{ {