From eb50550a874e978f61179b0f6f2d681a006b23f9 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 8 May 2024 01:05:17 +0200 Subject: [PATCH] added fast uncovering of native BD games when started from editor --- src/editor.c | 5 +++++ src/editor.h | 2 ++ src/game_bd/import_bd.h | 2 ++ src/game_bd/main_bd.c | 4 +++- 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/editor.c b/src/editor.c index c6f6d7bd..0ab57221 100644 --- a/src/editor.c +++ b/src/editor.c @@ -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)); diff --git a/src/editor.h b/src/editor.h index 1b674331..96fe6f29 100644 --- a/src/editor.h +++ b/src/editor.h @@ -14,6 +14,8 @@ #include "main.h" +boolean isLevelEditorTestGame(void); + void CreateLevelEditorGadgets(void); void FreeLevelEditorGadgets(void); void UnmapLevelEditorGadgets(void); diff --git a/src/game_bd/import_bd.h b/src/game_bd/import_bd.h index 199492ce..ace426db 100644 --- a/src/game_bd/import_bd.h +++ b/src/game_bd/import_bd.h @@ -38,4 +38,6 @@ byte *TapePlayAction_BD(void); byte *TapeCorrectAction_BD(byte *); boolean TapeIsPlaying_ReplayBD(void); +boolean isLevelEditorTestGame(void); + #endif // IMPORT_BD_H diff --git a/src/game_bd/main_bd.c b/src/game_bd/main_bd.c index f69f440e..06ecfd04 100644 --- a/src/game_bd/main_bd.c +++ b/src/game_bd/main_bd.c @@ -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); -- 2.34.1