Skip ESM4 destructible data for all relevant records

macos_ci_fix
Alexei Kotov 1 year ago
parent 271c14030a
commit 3118800dbd

@ -73,12 +73,15 @@ void ESM4::Activator::load(ESM4::Reader& reader)
break; // FONV
case ESM4::SUB_MODT:
case ESM4::SUB_MODS:
case ESM4::SUB_DAMC: // Destructible
case ESM4::SUB_DEST:
case ESM4::SUB_DMDC:
case ESM4::SUB_DMDL:
case ESM4::SUB_DMDS:
case ESM4::SUB_DMDT:
case ESM4::SUB_DMDS:
case ESM4::SUB_DSTA:
case ESM4::SUB_DSTD:
case ESM4::SUB_DSTF:
case ESM4::SUB_DSTF: // Destructible end
case ESM4::SUB_FNAM:
case ESM4::SUB_KNAM:
case ESM4::SUB_KSIZ:

@ -98,8 +98,7 @@ void ESM4::Potion::load(ESM4::Reader& reader)
case ESM4::SUB_OBND:
case ESM4::SUB_ETYP: // FO3
case ESM4::SUB_DESC:
// Destructible
case ESM4::SUB_DAMC:
case ESM4::SUB_DAMC: // Destructible
case ESM4::SUB_DEST:
case ESM4::SUB_DMDC:
case ESM4::SUB_DMDL:
@ -107,7 +106,7 @@ void ESM4::Potion::load(ESM4::Reader& reader)
case ESM4::SUB_DMDS:
case ESM4::SUB_DSTA:
case ESM4::SUB_DSTD:
case ESM4::SUB_DSTF:
case ESM4::SUB_DSTF: // Destructible end
// FO4
case ESM4::SUB_DNAM:
case ESM4::SUB_PTRN:

@ -137,6 +137,15 @@ void ESM4::Ammunition::load(ESM4::Reader& reader)
case ESM4::SUB_OBND:
case ESM4::SUB_KSIZ:
case ESM4::SUB_KWDA:
case ESM4::SUB_DAMC: // Destructible
case ESM4::SUB_DEST:
case ESM4::SUB_DMDC:
case ESM4::SUB_DMDL:
case ESM4::SUB_DMDT:
case ESM4::SUB_DMDS:
case ESM4::SUB_DSTA:
case ESM4::SUB_DSTD:
case ESM4::SUB_DSTF: // Destructible end
reader.skipSubRecordData();
break;
default:

@ -191,6 +191,15 @@ void ESM4::Armor::load(ESM4::Reader& reader)
case ESM4::SUB_MO3S: // FO3
case ESM4::SUB_BNAM: // FONV
case ESM4::SUB_SNAM: // FONV
case ESM4::SUB_DAMC: // Destructible
case ESM4::SUB_DEST:
case ESM4::SUB_DMDC:
case ESM4::SUB_DMDL:
case ESM4::SUB_DMDT:
case ESM4::SUB_DMDS:
case ESM4::SUB_DSTA:
case ESM4::SUB_DSTD:
case ESM4::SUB_DSTF: // Destructible end
reader.skipSubRecordData();
break;
default:

@ -102,6 +102,15 @@ void ESM4::Book::load(ESM4::Reader& reader)
case ESM4::SUB_CNAM:
case ESM4::SUB_INAM:
case ESM4::SUB_VMAD:
case ESM4::SUB_DAMC: // Destructible
case ESM4::SUB_DEST:
case ESM4::SUB_DMDC:
case ESM4::SUB_DMDL:
case ESM4::SUB_DMDT:
case ESM4::SUB_DMDS:
case ESM4::SUB_DSTA:
case ESM4::SUB_DSTD:
case ESM4::SUB_DSTF: // Destructible end
reader.skipSubRecordData();
break;
default:

@ -80,11 +80,15 @@ void ESM4::Container::load(ESM4::Reader& reader)
case ESM4::SUB_OBND: // TES5 only
case ESM4::SUB_COCT: // TES5 only
case ESM4::SUB_COED: // TES5 only
case ESM4::SUB_DEST: // FONV
case ESM4::SUB_DSTD: // FONV
case ESM4::SUB_DSTF: // FONV
case ESM4::SUB_DMDL: // FONV
case ESM4::SUB_DMDT: // FONV
case ESM4::SUB_DAMC: // Destructible
case ESM4::SUB_DEST:
case ESM4::SUB_DMDC:
case ESM4::SUB_DMDL:
case ESM4::SUB_DMDT:
case ESM4::SUB_DMDS:
case ESM4::SUB_DSTA:
case ESM4::SUB_DSTD:
case ESM4::SUB_DSTF: // Destructible end
case ESM4::SUB_RNAM: // FONV
case ESM4::SUB_PRPS: // FO4
reader.skipSubRecordData();

