Add SFall Misc->SkipOpeningMovies (#30)

This commit is contained in:
Wipe 2022-06-04 12:22:40 +02:00 committed by GitHub
parent dd20063a2e
commit 2991877b13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 4 deletions

View File

@ -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(); showSplash();
} }

View File

@ -132,9 +132,14 @@ int falloutMain(int argc, char** argv)
return 1; return 1;
} }
// 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_IPLOGO, GAME_MOVIE_FADE_IN);
gameMoviePlay(MOVIE_INTRO, 0); gameMoviePlay(MOVIE_INTRO, 0);
gameMoviePlay(MOVIE_CREDITS, 0); gameMoviePlay(MOVIE_CREDITS, 0);
}
FpsLimiter fpsLimiter; FpsLimiter fpsLimiter;

View File

@ -21,6 +21,7 @@ bool sfallConfigInit(int argc, char** argv)
} }
// Initialize defaults. // 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, ""); configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_STARTING_MAP_KEY, "");
char path[COMPAT_MAX_PATH]; char path[COMPAT_MAX_PATH];

View File

@ -7,6 +7,7 @@
#define SFALL_CONFIG_MISC_KEY "Misc" #define SFALL_CONFIG_MISC_KEY "Misc"
#define SFALL_CONFIG_SKIP_OPENING_MOVIES_KEY "SkipOpeningMovies"
#define SFALL_CONFIG_STARTING_MAP_KEY "StartingMap" #define SFALL_CONFIG_STARTING_MAP_KEY "StartingMap"
extern bool gSfallConfigInitialized; extern bool gSfallConfigInitialized;