summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMegaMech <7255464+MegaMech@users.noreply.github.com>2025-05-23 16:43:47 -0600
committerMegaMech <7255464+MegaMech@users.noreply.github.com>2025-05-23 16:43:47 -0600
commit98d55ab603e503c03456013b1bda0072d3e8725e (patch)
tree39457905ab8434c6612a551b74f4a63861518382
parenta8c2a804380dcf94ee98b2985fc8837bba148914 (diff)
More fixes
-rw-r--r--src/audio/external.c4
-rw-r--r--src/menu_items.c17
2 files changed, 14 insertions, 7 deletions
diff --git a/src/audio/external.c b/src/audio/external.c
index 6647b9b4e..3ed17f5db 100644
--- a/src/audio/external.c
+++ b/src/audio/external.c
@@ -3467,7 +3467,9 @@ void func_800CAEC4(u8 playerId, f32 arg1) {
arg1 = 0.0f;
}
D_800EA120[playerId] = arg1;
- play_sound(gCurrentCourseId + 0x19007020, &D_800E9F7C[playerId].pos, playerId, &D_800EA1D4,
+ //! @warning this used to be gCurrentCourseId + 0x19007020
+ // This may not be equivallent.
+ play_sound(GetCourseIndex() + 0x19007020, &D_800E9F7C[playerId].pos, playerId, &D_800EA1D4,
&D_800EA120[playerId], (u8*) &D_800E9F7C[playerId].unk_14);
break;
default:
diff --git a/src/menu_items.c b/src/menu_items.c
index edb11f310..d65e4b2a4 100644
--- a/src/menu_items.c
+++ b/src/menu_items.c
@@ -2528,12 +2528,15 @@ void func_80095574(void) {
} else {
debug_print_str2(0x000000AA, 0x00000064, "off");
}
- if ((gCurrentCourseId >= (NUM_COURSES - 1)) || (gCurrentCourseId < 0)) {
- gCurrentCourseId = 0;
- }
+
+ // This reset is not necessary. It wraps around automatically.
+ // if ((GetCourseIndex() >= (NUM_COURSES - 1)) || (GetCourseIndex() < 0)) {
+ // gCurrentCourseId = 0;
+ // }
print_str_num(0x00000050, 0x0000006E, "map_number", GetCourseIndex());
- // This isn't functionally equivallent, but who cares.
- if (gCurrentCourseId < COURSE_TOADS_TURNPIKE) {
+
+ // Bump the text over by 1 character width when the track id becomes two digits (10, 11, 12 etc.)
+ if (GetCourseIndex() < 10) {
var_v0 = 0;
} else {
var_v0 = 8;
@@ -8230,7 +8233,9 @@ void func_800A6034(MenuItem* arg0) {
set_text_color(TEXT_BLUE_GREEN_RED_CYCLE_2);
print_text1_center_mode_2(arg0->column + 0x41, arg0->row + 0xA0, text, 0, 0.85f, 1.0f);
text = CM_GetProps()->Name;
- set_text_color((s32) gCurrentCourseId % 4);
+ //! @warning this used to be gCurrentCourseId % 4
+ // Hopefully this is equivallent.
+ set_text_color((s32) GetCourseIndex() % 4);
print_text1_center_mode_2(arg0->column + 0x41, arg0->row + 0xC3, text, 0, 0.65f, 0.85f);
}
}