rnd-20030801-1-src
[rocksndiamonds.git] / src / libgame / setup.c
index 574d37e84262217730ba644439c0a8e38907b255..47f57cb0152912f466b02b2d1ced52c770b4f508 100644 (file)
@@ -495,7 +495,9 @@ char *getCustomImageFilename(char *basename)
     /* 2nd try: look for special artwork in current level series directory */
     filename = getPath3(getCurrentLevelDir(), GRAPHICS_DIRECTORY, basename);
 #if 0
+    /*
     if (strcmp(basename, "RocksScreen.pcx") == 0)
+    */
       printf("::: trying 2 '%s' ...\n", filename);
 #endif
     if (fileExists(filename))
@@ -507,7 +509,9 @@ char *getCustomImageFilename(char *basename)
     /* 1st try: look for special artwork configured in level series config */
     filename = getPath2(getLevelArtworkDir(TREE_TYPE_GRAPHICS_DIR), basename);
 #if 0
+    /*
     if (strcmp(basename, "RocksScreen.pcx") == 0)
+    */
       printf("::: trying 2.1 '%s' ...\n", filename);
 #endif
     if (fileExists(filename))
@@ -520,7 +524,9 @@ char *getCustomImageFilename(char *basename)
   /* 3rd try: look for special artwork in configured artwork directory */
   filename = getPath2(getSetupArtworkDir(artwork.gfx_current), basename);
 #if 0
+  /*
   if (strcmp(basename, "RocksScreen.pcx") == 0)
+  */
     printf("::: trying 3 '%s' ...\n", filename);
 #endif
   if (fileExists(filename))
@@ -2117,16 +2123,25 @@ void LoadArtworkInfo()
   /* before sorting, the first entries will be from the user directory */
   artwork.gfx_current =
     getTreeInfoFromIdentifier(artwork.gfx_first, setup.graphics_set);
+  if (artwork.gfx_current == NULL)
+    artwork.gfx_current =
+      getTreeInfoFromIdentifier(artwork.gfx_first, GRAPHICS_SUBDIR);
   if (artwork.gfx_current == NULL)
     artwork.gfx_current = getFirstValidTreeInfoEntry(artwork.gfx_first);
 
   artwork.snd_current =
     getTreeInfoFromIdentifier(artwork.snd_first, setup.sounds_set);
+  if (artwork.snd_current == NULL)
+    artwork.snd_current =
+      getTreeInfoFromIdentifier(artwork.snd_first, SOUNDS_SUBDIR);
   if (artwork.snd_current == NULL)
     artwork.snd_current = getFirstValidTreeInfoEntry(artwork.snd_first);
 
   artwork.mus_current =
     getTreeInfoFromIdentifier(artwork.mus_first, setup.music_set);
+  if (artwork.mus_current == NULL)
+    artwork.mus_current =
+      getTreeInfoFromIdentifier(artwork.mus_first, MUSIC_SUBDIR);
   if (artwork.mus_current == NULL)
     artwork.mus_current = getFirstValidTreeInfoEntry(artwork.mus_first);
 
@@ -2211,6 +2226,9 @@ void LoadLevelArtworkInfo()
   {
     artwork.gfx_current =
       getTreeInfoFromIdentifier(artwork.gfx_first, setup.graphics_set);
+    if (artwork.gfx_current == NULL)
+      artwork.gfx_current =
+       getTreeInfoFromIdentifier(artwork.gfx_first, GRAPHICS_SUBDIR);
     if (artwork.gfx_current == NULL)
       artwork.gfx_current = getFirstValidTreeInfoEntry(artwork.gfx_first);
   }
@@ -2219,6 +2237,9 @@ void LoadLevelArtworkInfo()
   {
     artwork.snd_current =
       getTreeInfoFromIdentifier(artwork.snd_first, setup.sounds_set);
+    if (artwork.snd_current == NULL)
+      artwork.snd_current =
+       getTreeInfoFromIdentifier(artwork.snd_first, SOUNDS_SUBDIR);
     if (artwork.snd_current == NULL)
       artwork.snd_current = getFirstValidTreeInfoEntry(artwork.snd_first);
   }
@@ -2227,6 +2248,9 @@ void LoadLevelArtworkInfo()
   {
     artwork.mus_current =
       getTreeInfoFromIdentifier(artwork.mus_first, setup.music_set);
+    if (artwork.mus_current == NULL)
+      artwork.mus_current =
+       getTreeInfoFromIdentifier(artwork.mus_first, MUSIC_SUBDIR);
     if (artwork.mus_current == NULL)
       artwork.mus_current = getFirstValidTreeInfoEntry(artwork.mus_first);
   }