rnd-20020930-2-src
[rocksndiamonds.git] / src / game.c
index beabbab2c66cc25bfe2240049930da7695b19b66..56cb38b2a363d17f719130ff276301cc5b8ef44f 100644 (file)
@@ -294,10 +294,6 @@ static void InitField(int x, int y, boolean init_game)
        }
       }
       /* no break! */
-    case EL_PLAYER:
-      if (init_game)
-       Feld[x][y] = EL_PLAYER1;
-      /* no break! */
     case EL_PLAYER1:
     case EL_PLAYER2:
     case EL_PLAYER3:
@@ -673,12 +669,14 @@ void InitGame()
 
   InitGameEngine();
 
+#if 0
 #if DEBUG
 #if USE_NEW_AMOEBA_CODE
   printf("Using new amoeba code.\n");
 #else
   printf("Using old amoeba code.\n");
 #endif
+#endif
 #endif
 
   /* don't play tapes over network */
@@ -797,6 +795,7 @@ void InitGame()
       MovPos[x][y] = MovDir[x][y] = MovDelay[x][y] = 0;
       Store[x][y] = Store2[x][y] = StorePlayer[x][y] = 0;
       Frame[x][y] = 0;
+      GfxAction[x][y] = GFX_ACTION_DEFAULT;
       AmoebaNr[x][y] = 0;
       JustStopped[x][y] = 0;
       Stop[x][y] = FALSE;
@@ -1215,7 +1214,7 @@ void GameWon()
 #endif
 
   /* Hero disappears */
-  DrawLevelField(ExitX, ExitY);
+  DrawNewLevelField(ExitX, ExitY);
   BackToFront();
 
   if (tape.playing)
@@ -1331,8 +1330,11 @@ void InitMovingField(int x, int y, int direction)
 
   MovDir[x][y] = direction;
   MovDir[newx][newy] = direction;
+
   if (Feld[newx][newy] == EL_EMPTY)
     Feld[newx][newy] = EL_BLOCKED;
+
+  GfxAction[x][y] = GFX_ACTION_MOVING;
 }
 
 void Moving2Blocked(int x, int y, int *goes_to_x, int *goes_to_y)
@@ -1443,22 +1445,31 @@ void RemoveMovingField(int x, int y)
   Feld[newx][newy] = EL_EMPTY;
   MovPos[oldx][oldy] = MovDir[oldx][oldy] = MovDelay[oldx][oldy] = 0;
   MovPos[newx][newy] = MovDir[newx][newy] = MovDelay[newx][newy] = 0;
+  GfxAction[oldx][oldy] = GfxAction[newx][newy] = GFX_ACTION_DEFAULT;
 
-  DrawLevelField(oldx, oldy);
-  DrawLevelField(newx, newy);
+  DrawNewLevelField(oldx, oldy);
+  DrawNewLevelField(newx, newy);
 }
 
 void DrawDynamite(int x, int y)
 {
   int sx = SCREENX(x), sy = SCREENY(y);
+#if 0
   int graphic = el2gfx(Feld[x][y]);
+#else
+  int graphic = el2img(Feld[x][y]);
+#endif
   int phase;
 
   if (!IN_SCR_FIELD(sx, sy) || IS_PLAYER(x, y))
     return;
 
   if (Store[x][y])
+#if 0
     DrawGraphic(sx, sy, el2gfx(Store[x][y]));
+#else
+    DrawNewGraphic(sx, sy, el2img(Store[x][y]), 0);
+#endif
 
   if (Feld[x][y] == EL_DYNAMITE_ACTIVE)
   {
@@ -1471,12 +1482,29 @@ void DrawDynamite(int x, int y)
       phase = 7 - phase;
   }
 
+#if 1
+  phase = getNewGraphicAnimationFrame(graphic, 96 - MovDelay[x][y]);
+#endif
+
+  /*
+  printf("-> %d: %d [%d]\n", graphic, phase, MovDelay[x][y]);
+  */
+
+#if 0
   if (game.emulation == EMU_SUPAPLEX)
     DrawGraphic(sx, sy, GFX_SP_DISK_RED);
   else if (Store[x][y])
     DrawGraphicThruMask(sx, sy, graphic + phase);
   else
     DrawGraphic(sx, sy, graphic + phase);
+#else
+  if (game.emulation == EMU_SUPAPLEX)
+    DrawNewGraphic(sx, sy, IMG_SP_DISK_RED, 0);
+  else if (Store[x][y])
+    DrawNewGraphicThruMask(sx, sy, graphic, phase);
+  else
+    DrawNewGraphic(sx, sy, graphic, phase);
+#endif
 }
 
 void CheckDynamite(int x, int y)
