mirror of https://github.com/n64decomp/mk64.git
place const and format external, code_8005fd0 and 80091750 (#515)
This commit is contained in:
parent
7597ee4ea8
commit
c187c71bb9
2301
src/audio/external.c
2301
src/audio/external.c
File diff suppressed because it is too large
Load Diff
|
|
@ -1275,10 +1275,10 @@ s32 func_80008E58(s32 payerId, s32 pathIndex) {
|
|||
D_80163318[payerId] = trackSegment;
|
||||
D_80162FCE = func_8000C0BC(posX, posY, posZ, trackSegment, &pathIndex);
|
||||
gNearestWaypointByPlayerId[payerId] = D_80162FCE;
|
||||
if(pathIndex){};
|
||||
if(pathIndex) {};
|
||||
gPathIndexByPlayerId[payerId] = pathIndex;
|
||||
func_80008DC0(pathIndex);
|
||||
if(stackPadding){};
|
||||
if(stackPadding) {};
|
||||
return pathIndex;
|
||||
}
|
||||
|
||||
|
|
@ -3791,8 +3791,7 @@ void func_8000F628(void) {
|
|||
D_80163330[D_80163344[0]] = 1;
|
||||
D_8016334C[D_80163344[0]] = 0;
|
||||
|
||||
for (i = 1; i < 2; i++)
|
||||
{
|
||||
for (i = 1; i < 2; i++) {
|
||||
D_80163344[i] = cameras[i].playerId;
|
||||
D_80163330[D_80163344[i]] = 1;
|
||||
D_8016334C[D_80163344[i]] = i;
|
||||
|
|
@ -7535,34 +7534,34 @@ void func_8001A124(s32 arg0, s32 arg1) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_8001A220(s32 arg0, s32 arg1) {
|
||||
void func_8001A220(s32 arg0, s32 cameraId) {
|
||||
switch (random_int(6)) {
|
||||
case 0:
|
||||
D_80164680[arg1] = 4;
|
||||
D_80164680[cameraId] = 4;
|
||||
break;
|
||||
case 1:
|
||||
D_80164680[arg1] = 5;
|
||||
D_80164680[cameraId] = 5;
|
||||
break;
|
||||
case 2:
|
||||
D_80164680[arg1] = 6;
|
||||
D_80164680[cameraId] = 6;
|
||||
break;
|
||||
case 3:
|
||||
D_80164680[arg1] = 7;
|
||||
D_80164680[cameraId] = 7;
|
||||
break;
|
||||
case 4:
|
||||
D_80164680[arg1] = 8;
|
||||
D_80164680[cameraId] = 8;
|
||||
break;
|
||||
case 5:
|
||||
D_80164680[arg1] = 1;
|
||||
D_80164680[cameraId] = 1;
|
||||
break;
|
||||
default:
|
||||
D_80164680[arg1] = 8;
|
||||
D_80164680[cameraId] = 8;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_8001A310(s32 arg0, s32 arg1) {
|
||||
if ((gCurrentCourseId == COURSE_BOWSER_CASTLE) && (arg1 != 0) && (arg0 >= 0xE7) && (arg0 < 0x1C2)) {
|
||||
s32 func_8001A310(s32 waypoint, s32 arg1) {
|
||||
if ((gCurrentCourseId == COURSE_BOWSER_CASTLE) && (arg1 != 0) && (waypoint >= 0xE7) && (waypoint < 0x1C2)) {
|
||||
arg1 = 0;
|
||||
}
|
||||
return arg1;
|
||||
|
|
@ -7630,7 +7629,7 @@ void func_8001A588(u16 *localD_80152300, Camera *camera, Player *player, s8 inde
|
|||
s32 playerId;
|
||||
playerId = camera->playerId;
|
||||
|
||||
if (gModeSelection == 1) {
|
||||
if (gModeSelection == TIME_TRIALS) {
|
||||
playerId = 0;
|
||||
}
|
||||
func_80019FB4(cameraIndex);
|
||||
|
|
@ -7642,8 +7641,8 @@ void func_8001A588(u16 *localD_80152300, Camera *camera, Player *player, s8 inde
|
|||
camera->pos[2] = (f32) (camera->pos[2] + 100.0);
|
||||
}
|
||||
}
|
||||
if ((gModeSelection != 3) && (D_80164680[cameraIndex] == -1) && (player->type & 0x800) && ((u16) D_801646CC == 0) && (D_801646C8 == 0)) {
|
||||
if (gModeSelection == 2) {
|
||||
if ((gModeSelection != BATTLE) && (D_80164680[cameraIndex] == -1) && (player->type & 0x800) && ((u16) D_801646CC == 0) && (D_801646C8 == 0)) {
|
||||
if (gModeSelection == VERSUS) {
|
||||
func_8001A220(playerId, cameraIndex);
|
||||
} else {
|
||||
func_8001A124((s32) playerId, cameraIndex);
|
||||
|
|
@ -7666,7 +7665,7 @@ void func_8001A588(u16 *localD_80152300, Camera *camera, Player *player, s8 inde
|
|||
if ((cameraIndex == 0) && (((D_801646C8 == 10)) || (D_801646C8 == 11))) {
|
||||
func_8001A518((s32) playerId, gGPCurrentRaceRankByPlayerId[playerId], 0);
|
||||
}
|
||||
if ((gModeSelection != 1) && (cameraIndex == 1) && (((D_801646C8 == 260)) || (D_801646C8 == 261))) {
|
||||
if ((gModeSelection != TIME_TRIALS) && (cameraIndex == 1) && (((D_801646C8 == 260)) || (D_801646C8 == 261))) {
|
||||
|
||||
var_v1 = 0;
|
||||
if (gPlayerCount == 2) {
|
||||
|
|
@ -7798,7 +7797,7 @@ void func_8001AB74(s32 arg0, s16 *arg1, s32 arg2) {
|
|||
break;
|
||||
}
|
||||
if (value >= 0) {
|
||||
*arg1 = value;
|
||||
*arg1 = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2266,7 +2266,7 @@ void print_text1(s32 column, s32 row, char *text, s32 tracking, f32 x_scale, f32
|
|||
break;
|
||||
}
|
||||
|
||||
if (arg6 < 3){
|
||||
if (arg6 < 3) {
|
||||
sp60 = 1;
|
||||
}
|
||||
else{
|
||||
|
|
@ -2744,7 +2744,7 @@ void func_80094C60(void) {
|
|||
case COURSE_SELECT_MENU:
|
||||
add_8018D9E0_entry(0x00000025, 0, 0, 2);
|
||||
add_8018D9E0_entry(0x00000052, 0, 0, 6);
|
||||
if (gModeSelection != 3) {
|
||||
if (gModeSelection != BATTLE) {
|
||||
add_8018D9E0_entry(0x00000053, 0, 0, 4);
|
||||
add_8018D9E0_entry(0x00000054, 0, 0, 4);
|
||||
add_8018D9E0_entry(0x00000055, 0, 0, 4);
|
||||
|
|
@ -2764,12 +2764,12 @@ void func_80094C60(void) {
|
|||
add_8018D9E0_entry(0x00000062, 0, 0, 6);
|
||||
add_8018D9E0_entry(0x0000005D, 0, 0, 6);
|
||||
add_8018D9E0_entry(0x0000005E, 0, 0, 8);
|
||||
if (gModeSelection == 1) {
|
||||
if (gModeSelection == TIME_TRIALS) {
|
||||
add_8018D9E0_entry(0x00000065, 0, 0, 8);
|
||||
add_8018D9E0_entry(0x00000066, 0, 0, 8);
|
||||
add_8018D9E0_entry(0x00000069, 0, 0, 8);
|
||||
}
|
||||
if (gModeSelection == 0) {
|
||||
if (gModeSelection == GRAND_PRIX) {
|
||||
add_8018D9E0_entry(0x00000068, 0, 0, 8);
|
||||
add_8018D9E0_entry(0x00000067, 0, 0, 5);
|
||||
}
|
||||
|
|
@ -5086,7 +5086,7 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_80099EC4.s")
|
|||
|
||||
void func_8009A344(void) {
|
||||
s32 index;
|
||||
for(index = 0; index < D_8018DEE0_SIZE; index++){
|
||||
for(index = 0; index < D_8018DEE0_SIZE; index++) {
|
||||
D_8018DEE0[index].visible = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -5975,7 +5975,7 @@ void func_8009CBE4(s32 arg0, s32 arg1, s32 arg2) {
|
|||
struct UnkStruct_800DC5EC* unk;
|
||||
struct UnkStruct_8018E7E8 *size, *start;
|
||||
|
||||
if ((gModeSelection == 0) || (gModeSelection == 1)) {
|
||||
if ((gModeSelection == GRAND_PRIX) || (gModeSelection == TIME_TRIALS)) {
|
||||
start = &(D_8018E7E8[arg0]);
|
||||
size = &(D_8018E810[arg0]);
|
||||
x = start->x;
|
||||
|
|
@ -6869,7 +6869,7 @@ void func_8009E5FC(s32 arg0) {
|
|||
|
||||
void func_8009E620(void) {
|
||||
s32 index;
|
||||
for(index = 0; index < D_8018D9E0_SIZE; index++){
|
||||
for(index = 0; index < D_8018D9E0_SIZE; index++) {
|
||||
D_8018D9E0[index].type = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -7859,10 +7859,8 @@ s32 func_800A095C(char *someString, s32 len, s32 column, s32 row) {
|
|||
void func_800A09E0(struct_8018D9E0_entry *arg0) {
|
||||
s32 table_row, x = 0x20, y;
|
||||
gDPSetScissor(gDisplayListHead++, G_SC_NON_INTERLACE, 0, 0, 319, 194);
|
||||
for(table_row = 0; table_row < 9; table_row++)
|
||||
{
|
||||
if ((D_800E86D0[0] != 0) || ((table_row != 0) && (table_row != 8)))
|
||||
{
|
||||
for(table_row = 0; table_row < 9; table_row++) {
|
||||
if ((D_800E86D0[0] != 0) || ((table_row != 0) && (table_row != 8))) {
|
||||
y = (table_row * 0xA) + arg0->row;
|
||||
gDisplayListHead = func_8009BA74(gDisplayListHead, D_0200157C, x, y);
|
||||
}
|
||||
|
|
@ -7876,8 +7874,7 @@ void func_800A0AD0(UNUSED struct_8018D9E0_entry *arg0) {
|
|||
struct_8018D9E0_entry *temp_t1;
|
||||
// Find struct_8018D9E0_entry with a type/id of 0xDA
|
||||
temp_t1 = find_8018D9E0_entry_dupe(0xDA);
|
||||
if ((gControllerPakMenuSelection != CONTROLLER_PAK_MENU_SELECT_RECORD) && (gControllerPakMenuSelection != CONTROLLER_PAK_MENU_END))
|
||||
{
|
||||
if ((gControllerPakMenuSelection != CONTROLLER_PAK_MENU_SELECT_RECORD) && (gControllerPakMenuSelection != CONTROLLER_PAK_MENU_END)) {
|
||||
gDPSetPrimColor(gDisplayListHead++, 0, 0, 0xFF, temp_t1->unk20, 0x00, 0xFF);
|
||||
gDisplayListHead = func_8009BA74(gDisplayListHead, D_02001874, 0x24, (gControllerPakSelectedTableRow * 0xA) + 0x7C);
|
||||
}
|
||||
|
|
@ -8194,7 +8191,7 @@ void func_800A1A20(struct_8018D9E0_entry *arg0) {
|
|||
set_text_color(TEXT_YELLOW);
|
||||
func_80093324(0xA0, arg0->row + 0x86, D_800E7728[0], 0, 0.75f, 0.75f);
|
||||
// Print the 3 Lap Time Trial records
|
||||
for(recordType = TIME_TRIAL_3LAP_RECORD_1, rowOffset = 0; recordType < TIME_TRIAL_1LAP_RECORD; recordType++, rowOffset += 0xD){
|
||||
for(recordType = TIME_TRIAL_3LAP_RECORD_1, rowOffset = 0; recordType < TIME_TRIAL_1LAP_RECORD; recordType++, rowOffset += 0xD) {
|
||||
set_text_color(TEXT_RED);
|
||||
func_800A474C(recordType, 0x96, arg0->row + rowOffset + 0x92);
|
||||
}
|
||||
|
|
@ -8294,7 +8291,7 @@ void func_800A1F30(struct_8018D9E0_entry *unused) {
|
|||
s32 text;
|
||||
|
||||
set_text_color(TEXT_RED);
|
||||
for(row = 0x49, text = 0; row < 0x69; row += 0x10, text++){
|
||||
for(row = 0x49, text = 0; row < 0x69; row += 0x10, text++) {
|
||||
func_80093324(0x2A, row, D_800E7860[text], 0, 0.75f, 0.75f);
|
||||
}
|
||||
}
|
||||
|
|
@ -8867,12 +8864,12 @@ void func_800A3C84(struct_8018D9E0_entry *arg0) {
|
|||
draw_text(arg0->column + 0x43, arg0->row + 0x19, D_800E7574[gCupCourseOrder[gCupSelection][gCupCourseSelection]], 0, 0.6f, 0.6f);
|
||||
set_text_color(TEXT_YELLOW);
|
||||
draw_text(arg0->column + 0x46, arg0->row + 0x28, D_800E7730, 0, 0.75f, 0.75f);
|
||||
for(recordType = 0, rowOffset = 0; recordType < TIME_TRIAL_3LAP_RECORD_5; recordType += 1, rowOffset += 0xF){
|
||||
for(recordType = 0, rowOffset = 0; recordType < TIME_TRIAL_3LAP_RECORD_5; recordType += 1, rowOffset += 0xF) {
|
||||
func_800A4550(recordType, arg0->column + 0x17, arg0->row + rowOffset + 0x37);
|
||||
}
|
||||
set_text_color(TEXT_YELLOW);
|
||||
func_80093324(0xB4 - arg0->column, arg0->row + 0x86, D_800E7728[0], 0, 0.75f, 0.75f);
|
||||
for(recordType = 0, rowOffset = 0; recordType < TIME_TRIAL_1LAP_RECORD; recordType += 1, rowOffset += 0xD){
|
||||
for(recordType = 0, rowOffset = 0; recordType < TIME_TRIAL_1LAP_RECORD; recordType += 1, rowOffset += 0xD) {
|
||||
set_text_color(TEXT_RED);
|
||||
func_800A474C(recordType, 0xAA - arg0->column, arg0->row + rowOffset + 0x92);
|
||||
}
|
||||
|
|
@ -9732,13 +9729,13 @@ void func_800A69C8(struct_8018D9E0_entry *arg0) {
|
|||
var_v1 = 0;
|
||||
thing = &D_800E7300[0][var_s0];
|
||||
switch (gModeSelection) { /* irregular */
|
||||
case 2:
|
||||
case VERSUS:
|
||||
if (gGPCurrentRaceRankByPlayerId[var_s0] != 0) {
|
||||
var_v1 = 1;
|
||||
}
|
||||
var_s4 = &gNmiUnknown1[var_s0];
|
||||
break;
|
||||
case 3:
|
||||
case BATTLE:
|
||||
if (var_s0 != gPlayerWinningIndex) {
|
||||
var_v1 = 1;
|
||||
}
|
||||
|
|
@ -9765,10 +9762,10 @@ void func_800A6BEC(struct_8018D9E0_entry *arg0) {
|
|||
|
||||
for (var_s0 = 0; var_s0 < gPlayerCount; var_s0++) {
|
||||
switch (gModeSelection) { /* irregular */
|
||||
case 2:
|
||||
case VERSUS:
|
||||
func_800A6E94(3, var_s0, gNmiUnknown2);
|
||||
break;
|
||||
case 3:
|
||||
case BATTLE:
|
||||
func_800A6D94(3, var_s0, gNmiUnknown5);
|
||||
break;
|
||||
}
|
||||
|
|
@ -9780,10 +9777,10 @@ void func_800A6CC0(struct_8018D9E0_entry *arg0) {
|
|||
|
||||
for (var_s0 = 0; var_s0 < gPlayerCount; var_s0++) {
|
||||
switch (gModeSelection) { /* irregular */
|
||||
case 2:
|
||||
case VERSUS:
|
||||
func_800A6E94(4, var_s0, gNmiUnknown3);
|
||||
break;
|
||||
case 3:
|
||||
case BATTLE:
|
||||
func_800A6D94(4, var_s0, gNmiUnknown6);
|
||||
break;
|
||||
}
|
||||
|
|
@ -10630,7 +10627,7 @@ void func_800A8A98(struct_8018D9E0_entry *arg0) {
|
|||
gDPSetRenderMode(gDisplayListHead++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
||||
for (someIndex = 0; someIndex < 4; someIndex++) {
|
||||
if ((someIndex == gCupCourseSelection) && (D_8018EDEC >= 2) && (gModeSelection != 0)) {
|
||||
if ((someIndex == gCupCourseSelection) && (D_8018EDEC >= 2) && (gModeSelection != GRAND_PRIX)) {
|
||||
if ((D_8018EDEC == 2) || (D_8018EDEC == 4)) {
|
||||
gDisplayListHead = draw_flash_select_case_slow(gDisplayListHead, D_800E7208[someIndex][0].column + temp_s2, D_800E7208[someIndex][0].row + temp_s3, D_800E7208[someIndex][1].column + temp_s2, D_800E7208[someIndex][1].row + temp_s3);
|
||||
} else {
|
||||
|
|
@ -10654,7 +10651,7 @@ void func_800A8CA4(struct_8018D9E0_entry *arg0) {
|
|||
gDPPipeSync(gDisplayListHead++);
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
||||
if (gModeSelection == 0) {
|
||||
if (gModeSelection == GRAND_PRIX) {
|
||||
if (D_8018EDEC != 3) {
|
||||
for (var_s0 = 0; var_s0 < 4; var_s0++) {
|
||||
// Wut?
|
||||
|
|
@ -11399,7 +11396,7 @@ void func_800AA2EC(struct_8018D9E0_entry *arg0) {
|
|||
break;
|
||||
}
|
||||
temp_v0 = osPfsInit(&gSIEventMesgQueue, &gControllerPak1FileHandle, 0);
|
||||
if (temp_v0 != 0){
|
||||
if (temp_v0 != 0) {
|
||||
switch (temp_v0) {
|
||||
case PFS_ERR_NOPACK:
|
||||
case PFS_ERR_DEVICE:
|
||||
|
|
@ -12146,7 +12143,7 @@ void func_800ABC38(struct_8018D9E0_entry *arg0) {
|
|||
}
|
||||
break;
|
||||
default:
|
||||
if ((gModeSelection != 0) || (gPlayerCountSelection1 != (s32) 1U) || (D_8018EE08 != 0)) {
|
||||
if ((gModeSelection != GRAND_PRIX) || (gPlayerCountSelection1 != (s32) 1U) || (D_8018EE08 != 0)) {
|
||||
arg0->type = 0;
|
||||
} else {
|
||||
if (arg0->row >= -0x13) {
|
||||
|
|
@ -12208,7 +12205,7 @@ void func_800ABEAC(struct_8018D9E0_entry *arg0) {
|
|||
}
|
||||
break;
|
||||
default:
|
||||
if ((gModeSelection != 0) || (gPlayerCountSelection1 != why) || (D_8018EE08 != 0)) {
|
||||
if ((gModeSelection != GRAND_PRIX) || (gPlayerCountSelection1 != why) || (D_8018EE08 != 0)) {
|
||||
arg0->type = 0;
|
||||
} else {
|
||||
if (arg0->row < 0x104) {
|
||||
|
|
@ -12581,7 +12578,7 @@ void func_800ACC50(struct_8018D9E0_entry *arg0) {
|
|||
case 2:
|
||||
arg0->unk1C += 0x20;
|
||||
if (arg0->unk1C >= 0x100) {
|
||||
if (gModeSelection == 2) {
|
||||
if (gModeSelection == VERSUS) {
|
||||
arg0->unk4 = (s32) D_8018EDF4;
|
||||
} else {
|
||||
arg0->unk4 = (s32) D_8018EDF6;
|
||||
|
|
@ -12617,7 +12614,7 @@ void func_800ACC50(struct_8018D9E0_entry *arg0) {
|
|||
if (gControllerFive->buttonPressed & 0x9000) {
|
||||
func_8009DFE0(0x0000001E);
|
||||
play_sound2(0x49008016);
|
||||
if (gModeSelection == 2) {
|
||||
if (gModeSelection == VERSUS) {
|
||||
D_8018EDF4 = (s8) arg0->unk4;
|
||||
} else {
|
||||
D_8018EDF6 = (s8) arg0->unk4;
|
||||
|
|
|
|||
|
|
@ -2367,7 +2367,7 @@ void func_8004F3E4(s32 arg0) {
|
|||
Player *player;
|
||||
|
||||
switch (gModeSelection) { /* irregular */
|
||||
case 0:
|
||||
case GRAND_PRIX:
|
||||
for (var_s1 = D_8018D158 - 1; var_s1 >= 0; var_s1--) {
|
||||
temp_a1 = gGPCurrentRacePlayerIdByRank[var_s1];
|
||||
if ((gPlayerOne + temp_a1)->type & 0x1000) {
|
||||
|
|
@ -2381,7 +2381,7 @@ void func_8004F3E4(s32 arg0) {
|
|||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
case TIME_TRIALS:
|
||||
for (var_s1 = 0; var_s1 < 8; var_s1++) {
|
||||
if (((gPlayerOne + var_s1)->type & 0x100) == 0x100) {
|
||||
func_8004F168(arg0, var_s1, 8);
|
||||
|
|
@ -2389,13 +2389,13 @@ void func_8004F3E4(s32 arg0) {
|
|||
}
|
||||
func_8004F168(arg0, 0, gPlayerOne->characterId);
|
||||
break;
|
||||
case 2:
|
||||
case VERSUS:
|
||||
for (var_s1 = gPlayerCountSelection1 - 1; var_s1 >=0; var_s1--) {
|
||||
temp_a1 = gGPCurrentRacePlayerIdByRank[var_s1];
|
||||
func_8004F168(arg0, temp_a1, (gPlayerOne + temp_a1)->characterId);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
case BATTLE:
|
||||
for (var_s1 = 0; var_s1 < gPlayerCountSelection1; var_s1++) {
|
||||
if (!((gPlayerOne + var_s1)->type & 0x40)) {
|
||||
func_8004F168(arg0, var_s1, (gPlayerOne + var_s1)->characterId);
|
||||
|
|
|
|||
|
|
@ -848,7 +848,7 @@ void logo_intro_menu_act(struct Controller *arg0, UNUSED u16 arg1) {
|
|||
gCurrentCourseId = 0;
|
||||
gScreenModeSelection = SCREEN_MODE_1P;
|
||||
gCharacterSelections[0] = 0;
|
||||
gModeSelection = 0;
|
||||
gModeSelection = GRAND_PRIX;
|
||||
gPlayerCount = 1;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -642,7 +642,7 @@ void func_80028864(Player *player, Camera *camera, s8 arg2, s8 arg3) {
|
|||
}
|
||||
if ((sp1E == 1) ||
|
||||
((player->type & PLAYER_INVISIBLE_OR_BOMB) == PLAYER_INVISIBLE_OR_BOMB) ||
|
||||
(gModeSelection == 3) ||
|
||||
(gModeSelection == BATTLE) ||
|
||||
((player->unk_0CA & 2) != 0) ||
|
||||
(player->unk_0CA & 8) ||
|
||||
((*((&D_801633F8) + (arg2))) == ((s16) 1U))) {
|
||||
|
|
@ -3657,7 +3657,7 @@ void func_80032700(Player *player) {
|
|||
}
|
||||
if (D_801656F0 == 1) {
|
||||
test = gRaceFrameCounter - D_801652E0[temp_v0];
|
||||
if (gModeSelection == (s32) 1) {
|
||||
if (gModeSelection == TIME_TRIALS) {
|
||||
var_v0 = 0x14;
|
||||
} else {
|
||||
var_v0 = 8;
|
||||
|
|
@ -3931,7 +3931,7 @@ void func_80033AE0(Player *player, struct Controller *controller, s8 arg2) {
|
|||
player->unk_0FA = (s16) sp2D0;
|
||||
if (((sp2D0 >= 0x5A) || (sp2D0 < (-0x59))) && (!(player->unk_044 & 0x4000)))
|
||||
{
|
||||
if ((((((!(player->effects & 0x10)) && (gCCSelection == CC_150)) && (gModeSelection != 3)) && (!(player->effects & 8))) && (((player->unk_094 / 18.0f) * 216.0f) >= 40.0f)) && (player->unk_204 == 0))
|
||||
if ((((((!(player->effects & 0x10)) && (gCCSelection == CC_150)) && (gModeSelection != BATTLE)) && (!(player->effects & 8))) && (((player->unk_094 / 18.0f) * 216.0f) >= 40.0f)) && (player->unk_204 == 0))
|
||||
{
|
||||
player->statusEffects |= 0x80;
|
||||
}
|
||||
|
|
@ -4246,7 +4246,7 @@ void func_80033AE0(Player *player, struct Controller *controller, s8 arg2) {
|
|||
player->unk_078 = ((s16) var_s1_2) * (var_f2_2 + 1.5f);
|
||||
}
|
||||
}
|
||||
if (gModeSelection == 3) {
|
||||
if (gModeSelection == BATTLE) {
|
||||
player->unk_078 *= 1.7;
|
||||
}
|
||||
}
|
||||
|
|
@ -4674,7 +4674,7 @@ void func_80037CFC(Player *player, struct Controller *controller, s8 arg2) {
|
|||
player_speed(player);
|
||||
func_80030E00(player);
|
||||
} else {
|
||||
if (gModeSelection == 3)
|
||||
if (gModeSelection == BATTLE)
|
||||
{
|
||||
func_80031F48(player, 2.0f);
|
||||
}
|
||||
|
|
@ -4768,54 +4768,55 @@ void func_800382DC(void) {
|
|||
u16 temp_v0_6;
|
||||
|
||||
switch (gActiveScreenMode) {
|
||||
case SCREEN_MODE_1P:
|
||||
switch (gModeSelection) {
|
||||
case 0:
|
||||
func_800381AC(gPlayerOne, gControllerOne, 0);
|
||||
return;
|
||||
case 1:
|
||||
if (D_8015F890 != 1) {
|
||||
func_800381AC(gPlayerOne, gControllerOne, 0);
|
||||
temp_v0_3 = gPlayerTwo->type;
|
||||
if (((temp_v0_3 & 0x100) == 0x100) && ((temp_v0_3 & 0x800) != 0x800)) {
|
||||
func_800381AC(gPlayerTwo, gControllerSix, 1);
|
||||
}
|
||||
temp_v0_4 = gPlayerThree->type;
|
||||
if (((temp_v0_4 & 0x100) == 0x100) && ((temp_v0_4 & 0x800) != 0x800)) {
|
||||
func_800381AC(gPlayerThree, gControllerSeven, 2);
|
||||
case SCREEN_MODE_1P:
|
||||
switch (gModeSelection) {
|
||||
case GRAND_PRIX:
|
||||
func_800381AC(gPlayerOne, gControllerOne, 0);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if ((gPlayerOne->type & 0x800) != 0x800) {
|
||||
func_800381AC(gPlayerOne, gControllerEight, 0);
|
||||
}
|
||||
temp_v0_5 = gPlayerTwo->type;
|
||||
if (((temp_v0_5 & 0x100) == 0x100) && ((temp_v0_5 & 0x800) != 0x800)) {
|
||||
func_800381AC(gPlayerTwo, gControllerSix, 1);
|
||||
}
|
||||
temp_v0_6 = gPlayerThree->type;
|
||||
if (((temp_v0_6 & 0x100) == 0x100) && ((temp_v0_6 & 0x800) != 0x800)) {
|
||||
func_800381AC(gPlayerThree, gControllerSeven, 2);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
case TIME_TRIALS:
|
||||
if (D_8015F890 != 1) {
|
||||
func_800381AC(gPlayerOne, gControllerOne, 0);
|
||||
temp_v0_3 = gPlayerTwo->type;
|
||||
if (((temp_v0_3 & 0x100) == 0x100) && ((temp_v0_3 & 0x800) != 0x800)) {
|
||||
func_800381AC(gPlayerTwo, gControllerSix, 1);
|
||||
}
|
||||
temp_v0_4 = gPlayerThree->type;
|
||||
if (((temp_v0_4 & 0x100) == 0x100) && ((temp_v0_4 & 0x800) != 0x800)) {
|
||||
func_800381AC(gPlayerThree, gControllerSeven, 2);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if ((gPlayerOne->type & 0x800) != 0x800) {
|
||||
func_800381AC(gPlayerOne, gControllerEight, 0);
|
||||
}
|
||||
temp_v0_5 = gPlayerTwo->type;
|
||||
if (((temp_v0_5 & 0x100) == 0x100) && ((temp_v0_5 & 0x800) != 0x800)) {
|
||||
func_800381AC(gPlayerTwo, gControllerSix, 1);
|
||||
}
|
||||
temp_v0_6 = gPlayerThree->type;
|
||||
if (((temp_v0_6 & 0x100) == 0x100) && ((temp_v0_6 & 0x800) != 0x800)) {
|
||||
func_800381AC(gPlayerThree, gControllerSeven, 2);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL:
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
|
||||
func_800381AC(gPlayerOne, gControllerOne, 0);
|
||||
func_800381AC(gPlayerTwo, gControllerTwo, 1);
|
||||
return;
|
||||
case SCREEN_MODE_3P_4P_SPLITSCREEN:
|
||||
func_800381AC(gPlayerOne, gControllerOne, 0);
|
||||
func_800381AC(gPlayerTwo, gControllerTwo, 1);
|
||||
func_800381AC(gPlayerThree, gControllerThree, 2);
|
||||
if (gPlayerCountSelection1 == 4) {
|
||||
func_800381AC(gPlayerFour, gControllerFour, 3);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL:
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
|
||||
func_800381AC(gPlayerOne, gControllerOne, 0);
|
||||
func_800381AC(gPlayerTwo, gControllerTwo, 1);
|
||||
return;
|
||||
case SCREEN_MODE_3P_4P_SPLITSCREEN:
|
||||
func_800381AC(gPlayerOne, gControllerOne, 0);
|
||||
func_800381AC(gPlayerTwo, gControllerTwo, 1);
|
||||
func_800381AC(gPlayerThree, gControllerThree, 2);
|
||||
if (gPlayerCountSelection1 == 4) {
|
||||
func_800381AC(gPlayerFour, gControllerFour, 3);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -796,73 +796,73 @@ void func_80022744(void) {
|
|||
|
||||
void func_8002276C(void) {
|
||||
switch (gActiveScreenMode) { /* irregular */
|
||||
case SCREEN_MODE_1P:
|
||||
switch (gModeSelection) { /* switch 1; irregular */
|
||||
case GRAND_PRIX: /* switch 1 */
|
||||
func_80022A98(gPlayerOne, 0);
|
||||
func_80022A98(gPlayerTwo, 1);
|
||||
func_80022A98(gPlayerThree, 2);
|
||||
func_80022A98(gPlayerFour, 3);
|
||||
func_80022A98(gPlayerFive, 4);
|
||||
func_80022A98(gPlayerSix, 5);
|
||||
func_80022A98(gPlayerSeven, 6);
|
||||
func_80022A98(gPlayerEight, 7);
|
||||
case SCREEN_MODE_1P:
|
||||
switch (gModeSelection) { /* switch 1; irregular */
|
||||
case GRAND_PRIX: /* switch 1 */
|
||||
func_80022A98(gPlayerOne, 0);
|
||||
func_80022A98(gPlayerTwo, 1);
|
||||
func_80022A98(gPlayerThree, 2);
|
||||
func_80022A98(gPlayerFour, 3);
|
||||
func_80022A98(gPlayerFive, 4);
|
||||
func_80022A98(gPlayerSix, 5);
|
||||
func_80022A98(gPlayerSeven, 6);
|
||||
func_80022A98(gPlayerEight, 7);
|
||||
break;
|
||||
case TIME_TRIALS: /* switch 1 */
|
||||
func_80022A98(gPlayerOne, 0);
|
||||
if ((gPlayerTwo->type & 0x100) == 0x100) {
|
||||
func_80022A98(gPlayerTwo, 1);
|
||||
}
|
||||
if ((gPlayerThree->type & 0x100) == 0x100) {
|
||||
func_80022A98(gPlayerThree, 2);
|
||||
}
|
||||
break;
|
||||
case VERSUS: /* switch 1 */
|
||||
case BATTLE: /* switch 1 */
|
||||
func_80022A98(gPlayerOne, 0);
|
||||
func_80022A98(gPlayerTwo, 1);
|
||||
if (gPlayerCountSelection1 >= 3) {
|
||||
func_80022A98(gPlayerThree, 2);
|
||||
}
|
||||
if (gPlayerCountSelection1 == 4) {
|
||||
func_80022A98(gPlayerFour, 3);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case TIME_TRIALS: /* switch 1 */
|
||||
func_80022A98(gPlayerOne, 0);
|
||||
if ((gPlayerTwo->type & 0x100) == 0x100) {
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL:
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
|
||||
switch (gModeSelection) { /* switch 2; irregular */
|
||||
case GRAND_PRIX: /* switch 2 */
|
||||
func_80022A98(gPlayerOne, 0);
|
||||
func_80022A98(gPlayerTwo, 1);
|
||||
func_80022A98(gPlayerThree, 2);
|
||||
func_80022A98(gPlayerFour, 3);
|
||||
func_80022A98(gPlayerFive, 4);
|
||||
func_80022A98(gPlayerSix, 5);
|
||||
func_80022A98(gPlayerSeven, 6);
|
||||
func_80022A98(gPlayerEight, 7);
|
||||
break;
|
||||
case VERSUS: /* switch 2 */
|
||||
case BATTLE: /* switch 2 */
|
||||
func_80022A98(gPlayerOne, 0);
|
||||
func_80022A98(gPlayerTwo, 1);
|
||||
break;
|
||||
case TIME_TRIALS: /* switch 2 */
|
||||
func_80022A98(gPlayerOne, 0);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SCREEN_MODE_3P_4P_SPLITSCREEN:
|
||||
if ((VERSUS == gModeSelection) || (BATTLE == gModeSelection)) {
|
||||
func_80022A98(gPlayerOne, 0);
|
||||
func_80022A98(gPlayerTwo, 1);
|
||||
}
|
||||
if ((gPlayerThree->type & 0x100) == 0x100) {
|
||||
func_80022A98(gPlayerThree, 2);
|
||||
if (gPlayerCountSelection1 == 4) {
|
||||
func_80022A98(gPlayerFour, 3);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case VERSUS: /* switch 1 */
|
||||
case BATTLE: /* switch 1 */
|
||||
func_80022A98(gPlayerOne, 0);
|
||||
func_80022A98(gPlayerTwo, 1);
|
||||
if (gPlayerCountSelection1 >= 3) {
|
||||
func_80022A98(gPlayerThree, 2);
|
||||
}
|
||||
if (gPlayerCountSelection1 == 4) {
|
||||
func_80022A98(gPlayerFour, 3);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL:
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
|
||||
switch (gModeSelection) { /* switch 2; irregular */
|
||||
case GRAND_PRIX: /* switch 2 */
|
||||
func_80022A98(gPlayerOne, 0);
|
||||
func_80022A98(gPlayerTwo, 1);
|
||||
func_80022A98(gPlayerThree, 2);
|
||||
func_80022A98(gPlayerFour, 3);
|
||||
func_80022A98(gPlayerFive, 4);
|
||||
func_80022A98(gPlayerSix, 5);
|
||||
func_80022A98(gPlayerSeven, 6);
|
||||
func_80022A98(gPlayerEight, 7);
|
||||
break;
|
||||
case VERSUS: /* switch 2 */
|
||||
case BATTLE: /* switch 2 */
|
||||
func_80022A98(gPlayerOne, 0);
|
||||
func_80022A98(gPlayerTwo, 1);
|
||||
break;
|
||||
case TIME_TRIALS: /* switch 2 */
|
||||
func_80022A98(gPlayerOne, 0);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SCREEN_MODE_3P_4P_SPLITSCREEN:
|
||||
if ((VERSUS == gModeSelection) || (BATTLE == gModeSelection)) {
|
||||
func_80022A98(gPlayerOne, 0);
|
||||
func_80022A98(gPlayerTwo, 1);
|
||||
func_80022A98(gPlayerThree, 2);
|
||||
if (gPlayerCountSelection1 == 4) {
|
||||
func_80022A98(gPlayerFour, 3);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -476,7 +476,7 @@ void func_80005AE8(Player *ply) {
|
|||
}
|
||||
|
||||
void func_80005B18(void) {
|
||||
if (gModeSelection == 1) {
|
||||
if (gModeSelection == TIME_TRIALS) {
|
||||
if ((gLapCountByPlayerId[0] == 3) && (D_80162DDC == 0) && (D_80162DF8 != 1)) {
|
||||
if (D_80162DD4 == 1) {
|
||||
D_80162DD0 = D_80162DCC;
|
||||
|
|
@ -524,7 +524,7 @@ void func_80005B18(void) {
|
|||
if (D_80162DEC >= 0x65) {
|
||||
D_80162DEC = 0x00000064;
|
||||
}
|
||||
if ((gModeSelection == 1) && (gActiveScreenMode == SCREEN_MODE_1P)) {
|
||||
if ((gModeSelection == TIME_TRIALS) && (gActiveScreenMode == SCREEN_MODE_1P)) {
|
||||
if ((D_80162DD4 == 0) && (gLapCountByPlayerId[1] != 3)) {
|
||||
func_800057DC();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue