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: case ESM4::SUB_EDID:
reader.getZString(mEditorId); reader.getZString(mEditorId);
break; break;
case ESM::fourCC("FLTR"): // FO76
reader.getZString(mFilter);
break;
case ESM4::SUB_TX00: case ESM4::SUB_TX00:
reader.getZString(mDiffuse); reader.getZString(mDiffuse);
break; break;
@ -51,29 +54,45 @@ void ESM4::TextureSet::load(ESM4::Reader& reader)
reader.getZString(mNormalMap); reader.getZString(mNormalMap);
break; break;
case ESM4::SUB_TX02: case ESM4::SUB_TX02:
// This is a "wrinkle map" in FO4/76
reader.getZString(mEnvMask); reader.getZString(mEnvMask);
break; break;
case ESM4::SUB_TX03: case ESM4::SUB_TX03:
// This is a glow map in FO4/76
reader.getZString(mToneMap); reader.getZString(mToneMap);
break; break;
case ESM4::SUB_TX04: case ESM4::SUB_TX04:
// This is a height map in FO4/76
reader.getZString(mDetailMap); reader.getZString(mDetailMap);
break; break;
case ESM4::SUB_TX05: case ESM4::SUB_TX05:
reader.getZString(mEnvMap); reader.getZString(mEnvMap);
break; break;
case ESM4::SUB_TX06: case ESM4::SUB_TX06:
reader.getZString(mUnknown); reader.getZString(mMultiLayer);
break; break;
case ESM4::SUB_TX07: 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); reader.getZString(mSpecular);
break; 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: case ESM4::SUB_MNAM:
reader.getZString(mMaterial); reader.getZString(mMaterial);
break; break;
case ESM4::SUB_DNAM: case ESM4::SUB_DODT: // Decal data
case ESM4::SUB_DODT:
case ESM4::SUB_OBND: // object bounds case ESM4::SUB_OBND: // object bounds
case ESM::fourCC("OPDS"): // Object placement defaults, FO76
reader.skipSubRecordData(); reader.skipSubRecordData();
break; break;
default: default:

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

Loading…
Cancel
Save