From ee2ea277015cd6d41e5314bbdc18229bd60ca1de Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sat, 11 May 2024 12:55:00 +0200 Subject: [PATCH] renamed variables --- src/game.c | 4 ++-- src/game_bd/export_bd.h | 2 +- src/game_bd/main_bd.c | 10 +++------- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/game.c b/src/game.c index 831ec901..1966bb3c 100644 --- a/src/game.c +++ b/src/game.c @@ -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); diff --git a/src/game_bd/export_bd.h b/src/game_bd/export_bd.h index a060e2e4..f11a4aad 100644 --- a/src/game_bd/export_bd.h +++ b/src/game_bd/export_bd.h @@ -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; }; diff --git a/src/game_bd/main_bd.c b/src/game_bd/main_bd.c index 06ecfd04..32305736 100644 --- a/src/game_bd/main_bd.c +++ b/src/game_bd/main_bd.c @@ -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; -- 2.34.1