rnd-20020407-1-src
[rocksndiamonds.git] / src / init.c
index b45aa038385e924a91343f2c841e5c5a593f617f..3118aa35a76b2d294e2b62d3495f8860a02d96ed 100644 (file)
@@ -366,6 +366,36 @@ void InitGfxBackground()
   redraw_mask = REDRAW_ALL;
 }
 
+void ReloadCustomArtwork()
+{
+  if (artwork.graphics_set_current != artwork.gfx_current->name)
+  {
+    int i;
+
+    for(i=0; i<NUM_PICTURES; i++)
+      ReloadCustomImage(&pix[i], image_filename[i]);
+
+    InitGfxBackground();
+    SetDoorState(DOOR_OPEN_1 | DOOR_CLOSE_2);
+
+    artwork.graphics_set_current = artwork.gfx_current->name;
+  }
+
+  if (artwork.sounds_set_current != artwork.snd_current->name)
+  {
+    printf("reload sounds ...\n");
+
+    artwork.sounds_set_current = artwork.snd_current->name;
+  }
+
+  if (artwork.music_set_current != artwork.mus_current->name)
+  {
+    printf("reload music ...\n");
+
+    artwork.music_set_current = artwork.mus_current->name;
+  }
+}
+
 void InitGadgets()
 {
   CreateLevelEditorGadgets();