From 39071f097a1f25c4939ac5f9eb34dabbf9c46661 Mon Sep 17 00:00:00 2001 From: Banjo Kazooie Date: Sat, 30 Jul 2022 15:58:23 -0500 Subject: [PATCH] core2/code_C9F00.c done --- progress/progress_core2.svg | 6 +++--- progress/progress_total.svg | 4 ++-- src/core2/code_C9F00.c | 39 +++++++++++++++---------------------- subyaml/core2.us.v10.yaml | 2 +- 4 files changed, 22 insertions(+), 29 deletions(-) diff --git a/progress/progress_core2.svg b/progress/progress_core2.svg index 880622a1..0ec014ca 100644 --- a/progress/progress_core2.svg +++ b/progress/progress_core2.svg @@ -9,7 +9,7 @@ - + @@ -17,7 +17,7 @@ core2 - 75.7777% - 75.7777% + 75.7875% + 75.7875% \ No newline at end of file diff --git a/progress/progress_total.svg b/progress/progress_total.svg index 9544e88b..3d80b6b1 100644 --- a/progress/progress_total.svg +++ b/progress/progress_total.svg @@ -17,7 +17,7 @@ Banjo-Kazooie (us.v10) - 80.8942% - 80.8942% + 80.8998% + 80.8998% \ No newline at end of file diff --git a/src/core2/code_C9F00.c b/src/core2/code_C9F00.c index 752ad94b..d6486a40 100644 --- a/src/core2/code_C9F00.c +++ b/src/core2/code_C9F00.c @@ -20,12 +20,17 @@ typedef struct { u32 unk6_6:6; u32 pad6_4:1; u16 unk8; - u16 padA_15:10; - u16 unkA_5:1; - u16 unkA_4:1; - u16 padA_3:2; - u16 unkA_1:1; - u16 padA_0:1; + union{ + struct{ + u16 padA_15:10; + u16 unkA_5:1; + u16 unkA_4:1; + u16 padA_3:2; + u16 unkA_1:1; + u16 padA_0:1; + }; + u16 unkA; + }; }Struct_Core2_C9F00_2; typedef struct { @@ -237,32 +242,20 @@ bool func_803515EC(Struct_Core2_C9F00_2 *arg0) { return TRUE; } -#ifndef NONMATCHING -bool func_80351700(Struct_Core2_C9F00_2 * arg0); -#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_C9F00/func_80351700.s") -#else bool func_80351700(Struct_Core2_C9F00_2 * arg0){ - // if ((arg0->unkA << 0x1E) < 0) { - if (arg0->unkA_1) { - return 1; + if (((arg0->unkA << 0x1E) >> 0x1F)) { + return TRUE; } - return 1; + return TRUE; } -#endif -#ifndef NONMATCHING -bool func_80351724(Struct_Core2_C9F00_2 * arg0); -#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_C9F00/func_80351724.s") -#else bool func_80351724(Struct_Core2_C9F00_2 * arg0){ - // if (arg0->unkA_1 && arg0->unkA_5) { - if (((arg0->unkA << 0x1E) < 0) && ((arg0->unkA << 0x1A) < 0)) { + if (((arg0->unkA << 0x1E) >> 0x1F) && ((arg0->unkA << 0x1A) >> 0x1F)) { arg0->unkA_5 = FALSE; arg0->unkA_4 = TRUE; } - return 1; + return TRUE; } -#endif s32 func_80351758(Struct68s *arg0){ if(arg0->unk0 == 0){ diff --git a/subyaml/core2.us.v10.yaml b/subyaml/core2.us.v10.yaml index 1b39d0bf..4e7bd881 100644 --- a/subyaml/core2.us.v10.yaml +++ b/subyaml/core2.us.v10.yaml @@ -367,7 +367,7 @@ segments: - [0xC89C0, c, code_C89C0] - [0xC97F0, c, code_C97F0] - [0xC9E70, c, code_C9E70] #DONE - - [0xC9F00, c, code_C9F00] + - [0xC9F00, c, code_C9F00] #DONE - [0xCB050, c, code_CB050] #DONE - [0xCB610, c, code_CB610] #DONE - [0xCB8A0, c, code_CB8A0] #DONE