Add struct for D_8018CA70 (#153)

Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
This commit is contained in:
Tyler McGavran 2022-01-27 19:29:33 -05:00 committed by GitHub
parent 226a557d8c
commit a5e945b233
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 1155 additions and 1003 deletions

View File

@ -655,4 +655,85 @@ typedef struct {
/* 0x04 */ s32 offset;
} struct_8018E118_entry; // size = 0x08
// Something related to human players
// Also might be used for the camera during the post race screens
typedef struct {
/* 0x00 */ f32 unknownScaling; // Looks to be some type of scaling, unknown use
/* 0x04 */ f32 rankScaling; // Scaling done on the rank text in the bottom left corner of the screen
// All time measurements are in centiseconds
/* 0x08 */ u32 someTimer; // The someTimers seem to always have the same value, the total time since race start
/* 0x0C */ u32 someTimer1;
/* 0x10 */ u32 timeLastTouchedFinishLine; // Sum of time of all completed laps
// Times at which each lap was completed
/* 0x14 */ u32 lap1CompletionTime;
/* 0x18 */ u32 lap2CompletionTime;
/* 0x1C */ u32 lap3CompletionTime;
// Time each lap took to complete
/* 0x20 */ u32 lap1Duration;
/* 0x24 */ u32 lap2Duration;
/* 0x28 */ u32 lap3Duration;
// Integer parts of the player's X/Y/X coordinates
/* 0x2C */ s32 posXInt;
/* 0x30 */ s32 posYInt;
/* 0x34 */ s32 posZInt;
/* 0x38 */ s32 unk_38;
// Timer for how long the on screen should blink on lap completion
// Blinking occurs as long as this is a non-zero value.
// Other on screen effects may override the blinking
/* 0x3C */ s16 blinkTimer;
/* 0x3E */ s16 speedometerX;
/* 0x40 */ s16 speedometerY;
/* 0x42 */ s16 itemBoxX;
/* 0x44 */ s16 itemBoxY;
/* 0x46 */ s16 slideItemBoxX;
/* 0x48 */ s16 slideItemBoxY;
// These 2 s16's have values, but I have yet to identify any places that read them
/* 0x4A */ s16 unk_4A;
/* 0x4C */ s16 unk_4C;
/* 0x4E */ s16 timerX; // X coordinate of the on screen timer
// These 4 X coordinates are "slide" values
/* 0x50 */ s16 lap1CompletionTimeX; // Pulls double-duty as timerAfterImage1X
/* 0x52 */ s16 lap2CompletionTimeX; // Pulls double-duty as timerAfterImage2X
/* 0x54 */ s16 lap3CompletionTimeX;
/* 0x56 */ s16 totalTimeX;
/* 0x58 */ s16 timerY; // Y coordinate of the on screen timer (used as Y coordinate for lap completion times in post-race screen)
/* 0x5A */ s16 lapX; // X coordinate of the on screen lap counter
// 0x5C and 0x5E seem to be relative to lapX
/* 0x5C */ s16 lapAfterImage1X;
/* 0x5E */ s16 lapAfterImage2X;
/* 0x60 */ s16 lapY; // Y coordinate of the on screen lap counter
/* 0x62 */ s16 rankX; // X coordinate of the on screen rank indicator
/* 0x64 */ s16 rankY; // Y coordinate of the on screen rank indicator
/* 0x66 */ s16 slideRankX; // Adds with the other rankX, used during post race screen to make the rank "slide" into place
/* 0x68 */ s16 slideRankY; // Adds with the other rankY, used during post race screen to make the rank "slide" into place
/* 0x6A */ s16 stagingPosition; // Position to take during race staging
// These s16's occasionally have values, but I have yet to identify any places that read them
// They appear to have values when in 3/4 player split screen mode, otherwise they're 0
/* 0x6C */ s16 unk_6C;
/* 0x6E */ s16 unk_6E;
/* 0x70 */ s8 raceCompleteBool; // Indicates if race is over?
/* 0x71 */ s8 lapCount; // This increases to 3 when a race is over, while alsoLapCount stays at 2
/* 0x72 */ s8 alsoLapCount;
// Related to the timer blinking on lap completion
// If blinkTimer is counting down:
// 0: Show timer
// 1: Hide timer
// 2: ? Seems to be a transition state, never lasts a long enough for blinkTimer to tick
/* 0x73 */ s8 blinkState;
/* 0x74 */ s8 unk_74;
/* 0x75 */ s8 unk_75;
/* 0x76 */ s16 itemOverride; // Something related to item generation. If non-zero, it determines the item you get
// 0x78 to 0x7F appear to be some type of "state" trackers for the lap and timer text during a race start
// When a race starts those texts (and their afterimages) slide in and "bounce" a bit. These states control the bouncing (somehow)
/* 0x78 */ s8 unk_78;
/* 0x79 */ s8 unk_79;
/* 0x7A */ s8 unk_7A;
/* 0x7B */ s8 unk_7B;
/* 0x7C */ s8 unk_7C;
/* 0x7D */ s8 unk_7D;
/* 0x7E */ s8 unk_7E;
/* 0x7F */ s8 unk_7F;
/* 0x80 */ s32 unk_80;
} struct_8018CA70_entry; // size = 0x84
#endif

View File

@ -92,6 +92,8 @@ extern Player* gPlayerOneCopy;
extern SaveData D_8018EB90;
extern struct_8018CA70_entry D_8018CA70[];
extern Mtx D_80183D60[];
extern struct_D_8018CE10 D_8018CE10[];

View File

@ -5008,20 +5008,19 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_8004E4CC.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8004E4CC(s32, s32, s32, s32); // extern
//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75
? func_8004E4CC(s32, s32, s32, s32); /* extern */
extern ? D_80165C18;
extern ? D_80183E88;
extern ? D_8018CA70;
void func_8004E638(s32 arg0) {
void *temp_v0;
void func_8004E638(s32 playerId) {
struct_8018CA70_entry *temp_v0;
void *temp_v1;
temp_v1 = (*(&D_80183E88 + (arg0 * 4)) * 0xE0) + &D_80165C18;
if (temp_v1->unkA6 >= 2) {
temp_v0 = (arg0 * 0x84) + &D_8018CA70;
func_8004E4CC(temp_v0->unk46 + temp_v0->unk42, temp_v0->unk48 + temp_v0->unk44, temp_v1->unk60, temp_v1->unk64);
temp_v1 = (*(&D_80183E88 + (playerId * 4)) * 0xE0) + &D_80165C18;
if ((s32) temp_v1->unkA6 >= 2) {
temp_v0 = &D_8018CA70[playerId];
func_8004E4CC(temp_v0->slideItemBoxX + temp_v0->itemBoxX, temp_v0->slideItemBoxY + temp_v0->itemBoxY, temp_v1->unk60, temp_v1->unk64);
}
}
#else
@ -5029,21 +5028,20 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_8004E638.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_80047910(s32, s32, ?, s32, s32, s32, ? *, s32, s32, s32, s32); // extern
//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75
? func_80047910(s32, s32, ?, f32, s32, s32, ? *, s32, s32, s32, s32); /* extern */
extern ? D_0D005C30;
extern ? D_80165C18;
extern ? D_80183E88;
extern ? D_8018CA70;
void func_8004E6C4(s32 arg0) {
void *temp_v0;
void func_8004E6C4(s32 playerId) {
struct_8018CA70_entry *temp_v0;
void *temp_v1;
temp_v1 = (*(&D_80183E88 + (arg0 * 4)) * 0xE0) + &D_80165C18;
if (temp_v1->unkA6 >= 2) {
temp_v0 = (arg0 * 0x84) + &D_8018CA70;
func_80047910(temp_v0->unk46 + temp_v0->unk42, temp_v0->unk48 + temp_v0->unk44, 0, temp_v0->unk0, temp_v1->unk60, temp_v1->unk64, &D_0D005C30, 0x28, 0x20, 0x28, 0x20);
temp_v1 = (*(&D_80183E88 + (playerId * 4)) * 0xE0) + &D_80165C18;
if ((s32) temp_v1->unkA6 >= 2) {
temp_v0 = &D_8018CA70[playerId];
func_80047910(temp_v0->slideItemBoxX + temp_v0->itemBoxX, temp_v0->slideItemBoxY + temp_v0->itemBoxY, 0, temp_v0->unknownScaling, temp_v1->unk60, temp_v1->unk64, &D_0D005C30, 0x28, 0x20, 0x28, 0x20);
}
}
#else
@ -5051,49 +5049,49 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_8004E6C4.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8004CB60(s16, s32, ? *); // extern
? func_8004CB90(s32, s16, s32); // extern
//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75
? func_8004CB60(s16, s32, ? *); /* extern */
? func_8004CB90(s32, s16, ? *); /* extern */
extern ? D_0D00A958;
extern ? D_800E4570;
extern ? D_8018CA70;
extern ? D_0D00B158;
extern ? D_0D00B558;
extern ? D_0D00B958;
static ? *D_800E4570[3] = { &D_0D00B158, &D_0D00B558, &D_0D00B958 }; /* const */
void func_8004E78C(s32 arg0) {
void *sp1C;
void *temp_v0;
void func_8004E78C(s32 playerId) {
struct_8018CA70_entry *sp1C;
struct_8018CA70_entry *temp_v0;
temp_v0 = (arg0 * 0x84) + &D_8018CA70;
temp_v0 = &D_8018CA70[playerId];
sp1C = temp_v0;
func_8004CB60(temp_v0->unk5A, temp_v0->unk60 + 3, &D_0D00A958);
func_8004CB90(temp_v0->unk5A + 0x1C, temp_v0->unk60, *(&D_800E4570 + (temp_v0->unk72 * 4)));
func_8004CB60(temp_v0->lapX, temp_v0->lapY + 3, &D_0D00A958);
func_8004CB90(temp_v0->lapX + 0x1C, temp_v0->lapY, D_800E4570[temp_v0->alsoLapCount]);
}
#else
GLOBAL_ASM("asm/non_matchings/code_800431B0/func_8004E78C.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8004A384(s32, s32, ?, s32, s32, s32, s32, s32, void *, ? *, s32, s32, s32, s32); // extern
//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75
? func_8004A384(s32, s32, ?, f32, s32, s32, s32, s32, void *, ? *, s32, s32, s32, s32); /* extern */
extern ? D_0D0068F0;
extern ? D_0D00D258;
extern ? D_800E55F8;
extern s32 D_80165594;
extern ? D_8018CA70;
extern ? D_8018CF98;
static s32 D_800E55F8[8] = { 0xFF, 0xED, 0xD7, 0xBF, 0xA2, 0x82, 0x61, 0x3A }; /* const */
void func_8004E800(s32 arg0) {
void func_8004E800(s32 playerId) {
s16 temp_v1;
void *temp_v0;
struct_8018CA70_entry *temp_v0;
temp_v0 = (arg0 * 0x84) + &D_8018CA70;
temp_v0 = &D_8018CA70[playerId];
if (temp_v0->unk81 != 0) {
if (temp_v0->unk71 != 3) {
temp_v1 = *(&D_8018CF98 + (arg0 * 2));
func_8004A384(temp_v0->unk66 + temp_v0->unk62, temp_v0->unk68 + temp_v0->unk64, 0, temp_v0->unk4, 0xFF, *(&D_800E55F8 + (temp_v1 * 4)), 0, 0xFF, (temp_v1 << 0xC) + &D_0D00D258, &D_0D0068F0, 0x80, 0x40, 0x80, 0x40);
if (temp_v0->lapCount != 3) {
temp_v1 = *(&D_8018CF98 + (playerId * 2));
func_8004A384(temp_v0->slideRankX + temp_v0->rankX, temp_v0->slideRankY + temp_v0->rankY, 0, temp_v0->rankScaling, 0xFF, D_800E55F8[temp_v1], 0, 0xFF, (temp_v1 << 0xC) + &D_0D00D258, &D_0D0068F0, 0x80, 0x40, 0x80, 0x40);
return;
}
func_8004A384(temp_v0->unk66 + temp_v0->unk62, temp_v0->unk68 + temp_v0->unk64, 0, temp_v0->unk4, 0xFF, *(&D_800E55F8 + (D_80165594 * 4)), 0, 0xFF, (gPlayerPositions[arg0] << 0xC) + &D_0D00D258, &D_0D0068F0, 0x80, 0x40, 0x80, 0x40);
// Duplicate return node #4. Try simplifying control flow for better match
func_8004A384(temp_v0->slideRankX + temp_v0->rankX, temp_v0->slideRankY + temp_v0->rankY, 0, temp_v0->rankScaling, 0xFF, D_800E55F8[D_80165594], 0, 0xFF, (gPlayerPositions[playerId] << 0xC) + &D_0D00D258, &D_0D0068F0, 0x80, 0x40, 0x80, 0x40);
}
}
#else
@ -5101,27 +5099,25 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_8004E800.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8004A384(s32, s32, ?, s32, s32, s32, s32, s32, void *, ? *, s32, s32, s32, s32); // extern
//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75
? func_8004A384(s32, s32, ?, f32, s32, s32, s32, s32, void *, ? *, s32, s32, s32, s32); /* extern */
extern ? D_0D006030;
extern ? D_0D015258;
extern ? D_800E5618;
extern s32 D_80165598;
extern ? D_8018CA70;
static s32 D_800E5618[4] = { 0xFF, 0xD7, 0xA2, 0x61 }; /* const */
void func_8004E998(s32 arg0) {
void func_8004E998(s32 playerId) {
s32 temp_v1;
void *temp_v0;
struct_8018CA70_entry *temp_v0;
temp_v0 = (arg0 * 0x84) + &D_8018CA70;
temp_v0 = &D_8018CA70[playerId];
if (temp_v0->unk81 != 0) {
if (temp_v0->unk71 != 3) {
temp_v1 = gPlayerPositions[arg0];
func_8004A384(temp_v0->unk66 + temp_v0->unk62, temp_v0->unk68 + temp_v0->unk64, 0, temp_v0->unk4, 0xFF, *(&D_800E5618 + (temp_v1 * 4)), 0, 0xFF, (temp_v1 << 0xB) + &D_0D015258, &D_0D006030, 0x40, 0x40, 0x40, 0x40);
if (temp_v0->lapCount != 3) {
temp_v1 = gPlayerPositions[playerId];
func_8004A384(temp_v0->slideRankX + temp_v0->rankX, temp_v0->slideRankY + temp_v0->rankY, 0, temp_v0->rankScaling, 0xFF, D_800E5618[temp_v1], 0, 0xFF, (temp_v1 << 0xB) + &D_0D015258, &D_0D006030, 0x40, 0x40, 0x40, 0x40);
return;
}
func_8004A384(temp_v0->unk66 + temp_v0->unk62, temp_v0->unk68 + temp_v0->unk64, 0, temp_v0->unk4, 0xFF, *(&D_800E5618 + (D_80165598 * 4)), 0, 0xFF, (gPlayerPositions[arg0] << 0xB) + &D_0D015258, &D_0D006030, 0x40, 0x40, 0x40, 0x40);
// Duplicate return node #4. Try simplifying control flow for better match
func_8004A384(temp_v0->slideRankX + temp_v0->rankX, temp_v0->slideRankY + temp_v0->rankY, 0, temp_v0->rankScaling, 0xFF, D_800E5618[D_80165598], 0, 0xFF, (gPlayerPositions[playerId] << 0xB) + &D_0D015258, &D_0D006030, 0x40, 0x40, 0x40, 0x40);
}
}
#else
@ -5138,33 +5134,35 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_8004EB30.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8004C9D8(s16, s16, ?, ? *, s32, s32, s32, s32); // extern
? func_8004F950(s16, s16, ?, s32); // extern
//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75
? func_8004C9D8(s16, s16, ?, ? *, s32, s32, s32, s32); /* extern */
? func_8004F950(s16, s16, ?, u32); /* extern */
extern ? D_0D00A958;
extern ? D_0D00B158;
extern ? D_0D00B558;
extern ? D_0D00B958;
extern ? D_0D00C158;
extern ? D_800E4570;
extern ? D_8018CA70;
static ? *D_800E4570[3] = { &D_0D00B158, &D_0D00B558, &D_0D00B958 }; /* const */
void func_8004EB38(s32 arg0) {
void *temp_s0;
void func_8004EB38(s32 playerId) {
struct_8018CA70_entry *temp_s0;
temp_s0 = (arg0 * 0x84) + &D_8018CA70;
if (temp_s0->unk7B != 0) {
func_8004C9D8(temp_s0->unk50 - 0x13, temp_s0->unk58 + 8, 0x80, &D_0D00C158, 0x20, 0x10, 0x20, 0x10);
func_8004F950(temp_s0->unk50, temp_s0->unk58, 0x80, temp_s0->unk8);
temp_s0 = &D_8018CA70[playerId];
if ((u8) temp_s0->unk_7B != 0) {
func_8004C9D8(temp_s0->lap1CompletionTimeX - 0x13, temp_s0->timerY + 8, 0x80, &D_0D00C158, 0x20, 0x10, 0x20, 0x10);
func_8004F950(temp_s0->lap1CompletionTimeX, temp_s0->timerY, 0x80, temp_s0->someTimer);
}
if (temp_s0->unk7C != 0) {
func_8004C9D8(temp_s0->unk52 - 0x13, temp_s0->unk58 + 8, 0x50, &D_0D00C158, 0x20, 0x10, 0x20, 0x10);
func_8004F950(temp_s0->unk52, temp_s0->unk58, 0x50, temp_s0->unk8);
if ((u8) temp_s0->unk_7C != 0) {
func_8004C9D8(temp_s0->lap2CompletionTimeX - 0x13, temp_s0->timerY + 8, 0x50, &D_0D00C158, 0x20, 0x10, 0x20, 0x10);
func_8004F950(temp_s0->lap2CompletionTimeX, temp_s0->timerY, 0x50, temp_s0->someTimer);
}
if (temp_s0->unk7E != 0) {
func_8004C9D8(temp_s0->unk5C, temp_s0->unk60 + 3, 0x80, &D_0D00A958, 0x20, 8, 0x20, 8);
func_8004C9D8(temp_s0->unk5C + 0x1C, temp_s0->unk60, 0x80, *(&D_800E4570 + (temp_s0->unk72 * 4)), 0x20, 0x10, 0x20, 0x10);
if ((u8) temp_s0->unk_7E != 0) {
func_8004C9D8(temp_s0->lapAfterImage1X, temp_s0->lapY + 3, 0x80, &D_0D00A958, 0x20, 8, 0x20, 8);
func_8004C9D8(temp_s0->lapAfterImage1X + 0x1C, temp_s0->lapY, 0x80, D_800E4570[temp_s0->alsoLapCount], 0x20, 0x10, 0x20, 0x10);
}
if (temp_s0->unk7F != 0) {
func_8004C9D8(temp_s0->unk5E, temp_s0->unk60 + 3, 0x50, &D_0D00A958, 0x20, 8, 0x20, 8);
func_8004C9D8(temp_s0->unk5E + 0x1C, temp_s0->unk60, 0x50, *(&D_800E4570 + (temp_s0->unk72 * 4)), 0x20, 0x10, 0x20, 0x10);
if ((u8) temp_s0->unk_7F != 0) {
func_8004C9D8(temp_s0->lapAfterImage2X, temp_s0->lapY + 3, 0x50, &D_0D00A958, 0x20, 8, 0x20, 8);
func_8004C9D8(temp_s0->lapAfterImage2X + 0x1C, temp_s0->lapY, 0x50, D_800E4570[temp_s0->alsoLapCount], 0x20, 0x10, 0x20, 0x10);
}
}
#else
@ -5172,27 +5170,26 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_8004EB38.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8004A258(s32, s32, u16, ?, ? *, ? *, s32, s32, s32, s32); // extern
? func_8004A2F4(s16, s16, ?, ?, s32, s32, s32, s32, ? *, ? *, s32, s32, s32, s32); // extern
//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75
? func_8004A258(s32, s32, u16, ?, ? *, ? *, s32, s32, s32, s32); /* extern */
? func_8004A2F4(s16, s16, ?, ?, s32, s32, s32, s32, ? *, ? *, s32, s32, s32, s32); /* extern */
extern ? D_0D005FF0;
extern ? D_0D0064B0;
extern ? D_0D009958;
extern ? D_0D00A558;
extern u16 D_8016579E;
extern ? D_8018CA70;
extern f32 D_8018CFEC;
extern f32 D_8018CFF4;
extern u16 D_8018D300;
extern u16 D_8018D308;
extern u16 D_8018D310;
void func_8004ED40(s32 arg0) {
void *temp_v0;
void func_8004ED40(s32 playerId) {
struct_8018CA70_entry *temp_v0;
temp_v0 = (arg0 * 0x84) + &D_8018CA70;
func_8004A2F4(temp_v0->unk3E, temp_v0->unk40, 0, 0x3F800000, D_8018D300, D_8018D308, D_8018D310, 0xFF, &D_0D009958, &D_0D0064B0, 0x40, 0x60, 0x40, 0x30);
func_8004A258(D_8018CFEC, D_8018CFF4, D_8016579E, 0x3F800000, &D_0D00A558, &D_0D005FF0, 0x40, 0x20, 0x40, 0x20);
temp_v0 = &D_8018CA70[playerId];
func_8004A2F4(temp_v0->speedometerX, temp_v0->speedometerY, 0, 0x3F800000, (s32) D_8018D300, (s32) D_8018D308, (s32) D_8018D310, 0xFF, &D_0D009958, &D_0D0064B0, 0x40, 0x60, 0x40, 0x30);
func_8004A258((s32) D_8018CFEC, (s32) D_8018CFF4, D_8016579E, 0x3F800000, &D_0D00A558, &D_0D005FF0, 0x40, 0x20, 0x40, 0x20);
}
#else
GLOBAL_ASM("asm/non_matchings/code_800431B0/func_8004ED40.s")
@ -5666,31 +5663,30 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_8004F9CC.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8004CB90(s32, s32, ? *); // extern
? func_8004F9CC(s16, s16, s32); // extern
? print_timer(s16, s16, s32); // extern
//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75
? func_8004CB90(s32, s32, ? *); /* extern */
? func_8004F9CC(s16, s16, u32); /* extern */
? print_timer(s16, s16, u32); /* extern */
extern ? D_0D00BD58;
extern ? D_0D00C158;
extern s32 D_80165658;
extern s8 D_801657E3;
extern s8 D_801657E5;
extern ? D_8018CA70;
extern s32 D_8018D320;
void func_8004FA78(s32 arg0) {
void func_8004FA78(s32 playerId) {
s32 temp_s0;
s32 temp_v0;
void *temp_s4;
struct_8018CA70_entry *temp_s4;
s32 *phi_s3;
void *phi_s1;
struct_8018CA70_entry *phi_s1;
s32 phi_s0;
void *phi_s2;
struct_8018CA70_entry *phi_s2;
temp_v0 = gModeSelection;
if ((temp_v0 != VERSUS) && (temp_v0 != BATTLE)) {
temp_s4 = (arg0 * 0x84) + &D_8018CA70;
if (D_8018D320 == temp_s4->unk71) {
if ((temp_v0 != 2) && (temp_v0 != 3)) {
temp_s4 = &D_8018CA70[playerId];
if (D_8018D320 == temp_s4->lapCount) {
phi_s3 = &D_80165658;
phi_s1 = temp_s4;
if (D_8015F890 == 0) {
@ -5698,9 +5694,9 @@ void func_8004FA78(s32 arg0) {
phi_s2 = temp_s4;
do {
if (*phi_s3 == 0) {
print_timer(phi_s1->unk50, temp_s4->unk58 + phi_s0, phi_s2->unk20);
print_timer(phi_s1->lap1CompletionTimeX, temp_s4->timerY + phi_s0, phi_s2->lap1Duration);
} else {
func_8004F9CC(phi_s1->unk50, temp_s4->unk58 + phi_s0, phi_s2->unk20);
func_8004F9CC(phi_s1->lap1CompletionTimeX, temp_s4->timerY + phi_s0, phi_s2->lap1Duration);
}
temp_s0 = phi_s0 + 0x10;
phi_s3 += 4;
@ -5708,31 +5704,28 @@ void func_8004FA78(s32 arg0) {
phi_s0 = temp_s0;
phi_s2 += 4;
} while (temp_s0 != 0x30);
func_8004CB90(temp_s4->unk56 - 0x13, temp_s4->unk58 + 0x38, &D_0D00BD58);
func_8004CB90(temp_s4->totalTimeX - 0x13, temp_s4->timerY + 0x38, &D_0D00BD58);
if (D_801657E5 != 0) {
func_8004F9CC(temp_s4->unk56, temp_s4->unk58 + 0x30, temp_s4->unk8);
func_8004F9CC(temp_s4->totalTimeX, temp_s4->timerY + 0x30, temp_s4->someTimer);
return;
}
print_timer(temp_s4->unk56, temp_s4->unk58 + 0x30, temp_s4->unk8);
print_timer(temp_s4->totalTimeX, temp_s4->timerY + 0x30, temp_s4->someTimer);
}
} else {
if (temp_s4->blinkTimer == 0) {
func_8004CB90(temp_s4->timerX - 0x13, temp_s4->timerY + 8, &D_0D00C158);
print_timer(temp_s4->timerX, temp_s4->timerY, temp_s4->someTimer);
return;
}
// Duplicate return node #18. Try simplifying control flow for better match
return;
func_8004CB90(temp_s4->timerX - 0x13, temp_s4->timerY + 8, (? *)0x0D00AD58);
if (D_801657E3 != 0) {
func_8004F9CC(temp_s4->timerX, temp_s4->timerY, temp_s4->someTimer1);
return;
}
if (temp_s4->blinkState == 0) {
print_timer(temp_s4->timerX, temp_s4->timerY, temp_s4->someTimer1);
}
}
if (temp_s4->unk3C == 0) {
func_8004CB90(temp_s4->unk4E - 0x13, temp_s4->unk58 + 8, &D_0D00C158);
print_timer(temp_s4->unk4E, temp_s4->unk58, temp_s4->unk8);
return;
}
func_8004CB90(temp_s4->unk4E - 0x13, temp_s4->unk58 + 8, 0xD00AD58);
if (D_801657E3 != 0) {
func_8004F9CC(temp_s4->unk4E, temp_s4->unk58, temp_s4->unkC);
return;
}
if (temp_s4->unk73 == 0) {
print_timer(temp_s4->unk4E, temp_s4->unk58, temp_s4->unkC);
}
// Duplicate return node #18. Try simplifying control flow for better match
}
}
#else

File diff suppressed because it is too large Load Diff

View File

@ -1878,14 +1878,12 @@ GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_80070780.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? find_unused_obj_index(s32 *); // extern
? func_8006EE7C(s32); // extern
? func_80070190(); // extern
? func_8007055C(); // extern
? func_80070780(); // extern
s32 func_800B4E24(?); // extern
s32 func_800B4F2C(?, f32, s32 *, s32, s16, s16); // extern
//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75
? find_unused_obj_index(s32 *); /* extern */
? func_8006EE7C(s32); /* extern */
? func_80070190(); /* extern */
? func_8007055C(); /* extern */
? func_80070780(); /* extern */
extern s32 D_80165638;
extern s32 D_80165648;
extern s16 D_801656B0;
@ -1899,7 +1897,6 @@ extern s32 D_80183DB8;
extern s32 D_80183DBC;
extern s32 D_80183E88;
extern s32 D_80183E8C;
extern ? D_8018CA70;
extern f32 D_8018CFCC;
extern f32 D_8018CFD4;
extern f32 D_8018CFEC;
@ -1960,28 +1957,28 @@ void func_80071428(void) {
func_8007055C();
func_8007055C();
func_80070780();
D_8018CA70.unk3E = 0x156;
D_8018CA70.unk40 = 0x106;
D_8018CFEC = D_8018CA70.unk3E + 0x18;
D_8018CFF4 = D_8018CA70.unk40 + 6;
D_8018CA70->speedometerX = 0x156;
D_8018CA70->speedometerY = 0x106;
D_8018CFEC = (f32) (D_8018CA70->speedometerX + 0x18);
D_8018CFF4 = (f32) (D_8018CA70->speedometerY + 6);
D_8016579E = 0xDD00;
D_8018CA70.unk62 = 0x34;
D_8018CA70.unk64 = 0xC8;
D_8018CA70.unk66 = 0;
D_8018CA70.unk68 = 0;
D_8018CA70.unk4E = 0x12C;
D_8018CA70.unk50 = 0x12C;
D_8018CA70.unk52 = 0x12C;
D_8018CA70.unk58 = 0x11;
D_8018CA70.unk5A = -0x28;
D_8018CA70.unk5C = -0x28;
D_8018CA70.unk5E = -0x28;
D_8018CA70.unk60 = 0x19;
D_8018CA70.unk42 = 0xA0;
D_8018CA70.unk44 = -0x20;
D_8018CA70.unk46 = 0;
D_8018CA70.unk48 = 0;
D_8018CA70.unk6A = *gPlayerPositions;
D_8018CA70->rankX = 0x34;
D_8018CA70->rankY = 0xC8;
D_8018CA70->slideRankX = 0;
D_8018CA70->slideRankY = 0;
D_8018CA70->timerX = 0x12C;
D_8018CA70->lap1CompletionTimeX = 0x12C;
D_8018CA70->lap2CompletionTimeX = 0x12C;
D_8018CA70->timerY = 0x11;
D_8018CA70->lapX = -0x28;
D_8018CA70->lapAfterImage1X = -0x28;
D_8018CA70->lapAfterImage2X = -0x28;
D_8018CA70->lapY = 0x19;
D_8018CA70->itemBoxX = 0xA0;
D_8018CA70->itemBoxY = -0x20;
D_8018CA70->slideItemBoxX = 0;
D_8018CA70->slideItemBoxY = 0;
D_8018CA70->stagingPosition = (s16) *gPlayerPositions;
func_8006EE7C(D_80183E88);
phi_f0 = 35.0f;
phi_a1 = &D_8018D050;
@ -1995,7 +1992,7 @@ void func_80071428(void) {
phi_a2->unk0 = phi_f0;
temp_v0 = phi_v0 + 0x10;
phi_v1->unk4 = 40.0f;
temp_f0 = phi_f0 + 32.0;
temp_f0 = (f32) ((f64) phi_f0 + 32.0);
phi_a0->unk4 = -24.0f;
phi_a3->unk4 = 0.0f;
temp_v0->unk-C = 0.0f;
@ -2003,7 +2000,7 @@ void func_80071428(void) {
phi_a2->unk4 = temp_f0;
phi_v1->unk8 = 40.0f;
phi_a0->unk8 = -24.0f;
temp_f0_2 = temp_f0 + 32.0;
temp_f0_2 = (f32) ((f64) temp_f0 + 32.0);
phi_a3->unk8 = 0.0f;
temp_v0->unk-8 = 0.0f;
phi_v1->unkC = 40.0f;
@ -2011,7 +2008,7 @@ void func_80071428(void) {
phi_a2->unk8 = temp_f0_2;
phi_a0->unkC = -24.0f;
phi_a3->unkC = 0.0f;
temp_f0_3 = temp_f0_2 + 32.0;
temp_f0_3 = (f32) ((f64) temp_f0_2 + 32.0);
temp_v0->unk-4 = 0.0f;
temp_v1 = phi_v1 + 0x10;
temp_a0 = phi_a0 + 0x10;
@ -2022,7 +2019,7 @@ void func_80071428(void) {
temp_a0->unk-10 = -24.0f;
temp_a3->unk-10 = 0.0f;
temp_v0->unk-10 = 0.0f;
phi_f0 = temp_f0_3 + 32.0;
phi_f0 = (f32) ((f64) temp_f0_3 + 32.0);
phi_a1 += 0x10;
phi_a2 += 0x10;
phi_v1 = temp_v1;
@ -2040,51 +2037,50 @@ void func_80071428(void) {
D_8018D3EC = 0xFF;
D_8018D3F0 = 0xFF;
D_8018D3F4 = 1;
D_8018CA70.unk4C = 0x78;
D_8018CA70.unk4A = 0xA0;
D_8018CA70.unk4 = 0.5f;
D_8018CA70->unk_4C = 0x78;
D_8018CA70->unk_4A = 0xA0;
D_8018CA70->rankScaling = 0.5f;
D_801656B0 = 0;
D_80165708 = 0x28;
D_8018D00C = 5.0f;
D_8018D388 = 4;
D_8018D380 = 0xA0;
D_8018D384 = 0x78;
D_8018D380 = (s32) 0xA0;
D_8018D384 = (s32) 0x78;
D_8018D3C4 = 0x32;
D_8018D3BC = 0x28;
D_8018D3BC = (s32) 0x28;
temp_v1_2 = gModeSelection;
D_8018D3C0 = 0x50;
D_801657A2 = 0x333;
if (temp_v1_2 != GRAND_PRIX) {
if (temp_v1_2 != TIME_TRIALS) {
return;
}
switch (temp_v1_2) { /* irregular */
case 0:
D_8018D158 = 8;
return;
case 1:
D_80165638 = (func_800B4F2C(0, 40.0f, &D_8018D3DC, 1, 0x78, 0x28) & 0xFFFFF) - 1;
D_80165648 = func_800B4E24(0) & 0xFFFFF;
D_80165888 = 1;
D_80165890 = 1;
D_8018D158 = 1;
D_8018D158 = (s32) 1;
return;
}
D_8018D158 = 8;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_80071428.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? find_unused_obj_index(s32 *); // extern
? func_8006EE7C(s32); // extern
? func_80070190(); // extern
? func_8007055C(); // extern
? func_80070780(); // extern
//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75
? find_unused_obj_index(s32 *); /* extern */
? func_8006EE7C(s32); /* extern */
? func_80070190(); /* extern */
? func_8007055C(); /* extern */
? func_80070780(); /* extern */
extern s16 D_801657A2;
extern s32 D_80183DA0;
extern s32 D_80183DB8;
extern s32 D_80183DBC;
extern s32 D_80183E88;
extern s32 D_80183E8C;
extern ? D_8018CA70;
extern s32 D_8018D158;
extern s32 D_8018D3BC;
extern s32 D_8018D3C0;
@ -2102,76 +2098,74 @@ void func_80071818(void) {
func_8007055C();
func_8007055C();
func_80070780();
D_8018CA70.unk42 = -0x52;
D_8018CA70.unk44 = 0x32;
D_8018CA70.unk46 = 0;
D_8018CA70.unk48 = 0;
D_8018CA70.unk4A = 0x50;
D_8018CA70.unk4C = 0x78;
D_8018CA70.unk62 = 0x32;
D_8018CA70.unk64 = 0xD2;
D_8018CA70.unk66 = 0;
D_8018CA70.unk68 = 0;
D_8018CA70.unk4E = 0x4B;
D_8018CA70.unk58 = 0x10;
D_8018CA70.unk5A = 0x67;
D_8018CA70.unk60 = 0x28;
D_8018CA70->itemBoxX = -0x52;
D_8018CA70->itemBoxY = 0x32;
D_8018CA70->slideItemBoxX = 0;
D_8018CA70->slideItemBoxY = 0;
D_8018CA70->unk_4A = 0x50;
D_8018CA70->unk_4C = 0x78;
D_8018CA70->rankX = 0x32;
D_8018CA70->rankY = 0xD2;
D_8018CA70->slideRankX = 0;
D_8018CA70->slideRankY = 0;
D_8018CA70->timerX = 0x4B;
D_8018CA70->timerY = 0x10;
D_8018CA70->lapX = 0x67;
D_8018CA70->lapY = 0x28;
func_8006EE7C(D_80183E88);
D_8018CA70.unkC6 = 0x43;
D_8018CA70.unkC8 = 0x32;
D_8018CA70.unkCA = 0;
D_8018CA70.unkCC = 0;
D_8018CA70.unkCE = 0xF0;
D_8018CA70.unkD0 = 0x78;
D_8018CA70.unkE6 = 0xC8;
D_8018CA70.unkE8 = 0xD2;
D_8018CA70.unkEA = 0;
D_8018CA70.unkEC = 0;
D_8018CA70.unkD2 = 0xDC;
D_8018CA70.unkDC = 0x10;
D_8018CA70.unkDE = 0xF7;
D_8018CA70.unkE4 = 0x28;
D_8018CA70->unkC6 = 0x43;
D_8018CA70->unkC8 = 0x32;
D_8018CA70->unkCA = 0;
D_8018CA70->unkCC = 0;
D_8018CA70->unkCE = 0xF0;
D_8018CA70->unkD0 = 0x78;
D_8018CA70->unkE6 = 0xC8;
D_8018CA70->unkE8 = 0xD2;
D_8018CA70->unkEA = 0;
D_8018CA70->unkEC = 0;
D_8018CA70->unkD2 = 0xDC;
D_8018CA70->unkDC = 0x10;
D_8018CA70->unkDE = 0xF7;
D_8018CA70->unkE4 = 0x28;
func_8006EE7C(D_80183E8C);
D_8018CA70.unk88 = 0.5f;
D_8018CA70.unk6A = gPlayerPositions->unk0;
D_8018CA70.unkEE = gPlayerPositions->unk4;
D_8018CA70.unk4 = D_8018CA70.unk88;
D_8018CA70->unk88 = 0.5f;
D_8018CA70->stagingPosition = (s16) gPlayerPositions->unk0;
D_8018CA70->unkEE = (s16) gPlayerPositions->unk4;
D_8018CA70->rankScaling = D_8018CA70->unk88;
D_8018D3C4 = 0x1E;
D_8018D3BC = 0x18;
temp_v1 = gModeSelection;
D_8018D3C0 = 0x28;
D_801657A2 = 0x666;
if (temp_v1 != GRAND_PRIX) {
if (temp_v1 != VERSUS) {
if (temp_v1 != BATTLE) {
return;
}
goto block_7;
}
switch (temp_v1) { /* irregular */
case 0:
D_8018D158 = 8;
return;
case 2:
block_7:
D_8018D158 = 2;
return;
case 3:
goto block_7;
}
D_8018D158 = 8;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_80071818.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? find_unused_obj_index(s32 *); // extern
? func_8006EE7C(s32, s16, s16, s16); // extern
? func_80070190(); // extern
? func_8007055C(); // extern
? func_80070780(); // extern
//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75
? find_unused_obj_index(s32 *); /* extern */
? func_8006EE7C(s32, s16, s16, s16); /* extern */
? func_80070190(); /* extern */
? func_8007055C(); /* extern */
? func_80070780(); /* extern */
extern s16 D_801657A2;
extern s32 D_80183DA0;
extern s32 D_80183DB8;
extern s32 D_80183DBC;
extern s32 D_80183E88;
extern s32 D_80183E8C;
extern ? D_8018CA70;
extern s32 D_8018D158;
extern s32 D_8018D3BC;
extern s32 D_8018D3C0;
@ -2189,42 +2183,42 @@ void func_80071A20(void) {
func_8007055C();
func_8007055C();
func_80070780();
D_8018CA70.unk44 = 0x22;
D_8018CA70.unk42 = -0x53;
D_8018CA70.unk46 = 0;
D_8018CA70.unk48 = 0;
D_8018CA70.unk4A = 0xA0;
D_8018CA70.unk4C = 0x3C;
D_8018CA70.unk62 = 0x34;
D_8018CA70.unk64 = 0x62;
D_8018CA70.unk66 = 0;
D_8018CA70.unk68 = 0;
D_8018CA70.unk4E = 0xEA;
D_8018CA70.unk58 = 0x10;
D_8018CA70.unk5A = 0x101;
D_8018CA70.unk60 = 0x6A;
D_8018CA70.unkC6 = -0x53;
D_8018CA70.unkC8 = 0x8F;
D_8018CA70.unkCA = 0;
D_8018CA70.unkCC = 0;
D_8018CA70.unkCE = 0xA0;
D_8018CA70.unkD0 = 0xB4;
D_8018CA70.unkE6 = 0x34;
D_8018CA70.unkE8 = 0xD2;
D_8018CA70.unkEA = 0;
D_8018CA70.unkEC = 0;
D_8018CA70.unkD2 = 0xEA;
D_8018CA70.unkDC = 0x7F;
D_8018CA70.unkDE = 0x101;
D_8018CA70.unkE4 = 0xDA;
if (gModeSelection == BATTLE) {
D_8018CA70.unk44 = 0x5E;
D_8018CA70.unkC8 = 0xD0;
D_8018CA70->itemBoxY = 0x22;
D_8018CA70->itemBoxX = -0x53;
D_8018CA70->slideItemBoxX = 0;
D_8018CA70->slideItemBoxY = 0;
D_8018CA70->unk_4A = 0xA0;
D_8018CA70->unk_4C = 0x3C;
D_8018CA70->rankX = 0x34;
D_8018CA70->rankY = 0x62;
D_8018CA70->slideRankX = 0;
D_8018CA70->slideRankY = 0;
D_8018CA70->timerX = 0xEA;
D_8018CA70->timerY = 0x10;
D_8018CA70->lapX = 0x101;
D_8018CA70->lapY = 0x6A;
D_8018CA70->unkC6 = -0x53;
D_8018CA70->unkC8 = 0x8F;
D_8018CA70->unkCA = 0;
D_8018CA70->unkCC = 0;
D_8018CA70->unkCE = 0xA0;
D_8018CA70->unkD0 = 0xB4;
D_8018CA70->unkE6 = 0x34;
D_8018CA70->unkE8 = 0xD2;
D_8018CA70->unkEA = 0;
D_8018CA70->unkEC = 0;
D_8018CA70->unkD2 = 0xEA;
D_8018CA70->unkDC = 0x7F;
D_8018CA70->unkDE = 0x101;
D_8018CA70->unkE4 = 0xDA;
if (gModeSelection == 3) {
D_8018CA70->itemBoxY = 0x5E;
D_8018CA70->unkC8 = 0xD0;
}
D_8018CA70.unk88 = 0.5f;
D_8018CA70.unk6A = gPlayerPositions->unk0;
D_8018CA70.unkEE = gPlayerPositions->unk4;
D_8018CA70.unk4 = D_8018CA70.unk88;
D_8018CA70->unk88 = 0.5f;
D_8018CA70->stagingPosition = (s16) gPlayerPositions->unk0;
D_8018CA70->unkEE = (s16) gPlayerPositions->unk4;
D_8018CA70->rankScaling = D_8018CA70->unk88;
func_8006EE7C(D_80183E88, 0x34, 0xEA, 0x101);
func_8006EE7C(D_80183E8C);
D_8018D3C4 = 0x1E;
@ -2232,29 +2226,28 @@ void func_80071A20(void) {
temp_v0 = gModeSelection;
D_8018D3C0 = 0x28;
D_801657A2 = 0x666;
if (temp_v0 != GRAND_PRIX) {
if (temp_v0 != VERSUS) {
if (temp_v0 != BATTLE) {
return;
}
goto block_9;
}
switch (temp_v0) { /* irregular */
case 0:
D_8018D158 = 8;
return;
case 2:
block_9:
D_8018D158 = 2;
return;
case 3:
goto block_9;
}
D_8018D158 = 8;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_80071A20.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? find_unused_obj_index(s32 *); // extern
? func_8006EE7C(s32, s16, s16, s16); // extern
? func_80070190(); // extern
? func_80070780(); // extern
//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75
? find_unused_obj_index(s32 *); /* extern */
? func_8006EE7C(s32, s16, s16, s16); /* extern */
? func_80070190(); /* extern */
? func_80070780(); /* extern */
extern s16 D_801657A2;
extern s32 D_80183DA0;
extern s32 D_80183DB8;
@ -2265,11 +2258,11 @@ extern s32 D_80183E88;
extern s32 D_80183E8C;
extern s32 D_80183E90;
extern s32 D_80183E94;
extern ? D_8018CA70;
extern s32 D_8018D158;
extern s32 D_8018D3BC;
extern s32 D_8018D3C0;
extern s32 D_8018D3C4;
extern s8 D_8018EDF3;
void func_80071C28(void) {
f32 temp_f0;
@ -2286,87 +2279,87 @@ void func_80071C28(void) {
find_unused_obj_index(&D_80183E94);
func_80070190();
func_80070780();
D_8018CA70.unkE6 = 0x11A;
D_8018CA70.unk16C = 0xD2;
D_8018CA70.unk14C = 0x2D;
D_8018CA70.unk168 = 0xD4;
D_8018CA70.unk176 = 0xC0;
D_8018CA70.unk1D0 = 0x2D;
D_8018CA70.unk1EE = 0x11A;
D_8018CA70.unk42 = -0x36;
D_8018CA70.unk44 = 0x36;
D_8018CA70.unk46 = 0;
D_8018CA70.unk48 = 0;
D_8018CA70.unk4A = 0x50;
D_8018CA70.unk4C = 0x3C;
D_8018CA70.unk62 = 0x25;
D_8018CA70.unk64 = 0x64;
D_8018CA70.unk66 = 0;
D_8018CA70.unk68 = 0;
D_8018CA70.unk5A = 0x8C;
D_8018CA70.unk60 = 0x60;
D_8018CA70.unk6C = 0xDE;
D_8018CA70.unk6E = 0xC8;
D_8018CA70.unkC6 = 0x175;
D_8018CA70.unkC8 = 0x36;
D_8018CA70.unkCA = 0;
D_8018CA70.unkCC = 0;
D_8018CA70.unkCE = 0xF0;
D_8018CA70.unkD0 = 0x3C;
D_8018CA70.unkE8 = 0x64;
D_8018CA70.unkEA = 0;
D_8018CA70.unkEC = 0;
D_8018CA70.unkDE = 0xB4;
D_8018CA70.unkE4 = 0x60;
D_8018CA70.unkF0 = 0xC8;
D_8018CA70.unkF2 = 0xC8;
D_8018CA70.unk14A = -0x36;
D_8018CA70.unk14E = 0;
D_8018CA70.unk150 = 0;
D_8018CA70.unk152 = 0x50;
D_8018CA70.unk154 = 0xB4;
D_8018CA70.unk16A = 0x25;
D_8018CA70.unk16E = 0;
D_8018CA70.unk170 = 0;
D_8018CA70.unk162 = 0x8C;
D_8018CA70.unk174 = 0xDE;
D_8018CA70.unk1CE = 0x175;
D_8018CA70.unk1D2 = 0;
D_8018CA70.unk1D4 = 0;
D_8018CA70.unk1D6 = 0xF0;
D_8018CA70.unk1D8 = 0xB4;
D_8018CA70.unk1F0 = 0xD2;
D_8018CA70.unk1F2 = 0;
D_8018CA70.unk1F4 = 0;
D_8018CA70.unk1E6 = 0xB4;
D_8018CA70.unk1EC = 0xD4;
D_8018CA70.unk1F8 = 0xC8;
D_8018CA70.unk1FA = 0xC0;
if (gModeSelection == BATTLE) {
D_8018CA70.unk44 = 0xC8;
D_8018CA70.unkC8 = 0xC8;
D_8018CA70.unk14C = 0xB8;
D_8018CA70.unk1D0 = 0xB8;
D_8018CA70->unkE6 = 0x11A;
D_8018CA70->unk16C = 0xD2;
D_8018CA70->unk14C = 0x2D;
D_8018CA70->unk168 = 0xD4;
D_8018CA70->unk176 = 0xC0;
D_8018CA70->unk1D0 = 0x2D;
D_8018CA70->unk1EE = 0x11A;
D_8018CA70->itemBoxX = -0x36;
D_8018CA70->itemBoxY = 0x36;
D_8018CA70->slideItemBoxX = 0;
D_8018CA70->slideItemBoxY = 0;
D_8018CA70->unk_4A = 0x50;
D_8018CA70->unk_4C = 0x3C;
D_8018CA70->rankX = 0x25;
D_8018CA70->rankY = 0x64;
D_8018CA70->slideRankX = 0;
D_8018CA70->slideRankY = 0;
D_8018CA70->lapX = 0x8C;
D_8018CA70->lapY = 0x60;
D_8018CA70->unk_6C = 0xDE;
D_8018CA70->unk_6E = 0xC8;
D_8018CA70->unkC6 = 0x175;
D_8018CA70->unkC8 = 0x36;
D_8018CA70->unkCA = 0;
D_8018CA70->unkCC = 0;
D_8018CA70->unkCE = 0xF0;
D_8018CA70->unkD0 = 0x3C;
D_8018CA70->unkE8 = 0x64;
D_8018CA70->unkEA = 0;
D_8018CA70->unkEC = 0;
D_8018CA70->unkDE = 0xB4;
D_8018CA70->unkE4 = 0x60;
D_8018CA70->unkF0 = 0xC8;
D_8018CA70->unkF2 = 0xC8;
D_8018CA70->unk14A = -0x36;
D_8018CA70->unk14E = 0;
D_8018CA70->unk150 = 0;
D_8018CA70->unk152 = 0x50;
D_8018CA70->unk154 = 0xB4;
D_8018CA70->unk16A = 0x25;
D_8018CA70->unk16E = 0;
D_8018CA70->unk170 = 0;
D_8018CA70->unk162 = 0x8C;
D_8018CA70->unk174 = 0xDE;
D_8018CA70->unk1CE = 0x175;
D_8018CA70->unk1D2 = 0;
D_8018CA70->unk1D4 = 0;
D_8018CA70->unk1D6 = 0xF0;
D_8018CA70->unk1D8 = 0xB4;
D_8018CA70->unk1F0 = 0xD2;
D_8018CA70->unk1F2 = 0;
D_8018CA70->unk1F4 = 0;
D_8018CA70->unk1E6 = 0xB4;
D_8018CA70->unk1EC = 0xD4;
D_8018CA70->unk1F8 = 0xC8;
D_8018CA70->unk1FA = 0xC0;
if (gModeSelection == 3) {
D_8018CA70->itemBoxY = 0xC8;
D_8018CA70->unkC8 = 0xC8;
D_8018CA70->unk14C = 0xB8;
D_8018CA70->unk1D0 = 0xB8;
}
D_8018CA70.unk190 = 0.5f;
temp_f0 = D_8018CA70.unk190;
D_8018CA70.unk10C = temp_f0;
D_8018CA70.unk88 = temp_f0;
D_8018CA70.unk4 = temp_f0;
D_8018CA70.unk6A = gPlayerPositions->unk0;
D_8018CA70.unkEE = gPlayerPositions->unk4;
D_8018CA70.unk172 = gPlayerPositions->unk8;
D_8018CA70.unk1F6 = gPlayerPositions->unkC;
D_8018CA70->unk190 = 0.5f;
temp_f0 = D_8018CA70->unk190;
D_8018CA70->unk10C = temp_f0;
D_8018CA70->unk88 = temp_f0;
D_8018CA70->rankScaling = temp_f0;
D_8018CA70->stagingPosition = (s16) gPlayerPositions->unk0;
D_8018CA70->unkEE = (s16) gPlayerPositions->unk4;
D_8018CA70->unk172 = (s16) gPlayerPositions->unk8;
D_8018CA70->unk1F6 = (s16) gPlayerPositions->unkC;
func_8006EE7C(D_80183E88, 0x36, 0x50, 0x3C);
func_8006EE7C(D_80183E8C);
func_8006EE7C(D_80183E90);
func_8006EE7C(D_80183E94);
D_8018CA70.unk18C = 1.5f;
temp_f0_2 = D_8018CA70.unk18C;
D_8018CA70.unk108 = temp_f0_2;
D_8018CA70.unk84 = temp_f0_2;
D_8018CA70.unk0 = temp_f0_2;
D_8018D158 = D_8018EDF3;
D_8018CA70->unk18C = 1.5f;
temp_f0_2 = D_8018CA70->unk18C;
D_8018CA70->unk108 = temp_f0_2;
D_8018CA70->unk84 = temp_f0_2;
D_8018CA70->unknownScaling = temp_f0_2;
D_8018D158 = (s32) D_8018EDF3;
D_8018D3C4 = 0x14;
D_8018D3BC = 0x10;
D_8018D3C0 = 0x1E;

View File

@ -5795,9 +5795,9 @@ GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007B254.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
? func_80040FD8(void *, ?, ?); /* extern */
s32 func_8004106C(void *, ?, ?); /* extern */
//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75
? func_80040FD8(s16 *, ?, ?); /* extern */
s32 func_8004106C(s16 *, ?, ?); /* extern */
? func_800722CC(s32, ?); /* extern */
s32 func_80072320(s32, ?); /* extern */
s32 func_80072354(s32, ?); /* extern */
@ -5811,41 +5811,111 @@ s32 func_80072354(s32, ?); /* extern */
? func_80072E54(s32, ?, ?, ?, s32, s32); /* extern */
? func_80073600(s32); /* extern */
? func_8007AC9C(s32); /* extern */
s8 func_8007AFB0(s32, s32); /* extern */
s32 func_8007B040(s32, s32); /* extern */
? func_8007B254(s32, s32); /* extern */
? func_800C8F80(u8, ?); /* extern */
? func_800C9018(u8, ?); /* extern */
extern ? D_0D01DED8;
extern ? D_0D01E0D8;
extern ? D_0D01E2D8;
extern ? D_0D01E4D8;
extern ? D_0D01E6D8;
extern ? D_0D01E8D8;
extern ? D_0D01EAD8;
extern ? D_0D01ECD8;
extern ? D_0D01EED8;
extern ? D_0D01F0D8;
extern ? D_0D01F2D8;
extern ? D_0D01F4D8;
extern ? D_0D01F6D8;
extern ? D_0D01F8D8;
extern ? D_0D01FAD8;
extern ? D_0D01FCD8;
extern ? D_0D01FED8;
extern ? D_0D0203D8;
extern ? D_0D0208D8;
extern ? D_0D020DD8;
extern ? D_0D0212D8;
extern ? D_0D0217D8;
extern ? D_0D021CD8;
extern ? D_0D0221D8;
extern ? D_0D0226D8;
extern ? D_0D022BD8;
extern ? D_0D0230D8;
extern ? D_0D0235D8;
extern ? D_0D023AD8;
extern ? D_0D023FD8;
extern ? D_0D0244D8;
extern ? D_0D0249D8;
extern s8 D_80165888;
extern ? D_80165C18;
extern ? D_80183E88;
extern ? D_8018CA70;
static ? D_800E44F0; /* unable to generate initializer; const */
static ? D_800E4530; /* unable to generate initializer; const */
extern s32 gActiveScreenMode;
extern s32 gControllerOne;
static ? *D_800E44F0[0x10] = {
&D_0D01DED8,
&D_0D01E0D8,
&D_0D01E2D8,
&D_0D01F0D8,
&D_0D01F2D8,
&D_0D01F4D8,
&D_0D01F6D8,
&D_0D01ECD8,
&D_0D01FAD8,
&D_0D01FCD8,
&D_0D01F8D8,
&D_0D01EED8,
&D_0D01E4D8,
&D_0D01E6D8,
&D_0D01E8D8,
&D_0D01EAD8,
}; /* const */
static ? *D_800E4530[0x10] = {
&D_0D01FED8,
&D_0D0203D8,
&D_0D0208D8,
&D_0D022BD8,
&D_0D0230D8,
&D_0D0235D8,
&D_0D023AD8,
&D_0D0221D8,
&D_0D0244D8,
&D_0D0249D8,
&D_0D023FD8,
&D_0D0226D8,
&D_0D020DD8,
&D_0D0212D8,
&D_0D0217D8,
&D_0D021CD8,
}; /* const */
void func_8007B34C(s32 playerId) {
s32 sp40;
void *sp38;
Player *sp38;
void *sp2C;
void *sp28;
struct_8018CA70_entry *sp28;
s16 temp_a1;
s16 temp_a1_2;
s16 temp_a1_3;
s16 temp_v0_6;
s32 temp_s0;
s32 temp_t6_2;
s32 temp_v0;
s32 temp_v0_2;
s32 temp_v0_4;
s8 temp_v0_7;
struct_8018CA70_entry *temp_v1;
struct_8018CA70_entry *temp_v1_2;
struct_8018CA70_entry *temp_v1_3;
struct_8018CA70_entry *temp_v1_4;
struct_8018CA70_entry *temp_v1_5;
struct_8018CA70_entry *temp_v1_6;
u16 temp_t6;
u16 temp_v0_3;
u8 temp_v0_5;
void *temp_t0;
void *temp_v1;
void *temp_v1_2;
void *temp_v1_3;
void *temp_v1_4;
void *temp_v1_5;
void *temp_v1_6;
sp38 = (playerId * 0xDD8) + gPlayerOne;
sp38 = &gPlayerOne[playerId];
sp40 = 0;
temp_s0 = *(&D_80183E88 + (playerId * 4));
if ((((playerId * 0x10) + gControllerOne)->unk6 & 0x2000) != 0) {
@ -5858,103 +5928,103 @@ void func_8007B34C(s32 playerId) {
sp2C = temp_t0;
temp_t6 = temp_t0->unkA6;
switch (temp_t6) {
case 0x1:
case 1:
func_8007B254(temp_s0, playerId);
break;
case 0x2:
case 2:
temp_v0 = gActiveScreenMode;
if (temp_v0 == 0) {
temp_v1 = (playerId * 0x84) + &D_8018CA70;
temp_v1 = &D_8018CA70[playerId];
sp28 = temp_v1;
func_80040FD8(temp_v1 + 0x48, 0x40, 4);
if (temp_v1->unk48 == 0x40) {
func_80040FD8(&temp_v1->slideItemBoxY, 0x40, 4);
if (temp_v1->slideItemBoxY == 0x40) {
func_80072488(temp_s0);
}
} else if (temp_v0 == 3) {
if ((playerId == 0) || (playerId == 2)) {
temp_v1_3 = (playerId * 0x84) + &D_8018CA70;
sp28 = temp_v1_3;
func_80040FD8(temp_v1_3 + 0x46, 0x80, 8);
if (temp_v1_3->unk46 == 0x80) {
temp_v1_2 = &D_8018CA70[playerId];
sp28 = temp_v1_2;
func_80040FD8(&temp_v1_2->slideItemBoxX, 0x80, 8);
if (temp_v1_2->slideItemBoxX == 0x80) {
func_80072488(temp_s0);
}
} else {
temp_v1_2 = (playerId * 0x84) + &D_8018CA70;
sp28 = temp_v1_2;
func_8004106C(temp_v1_2 + 0x46, -0x80, 8);
if (temp_v1_2->unk46 == -0x80) {
temp_v1_3 = &D_8018CA70[playerId];
sp28 = temp_v1_3;
func_8004106C(&temp_v1_3->slideItemBoxX, -0x80, 8);
if (temp_v1_3->slideItemBoxX == -0x80) {
func_80072488(temp_s0);
}
}
} else {
temp_v1_4 = (playerId * 0x84) + &D_8018CA70;
temp_v1_4 = &D_8018CA70[playerId];
sp28 = temp_v1_4;
func_80040FD8(temp_v1_4 + 0x46, 0x80, 8);
if (temp_v1_4->unk46 == 0x80) {
func_80040FD8(&temp_v1_4->slideItemBoxX, 0x80, 8);
if (temp_v1_4->slideItemBoxX == 0x80) {
func_80072488(temp_s0);
}
}
break;
case 0x3:
case 3:
func_80072E54(temp_s0, 1, 0xF, 1, 2, 2);
break;
case 0x4:
case 4:
func_80072E54(temp_s0, 1, 6, 1, 8, 1);
break;
case 0x5:
case 5:
func_80072E54(temp_s0, 1, 4, 1, 0x10, 1);
break;
case 0x6:
case 6:
sp2C->unkD2 = func_8007AFB0(temp_s0, playerId);
sp2C->unk4C = 8;
sp2C->unkD6 = 2;
sp2C->unkD6 = 2U;
func_80072488(temp_s0);
sp28 = playerId;
func_800C9018(playerId, 0x100FE1C);
func_800C8F80(playerId, 0x100FE47);
sp28 = (struct_8018CA70_entry *) (u8) playerId;
func_800C9018((u8) playerId, 0x0100FE1C);
func_800C8F80((u8) playerId, 0x0100FE47);
break;
case 0x7:
case 7:
func_80072D3C(temp_s0, sp2C->unkA2, 0, 8, 0xA);
break;
case 0x9:
case 9:
func_800722CC(temp_s0, 4);
func_80073600(temp_s0);
sp2C->unkD2 = 0;
func_80072488(temp_s0);
break;
case 0xA:
case 10:
func_8007278C(temp_s0, 0x14);
break;
case 0xB:
case 11:
temp_v0_2 = gActiveScreenMode;
if (temp_v0_2 == 0) {
if (func_8004106C((playerId * 0x84) + 0x48 + &D_8018CA70, 0, 4) != 0) {
if (func_8004106C((playerId * 0x84) + 0x48 + D_8018CA70, 0, 4) != 0) {
func_80072488(temp_s0);
}
} else if (temp_v0_2 == 3) {
if ((playerId == 0) || (playerId == 2)) {
temp_v1_6 = (playerId * 0x84) + &D_8018CA70;
sp28 = temp_v1_6;
func_8004106C(temp_v1_6 + 0x46, 0, 8);
if (temp_v1_6->unk46 == 0) {
temp_v1_5 = &D_8018CA70[playerId];
sp28 = temp_v1_5;
func_8004106C(&temp_v1_5->slideItemBoxX, 0, 8);
if (temp_v1_5->slideItemBoxX == 0) {
func_80072488(temp_s0);
}
} else {
temp_v1_5 = (playerId * 0x84) + &D_8018CA70;
sp28 = temp_v1_5;
func_80040FD8(temp_v1_5 + 0x46, 0, 8);
if (temp_v1_5->unk46 == 0) {
temp_v1_6 = &D_8018CA70[playerId];
sp28 = temp_v1_6;
func_80040FD8(&temp_v1_6->slideItemBoxX, 0, 8);
if (temp_v1_6->slideItemBoxX == 0) {
func_80072488(temp_s0);
}
}
} else if (func_8004106C((playerId * 0x84) + 0x46 + &D_8018CA70, 0, 8) != 0) {
} else if (func_8004106C((playerId * 0x84) + 0x46 + D_8018CA70, 0, 8) != 0) {
func_80072488(temp_s0);
}
break;
case 0xC:
case 12:
func_80072428(temp_s0);
break;
case 0x14:
case 20:
temp_a1 = sp2C->unkA2;
if (temp_a1 == 0xB) {
func_80072D3C(temp_s0, temp_a1, 0, 8, 0xA);
@ -5962,11 +6032,11 @@ void func_8007B34C(s32 playerId) {
func_80072D3C(temp_s0, temp_a1, 0xB, 8, 0xA);
}
break;
case 0x15:
case 21:
func_800726CC(temp_s0, 8);
sp2C->unkD6 = 2;
sp2C->unkD6 = 2U;
break;
case 0x1E:
case 30:
temp_a1_2 = sp2C->unkA2;
if (temp_a1_2 == 0xB) {
func_80072D3C(temp_s0, temp_a1_2, 0, 8, 0xA);
@ -5974,10 +6044,10 @@ void func_8007B34C(s32 playerId) {
func_80072D3C(temp_s0, temp_a1_2, 0xB, 8, 0xA);
}
break;
case 0x1F:
case 31:
func_800726CC(temp_s0, 9);
break;
case 0x28:
case 40:
temp_a1_3 = sp2C->unkA2;
if (temp_a1_3 == 0xD) {
func_80072D3C(temp_s0, temp_a1_3, 0xE, 8, 0xA);
@ -5985,10 +6055,10 @@ void func_8007B34C(s32 playerId) {
func_80072D3C(temp_s0, temp_a1_3, 0xD, 8, 0xA);
}
break;
case 0x29:
case 41:
func_800726CC(temp_s0, 8);
break;
case 0x32:
case 50:
func_80072D3C(temp_s0, sp2C->unkA2, 0, 8, 0x64);
break;
}
@ -5997,57 +6067,59 @@ void func_8007B34C(s32 playerId) {
if (temp_v0_3 == 0) {
func_8007AC9C(playerId);
} else {
sp2C->unk98 = temp_v0_3 - 1;
sp2C->unk98 = (u16) (temp_v0_3 - 1);
}
}
temp_v0_4 = sp2C->unk4C;
if (temp_v0_4 >= 0) {
if (temp_v0_4 > 0) {
sp2C->unk4C = temp_v0_4 - 1;
sp2C->unk4C = (s32) (temp_v0_4 - 1);
} else {
temp_v0_5 = sp2C->unkD6;
if (temp_v0_5 != 1) {
if (temp_v0_5 != 2) {
if (temp_v0_5 != 3) {
} else if (sp2C->unkA4 == 0) {
if (func_80072354(temp_s0, 1) != 0) {
temp_v0_6 = sp2C->unkA2;
if (temp_v0_6 == 0xB) {
if (func_8007B040(temp_s0, playerId) != 0) {
func_800726CC(temp_s0, 0x14);
sp2C->unkD6 = 0;
} else {
func_800726CC(temp_s0, 9);
}
} else if ((temp_v0_6 == 0xD) || (temp_v0_6 == 0xE)) {
sp2C->unkA2 = temp_v0_6 - 1;
func_800729D0(temp_s0, sp2C->unkA2);
sp2C->unkD6 = 3;
func_800726CC(temp_s0, 0x28);
switch (temp_v0_5) { /* switch 1; irregular */
case 1: /* switch 1 */
if (sp40 != 0) {
func_80073600(temp_s0);
func_800726CC(temp_s0, 6);
}
break;
case 2: /* switch 1 */
func_800729D0(temp_s0, sp2C->unkA2);
sp2C->unkD6 = 3U;
break;
case 3: /* switch 1 */
if (sp2C->unkA4 == 0) {
if (func_80072354(temp_s0, 1) != 0) {
temp_v0_6 = sp2C->unkA2;
if (temp_v0_6 == 0xB) {
if (func_8007B040(temp_s0, playerId) != 0) {
func_800726CC(temp_s0, 0x14);
sp2C->unkD6 = 0U;
} else {
func_800726CC(temp_s0, 9);
}
} else if ((temp_v0_6 == 0xD) || (temp_v0_6 == 0xE)) {
sp2C->unkA2 = (s16) (temp_v0_6 - 1);
func_800729D0(temp_s0, sp2C->unkA2);
sp2C->unkD6 = 3U;
func_800726CC(temp_s0, 0x28);
} else {
func_800722CC(temp_s0, 1);
func_800726CC(temp_s0, 0x1E);
sp2C->unkD6 = 0;
func_800726CC(temp_s0, 9);
}
} else {
func_800722CC(temp_s0, 1);
func_800726CC(temp_s0, 0x1E);
sp2C->unkD6 = 0U;
}
} else {
func_800729D0(temp_s0, sp2C->unkA2);
sp2C->unkD6 = 3;
}
} else if (sp40 != 0) {
func_80073600(temp_s0);
func_800726CC(temp_s0, 6);
break;
}
}
}
temp_t6_2 = sp2C->unkD2 * 4;
sp2C->unk60 = *(&D_800E44F0 + temp_t6_2);
sp2C->unk64 = *(&D_800E4530 + temp_t6_2);
sp38->unk10 = sp2C->unkA4;
temp_v0_7 = sp2C->unkD2;
sp2C->unk60 = (? *) D_800E44F0[temp_v0_7];
sp2C->unk64 = (? *) D_800E4530[temp_v0_7];
sp38->unk_010 = sp2C->unkA4;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007B34C.s")

View File

@ -3072,48 +3072,44 @@ GLOBAL_ASM("asm/non_matchings/code_800AF9B0/func_800B5020.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_800B45E0(s32); // extern
? populate_time_trial_record(void *, u32, s32, s32); // extern
s32 func_800B4F2C(s32, ? *, ? *, s32); // extern
extern ? D_8018CA70;
//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75
? populate_time_trial_record(u8 *, u32, s32, s32); /* extern */
extern ? D_8018CA74;
extern ? D_8018EB90;
extern s8 gCupSelection;
s8 gCharacterSelections[4]; /* unable to generate initializer; const */
s32 func_800B5218(void) {
s32 sp38;
s32 sp28;
s32 sp24;
void *sp20;
? *sp18;
u8 *sp20;
struct_8018CA70_entry *sp18;
? *temp_a1;
s32 temp_a0;
s32 temp_v0;
s32 temp_v1;
u32 temp_a1_2;
void *temp_v0_2;
u8 *temp_v0_2;
? *phi_a1;
? *phi_a2;
struct_8018CA70_entry *phi_a2;
s32 phi_v0;
? *phi_a2_2;
struct_8018CA70_entry *phi_a2_2;
s32 phi_a3;
s32 phi_v0_2;
s32 phi_a3_2;
sp38 = (gCupSelection * 4) + gCupCourseSelection;
sp28 = *gCharacterSelections;
sp28 = (s32) *gCharacterSelections;
phi_a1 = &D_8018CA74;
phi_a2 = &D_8018CA70;
phi_a2 = D_8018CA70;
phi_v0 = 1;
phi_a3_2 = 1;
do {
temp_v1 = phi_a1->unk20;
temp_a0 = phi_a2->unk20;
temp_a0 = phi_a2->lap1Duration;
phi_a2_2 = phi_a2;
phi_a3 = phi_a3_2;
if (temp_v1 < temp_a0) {
phi_a2_2 = (phi_v0 * 4) + &D_8018CA70;
phi_a2_2 = (phi_v0 * 4) + D_8018CA70;
phi_a3 = 1 << phi_v0;
} else if (temp_a0 == temp_v1) {
phi_a3 = phi_a3_2 | (1 << phi_v0);
@ -3127,10 +3123,10 @@ s32 func_800B5218(void) {
} while (temp_v0 != 3);
sp18 = phi_a2_2;
sp24 = phi_a3;
temp_a1_2 = phi_a2_2->unk20;
temp_a1_2 = phi_a2_2->lap1Duration;
phi_v0_2 = 0;
if (temp_a1_2 < (func_800B4F2C(temp_a0, temp_a1, phi_a2_2, phi_a3) & 0xFFFFF)) {
temp_v0_2 = ((sp38 / 4) * 0x60) + ((sp38 % 4) * 0x18) + &D_8018EB90;
if (temp_a1_2 < (u32) (func_800B4F2C(temp_a0, temp_a1, phi_a2_2, phi_a3) & 0xFFFFF)) {
temp_v0_2 = &D_8018EB90.allCourseTimeTrialRecords.cupRecords[sp38].courseRecords[sp38].records[0];
sp20 = temp_v0_2;
sp24 = phi_a3;
populate_time_trial_record(temp_v0_2 + 0xF, temp_a1_2, sp28, phi_a3);