Assorted matches (#346)

Signed-off-by: Taggerung <tyler.taggerung@email.com>
This commit is contained in:
Tyler McGavran
2023-07-17 20:06:10 -04:00
committed by GitHub
parent 4bb7fa372c
commit ce15ceac10
11 changed files with 307 additions and 1312 deletions
+199 -430
View File
@@ -1231,137 +1231,43 @@ void func_800940EC(s32 arg0) {
func_80057CE4();
}
#ifdef MIPS_TO_C
//generated by m2c commit 0927f17aac197848d4ebdf0c6bbad74b01f0851c
f32 D_800E8530 = 0.0f;
f32 D_800E8534 = 3.0f;
void func_800942D0(void) {
Gfx *sp6C;
Gfx *temp_v0;
Gfx *temp_v0_10;
Gfx *temp_v0_11;
Gfx *temp_v0_12;
Gfx *temp_v0_13;
Gfx *temp_v0_14;
Gfx *temp_v0_15;
Gfx *temp_v0_16;
Gfx *temp_v0_2;
Gfx *temp_v0_3;
Gfx *temp_v0_4;
Gfx *temp_v0_5;
Gfx *temp_v0_6;
Gfx *temp_v0_7;
Gfx *temp_v0_8;
Gfx *temp_v0_9;
Mtx *temp_s1;
Mtx *temp_s1_2;
Mtx *temp_s1_3;
Mtx *temp_s4;
Mtx *temp_s4_2;
Mtx *var_s1;
Mtx *test;
f32 var_f26;
s32 temp_s3;
s32 var_s2;
s32 var_s5;
u32 temp_t4;
temp_v0 = gDisplayListHead;
gDisplayListHead = temp_v0 + 8;
temp_v0->words.w0 = 0x01030040;
temp_v0->words.w1 = (u32) gGfxPool;
temp_v0_2 = gDisplayListHead;
gDisplayListHead = temp_v0_2 + 8;
temp_v0_2->words.w0 = 0x01020040;
temp_s1 = &gGfxPool->mtxPool[0x32B];
temp_v0_2->words.w1 = (u32) &gGfxPool->mtxPool[7];
guRotate(temp_s1, D_8018EDC8, 1.0f, 0.0f, 0.0f);
temp_s4 = temp_s1 + 0x40;
guRotate(temp_s4, D_8018EDCC, 0.0f, 1.0f, 0.0f);
guScale(temp_s1 + 0x80, 1.0f, 1.0f, D_8018EDC4);
temp_v0_3 = gDisplayListHead;
gDisplayListHead = temp_v0_3 + 8;
temp_v0_3->words.w1 = (u32) temp_s1;
temp_v0_3->words.w0 = 0x01000040;
temp_v0_4 = gDisplayListHead;
temp_s1_2 = temp_s4 + 0x40;
gDisplayListHead = temp_v0_4 + 8;
temp_v0_4->words.w1 = (u32) temp_s4;
temp_v0_4->words.w0 = 0x01000040;
temp_v0_5 = gDisplayListHead;
gDisplayListHead = temp_v0_5 + 8;
temp_v0_5->words.w1 = (u32) temp_s1_2;
temp_v0_5->words.w0 = 0x01040040;
temp_v0_6 = gDisplayListHead;
gDisplayListHead = temp_v0_6 + 8;
temp_v0_6->words.w0 = 0xB900031D;
temp_v0_6->words.w1 = 0x00552078;
temp_v0_7 = gDisplayListHead;
gDisplayListHead = temp_v0_7 + 8;
temp_v0_7->words.w1 = 0;
temp_v0_7->words.w0 = 0xFB000000;
temp_v0_8 = gDisplayListHead;
gDisplayListHead = temp_v0_8 + 8;
temp_v0_8->words.w1 = (u32) D_02007F60;
temp_v0_8->words.w0 = 0x06000000;
temp_v0_9 = gDisplayListHead;
gDisplayListHead = temp_v0_9 + 8;
temp_v0_9->words.w1 = 0;
temp_v0_9->words.w0 = 0xBD000000;
var_s1 = temp_s1_2 + 0x40;
var_s2 = 0;
var_s5 = 0xC0;
if (D_800E8530 > 0.0f) {
s32 thing;
test = &gGfxPool->mtxPool[0x32B];
gSPMatrix(gDisplayListHead++, &gGfxPool->mtxPool[0], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
gSPMatrix(gDisplayListHead++, &gGfxPool->mtxPool[7], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
guRotate(test, D_8018EDC8, 1.0f, 0.0f, 0.0f);
guRotate(test + 1, D_8018EDCC, 0.0f, 1.0f, 0.0f);
guScale( test + 2, 1.0f, 1.0f, D_8018EDC4);
gSPMatrix(gDisplayListHead++, test++, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPMatrix(gDisplayListHead++, test++, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPMatrix(gDisplayListHead++, test++, G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
gDPSetEnvColor(gDisplayListHead++, 0x00, 0x00, 0x00, 0x00);
gSPDisplayList(gDisplayListHead++, D_02007F60);
gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW);
if (D_800E8530 > 0) {
var_f26 = D_800E8534;
if (var_f26 > 10.0f) {
var_f26 = 10.0f;
}
sp6C = D_06009410;
do {
guRotate(var_s1, 0.0f, 1.0f, 0.0f, 0.0f);
temp_s3 = var_s2 + 1;
temp_s4_2 = var_s1 + 0x40;
guRotate(temp_s4_2, (f32) temp_s3 * D_800E8530 * var_f26, 0.0f, 1.0f, 0.0f);
guScale(var_s1 + 0x80, 1.0f, 1.0f, 2.0f);
temp_v0_10 = gDisplayListHead;
gDisplayListHead = temp_v0_10 + 8;
temp_v0_10->words.w1 = (u32) var_s1;
temp_v0_10->words.w0 = 0x01040040;
temp_v0_11 = gDisplayListHead;
temp_s1_3 = temp_s4_2 + 0x40;
gDisplayListHead = temp_v0_11 + 8;
temp_v0_11->words.w1 = (u32) temp_s4_2;
temp_v0_11->words.w0 = 0x01000040;
temp_v0_12 = gDisplayListHead;
temp_t4 = var_s5 & 0xFF;
gDisplayListHead = temp_v0_12 + 8;
temp_v0_12->words.w1 = (u32) temp_s1_3;
temp_v0_12->words.w0 = 0x01000040;
temp_v0_13 = gDisplayListHead;
gDisplayListHead = temp_v0_13 + 8;
temp_v0_13->words.w1 = 0x005049D8;
temp_v0_13->words.w0 = 0xB900031D;
temp_v0_14 = gDisplayListHead;
var_s5 -= 0x10;
gDisplayListHead = temp_v0_14 + 8;
temp_v0_14->words.w1 = temp_t4;
temp_v0_14->words.w0 = 0xFB000000;
temp_v0_15 = gDisplayListHead;
var_s2 = temp_s3;
var_s1 = temp_s1_3 + 0x40;
gDisplayListHead = temp_v0_15 + 8;
temp_v0_15->words.w0 = 0x06000000;
temp_v0_15->words.w1 = (u32) sp6C;
temp_v0_16 = gDisplayListHead;
gDisplayListHead = temp_v0_16 + 8;
temp_v0_16->words.w1 = 0;
temp_v0_16->words.w0 = 0xBD000000;
} while (temp_s3 != 0xC);
for (var_s2 = 0, thing = 0xC0; var_s2 < 0xC; var_s2++, thing -= 0x10) {
guRotate(test, 0.0f, 1.0f, 0.0f, 0.0f);
guRotate(test + 1, (var_s2 + 1) * D_800E8530 * var_f26, 0.0f, 1.0f, 0.0f);
guScale( test + 2, 1.0f, 1.0f, 2.0f);
gSPMatrix(gDisplayListHead++, test++, G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPMatrix(gDisplayListHead++, test++, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPMatrix(gDisplayListHead++, test++, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_XLU_SURF, G_RM_AA_ZB_XLU_SURF2);
gDPSetEnvColor(gDisplayListHead++, 0x00, 0x00, 0x00, thing);
gSPDisplayList(gDisplayListHead++, D_06009410);
gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW);
}
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800942D0.s")
#endif
void func_80094660(struct GfxPool *arg0, UNUSED s32 arg1) {
u16 perspNorm;
@@ -12951,31 +12857,15 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800AA280.s")
#endif
#ifdef MIPS_TO_C
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
s32 check_for_controller_pak(?); /* extern */
extern s8 D_800E86AC;
extern u16 gCompanyCode;
extern u32 gGameCode;
extern s8 gControllerPak1State;
extern u8 gGameName;
extern u8 gExtCode;
extern OSPfs gControllerPak1FileHandle;
extern s32 gControllerPak1NumFilesUsed;
extern s32 gControllerPak1MaxWriteableFiles;
extern s32 gControllerPak1FileNote;
extern s8 gMainMenuSelectionDepth;
//generated by m2c commit b52d92c2340f6f4ba1aafb464188bb698752fbb0 on Jul-16-2023
void func_800AA2EC(struct_8018D9E0_entry *arg0) {
s32 sp20;
s32 temp_v0;
s32 temp_v0_2;
s32 temp_v0_3;
s32 var_t1;
s8 temp_t6;
s8 temp_v0;
temp_t6 = gMainMenuSelectionDepth;
var_t1 = 0;
switch (temp_t6) {
switch (gMainMenuSelectionDepth) {
case OPTIONS_SELECTION:
case DATA_SELECTION:
case PLAYER_NUM_SELECTION:
@@ -12986,12 +12876,12 @@ void func_800AA2EC(struct_8018D9E0_entry *arg0) {
case CONFIRM_OK_SELECTION:
case CONFIRM_OK_SELECTION_FROM_BACK_OUT:
case TIME_TRIALS_DATA_SELECTION_FROM_BACK_OUT:
if ((arg0->unk4 == 0) && (temp_v0 = D_8018EDF3, (temp_v0 == 1)) && (*(&D_800E86AC - 1 + temp_v0) == 1)) {
if ((arg0->unk4 == 0) && (D_8018EDF3 == 1) && ((D_800E86AC - 1)[D_8018EDF3] == 1)) {
if (gControllerPak1State != 0) {
sp20 = 0;
temp_v0_2 = osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, &gGameName, &gExtCode, &gControllerPak1FileNote);
temp_v0 = osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, gGameName, gExtCode, &gControllerPak1FileNote);
var_t1 = 0;
switch (temp_v0_2) { /* switch 1; irregular */
switch (temp_v0) { /* switch 1; irregular */
case 5: /* switch 1 */
break;
case 0: /* switch 1 */
@@ -13010,12 +12900,12 @@ void func_800AA2EC(struct_8018D9E0_entry *arg0) {
arg0->unk4 = 2;
return;
}
temp_v0_3 = osPfsInit(&gSIEventMesgQueue, &gControllerPak1FileHandle, 0);
if (temp_v0_3 != 0) {
if (temp_v0_3 != 1) {
if (temp_v0_3 != 4) {
if (temp_v0_3 != 0x0000000A) {
if (temp_v0_3 == 0x0000000B) {
temp_v0_2 = osPfsInit(&gSIEventMesgQueue, &gControllerPak1FileHandle, 0);
if (temp_v0_2 != 0) {
if (temp_v0_2 != 1) {
if (temp_v0_2 != 4) {
if (temp_v0_2 != 0x0000000A) {
if (temp_v0_2 == 0x0000000B) {
goto block_22;
}
goto block_24;
@@ -13032,7 +12922,7 @@ block_22:
return;
}
gControllerPak1State = 1;
if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, &gGameName, &gExtCode, &gControllerPak1FileNote) == 0) {
if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, gGameName, gExtCode, &gControllerPak1FileNote) == 0) {
arg0->unk4 = 1;
return;
}
@@ -13692,90 +13582,50 @@ void func_800AB290(struct_8018D9E0_entry *arg0) {
}
#ifdef MIPS_TO_C
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
// Decent work has been done, but not quite right
// https://decomp.me/scratch/YLbkC
void func_800AB314(struct_8018D9E0_entry *arg0) {
s32 sp3C;
void *sp24;
void **sp1C;
s32 temp_t2;
s32 temp_t5;
s32 temp_t7;
s32 var_a1;
s32 var_v0;
s8 var_a1_2;
struct_8018D9E0_entry *temp_v0;
void **var_v1;
void **var_v1_2;
void *temp_t7_2;
s32 one;
u32 var_v0;
struct_8018D9E0_entry *sp24[4];
var_v1 = &sp24;
var_a1 = 0;
do {
sp1C = var_v1;
sp3C = var_a1;
temp_v0 = find_8018D9E0_entry_dupe(var_a1 + 0x5F);
var_a1 += 1;
var_v1 += 4;
var_v1->unk-4 = temp_v0;
} while (var_a1 < 4);
if (gModeSelection != GRAND_PRIX) {
if (D_8018EDEC != 1) {
for (var_a1 = 0; var_a1 < 4; var_a1++) {
sp24[var_a1] = find_8018D9E0_entry_dupe(var_a1 + 0x5F);
}
if (gModeSelection != 0) {
if (D_8018EDEC != 1U) {
arg0->unk4 = 0;
arg0->unk20 = 0;
if (gCupCourseSelection == 0) {
sp24->unk15 = 1;
if (arg0->unk1C != 0) {
arg0->unk1C = 0;
for (var_a1 = 0; var_a1 < 4; var_a1++) {
if (gCupCourseSelection == var_a1) {
sp24[var_a1]->visible = 1;
if (arg0->unk1C != var_a1) {
arg0->unk1C = var_a1;
}
}
} else {
sp24->unk15 = 0;
}
if (gCupCourseSelection == 1) {
sp28->unk15 = 1;
if (arg0->unk1C != 1) {
arg0->unk1C = (s32) 1;
else {
sp24[var_a1]->visible = 0;
}
} else {
sp28->unk15 = 0;
}
if (gCupCourseSelection == 2) {
sp2C->unk15 = 1;
if (arg0->unk1C != 2) {
arg0->unk1C = 2;
}
} else {
sp2C->unk15 = 0;
}
if (gCupCourseSelection == 3) {
sp30->unk15 = 1;
if (arg0->unk1C != 3) {
arg0->unk1C = 3;
}
} else {
sp30->unk15 = 0;
}
} else {
arg0->unk4 = 3;
sp24->unk15 = 1;
sp24->unk14 = 6;
sp28->unk15 = 1;
sp28->unk14 = 6;
sp2C->unk15 = 1;
sp2C->unk14 = 6;
sp30->unk15 = 1;
sp30->unk14 = 6;
for (var_a1 = 0; var_a1 < 4; var_a1++) {
sp24[var_a1]->visible = 1;
sp24[var_a1]->priority = 6;
}
}
} else {
var_v0 = arg0->unk4;
switch (var_v0) { /* irregular */
case 0:
if (((s32) arg0->unk1C / 4) == gCupSelection) {
temp_t5 = arg0->unk20 + 1;
arg0->unk20 = temp_t5;
if (temp_t5 >= 0x33) {
if ((arg0->unk1C / 4) == gCupSelection) {
arg0->unk20++;
if (arg0->unk20 >= 0x33) {
arg0->unk4 = 1;
arg0->unk20 = 0;
arg0->unk1C = (gCupSelection * 4) + 1;
arg0->unk1C = (gCupSelection * 4);
arg0->unk1C++;
}
} else {
arg0->unk20 = 0;
@@ -13788,18 +13638,17 @@ void func_800AB314(struct_8018D9E0_entry *arg0) {
var_v0 = arg0->unk4;
break;
case 1:
var_v0 = 0;
if (((s32) arg0->unk1C / 4) != gCupSelection) {
if ((arg0->unk1C / 4) != gCupSelection) {
arg0->unk4 = 0;
var_v0 = 0;
arg0->unk20 = 0;
arg0->unk1C = 0;
} else {
temp_t2 = arg0->unk20 + 1;
arg0->unk20 = temp_t2;
if (temp_t2 >= 0x1F) {
arg0->unk20++;
if (arg0->unk20 >= 0x1F) {
arg0->unk20 = 0;
arg0->unk1C = (gCupSelection * 4) + (((arg0->unk1C % 4) + 1) % 4);
var_v0 = arg0->unk4;
arg0->unk1C = (gCupSelection * 4) + ((s32) (((s32) arg0->unk1C % 4) + 1) % 4);
} else {
if (D_8018EDEC == 3) {
arg0->unk4 = 2;
@@ -13810,9 +13659,8 @@ void func_800AB314(struct_8018D9E0_entry *arg0) {
}
break;
case 2:
temp_t7 = arg0->unk20 + 1;
arg0->unk20 = temp_t7;
if (temp_t7 >= 0x1A) {
arg0->unk20++;
if (arg0->unk20 >= 0x1A) {
arg0->unk4 = 3;
arg0->unk20 = 0;
}
@@ -13832,70 +13680,39 @@ void func_800AB314(struct_8018D9E0_entry *arg0) {
}
break;
}
if ((var_v0 != 0) && (var_v0 != (s32) 1)) {
var_a1_2 = 0;
if (var_v0 != 2) {
if (var_v0 != (s32) 3) {
return;
switch (var_v0) {
case 0:
case 1:
for (var_a1 = 0; var_a1 < 4; var_a1++) {
if ((arg0->unk1C % 4) == var_a1) {
sp24[var_a1]->visible = 1;
} else {
sp24[var_a1]->visible = 0;
}
sp24->unk15 = 1;
sp24->unk14 = 6;
sp28->unk15 = 1;
sp28->unk14 = 6;
sp2C->unk15 = 1;
sp2C->unk14 = 6;
sp30->unk15 = 1;
sp30->unk14 = 6;
return;
sp24[var_a1]->priority = 6;
}
var_v1_2 = &sp24;
do {
if (var_a1_2 == ((s32) arg0->unk1C % 4)) {
var_v1_2->unk0->unk14 = 6;
} else if (arg0->unk20 < (var_a1_2 * 5)) {
var_v1_2->unk0->unk14 = 4;
break;
case 2:
for (var_a1 = 0; var_a1 < 4; var_a1++) {
if (var_a1 == (arg0->unk1C % 4)) {
sp24[var_a1]->priority = 6;
} else if(arg0->unk20 < (var_a1 * 5)) {
sp24[var_a1]->priority = 4;
} else {
var_v1_2->unk0->unk14 = 8;
sp24[var_a1]->priority = 8;
}
var_v1_2->unk0->unk15 = 1;
if ((var_a1_2 + 1) == ((s32) arg0->unk1C % 4)) {
var_v1_2->unk4->unk14 = 6;
} else if (arg0->unk20 < ((var_a1_2 * 5) + 5)) {
var_v1_2->unk4->unk14 = 4;
} else {
var_v1_2->unk4->unk14 = 8;
}
temp_t7_2 = var_v1_2->unk4;
var_a1_2 += 2;
var_v1_2 += 8;
temp_t7_2->unk15 = 1;
} while (var_a1_2 != 4);
return;
sp24[var_a1]->visible = 1;
}
break;
case 3:
for (var_a1 = 0; var_a1 < 4; var_a1++) {
sp24[var_a1]->visible = 1;
sp24[var_a1]->priority = 6;
}
break;
default:
break;
}
if (!(arg0->unk1C & 3)) {
sp24->unk15 = 1;
} else {
sp24->unk15 = 0;
}
sp24->unk14 = 6;
if (((s32) arg0->unk1C % 4) == 1) {
sp28->unk15 = 1;
} else {
sp28->unk15 = 0;
}
sp28->unk14 = 6;
if (((s32) arg0->unk1C % 4) == 2) {
sp2C->unk15 = 1;
} else {
sp2C->unk15 = 0;
}
sp2C->unk14 = 6;
if (((s32) arg0->unk1C % 4) == 3) {
sp30->unk15 = 1;
} else {
sp30->unk15 = 0;
}
sp30->unk14 = 6;
}
}
#else
@@ -14270,17 +14087,15 @@ void func_800AC324(struct_8018D9E0_entry *arg0) {
}
#ifdef MIPS_TO_C
//generated by m2c commit d9d3d6575355663122de59f6b2882d8f174e2355 on Dec-12-2022
? func_800B536C(s32, s32, s32, struct_8018D9E0_entry *); /* extern */
//generated by m2c commit b52d92c2340f6f4ba1aafb464188bb698752fbb0 on Jul-16-2023
extern ? D_80164478;
extern void *D_8018D9BC;
s32 D_800DDB24 = 1;
static s8 gGP1stPlaceReward = 9; /* const */
static s8 gGP2ndPlaceReward = 6; /* const */
static s8 gGP3rdPlaceReward = 3; /* const */
static s8 gGP4thPlaceReward = 1; /* const */
s32 D_800DDB24 = 1;
void func_800AC458(struct_8018D9E0_entry *arg0) {
void func_800AC458(void *arg0) {
s32 sp1C;
s32 sp18;
s32 temp_a1;
@@ -14293,32 +14108,32 @@ void func_800AC458(struct_8018D9E0_entry *arg0) {
s32 temp_t5;
s32 temp_t7;
s32 temp_t8;
s32 temp_v0;
s32 temp_v0_2;
s32 temp_v0_3;
s32 var_a0;
s32 var_a1;
s32 var_t1;
s8 *temp_v1;
s8 *var_v0;
u32 temp_v0;
u32 temp_v0_3;
u8 *temp_a2_2;
u8 temp_t0;
temp_v0 = arg0->unk4;
switch (temp_v0) {
case 0:
arg0->column = -0x000000A0;
arg0->unk4 = 1;
arg0->unkC = -0x000000A0;
arg0->unk4 = 1U;
D_8018D9BC->unk0 = (s8) gGP1stPlaceReward;
D_8018D9BC->unk1 = (s8) gGP2ndPlaceReward;
D_8018D9BC->unk2 = (s8) gGP3rdPlaceReward;
D_8018D9BC->unk3 = (s8) gGP4thPlaceReward;
arg0->unk20 = arg0->column;
arg0->unk20 = (s32) arg0->unkC;
return;
case 1:
temp_a1 = arg0->unk20;
var_a0 = 0x10;
arg0->column = temp_a1;
arg0->unkC = temp_a1;
if (D_8018D9D8 != 0) {
var_a0 = 0x20;
}
@@ -14330,18 +14145,18 @@ void func_800AC458(struct_8018D9E0_entry *arg0) {
return;
}
arg0->unk20 = 0;
arg0->column = 0;
arg0->unk4 = 2;
arg0->unkC = 0;
arg0->unk4 = 2U;
arg0->unk1C = 0;
D_800DC5EC->screenStartX = 0x00F0;
D_800DC5F0->screenStartX = 0x0050;
return;
case 2:
arg0->column = 0;
arg0->unkC = 0;
temp_t5 = arg0->unk1C + 1;
arg0->unk1C = temp_t5;
if (((D_8018D9D8 != 0) || (temp_t5 >= 0x1F)) && (D_800DDB24 != 0)) {
arg0->unk4 = 3;
arg0->unk4 = 3U;
arg0->unk1C = 0;
arg0->unk20 = 0;
return;
@@ -14380,11 +14195,11 @@ void func_800AC458(struct_8018D9E0_entry *arg0) {
temp_v0_3 = arg0->unk4;
arg0->unk20 = 0;
arg0->unk1C = 0;
if (temp_v0_3 < 6) {
arg0->unk4 = temp_v0_3 + 1;
if ((s32) temp_v0_3 < 6) {
arg0->unk4 = (u32) (temp_v0_3 + 1);
return;
}
arg0->unk4 = 7;
arg0->unk4 = 7U;
return;
}
break;
@@ -14392,7 +14207,7 @@ void func_800AC458(struct_8018D9E0_entry *arg0) {
temp_t2 = arg0->unk1C + 1;
arg0->unk1C = temp_t2;
if ((((D_8018D9D8 != 0) && (temp_t2 >= 0xB)) || (arg0->unk1C >= 0x3D)) && (D_800DDB24 != 0)) {
arg0->unk4 = 8;
arg0->unk4 = 8U;
arg0->unk1C = 0;
return;
}
@@ -14401,10 +14216,10 @@ void func_800AC458(struct_8018D9E0_entry *arg0) {
temp_t8 = arg0->unk1C + 1;
arg0->unk1C = temp_t8;
if (D_8018D9D8 != 0) {
arg0->unk1C = temp_t8 + 5;
arg0->unk1C = (s32) (temp_t8 + 5);
}
if (arg0->unk1C >= 0x29) {
arg0->unk4 = 9;
arg0->unk4 = 9U;
return;
}
break;
@@ -14412,17 +14227,17 @@ void func_800AC458(struct_8018D9E0_entry *arg0) {
temp_t7 = arg0->unk1C - 1;
arg0->unk1C = temp_t7;
if (D_8018D9D8 != 0) {
arg0->unk1C = temp_t7 - 5;
arg0->unk1C = (s32) (temp_t7 - 5);
}
if (arg0->unk1C <= 0) {
arg0->unk4 = 0x0000000A;
arg0->unk4 = 0x0000000AU;
arg0->unk1C = 0;
var_a1 = 0;
if (gCupCourseSelection == 3) {
var_v0 = gCharacterIdByGPOverallRank;
loop_41:
if (*(&D_80164478 + (*var_v0 * 2)) < D_8018EDF3) {
func_800B536C(var_a1, var_a1, 8, arg0);
func_800B536C(var_a1);
return;
}
var_a1 += 1;
@@ -14438,7 +14253,7 @@ loop_41:
temp_t3_2 = arg0->unk1C + 1;
arg0->unk1C = temp_t3_2;
if (temp_t3_2 > 0) {
arg0->unk4 = 0x0000000B;
arg0->unk4 = 0x0000000BU;
arg0->unk1C = 0;
func_800921B4();
return;
@@ -14446,23 +14261,23 @@ loop_41:
break;
case 11:
if ((D_8018D9D8 != 0) && (D_800DDB24 != 0)) {
arg0->unk4 = 0x0000000C;
arg0->unk20 = arg0->row;
arg0->unk4 = 0x0000000CU;
arg0->unk20 = (s32) arg0->unk10;
play_sound2(0x49008015);
return;
}
break;
case 12:
temp_a1_3 = arg0->unk20;
arg0->row = temp_a1_3;
arg0->unk10 = temp_a1_3;
if (temp_a1_3 < 0xF0) {
arg0->unk20 = temp_a1_3 + 0x10;
arg0->unk20 = (s32) (temp_a1_3 + 0x10);
D_800DC5EC->screenStartY += 0x10;
D_800DC5F0->screenStartY -= 0x10;
return;
}
arg0->unk20 = 0;
arg0->unk4 = 0x0000000D;
arg0->unk4 = 0x0000000DU;
arg0->unk1C = 0;
D_800DC5EC->screenStartY = 0x012C;
D_800DC5F0->screenStartY = -0x003C;
@@ -14498,23 +14313,13 @@ void func_800AC978(struct_8018D9E0_entry *arg0) {
}
}
#ifdef MIPS_TO_C
//generated by m2c commit d9d3d6575355663122de59f6b2882d8f174e2355 on Dec-12-2022
#ifdef NEEDS_RODATA
// rodata_code_80091750
extern f64 D_800F26C0 = 4.2;
extern f64 D_800F26C8 = 4.2;
extern f64 D_800F26D0 = 4.2;
void func_800ACA14(struct_8018D9E0_entry *arg0) {
f64 temp_f0;
f64 temp_f0_2;
f64 temp_f0_3;
s32 temp_v0;
s32 temp_v0_2;
s32 temp_v0_3;
s32 var_a0;
s32 var_v0;
u16 var_v1;
switch (arg0->unk4) { /* irregular */
default:
var_v0 = arg0->unk20;
break;
case 0:
if (arg0->unk20 >= 0xB) {
arg0->unk1C += 3;
@@ -14523,114 +14328,86 @@ void func_800ACA14(struct_8018D9E0_entry *arg0) {
arg0->unk4 = 0x0000000B;
arg0->unk1C = 0;
}
var_v0 = arg0->unk20;
break;
case 11:
case 12:
if (func_800B4520() != 0) {
// Wut?
} else {
var_v1 = gControllerFive->buttonPressed;
var_a0 = var_v1 | gControllerFive->stickPressed;
if (var_a0 & 0x800) {
temp_v0_2 = arg0->unk4;
if (temp_v0_2 >= 0xC) {
arg0->unk4 = temp_v0_2 - 1;
play_sound2(0x49008000);
temp_f0 = (f64) arg0->unk24;
if (temp_f0 < 4.2) {
arg0->unk24 = (f32) (temp_f0 + 4.0);
}
arg0->unk8 = -1;
var_v1 = gControllerFive->buttonPressed;
var_a0 = var_v1 | gControllerFive->stickPressed;
}
}
if (var_a0 & 0x400) {
temp_v0_3 = arg0->unk4;
if (temp_v0_3 < 0xC) {
arg0->unk4 = temp_v0_3 + 1;
play_sound2(0x49008000);
temp_f0_2 = (f64) arg0->unk24;
if (temp_f0_2 < 4.2) {
arg0->unk24 = (f32) (temp_f0_2 + 4.0);
}
arg0->unk8 = 1;
var_v1 = gControllerFive->buttonPressed;
}
}
if (var_v1 & 0x9000) {
func_8009DFE0(0x0000001E);
func_800CA330(0x19U);
play_sound2(0x4900801B);
temp_f0_3 = (f64) arg0->unk24;
if (temp_f0_3 < 4.2) {
arg0->unk24 = (f32) (temp_f0_3 + 4.0);
if (func_800B4520()) break;
if ((gControllerFive->buttonPressed | gControllerFive->stickPressed) & 0x800) {
if (arg0->unk4 >= 0xC) {
arg0->unk4--;
play_sound2(0x49008000);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
}
arg0->unk8 = -1;
}
}
var_v0 = arg0->unk20;
if ((gControllerFive->buttonPressed | gControllerFive->stickPressed) & 0x400) {
if (arg0->unk4 < 0xC) {
arg0->unk4++;
play_sound2(0x49008000);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
}
arg0->unk8 = 1;
}
}
if (gControllerFive->buttonPressed & 0x9000) {
func_8009DFE0(0x0000001E);
func_800CA330(0x19U);
play_sound2(0x4900801B);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
}
}
break;
default:
break;
}
if (var_v0 < 0x28) {
arg0->unk20 = var_v0 + 1;
if (arg0->unk20 < 0x28) {
arg0->unk20++;
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_80091750/func_800ACA14.s")
#endif
#ifdef MIPS_TO_C
//generated by m2c commit d9d3d6575355663122de59f6b2882d8f174e2355 on Dec-12-2022
void func_800ACC50(struct_8018D9E0_entry *arg0) {
f64 temp_f0;
f64 temp_f0_2;
f64 temp_f0_3;
s32 temp_t6;
s32 temp_t8;
s32 temp_t9;
s32 temp_v0;
s32 temp_v0_2;
s32 var_a0;
s32 var_s0;
u16 var_v1;
#ifdef NEEDS_RODATA
// rodata_code_80091750
// jpt_800F26D8
extern f64 D_800F2710 = 4.2;
extern f64 D_800F2718 = 4.2;
extern f64 D_800F2720 = 4.2;
temp_t6 = arg0->unk4;
switch (temp_t6) {
void func_800ACC50(struct_8018D9E0_entry *arg0) {
s32 var_s0;
switch (arg0->unk4) {
case 0:
temp_t8 = arg0->unk1C + 3;
arg0->unk1C = temp_t8;
if (temp_t8 >= 0x65) {
arg0->unk1C += 3;
if (arg0->unk1C >= 0x65) {
arg0->unk4 = 1;
arg0->unk1C = 0;
var_s0 = 0;
if (D_8018EDF3 > 0) {
do {
add_8018D9E0_entry(var_s0 + 0xB1, 0, 0, (s8) (5 - var_s0));
var_s0 += 1;
} while (var_s0 < D_8018EDF3);
return;
for (var_s0 = 0; var_s0 < D_8018EDF3; var_s0++) {
add_8018D9E0_entry(var_s0 + 0xB1, 0, 0, (s8) (5 - var_s0));
}
}
default:
return;
break;
case 1:
if (find_8018D9E0_entry_dupe(0x000000B1)->unk4 >= 2) {
arg0->unk4 = 2;
return;
}
break;
case 2:
temp_t9 = arg0->unk1C + 0x20;
arg0->unk1C = temp_t9;
if (temp_t9 >= 0x100) {
arg0->unk1C += 0x20;
if (arg0->unk1C >= 0x100) {
if (gModeSelection == 2) {
arg0->unk4 = (s32) D_8018EDF4;
} else {
arg0->unk4 = (s32) D_8018EDF6;
}
arg0->unk1C = 0;
return;
}
break;
case 10:
@@ -14638,36 +14415,27 @@ void func_800ACC50(struct_8018D9E0_entry *arg0) {
case 12:
case 13:
if (func_800B4520() == 0) {
var_v1 = gControllerFive->buttonPressed;
var_a0 = var_v1 | gControllerFive->stickPressed;
if (var_a0 & 0x800) {
temp_v0 = arg0->unk4;
if (temp_v0 >= 0xB) {
arg0->unk4 = temp_v0 - 1;
if ((gControllerFive->buttonPressed | gControllerFive->stickPressed) & 0x800) {
if (arg0->unk4 >= 0xB) {
arg0->unk4--;
play_sound2(0x49008000);
temp_f0 = (f64) arg0->unk24;
if (temp_f0 < 4.2) {
arg0->unk24 = (f32) (temp_f0 + 4.0);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
}
arg0->unk8 = -1;
var_v1 = gControllerFive->buttonPressed;
var_a0 = var_v1 | gControllerFive->stickPressed;
}
}
if (var_a0 & 0x400) {
temp_v0_2 = arg0->unk4;
if (temp_v0_2 < 0xD) {
arg0->unk4 = temp_v0_2 + 1;
if ((gControllerFive->buttonPressed | gControllerFive->stickPressed) & 0x400) {
if (arg0->unk4 < 0xD) {
arg0->unk4++;
play_sound2(0x49008000);
temp_f0_2 = (f64) arg0->unk24;
if (temp_f0_2 < 4.2) {
arg0->unk24 = (f32) (temp_f0_2 + 4.0);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
}
arg0->unk8 = 1;
var_v1 = gControllerFive->buttonPressed;
}
}
if (var_v1 & 0x9000) {
if (gControllerFive->buttonPressed & 0x9000) {
func_8009DFE0(0x0000001E);
play_sound2(0x49008016);
if (gModeSelection == 2) {
@@ -14675,13 +14443,14 @@ void func_800ACC50(struct_8018D9E0_entry *arg0) {
} else {
D_8018EDF6 = (s8) arg0->unk4;
}
temp_f0_3 = (f64) arg0->unk24;
if (temp_f0_3 < 4.2) {
arg0->unk24 = (f32) (temp_f0_3 + 4.0);
if (arg0->unk24 < 4.2) {
arg0->unk24 += 4.0;
}
}
}
break;
default:
break;
}
}
#else
+2
View File
@@ -265,6 +265,8 @@ void func_800AC128(struct_8018D9E0_entry*);
void func_800AC300(struct_8018D9E0_entry*);
void func_800AC324(struct_8018D9E0_entry*);
void func_800AC978(struct_8018D9E0_entry*);
void func_800ACA14(struct_8018D9E0_entry*);
void func_800ACC50(struct_8018D9E0_entry*);
void func_800AD1A4(struct_8018D9E0_entry*);
void func_800ADF48(struct_8018D9E0_entry*);
void func_800AEC54(struct_8018D9E0_entry*);
+91 -208
View File
@@ -30,112 +30,78 @@ void func_802AAAAC(UnkActorInner *arg0) {
vec3f_set(arg0->unk60, 0.0f, 1.0f, 0.0f);
}
#ifdef MIPS_TO_C
//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b
extern f32 D_8015F8E4;
static f32 D_802B9E00 = 1859.0f;
static f32 D_802B9E04 = 1549.0f;
static f32 D_802B9E08 = -1102.0f;
static f32 D_802B9E0C = -1402.0f;
static f32 D_802B9E10 = 2405.0f;
static f32 D_802B9E14 = 2233.0f;
static f32 D_802B9E18 = 0.8f;
static f32 D_802B9E1C = -475.0f;
static f32 D_802B9E20 = -33.9f;
static f32 D_802B9E24 = -838.0f;
static f32 D_802B9E28 = -475.0f;
static f32 D_802B9E2C = -475.0f;
static f32 D_802B9E30 = -993.0f;
static f32 D_802B9E34 = -33.9f;
static f32 D_802B9E38 = -475.0f;
static f32 D_802B9E3C = -33.9f;
static f32 D_802B9E40 = -475.0f;
static f32 D_802B9E44 = -33.9f;
s16 gCurrentCourseId; /* unable to generate initializer */
f32 func_802AAB4C(Player *player) {
f32 sp1C;
f32 sp18;
f32 temp_f0;
f32 temp_f2;
s16 temp_v0;
f32 playerX;
f32 playerZ;
s32 temp_v1;
temp_v0 = gCurrentCourseId;
temp_f0 = player->pos[0];
temp_f2 = player->pos[2];
switch (temp_v0) { /* irregular */
case 2:
if (D_802B9E00 < temp_f0) {
goto block_43;
playerX = player->pos[0];
playerZ = player->pos[2];
switch (gCurrentCourseId) { /* irregular */
case COURSE_BOWSER_CASTLE:
if (playerX > 1859.0f) {
return D_8015F8E4;
}
if (temp_f0 < D_802B9E04) {
goto block_43;
if (playerX < 1549.0f) {
return D_8015F8E4;
}
if (D_802B9E08 < temp_f2) {
goto block_43;
if (playerZ > -1102.0f) {
return D_8015F8E4;
}
if (temp_f2 < D_802B9E0C) {
block_43:
default:
if (playerZ < -1402.0f) {
return D_8015F8E4;
}
return 20.0f;
case 6:
if (temp_f0 > 239.0f) {
goto block_43;
case COURSE_KOOPA_BEACH:
if (playerX > 239.0f) {
return D_8015F8E4;
}
if (temp_f0 < 67.0f) {
goto block_43;
if (playerX < 67.0f) {
return D_8015F8E4;
}
if (D_802B9E10 < temp_f2) {
goto block_43;
if (playerZ > 2405.0f) {
return D_8015F8E4;
}
if (temp_f2 < D_802B9E14) {
goto block_43;
if (playerZ < 2233.0f) {
return D_8015F8E4;
}
return D_802B9E18;
case 12:
return 0.8f;
case COURSE_SHERBET_LAND:
if ((func_802ABD10(player->unk_110.unk3A) & 0xFF) == 5) {
return (f32) (D_8015F6EE - 0xA);
}
goto block_43;
case 18:
sp18 = temp_f2;
sp1C = temp_f0;
return D_8015F8E4;
case COURSE_DK_JUNGLE:
temp_v1 = func_802ABD40(player->unk_110.unk3A) & 0xFF;
if (temp_v1 == 0xFF) {
sp18 = temp_f2;
sp1C = temp_f0;
if ((func_802ABD10(player->unk_110.unk3A) & 0xFF) == 0xF) {
return D_802B9E1C;
return -475.0f;
}
if (temp_f0 > -478.0f) {
return D_802B9E20;
if (playerX > -478.0f) {
return -33.9f;
}
if (temp_f0 < D_802B9E24) {
return D_802B9E28;
if (playerX < -838.0f) {
return -475.0f;
}
if (temp_f2 > -436.0f) {
return D_802B9E2C;
if (playerZ > -436.0f) {
return -475.0f;
}
if (temp_f2 < D_802B9E30) {
return D_802B9E34;
if (playerZ < -993.0f) {
return -33.9f;
}
if (temp_f2 < temp_f0) {
return D_802B9E38;
if (playerZ < playerX) {
return -475.0f;
}
return D_802B9E3C;
return -33.9f;
}
if (temp_v1 >= 0x14) {
return D_802B9E40;
return -475.0f;
}
return D_802B9E44;
return -33.9f;
default:
return D_8015F8E4;
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_802AAA70/func_802AAB4C.s")
#endif
#ifdef MIPS_TO_C
//generated by m2c commit 0927f17aac197848d4ebdf0c6bbad74b01f0851c
@@ -2163,79 +2129,17 @@ void func_802AECA0(s32 arg0, s8 arg1, u16 arg2) {
GLOBAL_ASM("asm/non_matchings/code_802AAA70/func_802AECA0.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
extern ? D_8015F668;
extern uintptr_t gSegmentTable;
void func_802AED6C(u32 arg0, s32 arg1, s32 arg2) {
s32 temp_a2;
s32 temp_t0;
s32 temp_v0;
s32 temp_v0_2;
s32 temp_v0_3;
s32 temp_v0_4;
s32 temp_v0_5;
s32 temp_v1;
s32 temp_v1_2;
s32 phi_v0;
s32 *phi_a0;
s32 phi_v1;
s32 phi_v0_2;
void *phi_a0_2;
s32 phi_v1_2;
s32 phi_a2;
s32 phi_a2_2;
temp_v0 = *(&gSegmentTable + ((arg0 >> 0x18) * 4)) + (arg0 & 0xFFFFFF) + 0x80000000;
phi_v0 = temp_v0;
phi_v1 = 0;
phi_v0_2 = temp_v0;
phi_a2 = arg2;
phi_v1_2 = 0;
phi_a2_2 = arg2;
if (arg1 != 0) {
temp_t0 = arg1 & 3;
if (temp_t0 != 0) {
phi_a0 = (arg2 * 4) + &D_8015F668;
do {
*phi_a0 = phi_v0;
temp_v1 = phi_v1 + 1;
temp_v0_2 = phi_v0 + 0x10;
temp_a2 = phi_a2_2 + 1;
phi_v0 = temp_v0_2;
phi_a0 += 4;
phi_v1 = temp_v1;
phi_v0_2 = temp_v0_2;
phi_a2 = temp_a2;
phi_v1_2 = temp_v1;
phi_a2_2 = temp_a2;
} while (temp_t0 != temp_v1);
if (temp_v1 != arg1) {
goto block_5;
}
} else {
block_5:
phi_a0_2 = (phi_a2 * 4) + &D_8015F668;
do {
phi_a0_2->unk0 = phi_v0_2;
temp_v0_3 = phi_v0_2 + 0x10;
phi_a0_2->unk4 = temp_v0_3;
temp_v0_4 = temp_v0_3 + 0x10;
phi_a0_2->unk8 = temp_v0_4;
temp_v0_5 = temp_v0_4 + 0x10;
phi_a0_2->unkC = temp_v0_5;
temp_v1_2 = phi_v1_2 + 4;
phi_v0_2 = temp_v0_5 + 0x10;
phi_a0_2 += 0x10;
phi_v1_2 = temp_v1_2;
} while (temp_v1_2 != arg1);
}
void func_802AED6C(Vtx *arg0, s32 arg1, s32 arg2) {
Vtx *var_v0;
s32 var_v1;
s32 segment = SEGMENT_NUMBER2(arg0);
s32 offset = SEGMENT_OFFSET(arg0);
var_v0 = (Vtx *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset);
for (var_v1 = 0; var_v1 != arg1; var_v1++)
{
D_8015F668[arg2++] = var_v0++;
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_802AAA70/func_802AED6C.s")
#endif
s32 func_802AEE1C(s16 arg0, s16 arg1, s16 arg2, s16 arg3, s16 arg4, s16 arg5, s16 arg6, s16 arg7) {
f32 temp_f0;
@@ -2515,71 +2419,50 @@ void func_802AF7B4(uintptr_t addr, s32 uls, s32 ult) {
}
}
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
extern uintptr_t gSegmentTable;
void func_802AF83C(Vtx *arg0, u32 vertexCount, s32 arg2, s8 arg3, u8 arg4, u8 arg5, u8 arg6) {
s32 segment = SEGMENT_NUMBER2(arg0);
s32 offset = SEGMENT_OFFSET(arg0);
Vtx *phi_v0 = (Vtx *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset);
u32 var_v1 = 0;
void func_802AF83C(u32 arg0, u32 arg1, ? arg2, s8 arg3, u8 arg4, u8 arg5, u8 arg6) {
u32 temp_v1;
void *phi_v0;
u32 phi_v1;
phi_v0 = *(&gSegmentTable + ((arg0 >> 0x18) * 4)) + (arg0 & 0xFFFFFF) + 0x80000000;
phi_v1 = 0;
if (arg1 != 0) {
do {
temp_v1 = phi_v1 + 1;
phi_v1 = temp_v1;
if (arg4 != 0) {
phi_v0->unkC = arg4;
phi_v0->unkD = arg5;
phi_v0->unkE = arg6;
}
phi_v0->unkF = arg3;
phi_v0 += 0x10;
} while (temp_v1 < arg1);
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_802AAA70/func_802AF83C.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void func_802AF83C(u32, s32, u32, s8, s32, s32, s32); // extern
extern uintptr_t gSegmentTable;
void func_802AF8BC(u32 arg0, s8 arg1, s32 arg2, s32 arg3, u8 arg4) {
s32 temp_s2;
s32 temp_s3;
s32 temp_v1;
u32 temp_a0;
u32 temp_v0;
void *phi_s0;
temp_s2 = arg2 & 0xFF;
temp_s3 = arg3 & 0xFF;
phi_s0 = *(&gSegmentTable + ((arg0 >> 0x18) * 4)) + (arg0 & 0xFFFFFF) + 0x80000000;
loop_1:
temp_v0 = phi_s0->unk0;
temp_a0 = phi_s0->unk4;
temp_v1 = temp_v0 & 0xFF000000;
if (temp_v1 != 0xB8000000) {
if (temp_v1 == 0x6000000) {
func_802AF8BC(temp_a0, arg1, temp_s2 & 0xFF, temp_s3 & 0xFF, arg4);
phi_s0 += 8;
} else {
if (temp_v1 == 0x4000000) {
func_802AF83C(temp_a0, (temp_v0 >> 0xA) & 0x3F, ((temp_v0 >> 0x10) & 0xFF) >> 1, arg1, temp_s2, temp_s3, arg4);
}
phi_s0 += 8;
// For some, unholy reason this can't be a for loop
// I just want to turn this into
// for (var_v1 = 0; var_v1 < vertexCount; var_v1++)
// phi_v0[var_v1].n.n[0] ...
if(1){}
while (var_v1 < vertexCount) {
if (arg4) {
phi_v0->n.n[0] = arg4;
phi_v0->n.n[1] = arg5;
phi_v0->n.n[2] = arg6;
}
goto loop_1;
phi_v0->n.a = arg3;
var_v1++;
phi_v0++;
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_802AAA70/func_802AF8BC.s")
#endif
void func_802AF8BC(Gfx *displayList, s8 arg1, u8 arg2, u8 arg3, u8 arg4) {
uintptr_t upperWord;
uintptr_t lowerWord;
s32 command;
s32 segment = SEGMENT_NUMBER2(displayList);
s32 offset = SEGMENT_OFFSET(displayList);
Gfx *phi_v0 = (Gfx *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset);
do {
upperWord = phi_v0->words.w0;
lowerWord = phi_v0->words.w1;
command = upperWord & 0xFF000000;
if (command == (G_ENDDL << 24)) break;
if (command == (G_DL << 24)) {
func_802AF8BC(lowerWord, arg1, arg2, arg3, arg4);
} else if (command == (G_VTX << 24)) {
func_802AF83C(lowerWord, (upperWord >> 0xA) & 0x3F, ((upperWord >> 0x10) & 0xFF) >> 1, arg1, arg2, arg3, arg4);
}
phi_v0++;
} while(1);
}
void func_802AF9F0(Vec3f arg0, f32 arg1, Vec3f arg2) {
arg2[0] -= arg0[0] * arg1;
+7 -1
View File
@@ -19,6 +19,7 @@ void func_802AC114(Vec3f, f32, Vec3f, f32);
void func_802AD950(UnkActorInner*, f32, f32, f32, f32, f32, f32, f32);
s32 func_802ADDC8(UnkActorInner*, f32, f32, f32, f32);
f32 func_802AE1C0(f32, f32, f32);
void func_802AED6C(Vtx*, s32, s32);
s32 func_802AEE1C(s16, s16, s16, s16, s16, s16, s16, s16);
s32 func_802AF0FC(s16, s16, s16, s16, u16);
void func_802AF314();
@@ -26,7 +27,12 @@ void func_802AF588(s32);
void func_802AF5AC(s32, s8);
void func_802AF5D8(u32, s8, u16);
void func_802AF7B4(uintptr_t, s32, s32);
void func_802AF8BC(uintptr_t, s8, u8, u8, u8);
void func_802AF83C(Vtx*, u32, s32, s8, u8, u8, u8);
void func_802AF8BC(Gfx*, s8, u8, u8, u8);
void func_802AF9F0(Vec3f, f32, Vec3f);
extern Vtx *D_8015F668[];
extern s16 D_8015F6EE;
extern f32 D_8015F8E4;
#endif