This commit is contained in:
Donkey Kong 2024-05-24 18:30:05 +09:30
parent 0792ea3c6b
commit 122821883b
11 changed files with 181 additions and 55 deletions

View File

@ -28,7 +28,7 @@ us,.menu,func_menu_8002ACD4,124,yes
us,.menu,func_menu_80028D3C,364,yes us,.menu,func_menu_80028D3C,364,yes
us,.menu,func_menu_8002EF68,796,no us,.menu,func_menu_8002EF68,796,no
us,.menu,func_menu_8002AA98,144,yes us,.menu,func_menu_8002AA98,144,yes
us,.menu,func_menu_8002DBDC,780,no us,.menu,func_menu_8002DBDC,780,yes
us,.menu,func_menu_80025FB4,524,no us,.menu,func_menu_80025FB4,524,no
us,.menu,func_menu_8003264C,736,yes us,.menu,func_menu_8003264C,736,yes
us,.menu,func_menu_80025D44,72,yes us,.menu,func_menu_80025D44,72,yes

1 version section function length matching
28 us .menu func_menu_80028D3C 364 yes
29 us .menu func_menu_8002EF68 796 no
30 us .menu func_menu_8002AA98 144 yes
31 us .menu func_menu_8002DBDC 780 no yes
32 us .menu func_menu_80025FB4 524 no
33 us .menu func_menu_8003264C 736 yes
34 us .menu func_menu_80025D44 72 yes

View File

@ -3313,7 +3313,7 @@ us,.menu,func_menu_8002ACD4,124,yes
us,.menu,func_menu_80028D3C,364,yes us,.menu,func_menu_80028D3C,364,yes
us,.menu,func_menu_8002EF68,796,no us,.menu,func_menu_8002EF68,796,no
us,.menu,func_menu_8002AA98,144,yes us,.menu,func_menu_8002AA98,144,yes
us,.menu,func_menu_8002DBDC,780,no us,.menu,func_menu_8002DBDC,780,yes
us,.menu,func_menu_80025FB4,524,no us,.menu,func_menu_80025FB4,524,no
us,.menu,func_menu_8003264C,736,yes us,.menu,func_menu_8003264C,736,yes
us,.menu,func_menu_80025D44,72,yes us,.menu,func_menu_80025D44,72,yes

1 version section function length matching
3313 us .menu func_menu_80028D3C 364 yes
3314 us .menu func_menu_8002EF68 796 no
3315 us .menu func_menu_8002AA98 144 yes
3316 us .menu func_menu_8002DBDC 780 no yes
3317 us .menu func_menu_80025FB4 524 no
3318 us .menu func_menu_8003264C 736 yes
3319 us .menu func_menu_80025D44 72 yes

View File

