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/render_objects.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/render_objects.c')
| -rw-r--r-- | src/render_objects.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/render_objects.c b/src/render_objects.c index 3b6aa44c6..7aa06dcaf 100644 --- a/src/render_objects.c +++ b/src/render_objects.c @@ -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; |
