1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-18 04:10:06 +00:00
OpenMW/components/esm3/loadgmst.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
800 B
C++
Raw Normal View History

#include "loadgmst.hpp"
#include "esmreader.hpp"
#include "esmwriter.hpp"
namespace ESM
{
void GameSetting::load(ESMReader& esm, bool& isDeleted)
{
isDeleted = false; // GameSetting record can't be deleted now (may be changed in the future)
mRecordFlags = esm.getRecordFlags();
mId = esm.getHNRefId("NAME");
mValue.read(esm, Variant::Format_Gmst);
}
void GameSetting::save(ESMWriter& esm, bool /*isDeleted*/) const
{
esm.writeHNCRefId("NAME", mId);
mValue.write(esm, Variant::Format_Gmst);
}
2013-02-08 08:58:19 +00:00
void GameSetting::blank()
{
2022-05-29 20:12:30 +00:00
mRecordFlags = 0;
mValue.setType(VT_None);
2013-02-08 08:58:19 +00:00
}
bool operator==(const GameSetting& left, const GameSetting& right)
{
2013-03-05 07:02:27 +00:00
return left.mValue == right.mValue;
2013-02-08 08:58:19 +00:00
}
}