1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00

some fixes to record structs

This commit is contained in:
Marc Zinnschlag 2014-01-16 12:02:45 +01:00
parent 8c5f313546
commit d8d4f1a15e
4 changed files with 8 additions and 5 deletions

View File

@ -71,9 +71,12 @@ void ESM::CellRef::load (ESMReader& esm, bool wideRefNum)
esm.getHT (mNam0); esm.getHT (mNam0);
} }
void ESM::CellRef::save(ESMWriter &esm) const void ESM::CellRef::save (ESMWriter &esm, bool wideRefNum) const
{ {
esm.writeHNT("FRMR", mRefNum.mIndex); if (wideRefNum)
esm.writeHNT ("FRMR", mRefNum, 8);
else
esm.writeHNT ("FRMR", mRefNum.mIndex, 4);
esm.writeHNCString("NAME", mRefID); esm.writeHNCString("NAME", mRefID);

View File

@ -89,7 +89,7 @@ namespace ESM
void load (ESMReader& esm, bool wideRefNum = false); void load (ESMReader& esm, bool wideRefNum = false);
void save(ESMWriter &esm) const; void save(ESMWriter &esm, bool wideRefNum = false) const;
void blank(); void blank();
}; };

View File

@ -230,7 +230,7 @@ bool Cell::getNextMVRF(ESMReader &esm, MovedCellRef &mref)
{ {
CellId id; CellId id;
id.mPaged = (mData.mFlags & Interior); id.mPaged = !(mData.mFlags & Interior);
if (id.mPaged) if (id.mPaged)
{ {

View File

@ -27,7 +27,7 @@ void ESM::ObjectState::load (ESMReader &esm)
void ESM::ObjectState::save (ESMWriter &esm) const void ESM::ObjectState::save (ESMWriter &esm) const
{ {
mRef.save (esm); mRef.save (esm, true);
if (mHasLocals) if (mHasLocals)
{ {