From 0b63fafc6dc77b24d7eacf30813da3a94ae8c91f Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Fri, 5 Jan 2024 18:21:59 +0300 Subject: [PATCH] Bring ESM4 global variable reading up-to-date with FO76 --- components/esm4/loadglob.cpp | 11 ++++------- components/esm4/loadglob.hpp | 1 + 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/components/esm4/loadglob.cpp b/components/esm4/loadglob.cpp index 39593a4a7d..436f3e34ae 100644 --- a/components/esm4/loadglob.cpp +++ b/components/esm4/loadglob.cpp @@ -44,19 +44,16 @@ void ESM4::GlobalVariable::load(ESM4::Reader& reader) case ESM4::SUB_EDID: reader.getZString(mEditorId); break; + case ESM::fourCC("XALG"): // FO76 + reader.get(mExtraFlags2); + break; case ESM4::SUB_FNAM: reader.get(mType); break; case ESM4::SUB_FLTV: reader.get(mValue); break; - case ESM4::SUB_FULL: - case ESM4::SUB_MODL: - case ESM4::SUB_MODB: - case ESM4::SUB_ICON: - case ESM4::SUB_DATA: - case ESM4::SUB_OBND: // TES5 - case ESM4::SUB_VMAD: // TES5 + case ESM::fourCC("NTWK"): // FO76 reader.skipSubRecordData(); break; default: diff --git a/components/esm4/loadglob.hpp b/components/esm4/loadglob.hpp index c9c83f58b4..89959bcab1 100644 --- a/components/esm4/loadglob.hpp +++ b/components/esm4/loadglob.hpp @@ -42,6 +42,7 @@ namespace ESM4 { ESM::FormId mId; // from the header std::uint32_t mFlags; // from the header, see enum type RecordFlag for details + std::uint64_t mExtraFlags2; std::string mEditorId;