added compatibility code for new score screens for new "Jue" graphics
authorHolger Schemel <info@artsoft.org>
Wed, 13 Apr 2022 19:16:15 +0000 (21:16 +0200)
committerHolger Schemel <info@artsoft.org>
Wed, 13 Apr 2022 19:16:15 +0000 (21:16 +0200)
src/init.c

index afa406a28c3eb8d3ca98d0e7527c538556ec4940..1c1f85e21ab4eba51e727ec91f723f0fc5b48b32 100644 (file)
@@ -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;
       }