From 716de8820ef3b9006013e6ce45bbaeede3a58934 Mon Sep 17 00:00:00 2001 From: engineer124 Date: Thu, 11 Nov 2021 19:13:53 +1100 Subject: [PATCH] Match func_801A4FD8 (mips2c got it matching directly) --- src/code/audio/code_801A4EB0.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/code/audio/code_801A4EB0.c b/src/code/audio/code_801A4EB0.c index 03d71c4b9..ee4c9f4e6 100644 --- a/src/code/audio/code_801A4EB0.c +++ b/src/code/audio/code_801A4EB0.c @@ -1,8 +1,11 @@ #include "global.h" +void func_801A5080(u16 arg0); + s32 func_801A5228(u8* arg0); void func_801A53E8(u16 arg0, u16 arg1, u16 arg2, u16 arg3, u16 arg4); + void func_801A5680(u16 arg0); void func_801A54D0(u16 arg0); u8* func_801A54C4(void); @@ -46,7 +49,26 @@ void func_801A4EB8(void) { } } -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A4EB0/func_801A4FD8.s") +void func_801A4FD8(void) { + s32 sp24; + OSMesgQueue* msgQ; + + func_801A54D0(0xFFFF); + if (D_801D8E3C != 0) { + msgQ = PadMgr_LockSerialMesgQueue(); + osVoiceStopReadData(&D_801FD5B8); + PadMgr_UnlockSerialMesgQueue(msgQ); + + sp24 = func_801A5228(&D_801D8BE0); + func_801A54D0(0xFFFF); + if (sp24 == 0) { + func_801A53E8(0x320, 2, 0x400, 0x1F4, 0x7D0); + D_801D8E3C = 1; + } + func_801A5080(5); + func_801A5080(1); + } +} void func_801A5080(u16 arg0) { if ((D_801D8E3C != 0) && (arg0 < 6)) {