diff options
| author | KiritoDv <36680385+KiritoDv@users.noreply.github.com> | 2025-05-16 02:44:40 +0000 |
|---|---|---|
| committer | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2025-05-16 02:44:40 +0000 |
| commit | b53a5dbcfa24ef2aa4860b6d9512709976686de8 (patch) | |
| tree | 441f2bb9c0bc8f955eb9289d19b13beab5c239c5 /src/engine/courses/TestCourse.cpp | |
| parent | bdf5ca8d603ae56ac275bebf9fde58ae72484d76 (diff) | |
clang formatclang-format
Diffstat (limited to 'src/engine/courses/TestCourse.cpp')
| -rw-r--r-- | src/engine/courses/TestCourse.cpp | 242 |
1 files changed, 116 insertions, 126 deletions
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 +} |
