X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_mm%2Fmm_tools.c;h=d4bb5d37553ae80e1c72032f91e2cfc5146f281a;hb=f11f733c9a676d117a70ce117b4ecc3cfdb16be9;hp=1f23bc902c0114420e544d7ed68635a391cb98a1;hpb=ba3aeb20c00b33e4d513cb8f8bdc466bad553820;p=rocksndiamonds.git diff --git a/src/game_mm/mm_tools.c b/src/game_mm/mm_tools.c index 1f23bc90..d4bb5d37 100644 --- a/src/game_mm/mm_tools.c +++ b/src/game_mm/mm_tools.c @@ -92,7 +92,7 @@ void DrawGraphicExt_MM(DrawBuffer *d, int x, int y, int graphic) 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)) @@ -106,13 +106,13 @@ void DrawGraphicThruMask_MM(int x, int y, int graphic) #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; @@ -120,7 +120,7 @@ void DrawGraphicThruMaskExt_MM(DrawBuffer *d, int dest_x, int dest_y, 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); } @@ -286,7 +286,7 @@ void DrawScreenElementExt_MM(int x, int y, int dx, int dy, int element, 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); } @@ -1289,13 +1289,7 @@ static int map_element(int element) int el2gfx(int element) { - element = map_element(element); - - switch (element) - { - default: - return el2img_mm(element); - } + return el2img_mm(map_element(element)); } void RedrawPlayfield_MM(void)