From 19d23cc89c5790737f7b73f70488c587126b97ec Mon Sep 17 00:00:00 2001 From: Banjo Kazooie Date: Sat, 30 Jul 2022 16:07:36 -0500 Subject: [PATCH] core2/code_C97F0.c done --- progress/progress_core2.svg | 4 ++-- progress/progress_total.svg | 6 +++--- src/core2/code_C97F0.c | 22 ++++++---------------- subyaml/core2.us.v10.yaml | 4 ++-- 4 files changed, 13 insertions(+), 23 deletions(-) diff --git a/progress/progress_core2.svg b/progress/progress_core2.svg index 0ec014ca..781156ce 100644 --- a/progress/progress_core2.svg +++ b/progress/progress_core2.svg @@ -17,7 +17,7 @@ core2 - 75.7875% - 75.7875% + 75.9106% + 75.9106% \ No newline at end of file diff --git a/progress/progress_total.svg b/progress/progress_total.svg index 3d80b6b1..f1e6f8b7 100644 --- a/progress/progress_total.svg +++ b/progress/progress_total.svg @@ -9,7 +9,7 @@ - + @@ -17,7 +17,7 @@ Banjo-Kazooie (us.v10) - 80.8998% - 80.8998% + 80.9705% + 80.9705% \ No newline at end of file diff --git a/src/core2/code_C97F0.c b/src/core2/code_C97F0.c index 8ad81866..de035130 100644 --- a/src/core2/code_C97F0.c +++ b/src/core2/code_C97F0.c @@ -30,10 +30,6 @@ extern Struct_core2_C97F0_1 D_803720B0[]; extern Struct_core2_C97F0_0 D_803724F4[]; extern s32 D_803725A8[4]; -/* .rodata */ -extern f64 D_80379340; -extern f64 D_80379348; - /* .bss */ extern struct{ Struct_core2_C97F0_1 *unk0; @@ -68,9 +64,6 @@ Struct_core2_C97F0_0 *func_803507CC(enum map_e map_id) { return NULL; } -#ifndef NONMATCHING -#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_C97F0/func_80350818.s") -#else void func_80350818(Gfx **gfx, Mtx **mtx, Vtx **vtx) { f32 spDC[3]; f32 spD0[3]; @@ -84,9 +77,12 @@ void func_80350818(Gfx **gfx, Mtx **mtx, Vtx **vtx) { f32 sp90[3]; s32 sp80[4]; - if(D_80386170.unk8); - temp_s1 = D_80386170.unk4; temp_s2 = D_80386170.unk0; + if(temp_s2 != NULL){ + + } + + temp_s1 = D_80386170.unk4; if (( temp_s1 != NULL) && D_8038617C.unk0) { func_8024C5CC(spDC); func_8024C764(spD0); @@ -128,7 +124,6 @@ void func_80350818(Gfx **gfx, Mtx **mtx, Vtx **vtx) { } } } -#endif void func_80350BC8(void){ if(D_80386170.unk4 != NULL){ @@ -136,21 +131,16 @@ void func_80350BC8(void){ } } -#ifndef NONMATCHING -#pragma GLOBAL_ASM("asm/nonmatchings/core2/code_C97F0/func_80350BFC.s") -#else void func_80350BFC(void) { D_80386170.unk4 = func_803507CC(map_get()); if (D_80386170.unk4 != NULL) { D_80386170.unk0 = func_80350780(D_80386170.unk4->unk10); D_80386170.unk8 = assetcache_get(0x882); - ml_vec3f_set_length(D_80386170.unk4->unk4, (2.0f*D_80276588) / 2.0f); + ml_vec3f_set_length(D_80386170.unk4->unk4, (2*(f32)D_80276588) / 2); D_8038617C.unk0 = 1; D_8038617C.unk1 = 0; } } -#endif - void func_80350CA4(void) { f32 sp54[3]; diff --git a/subyaml/core2.us.v10.yaml b/subyaml/core2.us.v10.yaml index 4e7bd881..be941501 100644 --- a/subyaml/core2.us.v10.yaml +++ b/subyaml/core2.us.v10.yaml @@ -365,7 +365,7 @@ segments: - [0xC8490, c, code_C8490] #DONE - [0xC8760, c, code_C8760] #DONE - [0xC89C0, c, code_C89C0] - - [0xC97F0, c, code_C97F0] + - [0xC97F0, c, code_C97F0] #DONE - [0xC9E70, c, code_C9E70] #DONE - [0xC9F00, c, code_C9F00] #DONE - [0xCB050, c, code_CB050] #DONE @@ -773,7 +773,7 @@ segments: - [0xF2340, .rodata, code_C8490] - [0xF2360, bin, data_F2360] - [0xF2390, bin, data_F2390] # .rodata, code_C89C0] - - [0xF23B0, bin, data_C97F0] # .rodata, code_C97F0] + - [0xF23B0, .rodata, code_C97F0] - [0xF23C0, bin, data_F23C0] - [0xF23F0, .rodata, code_CB050] - [0xF2460, bin, data_F2460]