This commit is contained in:
Donkey Kong 2024-02-28 03:40:52 +10:30
parent e7b3e8a14b
commit cce2d00454
8 changed files with 225 additions and 38 deletions

View File

@ -33,7 +33,7 @@ Actor *func_global_asm_807271F4(s16 arg0, s16 arg1, s16 arg2, s16 arg3, s16 arg4
Gfx *func_global_asm_8068C5A8(Gfx *, u16, s32, s32, s32, s32, s32, s32, f32, f32, s32, f32);
// TODO: What do the params mean?
void playCutscene(Actor*, s16, s32);
s32 playCutscene(Actor*, s16, s32);
void playSong(s32, f32);
void playSound(s16, s16, f32, f32, s32, s32);

View File

@ -6,7 +6,7 @@ us,.critter,func_critter_800255C4,528,no
us,.critter,func_critter_80028120,1824,no
us,.critter,func_critter_80026FD0,100,yes
us,.critter,func_critter_80026C9C,368,no
us,.critter,func_critter_80024154,296,no
us,.critter,func_critter_80024154,296,yes
us,.critter,func_critter_80024B78,272,yes
us,.critter,func_critter_800288A8,500,no
us,.critter,func_critter_80026B78,292,yes
@ -42,7 +42,7 @@ us,.critter,func_critter_8002516C,916,no
us,.critter,func_critter_80025D1C,156,yes
us,.critter,func_critter_800257D4,220,yes
us,.critter,func_critter_80028A9C,844,no
us,.critter,func_critter_8002427C,528,no
us,.critter,func_critter_8002427C,528,yes
us,.critter,func_critter_80025500,196,yes
us,.critter,func_critter_800262C0,120,yes
us,.critter,func_critter_8002904C,196,no

1 version section function length matching
6 us .critter func_critter_80028120 1824 no
7 us .critter func_critter_80026FD0 100 yes
8 us .critter func_critter_80026C9C 368 no
9 us .critter func_critter_80024154 296 no yes
10 us .critter func_critter_80024B78 272 yes
11 us .critter func_critter_800288A8 500 no
12 us .critter func_critter_80026B78 292 yes
42 us .critter func_critter_80025D1C 156 yes
43 us .critter func_critter_800257D4 220 yes
44 us .critter func_critter_80028A9C 844 no
45 us .critter func_critter_8002427C 528 no yes
46 us .critter func_critter_80025500 196 yes
47 us .critter func_critter_800262C0 120 yes
48 us .critter func_critter_8002904C 196 no

View File

@ -3623,7 +3623,7 @@ us,.critter,func_critter_800255C4,528,no
us,.critter,func_critter_80028120,1824,no
us,.critter,func_critter_80026FD0,100,yes
us,.critter,func_critter_80026C9C,368,no
us,.critter,func_critter_80024154,296,no
us,.critter,func_critter_80024154,296,yes
us,.critter,func_critter_80024B78,272,yes
us,.critter,func_critter_800288A8,500,no
us,.critter,func_critter_80026B78,292,yes
@ -3659,7 +3659,7 @@ us,.critter,func_critter_8002516C,916,no
us,.critter,func_critter_80025D1C,156,yes
us,.critter,func_critter_800257D4,220,yes
us,.critter,func_critter_80028A9C,844,no
us,.critter,func_critter_8002427C,528,no
us,.critter,func_critter_8002427C,528,yes
us,.critter,func_critter_80025500,196,yes
us,.critter,func_critter_800262C0,120,yes
us,.critter,func_critter_8002904C,196,no

1 version section function length matching
3623 us .critter func_critter_80028120 1824 no
3624 us .critter func_critter_80026FD0 100 yes
3625 us .critter func_critter_80026C9C 368 no
3626 us .critter func_critter_80024154 296 no yes
3627 us .critter func_critter_80024B78 272 yes
3628 us .critter func_critter_800288A8 500 no
3629 us .critter func_critter_80026B78 292 yes
3659 us .critter func_critter_80025D1C 156 yes
3660 us .critter func_critter_800257D4 220 yes
3661 us .critter func_critter_80028A9C 844 no
3662 us .critter func_critter_8002427C 528 no yes
3663 us .critter func_critter_80025500 196 yes
3664 us .critter func_critter_800262C0 120 yes
3665 us .critter func_critter_8002904C 196 no

View File

@ -9,7 +9,7 @@
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h50v20H0z"/>
<path fill="#c08700" d="M50 0h67v20H50z"/>
<path fill="#c09500" d="M50 0h67v20H50z"/>
<path fill="url(#b)" d="M0 0h117v20H0z"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
@ -17,7 +17,7 @@
<text x="25.0" y="14">critter</text>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="84.5" y="15" fill="#010101" fill-opacity=".3">35.1279%</text>
<text x="83.5" y="14">35.1279%</text>
<text x="84.5" y="15" fill="#010101" fill-opacity=".3">38.7882%</text>
<text x="83.5" y="14">38.7882%</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">34.6205%</text>
<text x="165.5" y="14">34.6205%</text>
<text x="166.5" y="15" fill="#010101" fill-opacity=".3">34.6705%</text>
<text x="165.5" y="14">34.6705%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -76,5 +76,106 @@ s32 func_bonus_80024D8C(void) {
}
}
// Jumptable
// Jumptable, close, doable
#pragma GLOBAL_ASM("asm/nonmatchings/bonus/code_0/func_bonus_80024E38.s")
extern void *D_global_asm_8076D1F8;
typedef struct {
u16 unk0;
s16 unk2;
s32 unk4;
s16 unk8;
s16 unkA;
s32 unkC;
s32 unk10;
s32 unk14;
u16 unk18;
} A178_80024E38;
void func_global_asm_806A5DF0(s32, f32, f32, f32, s32, s32, s32, s32);
void func_global_asm_80737638(void * arg0, enum sfx_e arg1, u32 arg2 , u32 arg3, f32 arg4, u32 arg5, u32 arg6);
void func_global_asm_806A2A10(s32, s32, s32);
/*
void func_bonus_80024E38(void) {
A178_80024E38 *a178;
s32 temp_v0_5;
a178 = current_actor_pointer->unk178;
func_global_asm_80729B00();
if (!(current_actor_pointer->object_properties_bitfield & 0x10)) {
a178->unk0 = 0x12C;
a178->unkA = 0;
a178->unk8 = 0;
func_global_asm_80737638(D_global_asm_8076D1F8, 0x1E6, 0, 0x40, 1.0f, 0x80, &a178->unk4);
func_global_asm_806A2A10(0xDC, 0x2A, D_global_asm_807FDC9C->unkA_u8[1]);
func_global_asm_8072707C(1, 0x40, 0x10);
func_global_asm_8072707C(2, 0x40, 0x10);
func_global_asm_8072707C(3, 0x40, 0x10);
func_global_asm_8072707C(4, 0x40, 0x10);
current_actor_pointer->control_state = 0;
current_actor_pointer->control_state_progress = 0;
func_global_asm_8061CC30();
a178->unk18 = playCutscene(NULL, 0, 1);
}
switch (current_actor_pointer->control_state) {
case 0:
if (a178->unk18 != 0) {
a178->unk18--;
} else {
func_global_asm_806A2B08(current_actor_pointer->unk11C);
current_actor_pointer->control_state = 1;
}
break;
case 1:
if (current_actor_pointer->unk11C->control_state == 5) {
func_global_asm_8069D2AC(0x81, 0, 0x78, func_global_asm_8070E750(0x1A, 0x15, 1), 0, 0x28, 8, 8);
func_global_asm_80726EE0(0);
playSong(0x28, 1.0f);
func_global_asm_806A5DF0(0x56, 588.0f, 240.0f, 582.0f, 0, 0, func_bonus_80024D8C(), 0);
current_actor_pointer->control_state = 2;
}
if (player_pointer->control_state == 0x39) {
func_global_asm_805FF898();
func_global_asm_806C9974(0, 0x40);
current_actor_pointer->control_state = 2;
}
break;
}
a178->unk0--;
a178->unk8 = MAX(8000, a178->unk8 - 150);
a178->unkA = MIN(a178->unk8, a178->unkA + 1000);
func_global_asm_80737AC4(a178->unk4, 8, a178->unkA);
if (extra_player_info_pointer->unk1F0 & 0xC0000) {
if (a178->unk0 < 0x129) {
a178->unk0 = 0x12C;
if (extra_player_info_pointer->unk1F0 & 0x40000) {
if (((rand() >> 0xF) % 1000) & 1) {
playSound(0x1E7, 0x7FFF, 64.0f, 1.0f, 0x14, 0x80);
} else {
playSound(0x1EA, 0x7FFF, 64.0f, 1.0f, 0x14, 0x80);
}
} else {
playSound(0x1E8, 0x7FFF, 64.0f, 1.0f, 0x14, 0x80);
}
}
a178->unk8 = MIN(0x7FFF, a178->unk8 + 18000);
extra_player_info_pointer->unk1F0 &= 0xFFF3FFFF;
}
switch (a178->unk0) {
case 0x0:
case 0x14:
case 0x28:
case 0x3C:
case 0x50:
temp_v0_5 = 0x7FFF - (a178->unk0 * 150);
playSound(0x1E9, temp_v0_5, 64.0f, 1.0f, 0xA, 0x80);
if (a178->unk0 == 0) {
a178->unk0 = 0xC8;
}
break;
}
}
*/

