mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-25 11:14:15 +01:00
iwram and ewram vars to C
This commit is contained in:
parent
591837e3c3
commit
7ecdcc5ed8
1
common_syms/sound.txt
Normal file
1
common_syms/sound.txt
Normal file
@ -0,0 +1 @@
|
||||
gDisableMusic
|
@ -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);
|
||||
|
33
src/sound.c
33
src/sound.c
@ -8,40 +8,39 @@
|
||||
#include "songs.h"
|
||||
#include "task.h"
|
||||
|
||||
extern u16 SpeciesToCryId(u16);
|
||||
|
||||
struct Fanfare
|
||||
{
|
||||
u16 songNum;
|
||||
u16 duration;
|
||||
};
|
||||
|
||||
// ewram
|
||||
EWRAM_DATA struct MusicPlayerInfo* gMPlay_PokemonCry = NULL;
|
||||
EWRAM_DATA u8 gPokemonCryBGMDuckingCounter = 0;
|
||||
|
||||
// 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;
|
||||
|
||||
// iwram common
|
||||
bool8 gDisableMusic;
|
||||
|
||||
extern u32 gBattleTypeFlags;
|
||||
|
||||
extern struct MusicPlayerInfo *gMPlay_PokemonCry;
|
||||
extern u8 gPokemonCryBGMDuckingCounter;
|
||||
|
||||
extern u16 sCurrentMapMusic;
|
||||
extern u16 sNextMapMusic;
|
||||
extern u8 sMapMusicState;
|
||||
extern u8 sMapMusicFadeInSpeed;
|
||||
extern u16 sFanfareCounter;
|
||||
|
||||
extern bool8 gDisableMusic;
|
||||
|
||||
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);
|
||||
|
||||
|
15
sym_bss.txt
15
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
|
||||
|
@ -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
|
||||
|
@ -885,13 +885,9 @@ gUnknown_02037624: @ 2037624
|
||||
.space 0xF0
|
||||
|
||||
.include "src/palette.o"
|
||||
.include "src/sound.o"
|
||||
|
||||
.align 0x2
|
||||
gMPlay_PokemonCry: @ 20383E8
|
||||
.space 0x4
|
||||
|
||||
gPokemonCryBGMDuckingCounter: @ 20383EC
|
||||
.space 0x4
|
||||
.align 0x2
|
||||
|
||||
gUnknown_020383F0: @ 20383F0
|
||||
.space 0x4
|
||||
|
Loading…
Reference in New Issue
Block a user