From 95c448851e73f54ef73f845070b172f9e3d333c1 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Mon, 26 Aug 2024 21:53:42 +0200 Subject: [PATCH] fixed smooth animations for snapping in BD engine for non-black space --- src/game_bd/bd_graphics.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- 2.34.1