diff --git a/src/game.cc b/src/game.cc index 3c9c366..add04ff 100644 --- a/src/game.cc +++ b/src/game.cc @@ -155,7 +155,11 @@ int gameInitWithOptions(const char* windowTitle, bool isMapper, int font, int a4 } } - if (!gIsMapper) { + // SFALL: Allow to skip splash screen + int skipOpeningMovies = 0; + configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_SKIP_OPENING_MOVIES_KEY, &skipOpeningMovies); + + if (!gIsMapper && skipOpeningMovies < 2) { showSplash(); } diff --git a/src/main.cc b/src/main.cc index da1e42a..323207d 100644 --- a/src/main.cc +++ b/src/main.cc @@ -132,9 +132,14 @@ int falloutMain(int argc, char** argv) return 1; } - gameMoviePlay(MOVIE_IPLOGO, GAME_MOVIE_FADE_IN); - gameMoviePlay(MOVIE_INTRO, 0); - gameMoviePlay(MOVIE_CREDITS, 0); + // SFALL: Allow to skip intro movies + int skipOpeningMovies; + configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_SKIP_OPENING_MOVIES_KEY, &skipOpeningMovies); + if(skipOpeningMovies < 1) { + gameMoviePlay(MOVIE_IPLOGO, GAME_MOVIE_FADE_IN); + gameMoviePlay(MOVIE_INTRO, 0); + gameMoviePlay(MOVIE_CREDITS, 0); + } FpsLimiter fpsLimiter; diff --git a/src/sfall_config.cc b/src/sfall_config.cc index 5122495..e99b086 100644 --- a/src/sfall_config.cc +++ b/src/sfall_config.cc @@ -21,6 +21,7 @@ bool sfallConfigInit(int argc, char** argv) } // Initialize defaults. + configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_SKIP_OPENING_MOVIES_KEY, 0); configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_STARTING_MAP_KEY, ""); char path[COMPAT_MAX_PATH]; diff --git a/src/sfall_config.h b/src/sfall_config.h index 69be7a0..65e34c5 100644 --- a/src/sfall_config.h +++ b/src/sfall_config.h @@ -7,6 +7,7 @@ #define SFALL_CONFIG_MISC_KEY "Misc" +#define SFALL_CONFIG_SKIP_OPENING_MOVIES_KEY "SkipOpeningMovies" #define SFALL_CONFIG_STARTING_MAP_KEY "StartingMap" extern bool gSfallConfigInitialized;