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>
This commit is contained in:
MegaMech
2025-05-23 16:53:14 -06:00
committed by GitHub
parent 9363e3d776
commit 2a0c0939c7
34 changed files with 403 additions and 473 deletions
+4 -4
View File
@@ -118,7 +118,7 @@ void OBombKart::Tick() {
return;
}
if (((Unk_4A != 1) || (GetCourse() == GetPodiumCeremony()))) {
if (((Unk_4A != 1) || (IsPodiumCeremony()))) {
newPos[0] = Pos[0];
newPos[1] = Pos[1];
newPos[2] = Pos[2];
@@ -128,7 +128,7 @@ void OBombKart::Tick() {
bounceTimer = BounceTimer;
circleTimer = CircleTimer;
if ((state != States::DISABLED) && (state != States::EXPLODE)) {
if (GetCourse() == GetPodiumCeremony()) {
if (IsPodiumCeremony()) {
if (D_8016347E == 1) {
player = gPlayerFour;
temp_f0 = newPos[0] - player->pos[0];
@@ -152,7 +152,7 @@ void OBombKart::Tick() {
if ((((temp_f0 * temp_f0) + (temp_f2 * temp_f2)) + (temp_f12 * temp_f12)) < 25.0f) {
state = States::EXPLODE;
circleTimer = 0;
if (GetCourse() == GetFrappeSnowland()) {
if (IsFrappeSnowland()) {
player->soundEffects |= 0x01000000;
} else {
player->soundEffects |= 0x400000;
@@ -346,7 +346,7 @@ void OBombKart::Draw(s32 cameraId) {
return;
}
if (GetCourse() == GetPodiumCeremony()) {
if (IsPodiumCeremony()) {
if ((_idx == 0) && (WaypointIndex < 16)) {
return;
} else {