This commit is contained in:
Donkey Kong 2023-05-29 19:07:40 +09:30
parent c04250222b
commit 595058cc89
12 changed files with 172 additions and 90 deletions

View File

@ -528,6 +528,18 @@ typedef struct another_additional_actor_data {
u8 unk13; // Used in func_806925AC
} AnotherAdditionalActorData;
typedef struct {
u8 unk0[0x27 - 0x0];
u8 unk27;
u8 unk28[0x36 - 0x28];
u8 unk36;
} RaaD_unk20_unk4;
typedef struct {
s32 unk0;
RaaD_unk20_unk4 *unk4;
} RaaD_unk20;
typedef struct race_additional_actor_data {
s16 unk0;
s16 unk2; // used
@ -542,7 +554,7 @@ typedef struct race_additional_actor_data {
u16 unk1C;
u8 unk1E;
s8 unk1F;
s32 unk20;
RaaD_unk20 *unk20; // Array
u8 unk24;
u8 unk25;
s8 unk26;

View File

@ -34,7 +34,7 @@ us,.code,func_8002EA14,104,yes
us,.code,func_8002C964,2252,no
us,.code,func_80028458,32,yes
us,.code,func_8002FF74,2324,no
us,.code,func_8002450C,24,no
us,.code,func_8002450C,24,yes
us,.code,func_800251A0,380,yes
us,.code,func_800292B0,272,yes
us,.code,func_80024FA8,504,yes

1 version section function length matching
34 us .code func_8002C964 2252 no
35 us .code func_80028458 32 yes
36 us .code func_8002FF74 2324 no
37 us .code func_8002450C 24 no yes
38 us .code func_800251A0 380 yes
39 us .code func_800292B0 272 yes
40 us .code func_80024FA8 504 yes

View File

@ -2285,7 +2285,7 @@ us,.code,func_80703AB0,584,no
us,.code,func_806CD988,24,yes
us,.code,func_8064EC60,264,no
us,.code,func_80682DF4,68,no
us,.code,func_8070DB7C,32,no
us,.code,func_8070DB7C,32,yes
us,.code,func_806FB418,96,yes
us,.code,func_8073C9C0,68,yes
us,.code,func_806FB490,644,no

1 version section function length matching
2285 us .code func_806CD988 24 yes
2286 us .code func_8064EC60 264 no
2287 us .code func_80682DF4 68 no
2288 us .code func_8070DB7C 32 no yes
2289 us .code func_806FB418 96 yes
2290 us .code func_8073C9C0 68 yes
2291 us .code func_806FB490 644 no

View File

@ -7,7 +7,7 @@ us,.code,func_8002CAC8,292,no
us,.code,func_800282D8,252,no
us,.code,func_800294A8,740,no
us,.code,func_80024634,92,yes
us,.code,func_8002D40C,148,no
us,.code,func_8002D40C,148,yes
us,.code,func_8002578C,24,yes
us,.code,func_8002F420,112,yes
us,.code,func_8002DF38,656,no
@ -34,7 +34,7 @@ us,.code,func_80026354,1996,no
us,.code,func_80027C60,136,yes
us,.code,func_8002F0AC,468,no
us,.code,func_8002DDA0,216,no
us,.code,func_8002D224,156,no
us,.code,func_8002D224,156,yes
us,.code,func_8002DB90,148,yes
us,.code,func_80028E20,564,no
us,.code,func_80027CE8,1024,no
@ -98,7 +98,7 @@ us,.code,func_80026098,328,no
us,.code,func_80028440,1680,no
us,.code,func_8002D524,520,no
us,.code,func_8002ED04,208,yes
us,.code,func_8002BC2C,132,no
us,.code,func_8002BC2C,132,yes
us,.code,func_8002E484,448,yes
us,.code,func_80025E9C,320,no
us,.code,func_80027920,472,no
@ -108,7 +108,7 @@ us,.code,func_8002C76C,860,no
us,.code,func_8002DA68,296,yes
us,.code,func_800257A4,472,no
us,.code,func_8002C2E8,852,no
us,.code,func_8002BCB0,36,no
us,.code,func_8002BCB0,36,yes
us,.code,func_8002D778,752,no
us,.code,func_8002E644,680,no
us,.code,func_8002D4A0,132,yes

1 version section function length matching
7 us .code func_800282D8 252 no
8 us .code func_800294A8 740 no
9 us .code func_80024634 92 yes
10 us .code func_8002D40C 148 no yes
11 us .code func_8002578C 24 yes
12 us .code func_8002F420 112 yes
13 us .code func_8002DF38 656 no
34 us .code func_80027C60 136 yes
35 us .code func_8002F0AC 468 no
36 us .code func_8002DDA0 216 no
37 us .code func_8002D224 156 no yes
38 us .code func_8002DB90 148 yes
39 us .code func_80028E20 564 no
40 us .code func_80027CE8 1024 no
98 us .code func_80028440 1680 no
99 us .code func_8002D524 520 no
100 us .code func_8002ED04 208 yes
101 us .code func_8002BC2C 132 no yes
102 us .code func_8002E484 448 yes
103 us .code func_80025E9C 320 no
104 us .code func_80027920 472 no
108 us .code func_8002DA68 296 yes
109 us .code func_800257A4 472 no
110 us .code func_8002C2E8 852 no
111 us .code func_8002BCB0 36 no yes
112 us .code func_8002D778 752 no
113 us .code func_8002E644 680 no
114 us .code func_8002D4A0 132 yes

View File

@ -2285,7 +2285,7 @@ us,.code,func_80703AB0,584,no
us,.code,func_806CD988,24,yes
us,.code,func_8064EC60,264,no
us,.code,func_80682DF4,68,no
us,.code,func_8070DB7C,32,no
us,.code,func_8070DB7C,32,yes
us,.code,func_806FB418,96,yes
us,.code,func_8073C9C0,68,yes
us,.code,func_806FB490,644,no
@ -3471,7 +3471,7 @@ us,.code,func_8002CAC8,292,no
us,.code,func_800282D8,252,no
us,.code,func_800294A8,740,no
us,.code,func_80024634,92,yes
us,.code,func_8002D40C,148,no
us,.code,func_8002D40C,148,yes
us,.code,func_8002578C,24,yes
us,.code,func_8002F420,112,yes
us,.code,func_8002DF38,656,no
@ -3498,7 +3498,7 @@ us,.code,func_80026354,1996,no
us,.code,func_80027C60,136,yes
us,.code,func_8002F0AC,468,no
us,.code,func_8002DDA0,216,no
us,.code,func_8002D224,156,no
us,.code,func_8002D224,156,yes
us,.code,func_8002DB90,148,yes
us,.code,func_80028E20,564,no
us,.code,func_80027CE8,1024,no
@ -3562,7 +3562,7 @@ us,.code,func_80026098,328,no
us,.code,func_80028440,1680,no
us,.code,func_8002D524,520,no
us,.code,func_8002ED04,208,yes
us,.code,func_8002BC2C,132,no
us,.code,func_8002BC2C,132,yes
us,.code,func_8002E484,448,yes
us,.code,func_80025E9C,320,no
us,.code,func_80027920,472,no
@ -3572,7 +3572,7 @@ us,.code,func_8002C76C,860,no
us,.code,func_8002DA68,296,yes
us,.code,func_800257A4,472,no
us,.code,func_8002C2E8,852,no
us,.code,func_8002BCB0,36,no
us,.code,func_8002BCB0,36,yes
us,.code,func_8002D778,752,no
us,.code,func_8002E644,680,no
us,.code,func_8002D4A0,132,yes
@ -3924,7 +3924,7 @@ us,.code,func_8002EA14,104,yes
us,.code,func_8002C964,2252,no
us,.code,func_80028458,32,yes
us,.code,func_8002FF74,2324,no
us,.code,func_8002450C,24,no
us,.code,func_8002450C,24,yes
us,.code,func_800251A0,380,yes
us,.code,func_800292B0,272,yes
us,.code,func_80024FA8,504,yes

1 version section function length matching
2285 us .code func_806CD988 24 yes
2286 us .code func_8064EC60 264 no
2287 us .code func_80682DF4 68 no
2288 us .code func_8070DB7C 32 no yes
2289 us .code func_806FB418 96 yes
2290 us .code func_8073C9C0 68 yes
2291 us .code func_806FB490 644 no
3471 us .code func_800282D8 252 no
3472 us .code func_800294A8 740 no
3473 us .code func_80024634 92 yes
3474 us .code func_8002D40C 148 no yes
3475 us .code func_8002578C 24 yes
3476 us .code func_8002F420 112 yes
3477 us .code func_8002DF38 656 no
3498 us .code func_80027C60 136 yes
3499 us .code func_8002F0AC 468 no
3500 us .code func_8002DDA0 216 no
3501 us .code func_8002D224 156 no yes
3502 us .code func_8002DB90 148 yes
3503 us .code func_80028E20 564 no
3504 us .code func_80027CE8 1024 no
3562 us .code func_80028440 1680 no
3563 us .code func_8002D524 520 no
3564 us .code func_8002ED04 208 yes
3565 us .code func_8002BC2C 132 no yes
3566 us .code func_8002E484 448 yes
3567 us .code func_80025E9C 320 no
3568 us .code func_80027920 472 no
3572 us .code func_8002DA68 296 yes
3573 us .code func_800257A4 472 no
3574 us .code func_8002C2E8 852 no
3575 us .code func_8002BCB0 36 no yes
3576 us .code func_8002D778 752 no
3577 us .code func_8002E644 680 no
3578 us .code func_8002D4A0 132 yes
3924 us .code func_8002C964 2252 no
3925 us .code func_80028458 32 yes
3926 us .code func_8002FF74 2324 no
3927 us .code func_8002450C 24 no yes
3928 us .code func_800251A0 380 yes
3929 us .code func_800292B0 272 yes
3930 us .code func_80024FA8 504 yes

View File

@ -17,7 +17,7 @@
<text x="19.0" y="14">boss</text>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="72.5" y="15" fill="#010101" fill-opacity=".3">13.4547%</text>
<text x="71.5" y="14">13.4547%</text>
<text x="72.5" y="15" fill="#010101" fill-opacity=".3">13.4881%</text>
<text x="71.5" y="14">13.4881%</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="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">25.1231%</text>
<text x="110.5" y="14">25.1231%</text>
<text x="111.5" y="15" fill="#010101" fill-opacity=".3">25.1257%</text>
<text x="110.5" y="14">25.1257%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -9,7 +9,7 @@
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h37v20H0z"/>
<path fill="#c03600" d="M37 0h67v20H37z"/>
<path fill="#c03a00" d="M37 0h67v20H37z"/>
<path fill="url(#b)" d="M0 0h104v20H0z"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
@ -17,7 +17,7 @@
<text x="18.5" y="14">race</text>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="71.5" y="15" fill="#010101" fill-opacity=".3">14.0244%</text>
<text x="70.5" y="14">14.0244%</text>
<text x="71.5" y="15" fill="#010101" fill-opacity=".3">15.0100%</text>
<text x="70.5" y="14">15.0100%</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">24.5258%</text>
<text x="165.5" y="14">24.5258%</text>
<text x="166.5" y="15" fill="#010101" fill-opacity=".3">24.5579%</text>
<text x="165.5" y="14">24.5579%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -2,7 +2,7 @@
#include "functions.h"
void func_8072AB74(s32, f32, f32, s32, f32);
s32 func_80024568(s32, s32, f32, f32, f32);
s32 func_80024568(s32, u8, f32, f32, f32);
#pragma GLOBAL_ASM("asm/nonmatchings/boss/code_0/func_80024000.s")
@ -111,19 +111,14 @@ void func_8002413C(void) {
// Jumptable
#pragma GLOBAL_ASM("asm/nonmatchings/boss/code_0/func_80024300.s")
#pragma GLOBAL_ASM("asm/nonmatchings/boss/code_0/func_8002450C.s")
typedef struct {
u8 unk0[0x6 - 0x0];
u8 unk6[1]; // TODO: How many elements?
} Struct8002450C;
void func_8002450C(u8 *, s32, u8);
/*
// TODO: t6 t7 regalloc...
void func_8002450C(u8 *arg0, s32 arg1, u8 arg2) {
s32 phi_1;
phi_1 = *(s32*)(&arg1);
arg0[(u8)(phi_1) + 6] = arg2;
void func_8002450C(Struct8002450C *arg0, u8 arg1, u8 arg2) {
arg0->unk6[arg1] = arg2;
}
*/
void func_80024524(u8 arg0, s16 arg1) {
AnimationStateUnk1C *temp_v0;
@ -167,16 +162,16 @@ void func_80024FA8(s32 arg0, s32 arg1, s32 arg2, u8 *arg3) {
switch (current_actor_pointer->control_state_progress) {
case 2:
while (arg3[i] != 0xFF) {
func_8002450C(arg1, arg3[i++] & 0xFF, 1);
func_8002450C(arg1, arg3[i++], 1);
}
current_actor_pointer->control_state_progress = 3;
return;
case 3:
while (arg3[i] != 0xFF) {
if ((current_actor_pointer->control_state == 0x27) || (current_actor_pointer->control_state == 0x2E)) {
phi_v0_2 = func_80024568(arg1, arg3[i++] & 0xFF, 50.0f, 70.0f, 90.0f);
phi_v0_2 = func_80024568(arg1, arg3[i++], 50.0f, 70.0f, 90.0f);
} else {
phi_v0_2 = func_80024568(arg1, arg3[i++] & 0xFF, 10.0f, 15.0f, 50.0f);
phi_v0_2 = func_80024568(arg1, arg3[i++], 10.0f, 15.0f, 50.0f);
}
}
if (phi_v0_2 != 0) {
@ -194,13 +189,13 @@ void func_800251A0(s32 arg0, s32 arg1, s32 arg2, u8 *arg3) {
switch (current_actor_pointer->control_state_progress) {
case 2:
while (arg3[i] != 0xFF) {
func_8002450C(arg1, arg3[i++] & 0xFF, 3);
func_8002450C(arg1, arg3[i++], 3);
}
current_actor_pointer->control_state_progress = 3;
break;
case 3:
while (arg3[i] != 0xFF) {
phi_v1 = func_80024568(arg1, arg3[i++] & 0xFF, 10.0f, 20.0f, 30.0f) & 0xFF;
phi_v1 = func_80024568(arg1, arg3[i++], 10.0f, 20.0f, 30.0f) & 0xFF;
}
if (phi_v1 != 0) {
current_actor_pointer->control_state_progress = 4;

View File

@ -249,17 +249,6 @@ void func_8070DA28(AAD_806A4DDC *arg0) {
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_112080/func_8070DA74.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_112080/func_8070DB7C.s")
/*
// TODO: Which struct is this?
void func_8070DB7C(void *arg0) {
func_8061134C(arg0->unk4);
}
*/
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_112080/func_8070DB9C.s")
typedef struct Struct8070DB9C Struct8070DB9C;
struct Struct8070DB9C {
@ -271,6 +260,12 @@ struct Struct8070DB9C {
Struct8070DB9C *unk8;
};
void func_8070DB7C(Struct8070DB9C *arg0) {
func_8061134C(arg0->unk4);
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_112080/func_8070DB9C.s")
/*
// TODO: Very close
void func_8070DB9C(Struct8070DB9C *arg0) {

View File

@ -256,14 +256,14 @@ void func_8002B6F4(RaceStruct7 *arg0, s32 arg1) {
#pragma GLOBAL_ASM("asm/nonmatchings/race/code_36B0/func_8002B964.s")
void func_80611690(void*);
void func_80611690(RaaD_unk20*);
void func_8002BBD0(Actor *arg0, s32 arg1) {
RaceAdditionalActorData *sp1C;
void *temp_v0;
RaaD_unk20 *temp_v0;
sp1C = arg0->RaaD;
temp_v0 = malloc(arg1 * 8);
temp_v0 = malloc(arg1 * sizeof(RaaD_unk20));
sp1C->unk20 = temp_v0;
func_80611690(temp_v0);
sp1C->unk1E = arg1;
@ -271,10 +271,79 @@ void func_8002BBD0(Actor *arg0, s32 arg1) {
arg0->control_state = 0;
}
#pragma GLOBAL_ASM("asm/nonmatchings/race/code_36B0/func_8002BC2C.s")
typedef struct {
s32 unk0;
s32 unk4;
s32 unk8;
s32 unkC;
s32 unk10;
s32 unk14;
s32 unk18;
s32 unk1C;
s32 unk20;
s8 unk24;
s8 unk25;
u8 unk26;
u8 unk27;
u8 unk28;
u8 unk29;
u8 unk2A;
u8 unk2B;
s32 unk2C;
s32 unk30;
u8 unk34;
s8 unk35;
u8 unk36;
u8 unk37;
u8 unk38;
u8 unk39;
s16 unk3A;
u16 unk3C;
s8 unk3E[0x45 - 0x3E];
u8 unk45;
s8 unk46;
u8 unk47;
u32 unk48;
} Struct8002D148_unk4;
// aaD use
#pragma GLOBAL_ASM("asm/nonmatchings/race/code_36B0/func_8002BCB0.s")
typedef struct {
s32 unk0;
Struct8002D148_unk4 *unk4;
} Struct8002D148;
u16 *func_8002E960(u8);
void func_8002BC2C(Actor *arg0, s32 arg1, s32 arg2, Struct8002D148_unk4 *arg3) {
u16 *temp_v0_2;
RaceAdditionalActorData *RaaD;
RaaD_unk20 *temp_v0;
RaaD = arg0->RaaD;
temp_v0 = RaaD->unk20;
temp_v0[arg1].unk0 = arg2;
temp_v0[arg1].unk4 = arg3;
arg3->unk45 = 0;
arg3->unk3A = 0;
arg3->unk37 = 1;
if (arg3->unk27 == 0) {
temp_v0_2 = func_8002E960(RaaD->unk26);
if (temp_v0_2 != NULL) {
arg3->unk3C = *temp_v0_2 - 1;
func_8002F36C(arg3, temp_v0_2);
}
arg3->unk48 = func_806C7C94(arg3->unk28);
}
}
void func_8002BCB0(Actor *arg0, s32 arg1, s32 *arg2, s32 *arg3) {
RaceAdditionalActorData *aaD;
RaaD_unk20 *temp_t0;
aaD = arg0->RaaD;
temp_t0 = aaD->unk20;
*arg2 = temp_t0[arg1].unk0;
*arg3 = temp_t0[arg1].unk4;
}
#pragma GLOBAL_ASM("asm/nonmatchings/race/code_36B0/func_8002BCD4.s")
@ -348,36 +417,6 @@ s32 func_8070E750(s32, s32, s32);
extern s32 D_8002FCD4[];
typedef struct {
s32 unk0;
s32 unk4;
s32 unk8;
s32 unkC;
s32 unk10;
s32 unk14;
s32 unk18;
s32 unk1C;
s32 unk20;
s8 unk24;
s8 unk25;
s8 unk26;
u8 unk27;
s32 unk28;
s32 unk2C;
s32 unk30;
u8 unk34;
s8 unk35;
u8 unk36;
s8 unk37[0x45 - 0x37];
u8 unk45;
s8 unk46;
} Struct8002D148_unk4;
typedef struct {
s32 unk0;
Struct8002D148_unk4 *unk4;
} Struct8002D148;
/*
// TODO: Regalloc
void func_8002D148(Struct8002D148 *arg0, u8 arg1) {
@ -401,8 +440,22 @@ void func_8002D148(Struct8002D148 *arg0, u8 arg1) {
}
*/
// RaaD->unk20 struct array use
#pragma GLOBAL_ASM("asm/nonmatchings/race/code_36B0/func_8002D224.s")
void func_8002D148(RaaD_unk20*, u8);
void func_8002D224(u8 arg0) {
RaaD_unk20 *var_s0;
s32 i;
RaceAdditionalActorData *RaaD;
RaaD = current_actor_pointer->RaaD;
var_s0 = RaaD->unk20;
current_actor_pointer->control_state = arg0;
for (i = 0; i < RaaD->unk1E; i++) {
if (var_s0[i].unk0 != 0) {
func_8002D148(&var_s0[i], arg0);
}
}
}
extern f32 D_800300E8;
@ -436,8 +489,33 @@ extern f32 D_800300F0;
// dx dy dz calculation
#pragma GLOBAL_ASM("asm/nonmatchings/race/code_36B0/func_8002D360.s")
// RaaD->unk20-> struct array 0x8 big loop
#pragma GLOBAL_ASM("asm/nonmatchings/race/code_36B0/func_8002D40C.s")
void func_8002D40C(void) {
s32 song;
s32 i;
RaceAdditionalActorData *RaaD;
RaaD_unk20_unk4 *temp_v0_2;
RaaD_unk20 *var_a0;
RaaD = current_actor_pointer->RaaD;
song = 0;
i = RaaD->unk1E - 1;
var_a0 = &RaaD->unk20[i];
while (song == 0 && i >= 0) {
if (RaaD->unk20[i].unk4->unk27 == 1) {
if (RaaD->unk20[i].unk4->unk36 != 0) {
song = 0x56;
} else {
song = 0x57;
}
}
i--;
var_a0--;
}
if (song == 0) {
song = 0x56;
}
playSong(song, 1.0f);
}
void func_8002D4A0(void) {
s32 song;
@ -463,6 +541,7 @@ void func_8002D4A0(void) {
playSong(song, phi_f0);
}
// RaaD 0x20 array
#pragma GLOBAL_ASM("asm/nonmatchings/race/code_36B0/func_8002D524.s")
void func_8002D72C(Actor *arg0) {
@ -655,6 +734,7 @@ f32 func_8002E1C8(Struct8002E1C8_arg0 *arg0, f32 arg1, Struct8002E1C8_arg2 *arg2
return var_f2;
}
// Doable, A178 & A17C stuff though
#pragma GLOBAL_ASM("asm/nonmatchings/race/code_36B0/func_8002E2C8.s")
void func_8002E464(s32 arg0, Actor *arg1) {