2011-04-08 13:58:21 +00:00
|
|
|
#include "loadltex.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"
|
2015-07-07 12:49:55 +00:00
|
|
|
#include "util.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 LandTexture::sRecordId = REC_LTEX;
|
2011-04-08 13:58:21 +00:00
|
|
|
|
|
|
|
void LandTexture::load(ESMReader &esm)
|
|
|
|
{
|
2015-07-07 12:49:55 +00:00
|
|
|
mIsDeleted = readDeleSubRecord(esm);
|
|
|
|
mId = esm.getHNString("NAME");
|
2012-09-17 07:37:50 +00:00
|
|
|
esm.getHNT(mIndex, "INTV");
|
|
|
|
mTexture = esm.getHNString("DATA");
|
2011-04-08 13:58:21 +00:00
|
|
|
}
|
2013-09-16 10:32:35 +00:00
|
|
|
void LandTexture::save(ESMWriter &esm) const
|
2012-04-06 19:04:30 +00:00
|
|
|
{
|
2015-07-07 12:49:55 +00:00
|
|
|
if (mIsDeleted)
|
|
|
|
{
|
|
|
|
writeDeleSubRecord(esm);
|
|
|
|
}
|
|
|
|
esm.writeHNCString("NAME", mId);
|
2012-09-17 07:37:50 +00:00
|
|
|
esm.writeHNT("INTV", mIndex);
|
|
|
|
esm.writeHNCString("DATA", mTexture);
|
2011-04-08 13:58:21 +00:00
|
|
|
}
|
|
|
|
|
2014-10-08 15:17:31 +00:00
|
|
|
void LandTexture::blank()
|
|
|
|
{
|
|
|
|
mTexture.clear();
|
|
|
|
mIndex = -1;
|
2015-07-07 12:49:55 +00:00
|
|
|
mIsDeleted = false;
|
2014-10-08 15:17:31 +00:00
|
|
|
}
|
|
|
|
|
2011-04-08 13:58:21 +00:00
|
|
|
}
|