From 5770f4e65e9b7b705f330c462057642b485933c1 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sat, 5 Oct 2024 20:42:08 +0200 Subject: [PATCH] added support for BD engine levels without time limit --- src/game_bd/import_bd.h | 1 + src/game_bd/main_bd.c | 3 +++ src/tools.c | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/src/game_bd/import_bd.h b/src/game_bd/import_bd.h index 3623552d..08e434c3 100644 --- a/src/game_bd/import_bd.h +++ b/src/game_bd/import_bd.h @@ -41,5 +41,6 @@ boolean TapeIsPlaying_ReplayBD(void); boolean isLevelEditorFastStart(void); boolean useOldEngine_BD(void); +boolean getTimePlayed_BD(void); #endif // IMPORT_BD_H diff --git a/src/game_bd/main_bd.c b/src/game_bd/main_bd.c index 336a9424..9508624f 100644 --- a/src/game_bd/main_bd.c +++ b/src/game_bd/main_bd.c @@ -278,6 +278,9 @@ static void UpdateGameDoorValues_BD(void) game_bd.gems_still_needed = gems_still_needed; game_bd.score = game_bd.game->player_score; + if (game.no_level_time_limit) + game_bd.time_left = getTimePlayed_BD(); + if (game.LevelSolved) { // update time and score in panel while counting bonus time diff --git a/src/tools.c b/src/tools.c index 2b40ad41..db3291fc 100644 --- a/src/tools.c +++ b/src/tools.c @@ -10668,6 +10668,11 @@ boolean useOldEngine_BD(void) return (tape.playing && (tape.property_bits & TAPE_PROPERTY_BD_OLD_ENGINE)); } +boolean getTimePlayed_BD(void) +{ + return TimePlayed; +} + boolean swapTiles_EM(boolean is_pre_emc_cave) { return is_pre_emc_cave && leveldir_current->use_emc_tiles; -- 2.34.1