}
#endif
- DrawGraphicExt_MM(drawto_field, cFX + x * TILEX, cFY + y * TILEY, graphic);
+ int frame = getGraphicAnimationFrameXY(graphic, x, y);
+
+ DrawGraphicAnimation_MM(x, y, graphic, frame);
MarkTileDirty(x, y);
}
BlitBitmap(bitmap, d, src_x, src_y, TILEX, TILEY, x, y);
}
-void DrawGraphicThruMask_MM(int x, int y, int graphic)
+void DrawGraphicThruMask_MM(int x, int y, int graphic, int frame)
{
#if DEBUG
if (!IN_SCR_FIELD(x,y))
#endif
DrawGraphicThruMaskExt_MM(drawto_field, cFX + x * TILEX, cFY + y * TILEY,
- graphic);
+ graphic, frame);
MarkTileDirty(x,y);
}
void DrawGraphicThruMaskExt_MM(DrawBuffer *d, int dest_x, int dest_y,
- int graphic)
+ int graphic, int frame)
{
int src_x, src_y;
Bitmap *src_bitmap;
if (graphic == IMG_EMPTY)
return;
- getGraphicSource(graphic, 0, &src_bitmap, &src_x, &src_y);
+ getGraphicSource(graphic, frame, &src_bitmap, &src_x, &src_y);
BlitBitmapMasked(src_bitmap, d, src_x, src_y, TILEX, TILEY, dest_x, dest_y);
}
if (dx || dy)
DrawGraphicShifted_MM(x, y, dx, dy, graphic, cut_mode, mask_mode);
else if (mask_mode == USE_MASKING)
- DrawGraphicThruMask_MM(x, y, graphic);
+ DrawGraphicThruMask_MM(x, y, graphic, 0);
else
DrawGraphic_MM(x, y, graphic);
}
laser.fuse_x == x &&
laser.fuse_y == y)
DrawGraphic_MM(x, y, IMG_MM_FUSE);
+ else if (element == EL_GRAY_BALL_OPENING)
+ DrawGraphic_MM(x, y, el_act2gfx(EL_BALL_GRAY, 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)
+ DrawGraphic_MM(x, y, el_act2gfx(EL_MINE, MM_ACTION_ACTIVE));
else
DrawGraphic_MM(x, y, el2gfx(element));
}
}
}
-int el2gfx(int element)
+int unmap_element(int element)
{
- element = map_element(element);
-
switch (element)
{
- case EL_LIGHTBALL:
- return IMG_MM_LIGHTBALL_RED + RND(3);
+ 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 el2img_mm(element);
+ default: return element;
}
}
+int el2gfx(int element)
+{
+ return el2img_mm(map_element(element));
+}
+
+int el_act2gfx(int element, int action)
+{
+ return el_act2img_mm(map_element(element), action);
+}
+
void RedrawPlayfield_MM(void)
{
DrawLevel_MM();