From f1c1b815e52796f756df17ed11a6cae7049aa2da Mon Sep 17 00:00:00 2001 From: Reonu Date: Sat, 3 Jul 2021 21:33:17 +0100 Subject: [PATCH] added castle music fix --- README.md | 1 + include/config.h | 2 ++ src/game/level_update.c | 5 ++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b9b9b46a..cd32b0c4 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin - Hanging fix (mario can grab hangable ceilings from any state, instead of only jump or double jump) * - Mario head skip * - Peach letter cutscene skip * +- Castle music fix (Fixes the castle music sometimes triggering after getting a dialog) * - 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 * diff --git a/include/config.h b/include/config.h index 998b073f..3356ac6f 100644 --- a/include/config.h +++ b/include/config.h @@ -56,6 +56,8 @@ #define AUTO_LOD // Skip peach letter cutscene #define PEACH_SKIP +// Fixes the castle music sometimes triggering after getting a dialog +#define CASTLE_MUSIC_FIX // Remove course specific camera processing #define CAMERA_FIX // Increase the maximum pole length (it will treat bparam1 and bparam2 as a single value) diff --git a/src/game/level_update.c b/src/game/level_update.c index e18849cc..97722822 100644 --- a/src/game/level_update.c +++ b/src/game/level_update.c @@ -1290,8 +1290,11 @@ s32 lvl_init_from_save_file(UNUSED s16 arg0, s32 levelNum) { #endif sWarpDest.type = WARP_TYPE_NOT_WARPING; sDelayedWarpOp = WARP_OP_NONE; +#ifdef CASTLE_MUSIC_FIX + gNeverEnteredCastle = 0; +#else gNeverEnteredCastle = !save_file_exists(gCurrSaveFileNum - 1); - +#endif gCurrLevelNum = levelNum; gCurrCourseNum = COURSE_NONE; gSavedCourseNum = COURSE_NONE;