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

pull/22/head
Marc Zinnschlag 11 years ago
parent dc75627d53
commit 903e867c24

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

Loading…
Cancel
Save