openmw-tes3coop/components/esm/loadmisc.cpp
2012-09-17 11:37:50 +04:00

26 lines
576 B
C++

#include "loadmisc.hpp"
#include "esm_reader.hpp"
#include "esm_writer.hpp"
namespace ESM
{
void Miscellaneous::load(ESMReader &esm)
{
mModel = esm.getHNString("MODL");
mName = esm.getHNOString("FNAM");
esm.getHNT(mData, "MCDT", 12);
mScript = esm.getHNOString("SCRI");
mIcon = esm.getHNOString("ITEX");
}
void Miscellaneous::save(ESMWriter &esm)
{
esm.writeHNCString("MODL", mModel);
esm.writeHNOCString("FNAM", mName);
esm.writeHNT("MCDT", mData, 12);
esm.writeHNOCString("SCRI", mScript);
esm.writeHNOCString("ITEX", mIcon);
}
}