improved smooth movement animation for BD engine (complete rewrite)
authorHolger Schemel <holger.schemel@virtion.de>
Sun, 16 Jun 2024 08:28:12 +0000 (10:28 +0200)
committerHolger Schemel <holger.schemel@virtion.de>
Sun, 16 Jun 2024 08:42:06 +0000 (10:42 +0200)
commitac8ca29d0e4dec7b621225457f6eb5179655ea14
treeaf2c0f9ed09d52e3a0c2cf67935ff024e0c00d6a
parent75b1504db75bdf33cf6bfc8cd30145805ab66a2d
improved smooth movement animation for BD engine (complete rewrite)

This is a complete rewrite of the smooth movement animation code for
the BD game and graphics engine. The previous code was a mess, and
still did not cover all cases (like game elements leaving a tile while
another game element is entering the same tile in the same cycle).

The new code only redraws a single playfield tile (without also trying
to redraw the corresponding adjacent tile related to element movement)
by drawing the tile background, the part of the element leaving that
tile and the part of the element entering that tile (without redrawing
the neighboring tile where the movement starts or stops, which is now
redrawn completely independently, allowing for correctly handling all
special cases in a much more clean way).
src/game_bd/bd_caveengine.c
src/game_bd/bd_elements.h
src/game_bd/bd_gameplay.c
src/game_bd/bd_gameplay.h
src/game_bd/bd_graphics.c
src/game_bd/export_bd.h
src/game_bd/main_bd.c