fixed checking artwork set for compatibility code for new score screens
[rocksndiamonds.git] / src / init.c
index 315983ac896ca3428199c65171534ab91d923437..727dcf30be2cfe03197b82bd9d436bf4dfdb808c 100644 (file)
@@ -1966,7 +1966,7 @@ static void InitGraphicCompatibilityInfo(void)
 
   // 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)
+  if (strPrefix(artwork.gfx_current_identifier, "jue") && !supports_score_info)
   {
     int font_title[] =
     {
@@ -2002,7 +2002,7 @@ static void InitGraphicCompatibilityInfo(void)
     {
       for (j = 0; j < 2; j++)
       {
-       boolean jue0 = strEqual(leveldir_current->graphics_set, "jue0");
+       boolean jue0 = strEqual(artwork.gfx_current_identifier, "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 = (jue0 ? 10 : 5);
@@ -6260,6 +6260,13 @@ static char *setNewArtworkIdentifier(int type)
   return artwork_new_identifier;
 }
 
+static void InitArtworkIdentifier(void)
+{
+  setNewArtworkIdentifier(ARTWORK_TYPE_GRAPHICS);
+  setNewArtworkIdentifier(ARTWORK_TYPE_SOUNDS);
+  setNewArtworkIdentifier(ARTWORK_TYPE_MUSIC);
+}
+
 void ReloadCustomArtwork(int force_reload)
 {
   int last_game_status = game_status;  // save current game status
@@ -6509,6 +6516,9 @@ void OpenAll(void)
   InitOverrideArtwork();       // needs to know current level directory
   print_timestamp_time("InitOverrideArtwork");
 
+  InitArtworkIdentifier();     // needs to know current level directory
+  print_timestamp_time("InitArtworkIdentifier");
+
   InitImages();                        // needs to know current level directory
   print_timestamp_time("InitImages");