This commit is contained in:
Donkey Kong 2024-05-06 11:34:56 +09:30
parent 863ac25dad
commit 02c57ba81e
7 changed files with 36 additions and 53 deletions

View File

@ -1377,7 +1377,7 @@ us,asm,func_global_asm_8062A844,8,yes
us,asm,func_global_asm_8072A714,200,yes
us,asm,func_global_asm_806C9658,108,yes
us,asm,func_global_asm_80660830,204,no
us,asm,func_global_asm_806C28B8,428,no
us,asm,func_global_asm_806C28B8,428,yes
us,asm,func_global_asm_8067A9F0,104,yes
us,asm,func_global_asm_806D8B08,1220,no
us,asm,func_global_asm_8064B900,224,yes

1 version section function length matching
1377 us asm func_global_asm_8072A714 200 yes
1378 us asm func_global_asm_806C9658 108 yes
1379 us asm func_global_asm_80660830 204 no
1380 us asm func_global_asm_806C28B8 428 no yes
1381 us asm func_global_asm_8067A9F0 104 yes
1382 us asm func_global_asm_806D8B08 1220 no
1383 us asm func_global_asm_8064B900 224 yes

View File

@ -1377,7 +1377,7 @@ us,asm,func_global_asm_8062A844,8,yes
us,asm,func_global_asm_8072A714,200,yes
us,asm,func_global_asm_806C9658,108,yes
us,asm,func_global_asm_80660830,204,no
us,asm,func_global_asm_806C28B8,428,no
us,asm,func_global_asm_806C28B8,428,yes
us,asm,func_global_asm_8067A9F0,104,yes
us,asm,func_global_asm_806D8B08,1220,no
us,asm,func_global_asm_8064B900,224,yes

1 version section function length matching
1377 us asm func_global_asm_8072A714 200 yes
1378 us asm func_global_asm_806C9658 108 yes
1379 us asm func_global_asm_80660830 204 no
1380 us asm func_global_asm_806C28B8 428 no yes
1381 us asm func_global_asm_8067A9F0 104 yes
1382 us asm func_global_asm_806D8B08 1220 no
1383 us asm func_global_asm_8064B900 224 yes

View File

