mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-07-11 07:25:50 -04:00
Track unique_ptr : This probably compiles
This commit is contained in:
@@ -120,7 +120,7 @@ void render_actor_piranha_plant(Camera* arg0, Mat4 arg1, struct PiranhaPlant* ar
|
||||
G_TX_MIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
|
||||
G_TX_NOLOD);
|
||||
|
||||
if (GetCourse() == GetMarioRaceway()) {
|
||||
if (IsMarioRaceway) {
|
||||
gSPDisplayList(gDisplayListHead++, &d_course_mario_raceway_dl_piranha_plant);
|
||||
} else {
|
||||
gSPDisplayList(gDisplayListHead++, &d_course_royal_raceway_dl_piranha_plant);
|
||||
|
||||
@@ -202,7 +202,7 @@ void func_80299864(Camera* camera, Mat4 arg1, struct Actor* arg2) {
|
||||
// Unless both courses use this actor and use the same addr for the texture.
|
||||
// Just in-case changed the code into a switch to prevent future crashes.
|
||||
// This comment can be removed when this is confirmed to work.
|
||||
if (GetCourse() == GetLuigiRaceway()) {
|
||||
if (IsLuigiRaceway()) {
|
||||
gSPDisplayList(gDisplayListHead++, d_course_luigi_raceway_dl_FC70);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2647,11 +2647,11 @@ void func_800C847C(u8 playerId) {
|
||||
func_800C97C4(playerId);
|
||||
D_800E9F74[playerId] = 1;
|
||||
func_800C94A4(playerId);
|
||||
if (((GetCourse() == GetChocoMountain()) || (GetCourse() == GetBowsersCastle()) ||
|
||||
(GetCourse() == GetBansheeBoardwalk()) || (GetCourse() == GetYoshiValley()) ||
|
||||
(GetCourse() == GetFrappeSnowland()) || (GetCourse() == GetKoopaTroopaBeach()) ||
|
||||
(GetCourse() == GetRoyalRaceway()) || (GetCourse() == GetSherbetLand()) ||
|
||||
(GetCourse() == GetDkJungle()) || (GetCourse() == GetBigDonut())) &&
|
||||
if (((IsChocoMountain()) || (IsBowsersCastle()) ||
|
||||
(IsBansheeBoardwalk()) || (IsYoshiValley()) ||
|
||||
(IsFrappeSnowland()) || (IsKoopaTroopaBeach()) ||
|
||||
(IsRoyalRaceway()) || (IsSherbetLand()) ||
|
||||
(IsDkJungle()) || (IsBigDonut())) &&
|
||||
(D_800EA0EC[playerId] == 0)) {
|
||||
play_sound((gPlayers[playerId].characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x05),
|
||||
&D_800E9F7C[playerId].pos, playerId, &D_800EA1D4, &D_800EA1D4,
|
||||
@@ -2664,7 +2664,7 @@ void func_800C847C(u8 playerId) {
|
||||
D_800E9F74[playerId] = 2;
|
||||
func_800C94A4(playerId);
|
||||
D_800E9F74[playerId] = 0;
|
||||
if ((GetCourse() == GetKoopaTroopaBeach()) && (D_800EA0EC[playerId] == 0)) {
|
||||
if ((IsKoopaTroopaBeach()) && (D_800EA0EC[playerId] == 0)) {
|
||||
play_sound((gPlayers[playerId].characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x08),
|
||||
&D_800E9F7C[playerId].pos, playerId, &D_800EA1D4, &D_800EA1D4,
|
||||
(u8*) &D_800E9F7C[playerId].unk_14);
|
||||
@@ -2746,7 +2746,7 @@ void func_800C89E4(void) {
|
||||
}
|
||||
|
||||
void func_800C8AE4(void) {
|
||||
if (GetCourse() == GetLuigiRaceway()) {
|
||||
if (IsLuigiRaceway()) {
|
||||
if (D_800EA184 != 0) {
|
||||
if ((u8) D_800EA16C == 0) {
|
||||
// Has to be this way, can't be D_800EA184++
|
||||
@@ -2824,11 +2824,11 @@ void func_800C8CCC() {
|
||||
}
|
||||
|
||||
void play_sound2(s32 soundBits) {
|
||||
if ((soundBits == SOUND_ACTION_REV_ENGINE) && (GetCourse() == GetDkJungle())) {
|
||||
if ((soundBits == SOUND_ACTION_REV_ENGINE) && (IsDkJungle())) {
|
||||
soundBits = SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x27);
|
||||
}
|
||||
|
||||
if ((soundBits == SOUND_ACTION_REV_ENGINE_2) && (GetCourse() == GetDkJungle())) {
|
||||
if ((soundBits == SOUND_ACTION_REV_ENGINE_2) && (IsDkJungle())) {
|
||||
soundBits = SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x28);
|
||||
}
|
||||
play_sound(soundBits, &D_800EA1C8, 4, &D_800EA1D4, &D_800EA1D4, &D_800EA1DC);
|
||||
|
||||
+3
-3
@@ -383,7 +383,7 @@ void func_8001CA78(UNUSED Player* player, Camera* camera, Vec3f arg2, f32* arg3,
|
||||
arg2[2] = camera->lookAt[2];
|
||||
calculate_orientation_matrix(sp74, 0, 1, 0, -0x00008000);
|
||||
mtxf_translate_vec3f_mat3(sp5C, sp74);
|
||||
if (GetCourse() == GetToadsTurnpike()) {
|
||||
if (IsToadsTurnpike()) {
|
||||
var_f14 = sp5C[0];
|
||||
} else {
|
||||
var_f14 = sp5C[0] + temp_s2->posX;
|
||||
@@ -394,7 +394,7 @@ void func_8001CA78(UNUSED Player* player, Camera* camera, Vec3f arg2, f32* arg3,
|
||||
arg2[1] += (temp_f18 - camera->lookAt[1]) * 1;
|
||||
arg2[2] += (temp_f16 - camera->lookAt[2]) * 1;
|
||||
mtxf_translate_vec3f_mat3(sp68, sp74);
|
||||
if (GetCourse() == GetToadsTurnpike()) {
|
||||
if (IsToadsTurnpike()) {
|
||||
var_f14 = sp68[0];
|
||||
} else {
|
||||
var_f14 = sp68[0] + temp_s2->posX;
|
||||
@@ -487,7 +487,7 @@ void func_8001CCEC(Player* player, Camera* camera, Vec3f arg2, f32* arg3, f32* a
|
||||
move_f32_towards(&D_80164AA0[index], 10, 0.02f);
|
||||
break;
|
||||
default:
|
||||
if (GetCourse() == GetYoshiValley()) {
|
||||
if (IsYoshiValley()) {
|
||||
move_f32_towards(&D_80164A90[index], 50, 0.04f);
|
||||
move_f32_towards(&D_80164AA0[index], 35, 0.04f);
|
||||
} else {
|
||||
|
||||
+2
-2
@@ -233,9 +233,9 @@ void setup_race(void) {
|
||||
// D_8015F8D0[1] = (f32) (D_80164490->posY - 15);
|
||||
// D_8015F8D0[2] = D_80164490->posZ;
|
||||
|
||||
// if (GetCourse() == GetToadsTurnpike()) {
|
||||
// if (IsToadsTurnpike()) {
|
||||
// D_8015F8D0[0] = (gIsMirrorMode != 0) ? D_80164490->posX + 138.0f : D_80164490->posX - 138.0f;
|
||||
// } else if (GetCourse() == GetWarioStadium()) {
|
||||
// } else if (IsWarioStadium()) {
|
||||
// D_8015F8D0[0] = (gIsMirrorMode != 0) ? D_80164490->posX + 12.0f : D_80164490->posX - 12.0f;
|
||||
// } else {
|
||||
// D_8015F8D0[0] = D_80164490->posX;
|
||||
|
||||
+43
-43
@@ -1076,7 +1076,7 @@ void func_80008424(s32 playerId, f32 arg1, Player* player) {
|
||||
if (!(player->effects & 0x80) && !(player->effects & 0x40) && !(player->effects & 0x20000) &&
|
||||
!(player->soundEffects & 0x400000) && !(player->soundEffects & 0x01000000) && !(player->soundEffects & 2) &&
|
||||
!(player->soundEffects & 4)) {
|
||||
if (GetCourse() == GetPodiumCeremony()) {
|
||||
if (IsPodiumCeremony()) {
|
||||
func_80007FA4(playerId, player, var_f2);
|
||||
} else if ((bStopAICrossing[playerId] == 1) && !(player->effects & (STAR_EFFECT | BOO_EFFECT))) {
|
||||
decelerate_ai_player(player, 10.0f);
|
||||
@@ -1140,7 +1140,7 @@ void func_80008424(s32 playerId, f32 arg1, Player* player) {
|
||||
}
|
||||
if (var_a1 != 1) {
|
||||
if (var_f2 < arg1) {
|
||||
if ((gDemoMode == 1) && (GetCourse() != GetPodiumCeremony())) {
|
||||
if ((gDemoMode == 1) && (!IsPodiumCeremony())) {
|
||||
player_speed(player);
|
||||
} else if (D_80163330[playerId] == 1) {
|
||||
func_80007D04(playerId, player);
|
||||
@@ -1448,15 +1448,15 @@ void func_8000929C(s32 playerId, Player* player) {
|
||||
D_801630E2 = 1;
|
||||
func_80008F38(playerId);
|
||||
}
|
||||
if (GetCourse() == GetPodiumCeremony()) {
|
||||
if (IsPodiumCeremony()) {
|
||||
func_8000B95C(playerId, sSomeNearestWaypoint, D_80163448);
|
||||
return;
|
||||
}
|
||||
if ((sSomeNearestWaypoint < 0x14) || ((gWaypointCountByPathIndex[D_80163448] - 0x14) < sSomeNearestWaypoint) ||
|
||||
(GetCourse() == GetKalimariDesert())) {
|
||||
(IsKalimariDesert())) {
|
||||
var_v1 = 0;
|
||||
var_t0 = 0;
|
||||
if (GetCourse() == GetKalimariDesert()) {
|
||||
if (IsKalimariDesert()) {
|
||||
D_801634EC = 0;
|
||||
if (player->effects & 0x200) {
|
||||
D_801634EC = 1;
|
||||
@@ -1510,7 +1510,7 @@ void func_8000929C(s32 playerId, Player* player) {
|
||||
}
|
||||
}
|
||||
D_80163450[playerId] = tempPos2;
|
||||
if ((GetCourse() == GetYoshiValley()) && (D_801630E2 == 1)) {
|
||||
if ((IsYoshiValley()) && (D_801630E2 == 1)) {
|
||||
func_80009000(playerId);
|
||||
if (((player->type & 0x4000) == 0) || (player->type & 0x1000)) {
|
||||
func_800090F0(playerId, player);
|
||||
@@ -1664,7 +1664,7 @@ void func_80009B60(s32 playerId) {
|
||||
if (!(player->unk_0CA & 2) && !(player->unk_0CA & 8)) {
|
||||
D_80163448 = gPathIndexByPlayerId[playerId];
|
||||
func_80008DC0(D_80163448);
|
||||
//if (GetCourse() == GetKalimariDesert()) {
|
||||
//if (IsKalimariDesert()) {
|
||||
CM_VehicleCollision(playerId, player);
|
||||
//func_80012DC0(playerId, player);
|
||||
if (playerId == 0) {
|
||||
@@ -1672,9 +1672,9 @@ void func_80009B60(s32 playerId) {
|
||||
//func_80013054();
|
||||
}
|
||||
//}
|
||||
if (GetCourse() == GetDkJungle()) {
|
||||
if (IsDkJungle()) {
|
||||
//func_80013854(player);
|
||||
} else if (GetCourse() == GetToadsTurnpike()) {
|
||||
} else if (IsToadsTurnpike()) {
|
||||
func_800148C4(playerId, player);
|
||||
func_80014A18(playerId, player);
|
||||
func_80014B6C(playerId, player);
|
||||
@@ -1685,11 +1685,11 @@ void func_80009B60(s32 playerId) {
|
||||
player->unk_044 &= ~0x0001;
|
||||
}
|
||||
func_8000929C(playerId, player);
|
||||
if ((GetCourse() != GetPodiumCeremony()) && ((D_80163240[playerId] == 1) || (playerId == 0))) {
|
||||
if ((!IsPodiumCeremony()) && ((D_80163240[playerId] == 1) || (playerId == 0))) {
|
||||
set_places();
|
||||
}
|
||||
if (player->type & 0x1000) {
|
||||
if ((D_801630E2 == 1) && (GetCourse() != GetPodiumCeremony())) {
|
||||
if ((D_801630E2 == 1) && (!IsPodiumCeremony())) {
|
||||
kart_ai_behaviour(playerId);
|
||||
}
|
||||
if ((playerId & 1) != (D_80163378 & 1)) {
|
||||
@@ -1706,11 +1706,11 @@ void func_80009B60(s32 playerId) {
|
||||
break;
|
||||
}
|
||||
D_801631E0[playerId] = 0;
|
||||
if ((player->effects & 0x1000) && (GetCourse() != GetPodiumCeremony())) {
|
||||
if ((player->effects & 0x1000) && (!IsPodiumCeremony())) {
|
||||
D_801631E0[playerId] = 1;
|
||||
}
|
||||
if ((D_801646CC == 1) || (player->type & 0x800) || (GetCourse() == GetPodiumCeremony())) {
|
||||
if (GetCourse() != GetToadsTurnpike()) {
|
||||
if ((D_801646CC == 1) || (player->type & 0x800) || (IsPodiumCeremony())) {
|
||||
if (!IsToadsTurnpike()) {
|
||||
D_801634F8[playerId].unk4 = 0.0f;
|
||||
}
|
||||
D_801634F8[playerId].unkC = 0.0f;
|
||||
@@ -1731,9 +1731,9 @@ void func_80009B60(s32 playerId) {
|
||||
|
||||
// Old vehicle draw method was here
|
||||
|
||||
if ((GetCourse() == GetYoshiValley()) || (GetCourse() == GetPodiumCeremony())) {
|
||||
if ((IsYoshiValley()) || (IsPodiumCeremony())) {
|
||||
D_801634F8[playerId].unk4 = 0.0f;
|
||||
} else if (GetCourse() == GetToadsTurnpike()) {
|
||||
} else if (IsToadsTurnpike()) {
|
||||
// func_8001490C(playerId);
|
||||
// func_80014A60(playerId);
|
||||
// func_80014BB4(playerId);
|
||||
@@ -1840,10 +1840,10 @@ void func_80009B60(s32 playerId) {
|
||||
}
|
||||
D_801630B8[playerId] = func_8000B7E4(playerId, sSomeNearestWaypoint);
|
||||
func_8000D438(playerId, sSomeNearestWaypoint);
|
||||
if (GetCourse() != GetPodiumCeremony()) {
|
||||
if (!IsPodiumCeremony()) {
|
||||
if (D_80164450[playerId] < 0xB) {
|
||||
stackPadding1A = D_801630E0;
|
||||
if ((D_80164450[playerId] > 0) && (GetCourse() == GetToadsTurnpike())) {
|
||||
if ((D_80164450[playerId] > 0) && (IsToadsTurnpike())) {
|
||||
stackPadding1A += 0x14;
|
||||
stackPadding1A %= D_80164430;
|
||||
func_8000BBD8(stackPadding1A, 0.0f, 0);
|
||||
@@ -1877,7 +1877,7 @@ void func_80009B60(s32 playerId) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (GetCourse() == GetPodiumCeremony()) {
|
||||
if (IsPodiumCeremony()) {
|
||||
switch (D_80163410[playerId]) { /* switch 3; irregular */
|
||||
case 3: /* switch 3 */
|
||||
D_80162FA0[0] = D_80163418[playerId];
|
||||
@@ -2297,7 +2297,7 @@ s16 find_closest_waypoint_track_section(f32 posX, f32 posY, f32 posZ, u16 trackS
|
||||
considerWaypoint = &pathWaypoints[0];
|
||||
for (considerWaypointIndex = 0; considerWaypointIndex < pathWaypointCount;
|
||||
considerWaypointIndex++, considerWaypoint++) {
|
||||
if ((considerWaypoint->trackSectionId == trackSectionId) || (GetCourse() == GetPodiumCeremony())) {
|
||||
if ((considerWaypoint->trackSectionId == trackSectionId) || (IsPodiumCeremony())) {
|
||||
var_t1 = 1;
|
||||
x_dist = (f32) considerWaypoint->posX - posX;
|
||||
y_dist = (f32) considerWaypoint->posY - posY;
|
||||
@@ -2463,7 +2463,7 @@ void func_8000CBA4(UNUSED f32 posX, f32 posY, UNUSED f32 posZ, s16* waypointInde
|
||||
s16 var_v0;
|
||||
|
||||
var_v0 = *waypointIndex;
|
||||
if ((GetCourse() == GetWarioStadium()) && (var_v0 >= 0x475) && (var_v0 < 0x480) && (posY < 0.0f)) {
|
||||
if ((IsWarioStadium()) && (var_v0 >= 0x475) && (var_v0 < 0x480) && (posY < 0.0f)) {
|
||||
var_v0 = 0x0398;
|
||||
}
|
||||
*waypointIndex = var_v0;
|
||||
@@ -2666,11 +2666,11 @@ void func_8000D438(s32 arg0, u16 arg1) {
|
||||
sp2C = func_8000D3B8(arg0);
|
||||
thing = arg1;
|
||||
|
||||
if (GetCourse() == GetPodiumCeremony()) {
|
||||
if (IsPodiumCeremony()) {
|
||||
var_a2 = 1;
|
||||
} else if (GetCourse() == GetToadsTurnpike()) {
|
||||
} else if (IsToadsTurnpike()) {
|
||||
var_a2 = 7;
|
||||
} else if (GetCourse() == GetYoshiValley()) {
|
||||
} else if (IsYoshiValley()) {
|
||||
} else {
|
||||
if (temp_v1 < 6) {
|
||||
var_a2 = 8;
|
||||
@@ -2908,11 +2908,11 @@ void set_bomb_kart_spawn_positions(void) {
|
||||
|
||||
for (var_s3 = 0; var_s3 < NUM_BOMB_KARTS_VERSUS; var_s3++) {
|
||||
//bombKartSpawn = &gBombKartSpawns[gCurrentCourseId][var_s3];
|
||||
if (GetCourse() == GetYoshiValley()) {
|
||||
if (IsYoshiValley()) {
|
||||
startingXPos = bombKartSpawn->startingXPos;
|
||||
startingZPos = bombKartSpawn->startingZPos;
|
||||
startingYPos = spawn_actor_on_surface(startingXPos, 2000.0f, startingZPos);
|
||||
} else if (GetCourse() == GetPodiumCeremony()) {
|
||||
} else if (IsPodiumCeremony()) {
|
||||
temp_v0 = &D_80164550[3][bombKartSpawn->waypointIndex];
|
||||
startingXPos = temp_v0->posX;
|
||||
startingYPos = temp_v0->posY;
|
||||
@@ -3014,7 +3014,7 @@ void func_8000DF8C(s32 bombKartId) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (((bombKart->unk_4A != 1) || (GetCourse() == GetPodiumCeremony()))) {
|
||||
if (((bombKart->unk_4A != 1) || (IsPodiumCeremony()))) {
|
||||
var_f22 = bombKart->bombPos[0];
|
||||
var_f20 = bombKart->bombPos[1];
|
||||
var_f24 = bombKart->bombPos[2];
|
||||
@@ -3025,7 +3025,7 @@ void func_8000DF8C(s32 bombKartId) {
|
||||
var_s1 = bombKart->circleTimer;
|
||||
if ((sp7E != 0) && (sp7E != 4)) {
|
||||
if (1) {}
|
||||
if (GetCourse() == GetPodiumCeremony()) {
|
||||
if (IsPodiumCeremony()) {
|
||||
if (D_8016347E == 1) {
|
||||
var_v0 = gPlayerFour;
|
||||
temp_f0 = var_f22 - var_v0->pos[0];
|
||||
@@ -3049,7 +3049,7 @@ void func_8000DF8C(s32 bombKartId) {
|
||||
if ((((temp_f0 * temp_f0) + (temp_f2 * temp_f2)) + (temp_f12 * temp_f12)) < 25.0f) {
|
||||
sp7E = 4;
|
||||
var_s1 = 0;
|
||||
if (GetCourse() == GetFrappeSnowland()) {
|
||||
if (IsFrappeSnowland()) {
|
||||
var_v0->soundEffects |= 0x01000000;
|
||||
} else {
|
||||
var_v0->soundEffects |= 0x400000;
|
||||
@@ -3466,7 +3466,7 @@ void func_8000F628(void) {
|
||||
D_80163050[i] = 0;
|
||||
D_80162FF8[i] = 0;
|
||||
D_80163010[i] = 0;
|
||||
if (GetCourse() != GetPodiumCeremony()) {
|
||||
if (!IsPodiumCeremony()) {
|
||||
func_8000B95C(i, 0, 0);
|
||||
}
|
||||
//! todo: @BUG this doesn't seem right. This variable is metadata.
|
||||
@@ -3551,7 +3551,7 @@ void func_8000F628(void) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((gDemoUseController == 1) && (GetCourse() != GetPodiumCeremony())) {
|
||||
if ((gDemoUseController == 1) && (!IsPodiumCeremony())) {
|
||||
for (i = 0; i < NUM_PLAYERS; i++) {
|
||||
D_80163330[i] = 0;
|
||||
}
|
||||
@@ -3635,7 +3635,7 @@ void func_800100F0(s32 pathIndex) {
|
||||
if (CM_GetProps()->AIMaximumSeparation >= 1.0f) {
|
||||
pathDest = D_80164550[pathIndex];
|
||||
bInvalidPath = 1;
|
||||
if (GetCourse() != GetPodiumCeremony()) {
|
||||
if (!IsPodiumCeremony()) {
|
||||
|
||||
TrackWaypoint* pathSrc = CM_GetProps()->PathTable2[pathIndex];
|
||||
if (pathSrc == NULL) {
|
||||
@@ -3879,7 +3879,7 @@ void func_80010E6C(s32 pathIndex) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
if (GetCourse() == GetPodiumCeremony()) {
|
||||
if (IsPodiumCeremony()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -3982,11 +3982,11 @@ s32 func_80011014(TrackWaypoint* pathDest, TrackWaypoint* path, s32 numPathPoint
|
||||
var_f20_2 = var_f28;
|
||||
} else {
|
||||
|
||||
if (GetCourse() == GetRainbowRoad()) {
|
||||
if (IsRainbowRoad()) {
|
||||
if (var_f20_2 < (var_f28 - 15.0)) {
|
||||
var_f20_2 = (f32) var_f28 - 15.0;
|
||||
}
|
||||
} else if (GetCourse() == GetWarioStadium()) {
|
||||
} else if (IsWarioStadium()) {
|
||||
if ((var_s0 >= 1140) && (var_s0 <= 1152)) {
|
||||
var_f20_2 = var_f28;
|
||||
} else {
|
||||
@@ -3994,7 +3994,7 @@ s32 func_80011014(TrackWaypoint* pathDest, TrackWaypoint* path, s32 numPathPoint
|
||||
var_f20_2 = (f32) (var_f28 - 4.0);
|
||||
}
|
||||
}
|
||||
} else if (GetCourse() == GetDkJungle()) {
|
||||
} else if (IsDkJungle()) {
|
||||
if ((var_s0 > 204) && (var_s0 < 220)) {
|
||||
var_f20_2 = var_f28;
|
||||
} else {
|
||||
@@ -4628,7 +4628,7 @@ void func_80013054(void) {
|
||||
|
||||
void check_ai_crossing_distance(s32 playerId) {
|
||||
bStopAICrossing[playerId] = 0;
|
||||
if (GetCourse() == GetKalimariDesert()) {
|
||||
if (IsKalimariDesert()) {
|
||||
if ((!(D_801631E0[playerId] != 0)) ||
|
||||
(set_vehicle_render_distance_flags(gPlayers[playerId].pos, TRAIN_CROSSING_AI_DISTANCE, 0))) {
|
||||
|
||||
@@ -5819,7 +5819,7 @@ void func_80016C3C(UNUSED s32 playerId, UNUSED f32 arg1, s32 cameraId) {
|
||||
D_80164688[cameraId] = -0.1f;
|
||||
}
|
||||
D_80163DD8[cameraId] = 0;
|
||||
if (GetCourse() == GetYoshiValley()) {
|
||||
if (IsYoshiValley()) {
|
||||
D_80163DD8[cameraId] = random_int(4U);
|
||||
D_80164688[cameraId] = 0.0f;
|
||||
}
|
||||
@@ -5892,7 +5892,7 @@ void func_80017054(Camera* camera, UNUSED Player* player, UNUSED s32 index, s32
|
||||
D_80163238 = playerId;
|
||||
sp56 = gNearestWaypointByCameraId[cameraId];
|
||||
gNearestWaypointByCameraId[cameraId] = func_8000D33C(camera->pos[0], camera->pos[1], camera->pos[2], gNearestWaypointByCameraId[cameraId], pathIndex);
|
||||
// if (GetCourse() == GetYoshiValley()) {
|
||||
// if (IsYoshiValley()) {
|
||||
if (gCurrentCourseId == 4) {
|
||||
if ((sp56 != gNearestWaypointByCameraId[cameraId]) && (gNearestWaypointByCameraId[cameraId] == 1)) {
|
||||
pathIndex = (D_80163DD8[cameraId] = random_int(4U));
|
||||
@@ -6574,7 +6574,7 @@ void func_80019D2C(Camera* camera, Player* player, s32 arg2) {
|
||||
s32 nearestWaypoint;
|
||||
|
||||
playerId = camera->playerId;
|
||||
if ((D_80163378 != 0) && (GetCourse() == GetLuigiRaceway())) {
|
||||
if ((D_80163378 != 0) && (IsLuigiRaceway())) {
|
||||
calculate_camera_up_vector(camera, arg2);
|
||||
nearestWaypoint = gNearestWaypointByPlayerId[playerId];
|
||||
if (((nearestWaypoint >= 0x65) && (nearestWaypoint < 0xFA)) ||
|
||||
@@ -6719,7 +6719,7 @@ void func_8001A220(UNUSED s32 arg0, s32 cameraId) {
|
||||
}
|
||||
|
||||
s32 func_8001A310(s32 waypoint, s32 arg1) {
|
||||
if ((GetCourse() == GetBowsersCastle()) && (arg1 != 0) && (waypoint >= 0xE7) && (waypoint < 0x1C2)) {
|
||||
if ((IsBowsersCastle()) && (arg1 != 0) && (waypoint >= 0xE7) && (waypoint < 0x1C2)) {
|
||||
arg1 = 0;
|
||||
}
|
||||
return arg1;
|
||||
@@ -7500,7 +7500,7 @@ void func_8001BE78(void) {
|
||||
void func_8001C05C(void) {
|
||||
init_segment_racing();
|
||||
gCurrentCourseId = COURSE_AWARD_CEREMONY;
|
||||
SetCourseByClass(GetPodiumCeremony());
|
||||
SelectPodiumCeremony();
|
||||
D_8016347C = 0;
|
||||
D_8016347E = 0;
|
||||
D_80163480 = 0;
|
||||
@@ -7573,7 +7573,7 @@ void func_8001C14C(void) {
|
||||
}
|
||||
|
||||
void render_bomb_karts_wrap(s32 cameraId) {
|
||||
if (GetCourse() == GetPodiumCeremony()) {
|
||||
if (IsPodiumCeremony()) {
|
||||
if (gBombKarts[0].waypointIndex >= 16) {
|
||||
render_bomb_karts(PLAYER_FOUR);
|
||||
}
|
||||
|
||||
+53
-53
@@ -778,7 +778,7 @@ void render_object_for_player(s32 cameraId) {
|
||||
}
|
||||
|
||||
void render_snowing_effect(s32 playerId) {
|
||||
if (GetCourse() == GetFrappeSnowland()) {
|
||||
if (IsFrappeSnowland()) {
|
||||
if (gGamestate != 9) {
|
||||
if ((D_8015F894 == 0) && (gPlayerCountSelection1 == 1)) {
|
||||
render_object_snowflakes_particles();
|
||||
@@ -1563,7 +1563,7 @@ void func_8005A3C0(void) {
|
||||
}
|
||||
|
||||
void func_8005A71C(void) {
|
||||
// if (GetCourse() == GetBowsersCastle()) {
|
||||
// if (IsBowsersCastle()) {
|
||||
// func_80081210();
|
||||
//}
|
||||
}
|
||||
@@ -2596,7 +2596,7 @@ void func_8005CB60(s32 playerId, s32 lapCount) {
|
||||
case 1: /* switch 1 */
|
||||
CM_ActivateSecondLapLakitu(playerId); // func_80079084(playerId);
|
||||
func_800C9060(playerId, SOUND_ARG_LOAD(0x19, 0x00, 0xF0, 0x15));
|
||||
if ((GetCourse() == GetLuigiRaceway()) && (D_80165898 == 0) &&
|
||||
if ((IsLuigiRaceway()) && (D_80165898 == 0) &&
|
||||
(gModeSelection != (s32) TIME_TRIALS)) {
|
||||
D_80165898 = 1;
|
||||
}
|
||||
@@ -2618,7 +2618,7 @@ void func_8005CB60(s32 playerId, s32 lapCount) {
|
||||
if (D_8018D114 == 2) {
|
||||
D_80165800[playerId] = 0;
|
||||
}
|
||||
if (GetCourse() == GetYoshiValley()) {
|
||||
if (IsYoshiValley()) {
|
||||
playerHUD[playerId].unk_81 = 1;
|
||||
}
|
||||
playerHUD[playerId].lap1CompletionTimeX = 0x0140;
|
||||
@@ -2935,22 +2935,22 @@ void func_8005DAF4(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||
func_8005D794(player, &player->unk_258[10 + arg1], var_f2, var_f12, var_f14, (s8) surfaceType,
|
||||
(s8) var_t3);
|
||||
func_8005D7D8(&player->unk_258[10 + arg1], 2, 0.46f);
|
||||
if ((GetCourse() == GetChocoMountain()) || (GetCourse() == GetRoyalRaceway())) {
|
||||
if ((IsChocoMountain()) || (IsRoyalRaceway())) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 1, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetKalimariDesert()) {
|
||||
if (IsKalimariDesert()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 7, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetMooMooFarm()) {
|
||||
if (IsMooMooFarm()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 8, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetWarioStadium()) {
|
||||
if (IsWarioStadium()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 9, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetYoshiValley()) {
|
||||
if (IsYoshiValley()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 10, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetDkJungle()) {
|
||||
if (IsDkJungle()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 11, 0, 0x0080);
|
||||
}
|
||||
player->unk_258[10 + arg1].unk_03A = random_int(0x0010U);
|
||||
@@ -2959,22 +2959,22 @@ void func_8005DAF4(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||
func_8005D794(player, &player->unk_258[10 + arg1], var_f2, var_f12, var_f14, (s8) surfaceType,
|
||||
(s8) var_t3);
|
||||
func_8005D7D8(&player->unk_258[10 + arg1], 2, 0.46f);
|
||||
if ((GetCourse() == GetChocoMountain()) || (GetCourse() == GetRoyalRaceway())) {
|
||||
if ((IsChocoMountain()) || (IsRoyalRaceway())) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 1, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetKalimariDesert()) {
|
||||
if (IsKalimariDesert()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 7, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetMooMooFarm()) {
|
||||
if (IsMooMooFarm()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 8, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetWarioStadium()) {
|
||||
if (IsWarioStadium()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 9, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetYoshiValley()) {
|
||||
if (IsYoshiValley()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 10, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetDkJungle()) {
|
||||
if (IsDkJungle()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 11, 0, 0x0080);
|
||||
}
|
||||
player->unk_258[10 + arg1].unk_03A = random_int(0x0010U);
|
||||
@@ -3201,44 +3201,44 @@ void func_8005ED48(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||
((player->unk_258[10 + arg2].unk_01E > 0) || (player->unk_258[10 + arg2].unk_01C == 0))) {
|
||||
func_8005D794(player, &player->unk_258[10 + arg1], var_f0, var_f2, var_f12, surfaceType, var_t3);
|
||||
func_8005D7D8(&player->unk_258[10 + arg1], 5, 0.46f);
|
||||
if ((GetCourse() == GetChocoMountain()) || (GetCourse() == GetRoyalRaceway())) {
|
||||
if ((IsChocoMountain()) || (IsRoyalRaceway())) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 1, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetKalimariDesert()) {
|
||||
if (IsKalimariDesert()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 7, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetMooMooFarm()) {
|
||||
if (IsMooMooFarm()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 8, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetWarioStadium()) {
|
||||
if (IsWarioStadium()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 9, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetYoshiValley()) {
|
||||
if (IsYoshiValley()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 10, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetDkJungle()) {
|
||||
if (IsDkJungle()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 11, 0, 0x0080);
|
||||
}
|
||||
player->unk_258[10 + arg1].unk_03A = random_int(0x0010U);
|
||||
} else if (player->unk_258[10 + arg2].unk_01E > 0) {
|
||||
func_8005D794(player, &player->unk_258[10 + arg1], var_f0, var_f2, var_f12, surfaceType, var_t3);
|
||||
func_8005D7D8(&player->unk_258[10 + arg1], 5, 0.46f);
|
||||
if ((GetCourse() == GetChocoMountain()) || (GetCourse() == GetRoyalRaceway())) {
|
||||
if ((IsChocoMountain()) || (IsRoyalRaceway())) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 1, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetKalimariDesert()) {
|
||||
if (IsKalimariDesert()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 7, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetMooMooFarm()) {
|
||||
if (IsMooMooFarm()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 8, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetWarioStadium()) {
|
||||
if (IsWarioStadium()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 9, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetYoshiValley()) {
|
||||
if (IsYoshiValley()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 0x000A, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetDkJungle()) {
|
||||
if (IsDkJungle()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 0x000B, 0, 0x0080);
|
||||
}
|
||||
player->unk_258[10 + arg1].unk_03A = random_int(0x0010U);
|
||||
@@ -3402,44 +3402,44 @@ void func_8005F90C(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||
((player->unk_258[10 + arg2].unk_01E > 0) || (player->unk_258[10 + arg2].unk_01C == 0))) {
|
||||
func_8005D794(player, &player->unk_258[10 + arg1], var_f0, var_f2, var_f12, surfaceType, var_t1);
|
||||
func_8005D7D8(&player->unk_258[10 + arg1], 4, 0.46f);
|
||||
if ((GetCourse() == GetChocoMountain()) || (GetCourse() == GetRoyalRaceway())) {
|
||||
if ((IsChocoMountain()) || (IsRoyalRaceway())) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 1, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetKalimariDesert()) {
|
||||
if (IsKalimariDesert()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 7, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetMooMooFarm()) {
|
||||
if (IsMooMooFarm()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 8, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetWarioStadium()) {
|
||||
if (IsWarioStadium()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 9, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetYoshiValley()) {
|
||||
if (IsYoshiValley()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 0x000A, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetDkJungle()) {
|
||||
if (IsDkJungle()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 0x000B, 0, 0x0080);
|
||||
}
|
||||
player->unk_258[10 + arg1].unk_03A = random_int(0x0010U);
|
||||
} else if (player->unk_258[10 + arg2].unk_01E > 0) {
|
||||
func_8005D794(player, &player->unk_258[10 + arg1], var_f0, var_f2, var_f12, surfaceType, var_t1);
|
||||
func_8005D7D8(&player->unk_258[10 + arg1], 4, 0.46f);
|
||||
if ((GetCourse() == GetChocoMountain()) || (GetCourse() == GetRoyalRaceway())) {
|
||||
if ((IsChocoMountain()) || (IsRoyalRaceway())) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 1, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetKalimariDesert()) {
|
||||
if (IsKalimariDesert()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 7, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetMooMooFarm()) {
|
||||
if (IsMooMooFarm()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 8, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetWarioStadium()) {
|
||||
if (IsWarioStadium()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 9, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetYoshiValley()) {
|
||||
if (IsYoshiValley()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 0x000A, 0, 0x0080);
|
||||
}
|
||||
if (GetCourse() == GetDkJungle()) {
|
||||
if (IsDkJungle()) {
|
||||
func_8005DAD8(&player->unk_258[10 + arg1], 0x000B, 0, 0x0080);
|
||||
}
|
||||
player->unk_258[10 + arg1].unk_03A = random_int(0x0010U);
|
||||
@@ -3638,13 +3638,13 @@ void func_800608E0(Player* player, s16 arg1, UNUSED s32 arg2, s8 arg3, UNUSED s8
|
||||
var_f0 = 0.0f;
|
||||
}
|
||||
sp4C = (D_801652A0[arg3] - player->pos[1]) - 3.0f;
|
||||
if ((player->unk_0DE & 1) && (GetCourse() != GetKoopaTroopaBeach())) {
|
||||
if ((player->unk_0DE & 1) && (IsKoopaTroopaBeach())) {
|
||||
var_f0 = 2.5f;
|
||||
sp4C = (f32) ((f64) (D_801652A0[arg3] - player->pos[1]) + 0.1);
|
||||
}
|
||||
func_8005D794(player, &player->unk_258[arg1], 0.0f, 0.0f, 0.0f, (s8) 0, (s8) 0);
|
||||
func_8005D7D8(&player->unk_258[arg1], 3, var_f0);
|
||||
if ((GetCourse() == GetBowsersCastle()) || (GetCourse() == GetBigDonut())) {
|
||||
if ((IsBowsersCastle()) || (IsBigDonut())) {
|
||||
func_8005D800(&player->unk_258[arg1], 0, 0x00AF);
|
||||
} else {
|
||||
func_8005D800(&player->unk_258[arg1], 0x00FFFFFF, 0x00CF);
|
||||
@@ -3658,7 +3658,7 @@ void func_800608E0(Player* player, s16 arg1, UNUSED s32 arg2, s8 arg3, UNUSED s8
|
||||
}
|
||||
|
||||
void func_80060B14(Player* player, s16 arg1, s32 arg2, s8 arg3, s8 arg4) {
|
||||
if ((GetCourse() != GetSkyscraper()) && (GetCourse() != GetRainbowRoad())) {
|
||||
if ((GetCourse() != GetSkyscraper()) && (!IsRainbowRoad())) {
|
||||
if ((arg1 == 0) && ((player->unk_258[arg2].unk_01E > 0) || (player->unk_258[arg2].unk_01C == 0))) {
|
||||
func_800608E0(player, arg1, arg2, arg3, arg4);
|
||||
} else if (player->unk_258[arg2].unk_01E > 0) {
|
||||
@@ -3674,10 +3674,10 @@ void func_80060BCC(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8
|
||||
f32 sp48;
|
||||
f32 sp44;
|
||||
|
||||
if (GetCourse() == GetSkyscraper()) {
|
||||
if (IsSkyscraper()) {
|
||||
return;
|
||||
}
|
||||
if (GetCourse() == GetRainbowRoad()) {
|
||||
if (IsRainbowRoad()) {
|
||||
return;
|
||||
}
|
||||
sp54 = random_int(0x0168U) - 0xB4;
|
||||
@@ -3712,7 +3712,7 @@ void func_80060F50(Player* player, s16 arg1, UNUSED s32 arg2, s8 arg3, UNUSED s8
|
||||
func_8005D794(player, &player->unk_258[arg1], 0.0f, 0.0f, 0.0f, 0, 0);
|
||||
func_8005D7D8(&player->unk_258[arg1], 5, 4.0f);
|
||||
|
||||
if ((GetCourse() == GetBowsersCastle()) || (GetCourse() == GetBigDonut())) {
|
||||
if ((IsBowsersCastle()) || (IsBigDonut())) {
|
||||
func_8005D800(&player->unk_258[arg1], 0xFF0000, 0xFF);
|
||||
} else {
|
||||
func_8005D800(&player->unk_258[arg1], 0xFFFFFF, 0xFF);
|
||||
@@ -4058,22 +4058,22 @@ void func_800624D8(Player* player, UNUSED s32 arg1, UNUSED s32 arg2, UNUSED s8 a
|
||||
switch (player->surfaceType) {
|
||||
case DIRT:
|
||||
for (var_s1 = 0; var_s1 < 10; var_s1++) {
|
||||
if ((GetCourse() == GetChocoMountain()) || (GetCourse() == GetRoyalRaceway())) {
|
||||
if ((IsChocoMountain()) || (IsRoyalRaceway())) {
|
||||
func_8005DAD8(&player->unk_258[0x1E + var_s1], 1, 0, 0x00A8);
|
||||
}
|
||||
if (GetCourse() == GetKalimariDesert()) {
|
||||
if (IsKalimariDesert()) {
|
||||
func_8005DAD8(&player->unk_258[0x1E + var_s1], 7, 0, 0x00A8);
|
||||
}
|
||||
if (GetCourse() == GetMooMooFarm()) {
|
||||
if (IsMooMooFarm()) {
|
||||
func_8005DAD8(&player->unk_258[0x1E + var_s1], 8, 0, 0x00A8);
|
||||
}
|
||||
if (GetCourse() == GetWarioStadium()) {
|
||||
if (IsWarioStadium()) {
|
||||
func_8005DAD8(&player->unk_258[0x1E + var_s1], 9, 0, 0x00A8);
|
||||
}
|
||||
if (GetCourse() == GetYoshiValley()) {
|
||||
if (IsYoshiValley()) {
|
||||
func_8005DAD8(&player->unk_258[0x1E + var_s1], 0x000A, 0, 0x00A8);
|
||||
}
|
||||
if (GetCourse() == GetDkJungle()) {
|
||||
if (IsDkJungle()) {
|
||||
func_8005DAD8(&player->unk_258[0x1E + var_s1], 0x000B, 0, 0x00A8);
|
||||
}
|
||||
func_80062484(player, &player->unk_258[0x1E + var_s1], var_s1);
|
||||
@@ -4628,7 +4628,7 @@ void func_80064184(Player* player, s16 arg1, s8 arg2, UNUSED s8 arg3) {
|
||||
f32 sp3C;
|
||||
|
||||
sp40 = D_801652A0[arg2] - player->pos[1] - 3.0f;
|
||||
if (((player->unk_0DE & 1) != 0) && (GetCourse() != GetKoopaTroopaBeach())) {
|
||||
if (((player->unk_0DE & 1) != 0) && (IsKoopaTroopaBeach())) {
|
||||
sp40 = D_801652A0[arg2] - player->pos[1] + 0.1;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -191,7 +191,7 @@ void func_8006F008(void) {
|
||||
xOrientation = -1.0f;
|
||||
}
|
||||
|
||||
if (GetCourse() != GetPodiumCeremony()) {
|
||||
if (!IsPodiumCeremony()) {
|
||||
func_8006EEE8((s32) gCurrentCourseId);
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ void func_8006F008(void) {
|
||||
switch(gPlayerCount) {
|
||||
case 2:
|
||||
// Set X coord
|
||||
if (GetCourse() != GetToadsTurnpike()) {
|
||||
if (!IsToadsTurnpike()) {
|
||||
CM_GetProps()->Minimap.Pos[PLAYER_ONE].X = 265;
|
||||
CM_GetProps()->Minimap.Pos[PLAYER_TWO].X = 265;
|
||||
} else {
|
||||
|
||||
+2
-2
@@ -977,7 +977,7 @@ void func_80089020(s32 playerId, f32* arg1) {
|
||||
var_f2 = -*arg1;
|
||||
}
|
||||
if (player->effects & 0xC0) {
|
||||
if (GetCourse() == GetSherbetLand()) {
|
||||
if (IsSherbetLand()) {
|
||||
if (var_f2 <= 0.5) {
|
||||
var_f0 = 0.025f;
|
||||
} else if (var_f2 <= 2.0) {
|
||||
@@ -998,7 +998,7 @@ void func_80089020(s32 playerId, f32* arg1) {
|
||||
var_f0 = 0.25f;
|
||||
}
|
||||
}
|
||||
} else if (GetCourse() == GetSherbetLand()) {
|
||||
} else if (IsSherbetLand()) {
|
||||
if (var_f2 <= 0.5) {
|
||||
var_f0 = 0.025f;
|
||||
} else if (var_f2 <= 2.0) {
|
||||
|
||||
+8
-8
@@ -1698,7 +1698,7 @@ void func_80090178(Player* player, s8 playerId, Vec3f arg2, Vec3f arg3) {
|
||||
f32 sp18[4] = { 10.0f, -10.0f, -575.0f, 575.0f };
|
||||
f32 sp08[4] = { 575.0f, -575.0f, 10.0f, -10.0f };
|
||||
|
||||
if (GetCourse() == GetYoshiValley()) {
|
||||
if (IsYoshiValley()) {
|
||||
test = player->nearestWaypointId;
|
||||
temp_v1 = &D_80164550[gCopyPathIndexByPlayerId[playerId]][test];
|
||||
arg2[0] = temp_v1->posX;
|
||||
@@ -1710,28 +1710,28 @@ void func_80090178(Player* player, s8 playerId, Vec3f arg2, Vec3f arg3) {
|
||||
arg3[0] = temp_v1->posX;
|
||||
arg3[1] = temp_v1->posY;
|
||||
arg3[2] = temp_v1->posZ;
|
||||
} else if (GetCourse() == GetBlockFort()) {
|
||||
} else if (IsBlockFort()) {
|
||||
arg2[0] = spF8[playerId];
|
||||
arg2[1] = 0.0f;
|
||||
arg2[2] = spE8[playerId];
|
||||
arg3[0] = spD8[playerId];
|
||||
arg3[1] = 0.0f;
|
||||
arg3[2] = spC8[playerId];
|
||||
} else if (GetCourse() == GetSkyscraper()) {
|
||||
} else if (IsSkyscraper()) {
|
||||
arg2[0] = spB8[playerId];
|
||||
arg2[1] = 480.0f;
|
||||
arg2[2] = spA8[playerId];
|
||||
arg3[0] = sp98[playerId];
|
||||
arg3[1] = 480.0f;
|
||||
arg3[2] = sp88[playerId];
|
||||
} else if (GetCourse() == GetDoubleDeck()) {
|
||||
} else if (IsDoubleDeck()) {
|
||||
arg2[0] = sp78[playerId];
|
||||
arg2[1] = 0.0f;
|
||||
arg2[2] = sp68[playerId];
|
||||
arg3[0] = sp58[playerId];
|
||||
arg3[1] = 0.0f;
|
||||
arg3[2] = sp48[playerId];
|
||||
} else if (GetCourse() == GetBigDonut()) {
|
||||
} else if (IsBigDonut()) {
|
||||
arg2[0] = sp38[playerId];
|
||||
arg2[1] = 200.0f;
|
||||
arg2[2] = sp28[playerId];
|
||||
@@ -1799,14 +1799,14 @@ void func_80090868(Player* player) {
|
||||
player->unk_0CA |= 2;
|
||||
player->unk_0C8 = 0;
|
||||
if ((player->unk_0DE & 1) == 1) {
|
||||
if ((GetCourse() == GetBowsersCastle()) || (GetCourse() == GetBigDonut())) {
|
||||
if ((IsBowsersCastle()) || (IsBigDonut())) {
|
||||
player->unk_0CA |= 0x1000;
|
||||
} else {
|
||||
player->unk_0CA |= 0x2000;
|
||||
}
|
||||
|
||||
if ((GetCourse() == GetSherbetLand()) || (GetCourse() == GetSkyscraper()) ||
|
||||
(GetCourse() == GetRainbowRoad())) {
|
||||
if ((IsSherbetLand()) || (IsSkyscraper()) ||
|
||||
(IsRainbowRoad())) {
|
||||
player->unk_0CA &= ~0x3000;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ void setup_podium_ceremony(void) {
|
||||
Camera* camera = &cameras[0];
|
||||
|
||||
gCurrentCourseId = COURSE_ROYAL_RACEWAY;
|
||||
SetCourseByClass(GetPodiumCeremony());
|
||||
SelectPodiumCeremony();
|
||||
D_800DC5B4 = (u16) 1;
|
||||
gIsMirrorMode = 0;
|
||||
gGotoMenu = 0xFFFF;
|
||||
|
||||
+14
-3
@@ -90,20 +90,31 @@ void World::SetCourse(const char* name) {
|
||||
//! @todo Use content dictionary instead
|
||||
for (size_t i = 0; i < Courses.size(); i++) {
|
||||
if (strcmp(Courses[i]->Props.Name, name) == 0) {
|
||||
CurrentCourse = Courses[i];
|
||||
CurrentCourse = Courses[i].get();
|
||||
break;
|
||||
}
|
||||
}
|
||||
std::runtime_error("SetCourse() Course name not found in Courses list");
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void World::SetCourseByType() {
|
||||
for (const auto& course : Courses) {
|
||||
if (dynamic_cast<T*>(course.get())) {
|
||||
CurrentCourse = course.get();
|
||||
return;
|
||||
}
|
||||
}
|
||||
printf("World::SetCourseByType() No course by the type found");
|
||||
}
|
||||
|
||||
void World::NextCourse() {
|
||||
if (CourseIndex < Courses.size() - 1) {
|
||||
CourseIndex++;
|
||||
} else {
|
||||
CourseIndex = 0;
|
||||
}
|
||||
gWorldInstance.CurrentCourse = Courses[CourseIndex];
|
||||
gWorldInstance.CurrentCourse = Courses[CourseIndex].get();
|
||||
}
|
||||
|
||||
void World::PreviousCourse() {
|
||||
@@ -112,7 +123,7 @@ void World::PreviousCourse() {
|
||||
} else {
|
||||
CourseIndex = Courses.size() - 1;
|
||||
}
|
||||
gWorldInstance.CurrentCourse = Courses[CourseIndex];
|
||||
gWorldInstance.CurrentCourse = Courses[CourseIndex].get();
|
||||
}
|
||||
|
||||
AActor* World::AddActor(AActor* actor) {
|
||||
|
||||
@@ -94,6 +94,8 @@ public:
|
||||
|
||||
// These are only for browsing through the course list
|
||||
void SetCourse(const char*);
|
||||
template<typename T>
|
||||
void SetCourseByType();
|
||||
void NextCourse(void);
|
||||
void PreviousCourse(void);
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ void OBombKart::Tick() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (((Unk_4A != 1) || (GetCourse() == GetPodiumCeremony()))) {
|
||||
if (((Unk_4A != 1) || (IsPodiumCeremony()))) {
|
||||
newPos[0] = Pos[0];
|
||||
newPos[1] = Pos[1];
|
||||
newPos[2] = Pos[2];
|
||||
@@ -128,7 +128,7 @@ void OBombKart::Tick() {
|
||||
bounceTimer = BounceTimer;
|
||||
circleTimer = CircleTimer;
|
||||
if ((state != States::DISABLED) && (state != States::EXPLODE)) {
|
||||
if (GetCourse() == GetPodiumCeremony()) {
|
||||
if (IsPodiumCeremony()) {
|
||||
if (D_8016347E == 1) {
|
||||
player = gPlayerFour;
|
||||
temp_f0 = newPos[0] - player->pos[0];
|
||||
@@ -152,7 +152,7 @@ void OBombKart::Tick() {
|
||||
if ((((temp_f0 * temp_f0) + (temp_f2 * temp_f2)) + (temp_f12 * temp_f12)) < 25.0f) {
|
||||
state = States::EXPLODE;
|
||||
circleTimer = 0;
|
||||
if (GetCourse() == GetFrappeSnowland()) {
|
||||
if (IsFrappeSnowland()) {
|
||||
player->soundEffects |= 0x01000000;
|
||||
} else {
|
||||
player->soundEffects |= 0x400000;
|
||||
@@ -346,7 +346,7 @@ void OBombKart::Draw(s32 cameraId) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetCourse() == GetPodiumCeremony()) {
|
||||
if (IsPodiumCeremony()) {
|
||||
if ((_idx == 0) && (WaypointIndex < 16)) {
|
||||
return;
|
||||
} else {
|
||||
|
||||
@@ -139,7 +139,7 @@ void OGrandPrixBalloons::func_80074924(s32 objectIndex) {
|
||||
object = &gObjectList[objectIndex];
|
||||
object->sizeScaling = 0.15f;
|
||||
|
||||
if (GetCourse() == GetMarioRaceway()) {
|
||||
if (IsMarioRaceway) {
|
||||
sp2C = random_int(0x00C8U);
|
||||
sp28 = random_int(_numBalloons3);
|
||||
sp24 = random_int(0x0096U);
|
||||
@@ -147,7 +147,7 @@ void OGrandPrixBalloons::func_80074924(s32 objectIndex) {
|
||||
object->origin_pos[0] = (f32) ((((f64) Pos.x + 100.0) - (f64) sp2C) * (f64) xOrientation);
|
||||
object->origin_pos[1] = (f32) (Pos.y + sp28);
|
||||
object->origin_pos[2] = (f32) (((f64) Pos.z + 200.0) - (f64) sp24);
|
||||
} else if (GetCourse() == GetRoyalRaceway()) {
|
||||
} else if (IsRoyalRaceway()) {
|
||||
sp2C = random_int(0x0168U);
|
||||
sp28 = random_int(_numBalloons3);
|
||||
sp24 = random_int(0x00B4U);
|
||||
@@ -155,7 +155,7 @@ void OGrandPrixBalloons::func_80074924(s32 objectIndex) {
|
||||
object->origin_pos[0] = (f32) ((((f64) Pos.x + 180.0) - (f64) sp2C) * (f64) xOrientation);
|
||||
object->origin_pos[1] = (f32) (Pos.y + sp28);
|
||||
object->origin_pos[2] = (f32) (((f64) Pos.z + 200.0) - (f64) sp24);
|
||||
} else if (GetCourse() == GetLuigiRaceway()) {
|
||||
} else if (IsLuigiRaceway()) {
|
||||
sp2C = random_int(0x012CU);
|
||||
sp28 = random_int(_numBalloons3);
|
||||
sp24 = random_int(0x0096U);
|
||||
|
||||
@@ -21,7 +21,7 @@ OHotAirBalloon::OHotAirBalloon(const FVector& pos) {
|
||||
D_80165898 = 0;
|
||||
|
||||
// Spawn balloon on second lap.
|
||||
if (GetCourse() == GetLuigiRaceway()) {
|
||||
if (IsLuigiRaceway()) {
|
||||
_visible = (bool*)&D_80165898;
|
||||
} else { // Spawn balloon on race start
|
||||
bool mod = true;
|
||||
|
||||
@@ -297,7 +297,7 @@ void OLakitu::func_800729EC(s32 objectIndex) {
|
||||
D_8018D2BC = 1;
|
||||
D_8018D2A4 = 1;
|
||||
|
||||
if (GetCourse() != GetYoshiValley()) {
|
||||
if (!IsYoshiValley()) {
|
||||
for (i = 0; i < gPlayerCount; i++) {
|
||||
playerHUD[i].unk_81 = temp_v1;
|
||||
}
|
||||
@@ -366,7 +366,7 @@ void OLakitu::func_800797AC(s32 playerId) {
|
||||
|
||||
objectIndex = gIndexLakituList[playerId];
|
||||
player = &gPlayerOne[playerId];
|
||||
//if ((GetCourse() == GetSherbetLand()) && (player->unk_0CA & 1)) {
|
||||
//if ((IsSherbetLand()) && (player->unk_0CA & 1)) {
|
||||
if ((CM_GetProps()->LakituTowType == LakituTowType::ICE) && (player->unk_0CA & 1)) {
|
||||
init_object(objectIndex, 7);
|
||||
player->unk_0CA |= 0x10;
|
||||
|
||||
@@ -32,7 +32,7 @@ OTrashBin::OTrashBin(const FVector& pos, const IRotator& rotation, f32 scale, OT
|
||||
|
||||
init_object(_objectIndex, 0);
|
||||
|
||||
if (GetCourse() != GetBansheeBoardwalk()) {
|
||||
if (!IsBansheeBoardwalk()) {
|
||||
_drawBin = true;
|
||||
}
|
||||
}
|
||||
|
||||
+8
-8
@@ -4889,7 +4889,7 @@ void func_8009CE64(s32 arg0) {
|
||||
gCCSelection = (s32) 1;
|
||||
switch (gNextDemoId) { /* switch 4 */
|
||||
case 0: /* switch 4 */
|
||||
SetCourseByClass(GetMarioRaceway());
|
||||
SelectMarioRaceway();
|
||||
CM_SetCup(GetFlowerCup());
|
||||
SetCupCursorPosition(COURSE_FOUR);
|
||||
gCurrentCourseId = 0;
|
||||
@@ -4900,7 +4900,7 @@ void func_8009CE64(s32 arg0) {
|
||||
gModeSelection = 0;
|
||||
break;
|
||||
case 1: /* switch 4 */
|
||||
SetCourseByClass(GetLuigiRaceway());
|
||||
SelectLuigiRaceway();
|
||||
CM_SetCup(GetMushroomCup());
|
||||
SetCupCursorPosition(COURSE_ONE);
|
||||
gCurrentCourseId = (s16) 1;
|
||||
@@ -4912,7 +4912,7 @@ void func_8009CE64(s32 arg0) {
|
||||
gModeSelection = 2;
|
||||
break;
|
||||
case 2: /* switch 4 */
|
||||
SetCourseByClass(GetKalimariDesert());
|
||||
SelectKalimariDesert();
|
||||
CM_SetCup(GetMushroomCup());
|
||||
SetCupCursorPosition(COURSE_FOUR);
|
||||
gCurrentCourseId = COURSE_KALIMARI_DESERT;
|
||||
@@ -4923,7 +4923,7 @@ void func_8009CE64(s32 arg0) {
|
||||
gModeSelection = 0;
|
||||
break;
|
||||
case 3: /* switch 4 */
|
||||
SetCourseByClass(GetWarioStadium());
|
||||
SelectWarioStadium();
|
||||
CM_SetCup(GetStarCup());
|
||||
SetCupCursorPosition(COURSE_ONE);
|
||||
gCurrentCourseId = 0x000E;
|
||||
@@ -4936,7 +4936,7 @@ void func_8009CE64(s32 arg0) {
|
||||
gModeSelection = (s32) 2;
|
||||
break;
|
||||
case 4: /* switch 4 */
|
||||
SetCourseByClass(GetBowsersCastle());
|
||||
SelectBowsersCastle();
|
||||
CM_SetCup(GetStarCup());
|
||||
SetCupCursorPosition(COURSE_FOUR);
|
||||
gCurrentCourseId = 2;
|
||||
@@ -4947,7 +4947,7 @@ void func_8009CE64(s32 arg0) {
|
||||
gModeSelection = 0;
|
||||
break;
|
||||
case 5: /* switch 4 */
|
||||
SetCourseByClass(GetSherbetLand());
|
||||
SelectSherbetLand();
|
||||
CM_SetCup(GetFlowerCup());
|
||||
SetCupCursorPosition(COURSE_TWO);
|
||||
gCurrentCourseId = 0x000C;
|
||||
@@ -5034,8 +5034,8 @@ void func_8009CE64(s32 arg0) {
|
||||
}
|
||||
}
|
||||
|
||||
if (GetCourse() == GetBlockFort() || GetCourse() == GetSkyscraper() || GetCourse() == GetDoubleDeck() ||
|
||||
GetCourse() == GetBigDonut()) {
|
||||
if (IsBlockFort() || IsSkyscraper() || IsDoubleDeck() ||
|
||||
IsBigDonut()) {
|
||||
|
||||
gModeSelection = BATTLE;
|
||||
if (gPlayerCountSelection1 == 1) {
|
||||
|
||||
+10
-10
@@ -1711,7 +1711,7 @@ void func_8002C11C(Player* player) {
|
||||
}
|
||||
|
||||
void func_8002C17C(Player* player, s8 playerId) {
|
||||
if (GetCourse() == GetYoshiValley()) {
|
||||
if (IsYoshiValley()) {
|
||||
if ((player->collision.surfaceDistance[2] >= 600.0f) && (D_80165330[playerId] == 0)) {
|
||||
D_80165330[playerId] = 1;
|
||||
gCopyNearestWaypointByPlayerId[playerId] = gNearestWaypointByPlayerId[playerId];
|
||||
@@ -1724,7 +1724,7 @@ void func_8002C17C(Player* player, s8 playerId) {
|
||||
D_80165330[playerId] = 0;
|
||||
}
|
||||
}
|
||||
} else if (GetCourse() == GetFrappeSnowland()) {
|
||||
} else if (IsFrappeSnowland()) {
|
||||
if ((player->surfaceType == SNOW_OFFROAD) && (D_80165330[playerId] == 0)) {
|
||||
D_80165330[playerId] = 1;
|
||||
gCopyNearestWaypointByPlayerId[playerId] = gNearestWaypointByPlayerId[playerId];
|
||||
@@ -1734,7 +1734,7 @@ void func_8002C17C(Player* player, s8 playerId) {
|
||||
gCopyNearestWaypointByPlayerId[playerId] = gNearestWaypointByPlayerId[playerId];
|
||||
gCopyPathIndexByPlayerId[playerId] = gPathIndexByPlayerId[playerId];
|
||||
}
|
||||
} else if (GetCourse() == GetRoyalRaceway()) {
|
||||
} else if (IsRoyalRaceway()) {
|
||||
if (((player->effects & BOOST_RAMP_ASPHALT_EFFECT) != 0) && (D_80165330[playerId] == 0)) {
|
||||
D_80165330[playerId] = 1;
|
||||
gCopyNearestWaypointByPlayerId[playerId] = gNearestWaypointByPlayerId[playerId];
|
||||
@@ -1744,7 +1744,7 @@ void func_8002C17C(Player* player, s8 playerId) {
|
||||
gCopyNearestWaypointByPlayerId[playerId] = gNearestWaypointByPlayerId[playerId];
|
||||
gCopyPathIndexByPlayerId[playerId] = gPathIndexByPlayerId[playerId];
|
||||
}
|
||||
} else if (GetCourse() == GetRainbowRoad()) {
|
||||
} else if (IsRainbowRoad()) {
|
||||
if ((player->collision.surfaceDistance[2] >= 600.0f) && (D_80165330[playerId] == 0)) {
|
||||
D_80165330[playerId] = 1;
|
||||
gCopyNearestWaypointByPlayerId[playerId] = gNearestWaypointByPlayerId[playerId];
|
||||
@@ -1778,9 +1778,9 @@ void func_8002C4F8(Player* player, s8 arg1) {
|
||||
if ((player->unk_0DE & 4) != 4) {
|
||||
player->unk_0DE |= 8;
|
||||
player->unk_0DE |= 4;
|
||||
if ((GetCourse() != GetKoopaTroopaBeach()) && (GetCourse() != GetSkyscraper()) &&
|
||||
(GetCourse() != GetRainbowRoad()) && ((player->type & PLAYER_HUMAN) == PLAYER_HUMAN)) {
|
||||
if ((GetCourse() == GetBowsersCastle()) || (GetCourse() == GetBigDonut())) {
|
||||
if ((IsKoopaTroopaBeach()) && (GetCourse() != GetSkyscraper()) &&
|
||||
(!IsRainbowRoad()) && ((player->type & PLAYER_HUMAN) == PLAYER_HUMAN)) {
|
||||
if ((IsBowsersCastle()) || (IsBigDonut())) {
|
||||
func_800C9060((u8) arg1, 0x1900801CU);
|
||||
} else {
|
||||
func_800C9060((u8) arg1, 0x19008008U);
|
||||
@@ -1788,8 +1788,8 @@ void func_8002C4F8(Player* player, s8 arg1) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((GetCourse() == GetKoopaTroopaBeach()) || (GetCourse() == GetSkyscraper()) ||
|
||||
(GetCourse() == GetRainbowRoad())) {
|
||||
if ((IsKoopaTroopaBeach()) || (IsSkyscraper()) ||
|
||||
(IsRainbowRoad())) {
|
||||
player->unk_0DE &= ~0x000C;
|
||||
}
|
||||
if ((player->boundingBoxSize < (D_801652A0[arg1] - player->pos[1])) &&
|
||||
@@ -2254,7 +2254,7 @@ void func_8002D268(Player* player, UNUSED Camera* camera, s8 screenId, s8 player
|
||||
player->unk_DB4.unkC = 1.5f;
|
||||
if (((player->type & PLAYER_HUMAN) == PLAYER_HUMAN) &&
|
||||
((player->type & PLAYER_INVISIBLE_OR_BOMB) != PLAYER_INVISIBLE_OR_BOMB)) {
|
||||
if (((player->unk_0C2 < 0xB) && (player->unk_0C2 >= 4)) && (GetCourse() == GetBowsersCastle())) {
|
||||
if (((player->unk_0C2 < 0xB) && (player->unk_0C2 >= 4)) && (IsBowsersCastle())) {
|
||||
func_800CADD0((u8) playerId, player->unk_0C2 / 14.0f);
|
||||
} else {
|
||||
func_800CADD0((u8) playerId, player->unk_0C2 / 25.0f);
|
||||
|
||||
+46
-86
@@ -177,7 +177,7 @@ void CustomEngineInit() {
|
||||
// gWorldInstance.AddCup(gBattleCup);
|
||||
|
||||
/* Set default course; mario raceway */
|
||||
gWorldInstance.CurrentCourse = gMarioRaceway;
|
||||
SelectMarioRaceway();
|
||||
gWorldInstance.CurrentCup = gMushroomCup;
|
||||
gWorldInstance.CurrentCup->CursorPosition = 3;
|
||||
gWorldInstance.CupIndex = 0;
|
||||
@@ -276,7 +276,7 @@ void SetCourseById(s32 course) {
|
||||
return;
|
||||
}
|
||||
gWorldInstance.CourseIndex = course;
|
||||
gWorldInstance.CurrentCourse = gWorldInstance.Courses[gWorldInstance.CourseIndex];
|
||||
gWorldInstance.CurrentCourse = gWorldInstance.Courses[gWorldInstance.CourseIndex].get();
|
||||
}
|
||||
|
||||
void CM_VehicleCollision(s32 playerId, Player* player) {
|
||||
@@ -724,91 +724,51 @@ f32 CM_GetWaterLevel(Vec3f pos, Collision* collision) {
|
||||
return gWorldInstance.CurrentCourse->GetWaterLevel(fPos, collision);
|
||||
}
|
||||
|
||||
bool GetMarioRaceway(Course* course) {
|
||||
if (dynamic_cast<MarioRaceway*>(gWorldInstance.CurrentCourse)) {
|
||||
return true; // It's Mario Raceway
|
||||
}
|
||||
}
|
||||
// clang-format off
|
||||
bool IsMarioRaceway() { return dynamic_cast<MarioRaceway*>(gWorldInstance.CurrentCourse) != nullptr; }
|
||||
bool IsLuigiRaceway() { return dynamic_cast<LuigiRaceway*>(gWorldInstance.CurrentCourse) != nullptr; }
|
||||
bool IsChocoMountain() { return dynamic_cast<ChocoMountain*>(gWorldInstance.CurrentCourse) != nullptr; }
|
||||
bool IsBowsersCastle() { return dynamic_cast<BowsersCastle*>(gWorldInstance.CurrentCourse) != nullptr; }
|
||||
bool IsBansheeBoardwalk() { return dynamic_cast<BansheeBoardwalk*>(gWorldInstance.CurrentCourse) != nullptr; }
|
||||
bool IsYoshiValley() { return dynamic_cast<YoshiValley*>(gWorldInstance.CurrentCourse) != nullptr; }
|
||||
bool IsFrappeSnowland() { return dynamic_cast<FrappeSnowland*>(gWorldInstance.CurrentCourse) != nullptr; }
|
||||
bool IsKoopaTroopaBeach() { return dynamic_cast<KoopaTroopaBeach*>(gWorldInstance.CurrentCourse) != nullptr; }
|
||||
bool IsRoyalRaceway() { return dynamic_cast<RoyalRaceway*>(gWorldInstance.CurrentCourse) != nullptr; }
|
||||
bool IsMooMooFarm() { return dynamic_cast<MooMooFarm*>(gWorldInstance.CurrentCourse) != nullptr; }
|
||||
bool IsToadsTurnpike() { return dynamic_cast<ToadsTurnpike*>(gWorldInstance.CurrentCourse) != nullptr; }
|
||||
bool IsKalimariDesert() { return dynamic_cast<KalimariDesert*>(gWorldInstance.CurrentCourse) != nullptr; }
|
||||
bool IsSherbetLand() { return dynamic_cast<SherbetLand*>(gWorldInstance.CurrentCourse) != nullptr; }
|
||||
bool IsRainbowRoad() { return dynamic_cast<RainbowRoad*>(gWorldInstance.CurrentCourse) != nullptr; }
|
||||
bool IsWarioStadium() { return dynamic_cast<WarioStadium*>(gWorldInstance.CurrentCourse) != nullptr; }
|
||||
bool IsBlockFort() { return dynamic_cast<BlockFort*>(gWorldInstance.CurrentCourse) != nullptr; }
|
||||
bool IsSkyscraper() { return dynamic_cast<Skyscraper*>(gWorldInstance.CurrentCourse) != nullptr; }
|
||||
bool IsDoubleDeck() { return dynamic_cast<DoubleDeck*>(gWorldInstance.CurrentCourse) != nullptr; }
|
||||
bool IsDkJungle() { return dynamic_cast<DKJungle*>(gWorldInstance.CurrentCourse) != nullptr; }
|
||||
bool IsBigDonut() { return dynamic_cast<BigDonut*>(gWorldInstance.CurrentCourse) != nullptr; }
|
||||
bool IsPodiumCeremony() { return dynamic_cast<PodiumCeremony*>(gWorldInstance.CurrentCourse) != nullptr; }
|
||||
|
||||
void* GetLuigiRaceway(void) {
|
||||
return gLuigiRaceway;
|
||||
}
|
||||
|
||||
void* GetChocoMountain(void) {
|
||||
return gChocoMountain;
|
||||
}
|
||||
|
||||
void* GetBowsersCastle(void) {
|
||||
return gBowsersCastle;
|
||||
}
|
||||
|
||||
void* GetBansheeBoardwalk(void) {
|
||||
return gBansheeBoardwalk;
|
||||
}
|
||||
|
||||
void* GetYoshiValley(void) {
|
||||
return gYoshiValley;
|
||||
}
|
||||
|
||||
void* GetFrappeSnowland(void) {
|
||||
return gFrappeSnowland;
|
||||
}
|
||||
|
||||
void* GetKoopaTroopaBeach(void) {
|
||||
return gKoopaTroopaBeach;
|
||||
}
|
||||
|
||||
void* GetRoyalRaceway(void) {
|
||||
return gRoyalRaceway;
|
||||
}
|
||||
|
||||
void* GetMooMooFarm(void) {
|
||||
return gMooMooFarm;
|
||||
}
|
||||
|
||||
void* GetToadsTurnpike(void) {
|
||||
return gToadsTurnpike;
|
||||
}
|
||||
|
||||
void* GetKalimariDesert(void) {
|
||||
return gKalimariDesert;
|
||||
}
|
||||
|
||||
void* GetSherbetLand(void) {
|
||||
return gSherbetLand;
|
||||
}
|
||||
|
||||
void* GetRainbowRoad(void) {
|
||||
return gRainbowRoad;
|
||||
}
|
||||
|
||||
void* GetWarioStadium(void) {
|
||||
return gWarioStadium;
|
||||
}
|
||||
|
||||
void* GetBlockFort(void) {
|
||||
return gBlockFort;
|
||||
}
|
||||
|
||||
void* GetSkyscraper(void) {
|
||||
return gSkyscraper;
|
||||
}
|
||||
|
||||
void* GetDoubleDeck(void) {
|
||||
return gDoubleDeck;
|
||||
}
|
||||
|
||||
void* GetDkJungle(void) {
|
||||
return gDkJungle;
|
||||
}
|
||||
|
||||
void* GetBigDonut(void) {
|
||||
return gBigDonut;
|
||||
}
|
||||
|
||||
void* GetPodiumCeremony(void) {
|
||||
return gPodiumCeremony;
|
||||
}
|
||||
void SelectMarioRaceway() { gWorldInstance.SetCourseByType<MarioRaceway>(); }
|
||||
void SelectLuigiRaceway() { gWorldInstance.SetCourseByType<LuigiRaceway>(); }
|
||||
void SelectChocoMountain() { gWorldInstance.SetCourseByType<ChocoMountain>(); }
|
||||
void SelectBowsersCastle() { gWorldInstance.SetCourseByType<BowsersCastle>(); }
|
||||
void SelectBansheeBoardwalk() { gWorldInstance.SetCourseByType<BansheeBoardwalk>(); }
|
||||
void SelectYoshiValley() { gWorldInstance.SetCourseByType<YoshiValley>(); }
|
||||
void SelectFrappeSnowland() { gWorldInstance.SetCourseByType<FrappeSnowland>(); }
|
||||
void SelectKoopaTroopaBeach() { gWorldInstance.SetCourseByType<KoopaTroopaBeach>(); }
|
||||
void SelectRoyalRaceway() { gWorldInstance.SetCourseByType<RoyalRaceway>(); }
|
||||
void SelectMooMooFarm() { gWorldInstance.SetCourseByType<MooMooFarm>(); }
|
||||
void SelectToadsTurnpike() { gWorldInstance.SetCourseByType<ToadsTurnpike>(); }
|
||||
void SelectKalimariDesert() { gWorldInstance.SetCourseByType<KalimariDesert>(); }
|
||||
void SelectSherbetLand() { gWorldInstance.SetCourseByType<SherbetLand>(); }
|
||||
void SelectRainbowRoad() { gWorldInstance.SetCourseByType<RainbowRoad>(); }
|
||||
void SelectWarioStadium() { gWorldInstance.SetCourseByType<WarioStadium>(); }
|
||||
void SelectBlockFort() { gWorldInstance.SetCourseByType<BlockFort>(); }
|
||||
void SelectSkyscraper() { gWorldInstance.SetCourseByType<Skyscraper>(); }
|
||||
void SelectDoubleDeck() { gWorldInstance.SetCourseByType<DoubleDeck>(); }
|
||||
void SelectDkJungle() { gWorldInstance.SetCourseByType<DKJungle>(); }
|
||||
void SelectBigDonut() { gWorldInstance.SetCourseByType<BigDonut>(); }
|
||||
void SelectPodiumCeremony() { gWorldInstance.SetCourseByType<PodiumCeremony>(); }
|
||||
// clang-format on
|
||||
|
||||
void* GetMushroomCup(void) {
|
||||
return gMushroomCup;
|
||||
|
||||
+21
-41
@@ -155,47 +155,27 @@ void CM_CleanWorld(void);
|
||||
|
||||
f32 CM_GetWaterLevel(Vec3f pos, Collision* collision);
|
||||
|
||||
void* GetMarioRaceway(void);
|
||||
|
||||
void* GetLuigiRaceway(void);
|
||||
|
||||
void* GetChocoMountain(void);
|
||||
|
||||
void* GetBowsersCastle(void);
|
||||
|
||||
void* GetBansheeBoardwalk(void);
|
||||
|
||||
void* GetYoshiValley(void);
|
||||
|
||||
void* GetFrappeSnowland(void);
|
||||
|
||||
void* GetKoopaTroopaBeach(void);
|
||||
|
||||
void* GetRoyalRaceway(void);
|
||||
|
||||
void* GetMooMooFarm(void);
|
||||
|
||||
void* GetToadsTurnpike(void);
|
||||
|
||||
void* GetKalimariDesert(void);
|
||||
|
||||
void* GetSherbetLand(void);
|
||||
|
||||
void* GetRainbowRoad(void);
|
||||
|
||||
void* GetWarioStadium(void);
|
||||
|
||||
void* GetBlockFort(void);
|
||||
|
||||
void* GetSkyscraper(void);
|
||||
|
||||
void* GetDoubleDeck(void);
|
||||
|
||||
void* GetDkJungle(void);
|
||||
|
||||
void* GetBigDonut(void);
|
||||
|
||||
void* GetPodiumCeremony(void);
|
||||
bool IsMarioRaceway();
|
||||
bool IsLuigiRaceway();
|
||||
bool IsChocoMountain();
|
||||
bool IsBowsersCastle();
|
||||
bool IsBansheeBoardwalk();
|
||||
bool IsYoshiValley();
|
||||
bool IsFrappeSnowland();
|
||||
bool IsKoopaTroopaBeach();
|
||||
bool IsRoyalRaceway();
|
||||
bool IsMooMooFarm();
|
||||
bool IsToadsTurnpike();
|
||||
bool IsKalimariDesert();
|
||||
bool IsSherbetLand();
|
||||
bool IsRainbowRoad();
|
||||
bool IsWarioStadium();
|
||||
bool IsBlockFort();
|
||||
bool IsSkyscraper();
|
||||
bool IsDoubleDeck();
|
||||
bool IsDkJungle();
|
||||
bool IsBigDonut();
|
||||
bool IsPodiumCeremony();
|
||||
|
||||
void* GetMushroomCup(void);
|
||||
|
||||
|
||||
+12
-12
@@ -944,15 +944,15 @@ void spawn_foliage(struct ActorSpawnData* actor) {
|
||||
position[2] = var_s3->pos[2];
|
||||
position[1] = var_s3->pos[1];
|
||||
|
||||
if (GetCourse() == GetMarioRaceway()) {
|
||||
if (IsMarioRaceway) {
|
||||
actorType = 2;
|
||||
} else if (GetCourse() == GetBowsersCastle()) {
|
||||
} else if (IsBowsersCastle()) {
|
||||
actorType = 0x0021;
|
||||
} else if (GetCourse() == GetYoshiValley()) {
|
||||
} else if (IsYoshiValley()) {
|
||||
actorType = 3;
|
||||
} else if (GetCourse() == GetFrappeSnowland()) {
|
||||
} else if (IsFrappeSnowland()) {
|
||||
actorType = 0x001D;
|
||||
} else if (GetCourse() == GetRoyalRaceway()) {
|
||||
} else if (IsRoyalRaceway()) {
|
||||
switch (var_s3->signedSomeId) {
|
||||
case 6:
|
||||
actorType = 0x001C;
|
||||
@@ -961,11 +961,11 @@ void spawn_foliage(struct ActorSpawnData* actor) {
|
||||
actorType = 4;
|
||||
break;
|
||||
}
|
||||
} else if (GetCourse() == GetLuigiRaceway()) {
|
||||
} else if (IsLuigiRaceway()) {
|
||||
actorType = 0x001A;
|
||||
} else if (GetCourse() == GetMooMooFarm()) {
|
||||
} else if (IsMooMooFarm()) {
|
||||
actorType = 0x0013;
|
||||
} else if (GetCourse() == GetKalimariDesert()) {
|
||||
} else if (IsKalimariDesert()) {
|
||||
switch (var_s3->signedSomeId) {
|
||||
case 5:
|
||||
actorType = 0x001E;
|
||||
@@ -1706,8 +1706,8 @@ bool collision_tree(Player* player, struct Actor* actor) {
|
||||
actorPos[0] = actor->pos[0];
|
||||
actorPos[1] = actor->pos[1];
|
||||
actorPos[2] = actor->pos[2];
|
||||
if (((GetCourse() == GetMarioRaceway()) || (GetCourse() == GetYoshiValley()) ||
|
||||
(GetCourse() == GetRoyalRaceway()) || (GetCourse() == GetLuigiRaceway())) &&
|
||||
if (((IsMarioRaceway) || (IsYoshiValley()) ||
|
||||
(IsRoyalRaceway()) || (IsLuigiRaceway())) &&
|
||||
(player->unk_094 > 1.0f)) {
|
||||
spawn_leaf(actorPos, 0);
|
||||
}
|
||||
@@ -2571,9 +2571,9 @@ void render_course_actors(struct UnkStruct_800DC5EC* arg0) {
|
||||
}
|
||||
FrameInterpolation_RecordCloseChild();
|
||||
}
|
||||
if (GetCourse() == GetMooMooFarm()) {
|
||||
if (IsMooMooFarm()) {
|
||||
render_cows(camera, sBillBoardMtx);
|
||||
} else if (GetCourse() == GetDkJungle()) {
|
||||
} else if (IsDkJungle()) {
|
||||
render_palm_trees(camera, sBillBoardMtx);
|
||||
}
|
||||
}
|
||||
|
||||
+17
-20
@@ -804,43 +804,40 @@ void func_802B6D58(Mat4 arg0, Vec3f arg1, Vec3f arg2) {
|
||||
}
|
||||
|
||||
void mtxf_multiplication(Mat4 dest, Mat4 mat1, Mat4 mat2) {
|
||||
Mat4 product;
|
||||
FrameInterpolation_RecordMatrixMult(dest, dest, 0);
|
||||
|
||||
FrameInterpolation_RecordMatrixMult(dest, product, 0);
|
||||
|
||||
product[0][0] =
|
||||
dest[0][0] =
|
||||
(mat1[0][0] * mat2[0][0]) + (mat1[0][1] * mat2[1][0]) + (mat1[0][2] * mat2[2][0]) + (mat1[0][3] * mat2[3][0]);
|
||||
product[0][1] =
|
||||
dest[0][1] =
|
||||
(mat1[0][0] * mat2[0][1]) + (mat1[0][1] * mat2[1][1]) + (mat1[0][2] * mat2[2][1]) + (mat1[0][3] * mat2[3][1]);
|
||||
product[0][2] =
|
||||
dest[0][2] =
|
||||
(mat1[0][0] * mat2[0][2]) + (mat1[0][1] * mat2[1][2]) + (mat1[0][2] * mat2[2][2]) + (mat1[0][3] * mat2[3][2]);
|
||||
product[0][3] =
|
||||
dest[0][3] =
|
||||
(mat1[0][0] * mat2[0][3]) + (mat1[0][1] * mat2[1][3]) + (mat1[0][2] * mat2[2][3]) + (mat1[0][3] * mat2[3][3]);
|
||||
product[1][0] =
|
||||
dest[1][0] =
|
||||
(mat1[1][0] * mat2[0][0]) + (mat1[1][1] * mat2[1][0]) + (mat1[1][2] * mat2[2][0]) + (mat1[1][3] * mat2[3][0]);
|
||||
product[1][1] =
|
||||
dest[1][1] =
|
||||
(mat1[1][0] * mat2[0][1]) + (mat1[1][1] * mat2[1][1]) + (mat1[1][2] * mat2[2][1]) + (mat1[1][3] * mat2[3][1]);
|
||||
product[1][2] =
|
||||
dest[1][2] =
|
||||
(mat1[1][0] * mat2[0][2]) + (mat1[1][1] * mat2[1][2]) + (mat1[1][2] * mat2[2][2]) + (mat1[1][3] * mat2[3][2]);
|
||||
product[1][3] =
|
||||
dest[1][3] =
|
||||
(mat1[1][0] * mat2[0][3]) + (mat1[1][1] * mat2[1][3]) + (mat1[1][2] * mat2[2][3]) + (mat1[1][3] * mat2[3][3]);
|
||||
product[2][0] =
|
||||
dest[2][0] =
|
||||
(mat1[2][0] * mat2[0][0]) + (mat1[2][1] * mat2[1][0]) + (mat1[2][2] * mat2[2][0]) + (mat1[2][3] * mat2[3][0]);
|
||||
product[2][1] =
|
||||
dest[2][1] =
|
||||
(mat1[2][0] * mat2[0][1]) + (mat1[2][1] * mat2[1][1]) + (mat1[2][2] * mat2[2][1]) + (mat1[2][3] * mat2[3][1]);
|
||||
product[2][2] =
|
||||
dest[2][2] =
|
||||
(mat1[2][0] * mat2[0][2]) + (mat1[2][1] * mat2[1][2]) + (mat1[2][2] * mat2[2][2]) + (mat1[2][3] * mat2[3][2]);
|
||||
product[2][3] =
|
||||
dest[2][3] =
|
||||
(mat1[2][0] * mat2[0][3]) + (mat1[2][1] * mat2[1][3]) + (mat1[2][2] * mat2[2][3]) + (mat1[2][3] * mat2[3][3]);
|
||||
product[3][0] =
|
||||
dest[3][0] =
|
||||
(mat1[3][0] * mat2[0][0]) + (mat1[3][1] * mat2[1][0]) + (mat1[3][2] * mat2[2][0]) + (mat1[3][3] * mat2[3][0]);
|
||||
product[3][1] =
|
||||
dest[3][1] =
|
||||
(mat1[3][0] * mat2[0][1]) + (mat1[3][1] * mat2[1][1]) + (mat1[3][2] * mat2[2][1]) + (mat1[3][3] * mat2[3][1]);
|
||||
product[3][2] =
|
||||
dest[3][2] =
|
||||
(mat1[3][0] * mat2[0][2]) + (mat1[3][1] * mat2[1][2]) + (mat1[3][2] * mat2[2][2]) + (mat1[3][3] * mat2[3][2]);
|
||||
product[3][3] =
|
||||
dest[3][3] =
|
||||
(mat1[3][0] * mat2[0][3]) + (mat1[3][1] * mat2[1][3]) + (mat1[3][2] * mat2[2][3]) + (mat1[3][3] * mat2[3][3]);
|
||||
mtxf_copy_n_element((s32*) dest, (s32*) product, 16);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -897,9 +897,9 @@ void func_8028FCBC(void) {
|
||||
func_8028F914();
|
||||
if (D_802BA034 == 1.0f) {
|
||||
if (gActiveScreenMode != SCREEN_MODE_1P) {
|
||||
if (GetCourse() == GetLuigiRaceway()) {
|
||||
if (IsLuigiRaceway()) {
|
||||
func_802A7940();
|
||||
} else if (GetCourse() == GetWarioStadium()) {
|
||||
} else if (IsWarioStadium()) {
|
||||
func_802A7728();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ void render_course_segments(const char* addr[], struct UnkStruct_800DC5EC* arg1)
|
||||
index = sp1E;
|
||||
}
|
||||
} else {
|
||||
if (GetCourse() == GetBowsersCastle()) {
|
||||
if (IsBowsersCastle()) {
|
||||
if ((temp_v0_3 >= 0x11) && (temp_v0_3 < 0x18)) {
|
||||
index = temp_v0_3;
|
||||
} else if ((temp_v0_3 == 255) && (sp1E != 255)) {
|
||||
@@ -143,7 +143,7 @@ void render_course_segments(const char* addr[], struct UnkStruct_800DC5EC* arg1)
|
||||
} else {
|
||||
index = arg1->pathCounter;
|
||||
}
|
||||
} else if (GetCourse() == GetChocoMountain()) {
|
||||
} else if (IsChocoMountain()) {
|
||||
if ((temp_v0_3 >= 0xE) && (temp_v0_3 < 0x16)) {
|
||||
index = temp_v0_3;
|
||||
} else if ((temp_v0_3 == 255) && (sp1E != 255)) {
|
||||
@@ -176,7 +176,7 @@ void render_course_segments(const char* addr[], struct UnkStruct_800DC5EC* arg1)
|
||||
index = ((index - 1) * 4) + direction;
|
||||
gSPDisplayList(gDisplayListHead++, addr[index]);
|
||||
|
||||
if (CVarGetInteger("gDisableLod", 1) == 1 && (GetCourse() == GetBowsersCastle()) &&
|
||||
if (CVarGetInteger("gDisableLod", 1) == 1 && (IsBowsersCastle()) &&
|
||||
(index < 20 || index > 99)) { // always render higher version of bowser statue
|
||||
gDisplayListHead--;
|
||||
gSPDisplayList(gDisplayListHead++, d_course_bowsers_castle_dl_9148); // use credit version of the course
|
||||
|
||||
@@ -407,7 +407,7 @@ void func_802A487C(Vtx* arg0, UNUSED struct UnkStruct_800DC5EC* arg1, UNUSED s32
|
||||
UNUSED f32* arg4) {
|
||||
|
||||
init_rdp();
|
||||
if (GetCourse() != GetRainbowRoad()) {
|
||||
if (!IsRainbowRoad()) {
|
||||
|
||||
gDPSetRenderMode(gDisplayListHead++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_ZBUFFER | G_LIGHTING);
|
||||
@@ -485,7 +485,7 @@ void func_802A4A0C(Vtx* vtx, struct UnkStruct_800DC5EC* arg1, UNUSED s32 arg2, U
|
||||
gSPMatrix(gDisplayListHead++, &gIdentityMatrix2, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPVertex(gDisplayListHead++, &vtx[0], 4, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 0, 3, 1, 0, 1, 3, 2, 0);
|
||||
if (GetCourse() == GetRainbowRoad()) {
|
||||
if (IsRainbowRoad()) {
|
||||
gSPVertex(gDisplayListHead++, &vtx[4], 4, 0);
|
||||
gSP2Triangles(gDisplayListHead++, 0, 3, 1, 0, 1, 3, 2, 0);
|
||||
}
|
||||
|
||||
+12
-12
@@ -3013,7 +3013,7 @@ void draw_lap_count(s16 lapX, s16 lapY, s8 lap) {
|
||||
}
|
||||
|
||||
void func_8004FDB4(f32 arg0, f32 arg1, s16 arg2, s16 arg3, s16 characterId, s32 arg5, s32 arg6, s32 arg7, s32 arg8) {
|
||||
if ((GetCourse() == GetYoshiValley()) && (arg3 < 3) && (arg8 == 0)) {
|
||||
if ((IsYoshiValley()) && (arg3 < 3) && (arg8 == 0)) {
|
||||
func_80042330((s32) arg0, (s32) arg1, 0U, 1.0f);
|
||||
gSPDisplayList(gDisplayListHead++, D_0D007DB8);
|
||||
func_8004B35C(0x000000FF, 0x000000FF, 0x000000FF, D_8018D3E0);
|
||||
@@ -3320,7 +3320,7 @@ void func_80050E34(s32 playerId, s32 arg1) {
|
||||
spB8 = 0;
|
||||
}
|
||||
|
||||
if ((GetCourse() == GetYoshiValley()) && (lapCount < 3)) {
|
||||
if ((IsYoshiValley()) && (lapCount < 3)) {
|
||||
gSPDisplayList(gDisplayListHead++, D_0D007DB8);
|
||||
gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_portrait_bomb_kart_and_question_mark);
|
||||
rsp_load_texture(common_texture_portrait_question_mark, 0x00000020, 0x00000020);
|
||||
@@ -3550,16 +3550,16 @@ void func_80051C60(s16 arg0, s32 arg1) {
|
||||
Object* object;
|
||||
|
||||
if (D_801658FE == 0) {
|
||||
if (GetCourse() == GetKoopaTroopaBeach()) {
|
||||
if (IsKoopaTroopaBeach()) {
|
||||
var_s5 = arg0;
|
||||
} else if (GetCourse() == GetMooMooFarm()) {
|
||||
} else if (IsMooMooFarm()) {
|
||||
var_s5 = arg0 - 16;
|
||||
} else if (GetCourse() == GetYoshiValley()) {
|
||||
} else if (IsYoshiValley()) {
|
||||
var_s5 = arg0 - 16;
|
||||
} else {
|
||||
var_s5 = arg0 + 16;
|
||||
}
|
||||
} else if (GetCourse() == GetKoopaTroopaBeach()) {
|
||||
} else if (IsKoopaTroopaBeach()) {
|
||||
var_s5 = arg0 * 2;
|
||||
} else {
|
||||
var_s5 = arg0 + 32;
|
||||
@@ -3593,11 +3593,11 @@ void func_80051EF8(void) {
|
||||
s16 temp_a0;
|
||||
|
||||
temp_a0 = 0xF0 - D_800DC5EC->cameraHeight;
|
||||
if (GetCourse() == GetKoopaTroopaBeach()) {
|
||||
if (IsKoopaTroopaBeach()) {
|
||||
temp_a0 = temp_a0 - 0x30;
|
||||
} else if (GetCourse() == GetMooMooFarm()) {
|
||||
} else if (IsMooMooFarm()) {
|
||||
temp_a0 = temp_a0 - 0x40;
|
||||
} else if (GetCourse() == GetYoshiValley()) {
|
||||
} else if (IsYoshiValley()) {
|
||||
temp_a0 = temp_a0 - 0x40;
|
||||
} else {
|
||||
temp_a0 = temp_a0 - 0x30;
|
||||
@@ -3609,11 +3609,11 @@ void func_80051F9C(void) {
|
||||
s16 temp_a0;
|
||||
|
||||
temp_a0 = 0xF0 - D_800DC5F0->cameraHeight;
|
||||
if (GetCourse() == GetKoopaTroopaBeach()) {
|
||||
if (IsKoopaTroopaBeach()) {
|
||||
temp_a0 = temp_a0 - 0x30;
|
||||
} else if (GetCourse() == GetMooMooFarm()) {
|
||||
} else if (IsMooMooFarm()) {
|
||||
temp_a0 = temp_a0 - 0x40;
|
||||
} else if (GetCourse() == GetYoshiValley()) {
|
||||
} else if (IsYoshiValley()) {
|
||||
temp_a0 = temp_a0 - 0x40;
|
||||
} else {
|
||||
temp_a0 = temp_a0 - 0x30;
|
||||
|
||||
+3
-3
@@ -1278,7 +1278,7 @@ void change_player_color_effect_cmy(UNUSED Player* player, s8 arg1, s32 arg2, f3
|
||||
* Sort of an atmospheric effect.
|
||||
*/
|
||||
bool is_player_under_light_luigi_raceway(Player* player, s8 arg1) {
|
||||
if (GetCourse() == GetLuigiRaceway()) {
|
||||
if (IsLuigiRaceway()) {
|
||||
if (((gNearestWaypointByPlayerId[arg1] >= 0x14F) && (gNearestWaypointByPlayerId[arg1] < 0x158)) ||
|
||||
((gNearestWaypointByPlayerId[arg1] >= 0x15E) && (gNearestWaypointByPlayerId[arg1] < 0x164)) ||
|
||||
((gNearestWaypointByPlayerId[arg1] >= 0x169) && (gNearestWaypointByPlayerId[arg1] < 0x170)) ||
|
||||
@@ -1296,7 +1296,7 @@ bool is_player_under_light_luigi_raceway(Player* player, s8 arg1) {
|
||||
}
|
||||
|
||||
void render_light_environment_on_player(Player* player, s8 arg1) {
|
||||
if (GetCourse() == GetBowsersCastle()) {
|
||||
if (IsBowsersCastle()) {
|
||||
if (((gNearestWaypointByPlayerId[arg1] >= 0x15) && (gNearestWaypointByPlayerId[arg1] < 0x2A)) ||
|
||||
((gNearestWaypointByPlayerId[arg1] >= 0x14D) && (gNearestWaypointByPlayerId[arg1] < 0x15C)) ||
|
||||
((gNearestWaypointByPlayerId[arg1] >= 0x1D1) && (gNearestWaypointByPlayerId[arg1] < 0x1E4)) ||
|
||||
@@ -1319,7 +1319,7 @@ void render_light_environment_on_player(Player* player, s8 arg1) {
|
||||
change_player_color_effect_cmy(player, arg1, 0, 0.3f);
|
||||
D_80164B80[arg1] = 0;
|
||||
}
|
||||
} else if (GetCourse() == GetBansheeBoardwalk()) {
|
||||
} else if (IsBansheeBoardwalk()) {
|
||||
if (((gNearestWaypointByPlayerId[arg1] >= 0xD) && (gNearestWaypointByPlayerId[arg1] < 0x15)) ||
|
||||
((gNearestWaypointByPlayerId[arg1] >= 0x29) && (gNearestWaypointByPlayerId[arg1] < 0x39)) ||
|
||||
((gNearestWaypointByPlayerId[arg1] >= 0x46) && (gNearestWaypointByPlayerId[arg1] < 0x4E)) ||
|
||||
|
||||
+11
-11
@@ -729,7 +729,7 @@ void spawn_players_versus_two_player(f32* arg0, f32* arg1, f32 arg2) {
|
||||
}
|
||||
|
||||
void spawn_players_2p_battle(f32* arg0, f32* arg1, f32 arg2) {
|
||||
if (GetCourse() == GetBigDonut()) {
|
||||
if (IsBigDonut()) {
|
||||
spawn_player(gPlayerOne, 0, arg0[0], arg1[0], arg2, -16384.0f, gCharacterSelections[0],
|
||||
PLAYER_EXISTS | PLAYER_START_SEQUENCE | PLAYER_HUMAN);
|
||||
spawn_player(gPlayerTwo, 1, arg0[1], arg1[1], arg2, 16384.0f, gCharacterSelections[1],
|
||||
@@ -778,7 +778,7 @@ void func_8003B318(f32* arg0, f32* arg1, f32 arg2) {
|
||||
}
|
||||
|
||||
void spawn_players_3p_battle(f32* arg0, f32* arg1, f32 arg2) {
|
||||
if (GetCourse() == GetBigDonut()) {
|
||||
if (IsBigDonut()) {
|
||||
spawn_player(gPlayerOne, 0, arg0[0], arg1[0], arg2, -16384.0f, gCharacterSelections[0],
|
||||
PLAYER_EXISTS | PLAYER_START_SEQUENCE | PLAYER_HUMAN);
|
||||
spawn_player(gPlayerTwo, 1, arg0[1], arg1[1], arg2, 16384.0f, gCharacterSelections[1],
|
||||
@@ -830,7 +830,7 @@ void func_8003B870(f32* arg0, f32* arg1, f32 arg2) {
|
||||
}
|
||||
|
||||
void spawn_players_4p_battle(f32* arg0, f32* arg1, f32 arg2) {
|
||||
if (GetCourse() == GetBigDonut()) {
|
||||
if (IsBigDonut()) {
|
||||
spawn_player(gPlayerOne, 0, arg0[0], arg1[0], arg2, -16384.0f, gCharacterSelections[0],
|
||||
PLAYER_EXISTS | PLAYER_START_SEQUENCE | PLAYER_HUMAN);
|
||||
spawn_player(gPlayerTwo, 1, arg0[1], arg1[1], arg2, 16384.0f, gCharacterSelections[1],
|
||||
@@ -888,17 +888,17 @@ void func_8003C0F0(void) {
|
||||
|
||||
if (gModeSelection == BATTLE) {
|
||||
func_8000EEDC();
|
||||
} else if (GetCourse() != GetPodiumCeremony()) {
|
||||
} else if (!IsPodiumCeremony()) {
|
||||
func_8000F2DC();
|
||||
sp5E = (f32) D_80164550[0][0].posX;
|
||||
sp5C = (f32) D_80164550[0][0].posZ;
|
||||
sp5A = (f32) D_80164550[0][0].posY;
|
||||
if (GetCourse() == GetToadsTurnpike()) {
|
||||
if (IsToadsTurnpike()) {
|
||||
sp5E = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ((gModeSelection != BATTLE) && (GetCourse() != GetPodiumCeremony())) {
|
||||
if ((gModeSelection != BATTLE) && (!IsPodiumCeremony())) {
|
||||
switch (gActiveScreenMode) {
|
||||
case SCREEN_MODE_1P:
|
||||
switch (gModeSelection) {
|
||||
@@ -993,7 +993,7 @@ void func_8003C0F0(void) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else if (GetCourse() == GetBlockFort()) {
|
||||
} else if (IsBlockFort()) {
|
||||
switch (gActiveScreenMode) {
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL:
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
|
||||
@@ -1023,7 +1023,7 @@ void func_8003C0F0(void) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else if (GetCourse() == GetSkyscraper()) {
|
||||
} else if (IsSkyscraper()) {
|
||||
switch (gActiveScreenMode) {
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL:
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
|
||||
@@ -1053,7 +1053,7 @@ void func_8003C0F0(void) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else if (GetCourse() == GetDoubleDeck()) {
|
||||
} else if (IsDoubleDeck()) {
|
||||
switch (gActiveScreenMode) {
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL:
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
|
||||
@@ -1083,7 +1083,7 @@ void func_8003C0F0(void) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else if (GetCourse() == GetBigDonut()) {
|
||||
} else if (IsBigDonut()) {
|
||||
switch (gActiveScreenMode) {
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL:
|
||||
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
|
||||
@@ -1203,7 +1203,7 @@ void func_8003D080(void) {
|
||||
case SCREEN_MODE_1P:
|
||||
switch (gModeSelection) {
|
||||
case GRAND_PRIX:
|
||||
if (GetCourse() == GetToadsTurnpike()) {
|
||||
if (IsToadsTurnpike()) {
|
||||
camera_init(0.0f, player->pos[1], D_80165230[7], player->rotation[1], 8, 0);
|
||||
} else {
|
||||
camera_init((D_80165210[7] + D_80165210[6]) / 2, player->pos[1], D_80165230[7],
|
||||
|
||||
@@ -2106,19 +2106,19 @@ void init_object_leaf_particle(s32 objectIndex, Vec3f arg1, s32 num) {
|
||||
gObjectList[objectIndex].sizeScaling = 0.1f;
|
||||
gObjectList[objectIndex].surfaceHeight = arg1[1];
|
||||
|
||||
if (GetCourse() == GetMarioRaceway()) {
|
||||
if (IsMarioRaceway) {
|
||||
object_origin_pos_randomize_around_xyz(objectIndex, arg1[0], arg1[1] + 25.0, arg1[2], 0x14, 0x1E, 0x14);
|
||||
gObjectList[objectIndex].unk_034 = 1.5f;
|
||||
gObjectList[objectIndex].velocity[1] = 1.5f;
|
||||
} else if (GetCourse() == GetYoshiValley()) {
|
||||
} else if (IsYoshiValley()) {
|
||||
object_origin_pos_randomize_around_xyz(objectIndex, arg1[0], arg1[1] + 25.0, arg1[2], 0x14, 0x1E, 0x14);
|
||||
gObjectList[objectIndex].unk_034 = 2.0f;
|
||||
gObjectList[objectIndex].velocity[1] = 2.0f;
|
||||
} else if (GetCourse() == GetRoyalRaceway()) {
|
||||
} else if (IsRoyalRaceway()) {
|
||||
object_origin_pos_randomize_around_xyz(objectIndex, arg1[0], arg1[1] + 30.0, arg1[2], 0x10, 0x28, 0x10);
|
||||
gObjectList[objectIndex].unk_034 = 2.0f;
|
||||
gObjectList[objectIndex].velocity[1] = 2.0f;
|
||||
} else if (GetCourse() == GetLuigiRaceway()) {
|
||||
} else if (IsLuigiRaceway()) {
|
||||
object_origin_pos_randomize_around_xyz(objectIndex, arg1[0], arg1[1] + 25.0, arg1[2], 0x14, 0x1E, 0x14);
|
||||
gObjectList[objectIndex].unk_034 = 1.5f;
|
||||
gObjectList[objectIndex].velocity[1] = 1.0f;
|
||||
|
||||
Reference in New Issue
Block a user