This commit is contained in:
Donkey Kong 2024-03-03 22:47:57 -06:00
parent 395b2642b5
commit 30521dba0c
7 changed files with 81 additions and 32 deletions

View File

@ -2023,6 +2023,13 @@ typedef struct Competitor {
//u8 unk_190[4];
} Competitor;
typedef struct JetpacPlayerSub36C {
s32 unk0;
s32 unk4;
s32 unk8;
u8 pad[0x34-0xC];
} JetpacPlayerSub36C;
typedef struct JetpacPlayerStruct {
s32 unk0;
s32 unk4;
@ -2045,10 +2052,8 @@ typedef struct JetpacPlayerStruct {
s32 unk360;
s32 unk364;
s32 unk368;
s32 unk36C; // Used
s32 unk370;
s32 unk374; // Used
u8 pad378[0x420 - 0x378];
JetpacPlayerSub36C unk36C[3]; // Used - Unsure of how many items in there are
u8 pad408[0x420 - 0x408];
f32 unk420;
f32 unk424;
f32 unk428;

View File

@ -37,7 +37,7 @@ us,.jetpac,func_jetpac_80026DC8,536,yes
us,.jetpac,func_jetpac_80024A4C,64,yes
us,.jetpac,func_jetpac_80027480,64,yes
us,.jetpac,func_jetpac_80029884,68,yes
us,.jetpac,func_jetpac_80028E04,132,no
us,.jetpac,func_jetpac_80028E04,132,yes
us,.jetpac,func_jetpac_800248E8,356,no
us,.jetpac,func_jetpac_80027EC0,1152,no
us,.jetpac,func_jetpac_80025F48,124,yes

1 version section function length matching
37 us .jetpac func_jetpac_80024A4C 64 yes
38 us .jetpac func_jetpac_80027480 64 yes
39 us .jetpac func_jetpac_80029884 68 yes
40 us .jetpac func_jetpac_80028E04 132 no yes
41 us .jetpac func_jetpac_800248E8 356 no
42 us .jetpac func_jetpac_80027EC0 1152 no
43 us .jetpac func_jetpac_80025F48 124 yes

View File

@ -3809,7 +3809,7 @@ us,.jetpac,func_jetpac_80026DC8,536,yes
us,.jetpac,func_jetpac_80024A4C,64,yes
us,.jetpac,func_jetpac_80027480,64,yes
us,.jetpac,func_jetpac_80029884,68,yes
us,.jetpac,func_jetpac_80028E04,132,no
us,.jetpac,func_jetpac_80028E04,132,yes
us,.jetpac,func_jetpac_800248E8,356,no
us,.jetpac,func_jetpac_80027EC0,1152,no
us,.jetpac,func_jetpac_80025F48,124,yes

1 version section function length matching
3809 us .jetpac func_jetpac_80024A4C 64 yes
3810 us .jetpac func_jetpac_80027480 64 yes
3811 us .jetpac func_jetpac_80029884 68 yes
3812 us .jetpac func_jetpac_80028E04 132 no yes
3813 us .jetpac func_jetpac_800248E8 356 no
3814 us .jetpac func_jetpac_80027EC0 1152 no
3815 us .jetpac func_jetpac_80025F48 124 yes

View File

@ -9,7 +9,7 @@
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h47v20H0z"/>
<path fill="#b2c000" d="M47 0h67v20H47z"/>
<path fill="#b0c000" d="M47 0h67v20H47z"/>
<path fill="url(#b)" d="M0 0h114v20H0z"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
@ -17,7 +17,7 @@
<text x="23.5" y="14">jetpac</text>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="81.5" y="15" fill="#010101" fill-opacity=".3">53.6646%</text>
<text x="80.5" y="14">53.6646%</text>
<text x="81.5" y="15" fill="#010101" fill-opacity=".3">54.1227%</text>
<text x="80.5" y="14">54.1227%</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">35.2246%</text>
<text x="165.5" y="14">35.2246%</text>
<text x="166.5" y="15" fill="#010101" fill-opacity=".3">35.2326%</text>
<text x="165.5" y="14">35.2326%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -66,6 +66,46 @@ s32 func_jetpac_80027510(Struct80027510 *arg0, f32 arg1, f32 arg2, f32 arg3, f32
#pragma GLOBAL_ASM("asm/nonmatchings/jetpac/code_3480/func_jetpac_80027D64.s")
/*
typedef struct JetpacItemData {
void* image;
u8 pad[0x14];
} JetpacItemData;
f32 func_jetpac_80027210();
s32 func_jetpac_80027480();
s32 func_jetpac_800274C0();
extern u8 D_8002F3C8;
extern JetpacItemData D_jetpac_8002D968[7];
extern f32 D_jetpac_8002DCEC;
void func_jetpac_80027D64(Competitor *arg0) {
s32 sp64;
s32 *sp24;
void *sp18;
s32 *temp_v1;
s32 i;
for (i = 0; i < 0x13; i++) {
*(s32*)(&sp24 + i) = *(s32*)(&D_jetpac_8002DCEC + i);
}
if ((D_8002F3C8 != 0) && (arg0->current_score >= 0x1388) && (isFlagSet(0x17B, 0U) == 0) && (isFlagSet(0x62, 2U) == 0)) {
sp64 = 6;
} else {
sp64 = (s32) (func_jetpac_80027210() * (f32) 5) + 1;
}
temp_v1 = &arg0->next_item_pointer;
sp24 = (sp64 * 0x18) + &D_jetpac_8002D968;
for (i = 0; i < 0x12; i++) {
*(s32*)(temp_v1 + i) = *(s32*)(&sp24 + i);
}
*(temp_v1 + 0x12) = *(&sp24 + 0x12);
sp18 = temp_v1;
*(f32 *)(temp_v1 + 2) = (f32) func_jetpac_800274C0();
arg0->unk_144 = func_jetpac_80027480();
}
*/
// Jumptable
#pragma GLOBAL_ASM("asm/nonmatchings/jetpac/code_3480/func_jetpac_80027EC0.s")
@ -269,22 +309,18 @@ s32 func_jetpac_80028CF8(f32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4) {
return -1;
}
#pragma GLOBAL_ASM("asm/nonmatchings/jetpac/code_3480/func_jetpac_80028E04.s")
/*
// TODO: Hmm, is D_jetpac_8002EC30 an array?
s32 func_jetpac_80028E04(s32 arg0, s32 arg1, s32 arg2) {
s32 temp_v1;
JetpacPlayerStruct *temp_v0;
JetpacPlayerSub36C *temp_v0;
temp_v0 = &D_jetpac_8002EC30[arg0];
if (arg1 < temp_v0->unk36C) {
if (arg2 < temp_v0->unk36C) {
temp_v0 = &D_jetpac_8002EC30.unk36C[arg0];
if (arg1 < temp_v0->unk0) {
if (arg2 < temp_v0->unk0) {
return -2;
}
return -1;
}
temp_v1 = temp_v0->unk374;
temp_v1 = temp_v0->unk8;
if (temp_v1 < arg2) {
if (temp_v1 < arg1) {
return 2;
@ -293,6 +329,5 @@ s32 func_jetpac_80028E04(s32 arg0, s32 arg1, s32 arg2) {
}
return 0;
}
*/
#pragma GLOBAL_ASM("asm/nonmatchings/jetpac/code_3480/func_jetpac_80028E88.s")

View File

@ -185,21 +185,31 @@ void func_jetpac_80029204(JetpacStruct *arg0) {
#pragma GLOBAL_ASM("asm/nonmatchings/jetpac/code_4FC0/func_jetpac_80029450.s")
/*
need to insert a += 0x1C which does nothing in the middle
Competitor *func_jetpac_800292C4(void);
extern void* D_jetpac_80029884[8];
extern void* D_jetpac_8002E8F4[8];
extern JetpacPlayerStruct D_jetpac_8002EC30;
void func_jetpac_80029450(void) {
void (*sp1C)(void *);
Competitor* sp18;
Competitor* temp_v0;
Competitor *sp18;
Competitor *temp_v0;
u32 lvl;
s32* read;
sp1C = D_jetpac_80029884[D_jetpac_8002EC30.player[D_jetpac_8002EC30.player_index * 0x194].level % 8];
lvl = D_jetpac_8002EC30.player[D_jetpac_8002EC30.player_index].level & 7;
read = &D_jetpac_8002EC30.player[D_jetpac_8002EC30.player_index].level;
if (D_jetpac_8002EC30.player[D_jetpac_8002EC30.player_index].level < 0) {
if (lvl) {
lvl -= 8;
}
}
sp1C = D_jetpac_8002E8F4[lvl];
temp_v0 = func_jetpac_800292C4();
if (temp_v0 != NULL) {
sp18 = temp_v0;
sp1C(temp_v0);
*(u32*)(&sp18->unk14[0].unk0) = 3;
*(s32*)(&sp18->unk14[0].unk0) = 3;
}
}
*/
@ -451,22 +461,21 @@ void func_jetpac_8002A2AC(JetpacStruct *arg0) {
// close
#pragma GLOBAL_ASM("asm/nonmatchings/jetpac/code_4FC0/func_jetpac_8002A2DC.s")
/*
extern f64 D_jetpac_8002EBF0;
extern f64 D_jetpac_8002EBF8;
extern f64 D_jetpac_8002EC00;
extern f64 D_jetpac_8002EC08;
extern f64 D_jetpac_8002EC00[2];
/*
f32 func_jetpac_8002A2DC(f32 arg0, f32 arg1) {
if (arg0 < 0.0f) {
arg1 -= D_jetpac_8002EBF0;
} else {
arg1 += D_jetpac_8002EBF8;
}
if (arg1 < D_jetpac_8002EC00) {
return D_jetpac_8002EC00;
if (arg1 < D_jetpac_8002EC00[0]) {
return D_jetpac_8002EC00[0];
}
return MIN(D_jetpac_8002EC08, arg1);
return MIN(D_jetpac_8002EC00[1], arg1);
}
*/