summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common_syms/sound.txt1
-rw-r--r--include/sound.h2
-rw-r--r--src/sound.c29
-rw-r--r--sym_bss.txt15
-rw-r--r--sym_common.txt4
-rw-r--r--sym_ewram.txt10
6 files changed, 22 insertions, 39 deletions
diff --git a/common_syms/sound.txt b/common_syms/sound.txt
new file mode 100644
index 000000000..0f6f2fc75
--- /dev/null
+++ b/common_syms/sound.txt
@@ -0,0 +1 @@
+gDisableMusic
diff --git a/include/sound.h b/include/sound.h
index 283b2b1f9..7d47b7456 100644
--- a/include/sound.h
+++ b/include/sound.h
@@ -28,6 +28,8 @@ void PlayCry2(u16 species, s8 pan, s8 volume, u8 priority);
void PlayCry3(u16 species, s8 pan, u8 mode);
void PlayCry4(u16 species, s8 pan, u8 mode);
void PlayCry5(u16 species, u8 mode);
+void PlayCry6(u16 species, s8 pan, u8 mode);
+void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode);
bool8 IsCryFinished(void);
void StopCryAndClearCrySongs(void);
void StopCry(void);
diff --git a/src/sound.c b/src/sound.c
index 7b94a8027..a95511ece 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -8,40 +8,39 @@
#include "songs.h"
#include "task.h"
-extern u16 SpeciesToCryId(u16);
-
struct Fanfare
{
u16 songNum;
u16 duration;
};
-extern u32 gBattleTypeFlags;
+// ewram
+EWRAM_DATA struct MusicPlayerInfo* gMPlay_PokemonCry = NULL;
+EWRAM_DATA u8 gPokemonCryBGMDuckingCounter = 0;
-extern struct MusicPlayerInfo *gMPlay_PokemonCry;
-extern u8 gPokemonCryBGMDuckingCounter;
+// iwram bss
+IWRAM_DATA static u16 sCurrentMapMusic;
+IWRAM_DATA static u16 sNextMapMusic;
+IWRAM_DATA static u8 sMapMusicState;
+IWRAM_DATA static u8 sMapMusicFadeInSpeed;
+IWRAM_DATA static u16 sFanfareCounter;
-extern u16 sCurrentMapMusic;
-extern u16 sNextMapMusic;
-extern u8 sMapMusicState;
-extern u8 sMapMusicFadeInSpeed;
-extern u16 sFanfareCounter;
-
-extern bool8 gDisableMusic;
+// iwram common
+bool8 gDisableMusic;
+extern u32 gBattleTypeFlags;
extern struct MusicPlayerInfo gMPlay_BGM;
extern struct MusicPlayerInfo gMPlay_SE1;
extern struct MusicPlayerInfo gMPlay_SE2;
extern struct MusicPlayerInfo gMPlay_SE3;
-
extern struct ToneData gCryTable[];
extern struct ToneData gCryTable2[];
-
extern const struct Fanfare sFanfares[];
+extern u16 SpeciesToCryId(u16);
+
static void Task_Fanfare(u8 taskId);
static void CreateFanfareTask(void);
-void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode);
static void Task_DuckBGMForPokemonCry(u8 taskId);
static void RestoreBGMVolumeAfterPokemonCry(void);
diff --git a/sym_bss.txt b/sym_bss.txt
index 4c116efb0..73309e148 100644
--- a/sym_bss.txt
+++ b/sym_bss.txt
@@ -221,20 +221,7 @@ gUnknown_03000F40: @ 3000F40
gUnknown_03000F44: @ 3000F44
.space 0x4
-sCurrentMapMusic: @ 3000F48
- .space 0x2
-
-sNextMapMusic: @ 3000F4A
- .space 0x2
-
-sMapMusicState: @ 3000F4C
- .space 0x1
-
-sMapMusicFadeInSpeed: @ 3000F4D
- .space 0x1
-
-sFanfareCounter: @ 3000F4E
- .space 0x2
+ .include "src/sound.o"
gUnknown_03000F50: @ 3000F50
.space 0x8
diff --git a/sym_common.txt b/sym_common.txt
index 55fb35c79..99a3f670a 100644
--- a/sym_common.txt
+++ b/sym_common.txt
@@ -300,9 +300,7 @@ gUnknown_03005DF0: @ 3005DF0
gUnknown_03005DF4: @ 3005DF4
.space 0x4
-gDisableMusic: @ 3005DF8
- .space 0x8
-
+ .include "sound.o"
.include "task.o"
gUnknown_03006080: @ 3006080
diff --git a/sym_ewram.txt b/sym_ewram.txt
index 03de17e8f..3c132a99c 100644
--- a/sym_ewram.txt
+++ b/sym_ewram.txt
@@ -885,13 +885,9 @@ gUnknown_02037624: @ 2037624
.space 0xF0
.include "src/palette.o"
-
- .align 0x2
-gMPlay_PokemonCry: @ 20383E8
- .space 0x4
-
-gPokemonCryBGMDuckingCounter: @ 20383EC
- .space 0x4
+ .include "src/sound.o"
+
+ .align 0x2
gUnknown_020383F0: @ 20383F0
.space 0x4