summaryrefslogtreecommitdiff
path: root/include/d/snd
diff options
context:
space:
mode:
authorrobojumper <robojumper@gmail.com>2025-07-08 00:35:57 +0200
committerrobojumper <robojumper@gmail.com>2025-09-13 10:59:41 +0200
commitbb3f0562bd38e7a4d001af0b578be03653faedcf (patch)
treef701ff0f5d824e4d4d01fc2199a77c1c4afc21c0 /include/d/snd
parentb18a2f00d796f9a8c68fa2d259278aebdafedb7b (diff)
A little bit of bgm_battle
Diffstat (limited to 'include/d/snd')
-rw-r--r--include/d/snd/d_snd_bgm_sound battle.h11
-rw-r--r--include/d/snd/d_snd_bgm_sound.h16
-rw-r--r--include/d/snd/d_snd_bgm_sound_battle.h31
-rw-r--r--include/d/snd/d_snd_types.h1
4 files changed, 41 insertions, 18 deletions
diff --git a/include/d/snd/d_snd_bgm_sound battle.h b/include/d/snd/d_snd_bgm_sound battle.h
deleted file mode 100644
index ad67643c..00000000
--- a/include/d/snd/d_snd_bgm_sound battle.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef D_SND_BGM_SOUND_BATTLE_H
-#define D_SND_BGM_SOUND_BATTLE_H
-
-#include "d/snd/d_snd_bgm_sound.h"
-
-class dSndBgmBattleSound_c : public dSndBgmSound_c {
-public:
- dSndBgmBattleSound_c();
-};
-
-#endif
diff --git a/include/d/snd/d_snd_bgm_sound.h b/include/d/snd/d_snd_bgm_sound.h
index 0f01dcb7..4e76137c 100644
--- a/include/d/snd/d_snd_bgm_sound.h
+++ b/include/d/snd/d_snd_bgm_sound.h
@@ -32,12 +32,14 @@ public:
virtual void pause(bool pauseFlag, s32 fadeFrames) override; // vt 0x24
virtual void init(nw4r::snd::SoundStartable &startable, s32 idx); // vt 0x28
- virtual void vt_0x2C(); // vt 0x2C
- virtual void pause(s32 fadeFrames); // vt 0x30
- virtual void loadSeqConfig(u32 soundId); // vt 0x34
- virtual void postCalc() {} // vt 0x38
- virtual void calcSeqPlaySamplePosition(); // vt 0x3C
- virtual void loadCallbacks(u32 soundId); // vt 0x40
+ virtual bool isBattleBgmSound() const {
+ return false;
+ } // vt 0x2C
+ virtual void pause(s32 fadeFrames); // vt 0x30
+ virtual void loadSeqConfig(u32 soundId); // vt 0x34
+ virtual void postCalc() {} // vt 0x38
+ virtual void calcSeqPlaySamplePosition(); // vt 0x3C
+ virtual void loadCallbacks(u32 soundId); // vt 0x40
nw4r::snd::SoundStartable::StartResult startBgmSound(u32 soundId, s32 fadeFrames, u32 startOffset);
@@ -58,7 +60,7 @@ public:
u32 getStrmPlaySamplePosition();
u32 getWavePlaySamplePosition();
-private:
+protected:
void getHarpData(u32 soundId);
bool loadNewHarpData(u32 soundId);
diff --git a/include/d/snd/d_snd_bgm_sound_battle.h b/include/d/snd/d_snd_bgm_sound_battle.h
new file mode 100644
index 00000000..047832e5
--- /dev/null
+++ b/include/d/snd/d_snd_bgm_sound_battle.h
@@ -0,0 +1,31 @@
+#ifndef D_SND_BGM_SOUND_BATTLE_H
+#define D_SND_BGM_SOUND_BATTLE_H
+
+#include "d/snd/d_snd_bgm_sound.h"
+#include "d/snd/d_snd_types.h"
+
+class dSndBgmBattleSound_c : public dSndBgmSound_c {
+public:
+ dSndBgmBattleSound_c();
+
+ virtual void cancel() override; // vt 0x08
+ virtual void fadeIn(u32 id, s32 fadeFrames) override; // vt 0x10
+ virtual bool isBattleBgmSound() const override {
+ return true;
+ } // vt 0x2C
+ virtual void loadSeqConfig(u32 soundId) override; // vt 0x34
+ virtual void postCalc() override {
+ calcSeqPlaySamplePosition();
+ } // vt 0x38
+ virtual void calcSeqPlaySamplePosition() override; // vt 0x3C
+ virtual void loadCallbacks(u32 soundId) override; // vt 0x40
+
+private:
+ /* 0x184 */ const dSndBgmBattleConfig *mpBgmBattleConfig;
+ /* 0x188 */ u32 mMuteApplyStateMask;
+ /* 0x18C */ u32 mTickRelated;
+ /* 0x190 */ u8 field_0x190;
+ /* 0x191 */ u8 field_0x191;
+};
+
+#endif
diff --git a/include/d/snd/d_snd_types.h b/include/d/snd/d_snd_types.h
index 2533df67..901074b6 100644
--- a/include/d/snd/d_snd_types.h
+++ b/include/d/snd/d_snd_types.h
@@ -24,5 +24,6 @@ class dSndBgmBattleSound_c;
class dSndBgmSoundHarpMgr_c;
class dSndBgmSeqConfig;
+class dSndBgmBattleConfig;
#endif