summaryrefslogtreecommitdiff
path: root/src/engine/Smoke.cpp
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2025-12-13 11:50:28 -0700
committerGitHub <noreply@github.com>2025-12-13 11:50:28 -0700
commitb934e98fc34964970ab5efacb2fb7c3372ae0b1a (patch)
treecd96e5fabec7fdcc098d0de33b3b7e2754fb6cd5 /src/engine/Smoke.cpp
parente6acb59ef4797ce27ddc9e21982c3f4e40824b52 (diff)
Refactor Track Class To Instantiate On Track Load (#587)
* Initial Commit * First compilation of Registry template * Further changes * wip changes * Impl TrackBrowser and Registry Info * Remove const from TInfo * Prep GetWorld * Name refactor * Refactor gWorldInstance to GetWorld() * wip * Should work now * Data menu work again * Fix editor staying open after program close * Rename LoadLevel to LoadTrackDataFromJson * More changes * Add statue * Add search to content browser using tags * Fix statue pos and register tags * Fix actor loading * Fix delete all bug which deleted cameras * reduce some boiler plate in actor and object * Remove unused rulesets * Search bar for all tabs * fix data screen * fix actor spawning * temp editor fix * Clean up * improve extra mode transformation * fix podium crash * Fix editor clicking * Fix editor clicking 2 * fix extra in custom track * Fix FI for three actors * Fix divide by zero error * Ids managed by Registry * Add scary comment --------- Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com> Co-authored-by: coco875 <pereira.jannin@gmail.com>
Diffstat (limited to 'src/engine/Smoke.cpp')
-rw-r--r--src/engine/Smoke.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/engine/Smoke.cpp b/src/engine/Smoke.cpp
index 2ae315a84..849c67351 100644
--- a/src/engine/Smoke.cpp
+++ b/src/engine/Smoke.cpp
@@ -24,8 +24,8 @@ void TrainSmokeTick() {
s32 temp_a0;
Object* object;
- for (auto& actor : gWorldInstance.Actors) {
- if (auto train = dynamic_cast<ATrain*>(actor)) {
+ for (auto& actor : GetWorld()->Actors) {
+ if (auto* train = dynamic_cast<ATrain*>(actor.get())) {
if (train->SmokeTimer != 0) {
train->SmokeTimer -= 1;
}
@@ -49,7 +49,7 @@ void TrainSmokeTick() {
train->SmokeTimer = 100;
}
}
- } else if (auto boat = dynamic_cast<ABoat*>(actor)) {
+ } else if (auto* boat = dynamic_cast<ABoat*>(actor.get())) {
if (boat->SmokeTimer != 0) {
boat->SmokeTimer -= 1;
}
@@ -79,8 +79,8 @@ void TrainSmokeTick() {
void TrainSmokeDraw(s32 cameraId) {
Camera* camera = &camera1[cameraId];
- for (auto& actor : gWorldInstance.Actors) {
- if (auto train = dynamic_cast<ATrain*>(actor)) {
+ for (auto& actor : GetWorld()->Actors) {
+ if (auto train = dynamic_cast<ATrain*>(actor.get())) {
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);
@@ -94,7 +94,7 @@ void TrainSmokeDraw(s32 cameraId) {
FrameInterpolation_RecordCloseChild();
}
}
- } else if (auto boat = dynamic_cast<ABoat*>(actor)) {
+ } else if (auto* boat = dynamic_cast<ABoat*>(actor.get())) {
gSPDisplayList(gDisplayListHead++, (Gfx*) D_0D007AE0);
load_texture_block_i8_nomirror((uint8_t*) D_0D029458, 32, 32);