From 0792ea3c6bd3ae5aa43f02ae06bc891213ab6fe1 Mon Sep 17 00:00:00 2001 From: Donkey Kong Date: Fri, 24 May 2024 15:51:47 +0930 Subject: [PATCH] 41.9740% --- progress/progress.global_asm.csv | 2 +- progress/progress.total.csv | 2 +- progress/progress_global_asm.svg | 4 ++-- progress/progress_total.svg | 4 ++-- src/global_asm/code_36880.c | 31 ++++++++++++++++++++++++++++++- src/global_asm/code_A2F10.c | 6 +++--- 6 files changed, 39 insertions(+), 10 deletions(-) diff --git a/progress/progress.global_asm.csv b/progress/progress.global_asm.csv index 8178767..13013b5 100644 --- a/progress/progress.global_asm.csv +++ b/progress/progress.global_asm.csv @@ -3261,7 +3261,7 @@ us,asm,func_global_asm_8060AA58,224,no us,asm,func_global_asm_806DF3D0,124,yes us,asm,func_global_asm_80651BE0,76,yes us,asm,func_global_asm_80650684,100,yes -us,asm,func_global_asm_8063BEC0,116,no +us,asm,func_global_asm_8063BEC0,116,yes us,asm,func_global_asm_806A5868,1016,yes us,asm,func_global_asm_8071D0F0,368,yes us,asm,func_global_asm_806E6368,80,yes diff --git a/progress/progress.total.csv b/progress/progress.total.csv index 9bbac90..a0e0d5c 100644 --- a/progress/progress.total.csv +++ b/progress/progress.total.csv @@ -3261,7 +3261,7 @@ us,asm,func_global_asm_8060AA58,224,no us,asm,func_global_asm_806DF3D0,124,yes us,asm,func_global_asm_80651BE0,76,yes us,asm,func_global_asm_80650684,100,yes -us,asm,func_global_asm_8063BEC0,116,no +us,asm,func_global_asm_8063BEC0,116,yes us,asm,func_global_asm_806A5868,1016,yes us,asm,func_global_asm_8071D0F0,368,yes us,asm,func_global_asm_806E6368,80,yes diff --git a/progress/progress_global_asm.svg b/progress/progress_global_asm.svg index 51db408..5459b77 100644 --- a/progress/progress_global_asm.svg +++ b/progress/progress_global_asm.svg @@ -17,7 +17,7 @@ global_asm - 41.4376% - 41.4376% + 41.4471% + 41.4471% diff --git a/progress/progress_total.svg b/progress/progress_total.svg index f897356..9a5bb0b 100644 --- a/progress/progress_total.svg +++ b/progress/progress_total.svg @@ -17,7 +17,7 @@ Donkey Kong 64 (US) - 41.9669% - 41.9669% + 41.9740% + 41.9740% diff --git a/src/global_asm/code_36880.c b/src/global_asm/code_36880.c index f36b88f..b5a9eef 100644 --- a/src/global_asm/code_36880.c +++ b/src/global_asm/code_36880.c @@ -1743,7 +1743,36 @@ void func_global_asm_8063B4A4(void) { // big, object model 2 #pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_36880/func_global_asm_8063BBB0.s") -#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_36880/func_global_asm_8063BEC0.s") +typedef struct { + s16 unk0; + u8 unk2[0x117 - 0x2]; + u8 unk117; + u8 unk118[0x120 - 0x118]; + u8 unk120; + u8 unk121[0x250 - 0x121]; + u8 unk250; // Index into array at unk254 + u8 unk251[0x254 - 0x251]; + s32 unk254[1][16]; // TODO: What is this? Matrix array? Substruct array? +} Struct8063BEC0_arg0; + +void func_global_asm_8063BEC0(Struct8063BEC0_arg0 *arg0, s32 arg1, s16 arg2, s16 arg3) { + s32 found; + s32 i; + + found = FALSE; + for (i = 0; !found && i < arg1;) { + if (arg2 == arg0->unk0) { + found = TRUE; + } else { + i++; + arg0 = arg0->unk254[arg0->unk250]; + } + } + if (found) { + arg0->unk117 = arg3; + arg0->unk120 = 1; + } +} // object model 2 -> 0x48, 0x49, 0x4E, 0x7C -> 0x10, 0x12, 0x38, 0x94, 0x9A #pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_36880/func_global_asm_8063BF34.s") diff --git a/src/global_asm/code_A2F10.c b/src/global_asm/code_A2F10.c index da90964..f402fc0 100644 --- a/src/global_asm/code_A2F10.c +++ b/src/global_asm/code_A2F10.c @@ -758,10 +758,10 @@ void func_global_asm_806A0F78(Actor *arg0, u8 arg1, u8 arg2) { void func_global_asm_806A1008(u8 arg0, u8 arg1) { Actor *temp_a0; - s16 var_v0; + s16 i; - for (var_v0 = 0; var_v0 < D_global_asm_807FBB34; var_v0++) { - temp_a0 = D_global_asm_807FB930[var_v0].unk0; + for (i = 0; i < D_global_asm_807FBB34; i++) { + temp_a0 = D_global_asm_807FB930[i].unk0; if (temp_a0->unk58 == ACTOR_ROPE && (temp_a0->unk15F / 3) == arg0) { temp_a0->control_state = arg1; temp_a0->control_state_progress = 0;