mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
67bd6cd708
git ls-files -z | xargs -0 sed -i '1{/^$/d}'
28 lines
550 B
C++
28 lines
550 B
C++
#include "cellstate.hpp"
|
|
|
|
#include "esmreader.hpp"
|
|
#include "esmwriter.hpp"
|
|
|
|
void ESM::CellState::load (ESMReader &esm)
|
|
{
|
|
mWaterLevel = 0;
|
|
esm.getHNOT (mWaterLevel, "WLVL");
|
|
|
|
mHasFogOfWar = false;
|
|
esm.getHNOT (mHasFogOfWar, "HFOW");
|
|
|
|
mLastRespawn.mDay = 0;
|
|
mLastRespawn.mHour = 0;
|
|
esm.getHNOT (mLastRespawn, "RESP");
|
|
}
|
|
|
|
void ESM::CellState::save (ESMWriter &esm) const
|
|
{
|
|
if (!mId.mPaged)
|
|
esm.writeHNT ("WLVL", mWaterLevel);
|
|
|
|
esm.writeHNT ("HFOW", mHasFogOfWar);
|
|
|
|
esm.writeHNT ("RESP", mLastRespawn);
|
|
}
|