From: Holger Schemel Date: Tue, 21 Jan 2025 18:15:46 +0000 (+0100) Subject: moved code to separate function X-Git-Tag: 4.4.0.3~13 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=e727c120096cb23e83e5863b24dc5f4ebda1eea6;p=rocksndiamonds.git moved code to separate function --- diff --git a/src/game.c b/src/game.c index 7215d695..a47129c7 100644 --- a/src/game.c +++ b/src/game.c @@ -5027,6 +5027,17 @@ void InitAmoebaNr(int x, int y) AmoebaCnt2[group_nr]++; } +static void LevelSolved_UpdateFinalGameValues(int time, int score, int health) +{ + game.LevelSolved_CountingTime = time; + game.LevelSolved_CountingScore = score; + game.LevelSolved_CountingHealth = health; + + game_panel_controls[GAME_PANEL_TIME].value = time; + game_panel_controls[GAME_PANEL_SCORE].value = score; + game_panel_controls[GAME_PANEL_HEALTH].value = health; +} + static void LevelSolved_SetFinalGameValues(void) { game.time_final = (level.game_engine_type == GAME_ENGINE_TYPE_BD ? game_bd.time_left : @@ -5051,13 +5062,7 @@ static void LevelSolved_SetFinalGameValues(void) static void LevelSolved_DisplayFinalGameValues(int time, int score, int health) { - game.LevelSolved_CountingTime = time; - game.LevelSolved_CountingScore = score; - game.LevelSolved_CountingHealth = health; - - game_panel_controls[GAME_PANEL_TIME].value = time; - game_panel_controls[GAME_PANEL_SCORE].value = score; - game_panel_controls[GAME_PANEL_HEALTH].value = health; + LevelSolved_UpdateFinalGameValues(time, score, health); DisplayGameControlValues(); }