From: Holger Schemel Date: Fri, 25 Nov 2022 19:30:16 +0000 (+0100) Subject: added frame parameter to graphics drawing function for MM engine X-Git-Tag: 4.3.3.0~12 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=f11f733c9a676d117a70ce117b4ecc3cfdb16be9;p=rocksndiamonds.git added frame parameter to graphics drawing function for MM engine --- diff --git a/src/game_mm/mm_tools.c b/src/game_mm/mm_tools.c index 2c34884a..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); } diff --git a/src/game_mm/mm_tools.h b/src/game_mm/mm_tools.h index 74cfe298..d6679de5 100644 --- a/src/game_mm/mm_tools.h +++ b/src/game_mm/mm_tools.h @@ -63,8 +63,8 @@ void DrawGraphicAnimation_MM(int, int, int, int); void DrawGraphic_MM(int, int, int); void DrawGraphicExt_MM(DrawBuffer *, int, int, int); -void DrawGraphicThruMask_MM(int, int, int); -void DrawGraphicThruMaskExt_MM(DrawBuffer *, int, int, int); +void DrawGraphicThruMask_MM(int, int, int, int); +void DrawGraphicThruMaskExt_MM(DrawBuffer *, int, int, int, int); void DrawMiniGraphic_MM(int, int, int); void getMiniGraphicSource(int, Bitmap **, int *, int *); void DrawMiniGraphicExt_MM(DrawBuffer *, int, int, int);