@@ -1552,7 +1580,7 @@ void Explode(int ex, int ey, int phase, int mode)
        RemoveMovingField(x, y);
       }
 
-      if (IS_MASSIVE(element) || element == EL_DRAGON_FIRE)
+      if (IS_MASSIVE(element) || element == EL_FLAMES)
        continue;
 
       if (IS_PLAYER(x, y) && SHIELD_ON(PLAYERINFO(x, y)))
@@ -1741,7 +1769,7 @@ void DynaExplode(int ex, int ey)
 
   if (IS_ACTIVE_BOMB(Feld[ex][ey]))
   {
-    player = &stored_player[Feld[ex][ey] - EL_DYNABOMB_ACTIVE_1];
+    player = &stored_player[Feld[ex][ey] - EL_DYNABOMB_PLAYER1_ACTIVE];
     dynabomb_size = player->dynabomb_size;
     dynabomb_xl = player->dynabomb_xl;
     player->dynabombs_left++;
@@ -1805,10 +1833,10 @@ void Bang(int x, int y)
       RaiseScoreElement(element);
       Explode(x, y, EX_PHASE_START, EX_NORMAL);
       break;
-    case EL_DYNABOMB_ACTIVE_1:
-    case EL_DYNABOMB_ACTIVE_2:
-    case EL_DYNABOMB_ACTIVE_3:
-    case EL_DYNABOMB_ACTIVE_4:
+    case EL_DYNABOMB_PLAYER1_ACTIVE:
+    case EL_DYNABOMB_PLAYER2_ACTIVE:
+    case EL_DYNABOMB_PLAYER3_ACTIVE:
+    case EL_DYNABOMB_PLAYER4_ACTIVE:
     case EL_DYNABOMB_NR:
     case EL_DYNABOMB_SZ:
     case EL_DYNABOMB_XL:
@@ -1996,6 +2024,20 @@ static void ToggleSwitchgateSwitch(int x, int y)
   }
 }
 
+static int getInvisibleActiveFromInvisibleElement(int element)
+{
+  return (element == EL_INVISIBLE_STEELWALL ? EL_INVISIBLE_STEELWALL_ACTIVE :
+         element == EL_INVISIBLE_WALL      ? EL_INVISIBLE_WALL_ACTIVE :
+         EL_INVISIBLE_SAND_ACTIVE);
+}
+
+static int getInvisibleFromInvisibleActiveElement(int element)
+{
+  return (element == EL_INVISIBLE_STEELWALL_ACTIVE ? EL_INVISIBLE_STEELWALL :
+         element == EL_INVISIBLE_WALL_ACTIVE      ? EL_INVISIBLE_WALL :
+         EL_INVISIBLE_SAND);
+}
+
 static void RedrawAllLightSwitchesAndInvisibleElements()
 {
   int x, y;
@@ -2018,11 +2060,24 @@ static void RedrawAllLightSwitchesAndInvisibleElements()
        Feld[x][y] = EL_LIGHT_SWITCH;
        DrawLevelField(x, y);
       }
+      else if (element == EL_INVISIBLE_STEELWALL ||
+              element == EL_INVISIBLE_WALL ||
+              element == EL_INVISIBLE_SAND)
+      {
+       if (game.light_time_left > 0)
+         Feld[x][y] = getInvisibleActiveFromInvisibleElement(element);
 
-      if (element == EL_INVISIBLE_STEELWALL ||
-         element == EL_INVISIBLE_WALL ||
-         element == EL_INVISIBLE_SAND)
        DrawLevelField(x, y);
+      }
+      else if (element == EL_INVISIBLE_STEELWALL_ACTIVE ||
+              element == EL_INVISIBLE_WALL_ACTIVE ||
+              element == EL_INVISIBLE_SAND_ACTIVE)
+      {
+       if (game.light_time_left == 0)
+         Feld[x][y] = getInvisibleFromInvisibleActiveElement(element);
+
+       DrawLevelField(x, y);
+      }
     }
   }
 }
@@ -2698,6 +2753,8 @@ void StartMoving(int x, int y)
   if (Stop[x][y])
     return;
 
