From: Holger Schemel Date: Tue, 7 May 2024 23:05:17 +0000 (+0200) Subject: added fast uncovering of native BD games when started from editor X-Git-Tag: 4.4.0.0-test-1~5 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=eb50550a874e978f61179b0f6f2d681a006b23f9;p=rocksndiamonds.git added fast uncovering of native BD games when started from editor --- 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);