2011-04-08 13:58:21 +00:00
|
|
|
#include "loadligh.hpp"
|
|
|
|
|
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
|
|
|
|
void Light::load(ESMReader &esm)
|
|
|
|
{
|
|
|
|
model = esm.getHNString("MODL");
|
|
|
|
name = esm.getHNOString("FNAM");
|
|
|
|
icon = esm.getHNOString("ITEX");
|
|
|
|
assert(sizeof(data) == 24);
|
|
|
|
esm.getHNT(data, "LHDT", 24);
|
|
|
|
script = esm.getHNOString("SCRI");
|
|
|
|
sound = esm.getHNOString("SNAM");
|
|
|
|
}
|
2012-04-06 19:04:30 +00:00
|
|
|
void Light::save(ESMWriter &esm)
|
|
|
|
{
|
2012-04-13 22:14:04 +00:00
|
|
|
esm.writeHNCString("MODL", model);
|
|
|
|
esm.writeHNOCString("FNAM", name);
|
|
|
|
esm.writeHNOCString("ITEX", icon);
|
2012-04-06 19:04:30 +00:00
|
|
|
esm.writeHNT("LHDT", data, 24);
|
2012-04-13 22:14:04 +00:00
|
|
|
esm.writeHNOCString("SCRI", script);
|
|
|
|
esm.writeHNOCString("SNAM", sound);
|
2012-04-06 19:04:30 +00:00
|
|
|
}
|
2011-04-08 13:58:21 +00:00
|
|
|
|
|
|
|
}
|