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();
break;
case fourCC("MCDT"):
esm.getHTSized<12>(mData);
esm.getHT(mData.mWeight, mData.mValue, mData.mFlags);
hasData = true;
break;
case fourCC("SCRI"):

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

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

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

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

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

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

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

Loading…
Cancel
Save