+  GfxAction[x][y] = GFX_ACTION_DEFAULT;
+
   if (CAN_FALL(element) && y<lev_fieldy-1)
   {
     if ((x>0 && IS_PLAYER(x-1, y)) || (x<lev_fieldx-1 && IS_PLAYER(x+1, y)))
@@ -2886,16 +2943,11 @@ void StartMoving(int x, int y)
        TurnRound(x, y);
 
        if (MovDelay[x][y] && (element == EL_BUG ||
-                              element == EL_SPACESHIP ||
-                              element == EL_SP_SNIKSNAK ||
-                              element == EL_SP_ELECTRON))
-         DrawNewLevelField(x, y);
-       else if (MovDelay[x][y] && (element == EL_BUG ||
                               element == EL_SPACESHIP ||
                               element == EL_SP_SNIKSNAK ||
                               element == EL_SP_ELECTRON ||
                               element == EL_MOLE))
-         DrawLevelField(x, y);
+         DrawNewLevelField(x, y);
       }
     }
 
@@ -2923,7 +2975,7 @@ void StartMoving(int x, int y)
        }
       }
       else if (element == EL_SP_ELECTRON)
-       DrawGraphicAnimation(x, y, GFX2_SP_ELECTRON, 8, 2, ANIM_NORMAL);
+       DrawGraphicAnimation(x, y, GFX2_SP_ELECTRON, 8, 2, ANIM_LOOP);
       else if (element == EL_DRAGON)
       {
        int i;
@@ -2954,13 +3006,13 @@ void StartMoving(int x, int y)
            else
              RemoveMovingField(xx, yy);
 
-           Feld[xx][yy] = EL_DRAGON_FIRE;
+           Feld[xx][yy] = EL_FLAMES;
            if (IN_SCR_FIELD(sx, sy))
              DrawGraphic(sx, sy, graphic + phase*3 + i-1);
          }
          else
          {
-           if (Feld[xx][yy] == EL_DRAGON_FIRE)
+           if (Feld[xx][yy] == EL_FLAMES)
              Feld[xx][yy] = EL_EMPTY;
            DrawLevelField(xx, yy);
          }
@@ -3007,7 +3059,7 @@ void StartMoving(int x, int y)
       if (Feld[newx][newy] == EL_EXIT_OPEN)
       {
        Feld[x][y] = EL_EMPTY;
-       DrawLevelField(x, y);
+       DrawNewLevelField(x, y);
 
        PlaySoundLevel(newx, newy, SND_PENGUIN_PASSING_EXIT);
        if (IN_SCR_FIELD(SCREENX(newx), SCREENY(newy)))
@@ -3023,7 +3075,7 @@ void StartMoving(int x, int y)
       else if (IS_MAMPF3(Feld[newx][newy]))
       {
        if (DigField(local_player, newx, newy, 0, 0, DF_DIG) == MF_MOVING)
-         DrawLevelField(newx, newy);
+         DrawNewLevelField(newx, newy);
        else
          MovDir[x][y] = MV_NO_MOVING;
       }
@@ -3032,7 +3084,7 @@ void StartMoving(int x, int y)
        if (IS_PLAYER(x, y))
          DrawPlayerField(x, y);
        else
-         DrawLevelField(x, y);
+         DrawNewLevelField(x, y);
        return;
       }
     }
@@ -3045,7 +3097,7 @@ void StartMoving(int x, int y)
        else
        {
          Feld[newx][newy] = EL_EMPTY;
-         DrawLevelField(newx, newy);
+         DrawNewLevelField(newx, newy);
        }
 
        PlaySoundLevel(x, y, SND_PIG_EATING);
@@ -3055,7 +3107,7 @@ void StartMoving(int x, int y)
        if (IS_PLAYER(x, y))
          DrawPlayerField(x, y);
        else
-         DrawLevelField(x, y);
+         DrawNewLevelField(x, y);
        return;
       }
     }
@@ -3066,7 +3118,7 @@ void StartMoving(int x, int y)
        if (IS_PLAYER(x, y))
          DrawPlayerField(x, y);
        else
-         DrawLevelField(x, y);
+         DrawNewLevelField(x, y);
        return;
       }
       else
