1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00
OpenMW/components/esm3/custommarkerstate.cpp

27 lines
557 B
C++
Raw Normal View History

#include "custommarkerstate.hpp"
#include "esmreader.hpp"
2022-09-22 18:26:05 +00:00
#include "esmwriter.hpp"
namespace ESM
{
2022-09-22 18:26:05 +00:00
void CustomMarker::save(ESMWriter& esm) const
{
esm.writeHNT("POSX", mWorldX);
esm.writeHNT("POSY", mWorldY);
2023-02-21 22:26:40 +00:00
esm.writeCellId(mCell);
2022-09-22 18:26:05 +00:00
if (!mNote.empty())
esm.writeHNString("NOTE", mNote);
}
2022-09-22 18:26:05 +00:00
void CustomMarker::load(ESMReader& esm)
{
esm.getHNT(mWorldX, "POSX");
esm.getHNT(mWorldY, "POSY");
2023-02-21 22:26:40 +00:00
mCell = esm.getCellId();
2022-09-22 18:26:05 +00:00
mNote = esm.getHNOString("NOTE");
}
}