projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51da1cb
)
added support for graphic animations of empty space elements
author
Holger Schemel
<info@artsoft.org>
Fri, 26 Nov 2021 23:11:11 +0000
(
00:11
+0100)
committer
Holger Schemel
<info@artsoft.org>
Sat, 22 Jan 2022 16:58:29 +0000
(17:58 +0100)
src/game.c
patch
|
blob
|
history
src/tools.c
patch
|
blob
|
history
diff --git
a/src/game.c
b/src/game.c
index 491d4e9b541be0f3ca1ab48423f3ac1e16965719..e906d2362d832236cd08b141d0f48dd7a06a8fbe 100644
(file)
--- 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 a3e5306835f7082e83a21f22c3dc053f13f5257d..ebcb47305133d67876d167c04b9d604aa6e40ff8 100644
(file)
--- 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;