@ -17,7 +17,7 @@
<text x="38.5" y="14">global_asm</text>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="111.5" y="15" fill="#010101" fill-opacity=".3">39.6200%</text>
<text x="110.5" y="14">39.6200%</text>
<text x="111.5" y="15" fill="#010101" fill-opacity=".3">39.6547%</text>
<text x="110.5" y="14">39.6547%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -17,7 +17,7 @@
<text x="66.0" y="14">Donkey Kong 64 (US)</text>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="166.5" y="15" fill="#010101" fill-opacity=".3">40.1797%</text>
<text x="165.5" y="14">40.1797%</text>
<text x="166.5" y="15" fill="#010101" fill-opacity=".3">40.2057%</text>
<text x="165.5" y="14">40.2057%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -90,50 +90,40 @@ void func_global_asm_8065F614(void) {
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_63EC0/func_global_asm_8065F678.s")
// close
// close, stack, regalloc
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_63EC0/func_global_asm_8065F964.s")
void func_global_asm_806545D4(s32 arg0, s32 arg1, s32 arg2, s32 arg3, f32 arg4, f32 arg5, s32 arg6, u8 arg7, f32 (*arg8)[4], s32 arg9, f32 *argA);
void func_global_asm_806545D4(s32 arg0, s32 arg1, s32 arg2, s32 arg3, f32 arg4, f32 arg5, f32 arg6, u8 arg7, f32 (*arg8)[4], s32 arg9, f32 *argA);
void func_global_asm_80657E24(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 *arg8, s32 *arg9, s32 *argA, s32 *argB);
/*
void func_global_asm_8065F964(GlobalASMStruct58 *arg0, f32 arg1, f32 arg2, s32 arg3, u8 arg4, f32 arg5[4][4], s32 arg6) {
s32 spB4;
s32 spB0;
s32 spAC;
s32 spA8;
f32 sp70;
void func_global_asm_8065F964(GlobalASMStruct58 *arg0, f32 arg1, f32 arg2, f32 arg3, u8 arg4, f32 arg5[4][4], s32 arg6) {
Chunk *chunk;
s32 i;
s32 var_s2;
s32 var_s3;
s32 var_s4;
s32 var_s5;
s32 spA8[4];
f32 sp70[4][4];
GlobalASMStruct58_unk0 *temp = arg0->unk0;
var_s2 = 0;
var_s3 = 0;
var_s4 = 0;
var_s5 = 0;
for (i = 0; i < arg0->unk0->unk67; i++) {
chunk = &chunk_array_pointer[arg0->unk0->unk50[i]];
if (chunk->loaded == 1) {
for (i = 0; i < temp->unk67; i++) {
chunk = &chunk_array_pointer[temp->unk50[i]];
if (chunk->loaded == TRUE) {
func_global_asm_80657E24(
var_s2,
var_s3,
var_s4,
var_s5,
chunk->deload1,
chunk->deload2,
chunk->deload3,
chunk->deload4,
&spB4,
&spB0,
&spAC,
&spA8);
var_s2 = spB4;
var_s3 = spB0;
var_s4 = spAC;
var_s5 = spA8;
var_s2, var_s3, var_s4, var_s5,
chunk->deload1, chunk->deload2, chunk->deload3, chunk->deload4,
&spA8[3], &spA8[2], &spA8[1], &spA8[0]
);
var_s2 = spA8[3];
var_s3 = spA8[2];
var_s4 = spA8[1];
var_s5 = spA8[0];
}
}
func_global_asm_806545D4(var_s2, var_s3, var_s4, var_s5, arg1, arg2, arg3, arg4, arg5, arg6, &sp70);

View File

@ -760,25 +760,25 @@ s32 func_global_asm_80689BAC(s16 arg0) {
return FALSE;
}
// Probably doable, looks like dxyz calculations in nested loops?
// doable, looks like dxyz calculation in an unrolled loop, probably similar to below
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_8D3E0/func_global_asm_80689C20.s")
f32 func_global_asm_80689DD4(f32 x, f32 y, f32 z) {
f32 dx, dy, dz;
f32 phi_f2;
f32 closest;
f32 d;
s32 i;
phi_f2 = 100000000.0f;
closest = 100000000.0f;
for (i = 0; i < cc_number_of_players; i++) {
if (character_change_array[i].does_player_exist) {
d = (x - character_change_array[i].look_at_eye_x) * (x - character_change_array[i].look_at_eye_x)
+ (y - character_change_array[i].look_at_eye_y) * (y - character_change_array[i].look_at_eye_y)
+ (z - character_change_array[i].look_at_eye_z) * (z - character_change_array[i].look_at_eye_z);
phi_f2 = MIN(d, phi_f2);
closest = MIN(d, closest);
}
}
return phi_f2;
return closest;
}
s32 func_global_asm_80689E98(s32 arg0) {

View File

@ -1102,19 +1102,14 @@ void func_global_asm_806C27DC(void) {
}
}
// Doable, floaty loop, rodata
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_C2A90/func_global_asm_806C28B8.s")
/*
// TODO: Float and stack nonsense
void func_global_asm_806C28B8(void) {
f64 temp_f20;
f32 sp78;
f32 sp74;
s32 sp70;
f32 temp_f20;
f32 x;
f32 y;
f32 z;
f32 phi_f2;
s16 i;
f64 phi_f0;
s32 pad;
phi_f2 = current_actor_pointer->animation_state->unk0->unk4;
if (phi_f2 > 83.0f) {
@ -1123,16 +1118,14 @@ void func_global_asm_806C28B8(void) {
}
if ((phi_f2 > 2.0f) && (phi_f2 < 90.0f)) {
if ((object_timer % 6U) == 0) {
temp_f20 = MIN(1, phi_f2 / 70.0) * 0.3;
temp_f20 = MIN(1, phi_f2 / 70.0);
for (i = 1; i < 5; i++) {
getBonePosition(current_actor_pointer, i, &sp78, &sp74, &sp70);
phi_f0 = MAX(0.15, temp_f20);
func_global_asm_806852C4(phi_f0, sp78, sp74 + 3.0f, sp70);
getBonePosition(current_actor_pointer, i, &x, &y, &z);
func_global_asm_806852C4(MAX(0.15, temp_f20 * 0.3), x, y + 3.0f, z);
}
}
}
}
*/
void func_global_asm_806C2A64(u8 arg0, u8 arg1, u8 arg2, f32 x, f32 y, f32 z, void *sprite, f32 scale) {
func_global_asm_807149A8(1000);