2011-04-08 13:58:21 +00:00
|
|
|
#include "loadsndg.hpp"
|
|
|
|
|
2012-09-23 18:41:41 +00:00
|
|
|
#include "esmreader.hpp"
|
|
|
|
#include "esmwriter.hpp"
|
2013-09-24 11:17:28 +00:00
|
|
|
#include "defs.hpp"
|
2012-09-17 07:37:50 +00:00
|
|
|
|
2011-04-08 13:58:21 +00:00
|
|
|
namespace ESM
|
|
|
|
{
|
2013-09-24 11:17:28 +00:00
|
|
|
unsigned int SoundGenerator::sRecordId = REC_SNDG;
|
2011-04-08 13:58:21 +00:00
|
|
|
|
|
|
|
void SoundGenerator::load(ESMReader &esm)
|
|
|
|
{
|
2012-09-17 07:37:50 +00:00
|
|
|
esm.getHNT(mType, "DATA", 4);
|
2011-04-08 13:58:21 +00:00
|
|
|
|
2012-09-17 07:37:50 +00:00
|
|
|
mCreature = esm.getHNOString("CNAM");
|
|
|
|
mSound = esm.getHNOString("SNAM");
|
2011-04-08 13:58:21 +00:00
|
|
|
}
|
2013-09-16 10:32:35 +00:00
|
|
|
void SoundGenerator::save(ESMWriter &esm) const
|
2012-04-06 19:04:30 +00:00
|
|
|
{
|
2012-09-17 07:37:50 +00:00
|
|
|
esm.writeHNT("DATA", mType, 4);
|
2012-09-20 16:33:30 +00:00
|
|
|
esm.writeHNOCString("CNAM", mCreature);
|
|
|
|
esm.writeHNOCString("SNAM", mSound);
|
2011-04-08 13:58:21 +00:00
|
|
|
}
|
|
|
|
|
2014-09-23 10:18:18 +00:00
|
|
|
void SoundGenerator::blank()
|
|
|
|
{
|
|
|
|
mType = LeftFoot;
|
|
|
|
mCreature.clear();
|
|
|
|
mSound.clear();
|
|
|
|
}
|
2011-04-08 13:58:21 +00:00
|
|
|
}
|