@ -75,11 +75,15 @@ void ESM4::Door::load(ESM4::Reader& reader)
case ESM4::SUB_MODS:
case ESM4::SUB_OBND:
case ESM4::SUB_VMAD:
case ESM4::SUB_DEST: // FO3
case ESM4::SUB_DSTD: // FO3
case ESM4::SUB_DSTF: // FO3
case ESM4::SUB_DMDL: // FO3
case ESM4::SUB_DMDT: // FO3
case ESM4::SUB_DAMC: // Destructible
case ESM4::SUB_DEST:
case ESM4::SUB_DMDC:
case ESM4::SUB_DMDL:
case ESM4::SUB_DMDT:
case ESM4::SUB_DMDS:
case ESM4::SUB_DSTA:
case ESM4::SUB_DSTD:
case ESM4::SUB_DSTF: // Destructible end
reader.skipSubRecordData();
break;
default:

@ -72,6 +72,15 @@ void ESM4::Flora::load(ESM4::Reader& reader)
case ESM4::SUB_PNAM:
case ESM4::SUB_RNAM:
case ESM4::SUB_VMAD:
case ESM4::SUB_DAMC: // Destructible
case ESM4::SUB_DEST:
case ESM4::SUB_DMDC:
case ESM4::SUB_DMDL:
case ESM4::SUB_DMDT:
case ESM4::SUB_DMDS:
case ESM4::SUB_DSTA:
case ESM4::SUB_DSTD:
case ESM4::SUB_DSTF: // Destructible end
case ESM4::SUB_PRPS:
reader.skipSubRecordData();
break;

@ -60,9 +60,15 @@ void ESM4::Furniture::load(ESM4::Reader& reader)
reader.get(mBoundRadius);
break;
case ESM4::SUB_MODT:
case ESM4::SUB_DAMC: // Destructible
case ESM4::SUB_DEST:
case ESM4::SUB_DMDC:
case ESM4::SUB_DMDL:
case ESM4::SUB_DMDT:
case ESM4::SUB_DMDS:
case ESM4::SUB_DSTA:
case ESM4::SUB_DSTD:
case ESM4::SUB_DSTF:
case ESM4::SUB_DSTF: // Destructible end
case ESM4::SUB_ENAM:
case ESM4::SUB_FNAM:
case ESM4::SUB_FNMK:

