2011-04-08 13:58:21 +00:00
|
|
|
#include "loadsoun.hpp"
|
|
|
|
|
2012-09-23 18:41:41 +00:00
|
|
|
#include "esmreader.hpp"
|
|
|
|
#include "esmwriter.hpp"
|
2012-09-17 07:37:50 +00:00
|
|
|
|
2011-04-08 13:58:21 +00:00
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
|
|
|
|
void Sound::load(ESMReader &esm)
|
|
|
|
{
|
2012-09-17 07:37:50 +00:00
|
|
|
mSound = esm.getHNString("FNAM");
|
|
|
|
esm.getHNT(mData, "DATA", 3);
|
2011-04-08 13:58:21 +00:00
|
|
|
/*
|
|
|
|
cout << "vol=" << (int)data.volume
|
|
|
|
<< " min=" << (int)data.minRange
|
|
|
|
<< " max=" << (int)data.maxRange
|
|
|
|
<< endl;
|
|
|
|
*/
|
|
|
|
}
|
2012-04-06 19:04:30 +00:00
|
|
|
void Sound::save(ESMWriter &esm)
|
|
|
|
{
|
2012-09-17 07:37:50 +00:00
|
|
|
esm.writeHNCString("FNAM", mSound);
|
|
|
|
esm.writeHNT("DATA", mData, 3);
|
2012-04-06 19:04:30 +00:00
|
|
|
}
|
2011-04-08 13:58:21 +00:00
|
|
|
|
|
|
|
}
|