diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2025-05-23 16:53:14 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-23 16:53:14 -0600 |
| commit | 2a0c0939c780babc45c8c22dfd6f94563485bae5 (patch) | |
| tree | 0a8f7d6a5a99452645260d53e778204327275deb /src/racing/actors.c | |
| parent | 9363e3d77631b1028a765c075a00293bd20c9ba7 (diff) | |
Refactor World::Courses to unique_ptr (#211)
* wip course unique ptr
* Track unique_ptr : This probably compiles
* Finish impl Courses as unique_ptr
* Fix error
* Fixes
* More fixes
* Cleanup
* Remove old vars
---------
Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
Diffstat (limited to 'src/racing/actors.c')
| -rw-r--r-- | src/racing/actors.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/racing/actors.c b/src/racing/actors.c index d6fd2ade1..137e3556e 100644 --- a/src/racing/actors.c +++ b/src/racing/actors.c @@ -944,15 +944,15 @@ void spawn_foliage(struct ActorSpawnData* actor) { position[2] = var_s3->pos[2]; position[1] = var_s3->pos[1]; - if (GetCourse() == GetMarioRaceway()) { + if (IsMarioRaceway()) { actorType = 2; - } else if (GetCourse() == GetBowsersCastle()) { + } else if (IsBowsersCastle()) { actorType = 0x0021; - } else if (GetCourse() == GetYoshiValley()) { + } else if (IsYoshiValley()) { actorType = 3; - } else if (GetCourse() == GetFrappeSnowland()) { + } else if (IsFrappeSnowland()) { actorType = 0x001D; - } else if (GetCourse() == GetRoyalRaceway()) { + } else if (IsRoyalRaceway()) { switch (var_s3->signedSomeId) { case 6: actorType = 0x001C; @@ -961,11 +961,11 @@ void spawn_foliage(struct ActorSpawnData* actor) { actorType = 4; break; } - } else if (GetCourse() == GetLuigiRaceway()) { + } else if (IsLuigiRaceway()) { actorType = 0x001A; - } else if (GetCourse() == GetMooMooFarm()) { + } else if (IsMooMooFarm()) { actorType = 0x0013; - } else if (GetCourse() == GetKalimariDesert()) { + } else if (IsKalimariDesert()) { switch (var_s3->signedSomeId) { case 5: actorType = 0x001E; @@ -1706,8 +1706,8 @@ bool collision_tree(Player* player, struct Actor* actor) { actorPos[0] = actor->pos[0]; actorPos[1] = actor->pos[1]; actorPos[2] = actor->pos[2]; - if (((GetCourse() == GetMarioRaceway()) || (GetCourse() == GetYoshiValley()) || - (GetCourse() == GetRoyalRaceway()) || (GetCourse() == GetLuigiRaceway())) && + if (((IsMarioRaceway()) || (IsYoshiValley()) || + (IsRoyalRaceway()) || (IsLuigiRaceway())) && (player->unk_094 > 1.0f)) { spawn_leaf(actorPos, 0); } @@ -2571,9 +2571,9 @@ void render_course_actors(struct UnkStruct_800DC5EC* arg0) { } FrameInterpolation_RecordCloseChild(); } - if (GetCourse() == GetMooMooFarm()) { + if (IsMooMooFarm()) { render_cows(camera, sBillBoardMtx); - } else if (GetCourse() == GetDkJungle()) { + } else if (IsDkJungle()) { render_palm_trees(camera, sBillBoardMtx); } } |
