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
+12 -12
View File
@@ -3013,7 +3013,7 @@ void draw_lap_count(s16 lapX, s16 lapY, s8 lap) {
}
void func_8004FDB4(f32 arg0, f32 arg1, s16 arg2, s16 arg3, s16 characterId, s32 arg5, s32 arg6, s32 arg7, s32 arg8) {
if ((GetCourse() == GetYoshiValley()) && (arg3 < 3) && (arg8 == 0)) {
if ((IsYoshiValley()) && (arg3 < 3) && (arg8 == 0)) {
func_80042330((s32) arg0, (s32) arg1, 0U, 1.0f);
gSPDisplayList(gDisplayListHead++, D_0D007DB8);
func_8004B35C(0x000000FF, 0x000000FF, 0x000000FF, D_8018D3E0);
@@ -3320,7 +3320,7 @@ void func_80050E34(s32 playerId, s32 arg1) {
spB8 = 0;
}
if ((GetCourse() == GetYoshiValley()) && (lapCount < 3)) {
if ((IsYoshiValley()) && (lapCount < 3)) {
gSPDisplayList(gDisplayListHead++, D_0D007DB8);
gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_portrait_bomb_kart_and_question_mark);
rsp_load_texture(common_texture_portrait_question_mark, 0x00000020, 0x00000020);
@@ -3553,16 +3553,16 @@ void func_80051C60(s16 arg0, s32 arg1) {
Object* object;
if (D_801658FE == 0) {
if (GetCourse() == GetKoopaTroopaBeach()) {
if (IsKoopaTroopaBeach()) {
var_s5 = arg0;
} else if (GetCourse() == GetMooMooFarm()) {
} else if (IsMooMooFarm()) {
var_s5 = arg0 - 16;
} else if (GetCourse() == GetYoshiValley()) {
} else if (IsYoshiValley()) {
var_s5 = arg0 - 16;
} else {
var_s5 = arg0 + 16;
}
} else if (GetCourse() == GetKoopaTroopaBeach()) {
} else if (IsKoopaTroopaBeach()) {
var_s5 = arg0 * 2;
} else {
var_s5 = arg0 + 32;
@@ -3596,11 +3596,11 @@ void func_80051EF8(void) {
s16 temp_a0;
temp_a0 = 0xF0 - D_800DC5EC->cameraHeight;
if (GetCourse() == GetKoopaTroopaBeach()) {
if (IsKoopaTroopaBeach()) {
temp_a0 = temp_a0 - 0x30;
} else if (GetCourse() == GetMooMooFarm()) {
} else if (IsMooMooFarm()) {
temp_a0 = temp_a0 - 0x40;
} else if (GetCourse() == GetYoshiValley()) {
} else if (IsYoshiValley()) {
temp_a0 = temp_a0 - 0x40;
} else {
temp_a0 = temp_a0 - 0x30;
@@ -3612,11 +3612,11 @@ void func_80051F9C(void) {
s16 temp_a0;
temp_a0 = 0xF0 - D_800DC5F0->cameraHeight;
if (GetCourse() == GetKoopaTroopaBeach()) {
if (IsKoopaTroopaBeach()) {
temp_a0 = temp_a0 - 0x30;
} else if (GetCourse() == GetMooMooFarm()) {
} else if (IsMooMooFarm()) {
temp_a0 = temp_a0 - 0x40;
} else if (GetCourse() == GetYoshiValley()) {
} else if (IsYoshiValley()) {
temp_a0 = temp_a0 - 0x40;
} else {
temp_a0 = temp_a0 - 0x30;