@@ -3082,21 +3134,21 @@ void StartMoving(int x, int y)
 
        if ((wanna_flame || IS_ENEMY(element1) || IS_ENEMY(element2)) &&
            element1 != EL_DRAGON && element2 != EL_DRAGON &&
-           element1 != EL_DRAGON_FIRE && element2 != EL_DRAGON_FIRE)
+           element1 != EL_FLAMES && element2 != EL_FLAMES)
        {
          if (IS_PLAYER(x, y))
            DrawPlayerField(x, y);
          else
-           DrawLevelField(x, y);
+           DrawNewLevelField(x, y);
 
          PlaySoundLevel(x, y, SND_DRAGON_ATTACKING);
 
          MovDelay[x][y] = 50;
-         Feld[newx][newy] = EL_DRAGON_FIRE;
+         Feld[newx][newy] = EL_FLAMES;
          if (IN_LEV_FIELD(newx1, newy1) && Feld[newx1][newy1] == EL_EMPTY)
-           Feld[newx1][newy1] = EL_DRAGON_FIRE;
+           Feld[newx1][newy1] = EL_FLAMES;
          if (IN_LEV_FIELD(newx2, newy2) && Feld[newx2][newy2] == EL_EMPTY)
-           Feld[newx2][newy2] = EL_DRAGON_FIRE;
+           Feld[newx2][newy2] = EL_FLAMES;
          return;
        }
       }
@@ -3109,7 +3161,7 @@ void StartMoving(int x, int y)
       else
       {
        Feld[newx][newy] = EL_EMPTY;
-       DrawLevelField(newx, newy);
+       DrawNewLevelField(newx, newy);
       }
 
       PlaySoundLevel(x, y, SND_YAMYAM_EATING);
@@ -3130,7 +3182,7 @@ void StartMoving(int x, int y)
       else
       {
        Feld[newx][newy] = EL_EMPTY;
-       DrawLevelField(newx, newy);
+       DrawNewLevelField(newx, newy);
       }
 
       PlaySoundLevel(x, y, SND_DARK_YAMYAM_EATING);
@@ -3182,26 +3234,26 @@ void StartMoving(int x, int y)
 #endif
       else if (element == EL_BUG || element == EL_SPACESHIP ||
               element == EL_SP_SNIKSNAK || element == EL_MOLE)
-#if 1
+#if 0
        DrawLevelField(x, y);
 #else
        DrawNewLevelField(x, y);
 #endif
       else if (element == EL_BD_BUTTERFLY || element == EL_BD_FIREFLY)
 #if 0
-       DrawGraphicAnimation(x, y, el2gfx(element), 2, 4, ANIM_NORMAL);
+       DrawGraphicAnimation(x, y, el2gfx(element), 2, 4, ANIM_LOOP);
 #else
        DrawNewGraphicAnimation(x, y, el2img(element));
 #endif
       else if (element == EL_SATELLITE)
 #if 0
-       DrawGraphicAnimation(x, y, GFX_SONDE_START, 8, 2, ANIM_NORMAL);
+       DrawGraphicAnimation(x, y, GFX_SONDE_START, 8, 2, ANIM_LOOP);
 #else
        DrawNewGraphicAnimation(x, y, IMG_SATELLITE);
 #endif
       else if (element == EL_SP_ELECTRON)
 #if 0
-       DrawGraphicAnimation(x, y, GFX2_SP_ELECTRON, 8, 2, ANIM_NORMAL);
+       DrawGraphicAnimation(x, y, GFX2_SP_ELECTRON, 8, 2, ANIM_LOOP);
 #else
        DrawNewGraphicAnimation(x, y, IMG_SP_ELECTRON);
 #endif
@@ -3273,7 +3325,7 @@ void ContinueMoving(int x, int y)
       };
 
       Feld[x][y] = EL_SAND;
-      DrawLevelField(x, y);
+      DrawNewLevelField(x, y);
 
       for(i=0; i<4; i++)
       {
@@ -3283,7 +3335,7 @@ void ContinueMoving(int x, int y)
        yy = y + xy[i][1];
 
        if (IN_LEV_FIELD(xx, yy) && Feld[xx][yy] == EL_SAND)
-         DrawLevelField(xx, yy);       /* for "ErdreichAnbroeckeln()" */
+         DrawNewLevelField(xx, yy);    /* for "ErdreichAnbroeckeln()" */
       }
     }
 
@@ -3339,21 +3391,14 @@ void ContinueMoving(int x, int y)
     MovPos[x][y] = MovDir[x][y] = MovDelay[x][y] = 0;
     MovDelay[newx][newy] = 0;
 
