Replace more sized reads and unsized ints

macos_ci_fix
Evil Eye 1 year ago
parent 2c81220cf7
commit f9c5edf6b9

@ -28,7 +28,7 @@ namespace ESM
mName = esm.getHString(); mName = esm.getHString();
break; break;
case fourCC("MCDT"): case fourCC("MCDT"):
esm.getHTSized<12>(mData); esm.getHT(mData.mWeight, mData.mValue, mData.mFlags);
hasData = true; hasData = true;
break; break;
case fourCC("SCRI"): case fourCC("SCRI"):

@ -27,8 +27,8 @@ namespace ESM
struct MCDTstruct struct MCDTstruct
{ {
float mWeight; float mWeight;
int mValue; int32_t mValue;
int mFlags; int32_t mFlags;
}; };
enum Flags enum Flags
@ -38,7 +38,7 @@ namespace ESM
MCDTstruct mData; MCDTstruct mData;
unsigned int mRecordFlags; uint32_t mRecordFlags;
RefId mId, mScript; RefId mId, mScript;
std::string mName, mModel, mIcon; std::string mName, mModel, mIcon;

@ -28,7 +28,7 @@ namespace ESM
mName = esm.getHString(); mName = esm.getHString();
break; break;
case fourCC("PBDT"): case fourCC("PBDT"):
esm.getHTSized<16>(mData); esm.getHT(mData.mWeight, mData.mValue, mData.mQuality, mData.mUses);
hasData = true; hasData = true;
break; break;
case fourCC("SCRI"): case fourCC("SCRI"):

@ -22,14 +22,14 @@ namespace ESM
struct Data struct Data
{ {
float mWeight; float mWeight;
int mValue; int32_t mValue;
float mQuality; float mQuality;
int mUses; int32_t mUses;
}; // Size = 16 }; // Size = 16
Data mData; Data mData;
unsigned int mRecordFlags; uint32_t mRecordFlags;
RefId mId, mScript; RefId mId, mScript;
std::string mName, mModel, mIcon; std::string mName, mModel, mIcon;

@ -25,7 +25,7 @@ namespace ESM
mSound = esm.getHString(); mSound = esm.getHString();
break; break;
case fourCC("DATA"): case fourCC("DATA"):
esm.getHTSized<3>(mData); esm.getHT(mData.mVolume, mData.mMinRange, mData.mMaxRange);
hasData = true; hasData = true;
break; break;
case SREC_DELE: case SREC_DELE:

@ -25,7 +25,7 @@ namespace ESM
static std::string_view getRecordType() { return "Sound"; } static std::string_view getRecordType() { return "Sound"; }
SOUNstruct mData; SOUNstruct mData;
unsigned int mRecordFlags; uint32_t mRecordFlags;
std::string mSound; std::string mSound;
RefId mId; RefId mId;

@ -27,13 +27,11 @@ namespace ESM
mName = esm.getHString(); mName = esm.getHString();
break; break;
case fourCC("SPDT"): case fourCC("SPDT"):
esm.getHTSized<12>(mData); esm.getHT(mData.mType, mData.mCost, mData.mFlags);
hasData = true; hasData = true;
break; break;
case fourCC("ENAM"): case fourCC("ENAM"):
ENAMstruct s; mEffects.add(esm);
esm.getHTSized<24>(s);
mEffects.mList.push_back(s);
break; break;
case SREC_DELE: case SREC_DELE:
esm.skipHSub(); esm.skipHSub();

@ -39,13 +39,13 @@ namespace ESM
struct SPDTstruct struct SPDTstruct
{ {
int mType; // SpellType int32_t mType; // SpellType
int mCost; // Mana cost int32_t mCost; // Mana cost
int mFlags; // Flags int32_t mFlags; // Flags
}; };
SPDTstruct mData; SPDTstruct mData;
unsigned int mRecordFlags; uint32_t mRecordFlags;
std::string mName; std::string mName;
RefId mId; RefId mId;
EffectList mEffects; EffectList mEffects;

Loading…
Cancel
Save