From: Holger Schemel Date: Mon, 26 Aug 2024 19:53:42 +0000 (+0200) Subject: fixed smooth animations for snapping in BD engine for non-black space X-Git-Tag: 4.4.0.0-test-4~291 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=95c448851e73f54ef73f845070b172f9e3d333c1;p=rocksndiamonds.git fixed smooth animations for snapping in BD engine for non-black space --- diff --git a/src/game_bd/bd_graphics.c b/src/game_bd/bd_graphics.c index d2d0e0fa..a0ee42f6 100644 --- a/src/game_bd/bd_graphics.c +++ b/src/game_bd/bd_graphics.c @@ -825,6 +825,14 @@ static void gd_drawcave_tile(Bitmap *dest, GdGame *game, int x, int y, boolean d if (is_moving_from) blit_bitmap = BlitBitmapMasked; + // if player is snapping a diggable game element, draw non-moving "space" element + // (special case required if "space" element is graphically defined as non-black) + if (tile == O_SPACE && el_diggable(tile_last)) + { + gx = (dx != 0 ? shift - gx : gx); + gy = (dy != 0 ? shift - gy : gy); + } + blit_bitmap(tile_bitmap, dest, gx, gy, xsize, ysize, tx, ty); // when using dynamic scheduling (mainly BD1 levels), redraw tile in next frame