From: Holger Schemel Date: Wed, 13 Apr 2022 19:16:15 +0000 (+0200) Subject: added compatibility code for new score screens for new "Jue" graphics X-Git-Tag: 4.3.2.0~15 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=f19c6cb85d0f0d2cbd0cdb75f1f959dc835c79b3;p=rocksndiamonds.git added compatibility code for new score screens for new "Jue" graphics --- diff --git a/src/init.c b/src/init.c index afa406a2..1c1f85e2 100644 --- a/src/init.c +++ b/src/init.c @@ -1964,8 +1964,9 @@ static void InitGraphicCompatibilityInfo(void) ClearRectangle(bitmap, 514, 66, 32, 480); } - // special compatibility handling for "Jue" (2007) graphics set - if (strPrefix(leveldir_current->graphics_set, "jue0")) + // special compatibility handling for "Jue" graphics sets (2007 and 2019) + boolean supports_score_info = (menu.draw_xoffset[GAME_MODE_SCOREINFO] != 0); + if (strPrefix(leveldir_current->graphics_set, "jue") && !supports_score_info) { int font_title[] = { @@ -2001,9 +2002,10 @@ static void InitGraphicCompatibilityInfo(void) { for (j = 0; j < 2; j++) { + boolean jue0 = strEqual(leveldir_current->graphics_set, "jue0"); int font_nr = (j == 0 ? font_text[i] : FONT_ACTIVE(font_text[i])); int font_bitmap_id = font_info[font_nr].special_bitmap_id[mode_old]; - int font_yoffset = 10; + int font_yoffset = (jue0 ? 10 : 5); gfx.font_bitmap_info[font_bitmap_id].draw_yoffset = font_yoffset; }