Move common subrecord definitions (NAME, DELE) to defs.hpp

openmw-38
scrawl 9 years ago
parent b8e11cf197
commit fc8e40889d

@ -108,7 +108,7 @@ void ESM::CellRef::loadData(ESMReader &esm, bool &isDeleted)
case ESM::FourCC<'N','A','M','0'>::value:
esm.skipHSub();
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -15,7 +15,7 @@ void ESM::DebugProfile::load (ESMReader& esm, bool &isDeleted)
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
break;
case ESM::FourCC<'D','E','S','C'>::value:
@ -27,7 +27,7 @@ void ESM::DebugProfile::load (ESMReader& esm, bool &isDeleted)
case ESM::FourCC<'F','L','A','G'>::value:
esm.getHT(mFlags);
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -133,5 +133,12 @@ enum RecNameInts
REC_DBGP = FourCC<'D','B','G','P'>::value ///< only used in project files
};
/// Common subrecords
enum SubRecNameInts
{
SREC_DELE = ESM::FourCC<'D','E','L','E'>::value,
SREC_NAME = ESM::FourCC<'N','A','M','E'>::value
};
}
#endif

@ -16,7 +16,7 @@ void ESM::Filter::load (ESMReader& esm, bool &isDeleted)
uint32_t name = esm.retSubName().val;
switch (name)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
break;
case ESM::FourCC<'F','I','L','T'>::value:
@ -25,7 +25,7 @@ void ESM::Filter::load (ESMReader& esm, bool &isDeleted)
case ESM::FourCC<'D','E','S','C'>::value:
mDescription = esm.getHString();
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -18,7 +18,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -31,7 +31,7 @@ namespace ESM
case ESM::FourCC<'S','C','R','I'>::value:
mScript = esm.getHString();
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -21,7 +21,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -44,7 +44,7 @@ namespace ESM
case ESM::FourCC<'E','N','A','M'>::value:
mEffects.add(esm);
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -19,7 +19,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -39,7 +39,7 @@ namespace ESM
case ESM::FourCC<'I','T','E','X'>::value:
mIcon = esm.getHString();
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -51,7 +51,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -77,7 +77,7 @@ namespace ESM
case ESM::FourCC<'I','N','D','X'>::value:
mParts.add(esm);
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -19,7 +19,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -33,7 +33,7 @@ namespace ESM
esm.getHT(mData, 4);
hasData = true;
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -19,7 +19,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -45,7 +45,7 @@ namespace ESM
case ESM::FourCC<'T','E','X','T'>::value:
mText = esm.getHString();
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -20,7 +20,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -36,7 +36,7 @@ namespace ESM
case ESM::FourCC<'N','P','C','S'>::value:
mPowers.add(esm);
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -71,14 +71,14 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mName = esm.getHString();
break;
case ESM::FourCC<'D','A','T','A'>::value:
esm.getHT(mData, 12);
hasData = true;
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -49,7 +49,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -65,7 +65,7 @@ namespace ESM
case ESM::FourCC<'D','E','S','C'>::value:
mDescription = esm.getHString();
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -21,7 +21,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -47,7 +47,7 @@ namespace ESM
case ESM::FourCC<'I','N','D','X'>::value:
mParts.add(esm);
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -38,7 +38,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -66,7 +66,7 @@ namespace ESM
case ESM::FourCC<'N','P','C','O'>::value:
mInventory.add(esm);
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -30,7 +30,7 @@ namespace ESM {
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -79,7 +79,7 @@ namespace ESM {
case AI_CNDT:
mAiPackage.add(esm);
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -44,7 +44,7 @@ namespace ESM
}
break;
}
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
mType = Unknown;
isDeleted = true;

