rnd-20021118-1-src
authorHolger Schemel <info@artsoft.org>
Mon, 18 Nov 2002 20:57:17 +0000 (21:57 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:39:00 +0000 (10:39 +0200)
src/conftime.h
src/game.c
src/main.c
src/tools.c

index 5c3b0058fed6239363fda42c774faad4e6f2b819..4a60f3ecd03e83b38c40a13287facaa9c08d04c8 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2002-11-17 04:09]"
+#define COMPILE_DATE_STRING "[2002-11-18 21:55]"
index 32ee2ac3ef708231db380c2366b3e21577bb72c4..452e581ff5f6b0c46d0a11f9aeeed56b9309c49b 100644 (file)
@@ -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));
index 364cedcde6db75c423e4279e78e9d073e432f336..e21d19c5fb55ee28d2c07f69bb16449d65198c80 100644 (file)
@@ -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"                     },
index 493213367b73499b7da2075f98603ee8dde095e4..fa883f4ca3be24822e9c4731c140850a4d23d49e 100644 (file)
@@ -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);
   }