rnd-20030126-1-src
[rocksndiamonds.git] / src / init.c
index 6365f42f26be32f947f1a7bb2029b3deac75c7f2..448a2876bfbfa6ca171d9242a73e2824edeb4851 100644 (file)
@@ -191,6 +191,9 @@ static void InitArtworkConfig()
   static char *dummy[1] = { NULL };
   int i;
 
+  for (i=0; i<MAX_NUM_ELEMENTS; i++)
+    element_info[i].custom_description = NULL;
+
   for (i=0; i<MAX_NUM_ELEMENTS + 1; i++)
     element_prefix[i] = element_info[i].token_name;
   for (i=0; i<MAX_NUM_ELEMENTS + 1; i++)
@@ -256,6 +259,33 @@ static void ReinitializeGraphics()
 
   InitGadgets();
   InitToons();
+
+
+
+  /* !!! TEST ONLY !!! */
+
+#ifdef TARGET_SDL
+
+  {
+    Bitmap tmp_bitmap;
+    SDL_Surface *dst = SDLZoomSurface(graphic_info[IMG_SAND].bitmap->surface,
+                                     0.5, 0.5);
+    tmp_bitmap.surface = dst;
+
+    BlitBitmap(&tmp_bitmap, graphic_info[IMG_SAND].bitmap,
+              0, 0, 256, 224, 0, 448);
+
+    SDL_FreeSurface(dst);
+  }
+
+#elif defined(PLATFORM_MSDOS)
+
+  stretch_blit((BITMAP *)(graphic_info[IMG_SAND].bitmap->drawable),
+              (BITMAP *)(graphic_info[IMG_SAND].bitmap->drawable),
+              0, 0, 512, 448,
+              0, 448, 256, 224);
+
+#endif
 }
 
 static void ReinitializeSounds()
@@ -275,6 +305,8 @@ static void InitImages()
 {
   ReloadCustomImages();
   ReinitializeGraphics();
+
+  LoadCustomElementDescriptions();
 }
 
 static void InitSound()
@@ -619,6 +651,8 @@ void ReloadCustomArtwork()
     ReloadCustomImages();
     ReinitializeGraphics();
 
+    LoadCustomElementDescriptions();
+
     FreeTileClipmasks();
     InitTileClipmasks();