summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorrobojumper <robojumper@gmail.com>2025-07-08 00:10:45 +0200
committerrobojumper <robojumper@gmail.com>2025-09-13 10:59:41 +0200
commitb18a2f00d796f9a8c68fa2d259278aebdafedb7b (patch)
treef436350065a6b0dc2b7e2dd1106e9df6af9e67ca /include
parent030c5a39529b6a0e8f538df5838255367cf73337 (diff)
d_snd_bgm_seq_data_mgr, d_snd_bgm_seq_config OK
Diffstat (limited to 'include')
-rw-r--r--include/d/snd/d_snd_bgm_seq_config.h30
-rw-r--r--include/d/snd/d_snd_bgm_seq_data_mgr.h (renamed from include/d/snd/d_snd_bgm_battle_data_mgr.h)20
-rw-r--r--include/d/snd/d_snd_bgm_sound.h7
-rw-r--r--include/d/snd/d_snd_bgm_sound_harp_mgr.h4
-rw-r--r--include/d/snd/d_snd_state_mgr.h11
-rw-r--r--include/d/snd/d_snd_types.h1
6 files changed, 53 insertions, 20 deletions
diff --git a/include/d/snd/d_snd_bgm_seq_config.h b/include/d/snd/d_snd_bgm_seq_config.h
new file mode 100644
index 00000000..b66e9275
--- /dev/null
+++ b/include/d/snd/d_snd_bgm_seq_config.h
@@ -0,0 +1,30 @@
+#ifndef D_SND_BGM_SEQ_CONFIG_H
+#define D_SND_BGM_SEQ_CONFIG_H
+
+#include "common.h"
+
+struct dSndBgmSeqConfig {
+ /* 0x00 */ u32 soundId;
+ /* 0x04 */ s32 field_0x04;
+ /* 0x08 */ s32 field_0x08;
+ /* 0x0C */ u16 field_0x0C;
+ /* 0x0E */ u16 field_0x0E;
+
+
+ static const dSndBgmSeqConfig *getConfig(u32 soundId, s32 unkParam);
+};
+
+struct dSndBgmBattleConfig_MuteUnmuteMasks {
+ /* 0x00 */ u16 unmuteMask;
+ /* 0x02 */ u16 muteMask;
+};
+
+struct dSndBgmBattleConfig {
+ /* 0x00 */ u32 soundId;
+ /* 0x04 */ dSndBgmBattleConfig_MuteUnmuteMasks mTrackMasks[3];
+
+ static bool hasConfig(u32 soundId);
+ static const dSndBgmBattleConfig *getConfig(u32 soundId);
+};
+
+#endif
diff --git a/include/d/snd/d_snd_bgm_battle_data_mgr.h b/include/d/snd/d_snd_bgm_seq_data_mgr.h
index 50d5dc0e..de8ad699 100644
--- a/include/d/snd/d_snd_bgm_battle_data_mgr.h
+++ b/include/d/snd/d_snd_bgm_seq_data_mgr.h
@@ -1,28 +1,32 @@
-#ifndef D_SND_BGM_BATTLE_DATA_MGR_H
-#define D_SND_BGM_BATTLE_DATA_MGR_H
+#ifndef D_SND_BGM_SEQ_DATA_MGR_H
+#define D_SND_BGM_SEQ_DATA_MGR_H
#include "common.h"
-#include "d/snd/d_snd_util.h"
#include "d/snd/d_snd_types.h"
+#include "d/snd/d_snd_util.h"
-SND_DISPOSER_FORWARD_DECL(dSndBgmBattleDataMgr_c);
+SND_DISPOSER_FORWARD_DECL(dSndBgmSeqDataMgr_c);
// Previous Ghidra name: SomeUnusedSoundMgr
-class dSndBgmBattleDataMgr_c {
+class dSndBgmSeqDataMgr_c {
public:
- SND_DISPOSER_MEMBERS(dSndBgmBattleDataMgr_c);
+ SND_DISPOSER_MEMBERS(dSndBgmSeqDataMgr_c);
public:
- dSndBgmBattleDataMgr_c();
+ dSndBgmSeqDataMgr_c();
static const char *getDataPrefix();
static u32 getDataPrefixLength();
dSndBgmSoundHarpMgr_c *getHarpMgrForSoundId(u32 soundId);
+ void initialize();
+ void setupState0();
private:
+ static const s32 NUM_SOUNDS = 2;
+
/* 0x10 */ dSndBgmSoundHarpMgr_c *mpMgrs;
- /* 0x14 */ u8 field_0x14;
+ /* 0x14 */ bool mInitialized;
};
#endif
diff --git a/include/d/snd/d_snd_bgm_sound.h b/include/d/snd/d_snd_bgm_sound.h
index c85f4279..0f01dcb7 100644
--- a/include/d/snd/d_snd_bgm_sound.h
+++ b/include/d/snd/d_snd_bgm_sound.h
@@ -7,13 +7,6 @@
#include "nw4r/snd/snd_SoundStartable.h"
#include "nw4r/ut/ut_list.h"
-struct dSndBgmSeqConfig {
- /* 0x00 */ u32 soundId;
- /* 0x04 */ u8 _0x04[0x0C - 0x04];
- /* 0x0C */ u16 field_0x0C;
- /* 0x0E */ u16 field_0x0E;
-};
-
class dSndBgmSound_c : public dSndSound_c {
enum BgmSoundFlags_e {
BGM_FLAG_BATTLE = 0x1,
diff --git a/include/d/snd/d_snd_bgm_sound_harp_mgr.h b/include/d/snd/d_snd_bgm_sound_harp_mgr.h
index ca5aa14e..16bcdc40 100644
--- a/include/d/snd/d_snd_bgm_sound_harp_mgr.h
+++ b/include/d/snd/d_snd_bgm_sound_harp_mgr.h
@@ -41,6 +41,10 @@ public:
mPrevIdx = -1;
}
+ u32 getSoundId() const {
+ return mSoundId;
+ }
+
private:
/* 0x00 */ dSndBgmHarpData_c mHarpData;
/* 0x0C */ dSndBgmDataHarpVarSetBase_c *mpCurrVarSet;
diff --git a/include/d/snd/d_snd_state_mgr.h b/include/d/snd/d_snd_state_mgr.h
index 9f7cedf1..13c3b1df 100644
--- a/include/d/snd/d_snd_state_mgr.h
+++ b/include/d/snd/d_snd_state_mgr.h
@@ -31,7 +31,8 @@ public:
};
enum EventFlags_e {
- EVENT_0x2 = 0x2,
+ EVENT_IN_EVENT = 0x1,
+ EVENT_DEMO = 0x2,
EVENT_MUTE_BGM_PARTIAL = 0x8,
EVENT_MUTE_BGM_FULL = 0x10,
EVENT_MUTE_STAGE_EFFECTS_PARTIAL = 0x20,
@@ -92,15 +93,15 @@ public:
}
bool checkEventFlag(u32 mask) const {
- return field_0x094 & mask;
+ return mEventFlags & mask;
}
void onEventFlag(u32 mask) {
- field_0x094 |= mask;
+ mEventFlags |= mask;
}
void offEventFlag(u32 mask) {
- field_0x094 &= ~mask;
+ mEventFlags &= ~mask;
}
void setFlowEvent(u32 eventId);
@@ -197,7 +198,7 @@ private:
/* 0x088 */ UNKWORD field_0x088;
/* 0x08C */ s32 mSoundEventId;
/* 0x090 */ UNKWORD field_0x090;
- /* 0x094 */ u32 field_0x094;
+ /* 0x094 */ u32 mEventFlags;
/* 0x098 */ SizedString<64> field_0x098;
/* 0x0D8 */ SizedString<64> field_0x0D8;
/* 0x118 */ const char *field_0x118;
diff --git a/include/d/snd/d_snd_types.h b/include/d/snd/d_snd_types.h
index 6c6a9d9a..2533df67 100644
--- a/include/d/snd/d_snd_types.h
+++ b/include/d/snd/d_snd_types.h
@@ -23,5 +23,6 @@ class dSndBgmSound_c;
class dSndBgmBattleSound_c;
class dSndBgmSoundHarpMgr_c;
+class dSndBgmSeqConfig;
#endif