Fix configfile skip_intro option

This commit is contained in:
IvanDSM 2020-05-15 16:47:04 -03:00
parent 68e3865a16
commit e96bbef650
2 changed files with 4 additions and 3 deletions

View File

@ -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;
}

View File

@ -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