summaryrefslogtreecommitdiff
path: root/src/engine/courses/MarioRaceway.cpp
diff options
context:
space:
mode:
authorKiritoDv <36680385+KiritoDv@users.noreply.github.com>2025-05-16 02:44:40 +0000
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2025-05-16 02:44:40 +0000
commitb53a5dbcfa24ef2aa4860b6d9512709976686de8 (patch)
tree441f2bb9c0bc8f955eb9289d19b13beab5c239c5 /src/engine/courses/MarioRaceway.cpp
parentbdf5ca8d603ae56ac275bebf9fde58ae72484d76 (diff)
clang formatclang-format
Diffstat (limited to 'src/engine/courses/MarioRaceway.cpp')
-rw-r--r--src/engine/courses/MarioRaceway.cpp99
1 files changed, 49 insertions, 50 deletions
diff --git a/src/engine/courses/MarioRaceway.cpp b/src/engine/courses/MarioRaceway.cpp
index 50af0d890..ccfe35921 100644
--- a/src/engine/courses/MarioRaceway.cpp
+++ b/src/engine/courses/MarioRaceway.cpp
@@ -11,29 +11,29 @@
#include "engine/objects/GrandPrixBalloons.h"
extern "C" {
- #include "main.h"
- #include "camera.h"
- #include "course_offsets.h"
- #include "code_800029B0.h"
- #include "render_courses.h"
- #include "code_8006E9C0.h"
- #include "code_80057C60.h"
- #include "defines.h"
- #include "math_util.h"
- #include "external.h"
- #include "code_80005FD0.h"
- #include "spawn_players.h"
- #include "render_objects.h"
- #include "assets/common_data.h"
- #include "save.h"
- #include "staff_ghosts.h"
- #include "actors.h"
- #include "mario_raceway_data.h"
- #include "collision.h"
- #include "memory.h"
- #include "courses/staff_ghost_data.h"
- #include "course.h"
- extern const char *mario_raceway_dls[];
+#include "main.h"
+#include "camera.h"
+#include "course_offsets.h"
+#include "code_800029B0.h"
+#include "render_courses.h"
+#include "code_8006E9C0.h"
+#include "code_80057C60.h"
+#include "defines.h"
+#include "math_util.h"
+#include "external.h"
+#include "code_80005FD0.h"
+#include "spawn_players.h"
+#include "render_objects.h"
+#include "assets/common_data.h"
+#include "save.h"
+#include "staff_ghosts.h"
+#include "actors.h"
+#include "mario_raceway_data.h"
+#include "collision.h"
+#include "memory.h"
+#include "courses/staff_ghost_data.h"
+#include "course.h"
+extern const char* mario_raceway_dls[];
}
const course_texture mario_raceway_textures[] = {
@@ -101,7 +101,7 @@ MarioRaceway::MarioRaceway() {
Props.NearPersp = 9.0f;
Props.FarPersp = 4500.0f;
- Props.PathSizes = {600, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
+ Props.PathSizes = { 600, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@@ -123,12 +123,12 @@ MarioRaceway::MarioRaceway() {
Props.D_0D009808[2] = 5.75f;
Props.D_0D009808[3] = 6.3333334f;
- Props.PathTable[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_mario_raceway_unknown_waypoints);
+ Props.PathTable[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_mario_raceway_unknown_waypoints);
Props.PathTable[1] = NULL;
Props.PathTable[2] = NULL;
Props.PathTable[3] = NULL;
- Props.PathTable2[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_mario_raceway_track_waypoints);
+ Props.PathTable2[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_mario_raceway_track_waypoints);
Props.PathTable2[1] = NULL;
Props.PathTable2[2] = NULL;
Props.PathTable2[3] = NULL;
@@ -137,36 +137,36 @@ MarioRaceway::MarioRaceway() {
Props.Clouds = gKalimariDesertClouds;
Props.CloudList = gLuigiRacewayClouds;
- Props.Skybox.TopRight = {0, 184, 248};
- Props.Skybox.BottomRight = {216, 232, 248};
- Props.Skybox.BottomLeft = {216, 232, 248};
- Props.Skybox.TopLeft = {0, 184, 248};
- Props.Skybox.FloorTopRight = {0, 0, 0};
- Props.Skybox.FloorBottomRight = {0, 0, 0};
- Props.Skybox.FloorBottomLeft = {0, 0, 0};
- Props.Skybox.FloorTopLeft = {0, 0, 0};
+ Props.Skybox.TopRight = { 0, 184, 248 };
+ Props.Skybox.BottomRight = { 216, 232, 248 };
+ Props.Skybox.BottomLeft = { 216, 232, 248 };
+ Props.Skybox.TopLeft = { 0, 184, 248 };
+ Props.Skybox.FloorTopRight = { 0, 0, 0 };
+ Props.Skybox.FloorBottomRight = { 0, 0, 0 };
+ Props.Skybox.FloorBottomLeft = { 0, 0, 0 };
+ Props.Skybox.FloorTopLeft = { 0, 0, 0 };
Props.Sequence = MusicSeq::MUSIC_SEQ_RACEWAYS_WARIO_STADIUM;
}
void MarioRaceway::Load() {
Course::Load();
- generate_collision_mesh_with_defaults(segmented_gfx_to_virtual((void*)0x07001140));
-
+ generate_collision_mesh_with_defaults(segmented_gfx_to_virtual((void*) 0x07001140));
+
// Generate pipe collision mesh
if (gScreenModeSelection == SCREEN_MODE_1P) {
// d_course_mario_raceway_packed_dl_8E8
- generate_collision_mesh_with_defaults(segmented_gfx_to_virtual((void*)0x070008E8));
+ generate_collision_mesh_with_defaults(segmented_gfx_to_virtual((void*) 0x070008E8));
} else {
if (CVarGetInteger("gDisableLod", 1) == true) {
- generate_collision_mesh_with_defaults(segmented_gfx_to_virtual((void*)0x070008E8));
+ generate_collision_mesh_with_defaults(segmented_gfx_to_virtual((void*) 0x070008E8));
} else {
// d_course_mario_raceway_packed_dl_2D68
- generate_collision_mesh_with_defaults(segmented_gfx_to_virtual((void*)0x07002D68));
+ generate_collision_mesh_with_defaults(segmented_gfx_to_virtual((void*) 0x07002D68));
}
}
- parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_mario_raceway_addr));
+ parse_course_displaylists((TrackSections*) LOAD_ASSET_RAW(d_course_mario_raceway_addr));
func_80295C6C();
Props.WaterLevel = gCourseMinY - 10.0f;
}
@@ -190,9 +190,9 @@ void MarioRaceway::BeginPlay() {
Vec3f velocity = { 0.0f, 0.0f, 0.0f };
Vec3s rotation = { 0, 0, 0 };
- spawn_foliage((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_mario_raceway_tree_spawns));
- spawn_piranha_plants((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_mario_raceway_piranha_plant_spawns));
- spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_mario_raceway_item_box_spawns));
+ spawn_foliage((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_mario_raceway_tree_spawns));
+ spawn_piranha_plants((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_mario_raceway_piranha_plant_spawns));
+ spawn_all_item_boxes((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_mario_raceway_item_box_spawns));
vec3f_set(position, 150.0f, 40.0f, -1300.0f);
position[0] *= gCourseDirection;
add_actor_to_empty_slot(position, rotation, velocity, ACTOR_MARIO_SIGN);
@@ -230,8 +230,7 @@ void MarioRaceway::SomeSounds() {
}
void MarioRaceway::WhatDoesThisDo(Player* player, int8_t playerId) {
- if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x19B) &&
- ((s16) gNearestWaypointByPlayerId[playerId] < 0x1B9)) {
+ if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x19B) && ((s16) gNearestWaypointByPlayerId[playerId] < 0x1B9)) {
if (D_80165300[playerId] != 1) {
func_800CA288(playerId, 0x55);
}
@@ -245,8 +244,7 @@ void MarioRaceway::WhatDoesThisDo(Player* player, int8_t playerId) {
}
void MarioRaceway::WhatDoesThisDoAI(Player* player, int8_t playerId) {
- if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x19B) &&
- ((s16) gNearestWaypointByPlayerId[playerId] < 0x1B9)) {
+ if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x19B) && ((s16) gNearestWaypointByPlayerId[playerId] < 0x1B9)) {
if (D_80165300[playerId] != 1) {
func_800CA2E4(playerId, 0x55);
}
@@ -378,12 +376,13 @@ void MarioRaceway::Render(struct UnkStruct_800DC5EC* arg0) {
}
void MarioRaceway::RenderCredits() {
- gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_mario_raceway_dl_9348));
+ gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_mario_raceway_dl_9348));
}
void MarioRaceway::CreditsSpawnActors() {
dma_textures(gTextureTrees1, 0x35B, 0x800);
- spawn_foliage((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_mario_raceway_tree_spawns));
+ spawn_foliage((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_mario_raceway_tree_spawns));
}
-void MarioRaceway::Destroy() { }
+void MarioRaceway::Destroy() {
+}