rnd-19990809-1-src
authorHolger Schemel <info@artsoft.org>
Sun, 8 Aug 1999 22:27:56 +0000 (00:27 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:34:08 +0000 (10:34 +0200)
src/editor.c
src/game.c
src/init.c
src/main.c
src/main.h
src/tools.c

index 5fb13e1ee035bc9056ea69a6cfa87fdadea0245b..c5af969143ec21a9a05e40af956e5f4548ff08eb 100644 (file)
@@ -1056,6 +1056,21 @@ int editor_element[] =
   EL_BELT3_SWITCH_R,
   EL_BELT4_SWITCH_R,
 
+  EL_SWITCHGATE_OPEN,
+  EL_SWITCHGATE_CLOSED,
+  EL_SWITCHGATE_SWITCH_1,
+  EL_ENVELOPE,
+
+  EL_LANDMINE,
+  EL_SAND_INVISIBLE,
+  EL_STEEL_SLANTED,
+  EL_LEERRAUM,
+
+  EL_SIGN_EXCLAMATION,
+  EL_SIGN_STOP,
+  EL_LIGHT_SWITCH_OFF,
+  EL_LIGHT_SWITCH_ON,
+
   /*
   EL_CHAR('D'),
   EL_CHAR('Y'),
index 2fd57d065386332b48ac485ef92cf707fec8edd2..a9c903cceb5bab85072c08f8cb43cf9fcb632eea 100644 (file)
@@ -394,6 +394,18 @@ static void InitField(int x, int y, boolean init_game)
          Feld[x][y] = Feld[x][y] - belt_dir_nr + game.belt_dir_nr[belt_nr];
        }
       }
+      break;
+
+    case EL_SWITCHGATE_SWITCH_2:       /* always start with same switch pos */
+      if (init_game)
+       Feld[x][y] = EL_SWITCHGATE_SWITCH_1;
+      break;
+
+    case EL_LIGHT_SWITCH_ON:
+      if (init_game)
+       game.light_time_left = 10 * FRAMES_PER_SECOND;
+      break;
+
     default:
       break;
   }
@@ -495,10 +507,12 @@ void InitGame()
   AllPlayersGone = FALSE;
   game.magic_wall_active = FALSE;
   game.magic_wall_time_left = 0;
+  game.switchgate_pos = 0;
+  game.light_time_left = 0;
   for (i=0; i<4; i++)
   {
     game.belt_dir[i] = MV_NO_MOVING;
-    game.belt_dir_nr[i] = 3;           /* no moving, next switch left */
+    game.belt_dir_nr[i] = 3;           /* not moving, next moving left */
   }
 
   for (i=0; i<MAX_NUM_AMOEBA; i++)
@@ -533,6 +547,11 @@ void InitGame()
     }
   }
 
+  /* correct non-moving belts to start moving left */
+  for (i=0; i<4; i++)
+    if (game.belt_dir[i] == MV_NO_MOVING)
+      game.belt_dir_nr[i] = 3;         /* not moving, next moving left */
+
   /* check if any connected player was not found in playfield */
   for (i=0; i<MAX_PLAYERS; i++)
   {
@@ -3164,6 +3183,54 @@ void AusgangstuerBlinken(int x, int y)
   DrawGraphicAnimation(x, y, GFX_AUSGANG_AUF, 4, 4, ANIM_OSCILLATE);
 }
 
