rnd-20021215-2-src
[rocksndiamonds.git] / src / libgame / misc.c
index 910a7e95ef1d18a725549daad837bbf26a3c9ded..6600dfdfc044fbc01116792c2bcbb35cf37350d1 100644 (file)
@@ -1439,7 +1439,7 @@ struct FileInfo *getFileListFromConfigList(struct ConfigInfo *config_list,
   }
 
   if (list_pos != num_file_list_entries - 1)
-    Error(ERR_EXIT, "inconsistant config list information -- please fix");
+    Error(ERR_EXIT, "inconsistant config list information (%d != %d) -- please fix", list_pos, num_file_list_entries - 1);
 
   return file_list;
 }
@@ -1550,7 +1550,13 @@ static void replaceArtworkListEntry(struct ArtworkListInfo *artwork_info,
 
   if (filename == NULL)
   {
-    Error(ERR_WARN, "cannot find artwork file '%s'", basename);
+    int error_mode = ERR_WARN;
+
+    /* we can get away without sounds and music, but not without graphics */
+    if (*listnode == NULL && artwork_info->type == ARTWORK_TYPE_GRAPHICS)
+      error_mode = ERR_EXIT;
+
+    Error(error_mode, "cannot find artwork file '%s'", basename);
     return;
   }
 
@@ -1597,6 +1603,17 @@ static void replaceArtworkListEntry(struct ArtworkListInfo *artwork_info,
     addNodeToList(&artwork_info->content_list, (*listnode)->source_filename,
                  *listnode);
   }
+  else
+  {
+    int error_mode = ERR_WARN;
+
+    /* we can get away without sounds and music, but not without graphics */
+    if (artwork_info->type == ARTWORK_TYPE_GRAPHICS)
+      error_mode = ERR_EXIT;
+
+    Error(error_mode, "cannot load artwork file '%s'", basename);
+    return;
+  }
 }
 
 static void LoadCustomArtwork(struct ArtworkListInfo *artwork_info,