make FNAM sub-record optional for all record types

actorid
Marc Zinnschlag 11 years ago
parent d2a41167d0
commit 300eb6f444

@ -11,13 +11,13 @@ namespace ESM
void Activator::load(ESMReader &esm)
{
mModel = esm.getHNString("MODL");
mName = esm.getHNString("FNAM");
mName = esm.getHNOString("FNAM");
mScript = esm.getHNOString("SCRI");
}
void Activator::save(ESMWriter &esm) const
{
esm.writeHNCString("MODL", mModel);
esm.writeHNCString("FNAM", mName);
esm.writeHNOCString("FNAM", mName);
esm.writeHNOCString("SCRI", mScript);
}

@ -34,7 +34,7 @@ unsigned int Armor::sRecordId = REC_ARMO;
void Armor::load(ESMReader &esm)
{
mModel = esm.getHNString("MODL");
mName = esm.getHNString("FNAM");
mName = esm.getHNOString("FNAM");
mScript = esm.getHNOString("SCRI");
esm.getHNT(mData, "AODT", 24);
mIcon = esm.getHNOString("ITEX");
@ -45,7 +45,7 @@ void Armor::load(ESMReader &esm)
void Armor::save(ESMWriter &esm) const
{
esm.writeHNCString("MODL", mModel);
esm.writeHNCString("FNAM", mName);
esm.writeHNOCString("FNAM", mName);
esm.writeHNOCString("SCRI", mScript);
esm.writeHNT("AODT", mData, 24);
esm.writeHNOCString("ITEX", mIcon);

@ -12,13 +12,13 @@ namespace ESM
void BodyPart::load(ESMReader &esm)
{
mModel = esm.getHNString("MODL");
mRace = esm.getHNString("FNAM");
mRace = esm.getHNOString("FNAM");
esm.getHNT(mData, "BYDT", 4);
}
void BodyPart::save(ESMWriter &esm) const
{
esm.writeHNCString("MODL", mModel);
esm.writeHNCString("FNAM", mRace);
esm.writeHNOCString("FNAM", mRace);
esm.writeHNT("BYDT", mData, 4);
}

@ -10,7 +10,7 @@ namespace ESM
void BirthSign::load(ESMReader &esm)
{
mName = esm.getHNString("FNAM");
mName = esm.getHNOString("FNAM");
mTexture = esm.getHNOString("TNAM");
mDescription = esm.getHNOString("DESC");
@ -19,7 +19,7 @@ void BirthSign::load(ESMReader &esm)
void BirthSign::save(ESMWriter &esm) const
{
esm.writeHNCString("FNAM", mName);
esm.writeHNOCString("FNAM", mName);
esm.writeHNOCString("TNAM", mTexture);
esm.writeHNOCString("DESC", mDescription);

@ -41,7 +41,7 @@ const char *Class::sGmstSpecializationIds[3] = {
void Class::load(ESMReader &esm)
{
mName = esm.getHNString("FNAM");
mName = esm.getHNOString("FNAM");
esm.getHNT(mData, "CLDT", 60);
if (mData.mIsPlayable > 1)
@ -51,7 +51,7 @@ void Class::load(ESMReader &esm)
}
void Class::save(ESMWriter &esm) const
{
esm.writeHNCString("FNAM", mName);
esm.writeHNOCString("FNAM", mName);
esm.writeHNT("CLDT", mData, 60);
esm.writeHNOString("DESC", mDescription);
}

@ -28,7 +28,7 @@ namespace ESM
void Faction::load(ESMReader &esm)
{
mName = esm.getHNString("FNAM");
mName = esm.getHNOString("FNAM");
// Read rank names. These are optional.
int i = 0;
@ -52,7 +52,7 @@ void Faction::load(ESMReader &esm)
}
void Faction::save(ESMWriter &esm) const
{
esm.writeHNCString("FNAM", mName);
esm.writeHNOCString("FNAM", mName);
for (int i = 0; i < 10; i++)
{

@ -11,7 +11,7 @@ namespace ESM
void Ingredient::load(ESMReader &esm)
{
mModel = esm.getHNString("MODL");
mName = esm.getHNString("FNAM");
mName = esm.getHNOString("FNAM");
esm.getHNT(mData, "IRDT", 56);
mScript = esm.getHNOString("SCRI");
mIcon = esm.getHNOString("ITEX");
@ -42,7 +42,7 @@ void Ingredient::load(ESMReader &esm)
void Ingredient::save(ESMWriter &esm) const
{
esm.writeHNCString("MODL", mModel);
esm.writeHNCString("FNAM", mName);
esm.writeHNOCString("FNAM", mName);
esm.writeHNT("IRDT", mData, 56);
esm.writeHNOCString("SCRI", mScript);
esm.writeHNOCString("ITEX", mIcon);

@ -11,7 +11,7 @@ namespace ESM
void Lockpick::load(ESMReader &esm)
{
mModel = esm.getHNString("MODL");
mName = esm.getHNString("FNAM");
mName = esm.getHNOString("FNAM");
esm.getHNT(mData, "LKDT", 16);
@ -22,7 +22,7 @@ void Lockpick::load(ESMReader &esm)
void Lockpick::save(ESMWriter &esm) const
{
esm.writeHNCString("MODL", mModel);
esm.writeHNCString("FNAM", mName);
esm.writeHNOCString("FNAM", mName);
esm.writeHNT("LKDT", mData, 16);
esm.writeHNOString("SCRI", mScript);

@ -11,7 +11,7 @@ namespace ESM
void Probe::load(ESMReader &esm)
{
mModel = esm.getHNString("MODL");
mName = esm.getHNString("FNAM");
mName = esm.getHNOString("FNAM");
esm.getHNT(mData, "PBDT", 16);
@ -22,7 +22,7 @@ void Probe::load(ESMReader &esm)
void Probe::save(ESMWriter &esm) const
{
esm.writeHNCString("MODL", mModel);
esm.writeHNCString("FNAM", mName);
esm.writeHNOCString("FNAM", mName);
esm.writeHNT("PBDT", mData, 16);
esm.writeHNOString("SCRI", mScript);

@ -20,14 +20,14 @@ namespace ESM
void Race::load(ESMReader &esm)
{
mName = esm.getHNString("FNAM");
mName = esm.getHNOString("FNAM");
esm.getHNT(mData, "RADT", 140);
mPowers.load(esm);
mDescription = esm.getHNOString("DESC");
}
void Race::save(ESMWriter &esm) const
{
esm.writeHNCString("FNAM", mName);
esm.writeHNOCString("FNAM", mName);
esm.writeHNT("RADT", mData, 140);
mPowers.save(esm);
esm.writeHNOString("DESC", mDescription);

@ -10,7 +10,7 @@ namespace ESM
void Region::load(ESMReader &esm)
{
mName = esm.getHNString("FNAM");
mName = esm.getHNOString("FNAM");
if (esm.getVer() == VER_12)
esm.getHNExact(&mData, sizeof(mData) - 2, "WEAT");
@ -32,7 +32,7 @@ void Region::load(ESMReader &esm)
}
void Region::save(ESMWriter &esm) const
{
esm.writeHNCString("FNAM", mName);
esm.writeHNOCString("FNAM", mName);
if (esm.getVersion() == VER_12)
esm.writeHNT("WEAT", mData, sizeof(mData) - 2);

@ -11,7 +11,7 @@ namespace ESM
void Repair::load(ESMReader &esm)
{
mModel = esm.getHNString("MODL");
mName = esm.getHNString("FNAM");
mName = esm.getHNOString("FNAM");
esm.getHNT(mData, "RIDT", 16);
@ -22,7 +22,7 @@ void Repair::load(ESMReader &esm)
void Repair::save(ESMWriter &esm) const
{
esm.writeHNCString("MODL", mModel);
esm.writeHNCString("FNAM", mName);
esm.writeHNOCString("FNAM", mName);
esm.writeHNT("RIDT", mData, 16);
esm.writeHNOString("SCRI", mScript);

@ -10,7 +10,7 @@ namespace ESM
void Sound::load(ESMReader &esm)
{
mSound = esm.getHNString("FNAM");
mSound = esm.getHNOString("FNAM");
esm.getHNT(mData, "DATA", 3);
/*
cout << "vol=" << (int)data.volume
@ -21,7 +21,7 @@ void Sound::load(ESMReader &esm)
}
void Sound::save(ESMWriter &esm) const
{
esm.writeHNCString("FNAM", mSound);
esm.writeHNOCString("FNAM", mSound);
esm.writeHNT("DATA", mData, 3);
}

Loading…
Cancel
Save