renamed preprocessor constant for game element in MM engine
[rocksndiamonds.git] / src / game_mm / mm_tools.c
index 44fb257c855cea163f2f250e47083d2a9df7a653..59c59d25737982bc64883d8abb1a763626b8d693 100644 (file)
@@ -398,11 +398,6 @@ void DrawField_MM(int x, int y)
   int element = Tile[x][y];
 
   DrawElement_MM(x, y, element);
-
-  // old game versions randomly changed colors of bonus light balls
-  if (game.engine_version < VERSION_IDENT(4,3,3,0) &&
-      element == EL_LIGHTBALL && game_mm.lightball_rnd)
-    RND(3);
 }
 
 void DrawLevel_MM(void)
@@ -529,8 +524,10 @@ void DrawElement_MM(int x, int y, int element)
           laser.fuse_x == x &&
           laser.fuse_y == y)
     DrawGraphic_MM(x, y, IMG_MM_FUSE);
+  else if (element == EL_GRAY_BALL_ACTIVE)
+    DrawGraphic_MM(x, y, el_act2gfx(EL_GRAY_BALL, MM_ACTION_ACTIVE));
   else if (element == EL_GRAY_BALL_OPENING)
-    DrawGraphic_MM(x, y, el_act2gfx(EL_BALL_GRAY, MM_ACTION_OPENING));
+    DrawGraphic_MM(x, y, el_act2gfx(EL_GRAY_BALL, MM_ACTION_OPENING));
   else if (element == EL_BOMB_ACTIVE)
     DrawGraphic_MM(x, y, el_act2gfx(EL_BOMB, MM_ACTION_ACTIVE));
   else if (element == EL_MINE_ACTIVE)
@@ -1298,6 +1295,21 @@ static int map_element(int element)
   }
 }
 
+int unmap_element(int element)
+{
+  switch (element)
+  {
+    case EL_STEEL_WALL:                return EL_WALL_STEEL;
+    case EL_WOODEN_WALL:       return EL_WALL_WOOD;
+    case EL_ICE_WALL:          return EL_WALL_ICE;
+    case EL_AMOEBA_WALL:       return EL_WALL_AMOEBA;
+    case EL_DF_STEEL_WALL:     return EL_DF_WALL_STEEL;
+    case EL_DF_WOODEN_WALL:    return EL_DF_WALL_WOOD;
+
+    default:                   return element;
+  }
+}
+
 int el2gfx(int element)
 {
   return el2img_mm(map_element(element));