From c5bf367c30771ccaf2f50198e112e314a689a9ee Mon Sep 17 00:00:00 2001 From: IvanDSM Date: Fri, 15 May 2020 16:47:04 -0300 Subject: [PATCH] Fix configfile skip_intro option --- src/game/level_update.c | 4 ++-- src/pc/configfile.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/game/level_update.c b/src/game/level_update.c index cdff8853..13246ad5 100644 --- a/src/game/level_update.c +++ b/src/game/level_update.c @@ -179,7 +179,7 @@ u8 unused3[4]; u8 unused4[2]; // For configfile intro skipping -//extern unsigned int configSkipIntro; +extern unsigned int configSkipIntro; void basic_update(s16 *arg); @@ -1217,7 +1217,7 @@ s32 init_level(void) { if (gMarioState->action != ACT_UNINITIALIZED) { if (save_file_exists(gCurrSaveFileNum - 1)) { set_mario_action(gMarioState, ACT_IDLE, 0); - } else if (gCLIOpts.SkipIntro == 0) { + } else if (gCLIOpts.SkipIntro == 0 && configSkipIntro == 0) { set_mario_action(gMarioState, ACT_INTRO_CUTSCENE, 0); val4 = 1; } diff --git a/src/pc/configfile.c b/src/pc/configfile.c index cee4dfdb..e4a88691 100644 --- a/src/pc/configfile.c +++ b/src/pc/configfile.c @@ -60,6 +60,7 @@ bool configCameraInvertY = false; bool configEnableCamera = false; bool configCameraMouse = false; #endif +unsigned int configSkipIntro = 0; static const struct ConfigOption options[] = { {.name = "fullscreen", .type = CONFIG_TYPE_BOOL, .boolValue = &configFullscreen}, @@ -87,7 +88,7 @@ static const struct ConfigOption options[] = { {.name = "bettercam_aggression", .type = CONFIG_TYPE_UINT, .uintValue = &configCameraAggr}, {.name = "bettercam_pan_level", .type = CONFIG_TYPE_UINT, .uintValue = &configCameraPan}, #endif - //{.name = "skip_intro", .type = CONFIG_TYPE_UINT, .uintValue = &configSkipIntro}, // Add this back! + {.name = "skip_intro", .type = CONFIG_TYPE_UINT, .uintValue = &configSkipIntro}, // Add this back! }; // Reads an entire line from a file (excluding the newline character) and returns an allocated string