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);
}
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)
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)
{
- element = map_element(element);
+ return el2img_mm(map_element(element));
+}
- switch (element)
- {
- default:
- return el2img_mm(element);
- }
+int el_act2gfx(int element, int action)
+{
+ return el_act2img_mm(map_element(element), action);
}
void RedrawPlayfield_MM(void)