@ -9,7 +9,7 @@
</mask> </mask>
<g mask="url(#anybadge_1)"> <g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h41v20H0z"/> <path fill="#555" d="M0 0h41v20H0z"/>
<path fill="#c09000" d="M41 0h67v20H41z"/> <path fill="#c09500" d="M41 0h67v20H41z"/>
<path fill="url(#b)" d="M0 0h108v20H0z"/> <path fill="url(#b)" d="M0 0h108v20H0z"/>
</g> </g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
@ -17,7 +17,7 @@
<text x="20.5" y="14">menu</text> <text x="20.5" y="14">menu</text>
</g> </g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="75.5" y="15" fill="#010101" fill-opacity=".3">37.4902%</text> <text x="75.5" y="15" fill="#010101" fill-opacity=".3">38.7634%</text>
<text x="74.5" y="14">37.4902%</text> <text x="74.5" y="14">38.7634%</text>
</g> </g>
</svg> </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> <text x="66.0" y="14">Donkey Kong 64 (US)</text>
</g> </g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"> <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">41.9740%</text> <text x="166.5" y="15" fill="#010101" fill-opacity=".3">42.0213%</text>
<text x="165.5" y="14">41.9740%</text> <text x="165.5" y="14">42.0213%</text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -77,10 +77,10 @@ extern s32 D_global_asm_80720120;
s32 func_global_asm_80725BA4(s16, s16, s32); s32 func_global_asm_80725BA4(s16, s16, s32);
// close
#pragma GLOBAL_ASM("asm/nonmatchings/boss/code_6240/func_boss_8002A240.s") #pragma GLOBAL_ASM("asm/nonmatchings/boss/code_6240/func_boss_8002A240.s")
/* /*
// TODO: Quite close
void func_boss_8002A240(void) { void func_boss_8002A240(void) {
Actor17C *temp_s0; Actor17C *temp_s0;
f32 temp_f10; f32 temp_f10;

View File

@ -253,6 +253,7 @@ void func_global_asm_80732158(Actor *arg0) {
} }
*/ */
// close
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_136820/func_global_asm_80732280.s") #pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_136820/func_global_asm_80732280.s")
/* /*

View File

@ -6,20 +6,30 @@
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_79890/func_global_asm_80674E14.s") #pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_79890/func_global_asm_80674E14.s")
// Matrix nonsense // Matrix nonsense, close
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_79890/func_global_asm_80675180.s") #pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_79890/func_global_asm_80675180.s")
typedef struct {
u8 unk0[0x70 - 0x0];
Mtx *unk70;
Mtx (*unk74)[1];
} Struct80675180_arg0;
typedef struct {
u8 unk0[0x20 - 0x0];
u32 unk20;
} Struct80675180_arg4;
/* /*
void func_global_asm_80675180(void *arg0, f32 arg1, f32 arg2, f32 arg3, void *arg4, f32 *arg5, f32 *arg6, f32 *arg7) { void func_global_asm_80675180(Struct80675180_arg0 *arg0, f32 arg1, f32 arg2, f32 arg3, Struct80675180_arg4 *arg4, f32 *arg5, f32 *arg6, f32 *arg7) {
f32 sp70[4][4]; f32 sp70[4][4];
f32 sp30[4][4]; f32 sp30[4][4];
u32 temp_v0; u8 temp = D_global_asm_807444FC;
temp_v0 = arg4->unk20; if (arg4->unk20 == -1) {
if (temp_v0 == -1) { memcpy(sp70, arg0->unk70, 0x40);
memcpy(&sp70[0], arg0->unk70, 0x40);
} else { } else {
guMtxL2F(&sp70[0], ((temp_v0 >> 6) << 6) + (arg0 + (D_global_asm_807444FC * 4))->unk74); guMtxL2F(sp70, &arg0->unk74[temp][arg4->unk20]);
} }
func_global_asm_8062FF10(sp30, sp70); func_global_asm_8062FF10(sp30, sp70);
guMtxXFMF(sp30, arg1, arg2, arg3, arg5, arg6, arg7); guMtxXFMF(sp30, arg1, arg2, arg3, arg5, arg6, arg7);

View File

@ -27,35 +27,20 @@ typedef struct menu_struct_1 {
u8 unk12; u8 unk12;
} MenuStruct1; } MenuStruct1;
// TODO: Array of structs? typedef struct {
const u16 D_menu_80033A50[] = { s16 unk0; // TODO: Is this an array[4]?
0x0000, // Donkey s16 unk2;
0x000B, s16 unk4;
0x000F, s16 unk6;
0x0014, } MenuStruct80033A50;
0x0000, // Diddy
0x000C,
0x0010,
0x0015,
0x0000, // Lanky
0x000E,
0x0013,
0x0016,
0x0000, // Tiny
0x000D,
0x0011,
0x0017,
0x0000, // Chunky
0x000D,
0x0012,
0x0018,
};
const u16 D_menu_80033A78[] = { const MenuStruct80033A50 D_menu_80033A50[] = {
0x0000, // Krusha? {0x0000, 0x000B, 0x000F, 0x0014}, // Donkey
0x0019, {0x0000, 0x000C, 0x0010, 0x0015}, // Diddy
0x001A, {0x0000, 0x000E, 0x0013, 0x0016}, // Lanky
0x001B, {0x0000, 0x000D, 0x0011, 0x0017}, // Tiny
{0x0000, 0x000D, 0x0012, 0x0018}, // Chunky
{0x0000, 0x0019, 0x001A, 0x001B}, // Krusha
}; };
extern u8 D_menu_800334DC[]; extern u8 D_menu_800334DC[];
@ -566,6 +551,8 @@ void func_menu_80026874(MenuStruct1 *arg0, CharacterProgress *arg1) {
// Jumptable // Jumptable
#pragma GLOBAL_ASM("asm/nonmatchings/menu/code_1AF0/func_menu_80026B28.s") #pragma GLOBAL_ASM("asm/nonmatchings/menu/code_1AF0/func_menu_80026B28.s")
extern s16 D_menu_800334E4[];
// Jumptable, very close // Jumptable, very close
// https://decomp.me/scratch/ssEq8 // https://decomp.me/scratch/ssEq8
#pragma GLOBAL_ASM("asm/nonmatchings/menu/code_1AF0/func_menu_80026DAC.s") #pragma GLOBAL_ASM("asm/nonmatchings/menu/code_1AF0/func_menu_80026DAC.s")

View File

@ -731,9 +731,39 @@ void func_menu_80029EF8(Actor *arg0, s32 arg1) {
func_menu_8002FC1C(arg0, MaaD, 1); func_menu_8002FC1C(arg0, MaaD, 1);
} }
// Displaylist stuff // Displaylist stuff, close, doable
#pragma GLOBAL_ASM("asm/nonmatchings/menu/code_3E10/func_menu_8002A088.s") #pragma GLOBAL_ASM("asm/nonmatchings/menu/code_3E10/func_menu_8002A088.s")
/*
Gfx *func_menu_8002A088(Actor *arg0, Gfx *dl) {
f32 sp118;
f32 sp114;
u8 unk108[0x114 - 0x108];
s16 sp106;
s8 sp3C[0x106 - 0x3C];
Struct800317E8 *aaD;
s16 temp_f4;
aaD = arg0->additional_actor_data;
gDPSetPrimColor(dl++, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF);
func_menu_800317E8(aaD, 160.0f, 25.0f, &sp118, &sp114, 5, 0, 0.45f);
sp106 = sp118 * 4.0f;
temp_f4 = (sp114 * 4.0f);
if (func_menu_800322D0(D_menu_80033F48)) {
sprintf(&sp3C, "%s", label_string_pointer_array[6]);
} else {
sprintf(&sp3C, "%s %d", label_string_pointer_array[7], D_menu_80033F48 + 1);
}
dl = printText(dl, sp106, temp_f4, 0.6f, &sp3C);
dl = printText(dl, sp118 * 4.0f, temp_f4 - 60, 0.6f, label_string_pointer_array[8]);
func_menu_800317E8(aaD, 160.0f, 80.0f, &sp118, &sp114, 5, 0, 2.0f);
dl = printText(dl, sp118 * 4.0f, sp114 * 4.0f, 0.6f, label_string_pointer_array[9]);
func_menu_800317E8(aaD, 80.0f, 120.0f, &sp118, &sp114, 5, 0, 2.0f);
dl = printText(dl, sp118 * 4.0f, sp114 * 4.0f, 0.6f, label_string_pointer_array[10]);
return printText(dl, 1280 - (s32)(sp118 * 4.0f), sp114 * 4.0f, 0.6f, label_string_pointer_array[11]);
}
*/
void func_menu_8002A36C(Actor *arg0, s32 arg1) { void func_menu_8002A36C(Actor *arg0, s32 arg1) {
MenuAdditionalActorData *MaaD = arg0->MaaD; MenuAdditionalActorData *MaaD = arg0->MaaD;
@ -1350,8 +1380,52 @@ void func_menu_8002D8AC(Actor *arg0, s32 arg1) {
} }
} }
// Jumptable, 780 bytes of code, displaylist stuff Gfx *func_menu_8002F980(Gfx *, Struct800317E8 *, s8 **, s8, u32 *, s32, f32 *, f32, s32); // extern
#pragma GLOBAL_ASM("asm/nonmatchings/menu/code_3E10/func_menu_8002DBDC.s") extern s16 D_menu_80033674;
Gfx *func_menu_8002DBDC(Actor *arg0, Gfx *dl) {
Struct800317E8 *aaD;
u32 sp68;
f32 x;
f32 sp60;
f32 sp5C;
s32 pad6;
s16 y;
s32 pad;
s32 pad2;
s32 pad3;
s32 pad4;
s32 pad5;
s32 pad7;
aaD = arg0->additional_actor_data;
global_properties_bitfield &= ~0x10;
func_menu_800317E8(aaD, 160.0f, 20.0f, &x, &sp60, D_menu_800338FC, 0, 1.5f);
dl = printStyledText(dl, 1, 640, sp60 * 4.0f, label_string_pointer_array[41], 0x81);
dl = func_menu_8002F980(dl, aaD, &label_string_pointer_array[42], D_menu_800338FC, &sp68, 1, &sp5C, 80.0f, -1);
D_menu_80033674 = 1000;
func_menu_800317E8(aaD, 160.0f, 150.0f, &x, &sp60, 2, 0, 1.5f);
y = sp60 * 4.0f;
x = (x - sp5C) * 4.0f;
switch (sp68) {
case 0:
dl = printStyledText(dl, 1, x, y + 64, label_string_pointer_array[47 + widescreen_enabled], 0x81);
break;
case 1:
dl = printStyledText(dl, 1, x, y + 64, label_string_pointer_array[49 + story_skip], 0x81);
break;
case 2:
D_menu_80033674 = 0;
break;
case 3:
dl = printStyledText(dl, 1, x, y + 64, label_string_pointer_array[52 + D_global_asm_80744530], 0x81);
break;
case 4:
dl = printStyledText(dl, 1, x, y + 64, label_string_pointer_array[51], 0x81);
break;
}
return dl;
}
void func_menu_8002DEE8(Actor *arg0, s32 arg1) { void func_menu_8002DEE8(Actor *arg0, s32 arg1) {
MenuAdditionalActorData *MaaD = arg0->MaaD; MenuAdditionalActorData *MaaD = arg0->MaaD;
@ -2009,6 +2083,7 @@ typedef struct {
/* /*
f32 func_menu_80031980(Struct80031980 *arg0, f32 arg1, f32 *arg2) { f32 func_menu_80031980(Struct80031980 *arg0, f32 arg1, f32 *arg2) {
// TODO: These are possibly volatile
f32 temp = ( (2.0f * arg0->unk0) + (-2.0f * arg0->unk4) + arg0->unk8) + arg0->unkC; f32 temp = ( (2.0f * arg0->unk0) + (-2.0f * arg0->unk4) + arg0->unk8) + arg0->unkC;
f32 temp2 = ((-3.0f * arg0->unk0) + (3.0f * arg0->unk4) + (-2.0f * arg0->unk8)) - arg0->unkC; f32 temp2 = ((-3.0f * arg0->unk0) + (3.0f * arg0->unk4) + (-2.0f * arg0->unk8)) - arg0->unkC;
if (arg2 != NULL) { if (arg2 != NULL) {
@ -2237,8 +2312,8 @@ void func_menu_80032024(void) {
} }
*/ */
s32 func_menu_800322D0(s32 arg0) { s32 func_menu_800322D0(s32 fileIndex) {
return !func_global_asm_8060C6B8(0xD, 0, 0, arg0); return !func_global_asm_8060C6B8(0xD, 0, 0, fileIndex);
} }
extern s16 D_global_asm_807FC828[]; extern s16 D_global_asm_807FC828[];

View File

@ -238,20 +238,72 @@ void *func_multiplayer_800245B0(Gfx *dl, s16 *arg1, s32 arg2, void *arg3, s32 ar
// Displaylist stuff // Displaylist stuff
#pragma GLOBAL_ASM("asm/nonmatchings/multiplayer/code_0/func_multiplayer_800246EC.s") #pragma GLOBAL_ASM("asm/nonmatchings/multiplayer/code_0/func_multiplayer_800246EC.s")
// Displaylist stuff // Displaylist stuff, close, float, doable
#pragma GLOBAL_ASM("asm/nonmatchings/multiplayer/code_0/func_multiplayer_800249D8.s") #pragma GLOBAL_ASM("asm/nonmatchings/multiplayer/code_0/func_multiplayer_800249D8.s")
s32 func_multiplayer_80024254(s32);
Gfx *func_multiplayer_800246EC(Gfx *, void *, f32);
extern s16 D_global_asm_80744490;
extern s16 D_global_asm_80744494;
typedef struct {
u8 unk0[0x6 - 0x0];
s16 unk6;
} AAD_800249D8_unk20;
typedef struct {
u8 unk0[0x20 - 0x0];
AAD_800249D8_unk20 *unk20;
u8 unk24[0x30 - 0x24];
s32 unk30;
} AAD_800249D8;
/*
Gfx *func_multiplayer_800249D8(Gfx *dl, Actor *arg1) {
char sp98[1];
f32 x;
f32 y;
f32 temp_f20;
f32 temp_f24;
s32 i;
AAD_800249D8 *aaD;
aaD = arg1->additional_actor_data;
temp_f24 = (f32)D_global_asm_80744490 / (cc_number_of_players + 1);
temp_f20 = aaD->unk20->unk6 + 8;
gDPSetScissor(dl++, G_SC_NON_INTERLACE, 0, 0, D_global_asm_80744490, D_global_asm_80744494);
dl = func_multiplayer_800246EC(dl, aaD, temp_f24);
if (D_global_asm_807552E8 != 3) {
gDPSetPrimColor(dl++, 0, 0, 0xFF, 0xFF, 0xFF, 0xB4);
gSPDisplayList(dl++, &D_1000118);
gSPMatrix(dl++, &D_20000C0, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
gSPMatrix(dl++, aaD->unk30, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPPipeSync(dl++);
gDPSetCombineMode(dl++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor(dl++, 0, 0, 0xFF, 0xFF, 0xFF, 0xB4);
for (i = 0; i < cc_number_of_players;) {
sprintf(&sp98, "%d", func_multiplayer_80024254(i));
y = (temp_f20 + 8.0f) * 8.0f;
i++;
x = ((i * temp_f24) - ((f32)(getCenterOfString(1, &sp98) * 0.25))) * 8.0f;
dl = printStyledText(dl, 1, x, y, &sp98, 4);
}
}
return dl;
}
*/
// Displaylist stuff // Displaylist stuff
#pragma GLOBAL_ASM("asm/nonmatchings/multiplayer/code_0/func_multiplayer_80024CA4.s") #pragma GLOBAL_ASM("asm/nonmatchings/multiplayer/code_0/func_multiplayer_80024CA4.s")
// Displaylist stuff // Displaylist stuff, close
#pragma GLOBAL_ASM("asm/nonmatchings/multiplayer/code_0/func_multiplayer_80025264.s") #pragma GLOBAL_ASM("asm/nonmatchings/multiplayer/code_0/func_multiplayer_80025264.s")
Gfx *func_multiplayer_800249D8(Gfx *); Gfx *func_multiplayer_800249D8(Gfx *, Actor *);
Gfx *func_multiplayer_80024CA4(Gfx *); Gfx *func_multiplayer_80024CA4(Gfx *, Actor *);
/* /*
Gfx *func_multiplayer_80025264(Gfx *dl) { Gfx *func_multiplayer_80025264(Gfx *dl, Actor *arg1) {
s32 temp_t0; s32 temp_t0;
temp_t0 = (D_global_asm_807552E4.unk8 >= 2); temp_t0 = (D_global_asm_807552E4.unk8 >= 2);
@ -262,10 +314,10 @@ Gfx *func_multiplayer_80025264(Gfx *dl) {
if (!(global_properties_bitfield & 3)) { if (!(global_properties_bitfield & 3)) {
if (D_global_asm_807552E4.unk0 == 0) { if (D_global_asm_807552E4.unk0 == 0) {
if ((D_global_asm_807552E4.unk8 == 1) || (temp_t0)) { if ((D_global_asm_807552E4.unk8 == 1) || (temp_t0)) {
dl = func_multiplayer_800249D8(dl); dl = func_multiplayer_800249D8(dl, arg1);
} }
} else if ((D_global_asm_807552E4.unk8 == 1) || (temp_t0)) { } else if ((D_global_asm_807552E4.unk8 == 1) || (temp_t0)) {
dl = func_multiplayer_80024CA4(dl); dl = func_multiplayer_80024CA4(dl, arg1);
} }
} }
return dl; return dl;

View File

@ -9,3 +9,4 @@ D_arcade_8004A310 = 0x8004A310;
D_arcade_8004A314 = 0x8004A314; D_arcade_8004A314 = 0x8004A314;
D_arcade_8004A75C = 0x8004A75C; D_arcade_8004A75C = 0x8004A75C;
D_arcade_8004A784 = 0x8004A784; D_arcade_8004A784 = 0x8004A784;
D_menu_80033A78 = 0x80033A78;