added support for BD engine levels without time limit
authorHolger Schemel <holger.schemel@virtion.de>
Sat, 5 Oct 2024 18:42:08 +0000 (20:42 +0200)
committerHolger Schemel <holger.schemel@virtion.de>
Sat, 5 Oct 2024 18:42:10 +0000 (20:42 +0200)
src/game_bd/import_bd.h
src/game_bd/main_bd.c
src/tools.c

index 3623552d32f05de23d22fda265b3b411aab176ad..08e434c3eab02a87880c3753a4df28ca56bb5db6 100644 (file)
@@ -41,5 +41,6 @@ boolean TapeIsPlaying_ReplayBD(void);
 
 boolean isLevelEditorFastStart(void);
 boolean useOldEngine_BD(void);
+boolean getTimePlayed_BD(void);
 
 #endif // IMPORT_BD_H
index 336a9424601d610d2bcfdb90a7aff93b9b80c514..9508624f21994948c607cf8045443cd9adc0c126 100644 (file)
@@ -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
index 2b40ad417a0450ded757e2680b6b23fafc885a2e..db3291fcf1e9a7e9af5d6b06365d48edcfcea6ee 100644 (file)
@@ -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;