Fix pause menus

This commit is contained in:
U-DESKTOP-F0TJMO2\Utilisateur 2023-11-20 19:11:42 +01:00
parent 9959bcf884
commit 791d44b1ee
2 changed files with 12 additions and 3 deletions

View File

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

View File

@ -2815,7 +2815,11 @@ void render_pause_castle_main_strings(s16 x, s16 y) {
#endif #endif
u8 courseNum = gDialogLineNum + 1; 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]; u8 strVal[8];
s16 starNum = gDialogLineNum; s16 starNum = gDialogLineNum;
@ -3010,7 +3014,12 @@ void render_pause_castle_main_strings_extended(s16 x, s16 y) {
gSPDisplayList(gDisplayListHead++, dl_ia_text_begin); gSPDisplayList(gDisplayListHead++, dl_ia_text_begin);
gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, gDialogTextAlpha); 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) // Main courses (0-14)
if (gDialogLineNum < COURSE_STAGES_COUNT) { if (gDialogLineNum < COURSE_STAGES_COUNT) {