View File

@ -61,7 +61,7 @@ typedef struct Critter {
typedef struct CritterController {
u8 critter_count;
u8 unk1;
u8 unk2;
u8 unk2; // Also a count?
u8 unk3;
s32 unk4;
Critter *critter;
@ -197,40 +197,63 @@ void func_critter_800240EC(CritterController *arg0) {
}
}
// Odd stack struct
#pragma GLOBAL_ASM("asm/nonmatchings/critter/code_0/func_critter_80024154.s")
typedef struct {
s16 temp[3];
} D_80029F6C;
// rodata
#pragma GLOBAL_ASM("asm/nonmatchings/critter/code_0/func_critter_8002427C.s")
extern D_80029F6C D_critter_80029F6C;
extern s32 *D_critter_80029F74;
/*
void func_critter_8002427C(CritterController *arg0) {
s16 sp68[2];
Critter *var_s0;
void func_critter_80024154(CritterController *arg0) {
s32 i;
s32 pad; // TODO: what?
u8 var_v1;
D_80029F6C sp10;
Critter *critter;
critter = arg0->critter;
sp10 = D_critter_80029F6C;
var_v1 = 0;
for (i = 0; i < arg0->unk2; i++) {
if ((var_v1 == 0 && ((arg0->unk2 * 0.4) < i))
|| (var_v1 == 1 && (arg0->unk2 * 0.7) < i)) {
var_v1++;
}
critter->unk24 = 10.0f;
critter->unk1E4[0] = sp10.temp[var_v1];
critter->unk1E8[0] = 0;
critter++;
}
}
typedef struct {
s16 temp[4];
} D_80029F74;
extern D_80029F74 D_critter_80029F74;
void func_critter_8002427C(CritterController *arg0) {
Critter *critter;
s32 i;
D_80029F74 sp68;
u8 var_s2;
var_s0 = arg0->critter;
critter = arg0->critter;
sp68 = D_critter_80029F74;
var_s2 = 0;
sp68[0] = D_critter_80029F74[0];
sp68[1] = D_critter_80029F74[1];
for (i = 0; i < arg0->unk2; i++) {
if ((var_s2 == 0 && ((arg0->unk2 * 0.3) < i))
||(var_s2 == 1 && ((arg0->unk2 * 0.5) < i))
||(var_s2 == 2 && ((arg0->unk2 * 0.7) < i))) {
var_s2++;
}
var_s0->unk24 = 20.0f;
var_s0->unk1E4[0] = sp68[var_s2];
var_s0->unk1E8[0] = 0;
var_s0->unk1E1 |= 4;
func_critter_80024000(var_s0, arg0, var_s0->unk38 * 0.5);
var_s0++;
critter->unk24 = 20.0f;
critter->unk1E4[0] = sp68.temp[var_s2];
critter->unk1E8[0] = 0;
critter->unk1E1 |= 4;
func_critter_80024000(critter, arg0, critter->unk38 * 0.5);
critter++;
}
}
*/
void func_critter_8002448C(Critter *arg0) {
s32 i;
@ -804,6 +827,8 @@ void func_critter_80026C9C(CritterController *arg0) {
}
*/
void func_critter_80027118(CritterController *arg0);
void func_critter_80026E0C(s32 arg0) {
s32 j;
unkStruct_critter_80029BA0 *var_s2;
@ -885,3 +910,63 @@ void func_critter_8002708C(CritterController *arg0) {
// Jumptable
#pragma GLOBAL_ASM("asm/nonmatchings/critter/code_0/func_critter_80027118.s")
/*
void func_critter_80027118(CritterController *arg0) {
s32 pad[3];
void (*sp50)(CritterController *);
u32 temp_hi;
s32 i;
s32 var_s3;
u8 arraySize;
Critter *critter;
arraySize = arg0->unk2;
if (arraySize == 0) {
arg0->critter = NULL;
return;
}
switch (arg0->critter_count) {
case 0:
case 1:
sp50 = func_critter_800240EC;
break;
case 3:
sp50 = func_critter_80024154;
break;
case 4:
sp50 = func_critter_8002409C;
break;
case 2:
sp50 = func_critter_8002427C;
break;
}
arg0->critter = malloc(arraySize * sizeof(Critter));
func_global_asm_80611690(arg0->critter);
critter = arg0->critter;
if (arg0->unk1 == 1) {
var_s3 = 0;
} else {
var_s3 = 1;
}
for (i = 0; i < arg0->unk2; i++) {
func_critter_80025F8C(arg0->unk4, critter, 1);
if (!gameIsInDKTVMode()) {
func_critter_80025F3C(arg0->unk4, critter, 1, 1);
}
temp_hi = arg0->unk4;
critter->unk58 = temp_hi;
critter->unk1E2 = var_s3;
critter->unk54 = temp_hi;
critter->unk40 = 0xFF;
critter->unk0 = func_global_asm_806119A0() & 0xFFF;
critter->unk42 = func_global_asm_806119A0() & 0xFFF;
critter->unk38 = 2 * (1.0f - ((func_global_asm_806119A0() % 1000U) / 4000.0f));
critter++;
if (var_s3 == 1) {
var_s3 = 2;
}
}
sp50(arg0);
}
*/

View File

@ -17,31 +17,32 @@ typedef struct menu_struct_1 {
u8 unk12;
} MenuStruct1;
// TODO: Array of structs?
const u16 D_menu_80033A50[] = {
0x0000,
0x0000, // Donkey
0x000B,
0x000F,
0x0014,
0x0000,
0x0000, // Diddy
0x000C,
0x0010,
0x0015,
0x0000,
0x0000, // Lanky
0x000E,
0x0013,
0x0016,
0x0000,
0x0000, // Tiny
0x000D,
0x0011,
0x0017,
0x0000,
0x0000, // Chunky
0x000D,
0x0012,
0x0018,
};
const u16 D_menu_80033A78[] = {
0x0000,
0x0000, // Krusha?
0x0019,
0x001A,
0x001B,