This commit is contained in:
robojumper
2025-06-05 21:58:13 +02:00
parent e9c5e4c46c
commit ed0f2fed88
8 changed files with 110 additions and 16 deletions
+32
View File
@@ -13,6 +13,8 @@ SND_DISPOSER_FORWARD_DECL(dSndPlayerMgr_c);
/**
* The main interface for managing sound stuff. Will delegate to dSndMgr_c for
* most things, but handles demo (cutscene) sound effects (SE_DEMO*) by itself.
*
* Previous Ghidra name: BgmMgr
*/
class dSndPlayerMgr_c {
public:
@@ -24,6 +26,16 @@ public:
void shutdown();
void calc();
void enterMenu();
void leaveMenu();
void enterMap();
void leaveMap();
void enterHelp();
void leaveHelp();
void enterHbm();
void leaveHbm();
u32 getFreeSize();
bool loadDemoArchive(const char *demoArchiveName);
const char *getSoundArchivePath();
@@ -32,10 +44,26 @@ public:
nw4r::snd::SoundArchivePlayer &getSoundArchivePlayerForType(u8 type);
bool canUseThisPlayer(u8 type) const;
enum PlayerMgrFlag_e {
MGR_HBM = 0x1,
MGR_UNK_0x2 = 0x2,
MGR_PAUSE = 0x4,
MGR_MAP = 0x8,
MGR_HELP = 0x10,
};
bool checkFlag(u32 mask) const {
return mFlags & mask;
}
void onFlag(u32 mask) {
mFlags |= mask;
}
void offFlag(u32 mask) {
mFlags &= ~mask;
}
u32 getEventMuteMask(u32 id) {
nw4r::snd::SoundArchive *archive;
if (mSoundArchivePlayer.IsAvailable()) {
@@ -124,6 +152,10 @@ private:
/* 0x01C */ s32 field_0x01C;
/* 0x020 */ u32 mFlags;
// system menu, inventory, map
void enterPauseState();
void leavePauseState();
virtual nw4r::snd::SoundStartable::StartResult
startSound(nw4r::snd::SoundHandle *pHandle, u32 soundId, const nw4r::snd::SoundStartable::StartInfo *pStartInfo);
virtual nw4r::snd::SoundStartable::StartResult startSound(
+1
View File
@@ -99,6 +99,7 @@ private:
/* 0x154 */ UNKWORD field_0x154;
/* 0x158 */ s16 field_0x158;
/* 0x15A */ s16 field_0x15A;
/* 0x15C */ nw4r::ut::Node mNode2;
};
#endif
+1
View File
@@ -10,6 +10,7 @@
#include "nw4r/snd/snd_BasicSound.h"
#include "nw4r/snd/snd_global.h" // AUX_BUS_NUM
#include "nw4r/snd/snd_PlayerHeap.h"
#include "nw4r/snd/snd_SoundHandle.h"
/*******************************************************************************
* classes
+3
View File
@@ -33,6 +33,9 @@ extern "C" void *ENEMY_BGM_RELATED_MGR;
extern "C" void fn_80384570(void *, bool);
extern "C" void fn_803858D0(void *);
// This one has a SoundActor that actually plays the BGM_ music tracks,
// including the battle BGM track.
extern "C" void *FANFARE_SOUND_MGR;
extern "C" void AnotherSoundMgr__playSound(void *, s32);
extern "C" bool fn_803721F0(void *, u32);