+void OpenSwitchgate(int x, int y)
+{
+  int delay = 6;
+
+  if (!MovDelay[x][y])         /* next animation frame */
+    MovDelay[x][y] = 5 * delay;
+
+  if (MovDelay[x][y])          /* wait some time before next frame */
+  {
+    int phase;
+
+    MovDelay[x][y]--;
+    phase = MovDelay[x][y] / delay;
+    if (!(MovDelay[x][y] % delay) && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
+      DrawGraphic(SCREENX(x), SCREENY(y), GFX_SWITCHGATE_OPEN - phase);
+
+    if (!MovDelay[x][y])
+    {
+      Feld[x][y] = EL_SWITCHGATE_OPEN;
+      DrawLevelField(x, y);
+    }
+  }
+}
+
+void CloseSwitchgate(int x, int y)
+{
+  int delay = 6;
+
+  if (!MovDelay[x][y])         /* next animation frame */
+    MovDelay[x][y] = 5 * delay;
+
+  if (MovDelay[x][y])          /* wait some time before next frame */
+  {
+    int phase;
+
+    MovDelay[x][y]--;
+    phase = MovDelay[x][y] / delay;
+    if (!(MovDelay[x][y] % delay) && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
+      DrawGraphic(SCREENX(x), SCREENY(y), GFX_SWITCHGATE_CLOSED + phase);
+
+    if (!MovDelay[x][y])
+    {
+      Feld[x][y] = EL_SWITCHGATE_CLOSED;
+      DrawLevelField(x, y);
+    }
+  }
+}
+
 void EdelsteinFunkeln(int x, int y)
 {
   if (!IN_SCR_FIELD(SCREENX(x), SCREENY(y)) || IS_MOVING(x, y))
@@ -3762,6 +3829,10 @@ void GameActions()
       DrawGraphicAnimation(x, y, GFX2_SP_TERMINAL_ACTIVE, 7, 4, ANIM_NORMAL);
     else if (IS_BELT(element))
       DrawBeltAnimation(x, y, element);
+    else if (element == EL_SWITCHGATE_OPENING)
+      OpenSwitchgate(x, y);
+    else if (element == EL_SWITCHGATE_CLOSING)
+      CloseSwitchgate(x, y);
 
     if (game.magic_wall_active)
     {
@@ -3803,6 +3874,7 @@ void GameActions()
        for (y=0; y<lev_fieldy; y++) for (x=0; x<lev_fieldx; x++)
        {
          element = Feld[x][y];
+
          if (element == EL_SIEB_LEER || element == EL_SIEB_VOLL)
          {
            Feld[x][y] = EL_SIEB_TOT;
@@ -3820,6 +3892,29 @@ void GameActions()
     }
   }
 
+  if (game.light_time_left > 0)
+  {
+    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_ON)
+       {
+         Feld[x][y] = EL_LIGHT_SWITCH_OFF;
+         DrawLevelField(x, y);
+       }
+       else if (element == EL_INVISIBLE_STEEL ||
+                element == EL_UNSICHTBAR ||
+                element == EL_SAND_INVISIBLE)
+         DrawLevelField(x, y);
+      }
+    }
+  }
+
   if (TimeFrames >= (1000 / GameFrameDelay) && !tape.pausing)
   {
     TimeFrames = 0;
@@ -4493,6 +4588,7 @@ int DigField(struct PlayerInfo *player,
       break;
 
     case EL_ERDREICH:
+    case EL_SAND_INVISIBLE:
       Feld[x][y] = EL_LEERRAUM;
       PlaySoundLevel(x, y, SND_SCHLURF);
       break;
@@ -4530,6 +4626,11 @@ int DigField(struct PlayerInfo *player,
       PlaySoundLevel(x, y, SND_PONG);
       break;
 
+    case EL_ENVELOPE:
+      Feld[x][y] = EL_LEERRAUM;
+      PlaySoundLevel(x, y, SND_PONG);
+      break;
+
     case EL_DYNAMITE_INACTIVE:
     case EL_SP_DISK_RED:
       RemoveField(x, y);
@@ -4669,21 +4770,23 @@ int DigField(struct PlayerInfo *player,
        if (player->Switching)
          return MF_ACTION;
 
+       player->Switching = TRUE;
+
        game.belt_dir_nr[belt_nr] = belt_dir_nr;
        game.belt_dir[belt_nr] = belt_dir;
 
        if (belt_dir_nr == 3)
          belt_dir_nr = 1;
 
-       player->Switching = TRUE;
-
        for (yy=0; yy<lev_fieldy; yy++)
        {
          for (xx=0; xx<lev_fieldx; xx++)
          {
-           if (IS_BELT_SWITCH(Feld[xx][yy]))
+           int element = Feld[xx][yy];
+
+           if (IS_BELT_SWITCH(element))
            {
-             int e_belt_nr = getBeltNrFromSwitchElement(Feld[xx][yy]);
+             int e_belt_nr = getBeltNrFromSwitchElement(element);
 
              if (e_belt_nr == belt_nr)
              {
@@ -4691,9 +4794,9 @@ int DigField(struct PlayerInfo *player,
                DrawLevelField(xx, yy);
              }
            }
-           else if (belt_dir == MV_NO_MOVING && IS_BELT(Feld[xx][yy]))
+           else if (belt_dir == MV_NO_MOVING && IS_BELT(element))
            {
-             int e_belt_nr = getBeltNrFromElement(Feld[xx][yy]);
+             int e_belt_nr = getBeltNrFromElement(element);
 
              if (e_belt_nr == belt_nr)
                DrawLevelField(xx, yy);    /* set belt to parking position */
@@ -4705,6 +4808,92 @@ int DigField(struct PlayerInfo *player,
       }
       break;
 
+    case EL_SWITCHGATE_SWITCH_1:
+    case EL_SWITCHGATE_SWITCH_2:
+      {
+       int xx, yy;
+
+       if (player->Switching)
+         return MF_ACTION;
+
+       player->Switching = TRUE;
+
+       game.switchgate_pos = !game.switchgate_pos;
+
+       for (yy=0; yy<lev_fieldy; yy++)
+       {
+         for (xx=0; xx<lev_fieldx; xx++)
+         {
+           int element = Feld[xx][yy];
+
+           if (element == EL_SWITCHGATE_SWITCH_1 ||
+               element == EL_SWITCHGATE_SWITCH_2)
+           {
+             Feld[xx][yy] = EL_SWITCHGATE_SWITCH_1 + game.switchgate_pos;
+             DrawLevelField(xx, yy);
+           }
+           else if (element == EL_SWITCHGATE_OPEN ||
+                    element == EL_SWITCHGATE_OPENING)
+           {
+             Feld[xx][yy] = EL_SWITCHGATE_CLOSING;
+             PlaySoundLevel(xx, yy, SND_OEFFNEN);
+           }
+           else if (element == EL_SWITCHGATE_CLOSED ||
+                    element == EL_SWITCHGATE_CLOSING)
+           {
+             Feld[xx][yy] = EL_SWITCHGATE_OPENING;
+             PlaySoundLevel(xx, yy, SND_OEFFNEN);
+           }
+         }
+       }
+
+       return MF_ACTION;
+      }
+      break;
+
+    case EL_LIGHT_SWITCH_OFF:
+    case EL_LIGHT_SWITCH_ON:
+      {
+       int xx, yy;
+
+       if (player->Switching)
+         return MF_ACTION;
+
+       player->Switching = TRUE;
+
+       game.light_time_left =
+         (element == EL_LIGHT_SWITCH_OFF ? 10 * FRAMES_PER_SECOND : 0);
+
+       for (yy=0; yy<lev_fieldy; yy++)
+       {
+         for (xx=0; xx<lev_fieldx; xx++)
+         {
+           int element = Feld[xx][yy];
+
+           if (element == EL_LIGHT_SWITCH_OFF &&
+               game.light_time_left > 0)
+           {
+             Feld[xx][yy] = EL_LIGHT_SWITCH_ON;
+             DrawLevelField(xx, yy);
+           }
+           else if (element == EL_LIGHT_SWITCH_ON &&
+                    game.light_time_left == 0)
+           {
+             Feld[xx][yy] = EL_LIGHT_SWITCH_OFF;
+             DrawLevelField(xx, yy);
+           }
+
+           if (element == EL_INVISIBLE_STEEL ||
+               element == EL_UNSICHTBAR ||
+               element == EL_SAND_INVISIBLE)
+             DrawLevelField(xx, yy);
+         }
+       }
+
+       return MF_ACTION;
+      }
+      break;
+
     case EL_SP_EXIT:
       if (local_player->gems_still_needed > 0)
        return MF_NO_ACTION;
@@ -4805,6 +4994,18 @@ int DigField(struct PlayerInfo *player,
 
       break;
 
+    case EL_SWITCHGATE_OPEN:
+      if (!IN_LEV_FIELD(x + dx, y + dy) || !IS_FREE(x + dx, y + dy))
+       return MF_NO_ACTION;
+
+      /* automatically move to the next field with double speed */
+      player->programmed_action = move_direction;
+      DOUBLE_PLAYER_SPEED(player);
+
+      PlaySoundLevel(x, y, SND_GATE);
+
+      break;
+
     case EL_SP_PORT1_LEFT:
     case EL_SP_PORT2_LEFT:
     case EL_SP_PORT1_RIGHT:
index 00cf8234522be459fa93f807e1d7793efab9287f..09804ee18381b0a84750a64338267125b2aa6a5d 100644 (file)
@@ -870,7 +870,9 @@ void InitElementProperties()
     EL_EM_GATE_1X,
     EL_EM_GATE_2X,
     EL_EM_GATE_3X,
-    EL_EM_GATE_4X
+    EL_EM_GATE_4X,
+    EL_SWITCHGATE_OPEN,
+    EL_SWITCHGATE_CLOSED
   };
   static int ep_pforte_num = sizeof(ep_pforte)/sizeof(int);
 
@@ -926,7 +928,34 @@ void InitElementProperties()
     EL_SP_HARD_BASE6,
     EL_SP_TERMINAL,
     EL_SP_EXIT,
-    EL_INVISIBLE_STEEL
+    EL_INVISIBLE_STEEL,
+    EL_BELT1_SWITCH_L,
+    EL_BELT1_SWITCH_M,
+    EL_BELT1_SWITCH_R,
+    EL_BELT2_SWITCH_L,
+    EL_BELT2_SWITCH_M,
+    EL_BELT2_SWITCH_R,
+    EL_BELT3_SWITCH_L,
+    EL_BELT3_SWITCH_M,
+    EL_BELT3_SWITCH_R,
+    EL_BELT4_SWITCH_L,
+    EL_BELT4_SWITCH_M,
+    EL_BELT4_SWITCH_R,
+    EL_LIGHT_SWITCH_OFF,
+    EL_LIGHT_SWITCH_ON,
+    EL_SIGN_EXCLAMATION,
+    EL_SIGN_RADIOACTIVITY,
+    EL_SIGN_STOP,
+    EL_SIGN_WHEELCHAIR,
+    EL_SIGN_PARKING,
+    EL_SIGN_ONEWAY,
+    EL_SIGN_HEART,
+    EL_SIGN_TRIANGLE,
+    EL_SIGN_ROUND,
+    EL_SIGN_EXIT,
+    EL_SIGN_YINYANG,
+    EL_SIGN_OTHER,
+    EL_STEEL_SLANTED
   };
   static int ep_solid_num = sizeof(ep_solid)/sizeof(int);
 
@@ -955,6 +984,8 @@ void InitElementProperties()
     EL_EM_GATE_2X,
     EL_EM_GATE_3X,
     EL_EM_GATE_4X,
+    EL_SWITCHGATE_OPEN,
+    EL_SWITCHGATE_CLOSED,
     EL_SP_HARD_GRAY,
     EL_SP_HARD_GREEN,
     EL_SP_HARD_BLUE,
@@ -966,7 +997,34 @@ void InitElementProperties()
     EL_SP_HARD_BASE4,
     EL_SP_HARD_BASE5,
     EL_SP_HARD_BASE6,
-    EL_INVISIBLE_STEEL
+    EL_INVISIBLE_STEEL,
+    EL_BELT1_SWITCH_L,
+    EL_BELT1_SWITCH_M,
+    EL_BELT1_SWITCH_R,
+    EL_BELT2_SWITCH_L,
+    EL_BELT2_SWITCH_M,
+    EL_BELT2_SWITCH_R,
+    EL_BELT3_SWITCH_L,
+    EL_BELT3_SWITCH_M,
+    EL_BELT3_SWITCH_R,
+    EL_BELT4_SWITCH_L,
+    EL_BELT4_SWITCH_M,
+    EL_BELT4_SWITCH_R,
+    EL_LIGHT_SWITCH_OFF,
+    EL_LIGHT_SWITCH_ON,
+    EL_SIGN_EXCLAMATION,
+    EL_SIGN_RADIOACTIVITY,
+    EL_SIGN_STOP,
+    EL_SIGN_WHEELCHAIR,
+    EL_SIGN_PARKING,
+    EL_SIGN_ONEWAY,
+    EL_SIGN_HEART,
+    EL_SIGN_TRIANGLE,
+    EL_SIGN_ROUND,
+    EL_SIGN_EXIT,
+    EL_SIGN_YINYANG,
+    EL_SIGN_OTHER,
+    EL_STEEL_SLANTED
   };
   static int ep_massive_num = sizeof(ep_massive)/sizeof(int);
 
@@ -998,7 +1056,8 @@ void InitElementProperties()
     EL_SP_CHIP_RIGHT,
     EL_SP_CHIP_UPPER,
     EL_SP_CHIP_LOWER,
-    EL_SPEED_PILL
+    EL_SPEED_PILL,
+    EL_STEEL_SLANTED
   };
   static int ep_slippery_num = sizeof(ep_slippery)/sizeof(int);
 
@@ -1064,7 +1123,8 @@ void InitElementProperties()
     EL_SP_HARD_BASE6,
     EL_SP_TERMINAL,
     EL_SP_EXIT,
-    EL_INVISIBLE_STEEL
+    EL_INVISIBLE_STEEL,
+    EL_STEEL_SLANTED
   };
   static int ep_mauer_num = sizeof(ep_mauer)/sizeof(int);
 
@@ -1199,7 +1259,8 @@ void InitElementProperties()
     EL_SALZSAEURE,
     EL_SP_SNIKSNAK,
     EL_SP_ELECTRON,
-    EL_SP_BUG_ACTIVE
+    EL_SP_BUG_ACTIVE,
+    EL_LANDMINE
   };
   static int ep_dont_go_to_num = sizeof(ep_dont_go_to)/sizeof(int);
 
@@ -1374,7 +1435,32 @@ void InitElementProperties()
     EL_SP_HARD_BASE5,
     EL_SP_HARD_BASE6,
     EL_SP_EXIT,
-    EL_INVISIBLE_STEEL
+    EL_INVISIBLE_STEEL,
+    EL_BELT1_SWITCH_L,
+    EL_BELT1_SWITCH_M,
+    EL_BELT1_SWITCH_R,
+    EL_BELT2_SWITCH_L,
+    EL_BELT2_SWITCH_M,
+    EL_BELT2_SWITCH_R,
+    EL_BELT3_SWITCH_L,
+    EL_BELT3_SWITCH_M,
+    EL_BELT3_SWITCH_R,
+    EL_BELT4_SWITCH_L,
+    EL_BELT4_SWITCH_M,
+    EL_BELT4_SWITCH_R,
+    EL_SIGN_EXCLAMATION,
+    EL_SIGN_RADIOACTIVITY,
+    EL_SIGN_STOP,
+    EL_SIGN_WHEELCHAIR,
+    EL_SIGN_PARKING,
+    EL_SIGN_ONEWAY,
+    EL_SIGN_HEART,
+    EL_SIGN_TRIANGLE,
+    EL_SIGN_ROUND,
+    EL_SIGN_EXIT,
+    EL_SIGN_YINYANG,
+    EL_SIGN_OTHER,
+    EL_STEEL_SLANTED
   };
   static int ep_inactive_num = sizeof(ep_inactive)/sizeof(int);
 
@@ -1454,7 +1540,8 @@ void InitElementProperties()
   {
     EL_ERDREICH,
     EL_SP_BASE,
-    EL_SP_BUG
+    EL_SP_BUG,
+    EL_SAND_INVISIBLE
   };
   static int ep_eatable_num = sizeof(ep_eatable)/sizeof(int);
 
@@ -1525,7 +1612,8 @@ void InitElementProperties()
     EL_SP_PORT2_DOWN,
     EL_SP_PORT_X,
     EL_SP_PORT_Y,
-    EL_SP_PORT_XY
+    EL_SP_PORT_XY,
+    EL_SWITCHGATE_OPEN
   };
   static int ep_quick_gate_num = sizeof(ep_quick_gate)/sizeof(int);
 
index 181415d49b2168b94f86c4f09b94dda11b8420d4..dac98c0f266f06eb8807be35f0c8189a80e617e7 100644 (file)
@@ -467,8 +467,8 @@ char *element_info[] =
   "extra time",
   "switch gate (open)",
   "switch gate (closed)",
-  "switch for switch gate (open)",
-  "switch for switch gate (closed)",
+  "switch for switch gate",
+  "switch for switch gate",
   "time gate",
   "time gate with magic wheel",                        /* 270 */
   "red conveyor belt (left)",
@@ -497,10 +497,11 @@ char *element_info[] =
   "switch for blue conveyor belt (right)",
   "land mine",
   "mail envelope",
-  "light switch",
+  "light switch (off)",
+  "light switch (on)",
   "sign (exclamation)",
-  "sign (radio activity)",
-  "sign (stop)",                               /* 300 */
+  "sign (radio activity)",                     /* 300 */
+  "sign (stop)",
   "sign (wheel chair)",
   "sign (parking)",
   "sign (one way)",
@@ -509,22 +510,22 @@ char *element_info[] =
   "sign (round)",
   "sign (exit)",
   "sign (yin yang)",
-  "sign (other)",
-  "mole (starts moving left)",                 /* 310 */
+  "sign (other)",                              /* 310 */
+  "mole (starts moving left)",
   "mole (starts moving right)",
   "mole (starts moving up)",
   "mole (starts moving down)",
-  "steel (?)",
+  "steel wall (slanted)",
   "invisible sand",
   "-",
   "-",
   "-",
-  "-",
   "-",                                         /* 320 */
   "-",
   "-",
   "-",
   "-",
+  "-",
   "-"
 
   /*
index 72528fa688af21c1994980d20ba0aa3f9631a584..ab26aad533650a1b19010a500a4d249185d6b184 100644 (file)
@@ -420,6 +420,8 @@ struct GameInfo
   int magic_wall_time_left;
   int belt_dir[4];
   int belt_dir_nr[4];
+  int switchgate_pos;
+  int light_time_left;
 };
 
 struct GlobalInfo
@@ -852,8 +854,8 @@ extern char         *element_info[];
 #define EL_EXTRA_TIME          264
 #define EL_SWITCHGATE_OPEN     265
 #define EL_SWITCHGATE_CLOSED   266
-#define EL_SWITCHGATE_SWITCH_L 267
-#define EL_SWITCHGATE_SWITCH_R 268
+#define EL_SWITCHGATE_SWITCH_1 267
+#define EL_SWITCHGATE_SWITCH_2 268
 #define EL_TIME_GATE           269
 #define EL_TIME_GATE_WHEEL     270
 #define EL_BELT1_LEFT          271
@@ -882,25 +884,26 @@ extern char               *element_info[];
 #define EL_BELT4_SWITCH_R      294
 #define EL_LANDMINE            295
 #define EL_ENVELOPE            296
-#define EL_LIGHT_SWITCH                297
-#define EL_SIGN_EXCLAMATION    298
-#define EL_SIGN_RADIOACTIVITY  299
-#define EL_SIGN_STOP           300
-#define EL_SIGN_WHEELCHAIR     301
-#define EL_SIGN_PARKING                302
-#define EL_SIGN_ONEWAY         303
-#define EL_SIGN_HEART          304
-#define EL_SIGN_TRIANGLE       305
-#define EL_SIGN_ROUND          306
-#define EL_SIGN_EXIT           307
-#define EL_SIGN_YINYANG                308
-#define EL_SIGN_OTHER          309
-#define EL_MOLE_LEFT           310
-#define EL_MOLE_RIGHT          311
-#define EL_MOLE_UP             312
-#define EL_MOLE_DOWN           313
-#define EL_STEEL_SLANTED       314
-#define EL_SAND_INVISIBLE      315
+#define EL_LIGHT_SWITCH_OFF    297
+#define EL_LIGHT_SWITCH_ON     298
+#define EL_SIGN_EXCLAMATION    299
+#define EL_SIGN_RADIOACTIVITY  300
+#define EL_SIGN_STOP           301
+#define EL_SIGN_WHEELCHAIR     302
+#define EL_SIGN_PARKING                303
+#define EL_SIGN_ONEWAY         304
+#define EL_SIGN_HEART          305
+#define EL_SIGN_TRIANGLE       306
+#define EL_SIGN_ROUND          307
+#define EL_SIGN_EXIT           308
+#define EL_SIGN_YINYANG                309
+#define EL_SIGN_OTHER          310
+#define EL_MOLE_LEFT           311
+#define EL_MOLE_RIGHT          312
+#define EL_MOLE_UP             313
+#define EL_MOLE_DOWN           314
+#define EL_STEEL_SLANTED       315
+#define EL_SAND_INVISIBLE      316
 
 /* "real" (and therefore drawable) runtime elements */
 #define EL_SIEB_LEER           500
@@ -920,6 +923,8 @@ extern char         *element_info[];
 #define EL_DYNABOMB_ACTIVE_2   514
 #define EL_DYNABOMB_ACTIVE_3   515
 #define EL_DYNABOMB_ACTIVE_4   516
+#define EL_SWITCHGATE_OPENING  517
+#define EL_SWITCHGATE_CLOSING  518
 
 /* "unreal" (and therefore not drawable) runtime elements */
 #define EL_BLOCKED             600
@@ -1230,8 +1235,13 @@ extern char              *element_info[];
 #define GFX_SP_CHIP_UPPER      (GFX_START_ROCKSSP +  4 * SP_PER_LINE +  6)
 #define GFX_SP_CHIP_LOWER      (GFX_START_ROCKSSP +  4 * SP_PER_LINE +  7)
 
+#define GFX_INVISIBLE_STEEL_ON (GFX_START_ROCKSSP +  5 * SP_PER_LINE +  1)
+#define GFX_SAND_INVISIBLE_ON  (GFX_START_ROCKSSP +  5 * SP_PER_LINE +  2)
 #define GFX_INVISIBLE_STEEL    (GFX_START_ROCKSSP +  5 * SP_PER_LINE +  3)
+#define GFX_UNSICHTBAR_ON      (GFX_START_ROCKSSP +  5 * SP_PER_LINE +  5)
+#define GFX_SAND_INVISIBLE     (GFX_START_ROCKSSP +  5 * SP_PER_LINE +  6)
 #define GFX_UNSICHTBAR         (GFX_START_ROCKSSP +  5 * SP_PER_LINE +  7)
+
 #define GFX_SP_ZONK            (GFX_START_ROCKSSP +  6 * SP_PER_LINE +  0)
 
 #define GFX_EM_KEY_1           (GFX_START_ROCKSSP +  6 * SP_PER_LINE +  4)
@@ -1297,6 +1307,19 @@ extern char              *element_info[];
 #define GFX_BELT3_SWITCH_R     (GFX_START_ROCKSDC + 14 * DC_PER_LINE +  2)
 #define GFX_BELT4_SWITCH_R     (GFX_START_ROCKSDC + 14 * DC_PER_LINE +  3)
 
+#define GFX_SWITCHGATE_OPEN    (GFX_START_ROCKSDC + 15 * DC_PER_LINE +  4)
+#define GFX_SWITCHGATE_CLOSED  (GFX_START_ROCKSDC + 15 * DC_PER_LINE +  0)
+#define GFX_SWITCHGATE_SWITCH_1        (GFX_START_ROCKSDC + 12 * DC_PER_LINE +  4)
+#define GFX_SWITCHGATE_SWITCH_2        (GFX_START_ROCKSDC + 12 * DC_PER_LINE +  5)
+#define GFX_LIGHT_SWITCH_OFF   (GFX_START_ROCKSDC + 12 * DC_PER_LINE +  6)
+#define GFX_LIGHT_SWITCH_ON    (GFX_START_ROCKSDC + 12 * DC_PER_LINE +  7)
+
+#define GFX_ENVELOPE           (GFX_START_ROCKSDC + 14 * DC_PER_LINE +  4)
+#define GFX_SIGN_EXCLAMATION   (GFX_START_ROCKSDC + 14 * DC_PER_LINE +  5)
+#define GFX_SIGN_STOP          (GFX_START_ROCKSDC + 14 * DC_PER_LINE +  6)
+#define GFX_LANDMINE           (GFX_START_ROCKSDC + 14 * DC_PER_LINE +  7)
+#define GFX_STEEL_SLANTED      (GFX_START_ROCKSDC + 15 * DC_PER_LINE +  5)
+
 /* graphics from "RocksFont" */
 #define GFX_CHAR_START         (GFX_START_ROCKSFONT)
 #define GFX_CHAR_ASCII0                (GFX_CHAR_START - 32)
@@ -1339,46 +1362,9 @@ extern char              *element_info[];
 #define GFX_KEY_WHITE          GFX_CHAR_FRAGE
 #define GFX_FORCE_FIELD                GFX_CHAR_FRAGE
 #define GFX_EXTRA_TIME         GFX_CHAR_FRAGE
-#define GFX_SWITCHGATE_OPEN    GFX_CHAR_FRAGE
-#define GFX_SWITCHGATE_CLOSED  GFX_CHAR_FRAGE
-#define GFX_SWITCHGATE_SWITCH_L        GFX_CHAR_FRAGE
-#define GFX_SWITCHGATE_SWITCH_R        GFX_CHAR_FRAGE
 #define GFX_TIME_GATE          GFX_CHAR_FRAGE
 #define GFX_TIME_GATE_WHEEL    GFX_CHAR_FRAGE
-
-/*
-#define GFX_BELT1_LEFT         GFX_CHAR_FRAGE
-#define GFX_BELT1_MIDDLE       GFX_CHAR_FRAGE
-#define GFX_BELT1_RIGHT                GFX_CHAR_FRAGE
-#define GFX_BELT1_SWITCH_L     GFX_CHAR_FRAGE
-#define GFX_BELT1_SWITCH_M     GFX_CHAR_FRAGE
-#define GFX_BELT1_SWITCH_R     GFX_CHAR_FRAGE
-#define GFX_BELT2_LEFT         GFX_CHAR_FRAGE
-#define GFX_BELT2_MIDDLE       GFX_CHAR_FRAGE
-#define GFX_BELT2_RIGHT                GFX_CHAR_FRAGE
-#define GFX_BELT2_SWITCH_L     GFX_CHAR_FRAGE
-#define GFX_BELT2_SWITCH_M     GFX_CHAR_FRAGE
-#define GFX_BELT2_SWITCH_R     GFX_CHAR_FRAGE
-#define GFX_BELT3_LEFT         GFX_CHAR_FRAGE
-#define GFX_BELT3_MIDDLE       GFX_CHAR_FRAGE
-#define GFX_BELT3_RIGHT                GFX_CHAR_FRAGE
-#define GFX_BELT3_SWITCH_L     GFX_CHAR_FRAGE
-#define GFX_BELT3_SWITCH_M     GFX_CHAR_FRAGE
-#define GFX_BELT3_SWITCH_R     GFX_CHAR_FRAGE
-#define GFX_BELT4_LEFT         GFX_CHAR_FRAGE
-#define GFX_BELT4_MIDDLE       GFX_CHAR_FRAGE
-#define GFX_BELT4_RIGHT                GFX_CHAR_FRAGE
-#define GFX_BELT4_SWITCH_L     GFX_CHAR_FRAGE
-#define GFX_BELT4_SWITCH_M     GFX_CHAR_FRAGE
-#define GFX_BELT4_SWITCH_R     GFX_CHAR_FRAGE
-*/
-
-#define GFX_LANDMINE           GFX_CHAR_FRAGE
-#define GFX_ENVELOPE           GFX_CHAR_FRAGE
-#define GFX_LIGHT_SWITCH       GFX_CHAR_FRAGE
-#define GFX_SIGN_EXCLAMATION   GFX_CHAR_FRAGE
 #define GFX_SIGN_RADIOACTIVITY GFX_CHAR_FRAGE
-#define GFX_SIGN_STOP          GFX_CHAR_FRAGE
 #define GFX_SIGN_WHEELCHAIR    GFX_CHAR_FRAGE
 #define GFX_SIGN_PARKING       GFX_CHAR_FRAGE
 #define GFX_SIGN_ONEWAY                GFX_CHAR_FRAGE
@@ -1392,8 +1378,6 @@ extern char               *element_info[];
 #define GFX_MOLE_RIGHT         GFX_CHAR_FRAGE
 #define GFX_MOLE_UP            GFX_CHAR_FRAGE
 #define GFX_MOLE_DOWN          GFX_CHAR_FRAGE
-#define GFX_STEEL_SLANTED      GFX_CHAR_FRAGE
-#define GFX_SAND_INVISIBLE     GFX_CHAR_FRAGE
 
 /* the names of the sounds */
 #define SND_ALCHEMY            0
index bde3b716213f7ef947d164585c302d3026d5717d..41fd86eb12a560033ca6864d414deb58862f4cbe 100644 (file)
@@ -1157,6 +1157,14 @@ void DrawScreenElementExt(int x, int y, int dx, int dy, int element,
     else if (rechts_massiv)
       graphic = GFX_MAUER_L;
   }
+  else if ((element == EL_INVISIBLE_STEEL ||
+           element == EL_UNSICHTBAR ||
+           element == EL_SAND_INVISIBLE) && game.light_time_left)
+  {
+    graphic = (element == EL_INVISIBLE_STEEL ? GFX_INVISIBLE_STEEL_ON :
+              element == EL_UNSICHTBAR ? GFX_UNSICHTBAR_ON :
+              GFX_SAND_INVISIBLE_ON);
+  }
 
   if (dx || dy)
     DrawGraphicShifted(x, y, dx, dy, graphic, cut_mode, mask_mode);
@@ -1220,7 +1228,7 @@ void ErdreichAnbroeckeln(int x, int y)
 
   element = Feld[ux][uy];
 
-  if (element == EL_ERDREICH)
+  if (element == EL_ERDREICH || element == EL_LANDMINE)
   {
     if (!IN_SCR_FIELD(x, y))
       return;
@@ -1238,7 +1246,7 @@ void ErdreichAnbroeckeln(int x, int y)
       else
        element = Feld[uxx][uyy];
 
-      if (element == EL_ERDREICH)
+      if (element == EL_ERDREICH || element == EL_LANDMINE)
        continue;
 
       if (i == 1 || i == 2)
@@ -1277,7 +1285,8 @@ void ErdreichAnbroeckeln(int x, int y)
       uxx = ux + xy[i][0];
       uyy = uy + xy[i][1];
 
-      if (!IN_LEV_FIELD(uxx, uyy) || Feld[uxx][uyy] != EL_ERDREICH ||
+      if (!IN_LEV_FIELD(uxx, uyy) ||
+         (Feld[uxx][uyy] != EL_ERDREICH && Feld[uxx][uyy] != EL_LANDMINE) ||
          !IN_SCR_FIELD(xx, yy))
        continue;
 
@@ -2482,8 +2491,8 @@ int el2gfx(int element)
     case EL_EXTRA_TIME:                return GFX_EXTRA_TIME;
     case EL_SWITCHGATE_OPEN:   return GFX_SWITCHGATE_OPEN;
     case EL_SWITCHGATE_CLOSED: return GFX_SWITCHGATE_CLOSED;
-    case EL_SWITCHGATE_SWITCH_L:return GFX_SWITCHGATE_SWITCH_L;
-    case EL_SWITCHGATE_SWITCH_R:return GFX_SWITCHGATE_SWITCH_R;
+    case EL_SWITCHGATE_SWITCH_1:return GFX_SWITCHGATE_SWITCH_1;
+    case EL_SWITCHGATE_SWITCH_2:return GFX_SWITCHGATE_SWITCH_2;
     case EL_TIME_GATE:         return GFX_TIME_GATE;
     case EL_TIME_GATE_WHEEL:   return GFX_TIME_GATE_WHEEL;
     case EL_BELT1_LEFT:                return GFX_BELT1_LEFT;
@@ -2512,7 +2521,8 @@ int el2gfx(int element)
     case EL_BELT4_SWITCH_R:    return GFX_BELT4_SWITCH_R;
     case EL_LANDMINE:          return GFX_LANDMINE;
     case EL_ENVELOPE:          return GFX_ENVELOPE;
-    case EL_LIGHT_SWITCH:      return GFX_LIGHT_SWITCH;
+    case EL_LIGHT_SWITCH_OFF:  return GFX_LIGHT_SWITCH_OFF;
+    case EL_LIGHT_SWITCH_ON:   return GFX_LIGHT_SWITCH_ON;
     case EL_SIGN_EXCLAMATION:  return GFX_SIGN_EXCLAMATION;
     case EL_SIGN_RADIOACTIVITY:        return GFX_SIGN_RADIOACTIVITY;
     case EL_SIGN_STOP:         return GFX_SIGN_STOP;