added setup option for fast game start from level editor
authorHolger Schemel <holger.schemel@virtion.de>
Sat, 25 May 2024 10:02:34 +0000 (12:02 +0200)
committerHolger Schemel <holger.schemel@virtion.de>
Sat, 25 May 2024 10:02:48 +0000 (12:02 +0200)
src/editor.c
src/editor.h
src/files.c
src/game_bd/import_bd.h
src/game_bd/main_bd.c
src/libgame/system.h
src/screens.c

index 0ab5722197222ae67171c807185645aeb65f146c..c105afcd10ba8776e4726b28d3269a6760b0cdae 100644 (file)
@@ -7389,9 +7389,9 @@ static struct XY xy_directions[] =
 // functions
 // ----------------------------------------------------------------------------
 
-boolean isLevelEditorTestGame(void)
+boolean isLevelEditorFastStart(void)
 {
-  return level_editor_test_game;
+  return (level_editor_test_game && setup.editor.fast_game_start);
 }
 
 static int getMaxInfoTextLength(void)
index 96fe6f29140077275d67e987c617f390216b2111..8dd3e390a46648c4408f6be943e7354b5e9db05d 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "main.h"
 
-boolean isLevelEditorTestGame(void);
+boolean isLevelEditorFastStart(void);
 
 void CreateLevelEditorGadgets(void);
 void FreeLevelEditorGadgets(void);
index 9779f83fb687ab119b1943c09c220d4c28fb0b27..7d4dc9d012b3e2648e2cb0d1c4f6f4094a82ba88 100644 (file)
@@ -11064,6 +11064,10 @@ static struct TokenInfo editor_setup_tokens[] =
     TYPE_SWITCH,
     &setup.editor.show_element_token,          "editor.show_element_token"
   },
+  {
+    TYPE_SWITCH,
+    &setup.editor.fast_game_start,             "editor.fast_game_start"
+  },
   {
     TYPE_SWITCH,
     &setup.editor.show_read_only_warning,      "editor.show_read_only_warning"
@@ -11826,6 +11830,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si)
   si->editor.el_headlines              = TRUE;
 
   si->editor.show_element_token                = FALSE;
+  si->editor.fast_game_start           = FALSE;
 
   si->editor.show_read_only_warning    = TRUE;
 
index ace426dbfdcbfcb5833fe2470297bbf8687b81ca..53af163998b55322770c390380ba043b8cddf96f 100644 (file)
@@ -38,6 +38,6 @@ byte *TapePlayAction_BD(void);
 byte *TapeCorrectAction_BD(byte *);
 boolean TapeIsPlaying_ReplayBD(void);
 
-boolean isLevelEditorTestGame(void);
+boolean isLevelEditorFastStart(void);
 
 #endif // IMPORT_BD_H
index 574edc3f3eeaef91434e3058239fd613c8caab82..333bddeae28911ade242890ab4a1265dc43a3f26 100644 (file)
@@ -360,10 +360,10 @@ void InitGameEngine_BD(void)
   // when skipping uncovering, continue with uncovered playfield
   if (setup.bd_skip_uncovering)
     game_bd.game->state_counter = GAME_INT_UNCOVER_ALL + 1;
-  else if (isLevelEditorTestGame())
+  else if (isLevelEditorFastStart())
     game_bd.game->state_counter = GAME_INT_UNCOVER_ALL - 8;
 
-  if (setup.bd_skip_uncovering || isLevelEditorTestGame())
+  if (setup.bd_skip_uncovering || isLevelEditorFastStart())
     gd_scroll(game_bd.game, TRUE, TRUE);
 
   ClearRectangle(gd_screen_bitmap, 0, 0, SXSIZE, SYSIZE);
index 7669474f83ff2804993121ab44ced251cea52234..85c26a5f34fd84c1b50939b92bf603fff89972cb 100644 (file)
@@ -1322,6 +1322,7 @@ struct SetupEditorInfo
   boolean el_by_type;
 
   boolean show_element_token;
+  boolean fast_game_start;
 
   boolean show_read_only_warning;
 
index d518304b707e0722aa191d6fd4c7c07eb0354c10..0a891b6bb732f5520e2f2f96cb50d34550c7cb5c 100644 (file)
@@ -8047,6 +8047,7 @@ static struct TokenInfo setup_info_editor[] =
   { TYPE_EMPTY,                NULL,                           ""                              },
 #endif
   { TYPE_SWITCH, &setup.editor.show_element_token,     "Show element token:"           },
+  { TYPE_SWITCH,       &setup.editor.fast_game_start,  "Fast game start:"              },
   { TYPE_EMPTY,                NULL,                           ""                              },
   { TYPE_SWITCH, &setup.editor.show_read_only_warning, "Show read-only warning:"       },
   { TYPE_EMPTY,                NULL,                           ""                              },