added setup option to skip displaying the high scores after solving a level
[rocksndiamonds.git] / src / screens.c
index 0198a8eea8bdb8e5a472e84b0cd96c67a4d10e9c..d545ef304fbc1c979e6abaebb62902f806e0e163 100644 (file)
@@ -4619,25 +4619,23 @@ void HandleHallOfFame(int mx, int my, int dx, int dy, int button)
       drawHallOfFameList(first_entry, highlight_position);
     }
   }
-  else if (button == MB_MENU_LEAVE)
-  {
-    PlaySound(SND_MENU_ITEM_SELECTING);
-
-    FadeSound(SND_BACKGROUND_SCORES);
-
-    SetGameStatus(GAME_MODE_MAIN);
-
-    DrawMainMenu();
-  }
-  else if (button == MB_MENU_CHOICE)
+  else if (button == MB_MENU_LEAVE || button == MB_MENU_CHOICE)
   {
     PlaySound(SND_MENU_ITEM_SELECTING);
 
     FadeSound(SND_BACKGROUND_SCORES);
 
-    SetGameStatus(GAME_MODE_MAIN);
+    if (game_status_last_screen != GAME_MODE_PLAYING ||
+       !setup.auto_play_next_level || !setup.increment_levels)
+    {
+      SetGameStatus(GAME_MODE_MAIN);
 
-    DrawMainMenu();
+      DrawMainMenu();
+    }
+    else
+    {
+      StartGameActions(network.enabled, setup.autorecord, level.random_seed);
+    }
   }
 
   if (game_status == GAME_MODE_SCORES)
@@ -5888,6 +5886,8 @@ static struct TokenInfo setup_info_game[] =
   { TYPE_SWITCH,       &setup.handicap,        "Handicap:"             },
   { 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,       ""                      },