changed some texts in level editor
[rocksndiamonds.git] / src / editor.c
index 721f4afe78e8e660381d31edddf6c5801051bdae..e593d55736d4c726d63a433a33510deefc34f2a8 100644 (file)
@@ -4939,10 +4939,10 @@ static int editor_el_boulderdash_effects[] =
   EL_BD_MEGA_ROCK_FALLING,
   EL_BD_FLYING_DIAMOND_FLYING,
 
-  EL_BD_FLYING_ROCK_FLYING,
   EL_BD_FALLING_WALL_FALLING,
   EL_BD_NITRO_PACK_FALLING,
   EL_BD_NUT_FALLING,
+  EL_BD_FLYING_ROCK_FLYING,
 
   EL_BD_PLAYER_GROWING_1,
   EL_BD_PLAYER_GROWING_2,
@@ -7359,7 +7359,25 @@ static void ScrollEditorLevel(int from_x, int from_y, int scroll)
 static void getEditorGraphicSource(int element, int tile_size, Bitmap **bitmap,
                                   int *x, int *y)
 {
-  getSizedGraphicSource(el2edimg(element), 0, tile_size, bitmap, x, y);
+  int graphic = el2edimg(element);
+  int frame = 0;
+
+  if (graphic == IMG_UNKNOWN)
+  {
+    // no graphic defined -- if BD style, try to get runtime ("effect") element graphics
+    // (normal BD style elements have graphics, but runtime ("effects") elements do not)
+    int element_bd = map_element_RND_to_BD_cave(element);
+
+    if (element_bd != O_UNKNOWN)
+    {
+      struct GraphicInfo_BD *g_bd = &graphic_info_bd_object[element_bd][0];
+
+      graphic = g_bd->graphic;
+      frame   = g_bd->frame;
+    }
+  }
+
+  getSizedGraphicSource(graphic, frame, tile_size, bitmap, x, y);
 }
 
 static void CreateControlButtons(void)