From 91b8a9b1d8fd048cc1e628975381929bb4ecc75c Mon Sep 17 00:00:00 2001 From: Reonu Date: Sat, 3 Jul 2021 20:42:31 +0100 Subject: [PATCH] added option to exit course while moving --- README.md | 1 + include/config.h | 2 ++ src/game/ingame_menu.c | 8 ++++++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b0c19ada..b9b9b46a 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin - Mario head skip * - Peach letter cutscene skip * - Ability to easily change the warp that EXIT COURSE takes you to via config.h, or disable it entirely +- Exit course while moving * - Toggle to disable fall damage and the fall damage sound * - Ability to configure whether there's a 100 coin star at all and how many coins are required to spawn it * - Non-stop stars * diff --git a/include/config.h b/include/config.h index 491a22f3..998b073f 100644 --- a/include/config.h +++ b/include/config.h @@ -88,6 +88,8 @@ #define TREE_PARTICLE_FIX // Disable exit course //#define DISABLE_EXIT_COURSE +// Decides whether you can exit course while moving (has no effect if you disable exit course) +//#define EXIT_COURSE_WHILE_MOVING // 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) diff --git a/src/game/ingame_menu.c b/src/game/ingame_menu.c index de9f35d6..06587d1e 100644 --- a/src/game/ingame_menu.c +++ b/src/game/ingame_menu.c @@ -1751,8 +1751,12 @@ s16 render_pause_courses_and_castle(void) { } } #endif - - if (gMarioStates[0].action & ACT_FLAG_PAUSE_EXIT) { + #ifndef EXIT_COURSE_WHILE_MOVING + s32 exitCheck = gMarioStates[0].action & ACT_FLAG_PAUSE_EXIT; + #else + s32 exitCheck = 1; + #endif + if (exitCheck) { #ifndef DISABLE_EXIT_COURSE render_pause_course_options(99, 93, &gDialogLineNum, 15); #endif