diff --git a/components/esm3/loadmisc.cpp b/components/esm3/loadmisc.cpp index 780e8077fe..b38ce63294 100644 --- a/components/esm3/loadmisc.cpp +++ b/components/esm3/loadmisc.cpp @@ -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"): diff --git a/components/esm3/loadmisc.hpp b/components/esm3/loadmisc.hpp index 9c46b7494e..f3eaf7d10f 100644 --- a/components/esm3/loadmisc.hpp +++ b/components/esm3/loadmisc.hpp @@ -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; diff --git a/components/esm3/loadprob.cpp b/components/esm3/loadprob.cpp index 779f0d1534..3f9ba95bf1 100644 --- a/components/esm3/loadprob.cpp +++ b/components/esm3/loadprob.cpp @@ -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"): diff --git a/components/esm3/loadprob.hpp b/components/esm3/loadprob.hpp index 328c1eaecd..74e02e7d10 100644 --- a/components/esm3/loadprob.hpp +++ b/components/esm3/loadprob.hpp @@ -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; diff --git a/components/esm3/loadsoun.cpp b/components/esm3/loadsoun.cpp index af7d7b3710..fd403e3429 100644 --- a/components/esm3/loadsoun.cpp +++ b/components/esm3/loadsoun.cpp @@ -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: diff --git a/components/esm3/loadsoun.hpp b/components/esm3/loadsoun.hpp index 0da915b0f1..0129d1fe40 100644 --- a/components/esm3/loadsoun.hpp +++ b/components/esm3/loadsoun.hpp @@ -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; diff --git a/components/esm3/loadspel.cpp b/components/esm3/loadspel.cpp index d94073d33c..e4f63b8219 100644 --- a/components/esm3/loadspel.cpp +++ b/components/esm3/loadspel.cpp @@ -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(); diff --git a/components/esm3/loadspel.hpp b/components/esm3/loadspel.hpp index 50ed65d3de..6477f8c7df 100644 --- a/components/esm3/loadspel.hpp +++ b/components/esm3/loadspel.hpp @@ -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;