summaryrefslogtreecommitdiff
path: root/src/engine/courses
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/courses')
-rw-r--r--src/engine/courses/BansheeBoardwalk.cpp106
-rw-r--r--src/engine/courses/BansheeBoardwalk.h33
-rw-r--r--src/engine/courses/BigDonut.cpp90
-rw-r--r--src/engine/courses/BigDonut.h22
-rw-r--r--src/engine/courses/BlockFort.cpp68
-rw-r--r--src/engine/courses/BlockFort.h26
-rw-r--r--src/engine/courses/BowsersCastle.cpp97
-rw-r--r--src/engine/courses/BowsersCastle.h34
-rw-r--r--src/engine/courses/ChocoMountain.cpp89
-rw-r--r--src/engine/courses/ChocoMountain.h31
-rw-r--r--src/engine/courses/Course.cpp28
-rw-r--r--src/engine/courses/Course.h65
-rw-r--r--src/engine/courses/DKJungle.cpp183
-rw-r--r--src/engine/courses/DKJungle.h34
-rw-r--r--src/engine/courses/DoubleDeck.cpp85
-rw-r--r--src/engine/courses/DoubleDeck.h28
-rw-r--r--src/engine/courses/FrappeSnowland.cpp80
-rw-r--r--src/engine/courses/FrappeSnowland.h22
-rw-r--r--src/engine/courses/Harbour.cpp821
-rw-r--r--src/engine/courses/Harbour.h26
-rw-r--r--src/engine/courses/KalimariDesert.cpp117
-rw-r--r--src/engine/courses/KalimariDesert.h28
-rw-r--r--src/engine/courses/KoopaTroopaBeach.cpp127
-rw-r--r--src/engine/courses/KoopaTroopaBeach.h34
-rw-r--r--src/engine/courses/LuigiRaceway.cpp2
-rw-r--r--src/engine/courses/MarioRaceway.cpp99
-rw-r--r--src/engine/courses/MarioRaceway.h28
-rw-r--r--src/engine/courses/MooMooFarm.cpp154
-rw-r--r--src/engine/courses/MooMooFarm.h28
-rw-r--r--src/engine/courses/PodiumCeremony.cpp105
-rw-r--r--src/engine/courses/PodiumCeremony.h30
-rw-r--r--src/engine/courses/RainbowRoad.cpp103
-rw-r--r--src/engine/courses/RainbowRoad.h31
-rw-r--r--src/engine/courses/RoyalRaceway.cpp86
-rw-r--r--src/engine/courses/RoyalRaceway.h28
-rw-r--r--src/engine/courses/SherbetLand.cpp144
-rw-r--r--src/engine/courses/SherbetLand.h31
-rw-r--r--src/engine/courses/Skyscraper.cpp98
-rw-r--r--src/engine/courses/Skyscraper.h30
-rw-r--r--src/engine/courses/TestCourse.cpp242
-rw-r--r--src/engine/courses/TestCourse.h26
-rw-r--r--src/engine/courses/ToadsTurnpike.cpp90
-rw-r--r--src/engine/courses/ToadsTurnpike.h31
-rw-r--r--src/engine/courses/YoshiValley.cpp96
-rw-r--r--src/engine/courses/YoshiValley.h28
45 files changed, 1727 insertions, 2057 deletions
diff --git a/src/engine/courses/BansheeBoardwalk.cpp b/src/engine/courses/BansheeBoardwalk.cpp
index 51049fb8d..bf4abc7bf 100644
--- a/src/engine/courses/BansheeBoardwalk.cpp
+++ b/src/engine/courses/BansheeBoardwalk.cpp
@@ -15,28 +15,28 @@
#include "assets/boo_frames.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 "collision.h"
- #include "memory.h"
- #include "course_offsets.h"
- #include "course.h"
- extern const char *banshee_boardwalk_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 "collision.h"
+#include "memory.h"
+#include "course_offsets.h"
+#include "course.h"
+extern const char* banshee_boardwalk_dls[];
}
const course_texture banshee_boardwalk_textures[] = {
@@ -95,7 +95,7 @@ BansheeBoardwalk::BansheeBoardwalk() {
Props.NearPersp = 2.0f;
Props.FarPersp = 2700.0f;
- Props.PathSizes = {0x2EE, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
+ Props.PathSizes = { 0x2EE, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@@ -117,12 +117,12 @@ BansheeBoardwalk::BansheeBoardwalk() {
Props.D_0D009808[2] = 5.75f;
Props.D_0D009808[3] = 6.3333334f;
- Props.PathTable[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_banshee_boardwalk_unknown_waypoints);
+ Props.PathTable[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_banshee_boardwalk_unknown_waypoints);
Props.PathTable[1] = NULL;
Props.PathTable[2] = NULL;
Props.PathTable[3] = NULL;
- Props.PathTable2[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_banshee_boardwalk_track_waypoints);
+ Props.PathTable2[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_banshee_boardwalk_track_waypoints);
Props.PathTable2[1] = NULL;
Props.PathTable2[2] = NULL;
Props.PathTable2[3] = NULL;
@@ -130,14 +130,14 @@ BansheeBoardwalk::BansheeBoardwalk() {
Props.Clouds = NULL; // no clouds
Props.CloudList = NULL;
- Props.Skybox.TopRight = {0, 0, 0};
- Props.Skybox.BottomRight = {0, 0, 0};
- Props.Skybox.BottomLeft = {0, 0, 0};
- Props.Skybox.TopLeft = {0, 0, 0};
- 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, 0, 0 };
+ Props.Skybox.BottomRight = { 0, 0, 0 };
+ Props.Skybox.BottomLeft = { 0, 0, 0 };
+ Props.Skybox.TopLeft = { 0, 0, 0 };
+ 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_BANSHEE_BOARDWALK;
Props.WaterLevel = -80.0f;
@@ -150,19 +150,19 @@ void BansheeBoardwalk::Load() {
D_801625EC = 0;
D_801625F4 = 0;
D_801625F0 = 0;
- parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_banshee_boardwalk_track_sections));
+ parse_course_displaylists((TrackSections*) LOAD_ASSET_RAW(d_course_banshee_boardwalk_track_sections));
func_80295C6C();
- find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07000878), 128, 0, 0, 0);
+ find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07000878), 128, 0, 0, 0);
}
void BansheeBoardwalk::LoadTextures() {
}
void BansheeBoardwalk::BeginPlay() {
- spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_banshee_boardwalk_item_box_spawns));
+ spawn_all_item_boxes((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_banshee_boardwalk_item_box_spawns));
-
- gWorldInstance.AddObject(new OCheepCheep(FVector(xOrientation * -1650.0, -200.0f, -1650.0f), OCheepCheep::CheepType::RACE, IPathSpan(160, 170)));
+ gWorldInstance.AddObject(new OCheepCheep(FVector(xOrientation * -1650.0, -200.0f, -1650.0f),
+ OCheepCheep::CheepType::RACE, IPathSpan(160, 170)));
OTrashBin::Behaviour bhv;
if (gModeSelection == TIME_TRIALS) {
@@ -178,7 +178,7 @@ void BansheeBoardwalk::BeginPlay() {
}
if ((gGamestate != CREDITS_SEQUENCE) && (gModeSelection != TIME_TRIALS)) {
- gWorldInstance.AddObject(new OBat(FVector(0,0,0), IRotator(0, 0, 90)));
+ gWorldInstance.AddObject(new OBat(FVector(0, 0, 0), IRotator(0, 0, 90)));
gWorldInstance.AddObject(new OBoos(5, IPathSpan(180, 190), IPathSpan(200, 210), IPathSpan(280, 290)));
gWorldInstance.AddObject(new OBoos(5, IPathSpan(490, 500), IPathSpan(510, 520), IPathSpan(620, 630)));
}
@@ -207,16 +207,16 @@ void BansheeBoardwalk::UpdateCourseObjects() {
if (gGamestate != CREDITS_SEQUENCE) {
func_8007E4C4();
if (gModeSelection != TIME_TRIALS) {
- //update_bat();
+ // update_bat();
}
- //wrapper_update_boos();
+ // wrapper_update_boos();
}
}
void BansheeBoardwalk::RenderCourseObjects(s32 cameraId) {
if (gGamestate != CREDITS_SEQUENCE) {
- //render_object_bat(cameraId);
- //render_object_boos(cameraId);
+ // render_object_bat(cameraId);
+ // render_object_boos(cameraId);
}
}
@@ -224,8 +224,7 @@ void BansheeBoardwalk::SomeSounds() {
}
void BansheeBoardwalk::WhatDoesThisDo(Player* player, int8_t playerId) {
- if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x180) &&
- ((s16) gNearestWaypointByPlayerId[playerId] < 0x1E1)) {
+ if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x180) && ((s16) gNearestWaypointByPlayerId[playerId] < 0x1E1)) {
if (D_80165300[playerId] != 1) {
func_800CA288(playerId, 0x41);
}
@@ -239,8 +238,7 @@ void BansheeBoardwalk::WhatDoesThisDo(Player* player, int8_t playerId) {
}
void BansheeBoardwalk::WhatDoesThisDoAI(Player* player, int8_t playerId) {
- if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x180) &&
- ((s16) gNearestWaypointByPlayerId[playerId] < 0x1E1)) {
+ if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x180) && ((s16) gNearestWaypointByPlayerId[playerId] < 0x1E1)) {
if (D_80165300[playerId] != 1) {
func_800CA2E4(playerId, 0x41);
}
@@ -308,12 +306,12 @@ void BansheeBoardwalk::Render(struct UnkStruct_800DC5EC* arg0) {
mtxf_translate(spCC, spA8);
render_set_position(spCC, 0);
- gSPDisplayList(gDisplayListHead++, (Gfx*)d_course_banshee_boardwalk_dl_B278);
+ gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_banshee_boardwalk_dl_B278);
gDPPipeSync(gDisplayListHead++);
}
void BansheeBoardwalk::RenderCredits() {
- gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_banshee_boardwalk_dl_B308));
+ gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_banshee_boardwalk_dl_B308));
}
void BansheeBoardwalk::ScrollingTextures() {
@@ -337,7 +335,8 @@ void BansheeBoardwalk::Waypoints(Player* player, int8_t playerId) {
}
}
-void BansheeBoardwalk::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) {
+void BansheeBoardwalk::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot,
+ uint16_t playerDirection) {
gDPPipeSync(gDisplayListHead++);
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
@@ -345,13 +344,14 @@ void BansheeBoardwalk::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pat
gDPSetBlendMask(gDisplayListHead++, 0xFF);
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
// d_course_banshee_boardwalk_packed_dl_878
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07000878));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07000878));
gDPSetAlphaCompare(gDisplayListHead++, G_AC_NONE);
gDPPipeSync(gDisplayListHead++);
}
void BansheeBoardwalk::CreditsSpawnActors() {
- find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07000878), 0x32, 0, 0, 0);
+ find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07000878), 0x32, 0, 0, 0);
}
-void BansheeBoardwalk::Destroy() { }
+void BansheeBoardwalk::Destroy() {
+}
diff --git a/src/engine/courses/BansheeBoardwalk.h b/src/engine/courses/BansheeBoardwalk.h
index cc5b72213..b87f58255 100644
--- a/src/engine/courses/BansheeBoardwalk.h
+++ b/src/engine/courses/BansheeBoardwalk.h
@@ -4,30 +4,30 @@
#include "Course.h"
extern "C" {
- #include "assets/banshee_boardwalk_vertices.h"
- #include "assets/banshee_boardwalk_displaylists.h"
- #include "assets/banshee_boardwalk_data.h"
- #include "course_offsets.h"
- #include "camera.h"
- #include "data/some_data.h"
- #include "objects.h"
- #include "path_spawn_metadata.h"
- extern const course_texture banshee_boardwalk_textures[];
+#include "assets/banshee_boardwalk_vertices.h"
+#include "assets/banshee_boardwalk_displaylists.h"
+#include "assets/banshee_boardwalk_data.h"
+#include "course_offsets.h"
+#include "camera.h"
+#include "data/some_data.h"
+#include "objects.h"
+#include "path_spawn_metadata.h"
+extern const course_texture banshee_boardwalk_textures[];
}
class BansheeBoardwalk : public Course {
-public:
- virtual ~BansheeBoardwalk() = default; // Virtual destructor for proper cleanup in derived classes
+ public:
+ virtual ~BansheeBoardwalk() = default; // Virtual destructor for proper cleanup in derived classes
// Constructor
explicit BansheeBoardwalk();
-// virtual void Load(const char* courseVtx,
-// course_texture* textures, const char* displaylists, size_t dlSize);
+ // virtual void Load(const char* courseVtx,
+ // course_texture* textures, const char* displaylists, size_t dlSize);
virtual void Load() override;
virtual void LoadTextures() override;
virtual void BeginPlay() override;
- //virtual void InitClouds() override;
+ // virtual void InitClouds() override;
virtual void InitCourseObjects() override;
virtual void UpdateCourseObjects() override;
virtual void RenderCourseObjects(s32 cameraId) override;
@@ -35,10 +35,11 @@ public:
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
virtual void Render(struct UnkStruct_800DC5EC*) override;
- virtual void RenderCredits() override;
+ virtual void RenderCredits() override;
virtual void ScrollingTextures() override;
virtual void Waypoints(Player*, int8_t) override;
- virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) override;
+ virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot,
+ uint16_t playerDirection) override;
virtual void CreditsSpawnActors() override;
virtual void Destroy() override;
};
diff --git a/src/engine/courses/BigDonut.cpp b/src/engine/courses/BigDonut.cpp
index 4e99828eb..2b498059a 100644
--- a/src/engine/courses/BigDonut.cpp
+++ b/src/engine/courses/BigDonut.cpp
@@ -9,27 +9,27 @@
#include "assets/big_donut_data.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 "collision.h"
- #include "memory.h"
- extern const char *big_donut_dls[];
- extern s16 currentScreenSection;
+#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 "collision.h"
+#include "memory.h"
+extern const char* big_donut_dls[];
+extern s16 currentScreenSection;
}
const course_texture big_donut_textures[] = {
@@ -63,7 +63,7 @@ BigDonut::BigDonut() {
Props.AIMinimumSeparation = 0.5f;
Props.AISteeringSensitivity = 40;
- Props.PathSizes = {1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
+ Props.PathSizes = { 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@@ -98,14 +98,14 @@ BigDonut::BigDonut() {
Props.Clouds = NULL; // no clouds
Props.CloudList = NULL;
- Props.Skybox.TopRight = {0, 0, 0};
- Props.Skybox.BottomRight = {0, 0, 0};
- Props.Skybox.BottomLeft = {0, 0, 0};
- Props.Skybox.TopLeft = {0, 0, 0};
- 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, 0, 0 };
+ Props.Skybox.BottomRight = { 0, 0, 0 };
+ Props.Skybox.BottomLeft = { 0, 0, 0 };
+ Props.Skybox.TopLeft = { 0, 0, 0 };
+ 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_BATTLE_ARENAS;
Props.WaterLevel = 100.0f;
@@ -115,23 +115,23 @@ void BigDonut::Load() {
Course::Load();
// d_course_big_donut_packed_dl_1018
- generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*)0x07001018), 6);
+ generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*) 0x07001018), 6);
// d_course_big_donut_packed_dl_450
- generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*)0x07000450), 6);
+ generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*) 0x07000450), 6);
// d_course_big_donut_packed_dl_AC0
- generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*)0x07000AC0), 6);
+ generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*) 0x07000AC0), 6);
// d_course_big_donut_packed_dl_B58
- generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*)0x07000B58), 6);
+ generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*) 0x07000B58), 6);
// d_course_big_donut_packed_dl_230
- generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*)0x07000230), 6);
+ generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*) 0x07000230), 6);
func_80295C6C();
}
void BigDonut::BeginPlay() {
- spawn_all_item_boxes((ActorSpawnData*)LOAD_ASSET_RAW(d_course_big_donut_item_box_spawns));
+ spawn_all_item_boxes((ActorSpawnData*) LOAD_ASSET_RAW(d_course_big_donut_item_box_spawns));
if (gModeSelection == VERSUS) {
- FVector pos = {0, 0, 0};
+ FVector pos = { 0, 0, 0 };
gWorldInstance.AddObject(new OBombKart(pos, &D_80164550[0][20], 20, 0, 1.0f));
gWorldInstance.AddObject(new OBombKart(pos, &D_80164550[0][40], 40, 0, 1.0f));
@@ -154,22 +154,24 @@ void BigDonut::Render(struct UnkStruct_800DC5EC* arg0) {
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
// d_course_big_donut_packed_dl_DE8
- gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x07000DE8)));
+ gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x07000DE8)));
}
// d_course_big_donut_packed_dl_450
- gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x07000450)));
+ gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x07000450)));
// d_course_big_donut_packed_dl_AC0
- gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x07000AC0)));
+ gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x07000AC0)));
// d_course_big_donut_packed_dl_D20
- gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x07000D20)));
+ gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x07000D20)));
// d_course_big_donut_packed_dl_230
- gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x07000230)));
+ gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x07000230)));
}
-void BigDonut::RenderCredits() {}
+void BigDonut::RenderCredits() {
+}
void BigDonut::Waypoints(Player* player, int8_t playerId) {
player->nearestWaypointId = 0;
}
-void BigDonut::Destroy() { }
+void BigDonut::Destroy() {
+}
diff --git a/src/engine/courses/BigDonut.h b/src/engine/courses/BigDonut.h
index bc10105e1..4add75b9f 100644
--- a/src/engine/courses/BigDonut.h
+++ b/src/engine/courses/BigDonut.h
@@ -4,19 +4,19 @@
#include "Course.h"
extern "C" {
- #include "assets/big_donut_vertices.h"
- #include "assets/big_donut_displaylists.h"
- #include "assets/big_donut_data.h"
- #include "course_offsets.h"
- #include "camera.h"
- #include "data/some_data.h"
- #include "objects.h"
- #include "path_spawn_metadata.h"
- extern const course_texture big_donut_textures[];
+#include "assets/big_donut_vertices.h"
+#include "assets/big_donut_displaylists.h"
+#include "assets/big_donut_data.h"
+#include "course_offsets.h"
+#include "camera.h"
+#include "data/some_data.h"
+#include "objects.h"
+#include "path_spawn_metadata.h"
+extern const course_texture big_donut_textures[];
}
class BigDonut : public Course {
-public:
+ public:
virtual ~BigDonut() = default;
explicit BigDonut();
@@ -24,7 +24,7 @@ public:
virtual void Load() override;
virtual void BeginPlay() override;
virtual void Render(struct UnkStruct_800DC5EC*) override;
- virtual void RenderCredits() override;
+ virtual void RenderCredits() override;
virtual void Waypoints(Player* player, int8_t playerId) override;
virtual void Destroy() override;
};
diff --git a/src/engine/courses/BlockFort.cpp b/src/engine/courses/BlockFort.cpp
index cf246220e..d15b8bfef 100644
--- a/src/engine/courses/BlockFort.cpp
+++ b/src/engine/courses/BlockFort.cpp
@@ -9,28 +9,28 @@
#include "assets/block_fort_data.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 "collision.h"
- #include "memory.h"
- #include "course_offsets.h"
- extern const char *block_fort_dls[];
- extern s16 currentScreenSection;
+#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 "collision.h"
+#include "memory.h"
+#include "course_offsets.h"
+extern const char* block_fort_dls[];
+extern s16 currentScreenSection;
}
const course_texture block_fort_textures[] = {
@@ -68,7 +68,7 @@ BlockFort::BlockFort() {
Props.NearPersp = 2.0f;
Props.FarPersp = 2700.0f;
- Props.PathSizes = {1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
+ Props.PathSizes = { 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@@ -103,27 +103,27 @@ BlockFort::BlockFort() {
Props.Clouds = NULL; // no clouds
Props.CloudList = NULL;
- Props.Skybox.TopRight = {128, 184, 248};
- Props.Skybox.BottomRight = {216, 232, 248};
- Props.Skybox.BottomLeft = {216, 232, 248};
- Props.Skybox.TopLeft = {128, 184, 248};
- Props.Skybox.FloorTopRight = {216, 232, 248};
- Props.Skybox.FloorBottomRight = {0, 0, 0};
- Props.Skybox.FloorBottomLeft = {0, 0, 0};
- Props.Skybox.FloorTopLeft = {216, 232, 248};
+ Props.Skybox.TopRight = { 128, 184, 248 };
+ Props.Skybox.BottomRight = { 216, 232, 248 };
+ Props.Skybox.BottomLeft = { 216, 232, 248 };
+ Props.Skybox.TopLeft = { 128, 184, 248 };
+ Props.Skybox.FloorTopRight = { 216, 232, 248 };
+ Props.Skybox.FloorBottomRight = { 0, 0, 0 };
+ Props.Skybox.FloorBottomLeft = { 0, 0, 0 };
+ Props.Skybox.FloorTopLeft = { 216, 232, 248 };
Props.Sequence = MusicSeq::MUSIC_SEQ_CHOCO_MOUNTAIN;
}
void BlockFort::Load() {
Course::Load();
- generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*)0x070015C0), 1);
+ generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*) 0x070015C0), 1);
func_80295C6C();
Props.WaterLevel = gCourseMinY - 10.0f;
}
void BlockFort::BeginPlay() {
- spawn_all_item_boxes((ActorSpawnData*)LOAD_ASSET_RAW(d_course_block_fort_item_box_spawns));
+ spawn_all_item_boxes((ActorSpawnData*) LOAD_ASSET_RAW(d_course_block_fort_item_box_spawns));
if (gModeSelection == VERSUS) {
FVector pos = { 0, 0, 0 };
@@ -144,7 +144,7 @@ void BlockFort::Render(struct UnkStruct_800DC5EC* arg0) {
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
// d_course_block_fort_packed_dl_15C0
- gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x070015C0)));
+ gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x070015C0)));
}
void BlockFort::Waypoints(Player* player, int8_t playerId) {
diff --git a/src/engine/courses/BlockFort.h b/src/engine/courses/BlockFort.h
index f0e4c6aa6..e07a036dc 100644
--- a/src/engine/courses/BlockFort.h
+++ b/src/engine/courses/BlockFort.h
@@ -4,26 +4,26 @@
#include "Course.h"
extern "C" {
- #include "assets/block_fort_vertices.h"
- #include "assets/block_fort_displaylists.h"
- #include "assets/block_fort_data.h"
- #include "course_offsets.h"
- #include "camera.h"
- #include "data/some_data.h"
- #include "objects.h"
- #include "path_spawn_metadata.h"
- extern const course_texture block_fort_textures[];
+#include "assets/block_fort_vertices.h"
+#include "assets/block_fort_displaylists.h"
+#include "assets/block_fort_data.h"
+#include "course_offsets.h"
+#include "camera.h"
+#include "data/some_data.h"
+#include "objects.h"
+#include "path_spawn_metadata.h"
+extern const course_texture block_fort_textures[];
}
class BlockFort : public Course {
-public:
- virtual ~BlockFort() = default; // Virtual destructor for proper cleanup in derived classes
+ public:
+ virtual ~BlockFort() = default; // Virtual destructor for proper cleanup in derived classes
// Constructor
explicit BlockFort();
-// virtual void Load(const char* courseVtx,
-// course_texture* textures, const char* displaylists, size_t dlSize);
+ // virtual void Load(const char* courseVtx,
+ // course_texture* textures, const char* displaylists, size_t dlSize);
virtual void Load() override;
virtual void BeginPlay() override;
virtual void Render(struct UnkStruct_800DC5EC*) override;
diff --git a/src/engine/courses/BowsersCastle.cpp b/src/engine/courses/BowsersCastle.cpp
index 22b6cbe78..fd37ab860 100644
--- a/src/engine/courses/BowsersCastle.cpp
+++ b/src/engine/courses/BowsersCastle.cpp
@@ -11,28 +11,28 @@
#include "bowsers_castle_data.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 "collision.h"
- #include "code_8003DC40.h"
- #include "memory.h"
- #include "course.h"
- extern const char *bowsers_castle_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 "collision.h"
+#include "code_8003DC40.h"
+#include "memory.h"
+#include "course.h"
+extern const char* bowsers_castle_dls[];
}
const course_texture bowsers_castle_textures[] = {
@@ -97,7 +97,7 @@ BowsersCastle::BowsersCastle() {
Props.NearPersp = 2.0f;
Props.FarPersp = 2700.0f;
- Props.PathSizes = {0x30C, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
+ Props.PathSizes = { 0x30C, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@@ -119,12 +119,12 @@ BowsersCastle::BowsersCastle() {
Props.D_0D009808[2] = 5.75f;
Props.D_0D009808[3] = 6.3333334f;
- Props.PathTable[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_bowsers_castle_unknown_waypoints);
+ Props.PathTable[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_bowsers_castle_unknown_waypoints);
Props.PathTable[1] = NULL;
Props.PathTable[2] = NULL;
Props.PathTable[3] = NULL;
- Props.PathTable2[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_bowsers_castle_track_waypoints);
+ Props.PathTable2[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_bowsers_castle_track_waypoints);
Props.PathTable2[1] = NULL;
Props.PathTable2[2] = NULL;
Props.PathTable2[3] = NULL;
@@ -132,24 +132,24 @@ BowsersCastle::BowsersCastle() {
Props.Clouds = NULL; // no clouds
Props.CloudList = NULL;
- Props.Skybox.TopRight = {48, 8, 120};
- Props.Skybox.BottomRight = {0, 0, 0};
- Props.Skybox.BottomLeft = {0, 0, 0};
- Props.Skybox.TopLeft = {48, 8, 120};
- 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 = { 48, 8, 120 };
+ Props.Skybox.BottomRight = { 0, 0, 0 };
+ Props.Skybox.BottomLeft = { 0, 0, 0 };
+ Props.Skybox.TopLeft = { 48, 8, 120 };
+ 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_BOWSERS_CASTLE;
Props.WaterLevel = -50.0f;
- WaterVolumes.push_back({20.0f, 1549.0f, 1859.0f, -1402.0f, -1102.0f});
+ WaterVolumes.push_back({ 20.0f, 1549.0f, 1859.0f, -1402.0f, -1102.0f });
}
void BowsersCastle::Load() {
Course::Load();
- parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_bowsers_castle_addr));
+ parse_course_displaylists((TrackSections*) LOAD_ASSET_RAW(d_course_bowsers_castle_addr));
func_80295C6C();
find_vtx_and_set_colours(segmented_gfx_to_virtual(reinterpret_cast<void*>(0x07001350)), 0x32, 0, 0, 0);
}
@@ -176,8 +176,8 @@ void BowsersCastle::SpawnStockThwomp() {
}
void BowsersCastle::BeginPlay() {
- spawn_foliage((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_bowsers_castle_tree_spawn));
- spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_bowsers_castle_item_box_spawns));
+ spawn_foliage((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_bowsers_castle_tree_spawn));
+ spawn_all_item_boxes((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_bowsers_castle_item_box_spawns));
switch (gCCSelection) {
case CC_100:
@@ -268,7 +268,7 @@ void BowsersCastle::UpdateCourseObjects() {
}
void BowsersCastle::RenderCourseObjects(s32 cameraId) {
- //render_object_thwomps(cameraId);
+ // render_object_thwomps(cameraId);
render_object_bowser_flame(cameraId);
}
@@ -276,8 +276,7 @@ void BowsersCastle::SomeSounds() {
}
void BowsersCastle::WhatDoesThisDo(Player* player, int8_t playerId) {
- if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x29) &&
- ((s16) gNearestWaypointByPlayerId[playerId] < 0x1D2)) {
+ if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x29) && ((s16) gNearestWaypointByPlayerId[playerId] < 0x1D2)) {
if (D_80165300[playerId] != 1) {
func_800CA288(playerId, 0x41);
}
@@ -291,8 +290,7 @@ void BowsersCastle::WhatDoesThisDo(Player* player, int8_t playerId) {
}
void BowsersCastle::WhatDoesThisDoAI(Player* player, int8_t playerId) {
- if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x29) &&
- ((s16) gNearestWaypointByPlayerId[playerId] < 0x1D2)) {
+ if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x29) && ((s16) gNearestWaypointByPlayerId[playerId] < 0x1D2)) {
if (D_80165300[playerId] != 1) {
func_800CA2E4(playerId, 0x41);
}
@@ -333,10 +331,11 @@ void BowsersCastle::Render(struct UnkStruct_800DC5EC* arg0) {
}
void BowsersCastle::RenderCredits() {
- gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_bowsers_castle_dl_9148));
+ gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_bowsers_castle_dl_9148));
}
-void BowsersCastle::SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) {
+void BowsersCastle::SomeCollisionThing(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5,
+ f32* arg6, f32* arg7) {
func_8003E6EC(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
}
@@ -354,7 +353,8 @@ void BowsersCastle::Waypoints(Player* player, int8_t playerId) {
}
}
-void BowsersCastle::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) {
+void BowsersCastle::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot,
+ uint16_t playerDirection) {
if (gActiveScreenMode != SCREEN_MODE_1P) {
return;
}
@@ -372,11 +372,12 @@ void BowsersCastle::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCo
return;
}
}
- gSPDisplayList(gDisplayListHead++, (Gfx*)d_course_bowsers_castle_dl_9228);
+ gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_bowsers_castle_dl_9228);
}
void BowsersCastle::CreditsSpawnActors() {
- find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07001350), 0x32, 0, 0, 0);
+ find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07001350), 0x32, 0, 0, 0);
}
-void BowsersCastle::Destroy() { }
+void BowsersCastle::Destroy() {
+}
diff --git a/src/engine/courses/BowsersCastle.h b/src/engine/courses/BowsersCastle.h
index b52af2a26..739c598c3 100644
--- a/src/engine/courses/BowsersCastle.h
+++ b/src/engine/courses/BowsersCastle.h
@@ -4,31 +4,31 @@
#include "Course.h"
extern "C" {
- #include "assets/bowsers_castle_vertices.h"
- #include "assets/bowsers_castle_displaylists.h"
- #include "assets/bowsers_castle_data.h"
- #include "course_offsets.h"
- #include "camera.h"
- #include "data/some_data.h"
- #include "objects.h"
- #include "path_spawn_metadata.h"
- extern const course_texture bowsers_castle_textures[];
+#include "assets/bowsers_castle_vertices.h"
+#include "assets/bowsers_castle_displaylists.h"
+#include "assets/bowsers_castle_data.h"
+#include "course_offsets.h"
+#include "camera.h"
+#include "data/some_data.h"
+#include "objects.h"
+#include "path_spawn_metadata.h"
+extern const course_texture bowsers_castle_textures[];
}
class BowsersCastle : public Course {
-public:
- virtual ~BowsersCastle() = default; // Virtual destructor for proper cleanup in derived classes
+ public:
+ virtual ~BowsersCastle() = default; // Virtual destructor for proper cleanup in derived classes
// Constructor
explicit BowsersCastle();
-// virtual void Load(const char* courseVtx,
-// course_texture* textures, const char* displaylists, size_t dlSize);
+ // virtual void Load(const char* courseVtx,
+ // course_texture* textures, const char* displaylists, size_t dlSize);
virtual void Load() override;
virtual void LoadTextures() override;
void SpawnStockThwomp();
virtual void BeginPlay() override;
- //virtual void InitClouds() override;
+ // virtual void InitClouds() override;
virtual void InitCourseObjects() override;
virtual void UpdateCourseObjects() override;
virtual void RenderCourseObjects(s32 cameraId) override;
@@ -37,9 +37,11 @@ public:
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
virtual void Render(struct UnkStruct_800DC5EC*) override;
virtual void RenderCredits() override;
- virtual void SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) override;
+ virtual void SomeCollisionThing(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6,
+ f32* arg7) override;
virtual void Waypoints(Player*, int8_t) override;
- virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection);
+ virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot,
+ uint16_t playerDirection);
virtual void CreditsSpawnActors() override;
virtual void Destroy() override;
};
diff --git a/src/engine/courses/ChocoMountain.cpp b/src/engine/courses/ChocoMountain.cpp
index be5dcb0b1..089e80abb 100644
--- a/src/engine/courses/ChocoMountain.cpp
+++ b/src/engine/courses/ChocoMountain.cpp
@@ -10,29 +10,29 @@
#include "engine/actors/Finishline.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 "collision.h"
- #include "code_8003DC40.h"
- #include "memory.h"
- #include "course_offsets.h"
- #include "course.h"
- extern const char *choco_mountain_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 "collision.h"
+#include "code_8003DC40.h"
+#include "memory.h"
+#include "course_offsets.h"
+#include "course.h"
+extern const char* choco_mountain_dls[];
}
const course_texture choco_mountain_textures[] = {
@@ -88,7 +88,7 @@ ChocoMountain::ChocoMountain() {
Props.NearPersp = 2.0f;
Props.FarPersp = 1500.0f;
- Props.PathSizes = {0x2BC, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
+ Props.PathSizes = { 0x2BC, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@@ -110,12 +110,12 @@ ChocoMountain::ChocoMountain() {
Props.D_0D009808[2] = 5.75f;
Props.D_0D009808[3] = 6.3333334f;
- Props.PathTable[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_choco_mountain_unknown_waypoints);
+ Props.PathTable[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_choco_mountain_unknown_waypoints);
Props.PathTable[1] = NULL;
Props.PathTable[2] = NULL;
Props.PathTable[3] = NULL;
- Props.PathTable2[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_choco_mountain_track_waypoints);
+ Props.PathTable2[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_choco_mountain_track_waypoints);
Props.PathTable2[1] = NULL;
Props.PathTable2[2] = NULL;
Props.PathTable2[3] = NULL;
@@ -123,14 +123,14 @@ ChocoMountain::ChocoMountain() {
Props.Clouds = NULL; // no clouds
Props.CloudList = NULL;
- Props.Skybox.TopRight = {255, 255, 255};
- Props.Skybox.BottomRight = {255, 255, 255};
- Props.Skybox.BottomLeft = {255, 255, 255};
- Props.Skybox.TopLeft = {255, 255, 255};
- Props.Skybox.FloorTopRight = {255, 255, 255};
- Props.Skybox.FloorBottomRight = {255, 255, 255};
- Props.Skybox.FloorBottomLeft = {255, 255, 255};
- Props.Skybox.FloorTopLeft = {255, 255, 255};
+ Props.Skybox.TopRight = { 255, 255, 255 };
+ Props.Skybox.BottomRight = { 255, 255, 255 };
+ Props.Skybox.BottomLeft = { 255, 255, 255 };
+ Props.Skybox.TopLeft = { 255, 255, 255 };
+ Props.Skybox.FloorTopRight = { 255, 255, 255 };
+ Props.Skybox.FloorBottomRight = { 255, 255, 255 };
+ Props.Skybox.FloorBottomLeft = { 255, 255, 255 };
+ Props.Skybox.FloorTopLeft = { 255, 255, 255 };
Props.Sequence = MusicSeq::MUSIC_SEQ_CHOCO_MOUNTAIN;
Props.WaterLevel = -80.0f;
@@ -163,7 +163,7 @@ void ChocoMountain::Load() {
nullify_displaylist((uintptr_t) segmented_gfx_to_virtual(reinterpret_cast<void*>(0x070003C8)));
}
- parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_choco_mountain_addr));
+ parse_course_displaylists((TrackSections*) LOAD_ASSET_RAW(d_course_choco_mountain_addr));
func_802B5CAC(0x238E, 0x31C7, D_8015F590);
func_80295C6C();
}
@@ -172,8 +172,9 @@ void ChocoMountain::LoadTextures() {
}
void ChocoMountain::BeginPlay() {
- spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_choco_mountain_item_box_spawns));
- spawn_falling_rocks((struct ActorSpawnData*)LOAD_ASSET_RAW((const char*)d_course_choco_mountain_falling_rock_spawns));
+ spawn_all_item_boxes((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_choco_mountain_item_box_spawns));
+ spawn_falling_rocks(
+ (struct ActorSpawnData*) LOAD_ASSET_RAW((const char*) d_course_choco_mountain_falling_rock_spawns));
if (gModeSelection == VERSUS) {
FVector pos = { 0, 0, 0 };
@@ -206,8 +207,7 @@ void ChocoMountain::SomeSounds() {
}
void ChocoMountain::WhatDoesThisDo(Player* player, int8_t playerId) {
- if (((s16) gNearestWaypointByPlayerId[playerId] >= 0xA0) &&
- ((s16) gNearestWaypointByPlayerId[playerId] < 0xB4)) {
+ if (((s16) gNearestWaypointByPlayerId[playerId] >= 0xA0) && ((s16) gNearestWaypointByPlayerId[playerId] < 0xB4)) {
if (D_80165300[playerId] != 1) {
func_800CA288(playerId, 0x55);
}
@@ -221,8 +221,7 @@ void ChocoMountain::WhatDoesThisDo(Player* player, int8_t playerId) {
}
void ChocoMountain::WhatDoesThisDoAI(Player* player, int8_t playerId) {
- if (((s16) gNearestWaypointByPlayerId[playerId] >= 0xA0) &&
- ((s16) gNearestWaypointByPlayerId[playerId] < 0xB4)) {
+ if (((s16) gNearestWaypointByPlayerId[playerId] >= 0xA0) && ((s16) gNearestWaypointByPlayerId[playerId] < 0xB4)) {
if (D_80165300[playerId] != 1) {
func_800CA2E4(playerId, 0x55);
}
@@ -283,11 +282,13 @@ void ChocoMountain::Render(struct UnkStruct_800DC5EC* arg0) {
}
void ChocoMountain::RenderCredits() {
- gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_choco_mountain_dl_71B8));
+ gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_choco_mountain_dl_71B8));
}
-void ChocoMountain::SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) {
+void ChocoMountain::SomeCollisionThing(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5,
+ f32* arg6, f32* arg7) {
func_8003E37C(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
}
-void ChocoMountain::Destroy() { }
+void ChocoMountain::Destroy() {
+}
diff --git a/src/engine/courses/ChocoMountain.h b/src/engine/courses/ChocoMountain.h
index b592ba9df..e9eb83263 100644
--- a/src/engine/courses/ChocoMountain.h
+++ b/src/engine/courses/ChocoMountain.h
@@ -4,26 +4,26 @@
#include "Course.h"
extern "C" {
- #include "assets/choco_mountain_vertices.h"
- #include "assets/choco_mountain_displaylists.h"
- #include "assets/choco_mountain_data.h"
- #include "course_offsets.h"
- #include "camera.h"
- #include "data/some_data.h"
- #include "objects.h"
- #include "path_spawn_metadata.h"
- extern const course_texture choco_mountain_textures[];
+#include "assets/choco_mountain_vertices.h"
+#include "assets/choco_mountain_displaylists.h"
+#include "assets/choco_mountain_data.h"
+#include "course_offsets.h"
+#include "camera.h"
+#include "data/some_data.h"
+#include "objects.h"
+#include "path_spawn_metadata.h"
+extern const course_texture choco_mountain_textures[];
}
class ChocoMountain : public Course {
-public:
- virtual ~ChocoMountain() = default; // Virtual destructor for proper cleanup in derived classes
+ public:
+ virtual ~ChocoMountain() = default; // Virtual destructor for proper cleanup in derived classes
// Constructor
explicit ChocoMountain();
-// virtual void Load(const char* courseVtx,
-// course_texture* textures, const char* displaylists, size_t dlSize);
+ // virtual void Load(const char* courseVtx,
+ // course_texture* textures, const char* displaylists, size_t dlSize);
virtual void Load() override;
virtual void LoadTextures() override;
virtual void BeginPlay() override;
@@ -32,7 +32,8 @@ public:
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
virtual void Render(struct UnkStruct_800DC5EC*) override;
- virtual void RenderCredits() override;
- virtual void SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) override;
+ virtual void RenderCredits() override;
+ virtual void SomeCollisionThing(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6,
+ f32* arg7) override;
virtual void Destroy() override;
};
diff --git a/src/engine/courses/Course.cpp b/src/engine/courses/Course.cpp
index bbc9455fe..c27ab2590 100644
--- a/src/engine/courses/Course.cpp
+++ b/src/engine/courses/Course.cpp
@@ -43,7 +43,7 @@ Course::Course() {
Props.Minimap.PlayerScaleFactor = 0.22f;
Props.Minimap.FinishlineX = 0;
Props.Minimap.FinishlineY = 0;
- Props.Minimap.Colour = {255, 255, 255};
+ Props.Minimap.Colour = { 255, 255, 255 };
Props.WaterLevel = -10.0f;
Props.LakituTowType = (s32) OLakitu::LakituTowType::NORMAL;
@@ -115,11 +115,11 @@ void Course::LoadO2R(std::string trackPath) {
size_t i = 0;
for (auto& path : paths) {
if (i == 0) {
- Props.PathTable[0] = (TrackWaypoint*)path.data();
+ Props.PathTable[0] = (TrackWaypoint*) path.data();
Props.PathTable[1] = NULL;
Props.PathTable[2] = NULL;
Props.PathTable[3] = NULL;
- Props.PathTable2[0] = (TrackWaypoint*)path.data();
+ Props.PathTable2[0] = (TrackWaypoint*) path.data();
Props.PathTable2[1] = NULL;
Props.PathTable2[2] = NULL;
Props.PathTable2[3] = NULL;
@@ -140,7 +140,7 @@ void Course::Load() {
// Load from O2R
if (!TrackSectionsPtr.empty()) {
bIsMod = true;
- //auto res = std::dynamic_pointer_cast<MK64::TrackSectionsO2RClass>(ResourceLoad(TrackSectionsPtr.c_str()));
+ // auto res = std::dynamic_pointer_cast<MK64::TrackSectionsO2RClass>(ResourceLoad(TrackSectionsPtr.c_str()));
TrackSectionsO2R* sections = (TrackSectionsO2R*) LOAD_ASSET_RAW(TrackSectionsPtr.c_str());
size_t size = ResourceGetSizeByName(TrackSectionsPtr.c_str());
@@ -217,8 +217,9 @@ void Course::ParseCourseSections(TrackSectionsO2R* sections, size_t size) {
} else {
D_8015F5A4 = 0;
}
- printf("LOADING DL %s\n", sections[i].addr.c_str());
- generate_collision_mesh((Gfx*)LOAD_ASSET_RAW(sections[i].addr.c_str()), sections[i].surfaceType, sections[i].sectionId);
+ printf("LOADING DL %s\n", sections[i].addr.c_str());
+ generate_collision_mesh((Gfx*) LOAD_ASSET_RAW(sections[i].addr.c_str()), sections[i].surfaceType,
+ sections[i].sectionId);
}
}
@@ -228,8 +229,8 @@ void Course::TestPath() {
s16 x;
s16 y;
s16 z;
- Vec3s rot = {0, 0, 0};
- Vec3f vel = {0, 0, 0};
+ Vec3s rot = { 0, 0, 0 };
+ Vec3f vel = { 0, 0, 0 };
for (size_t i = 0; i < gWaypointCountByPathIndex[0]; i++) {
x = D_80164550[0][i].posX;
@@ -241,7 +242,7 @@ void Course::TestPath() {
}
f32 height = spawn_actor_on_surface(x, 2000.0f, z);
- Vec3f itemPos = {x, height, z};
+ Vec3f itemPos = { x, height, z };
add_actor_to_empty_slot(itemPos, rot, vel, ACTOR_ITEM_BOX);
}
}
@@ -337,7 +338,7 @@ void Course::Render(struct UnkStruct_800DC5EC* arg0) {
if (!TrackSectionsPtr.empty()) {
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
- // set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
+ // set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
@@ -347,10 +348,10 @@ void Course::Render(struct UnkStruct_800DC5EC* arg0) {
// d_course_big_donut_packed_dl_DE8
}
- TrackSectionsO2R* sections = (TrackSectionsO2R*)LOAD_ASSET_RAW(TrackSectionsPtr.c_str());
+ TrackSectionsO2R* sections = (TrackSectionsO2R*) LOAD_ASSET_RAW(TrackSectionsPtr.c_str());
size_t size = ResourceGetSizeByName(TrackSectionsPtr.c_str());
for (size_t i = 0; i < (size / sizeof(TrackSectionsO2R)); i++) {
- gSPDisplayList(gDisplayListHead++, (Gfx*)LOAD_ASSET_RAW(sections[i].addr.c_str()));
+ gSPDisplayList(gDisplayListHead++, (Gfx*) LOAD_ASSET_RAW(sections[i].addr.c_str()));
}
}
}
@@ -363,8 +364,7 @@ f32 Course::GetWaterLevel(FVector pos, Collision* collision) {
bool found = false;
for (const auto& volume : gWorldInstance.CurrentCourse->WaterVolumes) {
- if (pos.x >= volume.MinX && pos.x <= volume.MaxX &&
- pos.z >= volume.MinZ && pos.z <= volume.MaxZ) {
+ if (pos.x >= volume.MinX && pos.x <= volume.MaxX && pos.z >= volume.MinZ && pos.z <= volume.MaxZ) {
// Choose the highest water volume the player is over
if (!found || volume.Height > highestWater) {
highestWater = volume.Height;
diff --git a/src/engine/courses/Course.h b/src/engine/courses/Course.h
index 0a0eff823..d16c9c5a5 100644
--- a/src/engine/courses/Course.h
+++ b/src/engine/courses/Course.h
@@ -53,10 +53,10 @@ typedef struct MinimapProps {
int16_t Width;
int16_t Height;
IVector2D Pos[2]; // Minimap position for players 1 and 2. 3/4 player mode is hard-coded to the center.
- int32_t PlayerX; // The offset to place the player markers
+ int32_t PlayerX; // The offset to place the player markers
int32_t PlayerY;
float PlayerScaleFactor; // Scale factor of the player markers
- float FinishlineX; // The offset to place the finishline texture on the minimap
+ float FinishlineX; // The offset to place the finishline texture on the minimap
float FinishlineY;
RGB8 Colour; // Colour of the visible pixels (the track path)
} MinimapProps;
@@ -82,17 +82,17 @@ typedef struct Properties {
TrackWaypoint* PathTable[4];
TrackWaypoint* PathTable2[4];
uint8_t* CloudTexture;
- CloudData *Clouds;
- CloudData *CloudList;
+ CloudData* Clouds;
+ CloudData* CloudList;
SkyboxColours Skybox;
- const course_texture *textures;
+ const course_texture* textures;
enum MusicSeq Sequence;
float WaterLevel; // Used for effects, and Lakitu pick up height. Not necessarily the visual water model height.
#ifdef __cplusplus
nlohmann::json to_json() const {
nlohmann::json j;
- // j["Id"] = Id ? Id : "";
+ // j["Id"] = Id ? Id : "";
j["Name"] = Name ? Name : "";
j["DebugName"] = DebugName ? DebugName : "";
j["CourseLength"] = CourseLength ? CourseLength : "";
@@ -117,21 +117,23 @@ typedef struct Properties {
j["D_0D009808"] = { D_0D009808[0], D_0D009808[1], D_0D009808[2], D_0D009808[3] };
// Serialize arrays PathTable and PathTable2 (convert pointers into a JSON array if possible)
- //j["PathTable"] = {{}};
- //j["PathTable2"] = {{}};
+ // j["PathTable"] = {{}};
+ // j["PathTable2"] = {{}};
// Populate PathTable and PathTable2
- //j["Clouds"] = Clouds ? nlohmann::json{{"x", Clouds->x, "y", Clouds->y, "z", Clouds->z}} : nullptr;
- //j["CloudList"] = CloudList ? nlohmann::json{{"x", CloudList->x, "y", CloudList->y, "z", CloudList->z}} : nullptr;
-
- j["MinimapPosition"] = {Minimap.Pos[0].X, Minimap.Pos[0].Y};
- j["MinimapPosition2P"] = {Minimap.Pos[1].X, Minimap.Pos[1].Y};
+ // j["Clouds"] = Clouds ? nlohmann::json{{"x", Clouds->x, "y", Clouds->y, "z", Clouds->z}} : nullptr;
+ // j["CloudList"] = CloudList ? nlohmann::json{{"x", CloudList->x, "y", CloudList->y, "z", CloudList->z}} :
+ // nullptr;
+
+ j["MinimapPosition"] = { Minimap.Pos[0].X, Minimap.Pos[0].Y };
+ j["MinimapPosition2P"] = { Minimap.Pos[1].X, Minimap.Pos[1].Y };
j["MinimapPlayerX"] = Minimap.PlayerX;
j["MinimapPlayerY"] = Minimap.PlayerY;
j["MinimapPlayerScaleFactor"] = Minimap.PlayerScaleFactor;
j["MinimapFinishlineX"] = Minimap.FinishlineX;
j["MinimapFinishlineY"] = Minimap.FinishlineY;
- j["MinimapColour"] = {static_cast<int>(Minimap.Colour.r), static_cast<int>(Minimap.Colour.g), static_cast<int>(Minimap.Colour.b)};
+ j["MinimapColour"] = { static_cast<int>(Minimap.Colour.r), static_cast<int>(Minimap.Colour.g),
+ static_cast<int>(Minimap.Colour.b) };
// SkyboxColors - assuming SkyboxColors can be serialized similarly
// j["Skybox"] = Skybox; // Implement your serialization logic here
j["Sequence"] = static_cast<int>(Sequence);
@@ -143,16 +145,16 @@ typedef struct Properties {
// Function to load struct from JSON
void from_json(const nlohmann::json& j) {
- //Id = j.at("Id").get<std::string>().c_str();
-// Name = j.at("Name").get<std::string>().c_str();
+ // Id = j.at("Id").get<std::string>().c_str();
+ // Name = j.at("Name").get<std::string>().c_str();
strncpy(Name, j.at("Name").get<std::string>().c_str(), sizeof(Name) - 1);
Name[sizeof(Name) - 1] = '\0'; // Ensure null termination
-// DebugName = j.at("DebugName").get<std::string>().c_str();
+ // DebugName = j.at("DebugName").get<std::string>().c_str();
strncpy(DebugName, j.at("DebugName").get<std::string>().c_str(), sizeof(DebugName) - 1);
DebugName[sizeof(DebugName) - 1] = '\0'; // Ensure null termination
- // CourseLength = j.at("CourseLength").get<std::string>().c_str();
+ // CourseLength = j.at("CourseLength").get<std::string>().c_str();
strncpy(CourseLength, j.at("CourseLength").get<std::string>().c_str(), sizeof(CourseLength) - 1);
CourseLength[sizeof(CourseLength) - 1] = '\0'; // Ensure null termination
@@ -197,11 +199,11 @@ typedef struct Properties {
D_0D009808[1] = j.at("D_0D009808")[1].get<float>();
D_0D009808[2] = j.at("D_0D009808")[2].get<float>();
D_0D009808[3] = j.at("D_0D009808")[3].get<float>();
-
+
// Deserialize arrays PathTable and PathTable2 similarly
-
- //Clouds = nullptr; // Deserialize if data is present
- //CloudList = nullptr; // Deserialize if data is present
+
+ // Clouds = nullptr; // Deserialize if data is present
+ // CloudList = nullptr; // Deserialize if data is present
Minimap.Pos[0].X = j.at("MinimapPosition")[0].get<int32_t>();
Minimap.Pos[0].Y = j.at("MinimapPosition")[1].get<int32_t>();
Minimap.Pos[1].X = j.at("MinimapPosition2P")[0].get<int32_t>();
@@ -214,14 +216,14 @@ typedef struct Properties {
Minimap.Colour.r = j.at("MinimapColour")[0].get<uint8_t>();
Minimap.Colour.g = j.at("MinimapColour")[1].get<uint8_t>();
Minimap.Colour.b = j.at("MinimapColour")[2].get<uint8_t>();
- //textures = nullptr; // Deserialize textures if present
+ // textures = nullptr; // Deserialize textures if present
Sequence = static_cast<MusicSeq>(j.at("Sequence").get<int>());
WaterLevel = j.at("WaterLevel").get<float>();
}
void SetText(char* name, const char* title, size_t bufferSize) {
// Copy the title into the name buffer, ensuring it's null-terminated and within bounds
std::strncpy(name, title, bufferSize - 1);
- name[bufferSize - 1] = '\0'; // Ensure the string is null-terminated
+ name[bufferSize - 1] = '\0'; // Ensure the string is null-terminated
}
const char* GetName() {
@@ -243,7 +245,7 @@ class World; // <-- Forward declare
class Course {
-public:
+ public:
std::string Id;
Properties Props;
@@ -266,7 +268,9 @@ public:
virtual void LoadO2R(std::string trackPath); // Load custom track from o2r
virtual void Load(); // Decompress and load stock courses or from o2r but TrackSectionsPtr must be set.
- virtual void Load(Vtx* vtx, Gfx *gfx); // Load custom track from code. Load must be overridden and then call to this base class method impl.
+ virtual void Load(
+ Vtx* vtx,
+ Gfx* gfx); // Load custom track from code. Load must be overridden and then call to this base class method impl.
virtual void LoadTextures();
virtual void ParseCourseSections(TrackSectionsO2R* sections, size_t size);
@@ -278,7 +282,8 @@ public:
virtual void TestPath();
virtual void InitClouds();
virtual void UpdateClouds(s32, Camera*);
- virtual void SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7);
+ virtual void SomeCollisionThing(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6,
+ f32* arg7);
virtual void InitCourseObjects();
virtual void UpdateCourseObjects();
virtual void RenderCourseObjects(s32 cameraId);
@@ -292,10 +297,12 @@ public:
virtual void Waypoints(Player* player, int8_t playerId);
virtual f32 GetWaterLevel(FVector pos, Collision* collision);
virtual void ScrollingTextures();
- virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection);
+ virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot,
+ uint16_t playerDirection);
virtual void Destroy();
virtual bool IsMod();
-private:
+
+ private:
void Init();
};
diff --git a/src/engine/courses/DKJungle.cpp b/src/engine/courses/DKJungle.cpp
index bbb602584..7ada96a48 100644
--- a/src/engine/courses/DKJungle.cpp
+++ b/src/engine/courses/DKJungle.cpp
@@ -13,31 +13,31 @@
#include "engine/vehicles/Utils.h"
extern "C" {
- #include "main.h"
- #include "common_structs.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 "collision.h"
- #include "code_8003DC40.h"
- #include "memory.h"
- #include "sounds.h"
- #include "course.h"
- extern const char *d_course_dks_jungle_parkway_unknown_dl_list[];
- extern s16 currentScreenSection;
+#include "main.h"
+#include "common_structs.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 "collision.h"
+#include "code_8003DC40.h"
+#include "memory.h"
+#include "sounds.h"
+#include "course.h"
+extern const char* d_course_dks_jungle_parkway_unknown_dl_list[];
+extern s16 currentScreenSection;
}
const course_texture dks_jungle_parkway_textures[] = {
@@ -96,7 +96,7 @@ DKJungle::DKJungle() {
Props.NearPersp = 9.0f;
Props.FarPersp = 4500.0f;
- Props.PathSizes = {0x370, 1, 1, 1, 0x1F4, 0, 0, 0, 0, 0, 0};
+ Props.PathSizes = { 0x370, 1, 1, 1, 0x1F4, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@@ -118,12 +118,12 @@ DKJungle::DKJungle() {
Props.D_0D009808[2] = 5.75f;
Props.D_0D009808[3] = 6.3333334f;
- Props.PathTable[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_dks_jungle_parkway_unknown_waypoints);
+ Props.PathTable[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_dks_jungle_parkway_unknown_waypoints);
Props.PathTable[1] = NULL;
Props.PathTable[2] = NULL;
Props.PathTable[3] = NULL;
- Props.PathTable2[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_dks_jungle_parkway_track_waypoints);
+ Props.PathTable2[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_dks_jungle_parkway_track_waypoints);
Props.PathTable2[1] = NULL;
Props.PathTable2[2] = NULL;
Props.PathTable2[3] = NULL;
@@ -131,14 +131,14 @@ DKJungle::DKJungle() {
Props.Clouds = NULL; // no clouds
Props.CloudList = NULL;
- Props.Skybox.TopRight = {255, 174, 0};
- Props.Skybox.BottomRight = {255, 229, 124};
- Props.Skybox.BottomLeft = {255, 229, 124};
- Props.Skybox.TopLeft = {255, 174, 0};
- Props.Skybox.FloorTopRight = {22, 145, 22};
- Props.Skybox.FloorBottomRight = {0, 0, 0};
- Props.Skybox.FloorBottomLeft = {0, 0, 0};
- Props.Skybox.FloorTopLeft = {22, 145, 22};
+ Props.Skybox.TopRight = { 255, 174, 0 };
+ Props.Skybox.BottomRight = { 255, 229, 124 };
+ Props.Skybox.BottomLeft = { 255, 229, 124 };
+ Props.Skybox.TopLeft = { 255, 174, 0 };
+ Props.Skybox.FloorTopRight = { 22, 145, 22 };
+ Props.Skybox.FloorBottomRight = { 0, 0, 0 };
+ Props.Skybox.FloorBottomLeft = { 0, 0, 0 };
+ Props.Skybox.FloorTopLeft = { 22, 145, 22 };
Props.Sequence = MusicSeq::MUSIC_SEQ_DK_JUNGLE;
Props.WaterLevel = -475.0f;
@@ -147,10 +147,10 @@ DKJungle::DKJungle() {
void DKJungle::Load() {
Course::Load();
- parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_dks_jungle_parkway_addr));
+ parse_course_displaylists((TrackSections*) LOAD_ASSET_RAW(d_course_dks_jungle_parkway_addr));
func_80295C6C();
// d_course_dks_jungle_parkway_packed_dl_3FA8
- find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07003FA8), 120, 255, 255, 255);
+ find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07003FA8), 120, 255, 255, 255);
}
f32 DKJungle::GetWaterLevel(FVector pos, Collision* collision) {
@@ -191,7 +191,7 @@ void DKJungle::LoadTextures() {
}
void DKJungle::BeginPlay() {
- spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_dks_jungle_parkway_item_box_spawns));
+ spawn_all_item_boxes((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_dks_jungle_parkway_item_box_spawns));
init_kiwano_fruit();
func_80298D10();
@@ -201,7 +201,7 @@ void DKJungle::BeginPlay() {
// The original game only ran vehicle logic every second frame.
// Thus the speed gets divided by two to set speed to match properly
- gWorldInstance.AddActor(new ABoat((0.6666666f)/4, 0));
+ gWorldInstance.AddActor(new ABoat((0.6666666f) / 4, 0));
if (gModeSelection == VERSUS) {
FVector pos = { 0, 0, 0 };
@@ -241,10 +241,9 @@ void DKJungle::SomeSounds() {
}
void DKJungle::WhatDoesThisDo(Player* player, int8_t playerId) {
- if ((((s16) gNearestWaypointByPlayerId[playerId] >= 0) &&
- ((s16) gNearestWaypointByPlayerId[playerId] < 0x65)) ||
+ if ((((s16) gNearestWaypointByPlayerId[playerId] >= 0) && ((s16) gNearestWaypointByPlayerId[playerId] < 0x65)) ||
(((s16) gNearestWaypointByPlayerId[playerId] >= 0x14A) &&
- ((s16) gNearestWaypointByPlayerId[playerId] < 0x21F))) {
+ ((s16) gNearestWaypointByPlayerId[playerId] < 0x21F))) {
if (D_80165300[playerId] != 2) {
func_800C8F80(playerId, 0x0170802D);
}
@@ -271,8 +270,7 @@ void DKJungle::WhatDoesThisDo(Player* player, int8_t playerId) {
}
void DKJungle::WhatDoesThisDoAI(Player* player, int8_t playerId) {
- if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x288) &&
- ((s16) gNearestWaypointByPlayerId[playerId] < 0x305)) {
+ if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x288) && ((s16) gNearestWaypointByPlayerId[playerId] < 0x305)) {
if (D_80165300[playerId] != 1) {
func_800CA2E4(playerId, 0x55);
}
@@ -297,7 +295,7 @@ void DKJungle::Render(struct UnkStruct_800DC5EC* arg0) {
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
// d_course_dks_jungle_parkway_packed_dl_92D8
- gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x070092D8)));
+ gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x070092D8)));
}
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
@@ -309,10 +307,11 @@ void DKJungle::Render(struct UnkStruct_800DC5EC* arg0) {
}
void DKJungle::RenderCredits() {
- gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_dks_jungle_parkway_dl_13C30));
+ gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_dks_jungle_parkway_dl_13C30));
}
-void DKJungle::SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) {
+void DKJungle::SomeCollisionThing(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6,
+ f32* arg7) {
func_8003F138(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
}
@@ -334,25 +333,26 @@ void DKJungle::ScrollingTextures() {
D_802B87BC = 0;
}
// d_course_dks_jungle_parkway_packed_dl_3DD0
- find_and_set_tile_size((uintptr_t) segmented_gfx_to_virtual((void*)0x07003DD0), 0, D_802B87BC);
+ find_and_set_tile_size((uintptr_t) segmented_gfx_to_virtual((void*) 0x07003DD0), 0, D_802B87BC);
// d_course_dks_jungle_parkway_packed_dl_3E40
- find_and_set_tile_size((uintptr_t) segmented_gfx_to_virtual((void*)0x07003E40), 0, D_802B87BC);
+ find_and_set_tile_size((uintptr_t) segmented_gfx_to_virtual((void*) 0x07003E40), 0, D_802B87BC);
// d_course_dks_jungle_parkway_packed_dl_3EB0
- find_and_set_tile_size((uintptr_t) segmented_gfx_to_virtual((void*)0x07003EB0), 0, D_802B87BC);
+ find_and_set_tile_size((uintptr_t) segmented_gfx_to_virtual((void*) 0x07003EB0), 0, D_802B87BC);
// d_course_dks_jungle_parkway_packed_dl_3F30
- find_and_set_tile_size((uintptr_t) segmented_gfx_to_virtual((void*)0x07003F30), 0, D_802B87BC);
+ find_and_set_tile_size((uintptr_t) segmented_gfx_to_virtual((void*) 0x07003F30), 0, D_802B87BC);
// d_course_dks_jungle_parkway_packed_dl_36A8
- find_and_set_tile_size((uintptr_t) segmented_gfx_to_virtual((void*)0x070036A8), 0, D_802B87BC);
+ find_and_set_tile_size((uintptr_t) segmented_gfx_to_virtual((void*) 0x070036A8), 0, D_802B87BC);
D_802B87C4 -= 20;
if (D_802B87C4 < 0) {
D_802B87C4 = 0xFF;
}
// d_course_dks_jungle_parkway_packed_dl_9880
- find_and_set_tile_size((uintptr_t) segmented_gfx_to_virtual((void*)0x07009880), 0, D_802B87C4);
+ find_and_set_tile_size((uintptr_t) segmented_gfx_to_virtual((void*) 0x07009880), 0, D_802B87C4);
evaluate_collision_players_palm_trees();
}
-void DKJungle::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) {
+void DKJungle::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot,
+ uint16_t playerDirection) {
Mat4 matrix;
gDPPipeSync(gDisplayListHead++);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
@@ -370,46 +370,46 @@ void DKJungle::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter
if (pathCounter < 17) {
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
// d_course_dks_jungle_parkway_packed_dl_3E40
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003E40));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003E40));
// d_course_dks_jungle_parkway_packed_dl_3EB0
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003EB0));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003EB0));
if ((pathCounter >= 6) && (pathCounter < 13)) {
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
// d_course_dks_jungle_parkway_packed_dl_3DD0
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003DD0));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003DD0));
}
} else if ((pathCounter == 21) || (pathCounter == 22)) {
if (playerDirection == 3) {
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
// d_course_dks_jungle_parkway_packed_dl_36A8
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x070036A8));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x070036A8));
}
if ((playerDirection == 1) || (playerDirection == 0)) {
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
// d_course_dks_jungle_parkway_packed_dl_36A8
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x070036A8));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x070036A8));
} else {
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
// d_course_dks_jungle_parkway_packed_dl_3F30
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003F30));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003F30));
// d_course_dks_jungle_parkway_packed_dl_36A8
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x070036A8));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x070036A8));
}
} else if (pathCounter == 24) {
if ((playerDirection == 0) || (playerDirection == 3)) {
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
// d_course_dks_jungle_parkway_packed_dl_36A8
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x070036A8));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x070036A8));
}
} else if (pathCounter == 23) {
if (playerDirection == 3) {
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
// d_course_dks_jungle_parkway_packed_dl_36A8
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x070036A8));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x070036A8));
} else if (playerDirection == 0) {
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
// d_course_dks_jungle_parkway_packed_dl_36A8
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x070036A8));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x070036A8));
}
}
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
@@ -417,38 +417,38 @@ void DKJungle::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter
case 5:
if (playerDirection != 3) {
// d_course_dks_jungle_parkway_packed_dl_3DD0
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003DD0));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003DD0));
}
break;
case 17:
switch (playerDirection) {
case 0:
// d_course_dks_jungle_parkway_packed_dl_3E40
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003E40));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003E40));
// d_course_dks_jungle_parkway_packed_dl_3EB0
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003EB0));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003EB0));
break;
case 1:
// d_course_dks_jungle_parkway_packed_dl_3DD0
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003DD0));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003DD0));
// d_course_dks_jungle_parkway_packed_dl_3E40
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003E40));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003E40));
// d_course_dks_jungle_parkway_packed_dl_3EB0
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003EB0));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003EB0));
break;
case 2:
// d_course_dks_jungle_parkway_packed_dl_
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003E40));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003E40));
// d_course_dks_jungle_parkway_packed_dl_3EB0
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003EB0));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003EB0));
// d_course_dks_jungle_parkway_packed_dl_3F30
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003F30));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003F30));
break;
case 3:
// d_course_dks_jungle_parkway_packed_dl_3EB0
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003EB0));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003EB0));
// d_course_dks_jungle_parkway_packed_dl_3F30
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003F30));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003F30));
break;
}
break;
@@ -456,49 +456,49 @@ void DKJungle::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter
switch (playerDirection) {
case 0:
// d_course_dks_jungle_parkway_packed_dl_3E40
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003E40));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003E40));
// d_course_dks_jungle_parkway_packed_dl_3EB0
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003EB0));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003EB0));
break;
case 1:
// d_course_dks_jungle_parkway_packed_dl_3DD0
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003DD0));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003DD0));
// d_course_dks_jungle_parkway_packed_dl_3E40
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003E40));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003E40));
// d_course_dks_jungle_parkway_packed_dl_3EB0
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003EB0));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003EB0));
break;
case 2:
// d_course_dks_jungle_parkway_packed_dl_3E40
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003E40));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003E40));
// d_course_dks_jungle_parkway_packed_dl_3EB0
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003EB0));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003EB0));
break;
}
break;
case 21:
if ((playerDirection == 0) || (playerDirection == 1)) {
// d_course_dks_jungle_parkway_packed_dl_3E40
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003E40));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003E40));
// d_course_dks_jungle_parkway_packed_dl_3EB0
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003EB0));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003EB0));
// d_course_dks_jungle_parkway_packed_dl_3F30
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003F30));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003F30));
} else {
// d_course_dks_jungle_parkway_packed_dl_3EB0
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003EB0));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003EB0));
}
break;
case 22:
if (playerDirection == 0) {
// d_course_dks_jungle_parkway_packed_dl_3F30
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003F30));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003F30));
}
break;
case 23:
if (playerDirection != 1) {
// d_course_dks_jungle_parkway_packed_dl_3F30
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07003F30));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07003F30));
}
break;
}
@@ -509,7 +509,8 @@ void DKJungle::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter
void DKJungle::CreditsSpawnActors() {
// d_course_dks_jungle_parkway_packed_dl_3FA8
- find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07003FA8), 0x78, 0xFF, 0xFF, 0xFF);
+ find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07003FA8), 0x78, 0xFF, 0xFF, 0xFF);
}
-void DKJungle::Destroy() { }
+void DKJungle::Destroy() {
+}
diff --git a/src/engine/courses/DKJungle.h b/src/engine/courses/DKJungle.h
index 84767a94a..bcc02196c 100644
--- a/src/engine/courses/DKJungle.h
+++ b/src/engine/courses/DKJungle.h
@@ -4,31 +4,31 @@
#include "Course.h"
extern "C" {
- #include "assets/dks_jungle_parkway_vertices.h"
- #include "assets/dks_jungle_parkway_displaylists.h"
- #include "assets/dks_jungle_parkway_data.h"
- #include "course_offsets.h"
- #include "camera.h"
- #include "data/some_data.h"
- #include "objects.h"
- #include "path_spawn_metadata.h"
- extern const course_texture dks_jungle_parkway_textures[];
+#include "assets/dks_jungle_parkway_vertices.h"
+#include "assets/dks_jungle_parkway_displaylists.h"
+#include "assets/dks_jungle_parkway_data.h"
+#include "course_offsets.h"
+#include "camera.h"
+#include "data/some_data.h"
+#include "objects.h"
+#include "path_spawn_metadata.h"
+extern const course_texture dks_jungle_parkway_textures[];
}
class DKJungle : public Course {
-public:
- virtual ~DKJungle() = default; // Virtual destructor for proper cleanup in derived classes
+ public:
+ virtual ~DKJungle() = default; // Virtual destructor for proper cleanup in derived classes
// Constructor
explicit DKJungle();
-// virtual void Load(const char* courseVtx,
-// course_texture* textures, const char* displaylists, size_t dlSize);
+ // virtual void Load(const char* courseVtx,
+ // course_texture* textures, const char* displaylists, size_t dlSize);
virtual void Load() override;
virtual void LoadTextures() override;
virtual f32 GetWaterLevel(FVector pos, Collision* collision) override;
virtual void BeginPlay() override;
- //virtual void InitClouds() override;
+ // virtual void InitClouds() override;
virtual void InitCourseObjects() override;
virtual void UpdateCourseObjects() override;
virtual void RenderCourseObjects(s32 cameraId) override;
@@ -37,10 +37,12 @@ public:
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
virtual void Render(struct UnkStruct_800DC5EC*) override;
virtual void RenderCredits() override;
- virtual void SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) override;
+ virtual void SomeCollisionThing(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6,
+ f32* arg7) override;
virtual void Waypoints(Player* player, int8_t playerId) override;
virtual void ScrollingTextures() override;
- virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) override;
+ virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot,
+ uint16_t playerDirection) override;
virtual void CreditsSpawnActors() override;
virtual void Destroy() override;
};
diff --git a/src/engine/courses/DoubleDeck.cpp b/src/engine/courses/DoubleDeck.cpp
index ecadf9d48..f3abbc603 100644
--- a/src/engine/courses/DoubleDeck.cpp
+++ b/src/engine/courses/DoubleDeck.cpp
@@ -9,27 +9,27 @@
#include "assets/double_deck_data.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 "collision.h"
- #include "memory.h"
- extern const char *double_deck_dls[];
- extern s16 currentScreenSection;
+#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 "collision.h"
+#include "memory.h"
+extern const char* double_deck_dls[];
+extern s16 currentScreenSection;
}
const course_texture double_deck_textures[] = {
@@ -58,7 +58,6 @@ DoubleDeck::DoubleDeck() {
Props.SetText(Props.DebugName, "deck", sizeof(Props.DebugName));
Props.SetText(Props.CourseLength, "", sizeof(Props.CourseLength));
-
Props.AIBehaviour = D_0D008F18;
Props.AIMaximumSeparation = -1.0f;
Props.AIMinimumSeparation = 0.5f;
@@ -67,7 +66,7 @@ DoubleDeck::DoubleDeck() {
Props.NearPersp = 2.0f;
Props.FarPersp = 1500.0f;
- Props.PathSizes = {1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
+ Props.PathSizes = { 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@@ -102,21 +101,21 @@ DoubleDeck::DoubleDeck() {
Props.Clouds = NULL; // no clouds
Props.CloudList = NULL;
- Props.Skybox.TopRight = {113, 70, 255};
- Props.Skybox.BottomRight = {255, 184, 99};
- Props.Skybox.BottomLeft = {255, 184, 99};
- Props.Skybox.TopLeft = {113, 70, 255};
- Props.Skybox.FloorTopRight = {255, 224, 240};
- Props.Skybox.FloorBottomRight = {0, 0, 0};
- Props.Skybox.FloorBottomLeft = {0, 0, 0};
- Props.Skybox.FloorTopLeft = {255, 224, 240};
+ Props.Skybox.TopRight = { 113, 70, 255 };
+ Props.Skybox.BottomRight = { 255, 184, 99 };
+ Props.Skybox.BottomLeft = { 255, 184, 99 };
+ Props.Skybox.TopLeft = { 113, 70, 255 };
+ Props.Skybox.FloorTopRight = { 255, 224, 240 };
+ Props.Skybox.FloorBottomRight = { 0, 0, 0 };
+ Props.Skybox.FloorBottomLeft = { 0, 0, 0 };
+ Props.Skybox.FloorTopLeft = { 255, 224, 240 };
Props.Sequence = MusicSeq::MUSIC_SEQ_CHOCO_MOUNTAIN;
}
void DoubleDeck::Load() {
Course::Load();
- generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*)0x07000738), 1);
+ generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*) 0x07000738), 1);
func_80295C6C();
Props.WaterLevel = gCourseMinY - 10.0f;
}
@@ -125,7 +124,7 @@ void DoubleDeck::LoadTextures() {
}
void DoubleDeck::BeginPlay() {
- spawn_all_item_boxes((ActorSpawnData*)LOAD_ASSET_RAW(d_course_double_deck_item_box_spawns));
+ spawn_all_item_boxes((ActorSpawnData*) LOAD_ASSET_RAW(d_course_double_deck_item_box_spawns));
if (gModeSelection == VERSUS) {
FVector pos = { 0, 0, 0 };
@@ -140,13 +139,17 @@ void DoubleDeck::BeginPlay() {
}
}
-void DoubleDeck::InitCourseObjects() {}
+void DoubleDeck::InitCourseObjects() {
+}
-void DoubleDeck::SomeSounds() {}
+void DoubleDeck::SomeSounds() {
+}
-void DoubleDeck::WhatDoesThisDo(Player* player, int8_t playerId) {}
+void DoubleDeck::WhatDoesThisDo(Player* player, int8_t playerId) {
+}
-void DoubleDeck::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
+void DoubleDeck::WhatDoesThisDoAI(Player* player, int8_t playerId) {
+}
void DoubleDeck::Render(struct UnkStruct_800DC5EC* arg0) {
set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
@@ -155,14 +158,16 @@ void DoubleDeck::Render(struct UnkStruct_800DC5EC* arg0) {
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
// d_course_double_deck_packed_dl_738
- gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x07000738)));
+ gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x07000738)));
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
}
-void DoubleDeck::RenderCredits() {}
+void DoubleDeck::RenderCredits() {
+}
void DoubleDeck::Waypoints(Player* player, int8_t playerId) {
player->nearestWaypointId = 0;
}
-void DoubleDeck::Destroy() { }
+void DoubleDeck::Destroy() {
+}
diff --git a/src/engine/courses/DoubleDeck.h b/src/engine/courses/DoubleDeck.h
index 2ebb5d9c3..d53483239 100644
--- a/src/engine/courses/DoubleDeck.h
+++ b/src/engine/courses/DoubleDeck.h
@@ -4,26 +4,26 @@
#include "Course.h"
extern "C" {
- #include "assets/double_deck_vertices.h"
- #include "assets/double_deck_displaylists.h"
- #include "assets/double_deck_data.h"
- #include "course_offsets.h"
- #include "camera.h"
- #include "data/some_data.h"
- #include "objects.h"
- #include "path_spawn_metadata.h"
- extern const course_texture double_deck_textures[];
+#include "assets/double_deck_vertices.h"
+#include "assets/double_deck_displaylists.h"
+#include "assets/double_deck_data.h"
+#include "course_offsets.h"
+#include "camera.h"
+#include "data/some_data.h"
+#include "objects.h"
+#include "path_spawn_metadata.h"
+extern const course_texture double_deck_textures[];
}
class DoubleDeck : public Course {
-public:
- virtual ~DoubleDeck() = default; // Virtual destructor for proper cleanup in derived classes
+ public:
+ virtual ~DoubleDeck() = default; // Virtual destructor for proper cleanup in derived classes
// Constructor
explicit DoubleDeck();
-// virtual void Load(const char* courseVtx,
-// course_texture* textures, const char* displaylists, size_t dlSize);
+ // virtual void Load(const char* courseVtx,
+ // course_texture* textures, const char* displaylists, size_t dlSize);
virtual void Load() override;
virtual void LoadTextures() override;
virtual void BeginPlay() override;
@@ -32,7 +32,7 @@ public:
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
virtual void Render(struct UnkStruct_800DC5EC*) override;
- virtual void RenderCredits() override;
+ virtual void RenderCredits() override;
virtual void Waypoints(Player* player, int8_t playerId) override;
virtual void Destroy() override;
};
diff --git a/src/engine/courses/FrappeSnowland.cpp b/src/engine/courses/FrappeSnowland.cpp
index 16b9b7380..e41bc2625 100644
--- a/src/engine/courses/FrappeSnowland.cpp
+++ b/src/engine/courses/FrappeSnowland.cpp
@@ -13,30 +13,30 @@
#include "assets/boo_frames.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 "collision.h"
- #include "memory.h"
- #include "update_objects.h"
- #include "course_offsets.h"
- #include "course.h"
- extern const char *d_course_frappe_snowland_dl_list[];
- extern s8 gPlayerCount;
+#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 "collision.h"
+#include "memory.h"
+#include "update_objects.h"
+#include "course_offsets.h"
+#include "course.h"
+extern const char* d_course_frappe_snowland_dl_list[];
+extern s8 gPlayerCount;
}
const course_texture frappe_snowland_textures[] = {
@@ -62,7 +62,7 @@ FrappeSnowland::FrappeSnowland() {
Props.Minimap.PlayerScaleFactor = 0.016f;
Props.Minimap.FinishlineX = 0;
Props.Minimap.FinishlineY = 0;
- Props.Minimap.Colour = {72, 100, 255};
+ Props.Minimap.Colour = { 72, 100, 255 };
Props.SetText(Props.Name, "frappe snowland", sizeof(Props.Name));
Props.SetText(Props.DebugName, "snow", sizeof(Props.DebugName));
@@ -76,7 +76,7 @@ FrappeSnowland::FrappeSnowland() {
Props.NearPersp = 9.0f;
Props.FarPersp = 4500.0f;
- Props.PathSizes = {0x2EE, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
+ Props.PathSizes = { 0x2EE, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@@ -98,12 +98,12 @@ FrappeSnowland::FrappeSnowland() {
Props.D_0D009808[2] = 5.75f;
Props.D_0D009808[3] = 6.3333334f;
- Props.PathTable[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_frappe_snowland_unknown_waypoints);
+ Props.PathTable[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_frappe_snowland_unknown_waypoints);
Props.PathTable[1] = NULL;
Props.PathTable[2] = NULL;
Props.PathTable[3] = NULL;
- Props.PathTable2[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_frappe_snowland_track_waypoints);
+ Props.PathTable2[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_frappe_snowland_track_waypoints);
Props.PathTable2[1] = NULL;
Props.PathTable2[2] = NULL;
Props.PathTable2[3] = NULL;
@@ -111,14 +111,14 @@ FrappeSnowland::FrappeSnowland() {
Props.Clouds = NULL; // not used for frappe
Props.CloudList = NULL;
- Props.Skybox.TopRight = {28, 11, 90};
- Props.Skybox.BottomRight = {0, 99, 164};
- Props.Skybox.BottomLeft = {0, 9, 164};
- Props.Skybox.TopLeft = {28, 11, 90};
- Props.Skybox.FloorTopRight = {0, 99, 164};
- Props.Skybox.FloorBottomRight = {0, 0, 0};
- Props.Skybox.FloorBottomLeft = {0, 0, 0};
- Props.Skybox.FloorTopLeft = {0, 99, 164};
+ Props.Skybox.TopRight = { 28, 11, 90 };
+ Props.Skybox.BottomRight = { 0, 99, 164 };
+ Props.Skybox.BottomLeft = { 0, 9, 164 };
+ Props.Skybox.TopLeft = { 28, 11, 90 };
+ Props.Skybox.FloorTopRight = { 0, 99, 164 };
+ Props.Skybox.FloorBottomRight = { 0, 0, 0 };
+ Props.Skybox.FloorBottomLeft = { 0, 0, 0 };
+ Props.Skybox.FloorTopLeft = { 0, 99, 164 };
Props.Sequence = MusicSeq::MUSIC_SEQ_FRAPPE_SNOWLAND;
Props.WaterLevel = -50.0f;
@@ -127,7 +127,7 @@ FrappeSnowland::FrappeSnowland() {
void FrappeSnowland::Load() {
Course::Load();
- parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_frappe_snowland_addr));
+ parse_course_displaylists((TrackSections*) LOAD_ASSET_RAW(d_course_frappe_snowland_addr));
func_80295C6C();
}
@@ -137,8 +137,8 @@ void FrappeSnowland::LoadTextures() {
}
void FrappeSnowland::BeginPlay() {
- spawn_foliage((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_frappe_snowland_tree_spawns));
- spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_frappe_snowland_item_box_spawns));
+ spawn_foliage((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_frappe_snowland_tree_spawns));
+ spawn_all_item_boxes((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_frappe_snowland_item_box_spawns));
if (gGamestate != CREDITS_SEQUENCE) {
gWorldInstance.AddObject(new OSnowman(FVector(697, 0, -1684)));
@@ -225,7 +225,7 @@ void FrappeSnowland::Render(struct UnkStruct_800DC5EC* arg0) {
}
void FrappeSnowland::RenderCredits() {
- gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_frappe_snowland_dl_76A0));
+ gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_frappe_snowland_dl_76A0));
}
void FrappeSnowland::Waypoints(Player* player, int8_t playerId) {
diff --git a/src/engine/courses/FrappeSnowland.h b/src/engine/courses/FrappeSnowland.h
index 8f01559a9..b2d8b5db3 100644
--- a/src/engine/courses/FrappeSnowland.h
+++ b/src/engine/courses/FrappeSnowland.h
@@ -4,19 +4,19 @@
#include "Course.h"
extern "C" {
- #include "assets/frappe_snowland_vertices.h"
- #include "assets/frappe_snowland_displaylists.h"
- #include "assets/frappe_snowland_data.h"
- #include "course_offsets.h"
- #include "camera.h"
- #include "data/some_data.h"
- #include "objects.h"
- #include "path_spawn_metadata.h"
- extern const course_texture frappe_snowland_textures[];
+#include "assets/frappe_snowland_vertices.h"
+#include "assets/frappe_snowland_displaylists.h"
+#include "assets/frappe_snowland_data.h"
+#include "course_offsets.h"
+#include "camera.h"
+#include "data/some_data.h"
+#include "objects.h"
+#include "path_spawn_metadata.h"
+extern const course_texture frappe_snowland_textures[];
}
class FrappeSnowland : public Course {
-public:
+ public:
virtual ~FrappeSnowland() = default;
explicit FrappeSnowland();
@@ -29,6 +29,6 @@ public:
virtual void InitCourseObjects() override;
virtual void UpdateCourseObjects() override;
virtual void Render(struct UnkStruct_800DC5EC*) override;
- virtual void RenderCredits() override;
+ virtual void RenderCredits() override;
virtual void Waypoints(Player* player, int8_t playerId) override;
};
diff --git a/src/engine/courses/Harbour.cpp b/src/engine/courses/Harbour.cpp
index bd037754c..bb9980410 100644
--- a/src/engine/courses/Harbour.cpp
+++ b/src/engine/courses/Harbour.cpp
@@ -31,489 +31,145 @@
#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 "collision.h"
- #include "memory.h"
- #include "courses/harbour/track.h"
- #include "course.h"
+#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 "collision.h"
+#include "memory.h"
+#include "courses/harbour/track.h"
+#include "course.h"
}
TrackWaypoint harbour_path[] = {
- {16,-121,-34,0},
- {27,-121,-60,0},
- {31,-121,-83,0},
- {34,-121,-101,0},
- {38,-121,-119,0},
- {42,-121,-132,0},
- {46,-121,-141,0},
- {53,-121,-150,0},
- {60,-121,-158,0},
- {64,-121,-171,0},
- {71,-121,-185,0},
- {79,-121,-194,0},
- {87,-121,-209,0},
- {98,-121,-225,0},
- {109,-121,-236,0},
- {120,-121,-251,0},
- {130,-121,-263,0},
- {140,-121,-273,0},
- {149,-121,-280,0},
- {157,-121,-284,0},
- {167,-121,-292,0},
- {177,-121,-301,0},
- {191,-121,-306,0},
- {203,-121,-313,0},
- {213,-121,-319,0},
- {228,-121,-325,0},
- {240,-121,-332,0},
- {251,-121,-340,0},
- {260,-121,-342,0},
- {270,-121,-345,0},
- {279,-121,-347,0},
- {289,-121,-348,0},
- {298,-121,-351,0},
- {311,-121,-356,0},
- {323,-121,-359,0},
- {332,-121,-359,0},
- {343,-121,-361,0},
- {354,-121,-363,0},
- {363,-121,-361,0},
- {373,-121,-363,0},
- {385,-121,-362,0},
- {396,-121,-360,0},
- {405,-121,-359,0},
- {418,-121,-357,0},
- {432,-120,-354,0},
- {444,-119,-349,0},
- {459,-119,-346,0},
- {467,-119,-341,0},
- {479,-119,-337,0},
- {489,-119,-332,0},
- {501,-120,-325,0},
- {513,-120,-315,0},
- {526,-121,-309,0},
- {537,-121,-300,0},
- {551,-121,-294,0},
- {561,-121,-282,0},
- {572,-120,-269,0},
- {583,-119,-259,0},
- {592,-118,-254,0},
- {598,-119,-246,0},
- {606,-119,-240,0},
- {615,-121,-228,0},
- {624,-121,-219,0},
- {637,-121,-212,0},
- {647,-121,-206,0},
- {657,-121,-193,0},
- {667,-121,-188,0},
- {674,-121,-180,0},
- {688,-122,-173,0},
- {699,-123,-160,0},
- {711,-121,-152,0},
- {722,-118,-141,0},
- {734,-115,-136,0},
- {745,-115,-130,0},
- {753,-116,-121,0},
- {768,-117,-112,0},
- {788,-116,-99,0},
- {809,-114,-85,0},
- {832,-112,-72,0},
- {849,-110,-63,0},
- {861,-110,-57,0},
- {875,-109,-51,0},
- {888,-109,-42,0},
- {899,-109,-37,0},
- {923,-110,-31,0},
- {939,-110,-25,0},
- {950,-110,-21,0},
- {958,-110,-18,0},
- {975,-109,-13,0},
- {988,-109,-8,0},
- {1017,-109,-17,0},
- {1033,-109,-25,0},
- {1055,-110,-33,0},
- {1075,-112,-38,0},
- {1091,-115,-45,0},
- {1104,-118,-55,0},
- {1112,-119,-62,0},
- {1137,-124,-75,0},
- {1160,-127,-91,0},
- {1173,-128,-101,0},
- {1184,-129,-118,0},
- {1209,-132,-147,0},
- {1224,-132,-163,0},
- {1235,-132,-190,0},
- {1244,-132,-221,0},
- {1251,-132,-257,0},
- {1255,-132,-282,0},
- {1256,-132,-327,0},
- {1253,-132,-364,0},
- {1247,-132,-405,0},
- {1236,-132,-431,0},
- {1233,-132,-473,0},
- {1228,-132,-495,0},
- {1223,-132,-513,0},
- {1218,-132,-543,0},
- {1206,-132,-561,0},
- {1197,-132,-584,0},
- {1182,-132,-613,0},
- {1170,-132,-645,0},
- {1163,-132,-660,0},
- {1158,-132,-677,0},
- {1150,-132,-689,0},
- {1138,-132,-712,0},
- {1126,-132,-737,0},
- {1114,-132,-760,0},
- {1101,-132,-775,0},
- {1085,-132,-796,0},
- {1070,-132,-823,0},
- {1058,-132,-839,0},
- {1046,-132,-861,0},
- {1024,-132,-886,0},
- {1010,-132,-906,0},
- {997,-132,-918,0},
- {989,-132,-930,0},
- {975,-132,-943,0},
- {953,-132,-971,0},
- {934,-132,-985,0},
- {919,-132,-999,0},
- {904,-132,-1014,0},
- {889,-132,-1030,0},
- {874,-132,-1044,0},
- {852,-132,-1057,0},
- {826,-132,-1074,0},
- {806,-132,-1087,0},
- {787,-132,-1104,0},
- {773,-132,-1111,0},
- {751,-132,-1125,0},
- {728,-132,-1136,0},
- {710,-132,-1148,0},
- {687,-132,-1162,0},
- {667,-132,-1174,0},
- {648,-132,-1187,0},
- {632,-132,-1190,0},
- {615,-132,-1198,0},
- {597,-132,-1205,0},
- {576,-132,-1211,0},
- {562,-132,-1216,0},
- {543,-132,-1222,0},
- {526,-132,-1227,0},
- {513,-132,-1231,0},
- {495,-132,-1236,0},
- {472,-132,-1243,0},
- {451,-132,-1243,0},
- {431,-132,-1245,0},
- {402,-132,-1250,0},
- {379,-132,-1250,0},
- {358,-132,-1252,0},
- {340,-132,-1253,0},
- {316,-132,-1255,0},
- {298,-132,-1254,0},
- {275,-132,-1252,0},
- {246,-132,-1249,0},
- {221,-132,-1242,0},
- {198,-132,-1237,0},
- {173,-132,-1232,0},
- {156,-132,-1229,0},
- {137,-132,-1221,0},
- {119,-132,-1208,0},
- {103,-132,-1195,0},
- {81,-132,-1179,0},
- {63,-132,-1161,0},
- {48,-132,-1150,0},
- {28,-132,-1125,0},
- {9,-132,-1104,0},
- {-3,-132,-1086,0},
- {-24,-132,-1064,0},
- {-38,-133,-1049,0},
- {-50,-133,-1030,0},
- {-64,-134,-1005,0},
- {-82,-135,-985,0},
- {-97,-136,-960,0},
- {-109,-137,-942,0},
- {-130,-138,-921,0},
- {-148,-139,-897,0},
- {-160,-141,-874,0},
- {-176,-142,-849,0},
- {-202,-143,-821,0},
- {-219,-145,-792,0},
- {-235,-147,-763,0},
- {-257,-149,-729,0},
- {-273,-150,-705,0},
- {-288,-152,-673,0},
- {-309,-154,-637,0},
- {-326,-155,-603,0},
- {-343,-157,-569,0},
- {-356,-158,-542,0},
- {-373,-158,-512,0},
- {-386,-160,-479,0},
- {-401,-161,-441,0},
- {-412,-163,-402,0},
- {-425,-163,-374,0},
- {-441,-164,-332,0},
- {-455,-163,-295,0},
- {-468,-163,-264,0},
- {-482,-162,-219,0},
- {-494,-162,-184,0},
- {-502,-162,-149,0},
- {-509,-162,-118,0},
- {-516,-161,-85,0},
- {-524,-160,-64,0},
- {-532,-159,-39,0},
- {-539,-159,-3,0},
- {-545,-158,28,0},
- {-551,-157,56,0},
- {-558,-156,86,0},
- {-562,-156,124,0},
- {-569,-155,152,0},
- {-574,-154,194,0},
- {-582,-153,241,0},
- {-582,-153,262,0},
- {-586,-152,298,0},
- {-590,-152,330,0},
- {-593,-152,351,0},
- {-594,-152,383,0},
- {-595,-152,415,0},
- {-595,-152,442,0},
- {-597,-152,466,0},
- {-597,-152,492,0},
- {-598,-152,530,0},
- {-597,-152,571,0},
- {-596,-152,612,0},
- {-595,-152,646,0},
- {-591,-153,683,0},
- {-591,-153,717,0},
- {-591,-152,752,0},
- {-587,-152,788,0},
- {-583,-153,820,0},
- {-580,-153,858,0},
- {-573,-154,886,0},
- {-567,-154,924,0},
- {-562,-155,952,0},
- {-554,-155,988,0},
- {-547,-156,1022,0},
- {-534,-156,1065,0},
- {-518,-157,1108,0},
- {-510,-157,1147,0},
- {-503,-158,1172,0},
- {-494,-158,1206,0},
- {-486,-157,1242,0},
- {-474,-157,1274,0},
- {-466,-157,1303,0},
- {-448,-156,1363,0},
- {-435,-156,1400,0},
- {-425,-155,1428,0},
- {-414,-154,1464,0},
- {-404,-153,1498,0},
- {-397,-150,1532,0},
- {-383,-149,1565,0},
- {-370,-148,1604,0},
- {-348,-144,1667,0},
- {-329,-142,1714,0},
- {-312,-141,1744,0},
- {-298,-138,1785,0},
- {-286,-137,1812,0},
- {-263,-135,1860,0},
- {-236,-134,1890,0},
- {-207,-134,1927,0},
- {-184,-133,1949,0},
- {-163,-133,1965,0},
- {-146,-133,1985,0},
- {-103,-132,2022,0},
- {-74,-132,2056,0},
- {-52,-132,2078,0},
- {-20,-132,2101,0},
- {6,-132,2118,0},
- {28,-132,2133,0},
- {52,-132,2154,0},
- {72,-132,2169,0},
- {89,-132,2183,0},
- {105,-132,2196,0},
- {127,-132,2215,0},
- {149,-132,2233,0},
- {169,-132,2245,0},
- {196,-132,2262,0},
- {219,-132,2277,0},
- {248,-132,2293,0},
- {284,-132,2311,0},
- {314,-132,2330,0},
- {348,-132,2339,0},
- {376,-132,2346,0},
- {395,-132,2343,0},
- {414,-132,2344,0},
- {434,-132,2342,0},
- {452,-132,2341,0},
- {486,-132,2328,0},
- {518,-132,2322,0},
- {541,-132,2312,0},
- {567,-132,2305,0},
- {590,-132,2298,0},
- {609,-132,2287,0},
- {633,-132,2277,0},
- {658,-132,2267,0},
- {686,-132,2251,0},
- {712,-132,2235,0},
- {731,-132,2227,0},
- {753,-132,2214,0},
- {774,-132,2200,0},
- {799,-132,2181,0},
- {826,-132,2160,0},
- {846,-132,2144,0},
- {867,-132,2122,0},
- {894,-132,2097,0},
- {916,-132,2070,0},
- {936,-132,2043,0},
- {960,-132,2001,0},
- {980,-132,1968,0},
- {995,-132,1936,0},
- {1008,-132,1908,0},
- {1023,-132,1882,0},
- {1048,-132,1850,0},
- {1064,-132,1820,0},
- {1077,-132,1788,0},
- {1096,-133,1757,0},
- {1113,-133,1712,0},
- {1134,-134,1667,0},
- {1150,-135,1623,0},
- {1165,-135,1582,0},
- {1186,-136,1521,0},
- {1202,-136,1480,0},
- {1219,-136,1436,0},
- {1230,-135,1397,0},
- {1249,-135,1361,0},
- {1260,-134,1327,0},
- {1270,-134,1295,0},
- {1279,-133,1258,0},
- {1292,-133,1218,0},
- {1304,-132,1177,0},
- {1305,-132,1162,0},
- {1303,-132,1146,0},
- {1302,-132,1131,0},
- {1296,-132,1115,0},
- {1291,-133,1106,0},
- {1281,-133,1097,0},
- {1275,-134,1085,0},
- {1266,-136,1074,0},
- {1254,-137,1064,0},
- {1242,-138,1060,0},
- {1225,-139,1042,0},
- {1211,-138,1034,0},
- {1196,-137,1025,0},
- {1178,-134,1018,0},
- {1165,-132,1014,0},
- {1144,-130,1009,0},
- {1124,-127,993,0},
- {1105,-126,986,0},
- {1084,-125,981,0},
- {1059,-124,980,0},
- {1039,-122,972,0},
- {1016,-121,974,0},
- {988,-120,979,0},
- {964,-120,983,0},
- {941,-121,984,0},
- {914,-124,988,0},
- {892,-124,996,0},
- {865,-123,1000,0},
- {848,-122,1004,0},
- {829,-120,1015,0},
- {811,-119,1028,0},
- {785,-115,1036,0},
- {765,-113,1044,0},
- {747,-113,1064,0},
- {724,-114,1080,0},
- {707,-115,1098,0},
- {682,-116,1109,0},
- {663,-117,1131,0},
- {645,-117,1150,0},
- {625,-117,1172,0},
- {606,-118,1183,0},
- {573,-120,1200,0},
- {554,-121,1222,0},
- {532,-121,1238,0},
- {508,-121,1258,0},
- {482,-121,1270,0},
- {461,-121,1286,0},
- {435,-121,1299,0},
- {413,-121,1307,0},
- {389,-121,1313,0},
- {369,-121,1316,0},
- {348,-121,1322,0},
- {330,-121,1325,0},
- {309,-121,1323,0},
- {284,-121,1322,0},
- {258,-121,1323,0},
- {235,-121,1313,0},
- {216,-121,1301,0},
- {186,-121,1289,0},
- {170,-121,1284,0},
- {155,-121,1271,0},
- {141,-121,1255,0},
- {126,-121,1241,0},
- {118,-121,1232,0},
- {109,-121,1217,0},
- {101,-121,1205,0},
- {94,-121,1194,0},
- {86,-121,1180,0},
- {78,-121,1164,0},
- {71,-121,1144,0},
- {63,-121,1127,0},
- {57,-121,1111,0},
- {49,-121,1088,0},
- {44,-121,1074,0},
- {38,-121,1056,0},
- {34,-121,1032,0},
- {29,-121,1010,0},
- {26,-121,986,0},
- {21,-121,968,0},
- {14,-121,940,0},
- {8,-121,918,0},
- {8,-121,893,0},
- {4,-121,872,0},
- {3,-121,851,0},
- {1,-121,829,0},
- {0,-121,803,0},
- {-1,-121,788,0},
- {-5,-121,749,0},
- {-7,-121,713,0},
- {-11,-121,678,0},
- {-8,-121,642,0},
- {-8,-121,608,0},
- {-7,-121,577,0},
- {-8,-121,556,0},
- {-11,-121,515,0},
- {-9,-121,484,0},
- {-9,-121,453,0},
- {-8,-121,416,0},
- {-6,-121,394,0},
- {-3,-121,345,0},
- {-2,-121,305,0},
- {-1,-121,251,0},
- {-1,-121,214,0},
- {-2,-121,189,0},
- {-1,-121,156,0},
- {1,-121,124,0},
- {4,-121,86,0},
- {6,-121,66,0},
- {8,-121,36,0},
- {13,-121,0,0},
- {15,-121,-14,0},
- {-32768, -32768, -32768, 0}
+ { 16, -121, -34, 0 }, { 27, -121, -60, 0 }, { 31, -121, -83, 0 }, { 34, -121, -101, 0 },
+ { 38, -121, -119, 0 }, { 42, -121, -132, 0 }, { 46, -121, -141, 0 }, { 53, -121, -150, 0 },
+ { 60, -121, -158, 0 }, { 64, -121, -171, 0 }, { 71, -121, -185, 0 }, { 79, -121, -194, 0 },
+ { 87, -121, -209, 0 }, { 98, -121, -225, 0 }, { 109, -121, -236, 0 }, { 120, -121, -251, 0 },
+ { 130, -121, -263, 0 }, { 140, -121, -273, 0 }, { 149, -121, -280, 0 }, { 157, -121, -284, 0 },
+ { 167, -121, -292, 0 }, { 177, -121, -301, 0 }, { 191, -121, -306, 0 }, { 203, -121, -313, 0 },
+ { 213, -121, -319, 0 }, { 228, -121, -325, 0 }, { 240, -121, -332, 0 }, { 251, -121, -340, 0 },
+ { 260, -121, -342, 0 }, { 270, -121, -345, 0 }, { 279, -121, -347, 0 }, { 289, -121, -348, 0 },
+ { 298, -121, -351, 0 }, { 311, -121, -356, 0 }, { 323, -121, -359, 0 }, { 332, -121, -359, 0 },
+ { 343, -121, -361, 0 }, { 354, -121, -363, 0 }, { 363, -121, -361, 0 }, { 373, -121, -363, 0 },
+ { 385, -121, -362, 0 }, { 396, -121, -360, 0 }, { 405, -121, -359, 0 }, { 418, -121, -357, 0 },
+ { 432, -120, -354, 0 }, { 444, -119, -349, 0 }, { 459, -119, -346, 0 }, { 467, -119, -341, 0 },
+ { 479, -119, -337, 0 }, { 489, -119, -332, 0 }, { 501, -120, -325, 0 }, { 513, -120, -315, 0 },
+ { 526, -121, -309, 0 }, { 537, -121, -300, 0 }, { 551, -121, -294, 0 }, { 561, -121, -282, 0 },
+ { 572, -120, -269, 0 }, { 583, -119, -259, 0 }, { 592, -118, -254, 0 }, { 598, -119, -246, 0 },
+ { 606, -119, -240, 0 }, { 615, -121, -228, 0 }, { 624, -121, -219, 0 }, { 637, -121, -212, 0 },
+ { 647, -121, -206, 0 }, { 657, -121, -193, 0 }, { 667, -121, -188, 0 }, { 674, -121, -180, 0 },
+ { 688, -122, -173, 0 }, { 699, -123, -160, 0 }, { 711, -121, -152, 0 }, { 722, -118, -141, 0 },
+ { 734, -115, -136, 0 }, { 745, -115, -130, 0 }, { 753, -116, -121, 0 }, { 768, -117, -112, 0 },
+ { 788, -116, -99, 0 }, { 809, -114, -85, 0 }, { 832, -112, -72, 0 }, { 849, -110, -63, 0 },
+ { 861, -110, -57, 0 }, { 875, -109, -51, 0 }, { 888, -109, -42, 0 }, { 899, -109, -37, 0 },
+ { 923, -110, -31, 0 }, { 939, -110, -25, 0 }, { 950, -110, -21, 0 }, { 958, -110, -18, 0 },
+ { 975, -109, -13, 0 }, { 988, -109, -8, 0 }, { 1017, -109, -17, 0 }, { 1033, -109, -25, 0 },
+ { 1055, -110, -33, 0 }, { 1075, -112, -38, 0 }, { 1091, -115, -45, 0 }, { 1104, -118, -55, 0 },
+ { 1112, -119, -62, 0 }, { 1137, -124, -75, 0 }, { 1160, -127, -91, 0 }, { 1173, -128, -101, 0 },
+ { 1184, -129, -118, 0 }, { 1209, -132, -147, 0 }, { 1224, -132, -163, 0 }, { 1235, -132, -190, 0 },
+ { 1244, -132, -221, 0 }, { 1251, -132, -257, 0 }, { 1255, -132, -282, 0 }, { 1256, -132, -327, 0 },
+ { 1253, -132, -364, 0 }, { 1247, -132, -405, 0 }, { 1236, -132, -431, 0 }, { 1233, -132, -473, 0 },
+ { 1228, -132, -495, 0 }, { 1223, -132, -513, 0 }, { 1218, -132, -543, 0 }, { 1206, -132, -561, 0 },
+ { 1197, -132, -584, 0 }, { 1182, -132, -613, 0 }, { 1170, -132, -645, 0 }, { 1163, -132, -660, 0 },
+ { 1158, -132, -677, 0 }, { 1150, -132, -689, 0 }, { 1138, -132, -712, 0 }, { 1126, -132, -737, 0 },
+ { 1114, -132, -760, 0 }, { 1101, -132, -775, 0 }, { 1085, -132, -796, 0 }, { 1070, -132, -823, 0 },
+ { 1058, -132, -839, 0 }, { 1046, -132, -861, 0 }, { 1024, -132, -886, 0 }, { 1010, -132, -906, 0 },
+ { 997, -132, -918, 0 }, { 989, -132, -930, 0 }, { 975, -132, -943, 0 }, { 953, -132, -971, 0 },
+ { 934, -132, -985, 0 }, { 919, -132, -999, 0 }, { 904, -132, -1014, 0 }, { 889, -132, -1030, 0 },
+ { 874, -132, -1044, 0 }, { 852, -132, -1057, 0 }, { 826, -132, -1074, 0 }, { 806, -132, -1087, 0 },
+ { 787, -132, -1104, 0 }, { 773, -132, -1111, 0 }, { 751, -132, -1125, 0 }, { 728, -132, -1136, 0 },
+ { 710, -132, -1148, 0 }, { 687, -132, -1162, 0 }, { 667, -132, -1174, 0 }, { 648, -132, -1187, 0 },
+ { 632, -132, -1190, 0 }, { 615, -132, -1198, 0 }, { 597, -132, -1205, 0 }, { 576, -132, -1211, 0 },
+ { 562, -132, -1216, 0 }, { 543, -132, -1222, 0 }, { 526, -132, -1227, 0 }, { 513, -132, -1231, 0 },
+ { 495, -132, -1236, 0 }, { 472, -132, -1243, 0 }, { 451, -132, -1243, 0 }, { 431, -132, -1245, 0 },
+ { 402, -132, -1250, 0 }, { 379, -132, -1250, 0 }, { 358, -132, -1252, 0 }, { 340, -132, -1253, 0 },
+ { 316, -132, -1255, 0 }, { 298, -132, -1254, 0 }, { 275, -132, -1252, 0 }, { 246, -132, -1249, 0 },
+ { 221, -132, -1242, 0 }, { 198, -132, -1237, 0 }, { 173, -132, -1232, 0 }, { 156, -132, -1229, 0 },
+ { 137, -132, -1221, 0 }, { 119, -132, -1208, 0 }, { 103, -132, -1195, 0 }, { 81, -132, -1179, 0 },
+ { 63, -132, -1161, 0 }, { 48, -132, -1150, 0 }, { 28, -132, -1125, 0 }, { 9, -132, -1104, 0 },
+ { -3, -132, -1086, 0 }, { -24, -132, -1064, 0 }, { -38, -133, -1049, 0 }, { -50, -133, -1030, 0 },
+ { -64, -134, -1005, 0 }, { -82, -135, -985, 0 }, { -97, -136, -960, 0 }, { -109, -137, -942, 0 },
+ { -130, -138, -921, 0 }, { -148, -139, -897, 0 }, { -160, -141, -874, 0 }, { -176, -142, -849, 0 },
+ { -202, -143, -821, 0 }, { -219, -145, -792, 0 }, { -235, -147, -763, 0 }, { -257, -149, -729, 0 },
+ { -273, -150, -705, 0 }, { -288, -152, -673, 0 }, { -309, -154, -637, 0 }, { -326, -155, -603, 0 },
+ { -343, -157, -569, 0 }, { -356, -158, -542, 0 }, { -373, -158, -512, 0 }, { -386, -160, -479, 0 },
+ { -401, -161, -441, 0 }, { -412, -163, -402, 0 }, { -425, -163, -374, 0 }, { -441, -164, -332, 0 },
+ { -455, -163, -295, 0 }, { -468, -163, -264, 0 }, { -482, -162, -219, 0 }, { -494, -162, -184, 0 },
+ { -502, -162, -149, 0 }, { -509, -162, -118, 0 }, { -516, -161, -85, 0 }, { -524, -160, -64, 0 },
+ { -532, -159, -39, 0 }, { -539, -159, -3, 0 }, { -545, -158, 28, 0 }, { -551, -157, 56, 0 },
+ { -558, -156, 86, 0 }, { -562, -156, 124, 0 }, { -569, -155, 152, 0 }, { -574, -154, 194, 0 },
+ { -582, -153, 241, 0 }, { -582, -153, 262, 0 }, { -586, -152, 298, 0 }, { -590, -152, 330, 0 },
+ { -593, -152, 351, 0 }, { -594, -152, 383, 0 }, { -595, -152, 415, 0 }, { -595, -152, 442, 0 },
+ { -597, -152, 466, 0 }, { -597, -152, 492, 0 }, { -598, -152, 530, 0 }, { -597, -152, 571, 0 },
+ { -596, -152, 612, 0 }, { -595, -152, 646, 0 }, { -591, -153, 683, 0 }, { -591, -153, 717, 0 },
+ { -591, -152, 752, 0 }, { -587, -152, 788, 0 }, { -583, -153, 820, 0 }, { -580, -153, 858, 0 },
+ { -573, -154, 886, 0 }, { -567, -154, 924, 0 }, { -562, -155, 952, 0 }, { -554, -155, 988, 0 },
+ { -547, -156, 1022, 0 }, { -534, -156, 1065, 0 }, { -518, -157, 1108, 0 }, { -510, -157, 1147, 0 },
+ { -503, -158, 1172, 0 }, { -494, -158, 1206, 0 }, { -486, -157, 1242, 0 }, { -474, -157, 1274, 0 },
+ { -466, -157, 1303, 0 }, { -448, -156, 1363, 0 }, { -435, -156, 1400, 0 }, { -425, -155, 1428, 0 },
+ { -414, -154, 1464, 0 }, { -404, -153, 1498, 0 }, { -397, -150, 1532, 0 }, { -383, -149, 1565, 0 },
+ { -370, -148, 1604, 0 }, { -348, -144, 1667, 0 }, { -329, -142, 1714, 0 }, { -312, -141, 1744, 0 },
+ { -298, -138, 1785, 0 }, { -286, -137, 1812, 0 }, { -263, -135, 1860, 0 }, { -236, -134, 1890, 0 },
+ { -207, -134, 1927, 0 }, { -184, -133, 1949, 0 }, { -163, -133, 1965, 0 }, { -146, -133, 1985, 0 },
+ { -103, -132, 2022, 0 }, { -74, -132, 2056, 0 }, { -52, -132, 2078, 0 }, { -20, -132, 2101, 0 },
+ { 6, -132, 2118, 0 }, { 28, -132, 2133, 0 }, { 52, -132, 2154, 0 }, { 72, -132, 2169, 0 },
+ { 89, -132, 2183, 0 }, { 105, -132, 2196, 0 }, { 127, -132, 2215, 0 }, { 149, -132, 2233, 0 },
+ { 169, -132, 2245, 0 }, { 196, -132, 2262, 0 }, { 219, -132, 2277, 0 }, { 248, -132, 2293, 0 },
+ { 284, -132, 2311, 0 }, { 314, -132, 2330, 0 }, { 348, -132, 2339, 0 }, { 376, -132, 2346, 0 },
+ { 395, -132, 2343, 0 }, { 414, -132, 2344, 0 }, { 434, -132, 2342, 0 }, { 452, -132, 2341, 0 },
+ { 486, -132, 2328, 0 }, { 518, -132, 2322, 0 }, { 541, -132, 2312, 0 }, { 567, -132, 2305, 0 },
+ { 590, -132, 2298, 0 }, { 609, -132, 2287, 0 }, { 633, -132, 2277, 0 }, { 658, -132, 2267, 0 },
+ { 686, -132, 2251, 0 }, { 712, -132, 2235, 0 }, { 731, -132, 2227, 0 }, { 753, -132, 2214, 0 },
+ { 774, -132, 2200, 0 }, { 799, -132, 2181, 0 }, { 826, -132, 2160, 0 }, { 846, -132, 2144, 0 },
+ { 867, -132, 2122, 0 }, { 894, -132, 2097, 0 }, { 916, -132, 2070, 0 }, { 936, -132, 2043, 0 },
+ { 960, -132, 2001, 0 }, { 980, -132, 1968, 0 }, { 995, -132, 1936, 0 }, { 1008, -132, 1908, 0 },
+ { 1023, -132, 1882, 0 }, { 1048, -132, 1850, 0 }, { 1064, -132, 1820, 0 }, { 1077, -132, 1788, 0 },
+ { 1096, -133, 1757, 0 }, { 1113, -133, 1712, 0 }, { 1134, -134, 1667, 0 }, { 1150, -135, 1623, 0 },
+ { 1165, -135, 1582, 0 }, { 1186, -136, 1521, 0 }, { 1202, -136, 1480, 0 }, { 1219, -136, 1436, 0 },
+ { 1230, -135, 1397, 0 }, { 1249, -135, 1361, 0 }, { 1260, -134, 1327, 0 }, { 1270, -134, 1295, 0 },
+ { 1279, -133, 1258, 0 }, { 1292, -133, 1218, 0 }, { 1304, -132, 1177, 0 }, { 1305, -132, 1162, 0 },
+ { 1303, -132, 1146, 0 }, { 1302, -132, 1131, 0 }, { 1296, -132, 1115, 0 }, { 1291, -133, 1106, 0 },
+ { 1281, -133, 1097, 0 }, { 1275, -134, 1085, 0 }, { 1266, -136, 1074, 0 }, { 1254, -137, 1064, 0 },
+ { 1242, -138, 1060, 0 }, { 1225, -139, 1042, 0 }, { 1211, -138, 1034, 0 }, { 1196, -137, 1025, 0 },
+ { 1178, -134, 1018, 0 }, { 1165, -132, 1014, 0 }, { 1144, -130, 1009, 0 }, { 1124, -127, 993, 0 },
+ { 1105, -126, 986, 0 }, { 1084, -125, 981, 0 }, { 1059, -124, 980, 0 }, { 1039, -122, 972, 0 },
+ { 1016, -121, 974, 0 }, { 988, -120, 979, 0 }, { 964, -120, 983, 0 }, { 941, -121, 984, 0 },
+ { 914, -124, 988, 0 }, { 892, -124, 996, 0 }, { 865, -123, 1000, 0 }, { 848, -122, 1004, 0 },
+ { 829, -120, 1015, 0 }, { 811, -119, 1028, 0 }, { 785, -115, 1036, 0 }, { 765, -113, 1044, 0 },
+ { 747, -113, 1064, 0 }, { 724, -114, 1080, 0 }, { 707, -115, 1098, 0 }, { 682, -116, 1109, 0 },
+ { 663, -117, 1131, 0 }, { 645, -117, 1150, 0 }, { 625, -117, 1172, 0 }, { 606, -118, 1183, 0 },
+ { 573, -120, 1200, 0 }, { 554, -121, 1222, 0 }, { 532, -121, 1238, 0 }, { 508, -121, 1258, 0 },
+ { 482, -121, 1270, 0 }, { 461, -121, 1286, 0 }, { 435, -121, 1299, 0 }, { 413, -121, 1307, 0 },
+ { 389, -121, 1313, 0 }, { 369, -121, 1316, 0 }, { 348, -121, 1322, 0 }, { 330, -121, 1325, 0 },
+ { 309, -121, 1323, 0 }, { 284, -121, 1322, 0 }, { 258, -121, 1323, 0 }, { 235, -121, 1313, 0 },
+ { 216, -121, 1301, 0 }, { 186, -121, 1289, 0 }, { 170, -121, 1284, 0 }, { 155, -121, 1271, 0 },
+ { 141, -121, 1255, 0 }, { 126, -121, 1241, 0 }, { 118, -121, 1232, 0 }, { 109, -121, 1217, 0 },
+ { 101, -121, 1205, 0 }, { 94, -121, 1194, 0 }, { 86, -121, 1180, 0 }, { 78, -121, 1164, 0 },
+ { 71, -121, 1144, 0 }, { 63, -121, 1127, 0 }, { 57, -121, 1111, 0 }, { 49, -121, 1088, 0 },
+ { 44, -121, 1074, 0 }, { 38, -121, 1056, 0 }, { 34, -121, 1032, 0 }, { 29, -121, 1010, 0 },
+ { 26, -121, 986, 0 }, { 21, -121, 968, 0 }, { 14, -121, 940, 0 }, { 8, -121, 918, 0 },
+ { 8, -121, 893, 0 }, { 4, -121, 872, 0 }, { 3, -121, 851, 0 }, { 1, -121, 829, 0 },
+ { 0, -121, 803, 0 }, { -1, -121, 788, 0 }, { -5, -121, 749, 0 }, { -7, -121, 713, 0 },
+ { -11, -121, 678, 0 }, { -8, -121, 642, 0 }, { -8, -121, 608, 0 }, { -7, -121, 577, 0 },
+ { -8, -121, 556, 0 }, { -11, -121, 515, 0 }, { -9, -121, 484, 0 }, { -9, -121, 453, 0 },
+ { -8, -121, 416, 0 }, { -6, -121, 394, 0 }, { -3, -121, 345, 0 }, { -2, -121, 305, 0 },
+ { -1, -121, 251, 0 }, { -1, -121, 214, 0 }, { -2, -121, 189, 0 }, { -1, -121, 156, 0 },
+ { 1, -121, 124, 0 }, { 4, -121, 86, 0 }, { 6, -121, 66, 0 }, { 8, -121, 36, 0 },
+ { 13, -121, 0, 0 }, { 15, -121, -14, 0 }, { -32768, -32768, -32768, 0 }
};
Harbour::Harbour() {
@@ -541,7 +197,7 @@ Harbour::Harbour() {
Props.NearPersp = 9.0f;
Props.FarPersp = 4500.0f;
- Props.PathSizes = {459, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
+ Props.PathSizes = { 459, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@@ -579,20 +235,20 @@ Harbour::Harbour() {
Props.Minimap.FinishlineX = 0;
Props.Minimap.FinishlineY = 0;
- Props.Skybox.TopRight = {120, 140, 188};
- Props.Skybox.BottomRight = {216, 232, 248};
- Props.Skybox.BottomLeft = {216, 232, 248};
- Props.Skybox.TopLeft = {40, 184, 208};
- 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 = { 120, 140, 188 };
+ Props.Skybox.BottomRight = { 216, 232, 248 };
+ Props.Skybox.BottomLeft = { 216, 232, 248 };
+ Props.Skybox.TopLeft = { 40, 184, 208 };
+ 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;
}
TrackSections harbour_surfaces[] = {
- { road_map_001_mesh, 1, 255, 0x0000 },
- { ground_map_mesh, 8, 255, 0x0000 },
+ { road_map_001_mesh, 1, 255, 0x0000 },
+ { ground_map_mesh, 8, 255, 0x0000 },
{ 0x00000000, 0, 0, 0x00000 },
};
@@ -600,10 +256,7 @@ void Harbour::Load() {
Course::Load(road_map_001_mesh_vtx_0, NULL);
// The light gets overridden in hm_intro, reset to normal
- ground_f3d_material_013_lights = gdSPDefLights1(
- 0x7F, 0x7F, 0x7F,
- 0xFF, 0xFF, 0xFF, 0x49, 0x49, 0x49
- );
+ ground_f3d_material_013_lights = gdSPDefLights1(0x7F, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0x49, 0x49, 0x49);
generate_collision_mesh_with_default_section_id(ground_map_mesh, 8);
generate_collision_mesh_with_default_section_id(road_map_001_mesh, 1);
@@ -612,7 +265,7 @@ void Harbour::Load() {
generate_collision_mesh_with_defaults(bush_map_004_mesh);
generate_collision_mesh_with_defaults(statue_map_005_mesh);
- parse_course_displaylists((TrackSections*)harbour_surfaces);
+ parse_course_displaylists((TrackSections*) harbour_surfaces);
func_80295C6C();
Props.WaterLevel = gCourseMinY - 10.0f;
}
@@ -631,58 +284,58 @@ void Harbour::LoadTextures() {
}
Path2D harbour_path2D[] = {
- { 0, 0},
- { 0, -100},
- { 0, -200},
- { 0, -300},
- { 0, -400},
- { 0, -500},
- { 0, -600},
- { 0, -700},
- { 0, -800},
- { 0, -900},
- { 0, -1000},
- { 0, -1096}, // Main point 1
- { 100, -1090},
- { 200, -1085},
- { 300, -1080},
- { 400, -1075},
- { 500, -1072}, // Curve begins to smooth here
- { 600, -1068},
- { 700, -1065},
- { 800, -1063},
- { 900, -1061},
- { 984, -1060}, // Main point 2
- { 990, -900},
- { 995, -800},
- { 997, -700},
- { 998, -600},
- { 999, -500},
- { 999, -400},
- { 999, -300},
- { 999, -200},
- { 999, -100},
- { 999, 0},
- { 999, 100},
- { 999, 200},
- { 999, 300},
- { 999, 400},
- { 999, 500},
- { 999, 600},
- { 999, 700},
- { 999, 800},
- { 999, 900},
- { 999, 940}, // Main point 3
- { 900, 945},
- { 800, 945},
- { 700, 947},
- { 600, 948},
- { 500, 949},
- { 400, 949},
- { 300, 949},
- { 200, 950},
- { 100, 950},
- { 0, 950}, // Main point 4
+ { 0, 0 },
+ { 0, -100 },
+ { 0, -200 },
+ { 0, -300 },
+ { 0, -400 },
+ { 0, -500 },
+ { 0, -600 },
+ { 0, -700 },
+ { 0, -800 },
+ { 0, -900 },
+ { 0, -1000 },
+ { 0, -1096 }, // Main point 1
+ { 100, -1090 },
+ { 200, -1085 },
+ { 300, -1080 },
+ { 400, -1075 },
+ { 500, -1072 }, // Curve begins to smooth here
+ { 600, -1068 },
+ { 700, -1065 },
+ { 800, -1063 },
+ { 900, -1061 },
+ { 984, -1060 }, // Main point 2
+ { 990, -900 },
+ { 995, -800 },
+ { 997, -700 },
+ { 998, -600 },
+ { 999, -500 },
+ { 999, -400 },
+ { 999, -300 },
+ { 999, -200 },
+ { 999, -100 },
+ { 999, 0 },
+ { 999, 100 },
+ { 999, 200 },
+ { 999, 300 },
+ { 999, 400 },
+ { 999, 500 },
+ { 999, 600 },
+ { 999, 700 },
+ { 999, 800 },
+ { 999, 900 },
+ { 999, 940 }, // Main point 3
+ { 900, 945 },
+ { 800, 945 },
+ { 700, 947 },
+ { 600, 948 },
+ { 500, 949 },
+ { 400, 949 },
+ { 300, 949 },
+ { 200, 950 },
+ { 100, 950 },
+ { 0, 950 }, // Main point 4
// End of path
{ -32768, -32768 } // Terminator
@@ -690,37 +343,27 @@ Path2D harbour_path2D[] = {
void Harbour::BeginPlay() {
struct ActorSpawnData itemboxes[] = {
- { 200, 1500, 200 , 0},
- { 350, 2500, 300 , 1},
- { 400, 2000, 350 , 2},
- { 40, 0, -800, 0},
- { -40, 0, -800, 0},
- { 0, 0, -800, 0},
- { 999, 6, 482, 0},
- { 1064, 8, 275, {0}},
- { 1028, 5, -39 , {0}},
- { 320, 0, 1020, {0}},
- { 293, 0, 950, {0}},
- {{ -32768, 0, 0 }, {0}},
+ { 200, 1500, 200, 0 }, { 350, 2500, 300, 1 }, { 400, 2000, 350, 2 }, { 40, 0, -800, 0 },
+ { -40, 0, -800, 0 }, { 0, 0, -800, 0 }, { 999, 6, 482, 0 }, { 1064, 8, 275, { 0 } },
+ { 1028, 5, -39, { 0 } }, { 320, 0, 1020, { 0 } }, { 293, 0, 950, { 0 } }, { { -32768, 0, 0 }, { 0 } },
};
struct ActorSpawnData rocks[] = {
- {{ 200, 1500, 200 }, {0}},
- {{ 350, 2500, 300 }, {1}},
- {{ 400, 2000, 350 }, {2}},
- {{ -32768, 0, 0 }, {0}},
+ { { 200, 1500, 200 }, { 0 } },
+ { { 350, 2500, 300 }, { 1 } },
+ { { 400, 2000, 350 }, { 2 } },
+ { { -32768, 0, 0 }, { 0 } },
};
- //spawn_all_item_boxes(itemboxes);
+ // spawn_all_item_boxes(itemboxes);
- Vec3f test = {-100, 0, -150};
- Vec3s rot = {0, 0, 0};
- Vec3f vel = {0, 0, 0};
+ Vec3f test = { -100, 0, -150 };
+ Vec3s rot = { 0, 0, 0 };
+ Vec3f vel = { 0, 0, 0 };
- //add_actor_to_empty_slot(test, rot, vel, ACTOR_TREE_MARIO_RACEWAY);
+ // add_actor_to_empty_slot(test, rot, vel, ACTOR_TREE_MARIO_RACEWAY);
-
- Vec3f pos = {0, 80, 0};
+ Vec3f pos = { 0, 80, 0 };
// gWorldInstance.AddActor(new ACloud(pos));
// gWorldInstance.AddActor(new OSeagull(0, pos));
@@ -729,23 +372,23 @@ void Harbour::BeginPlay() {
// gWorldInstance.AddActor(new OSeagull(3, pos));
// gWorldInstance.AddObject(new OCheepCheep(FVector(0, 40, 0), OCheepCheep::CheepType::RACE, IPathSpan(0, 10)));
// gWorldInstance.AddObject(new OTrophy(FVector(0,0,0), OTrophy::TrophyType::GOLD, OTrophy::Behaviour::GO_FISH));
- //gWorldInstance.AddObject(new OSnowman(FVector(0, 0, 0)));
- //gWorldInstance.AddObject(new OTrashBin(FVector(0.0f, 0.0f, 0.0f), IRotator(0, 90, 0), 1.0f, OTrashBin::Behaviour::MUNCHING));
+ // gWorldInstance.AddObject(new OSnowman(FVector(0, 0, 0)));
+ // gWorldInstance.AddObject(new OTrashBin(FVector(0.0f, 0.0f, 0.0f), IRotator(0, 90, 0), 1.0f,
+ // OTrashBin::Behaviour::MUNCHING));
- //gWorldInstance.AddObject(new OHedgehog(FVector(0, 0, 0), FVector2D(0, -200), 9));
- //gWorldInstance.AddObject(new OFlagpole(FVector(0, 0, -200), 0x400));
-// gWorldInstance.AddObject(new OHotAirBalloon(FVector(0.0, 20.0f, -200.0f)));
+ // gWorldInstance.AddObject(new OHedgehog(FVector(0, 0, 0), FVector2D(0, -200), 9));
+ // gWorldInstance.AddObject(new OFlagpole(FVector(0, 0, -200), 0x400));
+ // gWorldInstance.AddObject(new OHotAirBalloon(FVector(0.0, 20.0f, -200.0f)));
- //gWorldInstance.AddObject(new OCrab(FVector2D(0, 0), FVector2D(0, -200)));
-// gWorldInstance.AddActor(new ABowserStatue(FVector(-200, 0, 0), ABowserStatue::Behaviour::CRUSH));
+ // gWorldInstance.AddObject(new OCrab(FVector2D(0, 0), FVector2D(0, -200)));
+ // gWorldInstance.AddActor(new ABowserStatue(FVector(-200, 0, 0), ABowserStatue::Behaviour::CRUSH));
-// gWorldInstance.AddObject(new OBoos(10, IPathSpan(0, 5), IPathSpan(18, 23), IPathSpan(25, 50)));
+ // gWorldInstance.AddObject(new OBoos(10, IPathSpan(0, 5), IPathSpan(18, 23), IPathSpan(25, 50)));
- // gVehicle2DWaypoint = harbour_path2D;
- //gVehicle2DWaypointLength = 53;
+ // gVehicle2DWaypoint = harbour_path2D;
+ // gVehicle2DWaypointLength = 53;
// D_80162EB0 = spawn_actor_on_surface(harbour_path2D[0].x, 2000.0f, harbour_path2D[0].z);
-
// DEBUG ONLY TO VISUALIZE PATH
// for (size_t i = 0; i < ARRAY_COUNT(harbour_path); i++) {
// if (i % 10 == 1) {
@@ -754,14 +397,13 @@ void Harbour::BeginPlay() {
// add_actor_to_empty_slot(itemPos, rot, vel, ACTOR_ITEM_BOX);
// }
// }
- //gWorldInstance.AddActor(new AShip(FVector(-1694, -111, 1451), AShip::Skin::GHOSTSHIP));
- //gWorldInstance.AddActor(new AShip(FVector(2811, -83, 966), AShip::Skin::SHIP2));
- //gWorldInstance.AddObject(new OGrandPrixBalloons(FVector(16, -136, -34)));
+ // gWorldInstance.AddActor(new AShip(FVector(-1694, -111, 1451), AShip::Skin::GHOSTSHIP));
+ // gWorldInstance.AddActor(new AShip(FVector(2811, -83, 966), AShip::Skin::SHIP2));
+ // gWorldInstance.AddObject(new OGrandPrixBalloons(FVector(16, -136, -34)));
}
void Harbour::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);
}
@@ -775,8 +417,7 @@ void Harbour::WhatDoesThisDo(Player* player, int8_t playerId) {
}
void Harbour::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);
}
@@ -813,4 +454,4 @@ void Harbour::Render(struct UnkStruct_800DC5EC* arg0) {
bool Harbour::IsMod() {
return true;
-} \ No newline at end of file
+}
diff --git a/src/engine/courses/Harbour.h b/src/engine/courses/Harbour.h
index 834154f84..d7efc459b 100644
--- a/src/engine/courses/Harbour.h
+++ b/src/engine/courses/Harbour.h
@@ -4,26 +4,26 @@
#include "Course.h"
extern "C" {
- #include "mario_raceway_vertices.h"
- #include "mario_raceway_displaylists.h"
- #include "course_offsets.h"
- #include "camera.h"
- #include "data/some_data.h"
- #include "objects.h"
- #include "path_spawn_metadata.h"
- #include "mario_raceway_data.h"
- extern const course_texture test_course_textures[];
+#include "mario_raceway_vertices.h"
+#include "mario_raceway_displaylists.h"
+#include "course_offsets.h"
+#include "camera.h"
+#include "data/some_data.h"
+#include "objects.h"
+#include "path_spawn_metadata.h"
+#include "mario_raceway_data.h"
+extern const course_texture test_course_textures[];
}
class Harbour : public Course {
-public:
- virtual ~Harbour() = default; // Virtual destructor for proper cleanup in derived classes
+ public:
+ virtual ~Harbour() = default; // Virtual destructor for proper cleanup in derived classes
// Constructor
explicit Harbour();
-// virtual void Load(const char* courseVtx,
-// course_texture* textures, const char* displaylists, size_t dlSize);
+ // virtual void Load(const char* courseVtx,
+ // course_texture* textures, const char* displaylists, size_t dlSize);
virtual void Load() override;
virtual void LoadTextures() override;
virtual void BeginPlay() override;
diff --git a/src/engine/courses/KalimariDesert.cpp b/src/engine/courses/KalimariDesert.cpp
index 8f4c3e893..58c0a7876 100644
--- a/src/engine/courses/KalimariDesert.cpp
+++ b/src/engine/courses/KalimariDesert.cpp
@@ -13,27 +13,27 @@
#include "engine/vehicles/Train.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 "collision.h"
- #include "memory.h"
- #include "course.h"
- extern const char *kalimari_desert_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 "collision.h"
+#include "memory.h"
+#include "course.h"
+extern const char* kalimari_desert_dls[];
}
const course_texture kalimari_desert_textures[] = {
@@ -80,7 +80,7 @@ KalimariDesert::KalimariDesert() {
Props.NearPersp = 10.0f;
Props.FarPersp = 7000.0f;
- Props.PathSizes = {0x2BC, 1, 1, 1, 0x226, 0, 0, 0, 0, 0, 0};
+ Props.PathSizes = { 0x2BC, 1, 1, 1, 0x226, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@@ -102,12 +102,12 @@ KalimariDesert::KalimariDesert() {
Props.D_0D009808[2] = 5.75f;
Props.D_0D009808[3] = 6.3333334f;
- Props.PathTable[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_kalimari_desert_unknown_waypoints);
+ Props.PathTable[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_kalimari_desert_unknown_waypoints);
Props.PathTable[1] = NULL;
Props.PathTable[2] = NULL;
Props.PathTable[3] = NULL;
- Props.PathTable2[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_kalimari_desert_track_waypoints);
+ Props.PathTable2[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_kalimari_desert_track_waypoints);
Props.PathTable2[1] = NULL;
Props.PathTable2[2] = NULL;
Props.PathTable2[3] = NULL;
@@ -116,21 +116,21 @@ KalimariDesert::KalimariDesert() {
Props.Clouds = gKalimariDesertClouds;
Props.CloudList = gKalimariDesertClouds;
- Props.Skybox.TopRight = {195, 231, 255};
- Props.Skybox.BottomRight = {255, 192, 0};
- Props.Skybox.BottomLeft = {255, 192, 0};
- Props.Skybox.TopLeft = {195, 231, 255};
- Props.Skybox.FloorTopRight = {255, 192, 0};
- Props.Skybox.FloorBottomRight = {0, 0, 0};
- Props.Skybox.FloorBottomLeft = {0, 0, 0};
- Props.Skybox.FloorTopLeft = {255, 192, 0};
+ Props.Skybox.TopRight = { 195, 231, 255 };
+ Props.Skybox.BottomRight = { 255, 192, 0 };
+ Props.Skybox.BottomLeft = { 255, 192, 0 };
+ Props.Skybox.TopLeft = { 195, 231, 255 };
+ Props.Skybox.FloorTopRight = { 255, 192, 0 };
+ Props.Skybox.FloorBottomRight = { 0, 0, 0 };
+ Props.Skybox.FloorBottomLeft = { 0, 0, 0 };
+ Props.Skybox.FloorTopLeft = { 255, 192, 0 };
Props.Sequence = MusicSeq::MUSIC_SEQ_KALIMARI_DESERT;
}
void KalimariDesert::Load() {
Course::Load();
- parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_kalimari_desert_addr));
+ parse_course_displaylists((TrackSections*) LOAD_ASSET_RAW(d_course_kalimari_desert_addr));
func_80295C6C();
Props.WaterLevel = gCourseMinY - 10.0f;
}
@@ -149,41 +149,40 @@ void KalimariDesert::BeginPlay() {
Vec3f velocity = { 0.0f, 0.0f, 0.0f };
Vec3s rotation = { 0, 0, 0 };
- spawn_foliage((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_kalimari_desert_cactus_spawn));
- spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_kalimari_desert_item_box_spawns));
+ spawn_foliage((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_kalimari_desert_cactus_spawn));
+ spawn_all_item_boxes((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_kalimari_desert_item_box_spawns));
if (gGamestate != CREDITS_SEQUENCE) {
- Vec3f crossingPos = {-2500, 2, 2355};
- Vec3f crossingPos2 = {-1639, 2, 68};
+ Vec3f crossingPos = { -2500, 2, 2355 };
+ Vec3f crossingPos2 = { -1639, 2, 68 };
uintptr_t* crossing1 = (uintptr_t*) gWorldInstance.AddCrossing(crossingPos, 306, 310, 900.0f, 650.0f);
uintptr_t* crossing2 = (uintptr_t*) gWorldInstance.AddCrossing(crossingPos2, 176, 182, 900.0f, 650.0f);
vec3f_set(position, -1680.0f, 2.0f, 35.0f);
position[0] *= gCourseDirection;
- rrxing = (struct RailroadCrossing*) GET_ACTOR(add_actor_to_empty_slot(position, rotation, velocity,
- ACTOR_RAILROAD_CROSSING));
+ rrxing = (struct RailroadCrossing*) GET_ACTOR(
+ add_actor_to_empty_slot(position, rotation, velocity, ACTOR_RAILROAD_CROSSING));
rrxing->crossingTrigger = crossing2;
vec3f_set(position, -1600.0f, 2.0f, 35.0f);
position[0] *= gCourseDirection;
- rrxing = (struct RailroadCrossing*) GET_ACTOR(add_actor_to_empty_slot(position, rotation, velocity,
- ACTOR_RAILROAD_CROSSING));
+ rrxing = (struct RailroadCrossing*) GET_ACTOR(
+ add_actor_to_empty_slot(position, rotation, velocity, ACTOR_RAILROAD_CROSSING));
rrxing->crossingTrigger = crossing2;
// Original game forgot to put gCourseDirection to face the crossing the right direction in extra mode
vec3s_set(rotation, 0, -0x2000 * gCourseDirection, 0);
vec3f_set(position, -2459.0f, 2.0f, 2263.0f);
position[0] *= gCourseDirection;
- rrxing = (struct RailroadCrossing*) GET_ACTOR(add_actor_to_empty_slot(position, rotation, velocity,
- ACTOR_RAILROAD_CROSSING));
+ rrxing = (struct RailroadCrossing*) GET_ACTOR(
+ add_actor_to_empty_slot(position, rotation, velocity, ACTOR_RAILROAD_CROSSING));
rrxing->crossingTrigger = crossing1;
vec3f_set(position, -2467.0f, 2.0f, 2375.0f);
position[0] *= gCourseDirection;
- rrxing = (struct RailroadCrossing*) GET_ACTOR(add_actor_to_empty_slot(position, rotation, velocity,
- ACTOR_RAILROAD_CROSSING));
+ rrxing = (struct RailroadCrossing*) GET_ACTOR(
+ add_actor_to_empty_slot(position, rotation, velocity, ACTOR_RAILROAD_CROSSING));
rrxing->crossingTrigger = crossing1;
-
generate_train_waypoints();
s32 centerWaypoint = 160;
@@ -240,11 +239,14 @@ void KalimariDesert::InitCourseObjects() {
}
}
-void KalimariDesert::SomeSounds() {}
+void KalimariDesert::SomeSounds() {
+}
-void KalimariDesert::WhatDoesThisDo(Player* player, int8_t playerId) {}
+void KalimariDesert::WhatDoesThisDo(Player* player, int8_t playerId) {
+}
-void KalimariDesert::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
+void KalimariDesert::WhatDoesThisDoAI(Player* player, int8_t playerId) {
+}
void KalimariDesert::Render(struct UnkStruct_800DC5EC* arg0) {
set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
@@ -257,30 +259,31 @@ void KalimariDesert::Render(struct UnkStruct_800DC5EC* arg0) {
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
// d_course_kalimari_desert_packed_dl_71C8
- gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x070071C8)));
+ gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x070071C8)));
}
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEI, G_CC_MODULATEI);
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
render_course_segments(kalimari_desert_dls, arg0);
// d_course_kalimari_desert_packed_dl_1ED8
- gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x07001ED8)));
+ gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x07001ED8)));
// d_course_kalimari_desert_packed_dl_1B18
- gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x07001B18)));
+ gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x07001B18)));
// d_course_kalimari_desert_packed_dl_8330
- gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x07008330)));
+ gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x07008330)));
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
// d_course_kalimari_desert_packed_dl_998
- gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x07000998)));
+ gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x07000998)));
// d_course_kalimari_desert_packed_dl_270
- gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x07000270)));
+ gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x07000270)));
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
}
void KalimariDesert::RenderCredits() {
- gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_kalimari_desert_dl_22E00));
+ gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_kalimari_desert_dl_22E00));
}
-void KalimariDesert::Destroy() { }
+void KalimariDesert::Destroy() {
+}
diff --git a/src/engine/courses/KalimariDesert.h b/src/engine/courses/KalimariDesert.h
index fe8b21f23..5dc6c2eba 100644
--- a/src/engine/courses/KalimariDesert.h
+++ b/src/engine/courses/KalimariDesert.h
@@ -6,26 +6,26 @@
#include "engine/vehicles/Train.h"
extern "C" {
- #include "assets/kalimari_desert_vertices.h"
- #include "assets/kalimari_desert_displaylists.h"
- #include "assets/kalimari_desert_data.h"
- #include "course_offsets.h"
- #include "camera.h"
- #include "data/some_data.h"
- #include "objects.h"
- #include "path_spawn_metadata.h"
- extern const course_texture kalimari_desert_textures[];
+#include "assets/kalimari_desert_vertices.h"
+#include "assets/kalimari_desert_displaylists.h"
+#include "assets/kalimari_desert_data.h"
+#include "course_offsets.h"
+#include "camera.h"
+#include "data/some_data.h"
+#include "objects.h"
+#include "path_spawn_metadata.h"
+extern const course_texture kalimari_desert_textures[];
}
class KalimariDesert : public Course {
-public:
- virtual ~KalimariDesert() = default; // Virtual destructor for proper cleanup in derived classes
+ public:
+ virtual ~KalimariDesert() = default; // Virtual destructor for proper cleanup in derived classes
// Constructor
explicit KalimariDesert();
-// virtual void Load(const char* courseVtx,
-// course_texture* textures, const char* displaylists, size_t dlSize);
+ // virtual void Load(const char* courseVtx,
+ // course_texture* textures, const char* displaylists, size_t dlSize);
virtual void Load() override;
virtual void LoadTextures() override;
virtual void BeginPlay() override;
@@ -37,7 +37,7 @@ public:
virtual void RenderCredits() override;
virtual void Destroy() override;
-private:
+ private:
size_t _numTrains = 2;
size_t _numCarriages = 5;
ATrain::TenderStatus _tender = ATrain::TenderStatus::HAS_TENDER;
diff --git a/src/engine/courses/KoopaTroopaBeach.cpp b/src/engine/courses/KoopaTroopaBeach.cpp
index fff1b7b55..9d39bd25c 100644
--- a/src/engine/courses/KoopaTroopaBeach.cpp
+++ b/src/engine/courses/KoopaTroopaBeach.cpp
@@ -12,29 +12,29 @@
#include "assets/koopa_troopa_beach_data.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 "collision.h"
- #include "code_8003DC40.h"
- #include "memory.h"
- #include "course.h"
- extern const char *koopa_troopa_beach_dls[];
- extern s8 gPlayerCount;
+#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 "collision.h"
+#include "code_8003DC40.h"
+#include "memory.h"
+#include "course.h"
+extern const char* koopa_troopa_beach_dls[];
+extern s8 gPlayerCount;
}
const course_texture koopa_troopa_beach_textures[] = {
@@ -86,7 +86,7 @@ KoopaTroopaBeach::KoopaTroopaBeach() {
Props.NearPersp = 1.0f;
Props.FarPersp = 5000.0f;
- Props.PathSizes = {0x2BC, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
+ Props.PathSizes = { 0x2BC, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@@ -108,13 +108,13 @@ KoopaTroopaBeach::KoopaTroopaBeach() {
Props.D_0D009808[2] = 5.75f;
Props.D_0D009808[3] = 6.3333334f;
- Props.PathTable[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_koopa_troopa_beach_unknown_waypoints);
+ Props.PathTable[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_koopa_troopa_beach_unknown_waypoints);
Props.PathTable[1] = NULL;
Props.PathTable[2] = NULL;
Props.PathTable[3] = NULL;
- Props.PathTable2[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_koopa_troopa_beach_track_waypoints);
- Props.PathTable2[1] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_koopa_troopa_beach_track_waypoints_2);
+ Props.PathTable2[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_koopa_troopa_beach_track_waypoints);
+ Props.PathTable2[1] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_koopa_troopa_beach_track_waypoints_2);
Props.PathTable2[2] = NULL;
Props.PathTable2[3] = NULL;
@@ -122,30 +122,30 @@ KoopaTroopaBeach::KoopaTroopaBeach() {
Props.Clouds = gKoopaTroopaBeachClouds;
Props.CloudList = gKoopaTroopaBeachClouds;
- Props.Skybox.TopRight = {48, 152, 120};
- Props.Skybox.BottomRight = {216, 232, 248};
- Props.Skybox.BottomLeft = {216, 232, 248};
- Props.Skybox.TopLeft = {48, 152, 120};
- Props.Skybox.FloorTopRight = {48, 152, 120};
- Props.Skybox.FloorBottomRight = {0, 0, 0};
- Props.Skybox.FloorBottomLeft = {0, 0, 0};
- Props.Skybox.FloorTopLeft = {48, 152, 120};
+ Props.Skybox.TopRight = { 48, 152, 120 };
+ Props.Skybox.BottomRight = { 216, 232, 248 };
+ Props.Skybox.BottomLeft = { 216, 232, 248 };
+ Props.Skybox.TopLeft = { 48, 152, 120 };
+ Props.Skybox.FloorTopRight = { 48, 152, 120 };
+ Props.Skybox.FloorBottomRight = { 0, 0, 0 };
+ Props.Skybox.FloorBottomLeft = { 0, 0, 0 };
+ Props.Skybox.FloorTopLeft = { 48, 152, 120 };
Props.Sequence = MusicSeq::MUSIC_SEQ_KOOPA_TROOPA_BEACH;
Props.WaterLevel = 0.0f;
gWaterVelocity = -0.1f;
- WaterVolumes.push_back({0.8f, 67.0f, 239.0f, 2233.0f, 2405.0f});
+ WaterVolumes.push_back({ 0.8f, 67.0f, 239.0f, 2233.0f, 2405.0f });
}
void KoopaTroopaBeach::Load() {
Course::Load();
- parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_koopa_troopa_beach_addr));
+ parse_course_displaylists((TrackSections*) LOAD_ASSET_RAW(d_course_koopa_troopa_beach_addr));
func_80295C6C();
- find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x0700ADE0), -0x6A, 255, 255, 255);
- find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x0700A540), -0x6A, 255, 255, 255);
- find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07009E70), -0x6A, 255, 255, 255);
- find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07000358), -0x6A, 255, 255, 255);
+ find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x0700ADE0), -0x6A, 255, 255, 255);
+ find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x0700A540), -0x6A, 255, 255, 255);
+ find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07009E70), -0x6A, 255, 255, 255);
+ find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07000358), -0x6A, 255, 255, 255);
}
void KoopaTroopaBeach::LoadTextures() {
@@ -153,8 +153,8 @@ void KoopaTroopaBeach::LoadTextures() {
void KoopaTroopaBeach::BeginPlay() {
init_actor_hot_air_balloon_item_box(328.0f * gCourseDirection, 70.0f, 2541.0f);
- spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_koopa_troopa_beach_item_box_spawns));
- spawn_palm_trees((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_koopa_troopa_beach_tree_spawn));
+ spawn_all_item_boxes((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_koopa_troopa_beach_item_box_spawns));
+ spawn_palm_trees((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_koopa_troopa_beach_tree_spawn));
if (gGamestate != CREDITS_SEQUENCE) {
gWorldInstance.AddObject(new OCrab(FVector2D(-1809, 625), FVector2D(-1666, 594)));
@@ -201,24 +201,24 @@ void KoopaTroopaBeach::InitCourseObjects() {
void KoopaTroopaBeach::UpdateCourseObjects() {
if (gGamestate != CREDITS_SEQUENCE) {
- //update_crabs();
+ // update_crabs();
}
if ((gPlayerCount == 1) || (gPlayerCount == 2) || (gGamestate == CREDITS_SEQUENCE)) {
- //update_seagulls();
+ // update_seagulls();
}
}
void KoopaTroopaBeach::RenderCourseObjects(s32 cameraId) {
if (gGamestate != CREDITS_SEQUENCE) {
- //render_object_crabs(cameraId);
+ // render_object_crabs(cameraId);
}
if (gGamestate != CREDITS_SEQUENCE) {
if ((gPlayerCount == 1) || (gPlayerCount == 2)) {
- //render_object_seagulls(cameraId);
+ // render_object_seagulls(cameraId);
}
} else {
- //render_object_seagulls(cameraId);
+ // render_object_seagulls(cameraId);
}
}
@@ -227,9 +227,11 @@ void KoopaTroopaBeach::SomeSounds() {
func_800C9D80(D_8015F738, D_802B91C8, 0x51028001);
}
-void KoopaTroopaBeach::WhatDoesThisDo(Player* player, int8_t playerId) {}
+void KoopaTroopaBeach::WhatDoesThisDo(Player* player, int8_t playerId) {
+}
-void KoopaTroopaBeach::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
+void KoopaTroopaBeach::WhatDoesThisDoAI(Player* player, int8_t playerId) {
+}
void KoopaTroopaBeach::Render(struct UnkStruct_800DC5EC* arg0) {
gDPPipeSync(gDisplayListHead++);
@@ -247,7 +249,7 @@ void KoopaTroopaBeach::Render(struct UnkStruct_800DC5EC* arg0) {
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
// d_course_koopa_troopa_beach_packed_dl_9688
gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual(reinterpret_cast<void*>(0x07009688)));
- render_course_segments((const char**)d_course_koopa_troopa_beach_dl_list1, arg0);
+ render_course_segments((const char**) d_course_koopa_troopa_beach_dl_list1, arg0);
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
@@ -258,10 +260,11 @@ void KoopaTroopaBeach::Render(struct UnkStruct_800DC5EC* arg0) {
}
void KoopaTroopaBeach::RenderCredits() {
- gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_koopa_troopa_beach_dl_18D68));
+ gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_koopa_troopa_beach_dl_18D68));
}
-void KoopaTroopaBeach::SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) {
+void KoopaTroopaBeach::SomeCollisionThing(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5,
+ f32* arg6, f32* arg7) {
func_8003E37C(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
}
@@ -286,9 +289,9 @@ void KoopaTroopaBeach::ScrollingTextures() {
}
// waterfall animation
// d_course_koopa_troopa_beach_packed_dl_9D58
- find_and_set_tile_size((uintptr_t)segmented_gfx_to_virtual(reinterpret_cast<void*>(0x07009D58)), 0, D_802B87BC);
+ find_and_set_tile_size((uintptr_t) segmented_gfx_to_virtual(reinterpret_cast<void*>(0x07009D58)), 0, D_802B87BC);
// d_course_koopa_troopa_beach_packed_dl_9CD0
- find_and_set_tile_size((uintptr_t)segmented_gfx_to_virtual(reinterpret_cast<void*>(0x07009CD0)), 0, D_802B87C4);
+ find_and_set_tile_size((uintptr_t) segmented_gfx_to_virtual(reinterpret_cast<void*>(0x07009CD0)), 0, D_802B87C4);
D_802B87CC = random_int(300) / 40;
if (D_802B87C8 < 0) {
D_802B87C8 = random_int(300) / 40;
@@ -297,11 +300,12 @@ void KoopaTroopaBeach::ScrollingTextures() {
}
// Waterfall bubbling effect? (unused)
// d_course_koopa_troopa_beach_packed_dl_2E8
- find_and_set_tile_size((uintptr_t)segmented_gfx_to_virtual(reinterpret_cast<void*>(0x070002E8)), D_802B87C8, D_802B87CC);
-
+ find_and_set_tile_size((uintptr_t) segmented_gfx_to_virtual(reinterpret_cast<void*>(0x070002E8)), D_802B87C8,
+ D_802B87CC);
}
-void KoopaTroopaBeach::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) {
+void KoopaTroopaBeach::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot,
+ uint16_t playerDirection) {
Mat4 matrix;
Vec3f vector;
@@ -321,7 +325,7 @@ void KoopaTroopaBeach::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pat
case 37:
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
// d_course_koopa_troopa_beach_packed_dl_9E70
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07009E70));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07009E70));
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
break;
}
@@ -335,11 +339,12 @@ void KoopaTroopaBeach::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pat
gDPSetBlendMask(gDisplayListHead++, 0xFF);
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
- render_course_segments((const char**)koopa_troopa_beach_dls2, screen);
+ render_course_segments((const char**) koopa_troopa_beach_dls2, screen);
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 1, 1, G_OFF);
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
gDPSetAlphaCompare(gDisplayListHead++, G_AC_NONE);
gDPPipeSync(gDisplayListHead++);
}
-void KoopaTroopaBeach::Destroy() {}
+void KoopaTroopaBeach::Destroy() {
+}
diff --git a/src/engine/courses/KoopaTroopaBeach.h b/src/engine/courses/KoopaTroopaBeach.h
index 7ebd8bac8..4f5ce6e8d 100644
--- a/src/engine/courses/KoopaTroopaBeach.h
+++ b/src/engine/courses/KoopaTroopaBeach.h
@@ -7,26 +7,26 @@
#include "World.h"
extern "C" {
- #include "assets/koopa_troopa_beach_vertices.h"
- #include "assets/koopa_troopa_beach_displaylists.h"
- #include "assets/koopa_troopa_beach_data.h"
- #include "course_offsets.h"
- #include "camera.h"
- #include "data/some_data.h"
- #include "objects.h"
- #include "path_spawn_metadata.h"
- extern const course_texture koopa_troopa_beach_textures[];
+#include "assets/koopa_troopa_beach_vertices.h"
+#include "assets/koopa_troopa_beach_displaylists.h"
+#include "assets/koopa_troopa_beach_data.h"
+#include "course_offsets.h"
+#include "camera.h"
+#include "data/some_data.h"
+#include "objects.h"
+#include "path_spawn_metadata.h"
+extern const course_texture koopa_troopa_beach_textures[];
}
class KoopaTroopaBeach : public Course {
-public:
- virtual ~KoopaTroopaBeach() = default; // Virtual destructor for proper cleanup in derived classes
+ public:
+ virtual ~KoopaTroopaBeach() = default; // Virtual destructor for proper cleanup in derived classes
// Constructor
explicit KoopaTroopaBeach();
-// virtual void Load(const char* courseVtx,
-// course_texture* textures, const char* displaylists, size_t dlSize);
+ // virtual void Load(const char* courseVtx,
+ // course_texture* textures, const char* displaylists, size_t dlSize);
virtual void Load() override;
virtual void LoadTextures() override;
virtual void BeginPlay() override;
@@ -37,9 +37,11 @@ public:
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
virtual void Render(struct UnkStruct_800DC5EC*) override;
- virtual void RenderCredits() override;
- virtual void SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) override;
+ virtual void RenderCredits() override;
+ virtual void SomeCollisionThing(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6,
+ f32* arg7) override;
virtual void ScrollingTextures() override;
- virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) override;
+ virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot,
+ uint16_t playerDirection) override;
virtual void Destroy() override;
};
diff --git a/src/engine/courses/LuigiRaceway.cpp b/src/engine/courses/LuigiRaceway.cpp
index e4ee857a3..fa327f696 100644
--- a/src/engine/courses/LuigiRaceway.cpp
+++ b/src/engine/courses/LuigiRaceway.cpp
@@ -145,7 +145,7 @@ LuigiRaceway::LuigiRaceway() {
Props.PathTable2[2] = NULL;
Props.PathTable2[3] = NULL;
- Props.CloudTexture = (u8*)LOAD_ASSET_RAW(gTextureExhaust2);
+ Props.CloudTexture = (u8*) LOAD_ASSET_RAW(gTextureExhaust2);
Props.Clouds = gLuigiRacewayClouds;
Props.CloudList = gLuigiRacewayClouds;
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() {
+}
diff --git a/src/engine/courses/MarioRaceway.h b/src/engine/courses/MarioRaceway.h
index e237f1538..ecf23ddd3 100644
--- a/src/engine/courses/MarioRaceway.h
+++ b/src/engine/courses/MarioRaceway.h
@@ -4,26 +4,26 @@
#include "Course.h"
extern "C" {
- #include "mario_raceway_vertices.h"
- #include "mario_raceway_displaylists.h"
- #include "course_offsets.h"
- #include "camera.h"
- #include "data/some_data.h"
- #include "objects.h"
- #include "path_spawn_metadata.h"
- #include "mario_raceway_data.h"
- extern const course_texture mario_raceway_textures[];
+#include "mario_raceway_vertices.h"
+#include "mario_raceway_displaylists.h"
+#include "course_offsets.h"
+#include "camera.h"
+#include "data/some_data.h"
+#include "objects.h"
+#include "path_spawn_metadata.h"
+#include "mario_raceway_data.h"
+extern const course_texture mario_raceway_textures[];
}
class MarioRaceway : public Course {
-public:
- virtual ~MarioRaceway() = default; // Virtual destructor for proper cleanup in derived classes
+ public:
+ virtual ~MarioRaceway() = default; // Virtual destructor for proper cleanup in derived classes
// Constructor
explicit MarioRaceway();
-// virtual void Load(const char* courseVtx,
-// course_texture* textures, const char* displaylists, size_t dlSize);
+ // virtual void Load(const char* courseVtx,
+ // course_texture* textures, const char* displaylists, size_t dlSize);
virtual void Load() override;
virtual void LoadTextures() override;
virtual void BeginPlay() override;
@@ -33,7 +33,7 @@ public:
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
virtual void SetStaffGhost() override;
virtual void Render(struct UnkStruct_800DC5EC*) override;
- virtual void RenderCredits() override;
+ virtual void RenderCredits() override;
virtual void CreditsSpawnActors() override;
virtual void Destroy() override;
};
diff --git a/src/engine/courses/MooMooFarm.cpp b/src/engine/courses/MooMooFarm.cpp
index 304ad2210..90b1cdfd9 100644
--- a/src/engine/courses/MooMooFarm.cpp
+++ b/src/engine/courses/MooMooFarm.cpp
@@ -12,30 +12,30 @@
#include "engine/objects/Mole.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 "collision.h"
- #include "memory.h"
- #include "code_80086E70.h"
- #include "course.h"
- extern const char *moo_moo_farm_dls[];
- extern s16 currentScreenSection;
- extern s8 gPlayerCount;
+#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 "collision.h"
+#include "memory.h"
+#include "code_80086E70.h"
+#include "course.h"
+extern const char* moo_moo_farm_dls[];
+extern s16 currentScreenSection;
+extern s8 gPlayerCount;
}
const course_texture moo_moo_farm_textures[] = {
@@ -98,7 +98,7 @@ MooMooFarm::MooMooFarm() {
Props.NearPersp = 9.0f;
Props.FarPersp = 4500.0f;
- Props.PathSizes = {0x230, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
+ Props.PathSizes = { 0x230, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@@ -120,12 +120,12 @@ MooMooFarm::MooMooFarm() {
Props.D_0D009808[2] = 5.75f;
Props.D_0D009808[3] = 6.3333334f;
- Props.PathTable[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_moo_moo_farm_unknown_waypoints);
+ Props.PathTable[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_moo_moo_farm_unknown_waypoints);
Props.PathTable[1] = NULL;
Props.PathTable[2] = NULL;
Props.PathTable[3] = NULL;
- Props.PathTable2[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_moo_moo_farm_track_waypoints);
+ Props.PathTable2[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_moo_moo_farm_track_waypoints);
Props.PathTable2[1] = NULL;
Props.PathTable2[2] = NULL;
Props.PathTable2[3] = NULL;
@@ -134,21 +134,21 @@ MooMooFarm::MooMooFarm() {
Props.Clouds = gYoshiValleyMooMooFarmClouds;
Props.CloudList = gYoshiValleyMooMooFarmClouds;
- Props.Skybox.TopRight = {0, 18, 255};
- Props.Skybox.BottomRight = {197, 211, 255};
- Props.Skybox.BottomLeft = {197, 211, 255};
- Props.Skybox.TopLeft = {0, 18, 255};
- Props.Skybox.FloorTopRight = {255, 184, 99};
- Props.Skybox.FloorBottomRight = {0, 0, 0};
- Props.Skybox.FloorBottomLeft = {0, 0, 0};
- Props.Skybox.FloorTopLeft = {255, 184, 99};
+ Props.Skybox.TopRight = { 0, 18, 255 };
+ Props.Skybox.BottomRight = { 197, 211, 255 };
+ Props.Skybox.BottomLeft = { 197, 211, 255 };
+ Props.Skybox.TopLeft = { 0, 18, 255 };
+ Props.Skybox.FloorTopRight = { 255, 184, 99 };
+ Props.Skybox.FloorBottomRight = { 0, 0, 0 };
+ Props.Skybox.FloorBottomLeft = { 0, 0, 0 };
+ Props.Skybox.FloorTopLeft = { 255, 184, 99 };
Props.Sequence = MusicSeq::MUSIC_SEQ_MOO_MOO_FARM_YOSHI_VALLEY;
}
void MooMooFarm::Load() {
Course::Load();
- parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_moo_moo_farm_addr));
+ parse_course_displaylists((TrackSections*) LOAD_ASSET_RAW(d_course_moo_moo_farm_addr));
func_80295C6C();
Props.WaterLevel = gCourseMinY - 10.0f;
}
@@ -170,57 +170,34 @@ void MooMooFarm::LoadTextures() {
// These are full arrays that are not used in the original game
static std::vector<FVector> sMoleSpawns1 = {
- { FVector(771, 20, -2022) },
- { FVector(807, 15, -2063) },
- { FVector(847, 18, -2040) },
- { FVector(913, 14, -2054) },
- { FVector(939, 21, -1997) },
- { FVector(941, 17, -2024) },
- { FVector(994, 17, -1994) },
- { FVector(863, 22, -2010) },
+ { FVector(771, 20, -2022) }, { FVector(807, 15, -2063) }, { FVector(847, 18, -2040) }, { FVector(913, 14, -2054) },
+ { FVector(939, 21, -1997) }, { FVector(941, 17, -2024) }, { FVector(994, 17, -1994) }, { FVector(863, 22, -2010) },
};
static std::vector<FVector> sMoleSpawns2 = {
- { FVector(1500, 2, 1140) },
- { FVector(1510, 15, 1050) },
- { FVector(1609, 21, 935) },
- { FVector(1289, 3, 1269) },
- { FVector(1468, 22, 1046) },
- { FVector(1380, 12, 1154) },
- { FVector(1297, 19, 1170) },
- { FVector(1589, 11, 1004) },
- { FVector(1414, 3, 1185) },
- { FVector(1405, 4, 1254) },
- { FVector(1463, 8, 1118) },
+ { FVector(1500, 2, 1140) }, { FVector(1510, 15, 1050) }, { FVector(1609, 21, 935) }, { FVector(1289, 3, 1269) },
+ { FVector(1468, 22, 1046) }, { FVector(1380, 12, 1154) }, { FVector(1297, 19, 1170) }, { FVector(1589, 11, 1004) },
+ { FVector(1414, 3, 1185) }, { FVector(1405, 4, 1254) }, { FVector(1463, 8, 1118) },
};
static std::vector<FVector> sMoleSpawns3 = {
- { FVector(701, 2, 1279) },
- { FVector(811, 8, 1278) },
- { FVector(791, 16, 1229) },
- { FVector(876, 15, 1266) },
- { FVector(984, 23, 1248) },
- { FVector(891, 20, 1242) },
- { FVector(920, 15, 1304) },
- { FVector(823, 6, 1327) },
- { FVector(717, 8, 1239) },
- { FVector(695, 19, 1176) },
- { FVector(628, 8, 1191) },
- { FVector(724, 4, 1339) },
+ { FVector(701, 2, 1279) }, { FVector(811, 8, 1278) }, { FVector(791, 16, 1229) }, { FVector(876, 15, 1266) },
+ { FVector(984, 23, 1248) }, { FVector(891, 20, 1242) }, { FVector(920, 15, 1304) }, { FVector(823, 6, 1327) },
+ { FVector(717, 8, 1239) }, { FVector(695, 19, 1176) }, { FVector(628, 8, 1191) }, { FVector(724, 4, 1339) },
};
void MooMooFarm::BeginPlay() {
if (gPlayerCountSelection1 != 4) {
- spawn_foliage((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_moo_moo_farm_tree_spawn));
+ spawn_foliage((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_moo_moo_farm_tree_spawn));
}
- spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_moo_moo_farm_item_box_spawns));
+ spawn_all_item_boxes((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_moo_moo_farm_item_box_spawns));
for (size_t i = 0; i < gObjectParticle2_SIZE; i++) {
find_unused_obj_index(&gObjectParticle2[i]);
}
if (gGamestate != CREDITS_SEQUENCE) {
- switch(gCCSelection) {
+ switch (gCCSelection) {
case CC_50: {
std::vector<FVector> moleSpawns1_50 = { { FVector(771, 20, -2022) },
{ FVector(807, 15, -2063) },
@@ -332,8 +309,7 @@ void MooMooFarm::BeginPlay() {
}
void MooMooFarm::WhatDoesThisDo(Player* player, int8_t playerId) {
- if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x145) &&
- ((s16) gNearestWaypointByPlayerId[playerId] < 0x18B)) {
+ if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x145) && ((s16) gNearestWaypointByPlayerId[playerId] < 0x18B)) {
if (D_80165300[playerId] != 1) {
func_800CA288(playerId, 0x55);
}
@@ -347,8 +323,7 @@ void MooMooFarm::WhatDoesThisDo(Player* player, int8_t playerId) {
}
void MooMooFarm::WhatDoesThisDoAI(Player* player, int8_t playerId) {
- if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x145) &&
- ((s16) gNearestWaypointByPlayerId[playerId] < 0x18B)) {
+ if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x145) && ((s16) gNearestWaypointByPlayerId[playerId] < 0x18B)) {
if (D_80165300[playerId] != 1) {
func_800CA2E4(playerId, 0x55);
}
@@ -372,28 +347,28 @@ void MooMooFarm::Render(struct UnkStruct_800DC5EC* arg0) {
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEI, G_CC_MODULATEI);
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
// d_course_moo_moo_farm_packed_dl_4DF8
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07004DF8));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07004DF8));
// d_course_moo_moo_farm_packed_dl_5640
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07005640));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07005640));
gSPFogPosition(gDisplayListHead++, D_802B87B0, D_802B87B4);
render_course_segments(moo_moo_farm_dls, arg0);
if ((temp_s0 < 14) && (temp_s0 > 10)) {
if ((temp_s1 == 2) || (temp_s1 == 3) || (temp_s1 == 1)) {
- gSPDisplayList(gDisplayListHead++, (Gfx*)d_course_moo_moo_farm_dl_13FF8);
+ gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_moo_moo_farm_dl_13FF8);
}
} else if (temp_s0 < 16) {
- gSPDisplayList(gDisplayListHead++, (Gfx*)d_course_moo_moo_farm_dl_13FF8);
+ gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_moo_moo_farm_dl_13FF8);
} else if (temp_s0 < 19) {
if (temp_s1 != 2) {
- gSPDisplayList(gDisplayListHead++, (Gfx*)d_course_moo_moo_farm_dl_13FF8);
+ gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_moo_moo_farm_dl_13FF8);
}
} else if (temp_s0 < 20) {
if (temp_s1 == 0) {
- gSPDisplayList(gDisplayListHead++, (Gfx*)d_course_moo_moo_farm_dl_13FF8);
+ gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_moo_moo_farm_dl_13FF8);
}
}
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEI, G_CC_MODULATEI);
@@ -402,40 +377,40 @@ void MooMooFarm::Render(struct UnkStruct_800DC5EC* arg0) {
if ((temp_s0 >= 16) && (temp_s0 < 24)) {
if ((temp_s1 == 2) || (temp_s1 == 3)) {
// d_course_moo_moo_farm_packed_dl_5410
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07005410));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07005410));
}
} else if (temp_s0 < 9) {
if (temp_s1 == 2) {
// d_course_moo_moo_farm_packed_dl_5410
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07005410));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07005410));
}
}
if (temp_s0 < 4) {
if (temp_s1 != 0) {
- gSPDisplayList(gDisplayListHead++, (Gfx*)d_course_moo_moo_farm_dl_14060);
+ gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_moo_moo_farm_dl_14060);
}
} else if (temp_s0 < 8) {
if (temp_s1 == 2) {
- gSPDisplayList(gDisplayListHead++, (Gfx*)d_course_moo_moo_farm_dl_14060);
+ gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_moo_moo_farm_dl_14060);
}
} else if (temp_s0 >= 22) {
- gSPDisplayList(gDisplayListHead++, (Gfx*)d_course_moo_moo_farm_dl_14060);
+ gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_moo_moo_farm_dl_14060);
} else if (temp_s0 >= 18) {
if ((temp_s1 == 0) || (temp_s1 == 3)) {
- gSPDisplayList(gDisplayListHead++, (Gfx*)d_course_moo_moo_farm_dl_14060);
+ gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_moo_moo_farm_dl_14060);
}
}
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
// d_course_moo_moo_farm_packed_dl_10C0
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x070010C0));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x070010C0));
}
void MooMooFarm::RenderCredits() {
- gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_moo_moo_farm_dl_14088));
+ gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_moo_moo_farm_dl_14088));
}
void MooMooFarm::CreditsSpawnActors() {
@@ -454,4 +429,5 @@ void MooMooFarm::CreditsSpawnActors() {
spawn_foliage((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_moo_moo_farm_tree_spawn));
}
-void MooMooFarm::Destroy() { }
+void MooMooFarm::Destroy() {
+}
diff --git a/src/engine/courses/MooMooFarm.h b/src/engine/courses/MooMooFarm.h
index 3c18e5024..46f96159d 100644
--- a/src/engine/courses/MooMooFarm.h
+++ b/src/engine/courses/MooMooFarm.h
@@ -5,35 +5,35 @@
#include "engine/objects/Mole.h"
extern "C" {
- #include "assets/moo_moo_farm_vertices.h"
- #include "assets/moo_moo_farm_displaylists.h"
- #include "assets/moo_moo_farm_data.h"
- #include "course_offsets.h"
- #include "camera.h"
- #include "data/some_data.h"
- #include "objects.h"
- #include "path_spawn_metadata.h"
- extern const course_texture moo_moo_farm_textures[];
+#include "assets/moo_moo_farm_vertices.h"
+#include "assets/moo_moo_farm_displaylists.h"
+#include "assets/moo_moo_farm_data.h"
+#include "course_offsets.h"
+#include "camera.h"
+#include "data/some_data.h"
+#include "objects.h"
+#include "path_spawn_metadata.h"
+extern const course_texture moo_moo_farm_textures[];
}
class OMole;
class MooMooFarm : public Course {
-public:
- virtual ~MooMooFarm() = default; // Virtual destructor for proper cleanup in derived classes
+ public:
+ virtual ~MooMooFarm() = default; // Virtual destructor for proper cleanup in derived classes
// Constructor
explicit MooMooFarm();
-// virtual void Load(const char* courseVtx,
-// course_texture* textures, const char* displaylists, size_t dlSize);
+ // virtual void Load(const char* courseVtx,
+ // course_texture* textures, const char* displaylists, size_t dlSize);
virtual void Load() override;
virtual void LoadTextures() override;
virtual void BeginPlay() override;
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
virtual void Render(struct UnkStruct_800DC5EC*) override;
- virtual void RenderCredits() override;
+ virtual void RenderCredits() override;
virtual void CreditsSpawnActors() override;
virtual void Destroy() override;
};
diff --git a/src/engine/courses/PodiumCeremony.cpp b/src/engine/courses/PodiumCeremony.cpp
index a4c01f588..7748cd73f 100644
--- a/src/engine/courses/PodiumCeremony.cpp
+++ b/src/engine/courses/PodiumCeremony.cpp
@@ -15,29 +15,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 "collision.h"
- #include "memory.h"
- #include "courses/staff_ghost_data.h"
- #include "podium_ceremony_actors.h"
- #include "course.h"
- extern const char *royal_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 "collision.h"
+#include "memory.h"
+#include "courses/staff_ghost_data.h"
+#include "podium_ceremony_actors.h"
+#include "course.h"
+extern const char* royal_raceway_dls[];
}
const course_texture podium_ceremony_textures[] = {
@@ -111,7 +111,7 @@ PodiumCeremony::PodiumCeremony() {
Props.AIMinimumSeparation = 0.4f;
Props.AISteeringSensitivity = 53;
- Props.PathSizes = {500, 500, 500, 500, 1, 0, 0, 0, 0, 0, 0};
+ Props.PathSizes = { 500, 500, 500, 500, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@@ -133,10 +133,10 @@ PodiumCeremony::PodiumCeremony() {
Props.D_0D009808[2] = 5.75f;
Props.D_0D009808[3] = 6.3333334f;
- Props.PathTable[0] = (TrackWaypoint*)LOAD_ASSET_RAW(podium_ceremony_path);
- Props.PathTable[1] = (TrackWaypoint*)LOAD_ASSET_RAW(podium_ceremony_path_2);
- Props.PathTable[2] = (TrackWaypoint*)LOAD_ASSET_RAW(podium_ceremony_path_3);
- Props.PathTable[3] = (TrackWaypoint*)LOAD_ASSET_RAW(podium_ceremony_path_4);
+ Props.PathTable[0] = (TrackWaypoint*) LOAD_ASSET_RAW(podium_ceremony_path);
+ Props.PathTable[1] = (TrackWaypoint*) LOAD_ASSET_RAW(podium_ceremony_path_2);
+ Props.PathTable[2] = (TrackWaypoint*) LOAD_ASSET_RAW(podium_ceremony_path_3);
+ Props.PathTable[3] = (TrackWaypoint*) LOAD_ASSET_RAW(podium_ceremony_path_4);
Props.PathTable2[0] = NULL;
Props.PathTable2[1] = NULL;
@@ -147,14 +147,14 @@ PodiumCeremony::PodiumCeremony() {
Props.Clouds = NULL; // no clouds
Props.CloudList = NULL;
- Props.Skybox.TopRight = {238, 144, 255};
- Props.Skybox.BottomRight = {255, 224, 240};
- Props.Skybox.BottomLeft = {255, 224, 240};
- Props.Skybox.TopLeft = {238, 144, 255};
- Props.Skybox.FloorTopRight = {255, 224, 240};
- Props.Skybox.FloorBottomRight = {0, 0, 0};
- Props.Skybox.FloorBottomLeft = {0, 0, 0};
- Props.Skybox.FloorTopLeft = {255, 224, 240};
+ Props.Skybox.TopRight = { 238, 144, 255 };
+ Props.Skybox.BottomRight = { 255, 224, 240 };
+ Props.Skybox.BottomLeft = { 255, 224, 240 };
+ Props.Skybox.TopLeft = { 238, 144, 255 };
+ Props.Skybox.FloorTopRight = { 255, 224, 240 };
+ Props.Skybox.FloorBottomRight = { 0, 0, 0 };
+ Props.Skybox.FloorBottomLeft = { 0, 0, 0 };
+ Props.Skybox.FloorTopLeft = { 255, 224, 240 };
Props.Sequence = MusicSeq::MUSIC_SEQ_UNKNOWN;
Props.WaterLevel = -60.0f;
@@ -163,7 +163,7 @@ PodiumCeremony::PodiumCeremony() {
void PodiumCeremony::Load() {
Course::Load();
- parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_royal_raceway_addr));
+ parse_course_displaylists((TrackSections*) LOAD_ASSET_RAW(d_course_royal_raceway_addr));
func_80295C6C();
}
@@ -171,17 +171,18 @@ void PodiumCeremony::LoadTextures() {
}
void PodiumCeremony::BeginPlay() {
- spawn_foliage((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_royal_raceway_tree_spawn));
- spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_royal_raceway_item_box_spawns));
- spawn_piranha_plants((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_royal_raceway_piranha_plant_spawn));
+ spawn_foliage((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_royal_raceway_tree_spawn));
+ spawn_all_item_boxes((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_royal_raceway_item_box_spawns));
+ spawn_piranha_plants((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_royal_raceway_piranha_plant_spawn));
- gWorldInstance.AddObject(new OCheepCheep(FVector((f32)-3202, (f32)19, (f32)-478), OCheepCheep::CheepType::PODIUM_CEREMONY, IPathSpan(0, 0)));
- gWorldInstance.AddObject(new OPodium(FVector((f32)-3202, (f32)19, (f32)-478)));
-
- FVector pos = {0, 90.0f, 0};
+ gWorldInstance.AddObject(new OCheepCheep(FVector((f32) -3202, (f32) 19, (f32) -478),
+ OCheepCheep::CheepType::PODIUM_CEREMONY, IPathSpan(0, 0)));
+ gWorldInstance.AddObject(new OPodium(FVector((f32) -3202, (f32) 19, (f32) -478)));
+
+ FVector pos = { 0, 90.0f, 0 };
OTrophy::TrophyType type = OTrophy::TrophyType::BRONZE;
- switch(D_802874D8.unk1D) {
+ switch (D_802874D8.unk1D) {
case 2: // Bronze
type = gCCSelection == CC_150 ? OTrophy::TrophyType::BRONZE_150 : OTrophy::TrophyType::BRONZE;
break;
@@ -197,7 +198,8 @@ void PodiumCeremony::BeginPlay() {
break;
}
- OTrophy* trophy = reinterpret_cast<OTrophy*>(gWorldInstance.AddObject(new OTrophy(pos, type, OTrophy::Behaviour::PODIUM_CEREMONY)));
+ OTrophy* trophy = reinterpret_cast<OTrophy*>(
+ gWorldInstance.AddObject(new OTrophy(pos, type, OTrophy::Behaviour::PODIUM_CEREMONY)));
FVector kart = { 0, 0, 0 };
gWorldInstance.AddObject(new OBombKart(kart, &D_80164550[3][3], 3, 5, 1.25f));
@@ -226,8 +228,7 @@ void PodiumCeremony::SomeSounds() {
}
void PodiumCeremony::WhatDoesThisDo(Player* player, int8_t playerId) {
- if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x180) &&
- ((s16) gNearestWaypointByPlayerId[playerId] < 0x1E1)) {
+ if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x180) && ((s16) gNearestWaypointByPlayerId[playerId] < 0x1E1)) {
if (D_80165300[playerId] != 1) {
func_800CA288(playerId, 0x41);
}
@@ -241,8 +242,7 @@ void PodiumCeremony::WhatDoesThisDo(Player* player, int8_t playerId) {
}
void PodiumCeremony::WhatDoesThisDoAI(Player* player, int8_t playerId) {
- if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x180) &&
- ((s16) gNearestWaypointByPlayerId[playerId] < 0x1E1)) {
+ if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x180) && ((s16) gNearestWaypointByPlayerId[playerId] < 0x1E1)) {
if (D_80165300[playerId] != 1) {
func_800CA2E4(playerId, 0x41);
}
@@ -285,7 +285,8 @@ void PodiumCeremony::Render(struct UnkStruct_800DC5EC* arg0) {
}
void PodiumCeremony::RenderCredits() {
- gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_royal_raceway_dl_D8E8));
+ gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_royal_raceway_dl_D8E8));
}
-void PodiumCeremony::Destroy() { }
+void PodiumCeremony::Destroy() {
+}
diff --git a/src/engine/courses/PodiumCeremony.h b/src/engine/courses/PodiumCeremony.h
index 6026d7f9f..e99bc2ee4 100644
--- a/src/engine/courses/PodiumCeremony.h
+++ b/src/engine/courses/PodiumCeremony.h
@@ -5,35 +5,35 @@
#include "Course.h"
extern "C" {
- #include "assets/royal_raceway_vertices.h"
- #include "assets/royal_raceway_displaylists.h"
- #include "assets/royal_raceway_data.h"
- #include "course_offsets.h"
- #include "camera.h"
- #include "data/some_data.h"
- #include "objects.h"
- #include "path_spawn_metadata.h"
- extern const course_texture royal_raceway_textures[];
+#include "assets/royal_raceway_vertices.h"
+#include "assets/royal_raceway_displaylists.h"
+#include "assets/royal_raceway_data.h"
+#include "course_offsets.h"
+#include "camera.h"
+#include "data/some_data.h"
+#include "objects.h"
+#include "path_spawn_metadata.h"
+extern const course_texture royal_raceway_textures[];
}
class PodiumCeremony : public Course {
-public:
- virtual ~PodiumCeremony() = default; // Virtual destructor for proper cleanup in derived classes
+ public:
+ virtual ~PodiumCeremony() = default; // Virtual destructor for proper cleanup in derived classes
// Constructor
explicit PodiumCeremony();
-// virtual void Load(const char* courseVtx,
-// course_texture* textures, const char* displaylists, size_t dlSize);
+ // virtual void Load(const char* courseVtx,
+ // course_texture* textures, const char* displaylists, size_t dlSize);
virtual void Load() override;
virtual void LoadTextures() override;
virtual void BeginPlay() override;
- //virtual void InitClouds() override;
+ // virtual void InitClouds() override;
virtual void InitCourseObjects() override;
virtual void SomeSounds() override;
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
virtual void Render(struct UnkStruct_800DC5EC*) override;
- virtual void RenderCredits() override;
+ virtual void RenderCredits() override;
virtual void Destroy() override;
};
diff --git a/src/engine/courses/RainbowRoad.cpp b/src/engine/courses/RainbowRoad.cpp
index 7c60d3af3..ae85c280d 100644
--- a/src/engine/courses/RainbowRoad.cpp
+++ b/src/engine/courses/RainbowRoad.cpp
@@ -11,27 +11,27 @@
#include "assets/rainbow_road_data.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 "collision.h"
- #include "memory.h"
- #include "course.h"
- extern const char *rainbow_road_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 "collision.h"
+#include "memory.h"
+#include "course.h"
+extern const char* rainbow_road_dls[];
}
const course_texture rainbow_road_textures[] = {
@@ -43,7 +43,6 @@ const course_texture rainbow_road_textures[] = {
{ 0x00000000, 0x0000, 0x0000, 0x0 },
};
-
RainbowRoad::RainbowRoad() {
this->vtx = d_course_rainbow_road_vertex;
this->gfx = d_course_rainbow_road_packed_dls;
@@ -72,7 +71,7 @@ RainbowRoad::RainbowRoad() {
Props.NearPersp = 2.0f;
Props.FarPersp = 2700.0f;
- Props.PathSizes = {0x76C, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
+ Props.PathSizes = { 0x76C, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@@ -94,12 +93,12 @@ RainbowRoad::RainbowRoad() {
Props.D_0D009808[2] = 5.75f;
Props.D_0D009808[3] = 6.3333334f;
- Props.PathTable[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_rainbow_road_unknown_waypoints);
+ Props.PathTable[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_rainbow_road_unknown_waypoints);
Props.PathTable[1] = NULL;
Props.PathTable[2] = NULL;
Props.PathTable[3] = NULL;
- Props.PathTable2[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_rainbow_road_track_waypoints);
+ Props.PathTable2[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_rainbow_road_track_waypoints);
Props.PathTable2[1] = NULL;
Props.PathTable2[2] = NULL;
Props.PathTable2[3] = NULL;
@@ -107,16 +106,16 @@ RainbowRoad::RainbowRoad() {
Props.Clouds = gToadsTurnpikeRainbowRoadStars;
Props.CloudList = gToadsTurnpikeRainbowRoadStars;
- Props.Skybox.TopRight = {0, 0, 0};
- Props.Skybox.BottomRight = {0, 0, 0};
- Props.Skybox.BottomLeft = {0, 0, 0};
- Props.Skybox.TopLeft = {0, 0, 0};
- 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, 0, 0 };
+ Props.Skybox.BottomRight = { 0, 0, 0 };
+ Props.Skybox.BottomLeft = { 0, 0, 0 };
+ Props.Skybox.TopLeft = { 0, 0, 0 };
+ 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_RAINBOW_ROAD;
-
+
Props.WaterLevel = 0.0f;
}
@@ -124,17 +123,17 @@ void RainbowRoad::Load() {
Course::Load();
D_800DC5C8 = 1;
- parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_rainbow_road_addr));
+ parse_course_displaylists((TrackSections*) LOAD_ASSET_RAW(d_course_rainbow_road_addr));
func_80295C6C();
// d_course_rainbow_road_packed_dl_2068
- find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07002068), -0x6A, 255, 255, 255);
+ find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07002068), -0x6A, 255, 255, 255);
// d_course_rainbow_road_packed_dl_1E18
- find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07001E18), -0x6A, 255, 255, 255);
+ find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07001E18), -0x6A, 255, 255, 255);
// d_course_rainbow_road_packed_dl_1318
- find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07001318), 255, 255, 255, 0);
+ find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07001318), 255, 255, 255, 0);
if (gGamestate != CREDITS_SEQUENCE) {
// d_course_rainbow_road_packed_dl_1FB8
- find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07001FB8), -0x6A, 255, 255, 255);
+ find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07001FB8), -0x6A, 255, 255, 255);
}
}
@@ -142,7 +141,7 @@ void RainbowRoad::LoadTextures() {
}
void RainbowRoad::BeginPlay() {
- spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_rainbow_road_item_box_spawns));
+ spawn_all_item_boxes((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_rainbow_road_item_box_spawns));
if (gGamestate != CREDITS_SEQUENCE) {
gWorldInstance.AddObject(new OChainChomp());
@@ -187,23 +186,25 @@ void RainbowRoad::InitCourseObjects() {
void RainbowRoad::UpdateCourseObjects() {
if (gGamestate != CREDITS_SEQUENCE) {
update_neon();
- //update_chain_chomps();
+ // update_chain_chomps();
}
}
void RainbowRoad::RenderCourseObjects(s32 cameraId) {
if (gGamestate != CREDITS_SEQUENCE) {
render_object_neon(cameraId);
- //render_object_chain_chomps(cameraId);
+ // render_object_chain_chomps(cameraId);
}
}
void RainbowRoad::SomeSounds() {
}
-void RainbowRoad::WhatDoesThisDo(Player* player, int8_t playerId) {}
+void RainbowRoad::WhatDoesThisDo(Player* player, int8_t playerId) {
+}
-void RainbowRoad::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
+void RainbowRoad::WhatDoesThisDoAI(Player* player, int8_t playerId) {
+}
void RainbowRoad::Render(struct UnkStruct_800DC5EC* arg0) {
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
@@ -214,14 +215,15 @@ void RainbowRoad::Render(struct UnkStruct_800DC5EC* arg0) {
}
void RainbowRoad::RenderCredits() {
- gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_rainbow_road_dl_16220));
+ gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_rainbow_road_dl_16220));
}
void RainbowRoad::Waypoints(Player* player, int8_t playerId) {
player->nearestWaypointId = gCopyNearestWaypointByPlayerId[playerId];
}
-void RainbowRoad::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) {
+void RainbowRoad::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot,
+ uint16_t playerDirection) {
Mat4 matrix;
gDPPipeSync(gDisplayListHead++);
@@ -236,11 +238,12 @@ void RainbowRoad::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCoun
void RainbowRoad::CreditsSpawnActors() {
// d_course_rainbow_road_packed_dl_2068
- find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07002068), -0x6A, 0xFF, 0xFF, 0xFF);
+ find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07002068), -0x6A, 0xFF, 0xFF, 0xFF);
// d_course_rainbow_road_packed_dl_1E18
- find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07001E18), -0x6A, 0xFF, 0xFF, 0xFF);
+ find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07001E18), -0x6A, 0xFF, 0xFF, 0xFF);
// d_course_rainbow_road_packed_dl_1318
- find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07001318), -1, 0xFF, 0xFF, 0);
+ find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07001318), -1, 0xFF, 0xFF, 0);
}
-void RainbowRoad::Destroy() {}
+void RainbowRoad::Destroy() {
+}
diff --git a/src/engine/courses/RainbowRoad.h b/src/engine/courses/RainbowRoad.h
index 282655ace..962584eae 100644
--- a/src/engine/courses/RainbowRoad.h
+++ b/src/engine/courses/RainbowRoad.h
@@ -4,26 +4,26 @@
#include "Course.h"
extern "C" {
- #include "assets/rainbow_road_vertices.h"
- #include "assets/rainbow_road_displaylists.h"
- #include "assets/rainbow_road_data.h"
- #include "course_offsets.h"
- #include "camera.h"
- #include "data/some_data.h"
- #include "objects.h"
- #include "path_spawn_metadata.h"
- extern const course_texture rainbow_road_textures[];
+#include "assets/rainbow_road_vertices.h"
+#include "assets/rainbow_road_displaylists.h"
+#include "assets/rainbow_road_data.h"
+#include "course_offsets.h"
+#include "camera.h"
+#include "data/some_data.h"
+#include "objects.h"
+#include "path_spawn_metadata.h"
+extern const course_texture rainbow_road_textures[];
}
class RainbowRoad : public Course {
-public:
- virtual ~RainbowRoad() = default; // Virtual destructor for proper cleanup in derived classes
+ public:
+ virtual ~RainbowRoad() = default; // Virtual destructor for proper cleanup in derived classes
// Constructor
explicit RainbowRoad();
-// virtual void Load(const char* courseVtx,
-// course_texture* textures, const char* displaylists, size_t dlSize);
+ // virtual void Load(const char* courseVtx,
+ // course_texture* textures, const char* displaylists, size_t dlSize);
virtual void Load() override;
virtual void LoadTextures() override;
virtual void BeginPlay() override;
@@ -36,9 +36,10 @@ public:
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
virtual void Render(struct UnkStruct_800DC5EC*) override;
- virtual void RenderCredits() override;
+ virtual void RenderCredits() override;
virtual void Waypoints(Player* player, int8_t playerId) override;
- virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) override;
+ virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot,
+ uint16_t playerDirection) override;
virtual void CreditsSpawnActors() override;
virtual void Destroy() override;
};
diff --git a/src/engine/courses/RoyalRaceway.cpp b/src/engine/courses/RoyalRaceway.cpp
index 849087c3f..97f3acc49 100644
--- a/src/engine/courses/RoyalRaceway.cpp
+++ b/src/engine/courses/RoyalRaceway.cpp
@@ -11,28 +11,28 @@
#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 "collision.h"
- #include "memory.h"
- #include "courses/staff_ghost_data.h"
- #include "course.h"
- extern const char *royal_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 "collision.h"
+#include "memory.h"
+#include "courses/staff_ghost_data.h"
+#include "course.h"
+extern const char* royal_raceway_dls[];
}
const course_texture royal_raceway_textures[] = {
@@ -110,7 +110,7 @@ RoyalRaceway::RoyalRaceway() {
Props.NearPersp = 9.0f;
Props.FarPersp = 4500.0f;
- Props.PathSizes = {0x3E8, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
+ Props.PathSizes = { 0x3E8, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@@ -132,12 +132,12 @@ RoyalRaceway::RoyalRaceway() {
Props.D_0D009808[2] = 5.75f;
Props.D_0D009808[3] = 6.3333334f;
- Props.PathTable[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_royal_raceway_unknown_waypoints);
+ Props.PathTable[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_royal_raceway_unknown_waypoints);
Props.PathTable[1] = NULL;
Props.PathTable[2] = NULL;
Props.PathTable[3] = NULL;
- Props.PathTable2[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_royal_raceway_track_waypoints);
+ Props.PathTable2[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_royal_raceway_track_waypoints);
Props.PathTable2[1] = NULL;
Props.PathTable2[2] = NULL;
Props.PathTable2[3] = NULL;
@@ -146,14 +146,14 @@ RoyalRaceway::RoyalRaceway() {
Props.Clouds = gRoyalRacewayClouds;
Props.CloudList = gRoyalRacewayClouds;
- Props.Skybox.TopRight = {238, 144, 255};
- Props.Skybox.BottomRight = {255, 224, 240};
- Props.Skybox.BottomLeft = {255, 224, 240};
- Props.Skybox.TopLeft = {238, 144, 255};
- Props.Skybox.FloorTopRight = {255, 224, 240};
- Props.Skybox.FloorBottomRight = {0, 0, 0};
- Props.Skybox.FloorBottomLeft = {0, 0, 0};
- Props.Skybox.FloorTopLeft = {255, 224, 240};
+ Props.Skybox.TopRight = { 238, 144, 255 };
+ Props.Skybox.BottomRight = { 255, 224, 240 };
+ Props.Skybox.BottomLeft = { 255, 224, 240 };
+ Props.Skybox.TopLeft = { 238, 144, 255 };
+ Props.Skybox.FloorTopRight = { 255, 224, 240 };
+ Props.Skybox.FloorBottomRight = { 0, 0, 0 };
+ Props.Skybox.FloorBottomLeft = { 0, 0, 0 };
+ Props.Skybox.FloorTopLeft = { 255, 224, 240 };
Props.Sequence = MusicSeq::MUSIC_SEQ_RACEWAYS_WARIO_STADIUM;
Props.WaterLevel = -60.0f;
@@ -162,7 +162,7 @@ RoyalRaceway::RoyalRaceway() {
void RoyalRaceway::Load() {
Course::Load();
- parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_royal_raceway_addr));
+ parse_course_displaylists((TrackSections*) LOAD_ASSET_RAW(d_course_royal_raceway_addr));
func_80295C6C();
}
@@ -181,9 +181,9 @@ void RoyalRaceway::LoadTextures() {
}
void RoyalRaceway::BeginPlay() {
- spawn_foliage((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_royal_raceway_tree_spawn));
- spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_royal_raceway_item_box_spawns));
- spawn_piranha_plants((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_royal_raceway_piranha_plant_spawn));
+ spawn_foliage((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_royal_raceway_tree_spawn));
+ spawn_all_item_boxes((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_royal_raceway_item_box_spawns));
+ spawn_piranha_plants((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_royal_raceway_piranha_plant_spawn));
if (gModeSelection == VERSUS) {
FVector pos = { 0, 0, 0 };
@@ -211,8 +211,7 @@ void RoyalRaceway::InitCourseObjects() {
}
void RoyalRaceway::WhatDoesThisDo(Player* player, int8_t playerId) {
- if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x180) &&
- ((s16) gNearestWaypointByPlayerId[playerId] < 0x1E1)) {
+ if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x180) && ((s16) gNearestWaypointByPlayerId[playerId] < 0x1E1)) {
if (D_80165300[playerId] != 1) {
func_800CA288(playerId, 0x41);
}
@@ -226,8 +225,7 @@ void RoyalRaceway::WhatDoesThisDo(Player* player, int8_t playerId) {
}
void RoyalRaceway::WhatDoesThisDoAI(Player* player, int8_t playerId) {
- if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x180) &&
- ((s16) gNearestWaypointByPlayerId[playerId] < 0x1E1)) {
+ if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x180) && ((s16) gNearestWaypointByPlayerId[playerId] < 0x1E1)) {
if (D_80165300[playerId] != 1) {
func_800CA2E4(playerId, 0x41);
}
@@ -283,7 +281,7 @@ void RoyalRaceway::Render(struct UnkStruct_800DC5EC* arg0) {
}
void RoyalRaceway::RenderCredits() {
- gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_royal_raceway_dl_D8E8));
+ gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_royal_raceway_dl_D8E8));
}
void RoyalRaceway::Waypoints(Player* player, int8_t playerId) {
@@ -304,7 +302,7 @@ void RoyalRaceway::ScrollingTextures() {
D_802B87BC = 0xFF;
}
// d_course_royal_raceway_packed_dl_A6A8
- find_and_set_tile_size((uintptr_t) segmented_gfx_to_virtual((void*)0x0700A6A8), 0, D_802B87BC);
+ find_and_set_tile_size((uintptr_t) segmented_gfx_to_virtual((void*) 0x0700A6A8), 0, D_802B87BC);
// d_course_royal_raceway_packed_dl_A648
- find_and_set_tile_size((uintptr_t) segmented_gfx_to_virtual((void*)0x0700A648), 0, D_802B87BC);
+ find_and_set_tile_size((uintptr_t) segmented_gfx_to_virtual((void*) 0x0700A648), 0, D_802B87BC);
}
diff --git a/src/engine/courses/RoyalRaceway.h b/src/engine/courses/RoyalRaceway.h
index 7fe973edd..328378752 100644
--- a/src/engine/courses/RoyalRaceway.h
+++ b/src/engine/courses/RoyalRaceway.h
@@ -4,26 +4,26 @@
#include "Course.h"
extern "C" {
- #include "assets/royal_raceway_vertices.h"
- #include "assets/royal_raceway_displaylists.h"
- #include "assets/royal_raceway_data.h"
- #include "course_offsets.h"
- #include "camera.h"
- #include "data/some_data.h"
- #include "objects.h"
- #include "path_spawn_metadata.h"
- extern const course_texture royal_raceway_textures[];
+#include "assets/royal_raceway_vertices.h"
+#include "assets/royal_raceway_displaylists.h"
+#include "assets/royal_raceway_data.h"
+#include "course_offsets.h"
+#include "camera.h"
+#include "data/some_data.h"
+#include "objects.h"
+#include "path_spawn_metadata.h"
+extern const course_texture royal_raceway_textures[];
}
class RoyalRaceway : public Course {
-public:
- virtual ~RoyalRaceway() = default; // Virtual destructor for proper cleanup in derived classes
+ public:
+ virtual ~RoyalRaceway() = default; // Virtual destructor for proper cleanup in derived classes
// Constructor
explicit RoyalRaceway();
-// virtual void Load(const char* courseVtx,
-// course_texture* textures, const char* displaylists, size_t dlSize);
+ // virtual void Load(const char* courseVtx,
+ // course_texture* textures, const char* displaylists, size_t dlSize);
virtual void Load() override;
virtual void LoadTextures() override;
virtual void BeginPlay() override;
@@ -32,7 +32,7 @@ public:
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
virtual void SetStaffGhost() override;
virtual void Render(struct UnkStruct_800DC5EC*) override;
- virtual void RenderCredits() override;
+ virtual void RenderCredits() override;
virtual void ScrollingTextures() override;
virtual void Waypoints(Player* player, int8_t playerId) override;
};
diff --git a/src/engine/courses/SherbetLand.cpp b/src/engine/courses/SherbetLand.cpp
index 7eb7e958c..8a9c66e5c 100644
--- a/src/engine/courses/SherbetLand.cpp
+++ b/src/engine/courses/SherbetLand.cpp
@@ -11,28 +11,28 @@
#include "engine/objects/Penguin.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 "collision.h"
- #include "memory.h"
- #include "course.h"
- extern const char *sherbet_land_dls[];
- extern const char *sherbet_land_dls_2[];
+#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 "collision.h"
+#include "memory.h"
+#include "course.h"
+extern const char* sherbet_land_dls[];
+extern const char* sherbet_land_dls_2[];
}
const course_texture sherbet_land_textures[] = {
@@ -59,13 +59,13 @@ SherbetLand::SherbetLand() {
Props.Minimap.PlayerScaleFactor = 0.015f;
Props.Minimap.FinishlineX = 0;
Props.Minimap.FinishlineY = 0;
- Props.Minimap.Colour = {72, 100, 255};
+ Props.Minimap.Colour = { 72, 100, 255 };
Props.SetText(Props.Name, "sherbet land", sizeof(Props.Name));
Props.SetText(Props.DebugName, "sherbet", sizeof(Props.DebugName));
Props.SetText(Props.CourseLength, "756m", sizeof(Props.CourseLength));
- Props.LakituTowType = (s32)OLakitu::LakituTowType::ICE;
+ Props.LakituTowType = (s32) OLakitu::LakituTowType::ICE;
Props.AIBehaviour = D_0D009280;
Props.AIMaximumSeparation = 50.0f;
@@ -75,7 +75,7 @@ SherbetLand::SherbetLand() {
Props.NearPersp = 9.0f;
Props.FarPersp = 4500.0f;
- Props.PathSizes = {0x2BC, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
+ Props.PathSizes = { 0x2BC, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@@ -97,12 +97,12 @@ SherbetLand::SherbetLand() {
Props.D_0D009808[2] = 5.75f;
Props.D_0D009808[3] = 6.3333334f;
- Props.PathTable[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_sherbet_land_unknown_waypoints);
+ Props.PathTable[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_sherbet_land_unknown_waypoints);
Props.PathTable[1] = NULL;
Props.PathTable[2] = NULL;
Props.PathTable[3] = NULL;
- Props.PathTable2[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_sherbet_land_track_waypoints);
+ Props.PathTable2[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_sherbet_land_track_waypoints);
Props.PathTable2[1] = NULL;
Props.PathTable2[2] = NULL;
Props.PathTable2[3] = NULL;
@@ -111,14 +111,14 @@ SherbetLand::SherbetLand() {
Props.Clouds = gSherbetLandClouds;
Props.CloudList = gSherbetLandClouds;
- Props.Skybox.TopRight = {128, 184, 248};
- Props.Skybox.BottomRight = {216, 232, 248};
- Props.Skybox.BottomLeft = {216, 232, 248};
- Props.Skybox.TopLeft = {128, 184, 248};
- Props.Skybox.FloorTopRight = {216, 232, 248};
- Props.Skybox.FloorBottomRight = {128, 184, 248};
- Props.Skybox.FloorBottomLeft = {128, 184, 248};
- Props.Skybox.FloorTopLeft = {216, 232, 248};
+ Props.Skybox.TopRight = { 128, 184, 248 };
+ Props.Skybox.BottomRight = { 216, 232, 248 };
+ Props.Skybox.BottomLeft = { 216, 232, 248 };
+ Props.Skybox.TopLeft = { 128, 184, 248 };
+ Props.Skybox.FloorTopRight = { 216, 232, 248 };
+ Props.Skybox.FloorBottomRight = { 128, 184, 248 };
+ Props.Skybox.FloorBottomLeft = { 128, 184, 248 };
+ Props.Skybox.FloorTopLeft = { 216, 232, 248 };
Props.Sequence = MusicSeq::MUSIC_SEQ_FRAPPE_SNOWLAND;
Props.WaterLevel = -18.0f;
@@ -127,12 +127,12 @@ SherbetLand::SherbetLand() {
void SherbetLand::Load() {
Course::Load();
- parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_sherbet_land_addr));
+ parse_course_displaylists((TrackSections*) LOAD_ASSET_RAW(d_course_sherbet_land_addr));
func_80295C6C();
// d_course_sherbet_land_packed_dl_1EB8
- find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07001EB8), -0x4C, 255, 255, 255);
+ find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07001EB8), -0x4C, 255, 255, 255);
// d_course_sherbet_land_packed_dl_2308
- find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07002308), -0x6A, 255, 255, 255);
+ find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07002308), -0x6A, 255, 255, 255);
}
f32 SherbetLand::GetWaterLevel(FVector pos, Collision* collision) {
@@ -143,64 +143,77 @@ f32 SherbetLand::GetWaterLevel(FVector pos, Collision* collision) {
}
void SherbetLand::BeginPlay() {
- spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_sherbet_land_item_box_spawns));
+ spawn_all_item_boxes((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_sherbet_land_item_box_spawns));
// Multiplayer does not spawn the big penguin
-// if (gPlayerCountSelection1 == 1) {
- FVector pos = {-383.0f, 2.0f, -690.0f};
- gWorldInstance.AddObject(new OPenguin(pos, 0, OPenguin::PenguinType::EMPEROR, OPenguin::Behaviour::STRUT));
-// }
+ // if (gPlayerCountSelection1 == 1) {
+ FVector pos = { -383.0f, 2.0f, -690.0f };
+ gWorldInstance.AddObject(new OPenguin(pos, 0, OPenguin::PenguinType::EMPEROR, OPenguin::Behaviour::STRUT));
+ // }
FVector pos2 = { -2960.0f, -80.0f, 1521.0f };
- auto penguin = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(new OPenguin(pos2, 0x150, OPenguin::PenguinType::ADULT, OPenguin::Behaviour::CIRCLE)));
- auto penguin2 = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(new OPenguin(pos2, 0x150, OPenguin::PenguinType::ADULT, OPenguin::Behaviour::CIRCLE)));
+ auto penguin = reinterpret_cast<OPenguin*>(
+ gWorldInstance.AddObject(new OPenguin(pos2, 0x150, OPenguin::PenguinType::ADULT, OPenguin::Behaviour::CIRCLE)));
+ auto penguin2 = reinterpret_cast<OPenguin*>(
+ gWorldInstance.AddObject(new OPenguin(pos2, 0x150, OPenguin::PenguinType::ADULT, OPenguin::Behaviour::CIRCLE)));
penguin->Diameter = penguin2->Diameter = 100.0f;
FVector pos3 = { -2490.0f, -80.0f, 1612.0f };
- auto penguin3 = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(new OPenguin(pos3, 0x100, OPenguin::PenguinType::ADULT, OPenguin::Behaviour::CIRCLE)));
- auto penguin4 = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(new OPenguin(pos3, 0x100, OPenguin::PenguinType::ADULT, OPenguin::Behaviour::CIRCLE)));
+ auto penguin3 = reinterpret_cast<OPenguin*>(
+ gWorldInstance.AddObject(new OPenguin(pos3, 0x100, OPenguin::PenguinType::ADULT, OPenguin::Behaviour::CIRCLE)));
+ auto penguin4 = reinterpret_cast<OPenguin*>(
+ gWorldInstance.AddObject(new OPenguin(pos3, 0x100, OPenguin::PenguinType::ADULT, OPenguin::Behaviour::CIRCLE)));
penguin3->Diameter = penguin4->Diameter = 80.0f;
FVector pos4 = { -2098.0f, -80.0f, 1624.0f };
- auto penguin5 = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(new OPenguin(pos4, 0xFF00, OPenguin::PenguinType::ADULT, OPenguin::Behaviour::CIRCLE)));
- auto penguin6 = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(new OPenguin(pos4, 0xFF00, OPenguin::PenguinType::ADULT, OPenguin::Behaviour::CIRCLE)));
+ auto penguin5 = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(
+ new OPenguin(pos4, 0xFF00, OPenguin::PenguinType::ADULT, OPenguin::Behaviour::CIRCLE)));
+ auto penguin6 = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(
+ new OPenguin(pos4, 0xFF00, OPenguin::PenguinType::ADULT, OPenguin::Behaviour::CIRCLE)));
penguin5->Diameter = penguin6->Diameter = 80.0f;
-
FVector pos5 = { -2080.0f, -80.0f, 1171.0f };
- auto penguin7 = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(new OPenguin(pos5, 0x150, OPenguin::PenguinType::ADULT, OPenguin::Behaviour::CIRCLE)));
- auto penguin8 = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(new OPenguin(pos5, 0x150, OPenguin::PenguinType::ADULT, OPenguin::Behaviour::CIRCLE)));
+ auto penguin7 = reinterpret_cast<OPenguin*>(
+ gWorldInstance.AddObject(new OPenguin(pos5, 0x150, OPenguin::PenguinType::ADULT, OPenguin::Behaviour::CIRCLE)));
+ auto penguin8 = reinterpret_cast<OPenguin*>(
+ gWorldInstance.AddObject(new OPenguin(pos5, 0x150, OPenguin::PenguinType::ADULT, OPenguin::Behaviour::CIRCLE)));
penguin7->Diameter = penguin8->Diameter = 80.0f;
-
if (gGamestate == CREDITS_SEQUENCE) {
FVector pos6 = { 380.0, 0.0f, -535.0f };
- auto penguin9 = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(new OPenguin(pos6, 0x9000, OPenguin::PenguinType::CREDITS, OPenguin::Behaviour::SLIDE3)));
+ auto penguin9 = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(
+ new OPenguin(pos6, 0x9000, OPenguin::PenguinType::CREDITS, OPenguin::Behaviour::SLIDE3)));
penguin9->MirrorModeAngleOffset = -0x4000;
} else {
FVector pos6 = { 146.0f, 0.0f, -380.0f };
- auto penguin9 = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(new OPenguin(pos6, 0x9000, OPenguin::PenguinType::CHICK, OPenguin::Behaviour::SLIDE3)));
+ auto penguin9 = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(
+ new OPenguin(pos6, 0x9000, OPenguin::PenguinType::CHICK, OPenguin::Behaviour::SLIDE3)));
penguin9->MirrorModeAngleOffset = -0x4000;
}
FVector pos7 = { 380.0f, 0.0f, -766.0f };
- auto penguin10 = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(new OPenguin(pos7, 0x5000, OPenguin::PenguinType::CHICK, OPenguin::Behaviour::SLIDE4)));
+ auto penguin10 = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(
+ new OPenguin(pos7, 0x5000, OPenguin::PenguinType::CHICK, OPenguin::Behaviour::SLIDE4)));
penguin10->MirrorModeAngleOffset = 0x8000;
FVector pos8 = { -2300.0f, 0.0f, -210.0f };
- auto penguin11 = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(new OPenguin(pos8, 0xC000, OPenguin::PenguinType::CHICK, OPenguin::Behaviour::SLIDE6)));
+ auto penguin11 = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(
+ new OPenguin(pos8, 0xC000, OPenguin::PenguinType::CHICK, OPenguin::Behaviour::SLIDE6)));
penguin11->MirrorModeAngleOffset = 0x8000;
FVector pos9 = { -2500.0f, 0.0f, -250.0f };
- auto penguin12 = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(new OPenguin(pos9, 0x4000, OPenguin::PenguinType::CHICK, OPenguin::Behaviour::SLIDE6)));
+ auto penguin12 = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(
+ new OPenguin(pos9, 0x4000, OPenguin::PenguinType::CHICK, OPenguin::Behaviour::SLIDE6)));
penguin12->MirrorModeAngleOffset = 0x8000;
FVector pos10 = { -535.0f, 0.0f, 875.0f };
- auto penguin13 = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(new OPenguin(pos10, 0x8000, OPenguin::PenguinType::CHICK, OPenguin::Behaviour::SLIDE6)));
+ auto penguin13 = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(
+ new OPenguin(pos10, 0x8000, OPenguin::PenguinType::CHICK, OPenguin::Behaviour::SLIDE6)));
penguin13->MirrorModeAngleOffset = -0x4000;
FVector pos11 = { -250.0f, 0.0f, 953.0f };
- auto penguin14 = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(new OPenguin(pos11, 0x9000, OPenguin::PenguinType::CHICK, OPenguin::Behaviour::SLIDE6)));
+ auto penguin14 = reinterpret_cast<OPenguin*>(gWorldInstance.AddObject(
+ new OPenguin(pos11, 0x9000, OPenguin::PenguinType::CHICK, OPenguin::Behaviour::SLIDE6)));
penguin14->MirrorModeAngleOffset = -0x4000;
if (gGamestate != CREDITS_SEQUENCE) {
@@ -239,10 +252,11 @@ void SherbetLand::Render(struct UnkStruct_800DC5EC* arg0) {
}
void SherbetLand::RenderCredits() {
- gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_sherbet_land_dl_9AE8));
+ gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_sherbet_land_dl_9AE8));
}
-void SherbetLand::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) {
+void SherbetLand::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot,
+ uint16_t playerDirection) {
Mat4 matrix;
gDPPipeSync(gDisplayListHead++);
@@ -263,14 +277,14 @@ void SherbetLand::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCoun
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
// d_course_sherbet_land_packed_dl_2B48
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07002B48));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07002B48));
}
gDPPipeSync(gDisplayListHead++);
}
void SherbetLand::CreditsSpawnActors() {
// d_course_sherbet_land_packed_dl_1EB8
- find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07001EB8), -0x4C, 0xFF, 0xFF, 0xFF);
+ find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07001EB8), -0x4C, 0xFF, 0xFF, 0xFF);
// d_course_sherbet_land_packed_dl_2308
- find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07002308), -0x6A, 0xFF, 0xFF, 0xFF);
+ find_vtx_and_set_colours(segmented_gfx_to_virtual((void*) 0x07002308), -0x6A, 0xFF, 0xFF, 0xFF);
}
diff --git a/src/engine/courses/SherbetLand.h b/src/engine/courses/SherbetLand.h
index eb62e2807..f57563405 100644
--- a/src/engine/courses/SherbetLand.h
+++ b/src/engine/courses/SherbetLand.h
@@ -4,33 +4,34 @@
#include "Course.h"
extern "C" {
- #include "assets/sherbet_land_vertices.h"
- #include "assets/sherbet_land_displaylists.h"
- #include "assets/sherbet_land_data.h"
- #include "course_offsets.h"
- #include "camera.h"
- #include "data/some_data.h"
- #include "objects.h"
- #include "path_spawn_metadata.h"
- extern const course_texture sherbet_land_textures[];
+#include "assets/sherbet_land_vertices.h"
+#include "assets/sherbet_land_displaylists.h"
+#include "assets/sherbet_land_data.h"
+#include "course_offsets.h"
+#include "camera.h"
+#include "data/some_data.h"
+#include "objects.h"
+#include "path_spawn_metadata.h"
+extern const course_texture sherbet_land_textures[];
}
class SherbetLand : public Course {
-public:
- virtual ~SherbetLand() = default; // Virtual destructor for proper cleanup in derived classes
+ public:
+ virtual ~SherbetLand() = default; // Virtual destructor for proper cleanup in derived classes
// Constructor
explicit SherbetLand();
-// virtual void Load(const char* courseVtx,
-// course_texture* textures, const char* displaylists, size_t dlSize);
+ // virtual void Load(const char* courseVtx,
+ // course_texture* textures, const char* displaylists, size_t dlSize);
virtual void Load() override;
virtual f32 GetWaterLevel(FVector pos, Collision* collision) override;
virtual void BeginPlay() override;
virtual void UpdateCourseObjects() override;
virtual void RenderCourseObjects(s32 cameraId) override;
virtual void Render(struct UnkStruct_800DC5EC*) override;
- virtual void RenderCredits() override;
- virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) override;
+ virtual void RenderCredits() override;
+ virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot,
+ uint16_t playerDirection) override;
virtual void CreditsSpawnActors() override;
};
diff --git a/src/engine/courses/Skyscraper.cpp b/src/engine/courses/Skyscraper.cpp
index 4c165a787..99e73942a 100644
--- a/src/engine/courses/Skyscraper.cpp
+++ b/src/engine/courses/Skyscraper.cpp
@@ -9,27 +9,27 @@
#include "assets/skyscraper_data.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 "collision.h"
- #include "memory.h"
- extern const char *skyscraper_dls[];
- extern s16 currentScreenSection;
+#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 "collision.h"
+#include "memory.h"
+extern const char* skyscraper_dls[];
+extern s16 currentScreenSection;
}
const course_texture skyscraper_textures[] = {
@@ -87,7 +87,7 @@ Skyscraper::Skyscraper() {
Props.NearPersp = 2.0f;
Props.FarPersp = 2700.0f;
- Props.PathSizes = {1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
+ Props.PathSizes = { 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@@ -122,14 +122,14 @@ Skyscraper::Skyscraper() {
Props.Clouds = NULL; // no clouds
Props.CloudList = NULL;
- Props.Skybox.TopRight = {0, 0, 0};
- Props.Skybox.BottomRight = {0, 0, 0};
- Props.Skybox.BottomLeft = {0, 0, 0};
- Props.Skybox.TopLeft = {0, 0, 0};
- 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, 0, 0 };
+ Props.Skybox.BottomRight = { 0, 0, 0 };
+ Props.Skybox.BottomLeft = { 0, 0, 0 };
+ Props.Skybox.TopLeft = { 0, 0, 0 };
+ 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_BATTLE_ARENAS;
Props.WaterLevel = -480.0f;
@@ -139,9 +139,9 @@ void Skyscraper::Load() {
Course::Load();
// d_course_skyscraper_packed_dl_1110
- generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*)0x07001110), 1);
+ generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*) 0x07001110), 1);
// d_course_skyscraper_packed_dl_258
- generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*)0x07000258), 1);
+ generate_collision_mesh_with_default_section_id((Gfx*) segmented_gfx_to_virtual((void*) 0x07000258), 1);
func_80295C6C();
}
@@ -149,7 +149,7 @@ void Skyscraper::LoadTextures() {
}
void Skyscraper::BeginPlay() {
- spawn_all_item_boxes((ActorSpawnData*)LOAD_ASSET_RAW(d_course_skyscraper_item_box_spawns));
+ spawn_all_item_boxes((ActorSpawnData*) LOAD_ASSET_RAW(d_course_skyscraper_item_box_spawns));
if (gModeSelection == VERSUS) {
FVector pos = { 0, 0, 0 };
@@ -164,13 +164,17 @@ void Skyscraper::BeginPlay() {
}
}
-void Skyscraper::InitCourseObjects() {}
+void Skyscraper::InitCourseObjects() {
+}
-void Skyscraper::SomeSounds() {}
+void Skyscraper::SomeSounds() {
+}
-void Skyscraper::WhatDoesThisDo(Player* player, int8_t playerId) {}
+void Skyscraper::WhatDoesThisDo(Player* player, int8_t playerId) {
+}
-void Skyscraper::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
+void Skyscraper::WhatDoesThisDoAI(Player* player, int8_t playerId) {
+}
void Skyscraper::Render(struct UnkStruct_800DC5EC* arg0) {
set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
@@ -178,27 +182,29 @@ void Skyscraper::Render(struct UnkStruct_800DC5EC* arg0) {
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
// d_course_skyscraper_packed_dl_FE8
- gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x07000FE8)));
+ gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x07000FE8)));
// d_course_skyscraper_packed_dl_C60
- gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x07000C60)));
+ gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x07000C60)));
// d_course_skyscraper_packed_dl_B70
- gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x07000B70)));
+ gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x07000B70)));
// d_course_skyscraper_packed_dl_6B8
- gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x070006B8)));
+ gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x070006B8)));
// d_course_skyscraper_packed_dl_570
- gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x07000570)));
+ gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x07000570)));
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
// d_course_skyscraper_packed_dl_10C8
- gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x070010C8)));
+ gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x070010C8)));
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
// d_course_skyscraper_packed_dl_258
- gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x07000258)));
+ gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*) 0x07000258)));
}
-void Skyscraper::RenderCredits() {}
+void Skyscraper::RenderCredits() {
+}
void Skyscraper::Waypoints(Player* player, int8_t playerId) {
player->nearestWaypointId = 0;
}
-void Skyscraper::Destroy() { }
+void Skyscraper::Destroy() {
+}
diff --git a/src/engine/courses/Skyscraper.h b/src/engine/courses/Skyscraper.h
index ed6592121..122e649eb 100644
--- a/src/engine/courses/Skyscraper.h
+++ b/src/engine/courses/Skyscraper.h
@@ -4,36 +4,36 @@
#include "Course.h"
extern "C" {
- #include "assets/skyscraper_vertices.h"
- #include "assets/skyscraper_displaylists.h"
- #include "assets/skyscraper_data.h"
- #include "course_offsets.h"
- #include "camera.h"
- #include "data/some_data.h"
- #include "objects.h"
- #include "path_spawn_metadata.h"
- extern const course_texture skyscraper_textures[];
+#include "assets/skyscraper_vertices.h"
+#include "assets/skyscraper_displaylists.h"
+#include "assets/skyscraper_data.h"
+#include "course_offsets.h"
+#include "camera.h"
+#include "data/some_data.h"
+#include "objects.h"
+#include "path_spawn_metadata.h"
+extern const course_texture skyscraper_textures[];
}
class Skyscraper : public Course {
-public:
- virtual ~Skyscraper() = default; // Virtual destructor for proper cleanup in derived classes
+ public:
+ virtual ~Skyscraper() = default; // Virtual destructor for proper cleanup in derived classes
// Constructor
explicit Skyscraper();
-// virtual void Load(const char* courseVtx,
-// course_texture* textures, const char* displaylists, size_t dlSize);
+ // virtual void Load(const char* courseVtx,
+ // course_texture* textures, const char* displaylists, size_t dlSize);
virtual void Load() override;
virtual void LoadTextures() override;
virtual void BeginPlay() override;
- //virtual void InitClouds() override;
+ // virtual void InitClouds() override;
virtual void InitCourseObjects() override;
virtual void SomeSounds() override;
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
virtual void Render(struct UnkStruct_800DC5EC*) override;
- virtual void RenderCredits() override;
+ virtual void RenderCredits() override;
virtual void Waypoints(Player* player, int8_t playerId) override;
virtual void Destroy() override;
};
diff --git a/src/engine/courses/TestCourse.cpp b/src/engine/courses/TestCourse.cpp
index eebaee17a..fa1c72303 100644
--- a/src/engine/courses/TestCourse.cpp
+++ b/src/engine/courses/TestCourse.cpp
@@ -31,31 +31,31 @@
#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 "collision.h"
- #include "memory.h"
- #include "course.h"
- extern Gfx test_course_dls[];
- extern Vtx mario_Plane_001_mesh_vtx_1[];
- extern Gfx mario_Plane_001_mesh[];
- extern TrackWaypoint test_course_path[];
- extern TrackSections test_course_addr[];
+#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 "collision.h"
+#include "memory.h"
+#include "course.h"
+extern Gfx test_course_dls[];
+extern Vtx mario_Plane_001_mesh_vtx_1[];
+extern Gfx mario_Plane_001_mesh[];
+extern TrackWaypoint test_course_path[];
+extern TrackSections test_course_addr[];
}
TestCourse::TestCourse() {
@@ -71,7 +71,7 @@ TestCourse::TestCourse() {
Props.Minimap.PlayerScaleFactor = 0.022f;
Props.Minimap.FinishlineX = 0;
Props.Minimap.FinishlineY = 0;
- Props.Minimap.Colour = {255, 255, 255};
+ Props.Minimap.Colour = { 255, 255, 255 };
Id = "mk:test_course";
@@ -87,7 +87,7 @@ TestCourse::TestCourse() {
Props.NearPersp = 9.0f;
Props.FarPersp = 4500.0f;
- Props.PathSizes = {51, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
+ Props.PathSizes = { 51, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@@ -123,14 +123,14 @@ TestCourse::TestCourse() {
Props.Clouds = gKalimariDesertClouds;
Props.CloudList = gLuigiRacewayClouds;
- Props.Skybox.TopRight = {120, 140, 188};
- Props.Skybox.BottomRight = {216, 232, 248};
- Props.Skybox.BottomLeft = {216, 232, 248};
- Props.Skybox.TopLeft = {40, 184, 208};
- 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 = { 120, 140, 188 };
+ Props.Skybox.BottomRight = { 216, 232, 248 };
+ Props.Skybox.BottomLeft = { 216, 232, 248 };
+ Props.Skybox.TopLeft = { 40, 184, 208 };
+ 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;
}
@@ -139,7 +139,7 @@ void TestCourse::Load() {
generate_collision_mesh_with_defaults(mario_Plane_001_mesh);
- parse_course_displaylists((TrackSections*)test_course_addr);
+ parse_course_displaylists((TrackSections*) test_course_addr);
func_80295C6C();
Props.WaterLevel = gCourseMinY - 10.0f;
}
@@ -158,58 +158,58 @@ void TestCourse::LoadTextures() {
}
Path2D test_course_path2D[] = {
- { 0, 0},
- { 0, -100},
- { 0, -200},
- { 0, -300},
- { 0, -400},
- { 0, -500},
- { 0, -600},
- { 0, -700},
- { 0, -800},
- { 0, -900},
- { 0, -1000},
- { 0, -1096}, // Main point 1
- { 100, -1090},
- { 200, -1085},
- { 300, -1080},
- { 400, -1075},
- { 500, -1072}, // Curve begins to smooth here
- { 600, -1068},
- { 700, -1065},
- { 800, -1063},
- { 900, -1061},
- { 984, -1060}, // Main point 2
- { 990, -900},
- { 995, -800},
- { 997, -700},
- { 998, -600},
- { 999, -500},
- { 999, -400},
- { 999, -300},
- { 999, -200},
- { 999, -100},
- { 999, 0},
- { 999, 100},
- { 999, 200},
- { 999, 300},
- { 999, 400},
- { 999, 500},
- { 999, 600},
- { 999, 700},
- { 999, 800},
- { 999, 900},
- { 999, 940}, // Main point 3
- { 900, 945},
- { 800, 945},
- { 700, 947},
- { 600, 948},
- { 500, 949},
- { 400, 949},
- { 300, 949},
- { 200, 950},
- { 100, 950},
- { 0, 950}, // Main point 4
+ { 0, 0 },
+ { 0, -100 },
+ { 0, -200 },
+ { 0, -300 },
+ { 0, -400 },
+ { 0, -500 },
+ { 0, -600 },
+ { 0, -700 },
+ { 0, -800 },
+ { 0, -900 },
+ { 0, -1000 },
+ { 0, -1096 }, // Main point 1
+ { 100, -1090 },
+ { 200, -1085 },
+ { 300, -1080 },
+ { 400, -1075 },
+ { 500, -1072 }, // Curve begins to smooth here
+ { 600, -1068 },
+ { 700, -1065 },
+ { 800, -1063 },
+ { 900, -1061 },
+ { 984, -1060 }, // Main point 2
+ { 990, -900 },
+ { 995, -800 },
+ { 997, -700 },
+ { 998, -600 },
+ { 999, -500 },
+ { 999, -400 },
+ { 999, -300 },
+ { 999, -200 },
+ { 999, -100 },
+ { 999, 0 },
+ { 999, 100 },
+ { 999, 200 },
+ { 999, 300 },
+ { 999, 400 },
+ { 999, 500 },
+ { 999, 600 },
+ { 999, 700 },
+ { 999, 800 },
+ { 999, 900 },
+ { 999, 940 }, // Main point 3
+ { 900, 945 },
+ { 800, 945 },
+ { 700, 947 },
+ { 600, 948 },
+ { 500, 949 },
+ { 400, 949 },
+ { 300, 949 },
+ { 200, 950 },
+ { 100, 950 },
+ { 0, 950 }, // Main point 4
// End of path
{ -32768, -32768 } // Terminator
@@ -217,33 +217,24 @@ Path2D test_course_path2D[] = {
void TestCourse::BeginPlay() {
struct ActorSpawnData itemboxes[] = {
- { 200, 1500, 200 , 0},
- { 350, 2500, 300 , 1},
- { 400, 2000, 350 , 2},
- { 40, 0, -800, 0},
- { -40, 0, -800, 0},
- { 0, 0, -800, 0},
- { 999, 6, 482, 0},
- { 1064, 8, 275, {0}},
- { 1028, 5, -39 , {0}},
- { 320, 0, 1020, {0}},
- { 293, 0, 950, {0}},
- {{ -32768, 0, 0 }, {0}},
+ { 200, 1500, 200, 0 }, { 350, 2500, 300, 1 }, { 400, 2000, 350, 2 }, { 40, 0, -800, 0 },
+ { -40, 0, -800, 0 }, { 0, 0, -800, 0 }, { 999, 6, 482, 0 }, { 1064, 8, 275, { 0 } },
+ { 1028, 5, -39, { 0 } }, { 320, 0, 1020, { 0 } }, { 293, 0, 950, { 0 } }, { { -32768, 0, 0 }, { 0 } },
};
struct ActorSpawnData rocks[] = {
- {{ 200, 1500, 200 }, {0}},
- {{ 350, 2500, 300 }, {1}},
- {{ 400, 2000, 350 }, {2}},
- {{ -32768, 0, 0 }, {0}},
+ { { 200, 1500, 200 }, { 0 } },
+ { { 350, 2500, 300 }, { 1 } },
+ { { 400, 2000, 350 }, { 2 } },
+ { { -32768, 0, 0 }, { 0 } },
};
spawn_all_item_boxes(itemboxes);
spawn_falling_rocks(rocks);
- Vec3f test = {-100, 0, -150};
- Vec3s rot = {0, 0, 0};
- Vec3f vel = {0, 0, 0};
+ Vec3f test = { -100, 0, -150 };
+ Vec3s rot = { 0, 0, 0 };
+ Vec3f vel = { 0, 0, 0 };
add_actor_to_empty_slot(test, rot, vel, ACTOR_TREE_MARIO_RACEWAY);
@@ -253,15 +244,15 @@ void TestCourse::BeginPlay() {
Vec3s rotation = { 0, 0, 0 };
vec3f_set(position, 50.0f, 2.0f, 50.0f);
- Vec3f crossingPos = {0, 2, 0};
+ Vec3f crossingPos = { 0, 2, 0 };
uintptr_t* crossing1 = (uintptr_t*) gWorldInstance.AddCrossing(crossingPos, 0, 2, 900.0f, 650.0f);
position[0] *= gCourseDirection;
- rrxing = (struct RailroadCrossing*) GET_ACTOR(add_actor_to_empty_slot(position, rotation, velocity,
- ACTOR_RAILROAD_CROSSING));
+ rrxing = (struct RailroadCrossing*) GET_ACTOR(
+ add_actor_to_empty_slot(position, rotation, velocity, ACTOR_RAILROAD_CROSSING));
rrxing->crossingTrigger = crossing1;
- Vec3f pos = {0, 80, 0};
+ Vec3f pos = { 0, 80, 0 };
// gWorldInstance.AddActor(new ACloud(pos));
// gWorldInstance.AddActor(new OSeagull(0, pos));
@@ -270,24 +261,25 @@ void TestCourse::BeginPlay() {
// gWorldInstance.AddActor(new OSeagull(3, pos));
// gWorldInstance.AddObject(new OCheepCheep(FVector(0, 40, 0), OCheepCheep::CheepType::RACE, IPathSpan(0, 10)));
// gWorldInstance.AddObject(new OTrophy(FVector(0,0,0), OTrophy::TrophyType::GOLD, OTrophy::Behaviour::GO_FISH));
- //gWorldInstance.AddObject(new OSnowman(FVector(0, 0, 0)));
- //gWorldInstance.AddObject(new OTrashBin(FVector(0.0f, 0.0f, 0.0f), IRotator(0, 90, 0), 1.0f, OTrashBin::Behaviour::MUNCHING));
+ // gWorldInstance.AddObject(new OSnowman(FVector(0, 0, 0)));
+ // gWorldInstance.AddObject(new OTrashBin(FVector(0.0f, 0.0f, 0.0f), IRotator(0, 90, 0), 1.0f,
+ // OTrashBin::Behaviour::MUNCHING));
- //gWorldInstance.AddObject(new OHedgehog(FVector(0, 0, 0), FVector2D(0, -200), 9));
- //gWorldInstance.AddObject(new OFlagpole(FVector(0, 0, -200), 0x400));
-// gWorldInstance.AddObject(new OHotAirBalloon(FVector(0.0, 20.0f, -200.0f)));
+ // gWorldInstance.AddObject(new OHedgehog(FVector(0, 0, 0), FVector2D(0, -200), 9));
+ // gWorldInstance.AddObject(new OFlagpole(FVector(0, 0, -200), 0x400));
+ // gWorldInstance.AddObject(new OHotAirBalloon(FVector(0.0, 20.0f, -200.0f)));
- //gWorldInstance.AddObject(new OCrab(FVector2D(0, 0), FVector2D(0, -200)));
-// gWorldInstance.AddActor(new ABowserStatue(FVector(-200, 0, 0), ABowserStatue::Behaviour::CRUSH));
+ // gWorldInstance.AddObject(new OCrab(FVector2D(0, 0), FVector2D(0, -200)));
+ // gWorldInstance.AddActor(new ABowserStatue(FVector(-200, 0, 0), ABowserStatue::Behaviour::CRUSH));
-// gWorldInstance.AddObject(new OBoos(10, IPathSpan(0, 5), IPathSpan(18, 23), IPathSpan(25, 50)));
+ // gWorldInstance.AddObject(new OBoos(10, IPathSpan(0, 5), IPathSpan(18, 23), IPathSpan(25, 50)));
gVehicle2DWaypoint = test_course_path2D;
gVehicle2DWaypointLength = 53;
D_80162EB0 = spawn_actor_on_surface(test_course_path2D[0].x, 2000.0f, test_course_path2D[0].z);
- //gWorldInstance.AddTrain(ATrain::TenderStatus::HAS_TENDER, 5, 2.5f, 0);
- //gWorldInstance.AddTrain(ATrain::TenderStatus::HAS_TENDER, 5, 2.5f, 8);
+ // gWorldInstance.AddTrain(ATrain::TenderStatus::HAS_TENDER, 5, 2.5f, 0);
+ // gWorldInstance.AddTrain(ATrain::TenderStatus::HAS_TENDER, 5, 2.5f, 8);
FVector pos2 = { 0, 0, 0 };
@@ -300,8 +292,7 @@ void TestCourse::BeginPlay() {
}
void TestCourse::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);
}
@@ -315,8 +306,7 @@ void TestCourse::WhatDoesThisDo(Player* player, int8_t playerId) {
}
void TestCourse::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);
}
@@ -346,4 +336,4 @@ void TestCourse::Render(struct UnkStruct_800DC5EC* arg0) {
bool TestCourse::IsMod() {
return true;
-} \ No newline at end of file
+}
diff --git a/src/engine/courses/TestCourse.h b/src/engine/courses/TestCourse.h
index d44e0a266..a27044a9d 100644
--- a/src/engine/courses/TestCourse.h
+++ b/src/engine/courses/TestCourse.h
@@ -4,26 +4,26 @@
#include "Course.h"
extern "C" {
- #include "mario_raceway_vertices.h"
- #include "mario_raceway_displaylists.h"
- #include "course_offsets.h"
- #include "camera.h"
- #include "data/some_data.h"
- #include "objects.h"
- #include "path_spawn_metadata.h"
- #include "mario_raceway_data.h"
- extern const course_texture test_course_textures[];
+#include "mario_raceway_vertices.h"
+#include "mario_raceway_displaylists.h"
+#include "course_offsets.h"
+#include "camera.h"
+#include "data/some_data.h"
+#include "objects.h"
+#include "path_spawn_metadata.h"
+#include "mario_raceway_data.h"
+extern const course_texture test_course_textures[];
}
class TestCourse : public Course {
-public:
- virtual ~TestCourse() = default; // Virtual destructor for proper cleanup in derived classes
+ public:
+ virtual ~TestCourse() = default; // Virtual destructor for proper cleanup in derived classes
// Constructor
explicit TestCourse();
-// virtual void Load(const char* courseVtx,
-// course_texture* textures, const char* displaylists, size_t dlSize);
+ // virtual void Load(const char* courseVtx,
+ // course_texture* textures, const char* displaylists, size_t dlSize);
virtual void Load() override;
virtual void LoadTextures() override;
virtual void BeginPlay() override;
diff --git a/src/engine/courses/ToadsTurnpike.cpp b/src/engine/courses/ToadsTurnpike.cpp
index 867fedf25..6d69022c1 100644
--- a/src/engine/courses/ToadsTurnpike.cpp
+++ b/src/engine/courses/ToadsTurnpike.cpp
@@ -16,30 +16,30 @@
#include "engine/vehicles/Utils.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 "collision.h"
- #include "memory.h"
- #include "code_80086E70.h"
- #include "course.h"
- extern const char *d_course_toads_turnpike_dl_list[];
- extern s16 currentScreenSection;
- extern s8 gPlayerCount;
+#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 "collision.h"
+#include "memory.h"
+#include "code_80086E70.h"
+#include "course.h"
+extern const char* d_course_toads_turnpike_dl_list[];
+extern s16 currentScreenSection;
+extern s8 gPlayerCount;
}
const course_texture toads_turnpike_textures[] = {
@@ -93,7 +93,7 @@ ToadsTurnpike::ToadsTurnpike() {
Props.NearPersp = 9.0f;
Props.FarPersp = 4500.0f;
- Props.PathSizes = {1000, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
+ Props.PathSizes = { 1000, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@@ -115,12 +115,12 @@ ToadsTurnpike::ToadsTurnpike() {
Props.D_0D009808[2] = 5.75f;
Props.D_0D009808[3] = 6.3333334f;
- Props.PathTable[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_toads_turnpike_unknown_waypoints);
+ Props.PathTable[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_toads_turnpike_unknown_waypoints);
Props.PathTable[1] = NULL;
Props.PathTable[2] = NULL;
Props.PathTable[3] = NULL;
- Props.PathTable2[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_toads_turnpike_track_waypoints);
+ Props.PathTable2[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_toads_turnpike_track_waypoints);
Props.PathTable2[1] = NULL;
Props.PathTable2[2] = NULL;
Props.PathTable2[3] = NULL;
@@ -135,14 +135,14 @@ ToadsTurnpike::ToadsTurnpike() {
this->FinishlineSpawnPoint = finish;
- Props.Skybox.TopRight = {0, 2, 94};
- Props.Skybox.BottomRight = {209, 65, 23};
- Props.Skybox.BottomLeft = {209, 65, 23};
- Props.Skybox.TopLeft = {0, 2, 94};
- Props.Skybox.FloorTopRight = {209, 65, 23};
- Props.Skybox.FloorBottomRight = {0, 0, 0};
- Props.Skybox.FloorBottomLeft = {0, 0, 0};
- Props.Skybox.FloorTopLeft = {209, 65, 23};
+ Props.Skybox.TopRight = { 0, 2, 94 };
+ Props.Skybox.BottomRight = { 209, 65, 23 };
+ Props.Skybox.BottomLeft = { 209, 65, 23 };
+ Props.Skybox.TopLeft = { 0, 2, 94 };
+ Props.Skybox.FloorTopRight = { 209, 65, 23 };
+ Props.Skybox.FloorBottomRight = { 0, 0, 0 };
+ Props.Skybox.FloorBottomLeft = { 0, 0, 0 };
+ Props.Skybox.FloorTopLeft = { 209, 65, 23 };
Props.Sequence = MusicSeq::MUSIC_SEQ_TOADS_TURNPIKE;
}
@@ -154,7 +154,7 @@ void ToadsTurnpike::Load() {
D_801625F0 = 4;
D_802B87B0 = 993;
D_802B87B4 = 1000;
- parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_toads_turnpike_addr));
+ parse_course_displaylists((TrackSections*) LOAD_ASSET_RAW(d_course_toads_turnpike_addr));
func_80295C6C();
Props.WaterLevel = gCourseMinY - 10.0f;
}
@@ -163,7 +163,7 @@ void ToadsTurnpike::LoadTextures() {
}
void ToadsTurnpike::BeginPlay() {
- spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_toads_turnpike_item_box_spawns));
+ spawn_all_item_boxes((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_toads_turnpike_item_box_spawns));
if (gGamestate != CREDITS_SEQUENCE) {
uint32_t waypoint;
@@ -182,7 +182,7 @@ void ToadsTurnpike::BeginPlay() {
for (size_t i = 0; i < _numTrucks; i++) {
waypoint = CalculateWaypointDistribution(i, _numTrucks, gWaypointCountByPathIndex[0], 0);
- gWorldInstance.AddActor(new ATruck(a, b, &D_80164550[0][0], waypoint));
+ gWorldInstance.AddActor(new ATruck(a, b, &D_80164550[0][0], waypoint));
}
for (size_t i = 0; i < _numBuses; i++) {
@@ -221,7 +221,8 @@ void ToadsTurnpike::UpdateClouds(s32 sp1C, Camera* camera) {
update_stars(sp1C, camera, this->Props.CloudList);
}
-void ToadsTurnpike::SomeSounds() {}
+void ToadsTurnpike::SomeSounds() {
+}
void ToadsTurnpike::WhatDoesThisDo(Player* player, int8_t playerId) {
if ((player->type & PLAYER_CINEMATIC_MODE) != PLAYER_CINEMATIC_MODE) {
@@ -268,17 +269,18 @@ void ToadsTurnpike::Render(struct UnkStruct_800DC5EC* arg0) {
gDPSetRenderMode(gDisplayListHead++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_TEX_EDGE2);
gDPSetCombineMode(gDisplayListHead++, G_CC_DECALRGBA, G_CC_PASS2);
// d_course_toads_turnpike_packed_dl_0
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07000000));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07000000));
// d_course_toads_turnpike_packed_dl_68
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x07000068));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x07000068));
// d_course_toads_turnpike_packed_dl_D8
- gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*)0x070000D8));
+ gSPDisplayList(gDisplayListHead++, segmented_gfx_to_virtual((void*) 0x070000D8));
gSPClearGeometryMode(gDisplayListHead++, G_FOG);
gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE);
}
void ToadsTurnpike::RenderCredits() {
- gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_toads_turnpike_dl_23930));
+ gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_toads_turnpike_dl_23930));
}
-void ToadsTurnpike::Destroy() { }
+void ToadsTurnpike::Destroy() {
+}
diff --git a/src/engine/courses/ToadsTurnpike.h b/src/engine/courses/ToadsTurnpike.h
index de145849d..6358097b3 100644
--- a/src/engine/courses/ToadsTurnpike.h
+++ b/src/engine/courses/ToadsTurnpike.h
@@ -4,26 +4,26 @@
#include "Course.h"
extern "C" {
- #include "assets/toads_turnpike_vertices.h"
- #include "assets/toads_turnpike_displaylists.h"
- #include "assets/toads_turnpike_data.h"
- #include "course_offsets.h"
- #include "camera.h"
- #include "data/some_data.h"
- #include "objects.h"
- #include "path_spawn_metadata.h"
- extern const course_texture toads_turnpike_textures[];
+#include "assets/toads_turnpike_vertices.h"
+#include "assets/toads_turnpike_displaylists.h"
+#include "assets/toads_turnpike_data.h"
+#include "course_offsets.h"
+#include "camera.h"
+#include "data/some_data.h"
+#include "objects.h"
+#include "path_spawn_metadata.h"
+extern const course_texture toads_turnpike_textures[];
}
class ToadsTurnpike : public Course {
-public:
- virtual ~ToadsTurnpike() = default; // Virtual destructor for proper cleanup in derived classes
+ public:
+ virtual ~ToadsTurnpike() = default; // Virtual destructor for proper cleanup in derived classes
// Constructor
explicit ToadsTurnpike();
-// virtual void Load(const char* courseVtx,
-// course_texture* textures, const char* displaylists, size_t dlSize);
+ // virtual void Load(const char* courseVtx,
+ // course_texture* textures, const char* displaylists, size_t dlSize);
virtual void Load() override;
virtual void LoadTextures() override;
virtual void BeginPlay() override;
@@ -33,9 +33,10 @@ public:
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
virtual void Render(struct UnkStruct_800DC5EC*) override;
- virtual void RenderCredits() override;
+ virtual void RenderCredits() override;
virtual void Destroy() override;
-private:
+
+ private:
size_t _numTrucks = 7;
size_t _numBuses = 7;
size_t _numTankerTrucks = 7;
diff --git a/src/engine/courses/YoshiValley.cpp b/src/engine/courses/YoshiValley.cpp
index 5fbcbea69..a5de1e86f 100644
--- a/src/engine/courses/YoshiValley.cpp
+++ b/src/engine/courses/YoshiValley.cpp
@@ -14,27 +14,27 @@
#include "assets/boo_frames.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 "collision.h"
- #include "memory.h"
- #include "course.h"
- extern const char *d_course_yoshi_valley_dl_list[];
+#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 "collision.h"
+#include "memory.h"
+#include "course.h"
+extern const char* d_course_yoshi_valley_dl_list[];
}
const course_texture yoshi_valley_textures[] = {
@@ -82,7 +82,7 @@ YoshiValley::YoshiValley() {
Props.NearPersp = 9.0f;
Props.FarPersp = 4500.0f;
- Props.PathSizes = {0x02B2, 0x02A8, 0x02B2, 0x0320, 1, 0, 0, 0, 0, 0, 0};
+ Props.PathSizes = { 0x02B2, 0x02A8, 0x02B2, 0x0320, 1, 0, 0, 0, 0, 0, 0 };
Props.D_0D009418[0] = 4.1666665f;
Props.D_0D009418[1] = 5.5833334f;
@@ -104,28 +104,28 @@ YoshiValley::YoshiValley() {
Props.D_0D009808[2] = 5.75f;
Props.D_0D009808[3] = 6.3333334f;
- Props.PathTable[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_yoshi_valley_unknown_waypoints);
- Props.PathTable[1] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_yoshi_valley_unknown_waypoints_2);
- Props.PathTable[2] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_yoshi_valley_unknown_waypoints_3);
- Props.PathTable[3] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_yoshi_valley_unknown_waypoints_4);
+ Props.PathTable[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_yoshi_valley_unknown_waypoints);
+ Props.PathTable[1] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_yoshi_valley_unknown_waypoints_2);
+ Props.PathTable[2] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_yoshi_valley_unknown_waypoints_3);
+ Props.PathTable[3] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_yoshi_valley_unknown_waypoints_4);
- Props.PathTable2[0] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_yoshi_valley_track_waypoints);
- Props.PathTable2[1] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_yoshi_valley_track_waypoints_2);
- Props.PathTable2[2] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_yoshi_valley_track_waypoints_3);
- Props.PathTable2[3] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_yoshi_valley_track_waypoints_4);
+ Props.PathTable2[0] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_yoshi_valley_track_waypoints);
+ Props.PathTable2[1] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_yoshi_valley_track_waypoints_2);
+ Props.PathTable2[2] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_yoshi_valley_track_waypoints_3);
+ Props.PathTable2[3] = (TrackWaypoint*) LOAD_ASSET_RAW(d_course_yoshi_valley_track_waypoints_4);
Props.CloudTexture = (u8*) LOAD_ASSET_RAW(gTextureExhaust0);
Props.Clouds = gYoshiValleyMooMooFarmClouds;
Props.CloudList = gYoshiValleyMooMooFarmClouds;
- Props.Skybox.TopRight = {113, 70, 255};
- Props.Skybox.BottomRight = {255, 184, 99};
- Props.Skybox.BottomLeft = {255, 184, 99};
- Props.Skybox.TopLeft = {113, 70, 255};
- Props.Skybox.FloorTopRight = {95, 40, 15};
- Props.Skybox.FloorBottomRight = {0, 0, 0};
- Props.Skybox.FloorBottomLeft = {0, 0, 0};
- Props.Skybox.FloorTopLeft = {95, 40, 15};
+ Props.Skybox.TopRight = { 113, 70, 255 };
+ Props.Skybox.BottomRight = { 255, 184, 99 };
+ Props.Skybox.BottomLeft = { 255, 184, 99 };
+ Props.Skybox.TopLeft = { 113, 70, 255 };
+ Props.Skybox.FloorTopRight = { 95, 40, 15 };
+ Props.Skybox.FloorBottomRight = { 0, 0, 0 };
+ Props.Skybox.FloorBottomLeft = { 0, 0, 0 };
+ Props.Skybox.FloorTopLeft = { 95, 40, 15 };
Props.Sequence = MusicSeq::MUSIC_SEQ_MOO_MOO_FARM_YOSHI_VALLEY;
}
@@ -134,7 +134,7 @@ void YoshiValley::Load() {
Lights1 lights4 = gdSPDefLights1(100, 100, 100, 255, 254, 254, 0, 0, 120);
set_track_light_direction(&lights4, -0x38F0, 0x1C70, 1);
- parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_yoshi_valley_addr));
+ parse_course_displaylists((TrackSections*) LOAD_ASSET_RAW(d_course_yoshi_valley_addr));
func_80295C6C();
Props.WaterLevel = gCourseMinY - 10.0f;
}
@@ -148,8 +148,8 @@ void YoshiValley::BeginPlay() {
Vec3f velocity = { 0.0f, 0.0f, 0.0f };
Vec3s rotation = { 0, 0, 0 };
- spawn_foliage((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_yoshi_valley_tree_spawn));
- spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_yoshi_valley_item_box_spawns));
+ spawn_foliage((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_yoshi_valley_tree_spawn));
+ spawn_all_item_boxes((struct ActorSpawnData*) LOAD_ASSET_RAW(d_course_yoshi_valley_item_box_spawns));
vec3f_set(position, -2300.0f, 0.0f, 634.0f);
position[0] *= gCourseDirection;
add_actor_to_empty_slot(position, rotation, velocity, ACTOR_YOSHI_EGG);
@@ -212,9 +212,11 @@ void YoshiValley::RenderCourseObjects(s32 cameraId) {
void YoshiValley::SomeSounds() {
}
-void YoshiValley::WhatDoesThisDo(Player* player, int8_t playerId) {}
+void YoshiValley::WhatDoesThisDo(Player* player, int8_t playerId) {
+}
-void YoshiValley::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
+void YoshiValley::WhatDoesThisDoAI(Player* player, int8_t playerId) {
+}
void YoshiValley::Render(struct UnkStruct_800DC5EC* arg0) {
gDPPipeSync(gDisplayListHead++);
@@ -226,14 +228,15 @@ void YoshiValley::Render(struct UnkStruct_800DC5EC* arg0) {
}
void YoshiValley::RenderCredits() {
- gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_yoshi_valley_dl_18020));
+ gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_yoshi_valley_dl_18020));
}
void YoshiValley::Waypoints(Player* player, int8_t playerId) {
player->nearestWaypointId = gCopyNearestWaypointByPlayerId[playerId];
}
-void YoshiValley::ScrollingTextures() {}
+void YoshiValley::ScrollingTextures() {
+}
void YoshiValley::CreditsSpawnActors() {
Vec3f position;
@@ -245,4 +248,5 @@ void YoshiValley::CreditsSpawnActors() {
add_actor_to_empty_slot(position, rotation, velocity, ACTOR_YOSHI_EGG);
}
-void YoshiValley::Destroy() {}
+void YoshiValley::Destroy() {
+}
diff --git a/src/engine/courses/YoshiValley.h b/src/engine/courses/YoshiValley.h
index b4ec8d442..92c714602 100644
--- a/src/engine/courses/YoshiValley.h
+++ b/src/engine/courses/YoshiValley.h
@@ -4,26 +4,26 @@
#include "Course.h"
extern "C" {
- #include "assets/yoshi_valley_vertices.h"
- #include "assets/yoshi_valley_displaylists.h"
- #include "assets/yoshi_valley_data.h"
- #include "course_offsets.h"
- #include "camera.h"
- #include "data/some_data.h"
- #include "objects.h"
- #include "path_spawn_metadata.h"
- extern const course_texture yoshi_valley_textures[];
+#include "assets/yoshi_valley_vertices.h"
+#include "assets/yoshi_valley_displaylists.h"
+#include "assets/yoshi_valley_data.h"
+#include "course_offsets.h"
+#include "camera.h"
+#include "data/some_data.h"
+#include "objects.h"
+#include "path_spawn_metadata.h"
+extern const course_texture yoshi_valley_textures[];
}
class YoshiValley : public Course {
-public:
- virtual ~YoshiValley() = default; // Virtual destructor for proper cleanup in derived classes
+ public:
+ virtual ~YoshiValley() = default; // Virtual destructor for proper cleanup in derived classes
// Constructor
explicit YoshiValley();
-// virtual void Load(const char* courseVtx,
-// course_texture* textures, const char* displaylists, size_t dlSize);
+ // virtual void Load(const char* courseVtx,
+ // course_texture* textures, const char* displaylists, size_t dlSize);
virtual void Load() override;
virtual void LoadTextures() override;
virtual void BeginPlay() override;
@@ -34,7 +34,7 @@ public:
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
virtual void Render(struct UnkStruct_800DC5EC*) override;
- virtual void RenderCredits() override;
+ virtual void RenderCredits() override;
virtual void ScrollingTextures() override;
virtual void Waypoints(Player* player, int8_t playerId) override;
virtual void CreditsSpawnActors() override;