From: Holger Schemel Date: Thu, 21 Jun 2018 06:50:12 +0000 (+0200) Subject: added setup option to skip displaying the high scores after solving a level X-Git-Tag: 4.1.1.0~104 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=951e6d0a5b07999e3c919b1c689c71c108e45411;p=rocksndiamonds.git added setup option to skip displaying the high scores after solving a level --- diff --git a/src/files.c b/src/files.c index c074f958..151c8079 100644 --- a/src/files.c +++ b/src/files.c @@ -8282,6 +8282,7 @@ enum SETUP_TOKEN_SKIP_LEVELS, SETUP_TOKEN_INCREMENT_LEVELS, SETUP_TOKEN_AUTO_PLAY_NEXT_LEVEL, + SETUP_TOKEN_SKIP_SCORES_AFTER_GAME, SETUP_TOKEN_TIME_LIMIT, SETUP_TOKEN_FULLSCREEN, SETUP_TOKEN_WINDOW_SCALING_PERCENT, @@ -8522,6 +8523,7 @@ static struct TokenInfo global_setup_tokens[] = { TYPE_SWITCH, &si.skip_levels, "skip_levels" }, { TYPE_SWITCH, &si.increment_levels, "increment_levels" }, { TYPE_SWITCH, &si.auto_play_next_level, "auto_play_next_level" }, + { TYPE_SWITCH, &si.skip_scores_after_game, "skip_scores_after_game" }, { TYPE_SWITCH, &si.time_limit, "time_limit" }, { TYPE_SWITCH, &si.fullscreen, "fullscreen" }, { TYPE_INTEGER,&si.window_scaling_percent, "window_scaling_percent" }, @@ -8741,6 +8743,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si) si->skip_levels = TRUE; si->increment_levels = TRUE; si->auto_play_next_level = TRUE; + si->skip_scores_after_game = FALSE; si->time_limit = TRUE; si->fullscreen = FALSE; si->window_scaling_percent = STD_WINDOW_SCALING_PERCENT; diff --git a/src/game.c b/src/game.c index 8340553f..2cf0e9aa 100644 --- a/src/game.c +++ b/src/game.c @@ -4707,7 +4707,7 @@ void GameEnd() hi_pos = NewHiScore(last_level_nr); - if (hi_pos >= 0) + if (hi_pos >= 0 && !setup.skip_scores_after_game) { SetGameStatus(GAME_MODE_SCORES); diff --git a/src/libgame/system.h b/src/libgame/system.h index 4dfe8d66..039f328e 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -1258,6 +1258,7 @@ struct SetupInfo boolean skip_levels; boolean increment_levels; boolean auto_play_next_level; + boolean skip_scores_after_game; boolean time_limit; boolean fullscreen; int window_scaling_percent; diff --git a/src/screens.c b/src/screens.c index 6d29aec8..d545ef30 100644 --- a/src/screens.c +++ b/src/screens.c @@ -5887,6 +5887,7 @@ static struct TokenInfo setup_info_game[] = { TYPE_SWITCH, &setup.skip_levels, "Skip Unsolved Levels:" }, { TYPE_SWITCH, &setup.increment_levels,"Increment Solved Levels:" }, { TYPE_SWITCH, &setup.auto_play_next_level,"Auto-play Next Level:" }, + { TYPE_SWITCH, &setup.skip_scores_after_game,"Skip Scores After Game:" }, { TYPE_SWITCH, &setup.autorecord, "Auto-Record Tapes:" }, { TYPE_ENTER_LIST, execSetupChooseGameSpeed, "Game Speed:" }, { TYPE_STRING, &game_speed_text, "" },