X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=e241c79adb289bdb3fe69614687019ebf79a8aed;hb=c6f9fba81fc59eff4b6b454dff92adecd28a7ad5;hp=6a9bf818832e6c0474b97c258ec6c125a3dfb302;hpb=a04bb286a6863151907673d6ba7ebe58a0a69b4f;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index 6a9bf818..e241c79a 100644 --- a/src/tools.c +++ b/src/tools.c @@ -768,23 +768,26 @@ void DrawPlayer(struct PlayerInfo *player) MarkTileDirty(sx,sy); } -void DrawGraphicAnimationExt(int x, int y, int graphic, int mask_mode) +void DrawGraphicAnimationExt(DrawBuffer *dst_bitmap, int x, int y, + int graphic, int mask_mode) { - if (IN_SCR_FIELD(x, y) && - (FrameCounter % new_graphic_info[graphic].anim_delay) == 0) - { - int frame = getGraphicAnimationFrame(graphic, -1); + int frame = getGraphicAnimationFrame(graphic, -1); - if (mask_mode == USE_MASKING) - DrawGraphicThruMask(x, y, graphic, frame); - else - DrawGraphic(x, y, graphic, frame); - } + if (mask_mode == USE_MASKING) + DrawGraphicThruMaskExt(dst_bitmap, x, y, graphic, frame); + else + DrawGraphicExt(dst_bitmap, x, y, graphic, frame); } void DrawGraphicAnimation(int x, int y, int graphic) { - DrawGraphicAnimationExt(x, y, graphic, NO_MASKING); + if (!IN_SCR_FIELD(x, y) || + (FrameCounter % new_graphic_info[graphic].anim_delay) != 0) + return; + + DrawGraphicAnimationExt(drawto_field, FX + x * TILEX, FY + y * TILEY, + graphic, NO_MASKING); + MarkTileDirty(x, y); } #if 1 @@ -876,7 +879,7 @@ void DrawGraphic(int x, int y, int graphic, int frame) MarkTileDirty(x, y); } -#if 1 +#if 0 void DrawOldGraphicExt(DrawBuffer *dst_bitmap, int x, int y, int graphic) { Bitmap *src_bitmap;