added support for x/y/width/height parameters for border/background images
[rocksndiamonds.git] / src / init.c
index 547d629e6f4f8f9c416147cdb88201d29649fdac..bdcff36815e5f153b22f64ea5fc70687e79831de 100644 (file)
@@ -110,14 +110,14 @@ static int copy_properties[][5] =
 static int get_graphic_parameter_value(char *, char *, int);
 
 
-static Bitmap *getLoadingBackgroundBitmap(int graphic)
+static int getLoadingBackgroundImage(int graphic)
 {
-  return getBitmapFromGraphicOrDefault(graphic, INITIAL_IMG_BACKGROUND);
+  return getImageFromGraphicOrDefault(graphic, INITIAL_IMG_BACKGROUND);
 }
 
 static void SetLoadingWindowBackgroundImage(int graphic)
 {
-  SetWindowBackgroundBitmap(getLoadingBackgroundBitmap(graphic));
+  SetBackgroundImage(getLoadingBackgroundImage(graphic), REDRAW_ALL);
 }
 
 static void SetLoadingBackgroundImage(void)
@@ -1561,6 +1561,9 @@ static void set_graphic_parameters_ext(int graphic, int *parameter,
   // animation synchronized with global frame counter, not move position
   g->anim_global_sync = parameter[GFX_ARG_GLOBAL_SYNC];
 
+  // animation synchronized with global anim frame counter, not move position
+  g->anim_global_anim_sync = parameter[GFX_ARG_GLOBAL_ANIM_SYNC];
+
   // optional element for cloning crumble graphics
   if (parameter[GFX_ARG_CRUMBLED_LIKE] != ARG_UNDEFINED_VALUE)
     g->crumbled_like = parameter[GFX_ARG_CRUMBLED_LIKE];
@@ -4237,6 +4240,7 @@ void InitElementPropertiesStatic(void)
     EL_BD_AMOEBA,
     EL_EMC_MAGIC_BALL,
     EL_EMC_ANDROID,
+    EL_MM_GRAY_BALL,
 
     -1
   };
@@ -5651,7 +5655,6 @@ void InitGfxBuffers(void)
   }
 
   ReCreateBitmap(&bitmap_db_field, FXSIZE, FYSIZE);
-  ReCreateBitmap(&bitmap_db_panel, DXSIZE, DYSIZE);
   ReCreateBitmap(&bitmap_db_door_1, 3 * DXSIZE, DYSIZE);
   ReCreateBitmap(&bitmap_db_door_2, 3 * VXSIZE, VYSIZE);