From: Holger Schemel Date: Sun, 6 Feb 2022 23:07:11 +0000 (+0100) Subject: added support for more than five digits for score on game panel X-Git-Tag: 4.3.1.1~5 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=b9ff5d05fe2fe26b3841c05a6c5fe516bb81c33d;p=rocksndiamonds.git added support for more than five digits for score on game panel --- diff --git a/src/conf_gfx.c b/src/conf_gfx.c index c321bcf0..d5bb9a55 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -8749,8 +8749,9 @@ struct ConfigInfo image_config[] = { "game.panel.score.y", "159" }, { "game.panel.score.align", "center" }, { "game.panel.score.valign", "top" }, - { "game.panel.score.digits", "5" }, + { "game.panel.score.digits", "-1" }, { "game.panel.score.font", "font.text_2" }, + { "game.panel.score.font_narrow", "font.text_1" }, { "game.panel.score.draw_masked", "true" }, { "game.panel.score.draw_order", "0" }, { "game.panel.score.class", "none" }, @@ -8760,8 +8761,9 @@ struct ConfigInfo image_config[] = { "game.panel.highscore.y", "-1" }, { "game.panel.highscore.align", "left" }, { "game.panel.highscore.valign", "top" }, - { "game.panel.highscore.digits", "5" }, + { "game.panel.highscore.digits", "-1" }, { "game.panel.highscore.font", "font.text_2" }, + { "game.panel.highscore.font_narrow", "font.text_1" }, { "game.panel.highscore.draw_masked", "true" }, { "game.panel.highscore.draw_order", "0" }, { "game.panel.highscore.class", "none" }, diff --git a/src/game.c b/src/game.c index 8422878a..b2bb58f8 100644 --- a/src/game.c +++ b/src/game.c @@ -2682,15 +2682,24 @@ static void DisplayGameControlValues(void) { if (nr == GAME_PANEL_LEVEL_NUMBER || nr == GAME_PANEL_INVENTORY_COUNT || + nr == GAME_PANEL_SCORE || + nr == GAME_PANEL_HIGHSCORE || nr == GAME_PANEL_TIME) { boolean use_dynamic_size = (size == -1 ? TRUE : FALSE); if (use_dynamic_size) // use dynamic number of digits { - int value_change = (nr == GAME_PANEL_LEVEL_NUMBER ? 100 : 1000); - int size1 = (nr == GAME_PANEL_LEVEL_NUMBER ? 2 : 3); - int size2 = size1 + 1; + int value_change = (nr == GAME_PANEL_LEVEL_NUMBER ? 100 : + nr == GAME_PANEL_INVENTORY_COUNT || + nr == GAME_PANEL_TIME ? 1000 : 100000); + int size_add = (nr == GAME_PANEL_LEVEL_NUMBER || + nr == GAME_PANEL_INVENTORY_COUNT || + nr == GAME_PANEL_TIME ? 1 : 2); + int size1 = (nr == GAME_PANEL_LEVEL_NUMBER ? 2 : + nr == GAME_PANEL_INVENTORY_COUNT || + nr == GAME_PANEL_TIME ? 3 : 5); + int size2 = size1 + size_add; int font1 = pos->font; int font2 = pos->font_alt;