@ -18,7 +18,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -37,7 +37,7 @@ namespace ESM
case ESM::FourCC<'A','N','A','M'>::value:
mCloseSound = esm.getHString();
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -20,7 +20,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -31,7 +31,7 @@ namespace ESM
case ESM::FourCC<'E','N','A','M'>::value:
mEffects.add(esm);
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -42,7 +42,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -68,7 +68,7 @@ namespace ESM
mReactions[faction] = reaction;
break;
}
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -67,7 +67,7 @@ namespace ESM
case ESM::FourCC<'S','N','A','M'>::value:
mSound = esm.getHString();
break;
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mResponse = esm.getHString();
break;
case ESM::FourCC<'S','C','V','R'>::value:
@ -93,7 +93,7 @@ namespace ESM
mQuestStatus = QS_Restart;
esm.skipRecord();
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -19,7 +19,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -39,7 +39,7 @@ namespace ESM
case ESM::FourCC<'I','T','E','X'>::value:
mIcon = esm.getHString();
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -105,7 +105,7 @@ namespace ESM
case ESM::FourCC<'D','A','T','A'>::value:
esm.getHT(mFlags);
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -17,7 +17,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -49,7 +49,7 @@ namespace ESM
hasList = true;
break;
}
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -19,7 +19,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -42,7 +42,7 @@ namespace ESM
case ESM::FourCC<'S','N','A','M'>::value:
mSound = esm.getHString();
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -19,7 +19,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -39,7 +39,7 @@ namespace ESM
case ESM::FourCC<'I','T','E','X'>::value:
mIcon = esm.getHString();
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -19,7 +19,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -30,7 +30,7 @@ namespace ESM
case ESM::FourCC<'D','A','T','A'>::value:
mTexture = esm.getHString();
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -19,7 +19,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -39,7 +39,7 @@ namespace ESM
case ESM::FourCC<'I','T','E','X'>::value:
mIcon = esm.getHString();
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -28,7 +28,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -98,7 +98,7 @@ namespace ESM
case AI_CNDT:
mAiPackage.add(esm);
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -48,7 +48,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mCell = esm.getHString();
break;
case ESM::FourCC<'D','A','T','A'>::value:
@ -111,7 +111,7 @@ namespace ESM
}
break;
}
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -19,7 +19,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -39,7 +39,7 @@ namespace ESM
case ESM::FourCC<'I','T','E','X'>::value:
mIcon = esm.getHString();
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -31,7 +31,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -48,7 +48,7 @@ namespace ESM
case ESM::FourCC<'N','P','C','S'>::value:
mPowers.add(esm);
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -18,7 +18,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -65,7 +65,7 @@ namespace ESM
esm.getHT(sr, 33);
mSoundList.push_back(sr);
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -19,7 +19,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -39,7 +39,7 @@ namespace ESM
case ESM::FourCC<'I','T','E','X'>::value:
mIcon = esm.getHString();
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -88,7 +88,7 @@ namespace ESM
case ESM::FourCC<'S','C','T','X'>::value:
mScriptText = esm.getHString();
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -19,7 +19,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -33,7 +33,7 @@ namespace ESM
case ESM::FourCC<'S','N','A','M'>::value:
mSound = esm.getHString();
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -19,7 +19,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -30,7 +30,7 @@ namespace ESM
esm.getHT(mData, 3);
hasData = true;
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -21,7 +21,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -37,7 +37,7 @@ namespace ESM
esm.getHT(s, 24);
mEffects.mList.push_back(s);
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -19,7 +19,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -27,7 +27,7 @@ namespace ESM
mData = esm.getHString();
hasData = true;
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -18,14 +18,14 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
case ESM::FourCC<'M','O','D','L'>::value:
mModel = esm.getHString();
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

@ -19,7 +19,7 @@ namespace ESM
esm.getSubName();
switch (esm.retSubName().val)
{
case ESM::FourCC<'N','A','M','E'>::value:
case ESM::SREC_NAME:
mId = esm.getHString();
hasName = true;
break;
@ -42,7 +42,7 @@ namespace ESM
case ESM::FourCC<'E','N','A','M'>::value:
mEnchant = esm.getHString();
break;
case ESM::FourCC<'D','E','L','E'>::value:
case ESM::SREC_DELE:
esm.skipHSub();
isDeleted = true;
break;

Loading…
Cancel
Save