From 1118d4a443d125e9c142b81956c7fc99e5f4e1cc Mon Sep 17 00:00:00 2001 From: Banjo Kazooie Date: Sun, 31 Jul 2022 19:35:50 -0500 Subject: [PATCH] core2/code_C5440.c done --- progress/progress_core2.svg | 4 ++-- progress/progress_total.svg | 4 ++-- src/core2/code_C5440.c | 17 +++++++++++++++-- subyaml/core2.us.v10.yaml | 2 +- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/progress/progress_core2.svg b/progress/progress_core2.svg index 18a3b56d..1d57add6 100644 --- a/progress/progress_core2.svg +++ b/progress/progress_core2.svg @@ -17,7 +17,7 @@ core2 - 75.9705% - 75.9705% + 75.9767% + 75.9767% \ No newline at end of file diff --git a/progress/progress_total.svg b/progress/progress_total.svg index 7e9b0d00..ef6abd6a 100644 --- a/progress/progress_total.svg +++ b/progress/progress_total.svg @@ -17,7 +17,7 @@ Banjo-Kazooie (us.v10) - 81.0048% - 81.0048% + 81.0084% + 81.0084% \ No newline at end of file diff --git a/src/core2/code_C5440.c b/src/core2/code_C5440.c index 3cf4bbc6..c009fb40 100644 --- a/src/core2/code_C5440.c +++ b/src/core2/code_C5440.c @@ -75,9 +75,22 @@ int func_8034C4CC(void){ return D_80386140.unk0 ? 1 : 0; } -#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_C5440/func_8034C4F0.s") +s32 func_8034C4F0(s32 arg0) { + u8 sp8[0xA8]; + u8 *temp_v1; + + temp_v1 = (s32)&sp8; + return *(s32*)(arg0 - (s32)(&temp_v1[8] - &temp_v1[0])); +} + +s16 func_8034C50C(s32 arg0) { + u8 sp8[0xA8]; + u8 *temp_v1; + + temp_v1 = (s32)&sp8; + return *(s16*)(arg0 - (s32)(&temp_v1[4] - &temp_v1[0])); +} -#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_C5440/func_8034C50C.s") Struct6Ds * func_8034C528(s32 arg0){ struct1Ds *iPtr; diff --git a/subyaml/core2.us.v10.yaml b/subyaml/core2.us.v10.yaml index be941501..e61c864a 100644 --- a/subyaml/core2.us.v10.yaml +++ b/subyaml/core2.us.v10.yaml @@ -352,7 +352,7 @@ segments: - [0xC3B20, c, code_C3B20] - [0xC4320, c, code_C4320] #DONE - [0xC4F40, c, code_C4F40] #DONE - - [0xC5440, c, code_C5440] + - [0xC5440, c, code_C5440] #DONE - [0xC5AF0, c, code_C5AF0] #DONE - [0xC5CC0, c, code_C5CC0] #DONE - [0xC5F00, c, code_C5F00] #DONE