From: Holger Schemel Date: Sat, 11 May 2024 10:55:00 +0000 (+0200) Subject: renamed variables X-Git-Tag: 4.4.0.0-test-2~27 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=ee2ea277015cd6d41e5314bbdc18229bd60ca1de;p=rocksndiamonds.git renamed variables --- 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;