@ -106,6 +106,15 @@ void ESM4::Ingredient::load(ESM4::Reader& reader)
case ESM4::SUB_YNAM:
case ESM4::SUB_ZNAM:
case ESM4::SUB_ETYP: // FO3
case ESM4::SUB_DAMC: // Destructible
case ESM4::SUB_DEST:
case ESM4::SUB_DMDC:
case ESM4::SUB_DMDL:
case ESM4::SUB_DMDT:
case ESM4::SUB_DMDS:
case ESM4::SUB_DSTA:
case ESM4::SUB_DSTD:
case ESM4::SUB_DSTF: // Destructible end
{
reader.skipSubRecordData();
break;

@ -76,6 +76,15 @@ void ESM4::Key::load(ESM4::Reader& reader)
case ESM4::SUB_KWDA:
case ESM4::SUB_OBND:
case ESM4::SUB_VMAD:
case ESM4::SUB_DAMC: // Destructible
case ESM4::SUB_DEST:
case ESM4::SUB_DMDC:
case ESM4::SUB_DMDL:
case ESM4::SUB_DMDT:
case ESM4::SUB_DMDS:
case ESM4::SUB_DSTA:
case ESM4::SUB_DSTD:
case ESM4::SUB_DSTF: // Destructible end
reader.skipSubRecordData();
break;
default:

@ -102,12 +102,15 @@ void ESM4::Light::load(ESM4::Reader& reader)
case ESM4::SUB_MODT:
case ESM4::SUB_OBND:
case ESM4::SUB_VMAD: // Dragonborn only?
case ESM4::SUB_DEST: // Destruction data start
case ESM4::SUB_DSTD:
case ESM4::SUB_DAMC: // Destructible
case ESM4::SUB_DEST:
case ESM4::SUB_DMDC:
case ESM4::SUB_DMDL:
case ESM4::SUB_DMDT:
case ESM4::SUB_DMDS:
case ESM4::SUB_DSTF: // Destruction data end
case ESM4::SUB_DSTA:
case ESM4::SUB_DSTD:
case ESM4::SUB_DSTF: // Destructible end
case ESM4::SUB_PRPS:
reader.skipSubRecordData();
break;

@ -78,12 +78,15 @@ void ESM4::MiscItem::load(ESM4::Reader& reader)
case ESM4::SUB_OBND:
case ESM4::SUB_VMAD:
case ESM4::SUB_RNAM: // FONV
case ESM4::SUB_DEST: // Destruction data start
case ESM4::SUB_DSTD:
case ESM4::SUB_DAMC: // Destructible
case ESM4::SUB_DEST:
case ESM4::SUB_DMDC:
case ESM4::SUB_DMDL:
case ESM4::SUB_DMDT:
case ESM4::SUB_DMDS:
case ESM4::SUB_DSTF: // Destruction data end
case ESM4::SUB_DSTA:
case ESM4::SUB_DSTD:
case ESM4::SUB_DSTF: // Destructible end
reader.skipSubRecordData();
break;
default:

@ -53,13 +53,17 @@ void ESM4::MovableStatic::load(ESM4::Reader& reader)
case ESM4::SUB_SNAM:
reader.getFormId(mLoopingSound);
break;
case ESM4::SUB_DEST: // destruction data
case ESM4::SUB_OBND: // object bounds
case ESM4::SUB_MODT: // model texture data
case ESM4::SUB_DAMC: // Destructible
case ESM4::SUB_DEST:
case ESM4::SUB_DMDC:
case ESM4::SUB_DMDL:
case ESM4::SUB_DMDT:
case ESM4::SUB_DMDS:
case ESM4::SUB_DSTA:
case ESM4::SUB_DSTD:
case ESM4::SUB_DSTF:
case ESM4::SUB_DSTF: // Destructible end
case ESM4::SUB_OBND: // object bounds
case ESM4::SUB_MODT: // model texture data
case ESM4::SUB_MODS:
case ESM4::SUB_FULL:
case ESM4::SUB_MODB:

@ -234,33 +234,15 @@ void ESM4::Npc::load(ESM4::Reader& reader)
case ESM4::SUB_DPLT:
reader.getFormId(mDefaultPkg);
break; // AI package list
case ESM4::SUB_DAMC: // Destructible
case ESM4::SUB_DEST:
case ESM4::SUB_DMDC:
case ESM4::SUB_DMDL:
case ESM4::SUB_DMDT:
case ESM4::SUB_DMDS:
case ESM4::SUB_DSTA:
case ESM4::SUB_DSTD:
case ESM4::SUB_DSTF:
{
#if 0
std::vector<unsigned char> dataBuf(subHdr.dataSize);
reader.get(dataBuf.data(), subHdr.dataSize);
std::ostringstream ss;
ss << mEditorId << " " << ESM::printName(subHdr.typeId) << ":size " << subHdr.dataSize << "\n";
for (std::size_t i = 0; i < subHdr.dataSize; ++i)
{
if (dataBuf[i] > 64 && dataBuf[i] < 91) // looks like printable ascii char
ss << (char)(dataBuf[i]) << " ";
else
ss << std::setfill('0') << std::setw(2) << std::hex << (int)(dataBuf[i]);
if ((i & 0x000f) == 0xf) // wrap around
ss << "\n";
else if (i < (size_t)(subHdr.dataSize - 1)) // quiesce gcc
ss << " ";
}
std::cout << ss.str() << std::endl;
#else
reader.skipSubRecordData();
#endif
break;
}
case ESM4::SUB_DSTF: // Destructible end
case ESM4::SUB_NAM6: // height mult
case ESM4::SUB_NAM7: // weight mult
case ESM4::SUB_ATKR:

@ -62,9 +62,15 @@ void ESM4::TalkingActivator::load(ESM4::Reader& reader)
case ESM4::SUB_MODL:
reader.getZString(mModel);
break;
case ESM4::SUB_DEST: // FO3 destruction
case ESM4::SUB_DSTD: // FO3 destruction
case ESM4::SUB_DSTF: // FO3 destruction
case ESM4::SUB_DAMC: // Destructible
case ESM4::SUB_DEST:
case ESM4::SUB_DMDC:
case ESM4::SUB_DMDL:
case ESM4::SUB_DMDT:
case ESM4::SUB_DMDS:
case ESM4::SUB_DSTA:
case ESM4::SUB_DSTD:
case ESM4::SUB_DSTF: // Destructible end
case ESM4::SUB_FNAM:
case ESM4::SUB_PNAM:
case ESM4::SUB_MODT: // texture file hash?

@ -149,11 +149,15 @@ void ESM4::Weapon::load(ESM4::Reader& reader)
case ESM4::SUB_MO3S: // FO3
case ESM4::SUB_MODD: // FO3
// case ESM4::SUB_MOSD: // FO3
case ESM4::SUB_DEST: // FO3
case ESM4::SUB_DSTD: // FO3
case ESM4::SUB_DSTF: // FO3
case ESM4::SUB_DMDL: // FO3
case ESM4::SUB_DMDT: // FO3
case ESM4::SUB_DAMC: // Destructible
case ESM4::SUB_DEST:
case ESM4::SUB_DMDC:
case ESM4::SUB_DMDL:
case ESM4::SUB_DMDT:
case ESM4::SUB_DMDS:
case ESM4::SUB_DSTA:
case ESM4::SUB_DSTD:
case ESM4::SUB_DSTF: // Destructible end
case ESM4::SUB_VATS: // FONV
case ESM4::SUB_VANM: // FONV
case ESM4::SUB_MWD1: // FONV

Loading…
Cancel
Save