added setup option to skip displaying the high scores after solving a level
authorHolger Schemel <info@artsoft.org>
Thu, 21 Jun 2018 06:50:12 +0000 (08:50 +0200)
committerHolger Schemel <info@artsoft.org>
Thu, 21 Jun 2018 06:50:12 +0000 (08:50 +0200)
src/files.c
src/game.c
src/libgame/system.h
src/screens.c

index c074f9586897786431b0678d7d4702d19eb34e38..151c8079966f31384daa580d6a82119bb04267b6 100644 (file)
@@ -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;
index 8340553f0af9059e4e58c9175b55cb9a067c61b4..2cf0e9aa46a468e4eacf98bf528d34964359d322 100644 (file)
@@ -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);
 
index 4dfe8d668ea0318efcb4772348dada308e456915..039f328e1a3fbdafca496c64585c377b4dc270e6 100644 (file)
@@ -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;
index 6d29aec8e1ace3e32b27251a1fd38d512ce7600b..d545ef304fbc1c979e6abaebb62902f806e0e163 100644 (file)
@@ -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,       ""                      },