From: Holger Schemel Date: Mon, 18 Nov 2002 20:57:17 +0000 (+0100) Subject: rnd-20021118-1-src X-Git-Tag: 3.0.0^2~214 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=e44b29a71f573c44380ed1ed0bf118981f8119c8 rnd-20021118-1-src --- diff --git a/src/conftime.h b/src/conftime.h index 5c3b0058..4a60f3ec 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2002-11-17 04:09]" +#define COMPILE_DATE_STRING "[2002-11-18 21:55]" diff --git a/src/game.c b/src/game.c index 32ee2ac3..452e581f 100644 --- a/src/game.c +++ b/src/game.c @@ -1706,15 +1706,13 @@ void Explode(int ex, int ey, int phase, int mode) if (IS_PLAYER(x, y) && !PLAYERINFO(x,y)->present) StorePlayer[x][y] = 0; } - else if (!(phase % delay) && IN_SCR_FIELD(SCREENX(x), SCREENY(y))) + else if (phase >= delay && IN_SCR_FIELD(SCREENX(x), SCREENY(y))) { - int graphic = IMG_EXPLOSION; - int frame = (phase / delay - 1); - - if (game.emulation == EMU_SUPAPLEX) - graphic = (Store[x][y] == EL_SP_INFOTRON ? - IMG_SP_EXPLOSION_INFOTRON : - IMG_SP_EXPLOSION); + int stored = Store[x][y]; + int graphic = (game.emulation != EMU_SUPAPLEX ? IMG_EXPLOSION : + stored == EL_SP_INFOTRON ? IMG_SP_EXPLOSION_INFOTRON : + IMG_SP_EXPLOSION); + int frame = getGraphicAnimationFrame(graphic, phase - delay); if (phase == delay) DrawCrumbledSand(SCREENX(x), SCREENY(y)); diff --git a/src/main.c b/src/main.c index 364cedcd..e21d19c5 100644 --- a/src/main.c +++ b/src/main.c @@ -2555,6 +2555,8 @@ struct ConfigInfo image_config[] = { "explosion.xpos", "0" }, { "explosion.ypos", "4" }, { "explosion.frames", "8" }, + { "explosion.delay", "2" }, + { "explosion.global_sync", "0" }, { "twinkle_blue", "RocksHeroes.pcx" }, { "twinkle_blue.xpos", "9" }, diff --git a/src/tools.c b/src/tools.c index 49321336..fa883f4c 100644 --- a/src/tools.c +++ b/src/tools.c @@ -700,17 +700,15 @@ void DrawPlayer(struct PlayerInfo *player) if (player_is_moving && last_element == EL_EXPLOSION) { - int graphic = IMG_EXPLOSION; - int phase = Frame[last_jx][last_jy] - 1; + int stored = Store[last_jx][last_jy]; + int graphic = (game.emulation != EMU_SUPAPLEX ? IMG_EXPLOSION : + stored == EL_SP_INFOTRON ? IMG_SP_EXPLOSION_INFOTRON : + IMG_SP_EXPLOSION); int delay = (game.emulation == EMU_SUPAPLEX ? 3 : 2); - int frame = (phase / delay - 1); - - if (game.emulation == EMU_SUPAPLEX) - graphic = (Store[last_jx][last_jy] == EL_SP_INFOTRON ? - IMG_SP_EXPLOSION_INFOTRON : - IMG_SP_EXPLOSION); + int phase = Frame[last_jx][last_jy] - 1; + int frame = getGraphicAnimationFrame(graphic, phase - delay); - if (frame >= 0) + if (phase >= delay) DrawGraphicThruMask(SCREENX(last_jx), SCREENY(last_jy), graphic, frame); }