added setup option to force showing local scores only
authorHolger Schemel <info@artsoft.org>
Fri, 14 May 2021 16:14:32 +0000 (18:14 +0200)
committerHolger Schemel <info@artsoft.org>
Fri, 14 May 2021 16:14:32 +0000 (18:14 +0200)
src/files.c
src/libgame/system.h
src/screens.c

index 51e674cd96fcc7b22a2bf7980812d5687e839508..f3bf9f757856260f3a77f672ced1f06a1dd3b9c0 100644 (file)
@@ -9318,7 +9318,7 @@ void LoadLocalAndServerScore(int nr, boolean download_score)
   // restore last added local score entry (before merging server scores)
   scores.last_added = scores.last_added_local = last_added_local;
 
-  if (setup.api_server)
+  if (setup.api_server && !setup.only_show_local_scores)
   {
     // load server scores from cache file and trigger update from server
     LoadServerScore(nr, download_score);
@@ -9514,6 +9514,10 @@ static struct TokenInfo global_setup_tokens[] =
     TYPE_SWITCH,
     &setup.show_snapshot_buttons,              "show_snapshot_buttons"
   },
+  {
+    TYPE_SWITCH,
+    &setup.only_show_local_scores,             "only_show_local_scores"
+  },
   {
     TYPE_STRING,
     &setup.graphics_set,                       "graphics_set"
@@ -10186,6 +10190,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si)
   si->sp_show_border_elements = FALSE;
   si->small_game_graphics = FALSE;
   si->show_snapshot_buttons = FALSE;
+  si->only_show_local_scores = FALSE;
 
   si->graphics_set = getStringCopy(GFX_CLASSIC_SUBDIR);
   si->sounds_set   = getStringCopy(SND_CLASSIC_SUBDIR);
index 94ebe7a561a628136ae85ec34da76a028763ef55..77c6c367601a1d6b8e304e374be19cd8ef7fba04 100644 (file)
@@ -1482,6 +1482,7 @@ struct SetupInfo
   boolean sp_show_border_elements;
   boolean small_game_graphics;
   boolean show_snapshot_buttons;
+  boolean only_show_local_scores;
 
   char *graphics_set;
   char *sounds_set;
index 4bd24b5070593206088ce0408fa54de36f9c6a00..83b91dc477a2e142239b70aae7a7e4ccbf8b5422 100644 (file)
@@ -6759,6 +6759,7 @@ static struct TokenInfo setup_info_game[] =
   { TYPE_TEXT_INPUT,   execGadgetNetworkServer, "Network Server Hostname:" },
   { TYPE_STRING,       &network_server_text,   ""                      },
   { TYPE_SWITCH,       &setup.api_server,      "Use Highscore Server:" },
+  { TYPE_SWITCH,       &setup.only_show_local_scores, "Only Show Local Scores:" },
   { TYPE_SWITCH,       &setup.multiple_users,  "Multiple Users/Teams:" },
   { TYPE_YES_NO,       &setup.input_on_focus,  "Only Move Focussed Player:" },
   { TYPE_SWITCH,       &setup.time_limit,      "Time Limit:"           },