mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
d1fb854521
esm typo esm typo
36 lines
883 B
C++
36 lines
883 B
C++
#include "loadgmst.hpp"
|
|
|
|
#include "esmreader.hpp"
|
|
#include "esmwriter.hpp"
|
|
#include "components/esm/defs.hpp"
|
|
|
|
namespace ESM
|
|
{
|
|
unsigned int GameSetting::sRecordId = REC_GMST;
|
|
|
|
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.getHNString("NAME");
|
|
mValue.read (esm, ESM::Variant::Format_Gmst);
|
|
}
|
|
|
|
void GameSetting::save (ESMWriter &esm, bool /*isDeleted*/) const
|
|
{
|
|
esm.writeHNCString("NAME", mId);
|
|
mValue.write (esm, ESM::Variant::Format_Gmst);
|
|
}
|
|
|
|
void GameSetting::blank()
|
|
{
|
|
mValue.setType (ESM::VT_None);
|
|
}
|
|
|
|
bool operator== (const GameSetting& left, const GameSetting& right)
|
|
{
|
|
return left.mValue==right.mValue;
|
|
}
|
|
}
|