1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00
OpenMW/components/esm3/custommarkerstate.cpp
florent.teppe 3f678c3b0a Dest Door and teleport use ESM::RefId
This changes a lot of files as a consequence.
Still buggy, moving to exterior doesn't bring to the right place yet
coc "seyda neen" doesn't work. SO I broke somehting when fetching a cell from a name
2023-04-03 14:16:03 +02:00

28 lines
586 B
C++

#include "custommarkerstate.hpp"
#include "esmreader.hpp"
#include "esmwriter.hpp"
namespace ESM
{
void CustomMarker::save(ESMWriter& esm) const
{
esm.writeHNT("POSX", mWorldX);
esm.writeHNT("POSY", mWorldY);
mCellId.save(esm);
if (!mNote.empty())
esm.writeHNString("NOTE", mNote);
}
void CustomMarker::load(ESMReader& esm)
{
esm.getHNT(mWorldX, "POSX");
esm.getHNT(mWorldY, "POSY");
mCellId.load(esm);
mCell = mCellId.getCellRefId();
mNote = esm.getHNOString("NOTE");
}
}