renamed variables
authorHolger Schemel <holger.schemel@virtion.de>
Sat, 11 May 2024 10:55:00 +0000 (12:55 +0200)
committerHolger Schemel <holger.schemel@virtion.de>
Sat, 11 May 2024 10:55:16 +0000 (12:55 +0200)
src/game.c
src/game_bd/export_bd.h
src/game_bd/main_bd.c

index 831ec9010a5a0a4a9460d471bb8aaf2574b53045..1966bb3c6c03ec01db36464d7fce410a6fbedd9a 100644 (file)
@@ -2286,7 +2286,7 @@ static void UpdateGameControlValues(void)
   int time = (game.LevelSolved ?
              game.LevelSolved_CountingTime :
              level.game_engine_type == GAME_ENGINE_TYPE_BD ?
-             game_bd.time_played :
+             game_bd.time_left :
              level.game_engine_type == GAME_ENGINE_TYPE_EM ?
              game_em.lev->time :
              level.game_engine_type == GAME_ENGINE_TYPE_SP ?
@@ -4862,7 +4862,7 @@ void InitAmoebaNr(int x, int y)
 
 static void LevelSolved_SetFinalGameValues(void)
 {
-  game.time_final = (level.game_engine_type == GAME_ENGINE_TYPE_BD ? game_bd.time_played :
+  game.time_final = (level.game_engine_type == GAME_ENGINE_TYPE_BD ? game_bd.time_left :
                     game.no_level_time_limit ? TimePlayed : TimeLeft);
   game.score_time_final = (level.use_step_counter ? TimePlayed :
                           TimePlayed * FRAMES_PER_SECOND + TimeFrames);
index a060e2e4be7f5f07990d10aa2560747968cf74ba..f11a4aad60f9ea2eab548e35c9a01c6e58d316df 100644 (file)
@@ -44,7 +44,7 @@ struct GameInfo_BD
   boolean cover_screen;
 
   // needed for updating panel
-  int time_played;
+  int time_left;
   int gems_still_needed;
   int score;
 };
index 06ecfd0458fa7cea799a9fe044236b56122a75b9..32305736fda1a21780d7d4fc923e2ec4ff6733a1 100644 (file)
@@ -258,17 +258,17 @@ int getTimeLeft_BD(void)
 static void UpdateGameDoorValues_BD(void)
 {
   GdCave *cave = game_bd.game->cave;
-  int time_secs = gd_cave_time_show(cave, cave->time);
+  int time_left = gd_cave_time_show(cave, cave->time);
   int gems_still_needed = MAX(0, (cave->diamonds_needed - cave->diamonds_collected));
 
-  game_bd.time_played = time_secs;
+  game_bd.time_left = time_left;
   game_bd.gems_still_needed = gems_still_needed;
   game_bd.score = game_bd.game->player_score;
 
   if (game.LevelSolved)
   {
     // update time and score in panel while counting bonus time
-    game.LevelSolved_CountingTime  = game_bd.time_played;
+    game.LevelSolved_CountingTime  = game_bd.time_left;
     game.LevelSolved_CountingScore = game_bd.score;
   }
 }
@@ -320,10 +320,6 @@ void InitGameEngine_BD(void)
   game_bd.game_over = FALSE;
   game_bd.cover_screen = FALSE;
 
-  game_bd.time_played = 0;
-  game_bd.gems_still_needed = 0;
-  game_bd.score = 0;
-
   gd_caveset_last_selected       = native_bd_level.cave_nr;
   gd_caveset_last_selected_level = native_bd_level.level_nr;