}
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;
}
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;
}
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,