+    GfxAction[newx][newy] = GfxAction[x][y];   /* keep action one frame */
+    GfxAction[x][y] = GFX_ACTION_DEFAULT;
+
     if (!CAN_MOVE(element))
       MovDir[newx][newy] = 0;
 
-    if (element == EL_BUG || element == EL_SPACESHIP ||
-       element == EL_SP_SNIKSNAK || element == EL_PACMAN ||
-       element == EL_SP_ELECTRON)
-    {
-      DrawNewLevelField(x, y);
-      DrawNewLevelField(newx, newy);
-    }
-    else
-    {
-      DrawLevelField(x, y);
-      DrawLevelField(newx, newy);
-    }
+    DrawNewLevelField(x, y);
+    DrawNewLevelField(newx, newy);
 
     Stop[newx][newy] = TRUE;
     JustStopped[newx][newy] = 3;
@@ -3373,12 +3418,10 @@ void ContinueMoving(int x, int y)
   }
   else                         /* still moving on */
   {
-    if (element == EL_BUG || element == EL_SPACESHIP ||
-       element == EL_SP_SNIKSNAK || element == EL_PACMAN ||
-       element == EL_SP_ELECTRON)
-      DrawNewLevelField(x, y);
-    else
-      DrawLevelField(x, y);
+    if (GfxAction[x][y] == GFX_ACTION_DEFAULT)
+      GfxAction[x][y] = GFX_ACTION_MOVING;
+
+    DrawNewLevelField(x, y);
   }
 }
 
@@ -3898,7 +3941,7 @@ void Blubber(int x, int y)
   if (y > 0 && IS_MOVING(x, y-1) && MovDir[x][y-1] == MV_DOWN)
     DrawLevelField(x, y-1);
   else
-    DrawGraphicAnimation(x, y, GFX_GEBLUBBER, 4, 10, ANIM_NORMAL);
+    DrawGraphicAnimation(x, y, GFX_GEBLUBBER, 4, 10, ANIM_LOOP);
 }
 
 void NussKnacken(int x, int y)
