From: Holger Schemel Date: Sat, 5 Oct 2024 18:42:08 +0000 (+0200) Subject: added support for BD engine levels without time limit X-Git-Tag: 4.4.0.0-test-4~164 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=5770f4e65e9b7b705f330c462057642b485933c1;p=rocksndiamonds.git added support for BD engine levels without time limit --- 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;