Fix pause menus

This commit is contained in:
U-DESKTOP-F0TJMO2\Utilisateur 2023-11-20 19:11:42 +01:00 committed by Agent X
parent 2c0b112cba
commit c75ec7c946
2 changed files with 12 additions and 3 deletions

View File

@ -28,7 +28,7 @@ enum CourseNum
#undef DEFINE_BONUS_COURSE
#define COURSE_IS_MAIN_COURSE(cmd) (cmd >= COURSE_MIN && cmd <= COURSE_STAGES_MAX)
#define COURSE_IS_VALID_COURSE(cmd) (cmd >= COURSE_MIN && cmd < COURSE_MAX)
#define COURSE_IS_VALID_COURSE(cmd) (cmd >= COURSE_MIN && cmd <= COURSE_MAX)
#endif // COURSE_TABLE_H

View File

@ -2804,7 +2804,11 @@ void render_pause_castle_main_strings(s16 x, s16 y) {
#endif
u8 courseNum = gDialogLineNum + 1;
const u8 *courseName = get_level_name_sm64(courseNum, get_level_num_from_course_num(courseNum), 1, 1);
const u8 *courseName = (
gDialogLineNum == COURSE_STAGES_COUNT ?
((const u8 **) get_course_name_table())[COURSE_MAX] : // Castle secret stars
get_level_name_sm64(courseNum, get_level_num_from_course_num(courseNum), 1, 1)
);
u8 strVal[8];
s16 starNum = gDialogLineNum;
@ -2999,7 +3003,12 @@ void render_pause_castle_main_strings_extended(s16 x, s16 y) {
gSPDisplayList(gDisplayListHead++, dl_ia_text_begin);
gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha);
const u8 *courseName = get_level_name_sm64(gDialogLineNum, get_level_num_from_course_num(gDialogLineNum), 1, 1);
u8 courseNum = gDialogLineNum + 1;
const u8 *courseName = (
gDialogLineNum >= INDEX_CASTLE_STARS ?
((const u8 **) get_course_name_table())[COURSE_MAX] : // Castle secret stars
get_level_name_sm64(courseNum, get_level_num_from_course_num(courseNum), 1, 1)
);
// Main courses (0-14)
if (gDialogLineNum < COURSE_STAGES_COUNT) {