fixed bugs when using element graphics with non-standard tile size
[rocksndiamonds.git] / src / init.c
index 42c4ce1b0c0cb28c46d32c2a5d28b0caafa8bef6..ca820886f380c18d9ca65fc5dfb8a8df0e709d5c 100644 (file)
@@ -102,6 +102,11 @@ void DrawInitAnim()
   if (!DelayReached(&action_delay, action_delay_value))
     return;
 
+  if (init_last.busy.x == -1)
+    init_last.busy.x = WIN_XSIZE / 2;
+  if (init_last.busy.y == -1)
+    init_last.busy.y = WIN_YSIZE / 2;
+
   x = ALIGNED_TEXT_XPOS(&init_last.busy);
   y = ALIGNED_TEXT_YPOS(&init_last.busy);
 
@@ -151,7 +156,7 @@ void InitGadgets()
   gadgets_initialized = TRUE;
 }
 
-inline void InitElementSmallImagesScaledUp(int graphic)
+inline static void InitElementSmallImagesScaledUp(int graphic)
 {
   struct GraphicInfo *g = &graphic_info[graphic];
 
@@ -1071,11 +1076,9 @@ static void set_graphic_parameters_ext(int graphic, int *parameter,
       g->tile_size = TILESIZE;         /* standard tile size */
 #endif
 
-#if 0
-    // CHECK: when setting tile size, should this set width and height?
+    // when setting tile size, also set width and height accordingly
     g->width  = g->tile_size;
     g->height = g->tile_size;
-#endif
   }
 
   if (g->use_image_size)