From 32f8d08dd3f559b0ca08f12743aa4f6012f046f7 Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Wed, 16 Aug 2023 12:12:30 +0300 Subject: [PATCH] Maybe load FO4 note records --- components/esm4/loadnote.cpp | 13 ++++++++++++- components/esm4/loadnote.hpp | 5 +++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/components/esm4/loadnote.cpp b/components/esm4/loadnote.cpp index fbfd4031c3..9c1b4b3140 100644 --- a/components/esm4/loadnote.cpp +++ b/components/esm4/loadnote.cpp @@ -53,8 +53,16 @@ void ESM4::Note::load(ESM4::Reader& reader) case ESM4::SUB_ICON: reader.getZString(mIcon); break; - case ESM4::SUB_DATA: case ESM4::SUB_MODB: + reader.get(mBoundRadius); + break; + case ESM4::SUB_YNAM: + reader.getFormId(mPickUpSound); + break; + case ESM4::SUB_ZNAM: + reader.getFormId(mDropSound); + break; + case ESM4::SUB_DATA: case ESM4::SUB_MODT: // Model data case ESM4::SUB_MODC: case ESM4::SUB_MODS: @@ -64,6 +72,9 @@ void ESM4::Note::load(ESM4::Reader& reader) case ESM4::SUB_TNAM: case ESM4::SUB_XNAM: case ESM4::SUB_OBND: + case ESM4::SUB_VMAD: + case ESM4::SUB_DNAM: // FO4 + case ESM4::SUB_PNAM: // FO4 case ESM4::SUB_PTRN: // FO4 reader.skipSubRecordData(); break; diff --git a/components/esm4/loadnote.hpp b/components/esm4/loadnote.hpp index f9d94a6b69..65222521ce 100644 --- a/components/esm4/loadnote.hpp +++ b/components/esm4/loadnote.hpp @@ -48,6 +48,11 @@ namespace ESM4 std::string mModel; std::string mIcon; + float mBoundRadius; + + ESM::FormId mPickUpSound; + ESM::FormId mDropSound; + void load(ESM4::Reader& reader); // void save(ESM4::Writer& writer) const;