From c527da691689f1f7b0b900cdcef3333e03b84ee0 Mon Sep 17 00:00:00 2001 From: engineer124 Date: Fri, 12 Nov 2021 22:10:26 +1100 Subject: [PATCH] Import code_801A4EB0 data --- include/variables.h | 4 ++-- src/code/audio/code_801A4EB0.c | 33 +++++++++++++++++++++++++---- src/code/code_801A5BD0.c | 38 +++++++++++++++++----------------- tools/disasm/files.txt | 1 + 4 files changed, 51 insertions(+), 25 deletions(-) diff --git a/include/variables.h b/include/variables.h index a5adc2d93..06546f440 100644 --- a/include/variables.h +++ b/include/variables.h @@ -1821,9 +1821,9 @@ extern UNK_PTR D_801D8B24; // extern UNK_TYPE2 D_801D8BD0; // extern UNK_TYPE4 D_801D8BD4; // extern UNK_TYPE1 D_801D8BE0; -extern u8 D_801D8E3C; +// extern u8 D_801D8E3C; // extern UNK_TYPE4 D_801D8E40; -extern u16 D_801D8E44; +// extern u16 D_801D8E44; // extern UNK_TYPE1 D_801D8E48; // extern UNK_TYPE1 D_801D8E50; // extern UNK_TYPE1 D_801D8F70; diff --git a/src/code/audio/code_801A4EB0.c b/src/code/audio/code_801A4EB0.c index cdc5be6fb..9136477c1 100644 --- a/src/code/audio/code_801A4EB0.c +++ b/src/code/audio/code_801A4EB0.c @@ -1,7 +1,6 @@ #include "global.h" void func_801A5080(u16 arg0); - s32 func_801A5228(OSVoiceDictionary* dict); void func_801A53E8(u16 distance, u16 answerNum, u16 warning, u16 voiceLevel, u16 voiceRelLevel); s32 func_801A5808(void); @@ -10,10 +9,36 @@ s32 func_801A5680(u16 arg0); s32 func_801A54D0(u16 arg0); u8* func_801A54C4(void); -extern OSVoiceDictionary D_801D8BE0; extern OSVoiceHandle sVoiceHandle; -extern OSVoiceData* D_801D8E40; -extern u8 D_801D8E48; + +OSVoiceDictionary D_801D8BE0 = { + { + // "アトナンジカン" - "atonanjikan" - "How many hours" + { 0x83, 0x41, 0x83, 0x67, 0x83, 0x69, 0x83, 0x93, 0x83, 0x57, 0x83, 0x4A, 0x83, 0x93 }, + + // "ハイチーズ" - "haichīzu" - "say cheese" + { 0x83, 0x6E, 0x83, 0x43, 0x83, 0x60, 0x81, 0x5B, 0x83, 0x59 }, + + // "オキロー" - "okirō" - "wake up" + { 0x83, 0x49, 0x83, 0x4C, 0x83, 0x8D, 0x81, 0x5B }, + + // "オスワリ" - "osuwari" - "sit" + { 0x83, 0x49, 0x83, 0x58, 0x83, 0x8F, 0x83, 0x8A }, + + // "ミルク" - "miruku" - "milk" + { 0x83, 0x7E, 0x83, 0x8B, 0x83, 0x4E }, + + // "ハイヤー" - "haiyā" - "hiya!" + { 0x83, 0x6E, 0x83, 0x43, 0x83, 0x84, 0x81, 0x5B }, + }, + + 6, // number of words +}; + +u8 D_801D8E3C = 0; +OSVoiceData* D_801D8E40 = NULL; +u16 D_801D8E44 = 0xFFFF; +u8 D_801D8E48 = 0; void func_801A4EB0(void) { } diff --git a/src/code/code_801A5BD0.c b/src/code/code_801A5BD0.c index 8e9eafe64..0cafa50b1 100644 --- a/src/code/code_801A5BD0.c +++ b/src/code/code_801A5BD0.c @@ -1,25 +1,25 @@ #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; + /* 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 diff --git a/tools/disasm/files.txt b/tools/disasm/files.txt index e4bd66da0..625946f4c 100644 --- a/tools/disasm/files.txt +++ b/tools/disasm/files.txt @@ -578,6 +578,7 @@ 0x801D2E80 : "", # audio_heap? 0x801D3D90 : "", 0x801D55B0 : "", + 0x801D8BE0 : "code_801A4EB0", 0x801D8E50 : "code_801A51F0", 0x801D9090 : "",