This commit is contained in:
Donkey Kong 2023-04-23 23:18:30 +09:30
parent 1ef2f97a11
commit 7293004a04
18 changed files with 949 additions and 89 deletions

View File

@ -1106,7 +1106,7 @@ typedef struct {
u8 unk2C1; // Used
u8 unk2C2; // Used
u8 unk2C3; // Used
s32 unk2C4;
f32 unk2C4; // Used
s16 unk2C8; // Used
s16 unk2CA;
u8 pad_unknown4[0x2E2 - 0x2CC];

View File

@ -1306,7 +1306,7 @@ us,.code,func_806ABB98,252,no
us,.code,func_80737990,188,no
us,.code,func_806303C4,452,yes
us,.code,func_80601258,52,yes
us,.code,func_806ABE3C,524,no
us,.code,func_806ABE3C,524,yes
us,.code,func_80731A04,164,yes
us,.code,func_80602C0C,96,yes
us,.code,func_80688EE4,144,yes
@ -1416,7 +1416,7 @@ us,.code,func_8067AF44,48,yes
us,.code,func_806E17F4,112,yes
us,.code,func_8070C210,108,yes
us,.code,func_806B6DB0,2116,no
us,.code,func_8070D3CC,152,no
us,.code,func_8070D3CC,152,yes
us,.code,func_80695724,1068,no
us,.code,func_806C71E0,8,yes
us,.code,func_80732DAC,64,no
@ -2396,7 +2396,7 @@ us,.code,func_8071D784,456,no
us,.code,func_80733C34,344,no
us,.code,func_8067B2B0,8,yes
us,.code,func_80689DD4,196,no
us,.code,func_8070D970,60,no
us,.code,func_8070D970,60,yes
us,.code,func_806545D4,468,no
us,.code,func_806BC0E4,100,yes
us,.code,func_8072C670,512,no
@ -2815,7 +2815,7 @@ us,.code,func_807126B0,196,yes
us,.code,func_806049CC,540,no
us,.code,func_8060D2C8,1184,no
us,.code,func_806306D0,60,no
us,.code,func_8070D928,72,no
us,.code,func_8070D928,72,yes
us,.code,func_8066134C,76,yes
us,.code,func_8072F09C,132,no
us,.code,func_806C7220,8,yes
@ -3092,7 +3092,7 @@ us,.code,func_80717814,284,no
us,.code,func_8062A24C,40,yes
us,.code,func_806F0878,184,yes
us,.code,func_8069AFF0,32,yes
us,.code,func_8070DD18,44,no
us,.code,func_8070DD18,44,yes
us,.code,func_8063E72C,744,no
us,.code,func_806618A0,532,no
us,.code,func_806CBE44,76,yes
@ -3210,7 +3210,7 @@ us,.code,_n_collectPVoices,108,yes
us,.code,func_80610044,548,no
us,.code,func_80705B30,208,yes
us,.code,func_80665160,156,yes
us,.code,func_807122B4,476,no
us,.code,func_807122B4,476,yes
us,.code,func_806D2784,32,yes
us,.code,func_8073CFB0,176,no
us,.code,func_806C1640,244,yes

1 version section function length matching
1306 us .code func_80737990 188 no
1307 us .code func_806303C4 452 yes
1308 us .code func_80601258 52 yes
1309 us .code func_806ABE3C 524 no yes
1310 us .code func_80731A04 164 yes
1311 us .code func_80602C0C 96 yes
1312 us .code func_80688EE4 144 yes
1416 us .code func_806E17F4 112 yes
1417 us .code func_8070C210 108 yes
1418 us .code func_806B6DB0 2116 no
1419 us .code func_8070D3CC 152 no yes
1420 us .code func_80695724 1068 no
1421 us .code func_806C71E0 8 yes
1422 us .code func_80732DAC 64 no
2396 us .code func_80733C34 344 no
2397 us .code func_8067B2B0 8 yes
2398 us .code func_80689DD4 196 no
2399 us .code func_8070D970 60 no yes
2400 us .code func_806545D4 468 no
2401 us .code func_806BC0E4 100 yes
2402 us .code func_8072C670 512 no
2815 us .code func_806049CC 540 no
2816 us .code func_8060D2C8 1184 no
2817 us .code func_806306D0 60 no
2818 us .code func_8070D928 72 no yes
2819 us .code func_8066134C 76 yes
2820 us .code func_8072F09C 132 no
2821 us .code func_806C7220 8 yes
3092 us .code func_8062A24C 40 yes
3093 us .code func_806F0878 184 yes
3094 us .code func_8069AFF0 32 yes
3095 us .code func_8070DD18 44 no yes
3096 us .code func_8063E72C 744 no
3097 us .code func_806618A0 532 no
3098 us .code func_806CBE44 76 yes
3210 us .code func_80610044 548 no
3211 us .code func_80705B30 208 yes
3212 us .code func_80665160 156 yes
3213 us .code func_807122B4 476 no yes
3214 us .code func_806D2784 32 yes
3215 us .code func_8073CFB0 176 no
3216 us .code func_806C1640 244 yes

View File

@ -1306,7 +1306,7 @@ us,.code,func_806ABB98,252,no
us,.code,func_80737990,188,no
us,.code,func_806303C4,452,yes
us,.code,func_80601258,52,yes
us,.code,func_806ABE3C,524,no
us,.code,func_806ABE3C,524,yes
us,.code,func_80731A04,164,yes
us,.code,func_80602C0C,96,yes
us,.code,func_80688EE4,144,yes
@ -1416,7 +1416,7 @@ us,.code,func_8067AF44,48,yes
us,.code,func_806E17F4,112,yes
us,.code,func_8070C210,108,yes
us,.code,func_806B6DB0,2116,no
us,.code,func_8070D3CC,152,no
us,.code,func_8070D3CC,152,yes
us,.code,func_80695724,1068,no
us,.code,func_806C71E0,8,yes
us,.code,func_80732DAC,64,no
@ -2396,7 +2396,7 @@ us,.code,func_8071D784,456,no
us,.code,func_80733C34,344,no
us,.code,func_8067B2B0,8,yes
us,.code,func_80689DD4,196,no
us,.code,func_8070D970,60,no
us,.code,func_8070D970,60,yes
us,.code,func_806545D4,468,no
us,.code,func_806BC0E4,100,yes
us,.code,func_8072C670,512,no
@ -2815,7 +2815,7 @@ us,.code,func_807126B0,196,yes
us,.code,func_806049CC,540,no
us,.code,func_8060D2C8,1184,no
us,.code,func_806306D0,60,no
us,.code,func_8070D928,72,no
us,.code,func_8070D928,72,yes
us,.code,func_8066134C,76,yes
us,.code,func_8072F09C,132,no
us,.code,func_806C7220,8,yes
@ -3092,7 +3092,7 @@ us,.code,func_80717814,284,no
us,.code,func_8062A24C,40,yes
us,.code,func_806F0878,184,yes
us,.code,func_8069AFF0,32,yes
us,.code,func_8070DD18,44,no
us,.code,func_8070DD18,44,yes
us,.code,func_8063E72C,744,no
us,.code,func_806618A0,532,no
us,.code,func_806CBE44,76,yes
@ -3210,7 +3210,7 @@ us,.code,_n_collectPVoices,108,yes
us,.code,func_80610044,548,no
us,.code,func_80705B30,208,yes
us,.code,func_80665160,156,yes
us,.code,func_807122B4,476,no
us,.code,func_807122B4,476,yes
us,.code,func_806D2784,32,yes
us,.code,func_8073CFB0,176,no
us,.code,func_806C1640,244,yes

1 version section function length matching
1306 us .code func_80737990 188 no
1307 us .code func_806303C4 452 yes
1308 us .code func_80601258 52 yes
1309 us .code func_806ABE3C 524 no yes
1310 us .code func_80731A04 164 yes
1311 us .code func_80602C0C 96 yes
1312 us .code func_80688EE4 144 yes
1416 us .code func_806E17F4 112 yes
1417 us .code func_8070C210 108 yes
1418 us .code func_806B6DB0 2116 no
1419 us .code func_8070D3CC 152 no yes
1420 us .code func_80695724 1068 no
1421 us .code func_806C71E0 8 yes
1422 us .code func_80732DAC 64 no
2396 us .code func_80733C34 344 no
2397 us .code func_8067B2B0 8 yes
2398 us .code func_80689DD4 196 no
2399 us .code func_8070D970 60 no yes
2400 us .code func_806545D4 468 no
2401 us .code func_806BC0E4 100 yes
2402 us .code func_8072C670 512 no
2815 us .code func_806049CC 540 no
2816 us .code func_8060D2C8 1184 no
2817 us .code func_806306D0 60 no
2818 us .code func_8070D928 72 no yes
2819 us .code func_8066134C 76 yes
2820 us .code func_8072F09C 132 no
2821 us .code func_806C7220 8 yes
3092 us .code func_8062A24C 40 yes
3093 us .code func_806F0878 184 yes
3094 us .code func_8069AFF0 32 yes
3095 us .code func_8070DD18 44 no yes
3096 us .code func_8063E72C 744 no
3097 us .code func_806618A0 532 no
3098 us .code func_806CBE44 76 yes
3210 us .code func_80610044 548 no
3211 us .code func_80705B30 208 yes
3212 us .code func_80665160 156 yes
3213 us .code func_807122B4 476 no yes
3214 us .code func_806D2784 32 yes
3215 us .code func_8073CFB0 176 no
3216 us .code func_806C1640 244 yes

View File

@ -9,7 +9,7 @@
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h77v20H0z"/>
<path fill="#e05000" d="M77 0h67v20H77z"/>
<path fill="#e05100" d="M77 0h67v20H77z"/>
<path fill="url(#b)" d="M0 0h144v20H0z"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
@ -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">17.9181%</text>
<text x="110.5" y="14">17.9181%</text>
<text x="111.5" y="15" fill="#010101" fill-opacity=".3">18.0259%</text>
<text x="110.5" y="14">18.0259%</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">18.2203%</text>
<text x="165.5" y="14">18.2203%</text>
<text x="166.5" y="15" fill="#010101" fill-opacity=".3">18.3009%</text>
<text x="165.5" y="14">18.3009%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -972,10 +972,10 @@ void func_80027A38(Gfx **arg0) {
);
func_8070E8F0(&sp6C, &D_8004BB00[D_807444FC]);
func_8070F2C8(0x400, D_8004C6D6, 0, 0);
for (i = 0; i <0x6; i++) {
for (i = 0; i < 0x6; i++) {
func_8070F2FC(&sp6C, 0x220 + 0x20*i, 0xe0);
}
for (i = 0; i <0x1C; i++) {
for (i = 0; i < 0x1C; i++) {
func_8070F2FC(&sp6C, 0xC0 + 0x20*i, 0x380);
}
for (i = 1; i < 0x1B; i++) {
@ -1865,6 +1865,194 @@ s32 __arcade_abs_w(s32 arg0) {
#pragma GLOBAL_ASM("asm/nonmatchings/arcade/code_0/func_8002B390.s")
extern u8 D_8003B3C8[];
extern u8 D_8003B610[];
extern u8 D_8003B858[];
extern u8 D_8003BAA0[];
extern u8 D_8003BCE8[];
extern u8 D_8003BF30[];
extern u8 D_8003C178[];
extern u8 D_8003C3C0[];
extern u8 D_8003C608[];
extern u8 D_8003C850[];
extern u8 D_8003CA98[];
extern u8 D_8003CCE0[];
extern u8 D_8003CF28[];
extern u8 D_8003D170[];
extern u8 D_8003D3B8[];
extern u8 D_8003D600[];
extern u8 D_8003D848[];
extern s32 D_8004A75C;
/*
// TODO: Doable, it compiles
void func_8002B390(s32 arg0) {
f32 temp_f0;
f32 temp_f0_2;
f32 temp_f2;
f32 temp_f4_2;
s32 temp_f4;
s32 temp_t7;
s32 temp_v0;
s32 temp_v0_2;
s32 temp_v0_3;
s32 var_s0;
s32 var_s4;
u8 temp_t2;
u8 temp_v1;
u8 var_v0;
ArcadeStruct1 *temp_a1;
ArcadeStruct1 *temp_v1_2;
temp_a1 = &D_8004BCD0[arg0];
temp_v1 = temp_a1->unk19;
temp_t7 = temp_a1->unk1A & 2;
temp_f0 = temp_a1->unk10;
temp_f4 = temp_f0;
temp_a1->unk1A = (temp_t7 / 2) | temp_t7;
temp_a1->unk1B = 0;
if (temp_v1 == 2) {
if (D_8004C710 != 0) {
temp_v0 = temp_f4 & 3;
if (D_8004C710 & 8) {
temp_v0_2 = temp_f4 & 3;
switch (temp_v0_2) {
case 0:
case 2:
temp_a1->unk14 = &D_8003C178;
return;
case 1:
temp_a1->unk14 = &D_8003C608;
return;
case 3:
temp_a1->unk14 = &D_8003CA98;
return;
}
} else {
switch (temp_v0) {
case 0:
case 2:
temp_a1->unk14 = &D_8003C3C0;
return;
case 1:
temp_a1->unk14 = &D_8003C850;
return;
case 3:
temp_a1->unk14 = &D_8003CCE0;
return;
}
}
} else {
temp_v0_3 = temp_f4 & 3;
switch (temp_v0_3) {
case 0:
case 2:
temp_a1->unk14 = &D_8003B180;
return;
case 1:
temp_a1->unk14 = &D_8003B3C8;
return;
case 3:
temp_a1->unk14 = &D_8003B610;
return;
}
}
} else {
if (temp_v1 == 3) {
temp_a1->unk14 = &D_8003CF28;
return;
}
if (temp_v1 == 5) {
temp_f2 = temp_a1->y_position;
if (((D_8004C6E8 - temp_f2) < 1.0f) || (temp_f0_2 = temp_f2 - D_8004C6E4, (temp_f0_2 < 1.0f))) {
temp_a1->unk14 = &D_8003BF30;
} else if (temp_f0_2 < 6.0f) {
temp_a1->unk14 = &D_8003B858;
} else if (temp_f0_2 < 10.0f) {
temp_a1->unk14 = &D_8003BCE8;
} else if (temp_f0_2 < 14.0f) {
temp_a1->unk14 = &D_8003BAA0;
} else {
temp_a1->unk14 = &D_8003B858;
}
temp_a1->unk1A = (u8)(temp_a1->unk10 / 4.5) & 1;
return;
}
if (temp_v1 == 8) {
if (temp_f0 > 38.0f) {
if (arcade_lives_internal == 0) {
if (temp_f0 > 48.0f) {
if (D_8004A75C < arcade_current_score) {
func_80024B04();
return;
}
if (D_8004A740 != 0) {
func_80024C34();
return;
}
func_80024D90();
return;
}
var_s4 = 0x6C;
if (D_8004A764 == 0) {
D_8004A764 = 1;
do {
var_s0 = 0xA6;
loop_53:
temp_v1_2 = &D_8004BCD0[func_800247F0()];
temp_v1_2->x_position = D_8004A6B8.x_position;
temp_v1_2->y_position = D_8004A6B8.y_position;
temp_v1_2->y_velocity = D_8004A6B8.y_velocity;
temp_v1_2->x_velocity = D_8004A6B8.x_velocity;
temp_f4_2 = var_s0;
temp_v1_2->unk10 = D_8004A6B8.unk10;
temp_v1_2->unk14 = D_8004A6B8.unk14;
var_s0 += 0x10;
temp_v1_2->x_position = var_s4;
temp_v1_2->y_position = temp_f4_2;
temp_v1_2->unk1C = D_8004A6B8.unk1C;
temp_v1_2->unk18 = D_8004A6B8.unk18;
if (var_s0 != 0xC6) {
goto loop_53;
}
var_s4 += 0x10;
} while (var_s4 != 0xCC);
}
} else {
arcade_lives_internal -= 1;
func_800257D8();
}
} else {
if (temp_f0 > 20.0f) {
temp_a1->unk14 = &D_8003D848;
return;
}
if (temp_f0 > 8.0f) {
arcade_game_state = 2;
if (temp_f4 & 1) {
temp_a1->unk14 = &D_8003D3B8;
} else {
temp_a1->unk14 = &D_8003D600;
}
temp_t2 = (u8)temp_a1->unk10 & 3;
var_v0 = temp_t2;
if (temp_t2 == 2) {
temp_a1->unk1A = temp_a1->unk1A ^ 1;
var_v0 = (u8)temp_a1->unk10 & 3;
}
if (var_v0 == 1) {
temp_a1->unk1B = temp_a1->unk1B == 0;
}
}
}
} else {
temp_a1->unk14 = &D_8003D170;
}
}
}
*/
#ifndef NONMATCHING
#pragma GLOBAL_ASM("asm/nonmatchings/arcade/code_0/func_8002B89C.s")
#else

View File

@ -67,6 +67,7 @@ s16 func_806FBEAC(u8 *arg0) {
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_100180/func_806FBEF0.s")
// Displaylist stuff
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_100180/func_806FC530.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_100180/func_806FCC88.s")

View File

@ -11,12 +11,35 @@ typedef struct Temp8070D6D8 {
} Temp8070D6D8;
// TODO: What the
void func_8070D380(u32 arg0, Temp8070D6D8 *arg1, u8 **arg2) {
memcpy(arg1, *arg2, arg0);
*arg2 += arg0;
void func_8070D380(u32 size, Temp8070D6D8 *arg1, u8 **arg2) {
memcpy(arg1, *arg2, size);
*arg2 += size;
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_112080/func_8070D3CC.s")
typedef struct {
u8 unk0;
u8 unk1;
u8 unk2;
u8 unk3;
s32 unk4;
} Struct8070D3CC_arg0;
typedef struct {
s32 unk0;
} Struct8070D3CC_arg1;
void func_8070D3CC(Struct8070D3CC_arg0 *arg0, Struct8070D3CC_arg1 *arg1) {
s32 i;
Struct8070D3CC_arg0 *var_s0;
func_8070D380(1, arg0, arg1);
arg0->unk4 = malloc(arg0->unk0 * sizeof(Struct8070D3CC_arg0));
var_s0 = arg0->unk4;
for (i = 0; i < arg0->unk0; i++) {
func_8070D380(sizeof(Struct8070D3CC_arg0), var_s0, arg1);
var_s0++;
}
}
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_112080/func_8070D464.s")
@ -28,7 +51,7 @@ Temp8070D6D8 *func_8070D6D8(void *arg0) {
Temp8070D6D8 *temp_s0;
s32 size;
temp_s0 = malloc(0x10);
temp_s0 = malloc(sizeof(Temp8070D6D8));
func_8070D380(1, temp_s0, &arg0);
func_8070D654(temp_s0, &arg0);
func_8070D380(2, &temp_s0->unk8, &arg0);
@ -93,43 +116,40 @@ void func_8070D8C0(Actor *arg0, u16 arg1, u8 arg2) {
}
*/
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_112080/func_8070D928.s")
typedef struct Struct807550C0 Struct807550C0;
/*
extern u16 *D_807550C0;
struct Struct807550C0 {
u16 unk0; // Used
u8 unk2; // Used
u8 unk3;
s32 unk4;
u8 unk8; // Used
u8 unk9;
u8 unkA;
u8 unkB;
Struct807550C0 *unkC; // Used
};
u16 *func_8070D928(s32 arg0) {
s32 temp_t6;
u16 *var_v1;
extern Struct807550C0 *D_807550C0;
Struct807550C0 *func_8070D928(u16 arg0) {
Struct807550C0 *var_v1;
var_v1 = D_807550C0;
temp_t6 = arg0 & 0xFFFF;
if ((var_v1 != NULL) && (temp_t6 != *var_v1)) {
loop_2:
while ((var_v1 != NULL) && (var_v1->unk0 != arg0)) {
var_v1 = var_v1->unkC;
if (var_v1 != NULL) {
if (temp_t6 != *var_v1) {
goto loop_2;
}
}
}
return var_v1;
}
*/
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_112080/func_8070D970.s")
void func_8070D970(u16 arg0) {
Struct807550C0 *temp_v0;
/*
// TODO: Which struct is this?
void func_8070D970(s32 arg0) {
void *temp_v0;
temp_v0 = func_8070D928(arg0 & 0xFFFF);
temp_v0 = func_8070D928(arg0);
if (temp_v0 != 0) {
temp_v0->unk2--;
}
}
*/
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_112080/func_8070D9AC.s")
@ -192,28 +212,83 @@ void func_8070DB7C(void *arg0) {
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_112080/func_8070DB9C.s")
typedef struct Struct8070DB9C Struct8070DB9C;
struct Struct8070DB9C {
u8 unk0;
u8 unk1;
u8 unk2;
u8 unk3;
s32 unk4;
Struct8070DB9C *unk8;
};
/*
// TODO: Very close
void func_8070DB9C(Struct8070DB9C *arg0) {
s32 var_s0;
void *temp_a1;
temp_a1 = arg0->unk4;
if (temp_a1 != NULL) {
func_8061134C(temp_a1);
}
if (arg0->unk0 & 1) {
for (var_s0 = 0; var_s0 < 1; var_s0++) {
// TODO: Issue here
func_8070DB7C(&((u8*)arg0->unk8)[var_s0]);
}
func_8061134C(arg0->unk8);
return;
}
if (arg0->unk0 & 2) {
func_8061134C(arg0->unk8->unk4);
func_8061134C(arg0->unk8);
}
}
*/
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_112080/func_8070DC40.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_112080/func_8070DCA4.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_112080/func_8070DD18.s")
/*
// TODO: Which struct is this?
void func_8070DD18(void *arg0) {
void func_8070DD18(Struct807550C0 *arg0) {
func_8070DCA4(arg0->unk4);
func_8061134C(arg0);
}
*/
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_112080/func_8070DD44.s")
/*
// TODO: Close
void func_8070DD44(void) {
Struct807550C0 **var_s0;
Struct807550C0 *var_v0;
var_s0 = &D_807550C0;
var_v0 = D_807550C0;
while (var_v0 != NULL) {
if (var_v0->unk8 == 1) {
if (var_v0->unk2 != 0) {
var_v0->unk2--;
var_v0 = *var_s0;
}
}
if (var_v0->unk2 == 0) {
*var_s0 = var_v0->unkC;
func_8070DD18(var_v0);
} else {
var_s0 += 3;
}
var_v0 = *var_s0;
}
}
*/
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_112080/func_8070DDDC.s")
/*
s32 func_8070D6D8(void *);
void *func_8070D928(u16);
extern void *D_807550C0;
// TODO: Nice little puzzle to solve...
s32 func_8070DDDC(u16 arg0, s32 arg1) {
@ -232,7 +307,7 @@ s32 func_8070DDDC(u16 arg0, s32 arg1) {
temp_v0 = func_8070D928(arg0);
phi_v0_2 = temp_v0;
phi_a0 = temp_v0;
if (temp_v0 == 0) {
if (temp_v0 == NULL) {
// TEXT!!!
temp_a0 = getPointerTableFile(0xC, arg0, 1, 1);
phi_v1 = &D_807550C0;
@ -257,9 +332,8 @@ s32 func_8070DDDC(u16 arg0, s32 arg1) {
phi_v0_2 = temp_v0_3;
phi_a0 = temp_v0_3;
}
temp_v1_2 = phi_v0_2->unk8;
if (temp_v1_2 != 0) {
if (temp_v1_2 == 1) {
if (phi_v0_2->unk8 != 0) {
if (phi_v0_2->unk8 == 1) {
phi_v0_2->unk2 = 2;
}
} else {
@ -281,12 +355,11 @@ s32 func_8070DDDC(u16 arg0, s32 arg1) {
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_112080/func_8070E808.s")
extern s32 D_807550C0; // TODO: Some kind of struct pointer, possibly Temp8070D6D8
extern s32 D_807550C4;
extern u8 D_807550CC;
void func_8070E8C8(void) {
D_807550C0 = 0;
D_807550C0 = NULL;
D_807550C4 = 0;
}

View File

@ -10,7 +10,32 @@ extern s8 D_80750754;
extern s8 D_80750AB8;
extern u8 D_80750AC0;
extern u16 *D_807550E0;
typedef struct {
u8 unk0;
u8 unk1;
s16 unk2;
s32 unk4;
s32 unk8;
s32 unkC;
s32 unk10;
} Struct80755264;
extern Struct80755264 D_80755264[];
extern f64 D_8075E5B0;
extern u8 D_8077058C;
extern s32 D_807FD9F0[];
extern u8 D_807FDA1C;
void func_80710CA0(void); // TODO: Datatypes
void func_8061134C(s32);
typedef struct {
u16 unk0;
s16 unk2;
s32 unk4;
} Struct807122B4;
extern Struct807122B4 *D_807550E0;
extern s32 D_807552EC;
extern u16 D_80755308; // buttons_enabled
extern u8 D_8075530C; // joystick_x_bits_enabled
@ -44,7 +69,7 @@ void func_8060AC34(GlobalASMStruct12*);
void func_8070F570(void) {
s16 i;
*D_807550E0 = 0;
D_807550E0->unk0 = 0;
D_807FDA1C = 6;
for (i = 0; i < 0x80; i++) {
D_807FDA30[i] = i;
@ -94,7 +119,62 @@ void func_8070F570(void) {
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_114270/func_80711F90.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_114270/func_807122B4.s")
extern f64 D_8075E5A8;
extern s16 D_807FDA1E;
extern u8 D_807FDA1B;
void func_8070F5CC(s32 arg0, s16 arg1, f32 arg2, s16 arg3, s16 arg4, u8 arg5);
/*
// TODO: Close
void func_80711F90(f32 arg0, s16 arg1, s32 arg2, s16 arg3, f32 arg4) {
f32 temp_f22;
f64 temp_f26;
s32 i;
s32 var_s4;
D_807FDA1E = func_80612D10(character_change_array->unk2C4) * arg1;
if (arg0 < 1.0) {
if ((((rand() >> 0xF) % 32767) % 100) < (arg0 * 100.0f)) {
var_s4 = 1;
} else {
var_s4 = 0;
}
} else {
var_s4 = arg0;
}
D_807FDA1B = 0xFF;
temp_f26 = D_8075E5A8;
for (i = 0; i < var_s4; i++) {
temp_f22 = ((rand() >> 0xF) % 0x7FFF) % 320;
func_8070F5CC(2, arg3, (((((rand() >> 0xF) % 0x7FFF) % 125) / 800.0) + temp_f26) * 2.5 * arg4, temp_f22, -0xA, 0xFF);
}
if (D_807550E0->unk0 != 0) {
func_8068C350(&func_80710CA0, NULL, 1);
}
}
*/
s32 func_807122B4(void) {
s16 i;
if (D_807550E0->unk0 != 0) {
D_8077058C = D_8077058C * D_8075E5B0;
func_8068C350(&func_80710CA0, NULL, 1);
return 0;
}
if (D_807FDA1C != 6) {
D_8077058C = 0;
func_8061134C(D_807550E0->unk4);
for (i = 0; i < D_80755264[D_807FDA1C].unk0; i++) {
func_8066B434(D_807FD9F0[i], 0x34A, 0x64);
}
D_807FDA1C = 6;
D_807FDA28 = 0;
return 1;
}
// BUG: Missing return?
}
void func_80712490(Maps newMap, s32 newExit, u8 newGameMode) {
func_805FF378(newMap, newExit);
@ -457,9 +537,74 @@ s32 func_80713EA8(s32 arg0) {
return arg0;
}
// GAME_MODE_END_SEQUENCE_DK_THEATRE, structs
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_114270/func_80713EB0.s")
typedef struct {
s16 unk0;
s16 unk2;
s16 unk4;
s16 unk6;
s16 unk8;
s16 unkA;
s16 unkC;
} Struct80713EB0;
extern s16 D_807FC828;
extern s16 D_807FC82A;
extern s16 D_807FC82C;
/*
// TODO: Very close
void func_80713EB0(enum map_e arg0, s32 arg1, s32 arg2) {
s32 temp_v1;
Struct80713EB0 *t;
if (arg0 >= 0) {
if (game_mode_copy == 0xE) {
if (arg2 == 1) {
if (isFlagSet(0x2A, FLAG_TYPE_GLOBAL) == FALSE) {
arg0 = -1;
}
}
if (arg2 == 2) {
if (isFlagSet(0x2B, FLAG_TYPE_GLOBAL) == FALSE) {
arg0 = -1;
}
}
} else {
func_806ABE3C();
// TODO: Issue is here
t = &D_807FC828;
temp_v1 = D_807FC828 + D_807FC82A + D_807FC82C + t->unk0 + t->unk2 + t->unk4 + t->unk6;
if (arg2 == 1) {
if (temp_v1 < 0x118) {
arg0 = -1;
} else {
setFlag(0x2A, TRUE, FLAG_TYPE_GLOBAL);
}
}
if (arg2 == 2) {
if (temp_v1 < 0x119) {
arg0 = -1;
} else {
setFlag(0x2B, TRUE, FLAG_TYPE_GLOBAL);
}
}
}
if (arg0 >= 0) {
func_80712524(arg0, arg1);
return;
}
}
if (game_mode_copy == 0xE) {
setIntroStoryPlaying(0);
func_80712490(MAP_MAIN_MENU, 0, GAME_MODE_MAIN_MENU);
} else {
func_807124B8(MAP_NINTENDO_LOGO, 0, 1);
}
}
*/
// jumptable
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_114270/func_80714060.s")

View File

@ -79,7 +79,7 @@ Actor *func_80627EA8(s16 arg0) {
return actor;
}
// jumptable
// Jumptable
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_2C910/func_80627F04.s")
s32 func_80629148(void) {

View File

@ -675,6 +675,65 @@ void func_80679290(Actor *arg0, s32 arg1, s32 arg2, u8 arg3, s32 arg4, s32 arg5,
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_7CA80/func_80679334.s")
/*
// TODO: Close
void func_80679334(void) {
Struct807FBF18 *var_s0;
Actor *temp_s2;
ActorCollision **var_a0;
ActorCollision *temp_s2_2;
ActorCollision *temp_t9;
ActorCollision *var_a1;
ActorCollision *var_v0;
s32 temp_t7;
s32 var_a0_2;
s32 i;
u32 temp_a0;
Struct807FBF18 *temp_v0;
for (i = 0; i < D_807FBFD8; i++) {
temp_t7 = D_807FBF18[i].unk8 - 1;
D_807FBF18[i].unk8 = temp_t7;
if (temp_t7 == 0) {
temp_s2 = D_807FBF18[i].unk4;
if (func_8067AF44(temp_s2) != 0) {
var_v0 = temp_s2->collision_queue_pointer;
var_a0 = &temp_s2->collision_queue_pointer;
var_a1 = NULL;
while (var_v0) {
var_a0 = &var_v0->next;
var_a1 = var_v0;
var_v0 = var_v0->next;
}
temp_t9 = D_807FBF18[i].unk0;
*var_a0 = temp_t9;
temp_t9->prev = var_a1;
} else {
temp_s2_2 = D_807FBF18[i].unk0;
temp_a0 = temp_s2_2->unk10;
if (temp_a0 != 0) {
func_8061130C(temp_a0);
}
func_8061130C(temp_s2_2);
}
}
}
do {
var_a0_2 = FALSE;
for (i = 0; i < D_807FBFD8; i++) {
if (D_807FBF18[i].unk8 == 0) {
D_807FBFD8--;
var_a0_2 = TRUE;
temp_v0 = &D_807FBF18[D_807FBFD8];
D_807FBF18[i].unk0 = temp_v0->unk0;
D_807FBF18[i].unk4 = temp_v0->unk4;
D_807FBF18[i].unk8 = temp_v0->unk8;
}
}
} while (var_a0_2 != FALSE);
}
*/
ActorCollision *func_80679490(Actor * arg0, s32 arg1, u8 arg2, s32 arg3, s32 arg4) {
ActorCollision *temp_v0 = malloc(sizeof(ActorCollision));
temp_v0->unk0 = arg1;
@ -691,8 +750,144 @@ ActorCollision *func_80679490(Actor * arg0, s32 arg1, u8 arg2, s32 arg3, s32 arg
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_7CA80/func_80679DC4.s")
extern u8 D_807FBB85;
extern s32 D_8071F758; // TODO: Datatype
extern s32 D_80720E2C; // TODO: Datatype
/*
// TODO: Close
void func_80679DC4(Actor *arg0, Actor *arg1, u8 arg2) {
s32 sp3C;
s32 var_a2;
s32 var_v0;
u16 temp_v0_2;
PlayerAdditionalActorData *temp_v1;
D_807FBB85 = 1;
if ((arg0 == D_807FBB48) && ((var_a2 = 1, (character_change_array[extra_player_info_pointer->unk1A4].unk2C0 != 2)) || (arg1 == NULL) || !(arg1->interactable & 2))) {
sp3C = arg2 != 0 ? 0x30 : 0x2E;
if ((arg1 != NULL) && (arg1->unk58 == 0x116)) {
func_80686CF8(arg0);
var_a2 = TRUE;
switch (arg1->control_state_progress) {
case 1:
temp_v1 = extra_player_info_pointer;
var_a2 = 0;
temp_v1->unk1F0 = temp_v1->unk1F0 ^ 0x80;
break;
case 2:
sp3C = 0x27;
break;
case 3:
func_807149FC(0xF0);
func_807149B8(1);
func_8071498C(&D_8071F758);
func_80714C08(&D_80720E2C, 0.4f, arg0, 1, 2);
func_807149FC(0xF0);
func_807149B8(1);
func_8071498C(&D_8071F758);
func_80714C08(&D_80720E2C, 0.38f, arg0, 5, 2);
func_807149FC(0xF0);
func_807149B8(1);
func_8071498C(&D_8071F758);
func_80714C08(&D_80720E2C, 0.3f, arg0, 6, 2);
var_a2 = FALSE;
extra_player_info_pointer->unk1F0 |= 0x08000000;
break;
}
extra_player_info_pointer->unk200 = 0xF0;
} else if ((arg1 != NULL) && ((((arg1->interactable & 1) != 0)) || (arg1->interactable & 4) || (arg1->interactable & 2))) {
var_a2 = TRUE;
if (func_80714608(0) != 0) {
var_a2 = TRUE;
if (func_806D0DE4(arg0, arg1, 1) != 0) {
sp3C = 0x31;
} else {
var_v0 = 1;
if (arg1->interactable & 4) {
var_v0 = 3;
}
if ((arg1->control_state != 0x28) && (var_v0 < 3)) {
sp3C = 0x2B;
} else {
sp3C = 0xE;
}
}
}
}
if (var_a2 != 0) {
func_806EB0C0(sp3C, arg1, cc_player_index);
}
}
}
*/
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_7CA80/func_8067A09C.s")
typedef struct Struct8067A09C Struct8067A09C;
// TODO: Any overlap with existing structs?
struct Struct8067A09C {
s32 unk0;
s32 unk4;
s32 unk8;
s32 unkC;
s32 unk10;
Struct8067A09C *unk14; // Doubly linked list
Struct8067A09C *unk18; // Doubly linked list
};
/*
// TODO: Regalloc
Struct8067A09C *func_8067A09C(Struct8067A09C *arg0) {
s32 var_a1;
Struct8067A09C *temp_a2;
Struct8067A09C *var_a0;
Struct8067A09C *var_v0;
Struct8067A09C *var_v1;
var_v1 = arg0;
if (arg0 != NULL) {
var_v0 = arg0->unk14;
while (var_v0 != NULL) {
var_a0 = var_v0->unk18;
var_a1 = FALSE;
while (var_a0 != NULL && var_a1 == 0) {
if (var_v0->unk0 >= var_a0->unk0) {
var_a1 = TRUE;
var_v0->unk18->unk14 = var_v0->unk14;
if (var_v0->unk14 != NULL) {
var_v0->unk14->unk18 = var_v0->unk18;
}
// TODO: Regalloc here
temp_a2 = var_a0->unk14;
var_a0->unk14 = var_v0;
var_v0->unk14 = temp_a2;
if (temp_a2 != NULL) {
temp_a2->unk18 = var_v0;
}
var_v0->unk18 = var_a0;
}
var_a0 = var_a0->unk18;
}
if (var_a1 == FALSE) {
var_v0->unk18->unk14 = var_v0->unk14;
if (var_v0->unk14 != NULL) {
var_v0->unk14->unk18 = var_v0->unk18;
}
var_v0->unk18 = NULL;
var_v0->unk14 = var_v1;
var_v1->unk18 = var_v0;
var_v1 = var_v0;
}
var_v0 = var_v0->unk14;
}
}
return var_v1;
}
*/
// TODO: Needs proper definition for D_807FBB70
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_7CA80/func_8067A170.s")
// Jumptable

View File

@ -20,7 +20,35 @@ void func_80631F58(s32, void *, void **);
s16 func_806531B8(f32, f32, f32, s16);
void func_8066B424(void);
u16 func_80688C84(u16);
void func_80689250(s16, f32, f32, f32, s32, f32, Struct807500B4*, s32, s32, s32);
typedef struct {
f32 unk0;
f32 unk4;
f32 unk8;
f32 unkC;
} Struct80689250;
ActorSpawner *func_80689250(s16 arg0, f32 arg1, f32 arg2, f32 arg3, s16 arg4, f32 arg5, void *arg6, u8 arg7, s32 arg8, s16 arg9);
typedef struct {
s16 unk0;
s16 unk2;
s32 unk4;
s32 unk8;
s32 unkC;
s32 unk10;
s32 unk14;
s32 unk18;
s32 unk1C;
s32 unk20;
s32 unk24;
s32 unk28;
s32 unk2C;
} GlobalASMStruct_8074E8B0;
extern f64 D_80759C80;
extern GlobalASMStruct_8074E8B0 D_8074E8B0[];
void func_80689710(ActorSpawner *arg0, u8 arg1);
f32 func_80689DD4(f32, f32, f32);
u8 func_80689F80(ActorSpawner*);
@ -213,27 +241,75 @@ void func_806891D8(s16 arg0, f32 arg1, f32 arg2, f32 arg3, s16 arg4, f32 arg5, s
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_8D3E0/func_80689250.s")
/*
// TODO: Close
ActorSpawner *func_80689250(s16 arg0, f32 arg1, f32 arg2, f32 arg3, s16 arg4, f32 arg5, void *arg6, u8 arg7, s32 arg8, s16 arg9) {
ActorSpawner *sp2C;
ActorSpawner *temp_v0;
ActorSpawner *var_v1;
f32 temp_f0;
f32 temp_f16;
s32 var_a1;
s32 var_a1_2;
s32 var_v0;
Struct80689250 *var_a0;
var_a1 = 0;
var_v0 = FALSE;
while ((var_v0 == FALSE) && (var_a1 < 0x80)) {
if ((arg0 + 0x10) == D_8074E8B0[var_a1].unk0) {
var_v0 = TRUE;
} else {
var_a1++;
}
}
temp_v0 = malloc(0x6C);
temp_v0->actor_type = arg0;
temp_v0->z_position = arg3;
temp_v0->unk18 = arg3;
temp_v0->x_position = arg1;
temp_v0->unk10 = arg1;
temp_v0->y_position = arg2;
temp_v0->unk14 = arg2;
temp_v0->id = arg9;
temp_v0->y_rotation = arg4;
temp_v0->tied_actor = NULL;
temp_v0->previous_spawner = NULL;
temp_v0->unk48 = 0;
temp_v0->unk20 = arg5;
temp_v0->unk5C = D_8074E8B0[var_a1].unkC;
temp_v0->drawing_code = D_8074E8B0[var_a1].unk10;
temp_v0->unk58 = D_8074E8B0[var_a1].unk2;
sp2C = temp_v0;
var_a1_2 = 0;
sp2C->unk4A = func_806531B8(arg1, arg2, arg3, 0);
var_v1 = sp2C;
sp2C->unk4C = arg7;
sp2C->unk50 = arg8;
temp_f0 = D_8074E8B0[var_a1].unk8;
sp2C->unk54 = temp_f0 * temp_f0;
var_a0 = arg6;
do {
var_a1_2 += 4;
var_v1++;
var_v1->unk14 = var_a0->unk0;
var_v1->unk18 = var_a0->unk4;
var_v1->y_rotation = var_a0->unk8;
var_v1->unk20 = var_a0->unkC;
var_a0++;
} while (var_a1_2 != 8);
sp2C->next_spawner = actor_spawner_pointer;
if (actor_spawner_pointer != NULL) {
actor_spawner_pointer->previous_spawner = sp2C;
}
actor_spawner_pointer = sp2C;
return sp2C;
}
*/
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_8D3E0/func_80689418.s")
typedef struct {
s16 unk0;
s16 unk2;
s32 unk4;
s32 unk8;
s32 unkC;
s32 unk10;
s32 unk14;
s32 unk18;
s32 unk1C;
s32 unk20;
s32 unk24;
s32 unk28;
s32 unk2C;
} GlobalASMStruct_8074E8B0;
extern f64 D_80759C80;
extern GlobalASMStruct_8074E8B0 D_8074E8B0[];
void func_8068A1B8(void);
void func_80613794(Actor*, u8);

View File

@ -26,11 +26,13 @@ void func_8068A830(void) {
func_80727958();
}
// Hmm, negative struct offsets
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_8F4B0/func_8068A858.s")
// Jumptable, really interesting though, flag checks/sets and story skip
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_8F4B0/func_8068ABE0.s")
// Jumptable
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_8F4B0/func_8068AD7C.s")
void func_8068B80C(void) {
@ -105,12 +107,15 @@ void func_8068B8FC(void) {
temp_v0->unk0 = 0xFF;
}
// TODO: Needs proper definition for D_807FBB70
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_8F4B0/func_8068B930.s")
// TODO: Needs proper definition for D_807FBB70
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_8F4B0/func_8068B9B4.s")
extern u8 D_807FBDC4;
// TODO: Needs proper definition for D_807FBB70
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_8F4B0/func_8068BA2C.s")
// Jumptable
@ -208,23 +213,32 @@ void func_8068C350(s32 arg0, Actor *arg1, u8 arg2) {
}
}
// Displaylist stuff
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_8F4B0/func_8068C3A0.s")
// displaylist stuff
// Displaylist stuff
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_8F4B0/func_8068C5A8.s")
// Displaylist stuff
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_8F4B0/func_8068D264.s")
// Displaylist stuff
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_8F4B0/func_8068D8C8.s")
// Displaylist stuff
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_8F4B0/func_8068D9DC.s")
// Displaylist stuff
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_8F4B0/func_8068DAF4.s")
// Displaylist stuff
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_8F4B0/func_8068DBA4.s")
// Displaylist stuff, huge
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_8F4B0/func_8068DC54.s")
// Displaylist stuff
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_8F4B0/func_8068E474.s")
// Displaylist stuff
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_8F4B0/func_8068E7B4.s")

View File

@ -39,6 +39,7 @@ void func_80699914(void) {
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_9DD70/func_8069A614.s")
// TODO: Needs proper definition for D_807FBB70
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_9DD70/func_8069A750.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_9DD70/func_8069A7C8.s")

View File

@ -641,3 +641,92 @@ void func_806A1008(u8 arg0, u8 arg1) {
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_A2F10/func_806A10BC.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_A2F10/func_806A112C.s")
extern u8 D_807503D4;
extern u8 D_807503E0;
extern f64 D_8075A540;
/*
// TODO: Pretty close, need some structs
void func_806A112C(void) {
f32 sp38;
f32 temp_f20;
s16 var_s0_3;
s32 temp_v0_2;
s32 var_s2;
s8 var_s0_2;
u32 temp_v0;
u8 temp_v0_3;
void *temp_a1;
void *temp_a2;
void *temp_s5;
temp_v0 = current_actor_pointer->object_properties_bitfield;
temp_s5 = current_actor_pointer->additional_actor_data;
if (!(temp_v0 & 0x10)) {
current_actor_pointer->object_properties_bitfield = temp_v0 | 0x400;
func_80724D28(0, 7);
var_s0_2 = 0;
do {
temp_v0_2 = var_s0_2 * 0x10;
*(current_actor_pointer->animation_state->unk24 + temp_v0_2) = var_s0_2;
var_s0_2 = var_s0_2 + 1;
(current_actor_pointer->animation_state->unk24 + temp_v0_2)->unk1 = 0xFF;
} while (var_s0_2 < 7);
if (current_actor_pointer->unk15F == 0) {
sp38 = current_actor_pointer->animation_state->scale_y / D_8075A540;
*temp_s5 = getPointerTableFile(0x13, 6, 1, 1);
var_s2 = 1;
func_806A0F78(current_actor_pointer, D_807503D4, D_807503E0);
temp_f20 = 75.0f * sp38;
var_s0_3 = 1;
do {
func_80677FA8(0x94, 0xE1);
*D_807FBB44->additional_actor_data = *temp_s5;
D_807FBB44->unk15F = var_s0_3;
D_807FBB44->y_rotation = current_actor_pointer->y_rotation + ((var_s0_3 / 3) << 0xA);
D_807FBB44->x_position = current_actor_pointer->x_position - (func_80612794(D_807FBB44->y_rotation) * temp_f20);
D_807FBB44->y_position = current_actor_pointer->y_position + (((var_s0_3 % 3) & 0xFF) * 0x11);
D_807FBB44->z_position = current_actor_pointer->z_position - (func_80612790(D_807FBB44->y_rotation) * temp_f20);
func_807248B0(D_807FBB44, current_actor_pointer->animation_state->scale_y);
temp_a2 = var_s2 + 0x80750000;
temp_a1 = var_s2 + 0x80750000;
var_s2 = (var_s2 + 1) & 0xFF;
func_806A0F78(D_807FBB44, temp_a1->unk3D4, temp_a2->unk3E0);
var_s0_3 += 1;
} while (var_s0_3 < 0xC);
current_actor_pointer->x_position -= temp_f20 * func_80612794(current_actor_pointer->y_rotation);
current_actor_pointer->z_position -= temp_f20 * func_80612790(current_actor_pointer->y_rotation);
}
}
switch (current_actor_pointer->control_state) {
case 1:
current_actor_pointer->unk168 += 1;
if (current_actor_pointer->unk168 == 7) {
current_actor_pointer->control_state += 1;
current_actor_pointer->unk168 = 0;
}
break;
case 2:
func_806A10BC(temp_s5);
current_actor_pointer->unk168 += 1;
if (current_actor_pointer->unk168 == 0xB) {
current_actor_pointer->control_state += 1;
}
break;
case 3:
func_806A10BC(temp_s5);
current_actor_pointer->unk168 += 1;
if (current_actor_pointer->unk168 >= 0x34) {
current_actor_pointer->unk168 = ((rand() >> 0xF) % 1000) % 3;
current_actor_pointer->control_state = 0;
}
break;
case 10:
current_actor_pointer->unk168 = 0xB;
func_806A10BC(temp_s5);
break;
}
func_806319C4(current_actor_pointer, 0);
}
*/

View File

@ -566,6 +566,7 @@ void func_806AB808(void *arg0, s16 arg1, s16 arg2, s16 arg3, s16 arg4, s32 arg5,
}
*/
// Displaylist stuff
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_ACDC0/func_806ABA6C.s")
// Displaylist stuff
@ -573,7 +574,65 @@ void func_806AB808(void *arg0, s16 arg1, s16 arg2, s16 arg3, s16 arg4, s32 arg5,
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_ACDC0/func_806ABC94.s")
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_ACDC0/func_806ABE3C.s")
extern s16 D_80744720[];
extern s8 D_80750530[];
extern s16 D_807505B0[];
extern s16 D_807505B8[];
extern s16 D_807FC828[];
extern s16 D_807FC82A;
extern s16 D_807FC82C;
extern s16 D_807FC82E;
extern s16 D_807FC830;
extern s16 D_807FC832;
extern s16 D_807FC834;
extern s16 D_807FC836;
extern s16 D_807FC838;
void func_806ABE3C(void) {
CharacterProgress *var_a1;
s32 var_s0;
s32 i;
s32 j;
for (i = 0; i < 7; i++) {
D_807FC828[i] = 0;
}
var_s0 = 0;
for (i = 0; i < 5; i++) {
for (j = 0; j < 14; j++) {
var_s0 += D_807FC950[0].character_progress[i].golden_bananas[j];
}
}
D_807FC828[0] = var_s0;
var_s0 = 0;
for (i = 0; i < 8; i++) {
if (isFlagSet(D_80744710[i], FLAG_TYPE_PERMANENT) != 0) {
var_s0++;
}
}
D_807FC82C = var_s0;
D_807FC832 = func_80731AA8(0x24D, 20, FLAG_TYPE_PERMANENT);
D_807FC82E = func_80731AA8(0x225, 40, FLAG_TYPE_PERMANENT);
// TODO: Get rid of this empty if statement, I don't like doing this...
if (var_s0);
var_s0 = 0;
for (i = 0; i < 10; i++) {
if ((D_807505B8[i] >= 0) && (isFlagSet(D_807505B8[i], FLAG_TYPE_PERMANENT) != FALSE)) {
var_s0++;
}
}
D_807FC82A = var_s0;
D_807FC834 = isFlagSet(0x84, FLAG_TYPE_PERMANENT);
D_807FC830 = isFlagSet(0x17B, FLAG_TYPE_PERMANENT);
D_807FC836 = func_80731AA8(0x1FD, 40, FLAG_TYPE_PERMANENT);
D_80750530[0] = 1;
for (i = 1; i < 5; i++) {
D_80750530[i] = isFlagSet(D_807505B0[i - 1], FLAG_TYPE_PERMANENT);
}
D_807FC838 = 1;
}
void func_806AC048(s32 arg0, s32 arg1) {
func_80703374(arg0, 0, 0, 0, 0x46);

View File

@ -17,6 +17,23 @@ D_80035898 = 0x80035898;
D_80039D18 = 0x80039D18;
D_8004A358 = 0x8004A358;
D_8003B3C8 = 0x8003B3C8;
D_8003B610 = 0x8003B610;
D_8003B858 = 0x8003B858;
D_8003BAA0 = 0x8003BAA0;
D_8003BCE8 = 0x8003BCE8;
D_8003BF30 = 0x8003BF30;
D_8003C178 = 0x8003C178;
D_8003C3C0 = 0x8003C3C0;
D_8003C608 = 0x8003C608;
D_8003C850 = 0x8003C850;
D_8003CA98 = 0x8003CA98;
D_8003CCE0 = 0x8003CCE0;
D_8003CF28 = 0x8003CF28;
D_8003D170 = 0x8003D170;
D_8003D3B8 = 0x8003D3B8;
D_8003D600 = 0x8003D600;
D_8003D848 = 0x8003D848;
arcade_jumpman_obj_template = 0x8004A398;
arcade_barrel_obj_template = 0x8004A3B8;

View File

@ -240,3 +240,5 @@ D_80721170 = 0x80721170;
D_80758E50 = 0x80758E50;
D_80758E60 = 0x80758E60;
D_807505B0 = 0x807505B0;