From 99b73fa4f699d18f51d7227c2d8d09a6152d416b Mon Sep 17 00:00:00 2001 From: Reonu Date: Wed, 30 Jun 2021 23:10:03 +0100 Subject: [PATCH] Added defines for exit course --- include/config.h | 8 ++++++++ src/game/ingame_menu.c | 2 ++ src/game/level_update.c | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/include/config.h b/include/config.h index 9cb3722e..14228403 100644 --- a/include/config.h +++ b/include/config.h @@ -84,6 +84,14 @@ #define PLATFORM_DISPLACEMENT_2 // Whether a tree uses snow particles or not is decided via the model IDs instead of the course number #define TREE_PARTICLE_FIX +// Disable exit course +//#define DISABLE_EXIT_COURSE +// Decides which level "exit course" takes you to (has no effect if you disable exit course) +#define EXIT_COURSE_LEVEL LEVEL_CASTLE +// Decides the area node "exit course" takes you to (has no effect if you disable exit course) +#define EXIT_COURSE_AREA 0x01 +// Decides the warp node "exit course" takes you to (has no effect if you disable exit course) +#define EXIT_COURSE_NODE 0x1F // Stars don't kick you out of the level // #define NON_STOP_STARS // Uncomment this if you want global star IDs (useful for creating an open world hack ala MVC) diff --git a/src/game/ingame_menu.c b/src/game/ingame_menu.c index a8fb8076..de9f35d6 100644 --- a/src/game/ingame_menu.c +++ b/src/game/ingame_menu.c @@ -1753,7 +1753,9 @@ s16 render_pause_courses_and_castle(void) { #endif if (gMarioStates[0].action & ACT_FLAG_PAUSE_EXIT) { + #ifndef DISABLE_EXIT_COURSE render_pause_course_options(99, 93, &gDialogLineNum, 15); + #endif } if (gPlayer3Controller->buttonPressed & A_BUTTON diff --git a/src/game/level_update.c b/src/game/level_update.c index c5f70407..e18849cc 100644 --- a/src/game/level_update.c +++ b/src/game/level_update.c @@ -1041,7 +1041,7 @@ s32 play_mode_paused(void) { if (gDebugLevelSelect) { fade_into_special_warp(-9, 1); } else { - initiate_warp(LEVEL_CASTLE, 1, 0x1F, 0); + initiate_warp(EXIT_COURSE_LEVEL, EXIT_COURSE_AREA, EXIT_COURSE_NODE, 0); fade_into_special_warp(0, 0); gSavedCourseNum = COURSE_NONE; }