diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2025-01-23 11:22:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-23 11:22:07 -0700 |
| commit | 1f189dfa804a05177f99dda1044898eb63fdcb3f (patch) | |
| tree | 598e0a6c26a5554afd1fcbcd801079fd1df090d3 /src/engine/Smoke.cpp | |
| parent | 24ecfc3db43bfa606f41c42ef8778f96b5047c6b (diff) | |
Game.cpp and World.cpp Cleanup (#159)
* Remove CProperties and delete dup Properties from World.h
* Improvement
* Fix compile
* Cleanup
* Document gRaceState
* wip cleanup
* compile
* Impl PlayerBombKart
* Rename CourseManager_ to CM_
* Finish renames m_ to CM_
* cleanup
* Remove extra printf
---------
Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
Diffstat (limited to 'src/engine/Smoke.cpp')
| -rw-r--r-- | src/engine/Smoke.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/engine/Smoke.cpp b/src/engine/Smoke.cpp index 9841bfffb..5fb0c0c39 100644 --- a/src/engine/Smoke.cpp +++ b/src/engine/Smoke.cpp @@ -3,7 +3,6 @@ #include "Smoke.h" #include "World.h" -#include "vehicles/Vehicle.h" #include "vehicles/Train.h" #include "vehicles/Boat.h" @@ -23,8 +22,8 @@ void TrainSmokeTick() { s32 temp_a0; Object* object; - for (auto& vehicle : gWorldInstance.Vehicles) { - if (auto train = dynamic_cast<ATrain*>(vehicle)) { + for (auto& actor : gWorldInstance.Actors) { + if (auto train = dynamic_cast<ATrain*>(actor)) { if (train->SmokeTimer != 0) { train->SmokeTimer -= 1; } @@ -48,7 +47,7 @@ void TrainSmokeTick() { train->SmokeTimer = 100; } } - } else if (auto boat = dynamic_cast<ABoat*>(vehicle)) { + } else if (auto boat = dynamic_cast<ABoat*>(actor)) { if (boat->SmokeTimer != 0) { boat->SmokeTimer -= 1; } @@ -78,8 +77,9 @@ void TrainSmokeTick() { void TrainSmokeDraw(s32 cameraId) { Camera* camera = &camera1[cameraId]; - for (auto& vehicle : gWorldInstance.Vehicles) { - if (auto train = dynamic_cast<ATrain*>(vehicle)) { + + for (auto& actor : gWorldInstance.Actors) { + if (auto train = dynamic_cast<ATrain*>(actor)) { gSPDisplayList(gDisplayListHead++, (Gfx*)D_0D007AE0); load_texture_block_i8_nomirror((uint8_t*)D_0D029458, 32, 32); func_8004B72C(255, 255, 255, 255, 255, 255, 255); @@ -92,7 +92,7 @@ void TrainSmokeDraw(s32 cameraId) { render_object_train_smoke_particle(train->SmokeParticles[i], cameraId); } } - } else if (auto boat = dynamic_cast<ABoat*>(vehicle)) { + } else if (auto boat = dynamic_cast<ABoat*>(actor)) { gSPDisplayList(gDisplayListHead++, (Gfx*)D_0D007AE0); load_texture_block_i8_nomirror((uint8_t*)D_0D029458, 32, 32); |
