From 3ab4bf67bd0becf1466b2cc2a63afbd19babeed1 Mon Sep 17 00:00:00 2001 From: engineer124 Date: Fri, 12 Nov 2021 17:02:01 +1100 Subject: [PATCH] Fix bss --- src/code/audio/code_801A51F0.c | 12 +----------- src/code/code_801A5BD0.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/src/code/audio/code_801A51F0.c b/src/code/audio/code_801A51F0.c index 325a28399..41ef0f98e 100644 --- a/src/code/audio/code_801A51F0.c +++ b/src/code/audio/code_801A51F0.c @@ -9,17 +9,7 @@ OSVoiceHandle sVoiceHandle; OSVoiceData D_801FD5C8; // Intermediate Voice Data during processsing? OSVoiceData D_801FD5E8; // Best Match Voice Data? u8 sVoiceMaskPattern[8]; - -// Maybe all the same? -// u8 D_801FD610[0x11B0]; -char D_801FD610[0x100]; -u8 D_801FD710[0x1B0]; -u8 D_801FD8C0[0x240]; -u8 D_801FDB00[0x600]; -u8 D_801FE100[0x3C0]; -u8 D_801FE4C0[0x180]; -u8 D_801FE640[0x90]; -u8 D_801FE6D0[0xF0]; +char D_801FD610[256]; // Data s8 D_801D8E50[96][3] = { diff --git a/src/code/code_801A5BD0.c b/src/code/code_801A5BD0.c index 32889dcb8..8e9eafe64 100644 --- a/src/code/code_801A5BD0.c +++ b/src/code/code_801A5BD0.c @@ -1,5 +1,36 @@ #include "global.h" +typedef struct { + /* 0x00 */ f32* posX; + /* 0x04 */ f32* posY; + /* 0x08 */ f32* posZ; + /* 0x0C */ f32* freqScale; + /* 0x10 */ f32* vol; + /* 0x14 */ s8* reverbAdd; + /* 0x18 */ f32 dist; + /* 0x1C */ u32 priority; // lower is more prioritized + /* 0x20 */ u16 sfxParams; + /* 0x22 */ u16 sfxId; + /* 0x25 */ u8 sfxUnk01; + /* 0x24 */ u8 sfxImportance; + /* 0x26 */ u8 state; // uses SfxState enum + /* 0x27 */ u8 freshness; + /* 0x28 */ u8 prev; + /* 0x29 */ u8 next; + /* 0x2A */ u8 channelIdx; + /* 0x2B */ u8 unk_2F; + /* 0x2C */ u8 token; +} SoundBankEntry; // size = 0x30 + +// gSoundBank +SoundBankEntry D_801FD710[9]; +SoundBankEntry D_801FD8C0[12]; +SoundBankEntry D_801FDB00[32]; +SoundBankEntry D_801FE100[20]; +SoundBankEntry D_801FE4C0[8]; +SoundBankEntry D_801FE640[3]; +SoundBankEntry D_801FE6D0[5]; + #pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A5BD0.s") #pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A5C28.s")