rnd-20010122-2-src
authorHolger Schemel <info@artsoft.org>
Mon, 22 Jan 2001 18:44:14 +0000 (19:44 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:35:56 +0000 (10:35 +0200)
src/game.c
src/tools.c

index d97223df2d51350d88ea3ade8ebdcdb3de0dd6e1..2a17a15f648d92cb31acaf01aef253a267d439c2 100644 (file)
@@ -1463,6 +1463,9 @@ void Explode(int ex, int ey, int phase, int mode)
     if (CAN_MOVE(element) || COULD_MOVE(element))
       InitMovDir(x, y);
     DrawLevelField(x, y);
+
+    if (IS_PLAYER(x, y) && !PLAYERINFO(x,y)->present)
+      StorePlayer[x][y] = 0;
   }
   else if (!(phase % delay) && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
   {
@@ -1476,7 +1479,15 @@ void Explode(int ex, int ey, int phase, int mode)
     if (phase == delay)
       ErdreichAnbroeckeln(SCREENX(x), SCREENY(y));
 
-    DrawGraphic(SCREENX(x), SCREENY(y), graphic + (phase / delay - 1));
+    graphic += (phase / delay - 1);
+
+    if (IS_PFORTE(Store[x][y]))
+    {
+      DrawLevelElement(x, y, Store[x][y]);
+      DrawGraphicThruMask(SCREENX(x), SCREENY(y), graphic);
+    }
+    else
+      DrawGraphic(SCREENX(x), SCREENY(y), graphic);
   }
 }
 
@@ -4443,7 +4454,7 @@ void GameActions()
       AmoebeWaechst(x, y);
     else if (element == EL_DEAMOEBING)
       AmoebeSchrumpft(x, y);
-#if 1
+#if 0
     else if (IS_AMOEBALIVE(element))
       AmoebeAbleger(x, y);
 #endif
@@ -4530,7 +4541,7 @@ void GameActions()
     }
   }
 
-#if 0
+#if 1
   /* new experimental amoeba growth stuff*/
 #if 1
   if (!(FrameCounter % 8))
@@ -4538,9 +4549,9 @@ void GameActions()
   {
     static unsigned long random = 1684108901;
 
-    for (i = 0; i < level.amoeba_speed * 4; i++)
+    for (i = 0; i < level.amoeba_speed * 28 / 8; i++)
     {
-#if 1
+#if 0
       x = (random >> 10) % lev_fieldx;
       y = (random >> 20) % lev_fieldy;
 #else
@@ -5337,7 +5348,8 @@ void RemoveHero(struct PlayerInfo *player)
   player->present = FALSE;
   player->active = FALSE;
 
-  StorePlayer[jx][jy] = 0;
+  if (!ExplodeField[jx][jy])
+    StorePlayer[jx][jy] = 0;
 
   for (i=0; i<MAX_PLAYERS; i++)
     if (stored_player[i].active)
index 05d2610d5ce7ec003a93db7e1864334dbcdb4dbb..d467fcdab02194e28c0b98fe18be6567f47da3ba 100644 (file)
@@ -434,7 +434,10 @@ void DrawPlayer(struct PlayerInfo *player)
     if (Store[last_jx][last_jy] && IS_DRAWABLE(last_element))
     {
       DrawLevelElement(last_jx, last_jy, Store[last_jx][last_jy]);
-      DrawLevelFieldThruMask(last_jx, last_jy);
+      if (last_element == EL_DYNAMITE_ACTIVE)
+       DrawDynamite(last_jx, last_jy);
+      else
+       DrawLevelFieldThruMask(last_jx, last_jy);
     }
     else if (last_element == EL_DYNAMITE_ACTIVE)
       DrawDynamite(last_jx, last_jy);
@@ -467,6 +470,8 @@ void DrawPlayer(struct PlayerInfo *player)
     DrawLevelElement(jx, jy, Store[jx][jy]);
   else if (!IS_ACTIVE_BOMB(element))
     DrawLevelField(jx, jy);
+  else
+    DrawLevelElement(jx, jy, EL_LEERRAUM);
 
   /* draw player himself */