1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-12 21:39:26 +00:00
OpenMW/components/esm/loadingr.cpp

26 lines
557 B
C++
Raw Normal View History

#include "loadingr.hpp"
namespace ESM
{
void Ingredient::load(ESMReader &esm)
{
model = esm.getHNString("MODL");
name = esm.getHNString("FNAM");
esm.getHNT(data, "IRDT", 56);
script = esm.getHNOString("SCRI");
icon = esm.getHNOString("ITEX");
}
void Ingredient::save(ESMWriter &esm)
{
esm.writeHNString("MODL", model);
esm.writeHNString("FNAM", name);
esm.writeHNT("IRDT", data, 56);
if (!script.empty())
esm.writeHNString("SCRI", script);
if (!icon.empty())
esm.writeHNString("ITEX", script);
}
}