diff options
| author | robojumper <robojumper@gmail.com> | 2025-07-09 00:30:48 +0200 |
|---|---|---|
| committer | robojumper <robojumper@gmail.com> | 2025-09-13 10:59:42 +0200 |
| commit | 4f9d63d357dfbdf3f08a7294eb2fbc7ccfe790cf (patch) | |
| tree | 51b80accf33403078974ee3e65573a94b260923e /include/d | |
| parent | bb3f0562bd38e7a4d001af0b578be03653faedcf (diff) | |
d_snd_bgm_sound_battle OK
Diffstat (limited to 'include/d')
| -rw-r--r-- | include/d/snd/d_snd_bgm_harp_data.h | 4 | ||||
| -rw-r--r-- | include/d/snd/d_snd_bgm_mgr.h | 2 | ||||
| -rw-r--r-- | include/d/snd/d_snd_bgm_seq_config.h | 6 | ||||
| -rw-r--r-- | include/d/snd/d_snd_bgm_sound.h | 4 | ||||
| -rw-r--r-- | include/d/snd/d_snd_bgm_sound_battle.h | 13 |
5 files changed, 21 insertions, 8 deletions
diff --git a/include/d/snd/d_snd_bgm_harp_data.h b/include/d/snd/d_snd_bgm_harp_data.h index b2f9cdd9..fc62f9ab 100644 --- a/include/d/snd/d_snd_bgm_harp_data.h +++ b/include/d/snd/d_snd_bgm_harp_data.h @@ -15,6 +15,10 @@ * G3-C4-E4-G4-B4-C5-E5-G5-B5-C6-E6-G6 * B3 is missing, possibly to prevent dissonance at the ends of the scale. * (Sealed Grounds, before Demise fight, no actual BGM) + * + * TODO: This deals with slightly more than the harp. It additionally + * also deals with the combat hit sounds that also seem to match up in + * pitch with the BGM. */ /** diff --git a/include/d/snd/d_snd_bgm_mgr.h b/include/d/snd/d_snd_bgm_mgr.h index 5a4400be..ff05db51 100644 --- a/include/d/snd/d_snd_bgm_mgr.h +++ b/include/d/snd/d_snd_bgm_mgr.h @@ -100,7 +100,7 @@ private: bool prepareBgmSound(u32 soundId, dSndBgmSound_c *handle, u32 startOffset); bool startAdditionalBgm(u32 soundId); - bool playBattleBgm(u32 soundId, bool immediately); + bool playBattleBgm(u32 soundId, bool intense); /** Used to mute other BGM when battle music is playing */ void setBgmHandleIdxVolume(u32 handleIdx, f32 volume, s32 fadeFrames); diff --git a/include/d/snd/d_snd_bgm_seq_config.h b/include/d/snd/d_snd_bgm_seq_config.h index b66e9275..a66a8131 100644 --- a/include/d/snd/d_snd_bgm_seq_config.h +++ b/include/d/snd/d_snd_bgm_seq_config.h @@ -6,9 +6,9 @@ struct dSndBgmSeqConfig { /* 0x00 */ u32 soundId; /* 0x04 */ s32 field_0x04; - /* 0x08 */ s32 field_0x08; - /* 0x0C */ u16 field_0x0C; - /* 0x0E */ u16 field_0x0E; + /* 0x08 */ s32 mTimebase; + /* 0x0C */ u16 mLoopStart; + /* 0x0E */ u16 mLoopEnd; static const dSndBgmSeqConfig *getConfig(u32 soundId, s32 unkParam); diff --git a/include/d/snd/d_snd_bgm_sound.h b/include/d/snd/d_snd_bgm_sound.h index 4e76137c..09403fb7 100644 --- a/include/d/snd/d_snd_bgm_sound.h +++ b/include/d/snd/d_snd_bgm_sound.h @@ -77,8 +77,8 @@ protected: /* 0x108 */ s32 mSeqTempo; /* 0x10C */ u32 mBgmFlags; /* 0x110 */ bool mDidRewindPlaySamplePosition; - /* 0x114 */ s32 field_0x114; - /* 0x118 */ s32 field_0x118; + /* 0x114 */ s32 mBgmVar3; + /* 0x118 */ s32 mSeqTimebase; /* 0x11C */ u32 mPlaySamplePosition; /* 0x120 */ dSndBgmSoundHarpMgr_c mHarpMgr; /* 0x140 */ dSndBgmSoundHarpMgr_c *mpHarpMgr; diff --git a/include/d/snd/d_snd_bgm_sound_battle.h b/include/d/snd/d_snd_bgm_sound_battle.h index 047832e5..f18fa7be 100644 --- a/include/d/snd/d_snd_bgm_sound_battle.h +++ b/include/d/snd/d_snd_bgm_sound_battle.h @@ -20,10 +20,19 @@ public: virtual void calcSeqPlaySamplePosition() override; // vt 0x3C virtual void loadCallbacks(u32 soundId) override; // vt 0x40 + /** + * Called when the player is even closer to an enemy. + * Adds some more instruments to the battle sound. + */ + bool startMainBattleLoop(); + private: + void setTrackGroupMuted(u32 groupId); + void setTrackGroupUnmuted(u32 groupId); + /* 0x184 */ const dSndBgmBattleConfig *mpBgmBattleConfig; - /* 0x188 */ u32 mMuteApplyStateMask; - /* 0x18C */ u32 mTickRelated; + /* 0x188 */ u32 mMuteGroupActiveMask; + /* 0x18C */ u32 mPrevTick; /* 0x190 */ u8 field_0x190; /* 0x191 */ u8 field_0x191; }; |
