1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-06 10:15:31 +00:00

Add NAME handling to GameSetting record

(cherry picked from commit b2f3ccb080)
This commit is contained in:
Stanislav Bas 2015-07-08 21:17:59 +03:00 committed by cc9cii
parent 711d787939
commit c4fd4be3ea

View file

@ -1,5 +1,7 @@
#include "loadgmst.hpp" #include "loadgmst.hpp"
#include "esmreader.hpp"
#include "esmwriter.hpp"
#include "defs.hpp" #include "defs.hpp"
namespace ESM namespace ESM
@ -8,11 +10,13 @@ namespace ESM
void GameSetting::load (ESMReader &esm) void GameSetting::load (ESMReader &esm)
{ {
mId = esm.getHNString("NAME");
mValue.read (esm, ESM::Variant::Format_Gmst); mValue.read (esm, ESM::Variant::Format_Gmst);
} }
void GameSetting::save (ESMWriter &esm) const void GameSetting::save (ESMWriter &esm) const
{ {
esm.writeHNCString("NAME", mId);
mValue.write (esm, ESM::Variant::Format_Gmst); mValue.write (esm, ESM::Variant::Format_Gmst);
} }