summaryrefslogtreecommitdiff
path: root/include/d
diff options
context:
space:
mode:
authorrobojumper <robojumper@gmail.com>2025-07-20 13:14:48 +0200
committerrobojumper <robojumper@gmail.com>2025-09-13 11:10:27 +0200
commit339ee576b58abf191ea7d834dc6e1b06c3dea52b (patch)
treeb13212c4c26614fe7dbbb52b84c5c701b52caa85 /include/d
parentaf7586962198fdcaf8be984fe39806fb88ee522e (diff)
d_snd_bgm_mml_parsers OK
Diffstat (limited to 'include/d')
-rw-r--r--include/d/snd/d_snd_bgm_mgr.h7
-rw-r--r--include/d/snd/d_snd_bgm_mml_parsers.h50
-rw-r--r--include/d/snd/d_snd_types.h1
3 files changed, 54 insertions, 4 deletions
diff --git a/include/d/snd/d_snd_bgm_mgr.h b/include/d/snd/d_snd_bgm_mgr.h
index cce578fc..604524c3 100644
--- a/include/d/snd/d_snd_bgm_mgr.h
+++ b/include/d/snd/d_snd_bgm_mgr.h
@@ -129,6 +129,9 @@ public:
private:
dSndBgmBattleSound_c *getBgmBattleSound();
+ void startBgmMuteSound();
+ void endBgmMuteSound();
+
bool stopBgmSound(dSndBgmSound_c *sound, s32 fadeFrames);
void checkForPrepareStoppedBgmSound(u32 stoppedSoundId);
dSndBgmSound_c *findNewBgmSoundHandle();
@@ -171,7 +174,7 @@ private:
/* 0x24C */ u32 mScheduledSoundId;
/* 0x250 */ s32 mScheduledSoundDelay;
/* 0x254 */ dSndBgmSound_c *mBgmSounds[7];
- /* 0x270 */ dSndBgmSound_c *field_0x270;
+ /* 0x270 */ dSndBgmSound_c *mpBgmMuteSound;
/* 0x274 */ dSndBgmSound_c *mpPrevActiveBgmSound;
/* 0x278 */ nw4r::ut::List mBgmSoundLists[BGM_LIST_MAX]; // node offset 0xF0 -> dSndBgmSound_c
/* 0x29C */ UNKWORD field_0x29C;
@@ -185,7 +188,7 @@ private:
/* 0x306 */ u8 field_0x306;
/* 0x307 */ u8 field_0x307;
/* 0x308 */ u8 field_0x308;
- /* 0x30C */ u32 field_0x30C[3];
+ /* 0x30C */ dSndTagData *field_0x30C[3];
/* 0x318 */ u32 field_0x318[3];
/* 0x324 */ u32 field_0x324[3];
/* 0x330 */ u8 field_0x330[3];
diff --git a/include/d/snd/d_snd_bgm_mml_parsers.h b/include/d/snd/d_snd_bgm_mml_parsers.h
index 0cff96f5..e36932b4 100644
--- a/include/d/snd/d_snd_bgm_mml_parsers.h
+++ b/include/d/snd/d_snd_bgm_mml_parsers.h
@@ -1,5 +1,5 @@
-#ifndef D_SND_BGM_MML_PARSERS__H
-#define D_SND_BGM_MML_PARSERS__H
+#ifndef D_SND_BGM_MML_PARSERS_H
+#define D_SND_BGM_MML_PARSERS_H
#include "d/snd/d_snd_bgm_mml_parser_base.h"
#include "d/snd/d_snd_types.h"
@@ -32,4 +32,50 @@ private:
/* 0x294 */ dSndHarpSongData_c *field_0x294;
};
+struct dSndTagData {
+ /* 0x00 */ u32 size;
+ /* 0x04 */ u32 data[];
+};
+
+class dSndBgmMmlParserTagBattle_c : dSndBgmMmlParser_c {
+public:
+ dSndBgmMmlParserTagBattle_c();
+
+ virtual void NoteOnCommandProc(u32 trackNo, int wait, int key, int velocity, s32 length) const override;
+
+ bool parseData(u32 soundId, dSndTagData **pOutData);
+
+private:
+ /* 0x294 */ dSndTagData *mpBuf;
+ /* 0x298 */ mutable u32 mBufSize;
+};
+
+class dSndBgmMmlParserTagBgmBoss_c : dSndBgmMmlParser_c {
+public:
+ dSndBgmMmlParserTagBgmBoss_c();
+
+ virtual void NoteOnCommandProc(u32 trackNo, int wait, int key, int velocity, s32 length) const override;
+
+ void parseData(dSndTagData **pOutData1, dSndTagData **pOutData2);
+
+private:
+ /* 0x294 */ dSndTagData *mpBuf1;
+ /* 0x298 */ dSndTagData *mpBuf2;
+ /* 0x29C */ mutable u32 mBufSize1;
+ /* 0x2A0 */ mutable u32 mBufSize2;
+};
+
+class dSndBgmMmlParserTagCompNote_c : dSndBgmMmlParser_c {
+public:
+ dSndBgmMmlParserTagCompNote_c();
+
+ virtual void NoteOnCommandProc(u32 trackNo, int wait, int key, int velocity, s32 length) const override;
+
+ void parseData(dSndTagData **pOutData);
+
+private:
+ /* 0x294 */ dSndTagData *mpBuf;
+ /* 0x298 */ mutable u32 mBufSize;
+};
+
#endif
diff --git a/include/d/snd/d_snd_types.h b/include/d/snd/d_snd_types.h
index 85632917..c156c7c1 100644
--- a/include/d/snd/d_snd_types.h
+++ b/include/d/snd/d_snd_types.h
@@ -29,5 +29,6 @@ class dSndBgmSeqConfig;
class dSndBgmBattleConfig;
class dSndHarpSongData_c;
+class dSndTagData;
#endif