2011-04-08 17:58:21 +04:00
|
|
|
#include "loaddoor.hpp"
|
|
|
|
|
2012-09-23 22:41:41 +04:00
|
|
|
#include "esmreader.hpp"
|
|
|
|
#include "esmwriter.hpp"
|
2013-09-24 13:17:28 +02:00
|
|
|
#include "defs.hpp"
|
2012-09-17 11:37:50 +04:00
|
|
|
|
2011-04-08 17:58:21 +04:00
|
|
|
namespace ESM
|
|
|
|
{
|
2013-09-24 13:17:28 +02:00
|
|
|
unsigned int Door::sRecordId = REC_DOOR;
|
2011-04-08 17:58:21 +04:00
|
|
|
|
|
|
|
void Door::load(ESMReader &esm)
|
|
|
|
{
|
2012-09-17 11:37:50 +04:00
|
|
|
mModel = esm.getHNString("MODL");
|
|
|
|
mName = esm.getHNOString("FNAM");
|
|
|
|
mScript = esm.getHNOString("SCRI");
|
|
|
|
mOpenSound = esm.getHNOString("SNAM");
|
|
|
|
mCloseSound = esm.getHNOString("ANAM");
|
2011-04-08 17:58:21 +04:00
|
|
|
}
|
2012-09-17 11:37:50 +04:00
|
|
|
|
2013-09-16 12:32:35 +02:00
|
|
|
void Door::save(ESMWriter &esm) const
|
2012-04-06 21:04:30 +02:00
|
|
|
{
|
2012-09-17 11:37:50 +04:00
|
|
|
esm.writeHNCString("MODL", mModel);
|
|
|
|
esm.writeHNOCString("FNAM", mName);
|
|
|
|
esm.writeHNOCString("SCRI", mScript);
|
|
|
|
esm.writeHNOCString("SNAM", mOpenSound);
|
|
|
|
esm.writeHNOCString("ANAM", mCloseSound);
|
2011-04-08 17:58:21 +04:00
|
|
|
}
|
|
|
|
|
2013-05-06 14:10:43 +02:00
|
|
|
void Door::blank()
|
|
|
|
{
|
|
|
|
mName.clear();
|
|
|
|
mModel.clear();
|
|
|
|
mScript.clear();
|
|
|
|
mOpenSound.clear();
|
|
|
|
mCloseSound.clear();
|
|
|
|
}
|
2011-04-08 17:58:21 +04:00
|
|
|
}
|