1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00
OpenMW/components/esm/loadrace.cpp

34 lines
665 B
C++
Raw Normal View History

#include "loadrace.hpp"
#include "esmreader.hpp"
#include "esmwriter.hpp"
2012-09-17 11:37:50 +04:00
namespace ESM
{
2013-04-04 13:50:36 +02:00
int Race::MaleFemale::getValue (bool male) const
{
return male ? mMale : mFemale;
}
int Race::MaleFemaleF::getValue (bool male) const
{
return male ? mMale : mFemale;
}
void Race::load(ESMReader &esm)
{
2012-09-17 11:37:50 +04:00
mName = esm.getHNString("FNAM");
esm.getHNT(mData, "RADT", 140);
mPowers.load(esm);
mDescription = esm.getHNOString("DESC");
}
void Race::save(ESMWriter &esm)
{
2012-09-17 11:37:50 +04:00
esm.writeHNCString("FNAM", mName);
esm.writeHNT("RADT", mData, 140);
mPowers.save(esm);
esm.writeHNOString("DESC", mDescription);
}
}