}
#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);
}
MarkTileDirty(x,y);
}
-void DrawGraphicShiftedThruMask_MM(int x,int y, int dx,int dy, int graphic,
- int cut_mode)
-{
- DrawGraphicShifted_MM(x, y, dx, dy, graphic, cut_mode, USE_MASKING);
-}
-
void DrawScreenElementExt_MM(int x, int y, int dx, int dy, int element,
int cut_mode, int mask_mode)
{
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);
}
DrawScreenElementExt_MM(x, y, dx, dy, element, cut_mode, NO_MASKING);
}
-void DrawLevelElementShifted_MM(int x, int y, int dx, int dy, int element,
- int cut_mode)
-{
- DrawLevelElementExt_MM(x, y, dx, dy, element, cut_mode, NO_MASKING);
-}
-
-void DrawScreenElementThruMask_MM(int x, int y, int element)
-{
- DrawScreenElementExt_MM(x, y, 0, 0, element, NO_CUTTING, USE_MASKING);
-}
-
-void DrawLevelElementThruMask_MM(int x, int y, int element)
-{
- DrawLevelElementExt_MM(x, y, 0, 0, element, NO_CUTTING, USE_MASKING);
-}
-
-void DrawLevelFieldThruMask_MM(int x, int y)
-{
- DrawLevelElementExt_MM(x, y, 0, 0, Tile[x][y], NO_CUTTING, USE_MASKING);
-}
-
void DrawScreenElement_MM(int x, int y, int element)
{
DrawScreenElementExt_MM(x, y, 0, 0, element, NO_CUTTING, NO_MASKING);
}
-void DrawLevelElement_MM(int x, int y, int element)
-{
- if (IN_LEV_FIELD(x, y) && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
- DrawScreenElement_MM(SCREENX(x), SCREENY(y), element);
-}
-
void DrawScreenField_MM(int x, int y)
{
int element = Tile[x][y];
}
#endif
-void DrawMiniLevel_MM(int size_x, int size_y, int scroll_x, int scroll_y)
-{
- int x, y;
-
- for (x = 0; x < size_x; x++)
- for (y = 0; y < size_y; y++)
- DrawMiniElementOrWall_MM(x, y, scroll_x, scroll_y);
-
- redraw_mask |= REDRAW_FIELD;
-}
-
// ----------------------------------------------------------------------------
// XSN
int el2gfx(int element)
{
- element = map_element(element);
-
- switch (element)
- {
- case EL_LIGHTBALL:
- return IMG_MM_LIGHTBALL_RED + RND(3);
-
- default:
- return el2img_mm(element);
- }
+ return el2img_mm(map_element(element));
}
void RedrawPlayfield_MM(void)