From: Holger Schemel Date: Sat, 4 Jan 2025 16:48:06 +0000 (+0100) Subject: added support for showing multiple lives for BD games in game panel X-Git-Tag: 4.4.0.1~55 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=7d4faeb770d6105b54eddc840341336e3306d867;p=rocksndiamonds.git added support for showing multiple lives for BD games in game panel --- diff --git a/src/game.c b/src/game.c index d924477a..c4af3361 100644 --- a/src/game.c +++ b/src/game.c @@ -2986,6 +2986,16 @@ static void DisplayGameControlValues(void) nr == GAME_PANEL_LEVEL_NAME || nr == GAME_PANEL_LEVEL_AUTHOR) { + if (nr == GAME_PANEL_LEVEL_NAME && + level.game_engine_type == GAME_ENGINE_TYPE_BD && setup.bd_multiple_lives) + { + static char *level_name_and_lives = NULL; + + setStringPrint(&level_name_and_lives, "%s (%d)", s, game_bd.global_lives); + + s = level_name_and_lives; + } + // use alternative (narrow) font if text larger than specified size or game panel width if ((size > 0 && strlen(s) > size) || strlen(s) * getFontWidth(font) > DXSIZE) font = pos->font_alt;