Bring ESM4 texture set reading up-to-date with FO76

qt6_macos
Alexei Kotov 12 months ago
parent 18982ea4a0
commit f9825328d2

@ -44,6 +44,9 @@ void ESM4::TextureSet::load(ESM4::Reader& reader)
case ESM4::SUB_EDID:
reader.getZString(mEditorId);
break;
case ESM::fourCC("FLTR"): // FO76
reader.getZString(mFilter);
break;
case ESM4::SUB_TX00:
reader.getZString(mDiffuse);
break;
@ -51,29 +54,45 @@ void ESM4::TextureSet::load(ESM4::Reader& reader)
reader.getZString(mNormalMap);
break;
case ESM4::SUB_TX02:
// This is a "wrinkle map" in FO4/76
reader.getZString(mEnvMask);
break;
case ESM4::SUB_TX03:
// This is a glow map in FO4/76
reader.getZString(mToneMap);
break;
case ESM4::SUB_TX04:
// This is a height map in FO4/76
reader.getZString(mDetailMap);
break;
case ESM4::SUB_TX05:
reader.getZString(mEnvMap);
break;
case ESM4::SUB_TX06:
reader.getZString(mUnknown);
reader.getZString(mMultiLayer);
break;
case ESM4::SUB_TX07:
// This is a "smooth specular" map in FO4/76
reader.getZString(mSpecular);
break;
case ESM::fourCC("TX08"): // FO76
reader.getZString(mSpecular);
break;
case ESM::fourCC("TX09"): // FO76
reader.getZString(mLighting);
break;
case ESM::fourCC("TX10"): // FO76
reader.getZString(mFlow);
break;
case ESM4::SUB_DNAM:
reader.get(mDataFlags);
break;
case ESM4::SUB_MNAM:
reader.getZString(mMaterial);
break;
case ESM4::SUB_DNAM:
case ESM4::SUB_DODT:
case ESM4::SUB_DODT: // Decal data
case ESM4::SUB_OBND: // object bounds
case ESM::fourCC("OPDS"): // Object placement defaults, FO76
reader.skipSubRecordData();
break;
default:

@ -44,6 +44,7 @@ namespace ESM4
std::uint32_t mFlags; // from the header, see enum type RecordFlag for details
std::string mEditorId;
std::string mFilter;
std::string mDiffuse; // includes alpha info
std::string mNormalMap; // includes specular info (alpha channel)
@ -51,8 +52,12 @@ namespace ESM4
std::string mToneMap;
std::string mDetailMap;
std::string mEnvMap;
std::string mUnknown;
std::string mMultiLayer;
std::string mSpecular;
std::string mSmoothSpecular;
std::string mLighting;
std::string mFlow;
std::uint16_t mDataFlags;
std::string mMaterial;
void load(ESM4::Reader& reader);

Loading…
Cancel
Save