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