From be06bc04a9090db85a2fdcf53553a4113c1e35f8 Mon Sep 17 00:00:00 2001 From: robojumper Date: Sun, 20 Oct 2024 15:53:23 +0200 Subject: [PATCH] EGG::ExpAudioMgr OK (thanks RootCubed!) (#74) --- config/SOUE01/splits.txt | 5 ++++- configure.py | 3 ++- include/egg/audio/eggAudioMgr.h | 2 +- src/egg/audio/eggAudioExpMgr.cpp | 35 ++++++++++++++++++++++++++++++++ 4 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 src/egg/audio/eggAudioExpMgr.cpp diff --git a/config/SOUE01/splits.txt b/config/SOUE01/splits.txt index 93a915f8..17302325 100644 --- a/config/SOUE01/splits.txt +++ b/config/SOUE01/splits.txt @@ -1967,9 +1967,12 @@ egg/gfx/eggTextureBuffer.cpp: .text start:0x804B53F0 end:0x804B59DC egg/audio/eggAudioArcPlayerMgr.cpp: - .text start:0x804B59E0 end:0x804B6428 + .text start:0x804B59E0 end:0x804B641C .data start:0x8056F2C0 end:0x8056F320 +egg/audio/eggAudioExpMgr.cpp: + .text start:0x804B6420 end:0x804B6428 + egg/audio/eggAudioHeapMgr.cpp: .text start:0x804B6430 end:0x804B64A8 diff --git a/configure.py b/configure.py index 4316f255..448abeb7 100644 --- a/configure.py +++ b/configure.py @@ -870,7 +870,8 @@ config.libs = [ EGGLib( "audio", [ - Object(NonMatching, "egg/audio/eggAudioArcPlayerMgr.cpp"), + Object(Matching, "egg/audio/eggAudioArcPlayerMgr.cpp"), + Object(Matching, "egg/audio/eggAudioExpMgr.cpp"), Object(Matching, "egg/audio/eggAudioHeapMgr.cpp"), Object(Matching, "egg/audio/eggAudioMgr.cpp"), Object(Matching, "egg/audio/eggAudioRmtSpeakerMgr.cpp"), diff --git a/include/egg/audio/eggAudioMgr.h b/include/egg/audio/eggAudioMgr.h index 1c3ef4b3..5b7fea91 100644 --- a/include/egg/audio/eggAudioMgr.h +++ b/include/egg/audio/eggAudioMgr.h @@ -55,7 +55,7 @@ public: SimpleAudioMgr(); virtual ~SimpleAudioMgr(); - void initialize(EGG::IAudioMgr::Arg *); + void initialize(EGG::IAudioMgr::Arg *) override; virtual void calc() override; virtual UNKTYPE *openDvdArchive(const char *, nw4r::snd::SoundHeap *) override; // at 0x10 diff --git a/src/egg/audio/eggAudioExpMgr.cpp b/src/egg/audio/eggAudioExpMgr.cpp new file mode 100644 index 00000000..6745baa9 --- /dev/null +++ b/src/egg/audio/eggAudioExpMgr.cpp @@ -0,0 +1,35 @@ +#include "egg/audio/eggAudioMgr.h" + + +// Note: Pretty much this entire file is deadstripped by the linker, but ONE artifact remains: +// The single `EGG::SimpleAudioMgr::@248@calc()` weak function. +// As a result, this file has no corresponding header, and is basically unimplemented. + +namespace EGG { + +class ExpAudioMgr : public SimpleAudioMgr { +public: + + ExpAudioMgr(); + virtual ~ExpAudioMgr(); + + // Do not override calc() + + void initialize(EGG::IAudioMgr::Arg *) override; + + virtual UNKTYPE *openDvdArchive(const char *, nw4r::snd::SoundHeap *) override; // at 0x10 + virtual UNKTYPE *openNandArchive(const char *, nw4r::snd::SoundHeap *) override; // at 0x14 + virtual UNKTYPE *setupMemoryArchive(const void *, nw4r::snd::SoundHeap *) override; // at 0x18 + + virtual void closeArchive() override; // at 0x20 + virtual bool loadGroup(unsigned int, nw4r::snd::SoundHeap *, u32) override; // at 0x24 + virtual bool loadGroup(int, nw4r::snd::SoundHeap *, u32) override; // at 0x28 + virtual bool loadGroup(u32, nw4r::snd::SoundHeap *, u32) override; // at 0x2C + virtual bool loadGroup(const char *, nw4r::snd::SoundHeap *, u32) override; // at 0x30 +}; + + +ExpAudioMgr::ExpAudioMgr() {} +ExpAudioMgr::~ExpAudioMgr() {} + +} // namespace EGG