mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-09-07 19:50:50 -04:00
Name ScreenContext, Refactor Course class to Track (#583)
* Rename Screen Contexts * typedef ScreenContext struct * Fix Compile * Rename Course.cpp to Track.cpp * Refactor Course to Track * A few renames * General Cleanup * More Rename * More names * Move TrackSections struct to Track.h --------- Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
This commit is contained in:
@@ -245,256 +245,8 @@ void func_80027EDC(Player* player, s8 playerId) {
|
||||
((player->type & PLAYER_INVISIBLE_OR_BOMB) != PLAYER_INVISIBLE_OR_BOMB)) {
|
||||
|
||||
CM_WhatDoesThisDo(player, playerId);
|
||||
|
||||
// switch (gCurrentCourseId) {
|
||||
// // case COURSE_MARIO_RACEWAY:
|
||||
// // if (((s16) gNearestPathPointByPlayerId[playerId] >= 0x19B) &&
|
||||
// // ((s16) gNearestPathPointByPlayerId[playerId] < 0x1B9)) {
|
||||
// // if (D_80165300[playerId] != 1) {
|
||||
// // func_800CA288(playerId, 0x55);
|
||||
// // }
|
||||
// // D_80165300[playerId] = 1;
|
||||
// // } else {
|
||||
// // if (D_80165300[playerId] != 0) {
|
||||
// // func_800CA2B8(playerId);
|
||||
// // D_80165300[playerId] = 0;
|
||||
// // }
|
||||
// // }
|
||||
// break;
|
||||
// case COURSE_CHOCO_MOUNTAIN:
|
||||
// if (((s16) gNearestPathPointByPlayerId[playerId] >= 0xA0) &&
|
||||
// ((s16) gNearestPathPointByPlayerId[playerId] < 0xB4)) {
|
||||
// if (D_80165300[playerId] != 1) {
|
||||
// func_800CA288(playerId, 0x55);
|
||||
// }
|
||||
// D_80165300[playerId] = 1;
|
||||
// } else {
|
||||
// if (D_80165300[playerId] != 0) {
|
||||
// func_800CA2B8(playerId);
|
||||
// D_80165300[playerId] = 0;
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
// case COURSE_BOWSER_CASTLE:
|
||||
// if (((s16) gNearestPathPointByPlayerId[playerId] >= 0x29) &&
|
||||
// ((s16) gNearestPathPointByPlayerId[playerId] < 0x1D2)) {
|
||||
// if (D_80165300[playerId] != 1) {
|
||||
// func_800CA288(playerId, 0x41);
|
||||
// }
|
||||
// D_80165300[playerId] = 1;
|
||||
// } else {
|
||||
// if (D_80165300[playerId] != 0) {
|
||||
// func_800CA2B8(playerId);
|
||||
// D_80165300[playerId] = 0;
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
// case COURSE_BANSHEE_BOARDWALK:
|
||||
// if (((s16) gNearestPathPointByPlayerId[playerId] >= 0x180) &&
|
||||
// ((s16) gNearestPathPointByPlayerId[playerId] < 0x1E1)) {
|
||||
// if (D_80165300[playerId] != 1) {
|
||||
// func_800CA288(playerId, 0x41);
|
||||
// }
|
||||
// D_80165300[playerId] = 1;
|
||||
// } else {
|
||||
// if (D_80165300[playerId] != 0) {
|
||||
// func_800CA2B8(playerId);
|
||||
// D_80165300[playerId] = 0;
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
// case COURSE_LUIGI_RACEWAY:
|
||||
// if (((s16) gNearestPathPointByPlayerId[playerId] >= 0x145) &&
|
||||
// ((s16) gNearestPathPointByPlayerId[playerId] < 0x18B)) {
|
||||
// if (D_80165300[playerId] != 1) {
|
||||
// func_800CA288(playerId, 0x55);
|
||||
// }
|
||||
// D_80165300[playerId] = 1;
|
||||
// } else {
|
||||
// if (D_80165300[playerId] != 0) {
|
||||
// func_800CA2B8(playerId);
|
||||
// D_80165300[playerId] = 0;
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
// case COURSE_TOADS_TURNPIKE:
|
||||
// if ((player->type & PLAYER_CINEMATIC_MODE) != PLAYER_CINEMATIC_MODE) {
|
||||
// if (D_80165300[playerId] != 1) {
|
||||
// func_800CA288(playerId, 0x1e);
|
||||
// }
|
||||
// D_80165300[playerId] = 1;
|
||||
// } else {
|
||||
// if (D_80165300[playerId] != 0) {
|
||||
// func_800CA2B8(playerId);
|
||||
// D_80165300[playerId] = 0;
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
// case COURSE_SHERBET_LAND:
|
||||
// if (((s16) gNearestPathPointByPlayerId[playerId] >= 0x11C) &&
|
||||
// ((s16) gNearestPathPointByPlayerId[playerId] < 0x209)) {
|
||||
// if (D_80165300[playerId] != 1) {
|
||||
// func_800CA288(playerId, 0x55);
|
||||
// }
|
||||
// D_80165300[playerId] = 1;
|
||||
// } else {
|
||||
// if (D_80165300[playerId] != 0) {
|
||||
// func_800CA2B8(playerId);
|
||||
// D_80165300[playerId] = 0;
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
// case COURSE_DK_JUNGLE:
|
||||
// if ((((s16) gNearestPathPointByPlayerId[playerId] >= 0) &&
|
||||
// ((s16) gNearestPathPointByPlayerId[playerId] < 0x65)) ||
|
||||
// (((s16) gNearestPathPointByPlayerId[playerId] >= 0x14A) &&
|
||||
// ((s16) gNearestPathPointByPlayerId[playerId] < 0x21F))) {
|
||||
// if (D_80165300[playerId] != 2) {
|
||||
// func_800C8F80(playerId, 0x0170802D);
|
||||
// }
|
||||
// D_80165300[playerId] = 2;
|
||||
// } else {
|
||||
// if (((s16) gNearestPathPointByPlayerId[playerId] >= 0x288) &&
|
||||
// ((s16) gNearestPathPointByPlayerId[playerId] < 0x305)) {
|
||||
// if (D_80165300[playerId] != 1) {
|
||||
// func_800CA288(playerId, 0x55);
|
||||
// }
|
||||
// D_80165300[playerId] = 1;
|
||||
// } else {
|
||||
// if (D_80165300[playerId] != 0) {
|
||||
// if (D_80165300[playerId] == 1) {
|
||||
// func_800CA2B8(playerId);
|
||||
// }
|
||||
// if (D_80165300[playerId] == 2) {
|
||||
// func_800C9018(playerId, SOUND_ARG_LOAD(0x01, 0x70, 0x80, 0x2D));
|
||||
// }
|
||||
// D_80165300[playerId] = 0;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
} else {
|
||||
|
||||
CM_WhatDoesThisDoAI(player, playerId);
|
||||
|
||||
// switch (gCurrentCourseId) {
|
||||
// case COURSE_MARIO_RACEWAY:
|
||||
// // if (((s16) gNearestPathPointByPlayerId[playerId] >= 0x19B) &&
|
||||
// // ((s16) gNearestPathPointByPlayerId[playerId] < 0x1B9)) {
|
||||
// // if (D_80165300[playerId] != 1) {
|
||||
// // func_800CA2E4(playerId, 0x55);
|
||||
// // }
|
||||
// // D_80165300[playerId] = 1;
|
||||
// // } else {
|
||||
// // if (D_80165300[playerId] != 0) {
|
||||
// // func_800CA30C(playerId);
|
||||
// // D_80165300[playerId] = 0;
|
||||
// // }
|
||||
// // }
|
||||
// break;
|
||||
// case COURSE_CHOCO_MOUNTAIN:
|
||||
// if (((s16) gNearestPathPointByPlayerId[playerId] >= 0xA0) &&
|
||||
// ((s16) gNearestPathPointByPlayerId[playerId] < 0xB4)) {
|
||||
// if (D_80165300[playerId] != 1) {
|
||||
// func_800CA2E4(playerId, 0x55);
|
||||
// }
|
||||
// D_80165300[playerId] = 1;
|
||||
// } else {
|
||||
// if (D_80165300[playerId] != 0) {
|
||||
// func_800CA30C(playerId);
|
||||
// D_80165300[playerId] = 0;
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
// case COURSE_BOWSER_CASTLE:
|
||||
// if (((s16) gNearestPathPointByPlayerId[playerId] >= 0x29) &&
|
||||
// ((s16) gNearestPathPointByPlayerId[playerId] < 0x1D2)) {
|
||||
// if (D_80165300[playerId] != 1) {
|
||||
// func_800CA2E4(playerId, 0x41);
|
||||
// }
|
||||
// D_80165300[playerId] = 1;
|
||||
// } else {
|
||||
// if (D_80165300[playerId] != 0) {
|
||||
// func_800CA30C(playerId);
|
||||
// D_80165300[playerId] = 0;
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
// case COURSE_BANSHEE_BOARDWALK:
|
||||
// if (((s16) gNearestPathPointByPlayerId[playerId] >= 0x180) &&
|
||||
// ((s16) gNearestPathPointByPlayerId[playerId] < 0x1E1)) {
|
||||
// if (D_80165300[playerId] != 1) {
|
||||
// func_800CA2E4(playerId, 0x41);
|
||||
// }
|
||||
// D_80165300[playerId] = 1;
|
||||
// } else {
|
||||
// if (D_80165300[playerId] != 0) {
|
||||
// func_800CA30C(playerId);
|
||||
// D_80165300[playerId] = 0;
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
// case COURSE_LUIGI_RACEWAY:
|
||||
// if (((s16) gNearestPathPointByPlayerId[playerId] >= 0x145) &&
|
||||
// ((s16) gNearestPathPointByPlayerId[playerId] < 0x18B)) {
|
||||
// if (D_80165300[playerId] != 1) {
|
||||
// func_800CA2E4(playerId, 0x55);
|
||||
// }
|
||||
// D_80165300[playerId] = 1;
|
||||
// } else {
|
||||
// if (D_80165300[playerId] != 0) {
|
||||
// func_800CA30C(playerId);
|
||||
// D_80165300[playerId] = 0;
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
// case COURSE_TOADS_TURNPIKE:
|
||||
// if ((player->type & PLAYER_CINEMATIC_MODE) != PLAYER_CINEMATIC_MODE) {
|
||||
// if (D_80165300[playerId] != 1) {
|
||||
// func_800CA2E4(playerId, 0x1E);
|
||||
// }
|
||||
// D_80165300[playerId] = 1;
|
||||
// } else {
|
||||
// if (D_80165300[playerId] != 0) {
|
||||
// func_800CA30C(playerId);
|
||||
// D_80165300[playerId] = 0;
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
// case COURSE_SHERBET_LAND:
|
||||
// if (((s16) gNearestPathPointByPlayerId[playerId] >= 0x11C) &&
|
||||
// ((s16) gNearestPathPointByPlayerId[playerId] < 0x209)) {
|
||||
// if (D_80165300[playerId] != 1) {
|
||||
// func_800CA2E4(playerId, 0x55);
|
||||
// }
|
||||
// D_80165300[playerId] = 1;
|
||||
// } else {
|
||||
// if (D_80165300[playerId] != 0) {
|
||||
// func_800CA30C(playerId);
|
||||
// D_80165300[playerId] = 0;
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
// case COURSE_DK_JUNGLE:
|
||||
// if (((s16) gNearestPathPointByPlayerId[playerId] >= 0x288) &&
|
||||
// ((s16) gNearestPathPointByPlayerId[playerId] < 0x305)) {
|
||||
// if (D_80165300[playerId] != 1) {
|
||||
// func_800CA2E4(playerId, 0x55);
|
||||
// }
|
||||
// D_80165300[playerId] = 1;
|
||||
// } else {
|
||||
// if (D_80165300[playerId] != 0) {
|
||||
// func_800CA30C(playerId);
|
||||
// D_80165300[playerId] = 0;
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user