added fast uncovering of native BD games when started from editor
authorHolger Schemel <info@artsoft.org>
Tue, 7 May 2024 23:05:17 +0000 (01:05 +0200)
committerHolger Schemel <info@artsoft.org>
Tue, 7 May 2024 23:05:20 +0000 (01:05 +0200)
src/editor.c
src/editor.h
src/game_bd/import_bd.h
src/game_bd/main_bd.c

index c6f6d7bd3841616b6494a9f9ebf36338551925de..0ab5722197222ae67171c807185645aeb65f146c 100644 (file)
@@ -7389,6 +7389,11 @@ static struct XY xy_directions[] =
 // functions
 // ----------------------------------------------------------------------------
 
+boolean isLevelEditorTestGame(void)
+{
+  return level_editor_test_game;
+}
+
 static int getMaxInfoTextLength(void)
 {
   return (SXSIZE / getFontWidth(INFOTEXT_FONT));
index 1b674331bea7df73f0284826a5773e2f1875e9b8..96fe6f29140077275d67e987c617f390216b2111 100644 (file)
@@ -14,6 +14,8 @@
 
 #include "main.h"
 
+boolean isLevelEditorTestGame(void);
+
 void CreateLevelEditorGadgets(void);
 void FreeLevelEditorGadgets(void);
 void UnmapLevelEditorGadgets(void);
index 199492ce01b643a888fbb4b4c472b95bb3987e75..ace426dbfdcbfcb5833fe2470297bbf8687b81ca 100644 (file)
@@ -38,4 +38,6 @@ byte *TapePlayAction_BD(void);
 byte *TapeCorrectAction_BD(byte *);
 boolean TapeIsPlaying_ReplayBD(void);
 
+boolean isLevelEditorTestGame(void);
+
 #endif // IMPORT_BD_H
index f69f440e25ba8bdec0269a6d7b12fecc2c669df1..06ecfd0458fa7cea799a9fe044236b56122a75b9 100644 (file)
@@ -356,8 +356,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())
+    game_bd.game->state_counter = GAME_INT_UNCOVER_ALL - 8;
 
-  if (setup.bd_skip_uncovering)
+  if (setup.bd_skip_uncovering || isLevelEditorTestGame())
     gd_scroll(game_bd.game, TRUE, TRUE);
 
   ClearRectangle(gd_screen_bitmap, 0, 0, SXSIZE, SYSIZE);