rnd-20021211-1-src
[rocksndiamonds.git] / src / libgame / misc.c
index 910a7e95ef1d18a725549daad837bbf26a3c9ded..f6ea818788ea12d34855155862f717cae33209c7 100644 (file)
@@ -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,