mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 15:29:55 +00:00
Fix regressions in ESM4 reader caused by !2902
This commit is contained in:
parent
675dfb9725
commit
7b6f0cefb9
6 changed files with 13 additions and 13 deletions
|
@ -213,7 +213,7 @@ void ESM4::Land::load(ESM4::Reader& reader)
|
|||
bool missing = false;
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
if (mTextures[i].base.formId.isZeroOrUnset())
|
||||
if (mTextures[i].base.formId == 0)
|
||||
{
|
||||
// std::cout << "ESM4::LAND " << ESM4::formIdToString(mFormId) << " missing base, quad " << i << std::endl;
|
||||
// std::cout << "layers " << mTextures[i].layers.size() << std::endl;
|
||||
|
|
|
@ -74,7 +74,7 @@ namespace ESM4
|
|||
|
||||
struct BTXT
|
||||
{
|
||||
FormId formId;
|
||||
FormId32 formId;
|
||||
std::uint8_t quadrant; // 0 = bottom left, 1 = bottom right, 2 = top left, 3 = top right
|
||||
std::uint8_t unknown1;
|
||||
std::uint16_t unknown2;
|
||||
|
@ -82,7 +82,7 @@ namespace ESM4
|
|||
|
||||
struct ATXT
|
||||
{
|
||||
FormId formId;
|
||||
FormId32 formId;
|
||||
std::uint8_t quadrant; // 0 = bottom left, 1 = bottom right, 2 = top left, 3 = top right
|
||||
std::uint8_t unknown;
|
||||
std::uint16_t layerIndex; // texture layer, 0..7
|
||||
|
|
|
@ -109,7 +109,7 @@ void ESM4::Pathgrid::load(ESM4::Reader& reader)
|
|||
case ESM4::SUB_PGRL:
|
||||
{
|
||||
static PGRL objLink;
|
||||
reader.get(objLink.object);
|
||||
reader.getFormId(objLink.object);
|
||||
// object linkedNode
|
||||
std::size_t numNodes = (subHdr.dataSize - sizeof(int32_t)) / sizeof(int32_t);
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ void ESM4::Quest::load(ESM4::Reader& reader)
|
|||
break;
|
||||
}
|
||||
case ESM4::SUB_SCRI:
|
||||
reader.get(mQuestScript);
|
||||
reader.getFormId(mQuestScript);
|
||||
break;
|
||||
case ESM4::SUB_CTDA: // FIXME: how to detect if 1st/2nd param is a formid?
|
||||
{
|
||||
|
|
|
@ -223,8 +223,8 @@ void ESM4::Race::load(ESM4::Reader& reader)
|
|||
}
|
||||
case ESM4::SUB_DNAM:
|
||||
{
|
||||
reader.get(mDefaultHair[0]); // male
|
||||
reader.get(mDefaultHair[1]); // female
|
||||
reader.getFormId(mDefaultHair[0]); // male
|
||||
reader.getFormId(mDefaultHair[1]); // female
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -421,7 +421,7 @@ void ESM4::Race::load(ESM4::Reader& reader)
|
|||
std::size_t numHairChoices = subHdr.dataSize / sizeof(FormId32);
|
||||
mHairChoices.resize(numHairChoices);
|
||||
for (unsigned int i = 0; i < numHairChoices; ++i)
|
||||
reader.get(mHairChoices.at(i));
|
||||
reader.getFormId(mHairChoices.at(i));
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -430,7 +430,7 @@ void ESM4::Race::load(ESM4::Reader& reader)
|
|||
std::size_t numEyeChoices = subHdr.dataSize / sizeof(FormId32);
|
||||
mEyeChoices.resize(numEyeChoices);
|
||||
for (unsigned int i = 0; i < numEyeChoices; ++i)
|
||||
reader.get(mEyeChoices.at(i));
|
||||
reader.getFormId(mEyeChoices.at(i));
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -495,7 +495,7 @@ void ESM4::Race::load(ESM4::Reader& reader)
|
|||
{
|
||||
FormId race;
|
||||
std::int32_t adjustment;
|
||||
reader.get(race);
|
||||
reader.getFormId(race);
|
||||
reader.get(adjustment);
|
||||
mDisposition[race] = adjustment;
|
||||
|
||||
|
@ -505,8 +505,8 @@ void ESM4::Race::load(ESM4::Reader& reader)
|
|||
{
|
||||
if (subHdr.dataSize == 8) // TES4
|
||||
{
|
||||
reader.get(mVNAM[0]); // For TES4 seems to be 2 race formids
|
||||
reader.get(mVNAM[1]);
|
||||
reader.getFormId(mVNAM[0]); // For TES4 seems to be 2 race formids
|
||||
reader.getFormId(mVNAM[1]);
|
||||
}
|
||||
else if (subHdr.dataSize == 4) // TES5
|
||||
{
|
||||
|
|
|
@ -79,7 +79,7 @@ void ESM4::World::load(ESM4::Reader& reader)
|
|||
reader.getZString(mMapFile);
|
||||
break; // map filename, Oblivion only?
|
||||
case ESM4::SUB_CNAM:
|
||||
reader.get(mClimate);
|
||||
reader.getFormId(mClimate);
|
||||
break;
|
||||
case ESM4::SUB_NAM2:
|
||||
reader.getFormId(mWater);
|
||||
|
|
Loading…
Reference in a new issue