@@ -4334,7 +4377,7 @@ void CheckForDragon(int x, int y)
       int xx = x + j*xy[i][0], yy = y + j*xy[i][1];
 
       if (IN_LEV_FIELD(xx, yy) &&
-         (Feld[xx][yy] == EL_DRAGON_FIRE || Feld[xx][yy] == EL_DRAGON))
+         (Feld[xx][yy] == EL_FLAMES || Feld[xx][yy] == EL_DRAGON))
       {
        if (Feld[xx][yy] == EL_DRAGON)
          dragon_found = TRUE;
@@ -4352,7 +4395,7 @@ void CheckForDragon(int x, int y)
       {
        int xx = x + j*xy[i][0], yy = y + j*xy[i][1];
   
-       if (IN_LEV_FIELD(xx, yy) && Feld[xx][yy] == EL_DRAGON_FIRE)
+       if (IN_LEV_FIELD(xx, yy) && Feld[xx][yy] == EL_FLAMES)
        {
          Feld[xx][yy] = EL_EMPTY;
          DrawLevelField(xx, yy);
@@ -4490,7 +4533,7 @@ static void DrawBeltAnimation(int x, int y, int element)
   if (belt_dir != MV_NO_MOVING)
   {
     int delay = 2;
-    int mode = (belt_dir == MV_LEFT ? ANIM_NORMAL : ANIM_REVERSE);
+    int mode = ANIM_LOOP | (belt_dir == MV_LEFT ? 0 : ANIM_REVERSE);
     int graphic = el2gfx(element) + (belt_dir == MV_LEFT ? 0 : 7);
 
     DrawGraphicAnimation(x, y, graphic, 8, delay, mode);
@@ -4841,17 +4884,17 @@ void GameActions()
             element == EL_WALL_GROWING_Y ||
             element == EL_WALL_GROWING_XY)
       MauerAbleger(x, y);
-    else if (element == EL_DRAGON_FIRE)
+    else if (element == EL_FLAMES)
       CheckForDragon(x, y);
     else if (element == EL_SP_BUGGY_BASE || element == EL_SP_BUGGY_BASE_ACTIVE)
       CheckBuggyBase(x, y);
     else if (element == EL_TRAP || element == EL_TRAP_ACTIVE)
       CheckTrap(x, y);
     else if (element == EL_SP_TERMINAL)
-      DrawGraphicAnimation(x, y, GFX2_SP_TERMINAL, 7, 12, ANIM_NORMAL);
+      DrawGraphicAnimation(x, y, GFX2_SP_TERMINAL, 7, 12, ANIM_LOOP);
     else if (element == EL_SP_TERMINAL_ACTIVE)
     {
-      DrawGraphicAnimation(x, y, GFX2_SP_TERMINAL_ACTIVE, 7, 4, ANIM_NORMAL);
+      DrawGraphicAnimation(x, y, GFX2_SP_TERMINAL_ACTIVE, 7, 4, ANIM_LOOP);
 #if 0
       if (!(FrameCounter % 4))
        PlaySoundLevel(x, y, SND_SP_TERMINAL_ACTIVE);
@@ -4868,10 +4911,10 @@ void GameActions()
     else if (element == EL_TIMEGATE_CLOSING)
       CloseTimegate(x, y);
     else if (element == EL_EXTRA_TIME)
-      DrawGraphicAnimation(x, y, GFX_EXTRA_TIME, 6, 4, ANIM_NORMAL);
+      DrawGraphicAnimation(x, y, GFX_EXTRA_TIME, 6, 4, ANIM_LOOP);
     else if (element == EL_SHIELD_NORMAL)
     {
-      DrawGraphicAnimation(x, y, GFX_SHIELD_PASSIVE, 6, 4, ANIM_NORMAL);
+      DrawGraphicAnimation(x, y, GFX_SHIELD_PASSIVE, 6, 4, ANIM_LOOP);
 #if 0
       if (!(FrameCounter % 4))
        PlaySoundLevel(x, y, SND_SHIELD_PASSIVE_ACTIVATED);
@@ -4879,7 +4922,7 @@ void GameActions()
     }
     else if (element == EL_SHIELD_DEADLY)
     {
-      DrawGraphicAnimation(x, y, GFX_SHIELD_ACTIVE, 6, 4, ANIM_NORMAL);
+      DrawGraphicAnimation(x, y, GFX_SHIELD_ACTIVE, 6, 4, ANIM_LOOP);
 #if 0
       if (!(FrameCounter % 4))
        PlaySoundLevel(x, y, SND_SHIELD_DEADLY_ACTIVE);
@@ -5021,22 +5064,7 @@ void GameActions()
     game.light_time_left--;
 
     if (game.light_time_left == 0)
-    {
-      for (y=0; y<lev_fieldy; y++) for (x=0; x<lev_fieldx; x++)
-      {
-       element = Feld[x][y];
-
-       if (element == EL_LIGHT_SWITCH_ACTIVE)
-       {
-         Feld[x][y] = EL_LIGHT_SWITCH;
-         DrawLevelField(x, y);
-       }
-       else if (element == EL_INVISIBLE_STEELWALL ||
-                element == EL_INVISIBLE_WALL ||
-                element == EL_INVISIBLE_SAND)
-         DrawLevelField(x, y);
-      }
-    }
+      RedrawAllLightSwitchesAndInvisibleElements();
   }
 
   if (game.timegate_time_left > 0)
@@ -5249,7 +5277,7 @@ boolean MoveFigureOneStep(struct PlayerInfo *player,
     if (element == EL_ACID && dx == 0 && dy == 1)
     {
       Blurb(jx, jy);
-      Feld[jx][jy] = EL_PLAYER;
+      Feld[jx][jy] = EL_PLAYER1;
       InitMovingField(jx, jy, MV_DOWN);
       Store[jx][jy] = EL_ACID;
       ContinueMoving(jx, jy);
@@ -5885,6 +5913,7 @@ int DigField(struct PlayerInfo *player,
     case EL_EMPTY:
     case EL_SAND:
     case EL_INVISIBLE_SAND:
+    case EL_INVISIBLE_SAND_ACTIVE:
     case EL_TRAP:
     case EL_SP_BASE:
     case EL_SP_BUGGY_BASE:
@@ -6542,7 +6571,8 @@ boolean PlaceBomb(struct PlayerInfo *player)
   }
   else
   {
-    Feld[jx][jy] = EL_DYNABOMB_ACTIVE_1 + (player->element_nr - EL_PLAYER1);
+    Feld[jx][jy] =
+      EL_DYNABOMB_PLAYER1_ACTIVE + (player->element_nr - EL_PLAYER1);
     MovDelay[jx][jy] = 96;
     player->dynabombs_left--;
     if (IN_SCR_FIELD(SCREENX(jx), SCREENY(jy)))