From: Holger Schemel Date: Fri, 26 Nov 2021 23:11:11 +0000 (+0100) Subject: added support for graphic animations of empty space elements X-Git-Tag: 4.3.1.0~8 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=b0c3bb42e4a0baf41242190a2855c3623267899b;p=rocksndiamonds.git added support for graphic animations of empty space elements --- diff --git a/src/game.c b/src/game.c index 491d4e9b..e906d236 100644 --- a/src/game.c +++ b/src/game.c @@ -12299,6 +12299,9 @@ void GameActions_RND(void) graphic = el_act_dir2img(element, GfxAction[x][y], GfxDir[x][y]); last_gfx_frame = GfxFrame[x][y]; + if (element == EL_EMPTY) + graphic = el2img(GfxElementEmpty[x][y]); + ResetGfxFrame(x, y); if (GfxFrame[x][y] != last_gfx_frame && !Stop[x][y]) diff --git a/src/tools.c b/src/tools.c index a3e53068..ebcb4730 100644 --- a/src/tools.c +++ b/src/tools.c @@ -3960,6 +3960,9 @@ void DrawLevelGraphicAnimationIfNeeded(int x, int y, int graphic) if (!IN_LEV_FIELD(x, y) || !IN_SCR_FIELD(sx, sy)) return; + if (Tile[x][y] == EL_EMPTY) + graphic = el2img(GfxElementEmpty[x][y]); + if (!IS_NEW_FRAME(GfxFrame[x][y], graphic)) return;