rnd-20030427-1-src
authorHolger Schemel <info@artsoft.org>
Sun, 27 Apr 2003 00:03:42 +0000 (02:03 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:41:34 +0000 (10:41 +0200)
src/conftime.h
src/editor.c
src/files.c
src/game.c
src/init.c
src/libgame/system.h
src/main.c
src/main.h
src/screens.c
src/tools.c

index c8aa1774b949ab77b1748e431b1170ef155a4f4e..5ec2ce070b3d1fd3962dcf5020b9e4f2fc5e193b 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2003-04-26 20:44]"
+#define COMPILE_DATE_STRING "[2003-04-27 01:52]"
index 7e47789d5b7cff2fa0fcff139c0d285d05890221..884ca0fa5628575863e1c0b7bf489dc38f1af47b 100644 (file)
@@ -3696,7 +3696,6 @@ static void DrawPropertiesInfo()
     { EP_CAN_SMASH,            "- can smash"                   },
     { EP_CAN_CHANGE,           "- can change"                  },
     { EP_CAN_MOVE,             "- can move"                    },
-    { EP_COULD_MOVE,           "- could move"                  },
     { EP_DONT_TOUCH,           "- don't touch"                 },
     { EP_DONT_GO_TO,           "- don't go to"                 },
     { EP_FOOD_DARK_YAMYAM,     "- food for dark yamyam"        },
index 87c4204f67cf7d573db4ebfb726e1338dc1f5a83..41cc12714eff0f0f53817ad465c39b1144d3586e 100644 (file)
@@ -1900,47 +1900,38 @@ void LoadSpecialMenuDesignSettings()
 {
   char *filename = getCustomArtworkConfigFilename(ARTWORK_TYPE_GRAPHICS);
   SetupFileHash *setup_file_hash;
-  char *value;
+  int i, j;
 
-  /* !!! CHANGE THIS !!! (redundant initialization) !!! */
-  global.num_toons = 20;
-  global.menu_draw_xoffset = 0;
-  global.menu_draw_yoffset = 0;
-  global.menu_draw_xoffset_MAIN = 0;
-  global.menu_draw_yoffset_MAIN = 0;
-  global.door_step_offset = 2;
-  global.door_step_delay = 10;
+  /* always start with reliable default values from default config */
+  for (i=0; image_config_vars[i].token != NULL; i++)
+    for (j=0; image_config[j].token != NULL; j++)
+      if (strcmp(image_config_vars[i].token, image_config[j].token) == 0)
+       *image_config_vars[i].value =
+         get_integer_from_string(image_config[j].value);
 
   if ((setup_file_hash = loadSetupFileHash(filename)) == NULL)
     return;
 
-  value = getHashEntry(setup_file_hash, "global.num_toons");
-  if (value != NULL)
-    global.num_toons = get_integer_from_string(value);
-
-  value = getHashEntry(setup_file_hash, "menu.draw_xoffset");
-  if (value != NULL)
-    global.menu_draw_xoffset = get_integer_from_string(value);
-
-  value = getHashEntry(setup_file_hash, "menu.draw_yoffset");
-  if (value != NULL)
-    global.menu_draw_yoffset = get_integer_from_string(value);
-
-  value = getHashEntry(setup_file_hash, "menu.draw_xoffset.MAIN");
-  if (value != NULL)
-    global.menu_draw_xoffset_MAIN = get_integer_from_string(value);
+  /* special case: initialize with default values that may be overwrittem */
+  for (i=0; i < NUM_SPECIAL_GFX_ARGS; i++)
+  {
+    char *value_x = getHashEntry(setup_file_hash, "menu.draw_xoffset");
+    char *value_y = getHashEntry(setup_file_hash, "menu.draw_yoffset");
 
-  value = getHashEntry(setup_file_hash, "menu.draw_yoffset.MAIN");
-  if (value != NULL)
-    global.menu_draw_yoffset_MAIN = get_integer_from_string(value);
+    if (value_x != NULL)
+      menu.draw_xoffset[i] = get_integer_from_string(value_x);
+    if (value_y != NULL)
+      menu.draw_yoffset[i] = get_integer_from_string(value_y);
+  }
 
-  value = getHashEntry(setup_file_hash, "door.step_offset");
-  if (value != NULL)
-    global.door_step_offset = get_integer_from_string(value);
+  /* read (and overwrite with) values that may be specified in config file */
+  for (i=0; image_config_vars[i].token != NULL; i++)
+  {
+    char *value = getHashEntry(setup_file_hash, image_config_vars[i].token);
 
-  value = getHashEntry(setup_file_hash, "door.step_delay");
-  if (value != NULL)
-    global.door_step_delay = get_integer_from_string(value);
+    if (value != NULL)
+      *image_config_vars[i].value = get_integer_from_string(value);
+  }
 
   freeSetupFileHash(setup_file_hash);
 }
index 436751f65916f7005513f7bb2b13d248e7d4bc1b..d42afb32fab152c537e090c8a08feb90ee26f826 100644 (file)
@@ -1702,7 +1702,11 @@ void Explode(int ex, int ey, int phase, int mode)
 
     MovDir[x][y] = MovPos[x][y] = MovDelay[x][y] = 0;
     InitField(x, y, FALSE);
+#if 1
+    if (CAN_MOVE(element))
+#else
     if (CAN_MOVE(element) || COULD_MOVE(element))
+#endif
       InitMovDir(x, y);
     DrawLevelField(x, y);
 
@@ -2804,7 +2808,7 @@ static boolean JustBeingPushed(int x, int y)
 
 void StartMoving(int x, int y)
 {
-  static boolean use_spring_bug = TRUE;
+  boolean use_spring_bug = (game.engine_version < VERSION_IDENT(2,2,0));
   boolean started_moving = FALSE;      /* some elements can fall _and_ move */
   int element = Feld[x][y];
 
@@ -3110,14 +3114,8 @@ void StartMoving(int x, int y)
          int sx = SCREENX(xx), sy = SCREENY(yy);
          int flame_graphic = graphic + (i - 1);
 
-#if 1
          if (!IN_LEV_FIELD(xx, yy) || IS_DRAGONFIRE_PROOF(Feld[xx][yy]))
            break;
-#else
-         if (!IN_LEV_FIELD(xx, yy) ||
-             IS_HISTORIC_SOLID(Feld[xx][yy]) || Feld[xx][yy] == EL_EXPLOSION)
-           break;
-#endif
 
          if (MovDelay[x][y])
          {
@@ -5711,7 +5709,6 @@ void RemoveHero(struct PlayerInfo *player)
 static boolean checkDiagonalPushing(struct PlayerInfo *player,
                                    int x, int y, int real_dx, int real_dy)
 {
-#if 1
   int jx, jy, dx, dy, xx, yy;
 
   if (real_dx == 0 || real_dy == 0)    /* no diagonal direction => push */
@@ -5725,32 +5722,7 @@ static boolean checkDiagonalPushing(struct PlayerInfo *player,
   xx = jx + (dx == 0 ? real_dx : 0);
   yy = jy + (dy == 0 ? real_dy : 0);
 
-  return (!IN_LEV_FIELD(xx, yy) || IS_SOLID(Feld[xx][yy]));
-#else
-
-  if (real_dx && real_dy)      /* diagonal direction input => do check */
-  {
-    /* diagonal direction: check alternative direction */
-    int jx = player->jx, jy = player->jy;
-    int dx = x - jx, dy = y - jy;
-    int xx = jx + (dx == 0 ? real_dx : 0);
-    int yy = jy + (dy == 0 ? real_dy : 0);
-
-    if (IN_LEV_FIELD(xx, yy))
-    {
-      int element = Feld[xx][yy];
-
-      if (game.engine_version < VERSION_IDENT(2,2,0))
-       return IS_HISTORIC_SOLID(element);
-      else
-       return !(IS_WALKABLE(element) ||
-                IS_DIGGABLE(element) ||
-                IS_COLLECTIBLE(element));
-    }
-  }
-
-  return TRUE;         /* no diagonal direction input => push object */
-#endif
+  return (!IN_LEV_FIELD(xx, yy) || IS_SOLID_FOR_PUSHING(Feld[xx][yy]));
 }
 
 /*
@@ -6106,17 +6078,8 @@ int DigField(struct PlayerInfo *player,
       if (!IN_LEV_FIELD(x+dx, y+dy) || !IS_FREE(x+dx, y+dy))
        return MF_NO_ACTION;
 
-#if 1
       if (!checkDiagonalPushing(player, x, y, real_dx, real_dy))
        return MF_NO_ACTION;
-#else
-      if (real_dy)
-      {
-       if (IN_LEV_FIELD(jx, jy+real_dy) &&
-           !IS_HISTORIC_SOLID(Feld[jx][jy+real_dy]))
-         return MF_NO_ACTION;
-      }
-#endif
 
       if (player->push_delay == 0)
        player->push_delay = FrameCounter;
@@ -6358,23 +6321,8 @@ int DigField(struct PlayerInfo *player,
                  || !IS_SB_ELEMENT(element))))
        return MF_NO_ACTION;
 
-#if 1
       if (!checkDiagonalPushing(player, x, y, real_dx, real_dy))
        return MF_NO_ACTION;
-#else
-      if (dx && real_dy)
-      {
-       if (IN_LEV_FIELD(jx, jy+real_dy) &&
-           !IS_HISTORIC_SOLID(Feld[jx][jy+real_dy]))
-         return MF_NO_ACTION;
-      }
-      else if (dy && real_dx)
-      {
-       if (IN_LEV_FIELD(jx+real_dx, jy) &&
-           !IS_HISTORIC_SOLID(Feld[jx+real_dx][jy]))
-         return MF_NO_ACTION;
-      }
-#endif
 
       if (player->push_delay == 0)
        player->push_delay = FrameCounter;
@@ -6474,23 +6422,8 @@ int DigField(struct PlayerInfo *player,
        if (!IN_LEV_FIELD(x+dx, y+dy) || !IS_FREE(x+dx, y+dy))
          return MF_NO_ACTION;
 
-#if 1
        if (!checkDiagonalPushing(player, x, y, real_dx, real_dy))
          return MF_NO_ACTION;
-#else
-       if (dx && real_dy)
-       {
-         if (IN_LEV_FIELD(jx, jy+real_dy) &&
-             !IS_HISTORIC_SOLID(Feld[jx][jy+real_dy]))
-           return MF_NO_ACTION;
-       }
-       else if (dy && real_dx)
-       {
-         if (IN_LEV_FIELD(jx+real_dx, jy) &&
-             !IS_HISTORIC_SOLID(Feld[jx+real_dx][jy]))
-           return MF_NO_ACTION;
-       }
-#endif
 
        if (player->push_delay == 0)
          player->push_delay = FrameCounter;
index d327a93d4895c21076fe1fe00e0b23bb8af1aa08..9a68e2ad5ebc7b8c0c38f07078c6846320f05a17 100644 (file)
@@ -1070,207 +1070,53 @@ static void ReinitializeMusic()
 
 void InitElementPropertiesStatic()
 {
-  static int ep_amoebalive[] =
-  {
-    EL_AMOEBA_WET,
-    EL_AMOEBA_DRY,
-    EL_AMOEBA_FULL,
-    EL_BD_AMOEBA,
-    -1
-  };
-
-  static int ep_amoeboid[] =
-  {
-    EL_AMOEBA_DEAD,
-    EL_AMOEBA_WET,
-    EL_AMOEBA_DRY,
-    EL_AMOEBA_FULL,
-    EL_BD_AMOEBA,
-    -1
-  };
-
-  static int ep_keygate[] =
-  {
-    EL_GATE_1,
-    EL_GATE_2,
-    EL_GATE_3,
-    EL_GATE_4,
-    EL_GATE_1_GRAY,
-    EL_GATE_2_GRAY,
-    EL_GATE_3_GRAY,
-    EL_GATE_4_GRAY,
-    EL_EM_GATE_1,
-    EL_EM_GATE_2,
-    EL_EM_GATE_3,
-    EL_EM_GATE_4,
-    EL_EM_GATE_1_GRAY,
-    EL_EM_GATE_2_GRAY,
-    EL_EM_GATE_3_GRAY,
-    EL_EM_GATE_4_GRAY,
-    -1
-  };
-
-  static int ep_can_be_crumbled[] =
+  static int ep_diggable[] =
   {
     EL_SAND,
-    EL_LANDMINE,
+    EL_SP_BASE,
+    EL_SP_BUGGY_BASE,
+    EL_SP_BUGGY_BASE_ACTIVATING,
     EL_TRAP,
+    EL_INVISIBLE_SAND,
+    EL_INVISIBLE_SAND_ACTIVE,
+#if 1
+    EL_LANDMINE,
     EL_TRAP_ACTIVE,
+    EL_SP_BUGGY_BASE_ACTIVE,
+#endif
     -1
   };
 
-  static int ep_historic_solid[] =
+  static int ep_collectible[] =
   {
-    EL_WALL,
-    EL_EXPANDABLE_WALL,
-    EL_EXPANDABLE_WALL_HORIZONTAL,
-    EL_EXPANDABLE_WALL_VERTICAL,
-    EL_EXPANDABLE_WALL_ANY,
-    EL_BD_WALL,
-    EL_WALL_CRUMBLED,
-    EL_EXIT_CLOSED,
-    EL_EXIT_OPENING,
-    EL_EXIT_OPEN,
-    EL_AMOEBA_DEAD,
-    EL_AMOEBA_WET,
-    EL_AMOEBA_DRY,
-    EL_AMOEBA_FULL,
-    EL_BD_AMOEBA,
-    EL_QUICKSAND_EMPTY,
-    EL_QUICKSAND_FULL,
-    EL_QUICKSAND_FILLING,
-    EL_QUICKSAND_EMPTYING,
-    EL_MAGIC_WALL,
-    EL_MAGIC_WALL_ACTIVE,
-    EL_MAGIC_WALL_EMPTYING,
-    EL_MAGIC_WALL_FILLING,
-    EL_MAGIC_WALL_FULL,
-    EL_MAGIC_WALL_DEAD,
-    EL_BD_MAGIC_WALL,
-    EL_BD_MAGIC_WALL_ACTIVE,
-    EL_BD_MAGIC_WALL_EMPTYING,
-    EL_BD_MAGIC_WALL_FULL,
-    EL_BD_MAGIC_WALL_FILLING,
-    EL_BD_MAGIC_WALL_DEAD,
-    EL_GAME_OF_LIFE,
-    EL_BIOMAZE,
-    EL_SP_CHIP_SINGLE,
-    EL_SP_CHIP_LEFT,
-    EL_SP_CHIP_RIGHT,
-    EL_SP_CHIP_TOP,
-    EL_SP_CHIP_BOTTOM,
-    EL_SP_TERMINAL,
-    EL_SP_TERMINAL_ACTIVE,
-    EL_SP_EXIT_CLOSED,
-    EL_SP_EXIT_OPEN,
-    EL_INVISIBLE_WALL,
-    EL_INVISIBLE_WALL_ACTIVE,
-    EL_SWITCHGATE_SWITCH_UP,
-    EL_SWITCHGATE_SWITCH_DOWN,
-    EL_TIMEGATE_SWITCH,
-    EL_TIMEGATE_SWITCH_ACTIVE,
-    EL_EMC_WALL_1,
-    EL_EMC_WALL_2,
-    EL_EMC_WALL_3,
-    EL_EMC_WALL_4,
-    EL_EMC_WALL_5,
-    EL_EMC_WALL_6,
-    EL_EMC_WALL_7,
-    EL_EMC_WALL_8,
-    EL_WALL_PEARL,
-    EL_WALL_CRYSTAL,
-
-    /* the following elements are a direct copy of "indestructible" elements,
-       except "EL_ACID", which is "indestructible", but not "solid"! */
-#if 0
-    EL_ACID,
-#endif
-    EL_STEELWALL,
-    EL_ACID_POOL_TOPLEFT,
-    EL_ACID_POOL_TOPRIGHT,
-    EL_ACID_POOL_BOTTOMLEFT,
-    EL_ACID_POOL_BOTTOM,
-    EL_ACID_POOL_BOTTOMRIGHT,
-    EL_SP_HARDWARE_GRAY,
-    EL_SP_HARDWARE_GREEN,
-    EL_SP_HARDWARE_BLUE,
-    EL_SP_HARDWARE_RED,
-    EL_SP_HARDWARE_YELLOW,
-    EL_SP_HARDWARE_BASE_1,
-    EL_SP_HARDWARE_BASE_2,
-    EL_SP_HARDWARE_BASE_3,
-    EL_SP_HARDWARE_BASE_4,
-    EL_SP_HARDWARE_BASE_5,
-    EL_SP_HARDWARE_BASE_6,
-    EL_INVISIBLE_STEELWALL,
-    EL_INVISIBLE_STEELWALL_ACTIVE,
-    EL_CONVEYOR_BELT_1_SWITCH_LEFT,
-    EL_CONVEYOR_BELT_1_SWITCH_MIDDLE,
-    EL_CONVEYOR_BELT_1_SWITCH_RIGHT,
-    EL_CONVEYOR_BELT_2_SWITCH_LEFT,
-    EL_CONVEYOR_BELT_2_SWITCH_MIDDLE,
-    EL_CONVEYOR_BELT_2_SWITCH_RIGHT,
-    EL_CONVEYOR_BELT_3_SWITCH_LEFT,
-    EL_CONVEYOR_BELT_3_SWITCH_MIDDLE,
-    EL_CONVEYOR_BELT_3_SWITCH_RIGHT,
-    EL_CONVEYOR_BELT_4_SWITCH_LEFT,
-    EL_CONVEYOR_BELT_4_SWITCH_MIDDLE,
-    EL_CONVEYOR_BELT_4_SWITCH_RIGHT,
-    EL_LIGHT_SWITCH,
-    EL_LIGHT_SWITCH_ACTIVE,
-    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_STEELWALL_SLANTED,
-    EL_EMC_STEELWALL_1,
-    EL_EMC_STEELWALL_2,
-    EL_EMC_STEELWALL_3,
-    EL_EMC_STEELWALL_4,
+    EL_BD_DIAMOND,
+    EL_EMERALD,
+    EL_DIAMOND,
+    EL_EMERALD_YELLOW,
+    EL_EMERALD_RED,
+    EL_EMERALD_PURPLE,
+    EL_KEY_1,
+    EL_KEY_2,
+    EL_KEY_3,
+    EL_KEY_4,
+    EL_EM_KEY_1,
+    EL_EM_KEY_2,
+    EL_EM_KEY_3,
+    EL_EM_KEY_4,
+    EL_DYNAMITE,
+    EL_DYNABOMB_INCREASE_NUMBER,
+    EL_DYNABOMB_INCREASE_SIZE,
+    EL_DYNABOMB_INCREASE_POWER,
+    EL_SP_INFOTRON,
+    EL_SP_DISK_RED,
+    EL_PEARL,
     EL_CRYSTAL,
-    EL_GATE_1,
-    EL_GATE_2,
-    EL_GATE_3,
-    EL_GATE_4,
-    EL_GATE_1_GRAY,
-    EL_GATE_2_GRAY,
-    EL_GATE_3_GRAY,
-    EL_GATE_4_GRAY,
-    EL_EM_GATE_1,
-    EL_EM_GATE_2,
-    EL_EM_GATE_3,
-    EL_EM_GATE_4,
-    EL_EM_GATE_1_GRAY,
-    EL_EM_GATE_2_GRAY,
-    EL_EM_GATE_3_GRAY,
-    EL_EM_GATE_4_GRAY,
-    EL_SWITCHGATE_OPEN,
-    EL_SWITCHGATE_OPENING,
-    EL_SWITCHGATE_CLOSED,
-    EL_SWITCHGATE_CLOSING,
-    EL_TIMEGATE_OPEN,
-    EL_TIMEGATE_OPENING,
-    EL_TIMEGATE_CLOSED,
-    EL_TIMEGATE_CLOSING,
-    EL_TUBE_ANY,
-    EL_TUBE_VERTICAL,
-    EL_TUBE_HORIZONTAL,
-    EL_TUBE_VERTICAL_LEFT,
-    EL_TUBE_VERTICAL_RIGHT,
-    EL_TUBE_HORIZONTAL_UP,
-    EL_TUBE_HORIZONTAL_DOWN,
-    EL_TUBE_LEFT_UP,
-    EL_TUBE_LEFT_DOWN,
-    EL_TUBE_RIGHT_UP,
-    EL_TUBE_RIGHT_DOWN,
+    EL_KEY_WHITE,
+    EL_SHIELD_NORMAL,
+    EL_SHIELD_DEADLY,
+    EL_EXTRA_TIME,
+    EL_ENVELOPE,
+    EL_SPEED_PILL,
     -1
   };
 
@@ -1403,92 +1249,7 @@ void InitElementPropertiesStatic()
     -1
   };
 
-  static int ep_enemy[] =
-  {
-    EL_BUG,
-    EL_SPACESHIP,
-    EL_BD_BUTTERFLY,
-    EL_BD_FIREFLY,
-    EL_YAMYAM,
-    EL_DARK_YAMYAM,
-    EL_ROBOT,
-    EL_PACMAN,
-    EL_SP_SNIKSNAK,
-    EL_SP_ELECTRON,
-    -1
-  };
-
-  static int ep_historic_wall[] =
-  {
-    EL_STEELWALL,
-    EL_GATE_1,
-    EL_GATE_2,
-    EL_GATE_3,
-    EL_GATE_4,
-    EL_GATE_1_GRAY,
-    EL_GATE_2_GRAY,
-    EL_GATE_3_GRAY,
-    EL_GATE_4_GRAY,
-    EL_EM_GATE_1,
-    EL_EM_GATE_2,
-    EL_EM_GATE_3,
-    EL_EM_GATE_4,
-    EL_EM_GATE_1_GRAY,
-    EL_EM_GATE_2_GRAY,
-    EL_EM_GATE_3_GRAY,
-    EL_EM_GATE_4_GRAY,
-    EL_EXIT_CLOSED,
-    EL_EXIT_OPENING,
-    EL_EXIT_OPEN,
-    EL_WALL,
-    EL_WALL_CRUMBLED,
-    EL_EXPANDABLE_WALL,
-    EL_EXPANDABLE_WALL_HORIZONTAL,
-    EL_EXPANDABLE_WALL_VERTICAL,
-    EL_EXPANDABLE_WALL_ANY,
-    EL_EXPANDABLE_WALL_GROWING,
-    EL_BD_WALL,
-    EL_SP_CHIP_SINGLE,
-    EL_SP_CHIP_LEFT,
-    EL_SP_CHIP_RIGHT,
-    EL_SP_CHIP_TOP,
-    EL_SP_CHIP_BOTTOM,
-    EL_SP_HARDWARE_GRAY,
-    EL_SP_HARDWARE_GREEN,
-    EL_SP_HARDWARE_BLUE,
-    EL_SP_HARDWARE_RED,
-    EL_SP_HARDWARE_YELLOW,
-    EL_SP_HARDWARE_BASE_1,
-    EL_SP_HARDWARE_BASE_2,
-    EL_SP_HARDWARE_BASE_3,
-    EL_SP_HARDWARE_BASE_4,
-    EL_SP_HARDWARE_BASE_5,
-    EL_SP_HARDWARE_BASE_6,
-    EL_SP_TERMINAL,
-    EL_SP_TERMINAL_ACTIVE,
-    EL_SP_EXIT_CLOSED,
-    EL_SP_EXIT_OPEN,
-    EL_INVISIBLE_STEELWALL,
-    EL_INVISIBLE_STEELWALL_ACTIVE,
-    EL_INVISIBLE_WALL,
-    EL_INVISIBLE_WALL_ACTIVE,
-    EL_STEELWALL_SLANTED,
-    EL_EMC_STEELWALL_1,
-    EL_EMC_STEELWALL_2,
-    EL_EMC_STEELWALL_3,
-    EL_EMC_STEELWALL_4,
-    EL_EMC_WALL_1,
-    EL_EMC_WALL_2,
-    EL_EMC_WALL_3,
-    EL_EMC_WALL_4,
-    EL_EMC_WALL_5,
-    EL_EMC_WALL_6,
-    EL_EMC_WALL_7,
-    EL_EMC_WALL_8,
-    -1
-  };
-
-  static int ep_can_fall[] =
+  static int ep_can_fall[] =
   {
     EL_ROCK,
     EL_BD_ROCK,
@@ -1541,43 +1302,121 @@ void InitElementPropertiesStatic()
     -1
   };
 
-  static int ep_can_change[] =
+  static int ep_walkable_over[] =
   {
-    EL_ROCK,
-    EL_BD_ROCK,
-    EL_EMERALD,
-    EL_BD_DIAMOND,
-    EL_EMERALD_YELLOW,
-    EL_EMERALD_RED,
-    EL_EMERALD_PURPLE,
-    EL_DIAMOND,
+    EL_EMPTY_SPACE,
+    EL_SP_EMPTY_SPACE,
+    EL_SOKOBAN_FIELD_EMPTY,
+    EL_EXIT_OPEN,
+    EL_SP_EXIT_OPEN,
+    EL_GATE_1,
+    EL_GATE_2,
+    EL_GATE_3,
+    EL_GATE_4,
+    EL_GATE_1_GRAY,
+    EL_GATE_2_GRAY,
+    EL_GATE_3_GRAY,
+    EL_GATE_4_GRAY,
     -1
   };
 
-  static int ep_can_move[] =
+  static int ep_walkable_inside[] =
   {
-    EL_BUG,
-    EL_SPACESHIP,
-    EL_BD_BUTTERFLY,
-    EL_BD_FIREFLY,
-    EL_YAMYAM,
-    EL_DARK_YAMYAM,
-    EL_ROBOT,
-    EL_PACMAN,
-    EL_MOLE,
-    EL_PENGUIN,
-    EL_PIG,
-    EL_DRAGON,
+    EL_TUBE_ANY,
+    EL_TUBE_VERTICAL,
+    EL_TUBE_HORIZONTAL,
+    EL_TUBE_VERTICAL_LEFT,
+    EL_TUBE_VERTICAL_RIGHT,
+    EL_TUBE_HORIZONTAL_UP,
+    EL_TUBE_HORIZONTAL_DOWN,
+    EL_TUBE_LEFT_UP,
+    EL_TUBE_LEFT_DOWN,
+    EL_TUBE_RIGHT_UP,
+    EL_TUBE_RIGHT_DOWN,
+    -1
+  };
+
+  static int ep_walkable_under[] =
+  {
+    -1
+  };
+
+  static int ep_passable_over[] =
+  {
+    EL_EM_GATE_1,
+    EL_EM_GATE_2,
+    EL_EM_GATE_3,
+    EL_EM_GATE_4,
+    EL_EM_GATE_1_GRAY,
+    EL_EM_GATE_2_GRAY,
+    EL_EM_GATE_3_GRAY,
+    EL_EM_GATE_4_GRAY,
+    EL_SWITCHGATE_OPEN,
+    EL_TIMEGATE_OPEN,
+    -1
+  };
+
+  static int ep_passable_inside[] =
+  {
+    EL_SP_PORT_LEFT,
+    EL_SP_PORT_RIGHT,
+    EL_SP_PORT_UP,
+    EL_SP_PORT_DOWN,
+    EL_SP_PORT_HORIZONTAL,
+    EL_SP_PORT_VERTICAL,
+    EL_SP_PORT_ANY,
+    EL_SP_GRAVITY_PORT_LEFT,
+    EL_SP_GRAVITY_PORT_RIGHT,
+    EL_SP_GRAVITY_PORT_UP,
+    EL_SP_GRAVITY_PORT_DOWN,
+    -1
+  };
+
+  static int ep_passable_under[] =
+  {
+    -1
+  };
+
+  static int ep_pushable[] =
+  {
+    EL_ROCK,
+    EL_BD_ROCK,
+    EL_BOMB,
+    EL_NUT,
+    EL_TIME_ORB_EMPTY,
+    EL_SOKOBAN_FIELD_FULL,
+    EL_SOKOBAN_OBJECT,
     EL_SATELLITE,
-    EL_SP_SNIKSNAK,
-    EL_SP_ELECTRON,
+    EL_SP_ZONK,
+    EL_SP_DISK_ORANGE,
+    EL_SP_DISK_YELLOW,
     EL_BALLOON,
     EL_SPRING,
+    EL_DX_SUPABOMB,
+    -1
+  };
+
+  static int ep_player[] =
+  {
+    EL_PLAYER_1,
+    EL_PLAYER_2,
+    EL_PLAYER_3,
+    EL_PLAYER_4,
+    -1
+  };
+
+  static int ep_can_be_crumbled[] =
+  {
+    EL_SAND,
+    EL_LANDMINE,
+    EL_TRAP,
+    EL_TRAP_ACTIVE,
     -1
   };
 
-  static int ep_could_move[] =
+  static int ep_can_move[] =
   {
+    /* only stored in level file */
     EL_BUG_RIGHT,
     EL_BUG_UP,
     EL_BUG_LEFT,
@@ -1598,6 +1437,38 @@ void InitElementPropertiesStatic()
     EL_PACMAN_UP,
     EL_PACMAN_LEFT,
     EL_PACMAN_DOWN,
+
+    /* level file and runtime elements */
+    EL_BUG,
+    EL_SPACESHIP,
+    EL_BD_BUTTERFLY,
+    EL_BD_FIREFLY,
+    EL_YAMYAM,
+    EL_DARK_YAMYAM,
+    EL_ROBOT,
+    EL_PACMAN,
+    EL_MOLE,
+    EL_PENGUIN,
+    EL_PIG,
+    EL_DRAGON,
+    EL_SATELLITE,
+    EL_SP_SNIKSNAK,
+    EL_SP_ELECTRON,
+    EL_BALLOON,
+    EL_SPRING,
+    -1
+  };
+
+  static int ep_can_change[] =
+  {
+    EL_ROCK,
+    EL_BD_ROCK,
+    EL_EMERALD,
+    EL_BD_DIAMOND,
+    EL_EMERALD_YELLOW,
+    EL_EMERALD_RED,
+    EL_EMERALD_PURPLE,
+    EL_DIAMOND,
     -1
   };
 
@@ -1610,7 +1481,7 @@ void InitElementPropertiesStatic()
     -1
   };
 
-  static int ep_dont_go_to[] =
+  static int ep_enemy[] =
   {
     EL_BUG,
     EL_SPACESHIP,
@@ -1620,51 +1491,67 @@ void InitElementPropertiesStatic()
     EL_DARK_YAMYAM,
     EL_ROBOT,
     EL_PACMAN,
-    EL_AMOEBA_DROP,
-    EL_ACID,
     EL_SP_SNIKSNAK,
     EL_SP_ELECTRON,
-    EL_SP_BUGGY_BASE_ACTIVE,
-    EL_TRAP_ACTIVE,
-    EL_LANDMINE,
     -1
   };
 
-  static int ep_food_dark_yamyam[] =
+  static int ep_dont_go_to[] =
   {
-    EL_SAND,
     EL_BUG,
     EL_SPACESHIP,
     EL_BD_BUTTERFLY,
     EL_BD_FIREFLY,
     EL_YAMYAM,
+    EL_DARK_YAMYAM,
     EL_ROBOT,
     EL_PACMAN,
     EL_AMOEBA_DROP,
-    EL_AMOEBA_DEAD,
-    EL_AMOEBA_WET,
-    EL_AMOEBA_DRY,
-    EL_AMOEBA_FULL,
-    EL_BD_AMOEBA,
-    EL_EMERALD,
-    EL_BD_DIAMOND,
-    EL_EMERALD_YELLOW,
-    EL_EMERALD_RED,
-    EL_EMERALD_PURPLE,
-    EL_DIAMOND,
-    EL_PEARL,
-    EL_CRYSTAL,
+    EL_ACID,
+    EL_SP_SNIKSNAK,
+    EL_SP_ELECTRON,
+    EL_SP_BUGGY_BASE_ACTIVE,
+    EL_TRAP_ACTIVE,
+    EL_LANDMINE,
     -1
   };
 
-  static int ep_bd_element[] =
+  static int ep_explosive[] =
   {
-    EL_EMPTY,
-    EL_SAND,
-    EL_WALL_CRUMBLED,
-    EL_BD_WALL,
-    EL_ROCK,
-    EL_BD_ROCK,
+    EL_BOMB,
+    EL_DYNAMITE_ACTIVE,
+    EL_DYNAMITE,
+    EL_DYNABOMB_PLAYER_1_ACTIVE,
+    EL_DYNABOMB_PLAYER_2_ACTIVE,
+    EL_DYNABOMB_PLAYER_3_ACTIVE,
+    EL_DYNABOMB_PLAYER_4_ACTIVE,
+    EL_DYNABOMB_INCREASE_NUMBER,
+    EL_DYNABOMB_INCREASE_SIZE,
+    EL_DYNABOMB_INCREASE_POWER,
+    EL_SP_DISK_RED_ACTIVE,
+    EL_BUG,
+    EL_MOLE,
+    EL_PENGUIN,
+    EL_PIG,
+    EL_DRAGON,
+    EL_SATELLITE,
+    EL_SP_DISK_RED,
+    EL_SP_DISK_ORANGE,
+    EL_SP_DISK_YELLOW,
+    EL_SP_SNIKSNAK,
+    EL_SP_ELECTRON,
+    EL_DX_SUPABOMB,
+    -1
+  };
+
+  static int ep_bd_element[] =
+  {
+    EL_EMPTY,
+    EL_SAND,
+    EL_WALL_CRUMBLED,
+    EL_BD_WALL,
+    EL_ROCK,
+    EL_BD_ROCK,
     EL_BD_DIAMOND,
     EL_BD_MAGIC_WALL,
     EL_EXIT_CLOSED,
@@ -1686,6 +1573,56 @@ void InitElementPropertiesStatic()
     -1
   };
 
+  static int ep_sp_element[] =
+  {
+    EL_SP_EMPTY,
+    EL_SP_ZONK,
+    EL_SP_BASE,
+    EL_SP_MURPHY,
+    EL_SP_INFOTRON,
+    EL_SP_CHIP_SINGLE,
+    EL_SP_HARDWARE_GRAY,
+    EL_SP_EXIT_CLOSED,
+    EL_SP_EXIT_OPEN,
+    EL_SP_DISK_ORANGE,
+    EL_SP_PORT_RIGHT,
+    EL_SP_PORT_DOWN,
+    EL_SP_PORT_LEFT,
+    EL_SP_PORT_UP,
+    EL_SP_GRAVITY_PORT_RIGHT,
+    EL_SP_GRAVITY_PORT_DOWN,
+    EL_SP_GRAVITY_PORT_LEFT,
+    EL_SP_GRAVITY_PORT_UP,
+    EL_SP_SNIKSNAK,
+    EL_SP_DISK_YELLOW,
+    EL_SP_TERMINAL,
+    EL_SP_DISK_RED,
+    EL_SP_PORT_VERTICAL,
+    EL_SP_PORT_HORIZONTAL,
+    EL_SP_PORT_ANY,
+    EL_SP_ELECTRON,
+    EL_SP_BUGGY_BASE,
+    EL_SP_CHIP_LEFT,
+    EL_SP_CHIP_RIGHT,
+    EL_SP_HARDWARE_BASE_1,
+    EL_SP_HARDWARE_GREEN,
+    EL_SP_HARDWARE_BLUE,
+    EL_SP_HARDWARE_RED,
+    EL_SP_HARDWARE_YELLOW,
+    EL_SP_HARDWARE_BASE_2,
+    EL_SP_HARDWARE_BASE_3,
+    EL_SP_HARDWARE_BASE_4,
+    EL_SP_HARDWARE_BASE_5,
+    EL_SP_HARDWARE_BASE_6,
+    EL_SP_CHIP_TOP,
+    EL_SP_CHIP_BOTTOM,
+    /* additional elements that appeared in newer Supaplex levels */
+    EL_INVISIBLE_WALL,
+    /* more than one murphy in a level results in an inactive clone */
+    EL_SP_MURPHY_CLONE,
+    -1
+  };
+
   static int ep_sb_element[] =
   {
     EL_EMPTY,
@@ -1709,26 +1646,49 @@ void InitElementPropertiesStatic()
     -1
   };
 
-  static int ep_inactive[] =
+  static int ep_food_dark_yamyam[] =
   {
-    EL_EMPTY,
     EL_SAND,
-    EL_WALL,
-    EL_BD_WALL,
-    EL_WALL_CRUMBLED,
-    EL_STEELWALL,
+    EL_BUG,
+    EL_SPACESHIP,
+    EL_BD_BUTTERFLY,
+    EL_BD_FIREFLY,
+    EL_YAMYAM,
+    EL_ROBOT,
+    EL_PACMAN,
+    EL_AMOEBA_DROP,
     EL_AMOEBA_DEAD,
-    EL_QUICKSAND_EMPTY,
-    EL_STONEBLOCK,
-    EL_ROBOT_WHEEL,
-    EL_KEY_1,
-    EL_KEY_2,
-    EL_KEY_3,
-    EL_KEY_4,
-    EL_EM_KEY_1,
-    EL_EM_KEY_2,
-    EL_EM_KEY_3,
-    EL_EM_KEY_4,
+    EL_AMOEBA_WET,
+    EL_AMOEBA_DRY,
+    EL_AMOEBA_FULL,
+    EL_BD_AMOEBA,
+    EL_EMERALD,
+    EL_BD_DIAMOND,
+    EL_EMERALD_YELLOW,
+    EL_EMERALD_RED,
+    EL_EMERALD_PURPLE,
+    EL_DIAMOND,
+    EL_PEARL,
+    EL_CRYSTAL,
+    -1
+  };
+
+  static int ep_food_penguin[] =
+  {
+    EL_EMERALD,
+    EL_BD_DIAMOND,
+    EL_EMERALD_YELLOW,
+    EL_EMERALD_RED,
+    EL_EMERALD_PURPLE,
+    EL_DIAMOND,
+    EL_PEARL,
+    EL_CRYSTAL,
+    -1
+  };
+
+  static int ep_historic_wall[] =
+  {
+    EL_STEELWALL,
     EL_GATE_1,
     EL_GATE_2,
     EL_GATE_3,
@@ -1745,50 +1705,17 @@ void InitElementPropertiesStatic()
     EL_EM_GATE_2_GRAY,
     EL_EM_GATE_3_GRAY,
     EL_EM_GATE_4_GRAY,
-    EL_DYNAMITE,
-    EL_INVISIBLE_STEELWALL,
-    EL_INVISIBLE_WALL,
-    EL_INVISIBLE_SAND,
-    EL_LAMP,
-    EL_LAMP_ACTIVE,
-    EL_WALL_EMERALD,
-    EL_WALL_DIAMOND,
-    EL_WALL_BD_DIAMOND,
-    EL_WALL_EMERALD_YELLOW,
-    EL_DYNABOMB_INCREASE_NUMBER,
-    EL_DYNABOMB_INCREASE_SIZE,
-    EL_DYNABOMB_INCREASE_POWER,
-    EL_SOKOBAN_OBJECT,
-    EL_SOKOBAN_FIELD_EMPTY,
-    EL_SOKOBAN_FIELD_FULL,
-    EL_WALL_EMERALD_RED,
-    EL_WALL_EMERALD_PURPLE,
-    EL_ACID_POOL_TOPLEFT,
-    EL_ACID_POOL_TOPRIGHT,
-    EL_ACID_POOL_BOTTOMLEFT,
-    EL_ACID_POOL_BOTTOM,
-    EL_ACID_POOL_BOTTOMRIGHT,
-    EL_MAGIC_WALL,
-    EL_MAGIC_WALL_DEAD,
-    EL_BD_MAGIC_WALL,
-    EL_BD_MAGIC_WALL_DEAD,
-    EL_AMOEBA_TO_DIAMOND,
-    EL_BLOCKED,
-    EL_SP_EMPTY,
-    EL_SP_BASE,
-    EL_SP_PORT_RIGHT,
-    EL_SP_PORT_DOWN,
-    EL_SP_PORT_LEFT,
-    EL_SP_PORT_UP,
-    EL_SP_GRAVITY_PORT_RIGHT,
-    EL_SP_GRAVITY_PORT_DOWN,
-    EL_SP_GRAVITY_PORT_LEFT,
-    EL_SP_GRAVITY_PORT_UP,
-    EL_SP_PORT_HORIZONTAL,
-    EL_SP_PORT_VERTICAL,
-    EL_SP_PORT_ANY,
-    EL_SP_DISK_RED,
-    EL_SP_DISK_YELLOW,
+    EL_EXIT_CLOSED,
+    EL_EXIT_OPENING,
+    EL_EXIT_OPEN,
+    EL_WALL,
+    EL_WALL_CRUMBLED,
+    EL_EXPANDABLE_WALL,
+    EL_EXPANDABLE_WALL_HORIZONTAL,
+    EL_EXPANDABLE_WALL_VERTICAL,
+    EL_EXPANDABLE_WALL_ANY,
+    EL_EXPANDABLE_WALL_GROWING,
+    EL_BD_WALL,
     EL_SP_CHIP_SINGLE,
     EL_SP_CHIP_LEFT,
     EL_SP_CHIP_RIGHT,
@@ -1805,30 +1732,14 @@ void InitElementPropertiesStatic()
     EL_SP_HARDWARE_BASE_4,
     EL_SP_HARDWARE_BASE_5,
     EL_SP_HARDWARE_BASE_6,
-    EL_CONVEYOR_BELT_1_SWITCH_LEFT,
-    EL_CONVEYOR_BELT_1_SWITCH_MIDDLE,
-    EL_CONVEYOR_BELT_1_SWITCH_RIGHT,
-    EL_CONVEYOR_BELT_2_SWITCH_LEFT,
-    EL_CONVEYOR_BELT_2_SWITCH_MIDDLE,
-    EL_CONVEYOR_BELT_2_SWITCH_RIGHT,
-    EL_CONVEYOR_BELT_3_SWITCH_LEFT,
-    EL_CONVEYOR_BELT_3_SWITCH_MIDDLE,
-    EL_CONVEYOR_BELT_3_SWITCH_RIGHT,
-    EL_CONVEYOR_BELT_4_SWITCH_LEFT,
-    EL_CONVEYOR_BELT_4_SWITCH_MIDDLE,
-    EL_CONVEYOR_BELT_4_SWITCH_RIGHT,
-    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_SP_TERMINAL,
+    EL_SP_TERMINAL_ACTIVE,
+    EL_SP_EXIT_CLOSED,
+    EL_SP_EXIT_OPEN,
+    EL_INVISIBLE_STEELWALL,
+    EL_INVISIBLE_STEELWALL_ACTIVE,
+    EL_INVISIBLE_WALL,
+    EL_INVISIBLE_WALL_ACTIVE,
     EL_STEELWALL_SLANTED,
     EL_EMC_STEELWALL_1,
     EL_EMC_STEELWALL_2,
@@ -1845,82 +1756,123 @@ void InitElementPropertiesStatic()
     -1
   };
 
-  static int ep_explosive[] =
+  static int ep_historic_solid[] =
   {
-    EL_BOMB,
-    EL_DYNAMITE_ACTIVE,
-    EL_DYNAMITE,
-    EL_DYNABOMB_PLAYER_1_ACTIVE,
-    EL_DYNABOMB_PLAYER_2_ACTIVE,
-    EL_DYNABOMB_PLAYER_3_ACTIVE,
-    EL_DYNABOMB_PLAYER_4_ACTIVE,
-    EL_DYNABOMB_INCREASE_NUMBER,
-    EL_DYNABOMB_INCREASE_SIZE,
-    EL_DYNABOMB_INCREASE_POWER,
-    EL_SP_DISK_RED_ACTIVE,
-    EL_BUG,
-    EL_MOLE,
-    EL_PENGUIN,
-    EL_PIG,
-    EL_DRAGON,
-    EL_SATELLITE,
-    EL_SP_DISK_RED,
-    EL_SP_DISK_ORANGE,
-    EL_SP_DISK_YELLOW,
-    EL_SP_SNIKSNAK,
-    EL_SP_ELECTRON,
-    EL_DX_SUPABOMB,
-    -1
-  };
-
-  static int ep_food_penguin[] =
-  {
-    EL_EMERALD,
-    EL_BD_DIAMOND,
-    EL_EMERALD_YELLOW,
-    EL_EMERALD_RED,
-    EL_EMERALD_PURPLE,
-    EL_DIAMOND,
-    EL_PEARL,
-    EL_CRYSTAL,
-    -1
-  };
-
-  static int ep_pushable[] =
-  {
-    EL_ROCK,
-    EL_BD_ROCK,
-    EL_BOMB,
-    EL_NUT,
-    EL_TIME_ORB_EMPTY,
-    EL_SOKOBAN_FIELD_FULL,
-    EL_SOKOBAN_OBJECT,
-    EL_SATELLITE,
-    EL_SP_ZONK,
-    EL_SP_DISK_ORANGE,
-    EL_SP_DISK_YELLOW,
-    EL_BALLOON,
-    EL_SPRING,
-    EL_DX_SUPABOMB,
-    -1
-  };
-
-  static int ep_player[] =
-  {
-    EL_PLAYER_1,
-    EL_PLAYER_2,
-    EL_PLAYER_3,
-    EL_PLAYER_4,
-    -1
-  };
-
-  static int ep_walkable_over[] =
-  {
-    EL_EMPTY_SPACE,
-    EL_SP_EMPTY_SPACE,
-    EL_SOKOBAN_FIELD_EMPTY,
+    EL_WALL,
+    EL_EXPANDABLE_WALL,
+    EL_EXPANDABLE_WALL_HORIZONTAL,
+    EL_EXPANDABLE_WALL_VERTICAL,
+    EL_EXPANDABLE_WALL_ANY,
+    EL_BD_WALL,
+    EL_WALL_CRUMBLED,
+    EL_EXIT_CLOSED,
+    EL_EXIT_OPENING,
     EL_EXIT_OPEN,
+    EL_AMOEBA_DEAD,
+    EL_AMOEBA_WET,
+    EL_AMOEBA_DRY,
+    EL_AMOEBA_FULL,
+    EL_BD_AMOEBA,
+    EL_QUICKSAND_EMPTY,
+    EL_QUICKSAND_FULL,
+    EL_QUICKSAND_FILLING,
+    EL_QUICKSAND_EMPTYING,
+    EL_MAGIC_WALL,
+    EL_MAGIC_WALL_ACTIVE,
+    EL_MAGIC_WALL_EMPTYING,
+    EL_MAGIC_WALL_FILLING,
+    EL_MAGIC_WALL_FULL,
+    EL_MAGIC_WALL_DEAD,
+    EL_BD_MAGIC_WALL,
+    EL_BD_MAGIC_WALL_ACTIVE,
+    EL_BD_MAGIC_WALL_EMPTYING,
+    EL_BD_MAGIC_WALL_FULL,
+    EL_BD_MAGIC_WALL_FILLING,
+    EL_BD_MAGIC_WALL_DEAD,
+    EL_GAME_OF_LIFE,
+    EL_BIOMAZE,
+    EL_SP_CHIP_SINGLE,
+    EL_SP_CHIP_LEFT,
+    EL_SP_CHIP_RIGHT,
+    EL_SP_CHIP_TOP,
+    EL_SP_CHIP_BOTTOM,
+    EL_SP_TERMINAL,
+    EL_SP_TERMINAL_ACTIVE,
+    EL_SP_EXIT_CLOSED,
     EL_SP_EXIT_OPEN,
+    EL_INVISIBLE_WALL,
+    EL_INVISIBLE_WALL_ACTIVE,
+    EL_SWITCHGATE_SWITCH_UP,
+    EL_SWITCHGATE_SWITCH_DOWN,
+    EL_TIMEGATE_SWITCH,
+    EL_TIMEGATE_SWITCH_ACTIVE,
+    EL_EMC_WALL_1,
+    EL_EMC_WALL_2,
+    EL_EMC_WALL_3,
+    EL_EMC_WALL_4,
+    EL_EMC_WALL_5,
+    EL_EMC_WALL_6,
+    EL_EMC_WALL_7,
+    EL_EMC_WALL_8,
+    EL_WALL_PEARL,
+    EL_WALL_CRYSTAL,
+
+    /* the following elements are a direct copy of "indestructible" elements,
+       except "EL_ACID", which is "indestructible", but not "solid"! */
+#if 0
+    EL_ACID,
+#endif
+    EL_STEELWALL,
+    EL_ACID_POOL_TOPLEFT,
+    EL_ACID_POOL_TOPRIGHT,
+    EL_ACID_POOL_BOTTOMLEFT,
+    EL_ACID_POOL_BOTTOM,
+    EL_ACID_POOL_BOTTOMRIGHT,
+    EL_SP_HARDWARE_GRAY,
+    EL_SP_HARDWARE_GREEN,
+    EL_SP_HARDWARE_BLUE,
+    EL_SP_HARDWARE_RED,
+    EL_SP_HARDWARE_YELLOW,
+    EL_SP_HARDWARE_BASE_1,
+    EL_SP_HARDWARE_BASE_2,
+    EL_SP_HARDWARE_BASE_3,
+    EL_SP_HARDWARE_BASE_4,
+    EL_SP_HARDWARE_BASE_5,
+    EL_SP_HARDWARE_BASE_6,
+    EL_INVISIBLE_STEELWALL,
+    EL_INVISIBLE_STEELWALL_ACTIVE,
+    EL_CONVEYOR_BELT_1_SWITCH_LEFT,
+    EL_CONVEYOR_BELT_1_SWITCH_MIDDLE,
+    EL_CONVEYOR_BELT_1_SWITCH_RIGHT,
+    EL_CONVEYOR_BELT_2_SWITCH_LEFT,
+    EL_CONVEYOR_BELT_2_SWITCH_MIDDLE,
+    EL_CONVEYOR_BELT_2_SWITCH_RIGHT,
+    EL_CONVEYOR_BELT_3_SWITCH_LEFT,
+    EL_CONVEYOR_BELT_3_SWITCH_MIDDLE,
+    EL_CONVEYOR_BELT_3_SWITCH_RIGHT,
+    EL_CONVEYOR_BELT_4_SWITCH_LEFT,
+    EL_CONVEYOR_BELT_4_SWITCH_MIDDLE,
+    EL_CONVEYOR_BELT_4_SWITCH_RIGHT,
+    EL_LIGHT_SWITCH,
+    EL_LIGHT_SWITCH_ACTIVE,
+    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_STEELWALL_SLANTED,
+    EL_EMC_STEELWALL_1,
+    EL_EMC_STEELWALL_2,
+    EL_EMC_STEELWALL_3,
+    EL_EMC_STEELWALL_4,
+    EL_CRYSTAL,
     EL_GATE_1,
     EL_GATE_2,
     EL_GATE_3,
@@ -1929,11 +1881,22 @@ void InitElementPropertiesStatic()
     EL_GATE_2_GRAY,
     EL_GATE_3_GRAY,
     EL_GATE_4_GRAY,
-    -1
-  };
-
-  static int ep_walkable_inside[] =
-  {
+    EL_EM_GATE_1,
+    EL_EM_GATE_2,
+    EL_EM_GATE_3,
+    EL_EM_GATE_4,
+    EL_EM_GATE_1_GRAY,
+    EL_EM_GATE_2_GRAY,
+    EL_EM_GATE_3_GRAY,
+    EL_EM_GATE_4_GRAY,
+    EL_SWITCHGATE_OPEN,
+    EL_SWITCHGATE_OPENING,
+    EL_SWITCHGATE_CLOSED,
+    EL_SWITCHGATE_CLOSING,
+    EL_TIMEGATE_OPEN,
+    EL_TIMEGATE_OPENING,
+    EL_TIMEGATE_CLOSED,
+    EL_TIMEGATE_CLOSING,
     EL_TUBE_ANY,
     EL_TUBE_VERTICAL,
     EL_TUBE_HORIZONTAL,
@@ -1948,171 +1911,201 @@ void InitElementPropertiesStatic()
     -1
   };
 
-  static int ep_walkable_under[] =
-  {
-    -1
-  };
-
-  static int ep_passable_over[] =
+  static int ep_belt[] =
   {
-    EL_EM_GATE_1,
-    EL_EM_GATE_2,
-    EL_EM_GATE_3,
-    EL_EM_GATE_4,
-    EL_EM_GATE_1_GRAY,
-    EL_EM_GATE_2_GRAY,
-    EL_EM_GATE_3_GRAY,
-    EL_EM_GATE_4_GRAY,
-    EL_SWITCHGATE_OPEN,
-    EL_TIMEGATE_OPEN,
+    EL_CONVEYOR_BELT_1_LEFT,
+    EL_CONVEYOR_BELT_1_MIDDLE,
+    EL_CONVEYOR_BELT_1_RIGHT,
+    EL_CONVEYOR_BELT_2_LEFT,
+    EL_CONVEYOR_BELT_2_MIDDLE,
+    EL_CONVEYOR_BELT_2_RIGHT,
+    EL_CONVEYOR_BELT_3_LEFT,
+    EL_CONVEYOR_BELT_3_MIDDLE,
+    EL_CONVEYOR_BELT_3_RIGHT,
+    EL_CONVEYOR_BELT_4_LEFT,
+    EL_CONVEYOR_BELT_4_MIDDLE,
+    EL_CONVEYOR_BELT_4_RIGHT,
     -1
   };
 
-  static int ep_passable_inside[] =
+  static int ep_belt_active[] =
   {
-    EL_SP_PORT_LEFT,
-    EL_SP_PORT_RIGHT,
-    EL_SP_PORT_UP,
-    EL_SP_PORT_DOWN,
-    EL_SP_PORT_HORIZONTAL,
-    EL_SP_PORT_VERTICAL,
-    EL_SP_PORT_ANY,
-    EL_SP_GRAVITY_PORT_LEFT,
-    EL_SP_GRAVITY_PORT_RIGHT,
-    EL_SP_GRAVITY_PORT_UP,
-    EL_SP_GRAVITY_PORT_DOWN,
+    EL_CONVEYOR_BELT_1_LEFT_ACTIVE,
+    EL_CONVEYOR_BELT_1_MIDDLE_ACTIVE,
+    EL_CONVEYOR_BELT_1_RIGHT_ACTIVE,
+    EL_CONVEYOR_BELT_2_LEFT_ACTIVE,
+    EL_CONVEYOR_BELT_2_MIDDLE_ACTIVE,
+    EL_CONVEYOR_BELT_2_RIGHT_ACTIVE,
+    EL_CONVEYOR_BELT_3_LEFT_ACTIVE,
+    EL_CONVEYOR_BELT_3_MIDDLE_ACTIVE,
+    EL_CONVEYOR_BELT_3_RIGHT_ACTIVE,
+    EL_CONVEYOR_BELT_4_LEFT_ACTIVE,
+    EL_CONVEYOR_BELT_4_MIDDLE_ACTIVE,
+    EL_CONVEYOR_BELT_4_RIGHT_ACTIVE,
     -1
   };
 
-  static int ep_passable_under[] =
+  static int ep_belt_switch[] =
   {
+    EL_CONVEYOR_BELT_1_SWITCH_LEFT,
+    EL_CONVEYOR_BELT_1_SWITCH_MIDDLE,
+    EL_CONVEYOR_BELT_1_SWITCH_RIGHT,
+    EL_CONVEYOR_BELT_2_SWITCH_LEFT,
+    EL_CONVEYOR_BELT_2_SWITCH_MIDDLE,
+    EL_CONVEYOR_BELT_2_SWITCH_RIGHT,
+    EL_CONVEYOR_BELT_3_SWITCH_LEFT,
+    EL_CONVEYOR_BELT_3_SWITCH_MIDDLE,
+    EL_CONVEYOR_BELT_3_SWITCH_RIGHT,
+    EL_CONVEYOR_BELT_4_SWITCH_LEFT,
+    EL_CONVEYOR_BELT_4_SWITCH_MIDDLE,
+    EL_CONVEYOR_BELT_4_SWITCH_RIGHT,
     -1
   };
 
-  static int ep_diggable[] =
+  static int ep_tube[] =
   {
-    EL_SAND,
-    EL_SP_BASE,
-    EL_SP_BUGGY_BASE,
-    EL_SP_BUGGY_BASE_ACTIVATING,
-    EL_TRAP,
-    EL_INVISIBLE_SAND,
-    EL_INVISIBLE_SAND_ACTIVE,
-#if 1
-    EL_LANDMINE,
-    EL_TRAP_ACTIVE,
-    EL_SP_BUGGY_BASE_ACTIVE,
-#endif
+    EL_TUBE_LEFT_UP,
+    EL_TUBE_LEFT_DOWN,
+    EL_TUBE_RIGHT_UP,
+    EL_TUBE_RIGHT_DOWN,
+    EL_TUBE_HORIZONTAL,
+    EL_TUBE_HORIZONTAL_UP,
+    EL_TUBE_HORIZONTAL_DOWN,
+    EL_TUBE_VERTICAL,
+    EL_TUBE_VERTICAL_LEFT,
+    EL_TUBE_VERTICAL_RIGHT,
+    EL_TUBE_ANY,
     -1
   };
 
-  static int ep_collectible[] =
+  static int ep_keygate[] =
   {
-    EL_BD_DIAMOND,
-    EL_EMERALD,
-    EL_DIAMOND,
-    EL_EMERALD_YELLOW,
-    EL_EMERALD_RED,
-    EL_EMERALD_PURPLE,
-    EL_KEY_1,
-    EL_KEY_2,
-    EL_KEY_3,
-    EL_KEY_4,
-    EL_EM_KEY_1,
-    EL_EM_KEY_2,
-    EL_EM_KEY_3,
-    EL_EM_KEY_4,
-    EL_DYNAMITE,
-    EL_DYNABOMB_INCREASE_NUMBER,
-    EL_DYNABOMB_INCREASE_SIZE,
-    EL_DYNABOMB_INCREASE_POWER,
-    EL_SP_INFOTRON,
-    EL_SP_DISK_RED,
-    EL_PEARL,
-    EL_CRYSTAL,
-    EL_KEY_WHITE,
-    EL_SHIELD_NORMAL,
-    EL_SHIELD_DEADLY,
-    EL_EXTRA_TIME,
-    EL_ENVELOPE,
-    EL_SPEED_PILL,
+    EL_GATE_1,
+    EL_GATE_2,
+    EL_GATE_3,
+    EL_GATE_4,
+    EL_GATE_1_GRAY,
+    EL_GATE_2_GRAY,
+    EL_GATE_3_GRAY,
+    EL_GATE_4_GRAY,
+    EL_EM_GATE_1,
+    EL_EM_GATE_2,
+    EL_EM_GATE_3,
+    EL_EM_GATE_4,
+    EL_EM_GATE_1_GRAY,
+    EL_EM_GATE_2_GRAY,
+    EL_EM_GATE_3_GRAY,
+    EL_EM_GATE_4_GRAY,
     -1
   };
 
-  static int ep_active_bomb[] =
+  static int ep_amoeboid[] =
   {
-    EL_DYNAMITE_ACTIVE,
-    EL_DYNABOMB_PLAYER_1_ACTIVE,
-    EL_DYNABOMB_PLAYER_2_ACTIVE,
-    EL_DYNABOMB_PLAYER_3_ACTIVE,
-    EL_DYNABOMB_PLAYER_4_ACTIVE,
-    EL_SP_DISK_RED_ACTIVE,
+    EL_AMOEBA_DEAD,
+    EL_AMOEBA_WET,
+    EL_AMOEBA_DRY,
+    EL_AMOEBA_FULL,
+    EL_BD_AMOEBA,
     -1
   };
 
-  static int ep_belt[] =
+  static int ep_amoebalive[] =
   {
-    EL_CONVEYOR_BELT_1_LEFT,
-    EL_CONVEYOR_BELT_1_MIDDLE,
-    EL_CONVEYOR_BELT_1_RIGHT,
-    EL_CONVEYOR_BELT_2_LEFT,
-    EL_CONVEYOR_BELT_2_MIDDLE,
-    EL_CONVEYOR_BELT_2_RIGHT,
-    EL_CONVEYOR_BELT_3_LEFT,
-    EL_CONVEYOR_BELT_3_MIDDLE,
-    EL_CONVEYOR_BELT_3_RIGHT,
-    EL_CONVEYOR_BELT_4_LEFT,
-    EL_CONVEYOR_BELT_4_MIDDLE,
-    EL_CONVEYOR_BELT_4_RIGHT,
+    EL_AMOEBA_WET,
+    EL_AMOEBA_DRY,
+    EL_AMOEBA_FULL,
+    EL_BD_AMOEBA,
     -1
   };
 
-  static int ep_belt_active[] =
+  static int ep_has_content[] =
   {
-    EL_CONVEYOR_BELT_1_LEFT_ACTIVE,
-    EL_CONVEYOR_BELT_1_MIDDLE_ACTIVE,
-    EL_CONVEYOR_BELT_1_RIGHT_ACTIVE,
-    EL_CONVEYOR_BELT_2_LEFT_ACTIVE,
-    EL_CONVEYOR_BELT_2_MIDDLE_ACTIVE,
-    EL_CONVEYOR_BELT_2_RIGHT_ACTIVE,
-    EL_CONVEYOR_BELT_3_LEFT_ACTIVE,
-    EL_CONVEYOR_BELT_3_MIDDLE_ACTIVE,
-    EL_CONVEYOR_BELT_3_RIGHT_ACTIVE,
-    EL_CONVEYOR_BELT_4_LEFT_ACTIVE,
-    EL_CONVEYOR_BELT_4_MIDDLE_ACTIVE,
-    EL_CONVEYOR_BELT_4_RIGHT_ACTIVE,
+    EL_YAMYAM,
+    EL_AMOEBA_WET,
+    EL_AMOEBA_DRY,
+    EL_AMOEBA_FULL,
+    EL_BD_AMOEBA,
     -1
   };
 
-  static int ep_belt_switch[] =
+  static int ep_active_bomb[] =
   {
-    EL_CONVEYOR_BELT_1_SWITCH_LEFT,
-    EL_CONVEYOR_BELT_1_SWITCH_MIDDLE,
-    EL_CONVEYOR_BELT_1_SWITCH_RIGHT,
-    EL_CONVEYOR_BELT_2_SWITCH_LEFT,
-    EL_CONVEYOR_BELT_2_SWITCH_MIDDLE,
-    EL_CONVEYOR_BELT_2_SWITCH_RIGHT,
-    EL_CONVEYOR_BELT_3_SWITCH_LEFT,
-    EL_CONVEYOR_BELT_3_SWITCH_MIDDLE,
-    EL_CONVEYOR_BELT_3_SWITCH_RIGHT,
-    EL_CONVEYOR_BELT_4_SWITCH_LEFT,
-    EL_CONVEYOR_BELT_4_SWITCH_MIDDLE,
-    EL_CONVEYOR_BELT_4_SWITCH_RIGHT,
+    EL_DYNAMITE_ACTIVE,
+    EL_DYNABOMB_PLAYER_1_ACTIVE,
+    EL_DYNABOMB_PLAYER_2_ACTIVE,
+    EL_DYNABOMB_PLAYER_3_ACTIVE,
+    EL_DYNABOMB_PLAYER_4_ACTIVE,
+    EL_SP_DISK_RED_ACTIVE,
     -1
   };
 
-  static int ep_sp_element[] =
+  static int ep_inactive[] =
   {
+    EL_EMPTY,
+    EL_SAND,
+    EL_WALL,
+    EL_BD_WALL,
+    EL_WALL_CRUMBLED,
+    EL_STEELWALL,
+    EL_AMOEBA_DEAD,
+    EL_QUICKSAND_EMPTY,
+    EL_STONEBLOCK,
+    EL_ROBOT_WHEEL,
+    EL_KEY_1,
+    EL_KEY_2,
+    EL_KEY_3,
+    EL_KEY_4,
+    EL_EM_KEY_1,
+    EL_EM_KEY_2,
+    EL_EM_KEY_3,
+    EL_EM_KEY_4,
+    EL_GATE_1,
+    EL_GATE_2,
+    EL_GATE_3,
+    EL_GATE_4,
+    EL_GATE_1_GRAY,
+    EL_GATE_2_GRAY,
+    EL_GATE_3_GRAY,
+    EL_GATE_4_GRAY,
+    EL_EM_GATE_1,
+    EL_EM_GATE_2,
+    EL_EM_GATE_3,
+    EL_EM_GATE_4,
+    EL_EM_GATE_1_GRAY,
+    EL_EM_GATE_2_GRAY,
+    EL_EM_GATE_3_GRAY,
+    EL_EM_GATE_4_GRAY,
+    EL_DYNAMITE,
+    EL_INVISIBLE_STEELWALL,
+    EL_INVISIBLE_WALL,
+    EL_INVISIBLE_SAND,
+    EL_LAMP,
+    EL_LAMP_ACTIVE,
+    EL_WALL_EMERALD,
+    EL_WALL_DIAMOND,
+    EL_WALL_BD_DIAMOND,
+    EL_WALL_EMERALD_YELLOW,
+    EL_DYNABOMB_INCREASE_NUMBER,
+    EL_DYNABOMB_INCREASE_SIZE,
+    EL_DYNABOMB_INCREASE_POWER,
+    EL_SOKOBAN_OBJECT,
+    EL_SOKOBAN_FIELD_EMPTY,
+    EL_SOKOBAN_FIELD_FULL,
+    EL_WALL_EMERALD_RED,
+    EL_WALL_EMERALD_PURPLE,
+    EL_ACID_POOL_TOPLEFT,
+    EL_ACID_POOL_TOPRIGHT,
+    EL_ACID_POOL_BOTTOMLEFT,
+    EL_ACID_POOL_BOTTOM,
+    EL_ACID_POOL_BOTTOMRIGHT,
+    EL_MAGIC_WALL,
+    EL_MAGIC_WALL_DEAD,
+    EL_BD_MAGIC_WALL,
+    EL_BD_MAGIC_WALL_DEAD,
+    EL_AMOEBA_TO_DIAMOND,
+    EL_BLOCKED,
     EL_SP_EMPTY,
-    EL_SP_ZONK,
     EL_SP_BASE,
-    EL_SP_MURPHY,
-    EL_SP_INFOTRON,
-    EL_SP_CHIP_SINGLE,
-    EL_SP_HARDWARE_GRAY,
-    EL_SP_EXIT_CLOSED,
-    EL_SP_EXIT_OPEN,
-    EL_SP_DISK_ORANGE,
     EL_SP_PORT_RIGHT,
     EL_SP_PORT_DOWN,
     EL_SP_PORT_LEFT,
@@ -2121,59 +2114,64 @@ void InitElementPropertiesStatic()
     EL_SP_GRAVITY_PORT_DOWN,
     EL_SP_GRAVITY_PORT_LEFT,
     EL_SP_GRAVITY_PORT_UP,
-    EL_SP_SNIKSNAK,
-    EL_SP_DISK_YELLOW,
-    EL_SP_TERMINAL,
-    EL_SP_DISK_RED,
-    EL_SP_PORT_VERTICAL,
     EL_SP_PORT_HORIZONTAL,
+    EL_SP_PORT_VERTICAL,
     EL_SP_PORT_ANY,
-    EL_SP_ELECTRON,
-    EL_SP_BUGGY_BASE,
+    EL_SP_DISK_RED,
+    EL_SP_DISK_YELLOW,
+    EL_SP_CHIP_SINGLE,
     EL_SP_CHIP_LEFT,
     EL_SP_CHIP_RIGHT,
-    EL_SP_HARDWARE_BASE_1,
+    EL_SP_CHIP_TOP,
+    EL_SP_CHIP_BOTTOM,
+    EL_SP_HARDWARE_GRAY,
     EL_SP_HARDWARE_GREEN,
     EL_SP_HARDWARE_BLUE,
     EL_SP_HARDWARE_RED,
     EL_SP_HARDWARE_YELLOW,
+    EL_SP_HARDWARE_BASE_1,
     EL_SP_HARDWARE_BASE_2,
     EL_SP_HARDWARE_BASE_3,
     EL_SP_HARDWARE_BASE_4,
     EL_SP_HARDWARE_BASE_5,
     EL_SP_HARDWARE_BASE_6,
-    EL_SP_CHIP_TOP,
-    EL_SP_CHIP_BOTTOM,
-    /* additional elements that appeared in newer Supaplex levels */
-    EL_INVISIBLE_WALL,
-    /* more than one murphy in a level results in an inactive clone */
-    EL_SP_MURPHY_CLONE,
-    -1
-  };
-
-  static int ep_has_content[] =
-  {
-    EL_YAMYAM,
-    EL_AMOEBA_WET,
-    EL_AMOEBA_DRY,
-    EL_AMOEBA_FULL,
-    EL_BD_AMOEBA,
-    -1
-  };
-
-  static int ep_tube[] =
-  {
-    EL_TUBE_LEFT_UP,
-    EL_TUBE_LEFT_DOWN,
-    EL_TUBE_RIGHT_UP,
-    EL_TUBE_RIGHT_DOWN,
-    EL_TUBE_HORIZONTAL,
-    EL_TUBE_HORIZONTAL_UP,
-    EL_TUBE_HORIZONTAL_DOWN,
-    EL_TUBE_VERTICAL,
-    EL_TUBE_VERTICAL_LEFT,
-    EL_TUBE_VERTICAL_RIGHT,
-    EL_TUBE_ANY,
+    EL_CONVEYOR_BELT_1_SWITCH_LEFT,
+    EL_CONVEYOR_BELT_1_SWITCH_MIDDLE,
+    EL_CONVEYOR_BELT_1_SWITCH_RIGHT,
+    EL_CONVEYOR_BELT_2_SWITCH_LEFT,
+    EL_CONVEYOR_BELT_2_SWITCH_MIDDLE,
+    EL_CONVEYOR_BELT_2_SWITCH_RIGHT,
+    EL_CONVEYOR_BELT_3_SWITCH_LEFT,
+    EL_CONVEYOR_BELT_3_SWITCH_MIDDLE,
+    EL_CONVEYOR_BELT_3_SWITCH_RIGHT,
+    EL_CONVEYOR_BELT_4_SWITCH_LEFT,
+    EL_CONVEYOR_BELT_4_SWITCH_MIDDLE,
+    EL_CONVEYOR_BELT_4_SWITCH_RIGHT,
+    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_STEELWALL_SLANTED,
+    EL_EMC_STEELWALL_1,
+    EL_EMC_STEELWALL_2,
+    EL_EMC_STEELWALL_3,
+    EL_EMC_STEELWALL_4,
+    EL_EMC_WALL_1,
+    EL_EMC_WALL_2,
+    EL_EMC_WALL_3,
+    EL_EMC_WALL_4,
+    EL_EMC_WALL_5,
+    EL_EMC_WALL_6,
+    EL_EMC_WALL_7,
+    EL_EMC_WALL_8,
     -1
   };
 
@@ -2183,47 +2181,47 @@ void InitElementPropertiesStatic()
     int property;
   } element_properties[] =
   {
-    { ep_amoebalive,           EP_AMOEBALIVE           },
-    { ep_amoeboid,             EP_AMOEBOID             },
-    { ep_keygate,              EP_KEYGATE              },
-    { ep_can_be_crumbled,      EP_CAN_BE_CRUMBLED      },
-    { ep_historic_solid,       EP_HISTORIC_SOLID       },
+    { ep_diggable,             EP_DIGGABLE             },
+    { ep_collectible,          EP_COLLECTIBLE          },
     { ep_indestructible,       EP_INDESTRUCTIBLE       },
     { ep_slippery,             EP_SLIPPERY             },
-    { ep_enemy,                        EP_ENEMY                },
-    { ep_historic_wall,                EP_HISTORIC_WALL        },
     { ep_can_fall,             EP_CAN_FALL             },
     { ep_can_smash,            EP_CAN_SMASH            },
-    { ep_can_change,           EP_CAN_CHANGE           },
-    { ep_can_move,             EP_CAN_MOVE             },
-    { ep_could_move,           EP_COULD_MOVE           },
-    { ep_dont_touch,           EP_DONT_TOUCH           },
-    { ep_dont_go_to,           EP_DONT_GO_TO           },
-    { ep_food_dark_yamyam,     EP_FOOD_DARK_YAMYAM     },
-    { ep_bd_element,           EP_BD_ELEMENT           },
-    { ep_sb_element,           EP_SB_ELEMENT           },
-    { ep_gem,                  EP_GEM                  },
-    { ep_inactive,             EP_INACTIVE             },
-    { ep_explosive,            EP_EXPLOSIVE            },
-    { ep_food_penguin,         EP_FOOD_PENGUIN         },
-    { ep_pushable,             EP_PUSHABLE             },
-    { ep_player,               EP_PLAYER               },
     { ep_walkable_over,                EP_WALKABLE_OVER        },
     { ep_walkable_inside,      EP_WALKABLE_INSIDE      },
     { ep_walkable_under,       EP_WALKABLE_UNDER       },
     { ep_passable_over,                EP_PASSABLE_OVER        },
     { ep_passable_inside,      EP_PASSABLE_INSIDE      },
     { ep_passable_under,       EP_PASSABLE_UNDER       },
+    { ep_pushable,             EP_PUSHABLE             },
 
-    { ep_diggable,             EP_DIGGABLE             },
-    { ep_collectible,          EP_COLLECTIBLE          },
-    { ep_active_bomb,          EP_ACTIVE_BOMB          },
+    { ep_player,               EP_PLAYER               },
+    { ep_can_be_crumbled,      EP_CAN_BE_CRUMBLED      },
+    { ep_can_move,             EP_CAN_MOVE             },
+    { ep_can_change,           EP_CAN_CHANGE           },
+    { ep_dont_touch,           EP_DONT_TOUCH           },
+    { ep_enemy,                        EP_ENEMY                },
+    { ep_dont_go_to,           EP_DONT_GO_TO           },
+    { ep_explosive,            EP_EXPLOSIVE            },
+    { ep_bd_element,           EP_BD_ELEMENT           },
+    { ep_sp_element,           EP_SP_ELEMENT           },
+    { ep_sb_element,           EP_SB_ELEMENT           },
+    { ep_gem,                  EP_GEM                  },
+    { ep_food_dark_yamyam,     EP_FOOD_DARK_YAMYAM     },
+    { ep_food_penguin,         EP_FOOD_PENGUIN         },
+    { ep_historic_wall,                EP_HISTORIC_WALL        },
+    { ep_historic_solid,       EP_HISTORIC_SOLID       },
     { ep_belt,                 EP_BELT                 },
     { ep_belt_active,          EP_BELT_ACTIVE          },
     { ep_belt_switch,          EP_BELT_SWITCH          },
-    { ep_sp_element,           EP_SP_ELEMENT           },
-    { ep_has_content,          EP_HAS_CONTENT          },
     { ep_tube,                 EP_TUBE                 },
+    { ep_keygate,              EP_KEYGATE              },
+    { ep_amoeboid,             EP_AMOEBOID             },
+    { ep_amoebalive,           EP_AMOEBALIVE           },
+    { ep_has_content,          EP_HAS_CONTENT          },
+    { ep_active_bomb,          EP_ACTIVE_BOMB          },
+    { ep_inactive,             EP_INACTIVE             },
+
     { NULL,                    -1                      }
   };
 
@@ -2249,14 +2247,12 @@ void InitElementPropertiesEngine(int engine_version)
     EP_AMOEBALIVE,
     EP_AMOEBOID,
     EP_PFORTE,
-    EP_SOLID,
     EP_ENEMY,
     EP_MAUER,
     EP_CAN_FALL,
     EP_CAN_SMASH,
     EP_CAN_CHANGE,
     EP_CAN_MOVE,
-    EP_COULD_MOVE,
     EP_DONT_TOUCH,
     EP_DONT_GO_TO,
     EP_GEM,
@@ -2287,7 +2283,6 @@ void InitElementPropertiesEngine(int engine_version)
     EP_CAN_FALL,
     EP_CAN_SMASH,
     EP_CAN_MOVE,
-    EP_COULD_MOVE,
     EP_DONT_GO_TO,
     EP_FOOD_DARK_YAMYAM,
     EP_GEM,
@@ -2343,16 +2338,17 @@ void InitElementPropertiesEngine(int engine_version)
     if (IS_HISTORIC_WALL(i))
       SET_PROPERTY(i, EP_WALL, TRUE);
 
-    /* ---------- SOLID ---------------------------------------------------- */
+    /* ---------- SOLID_FOR_PUSHING ---------------------------------------- */
     if (engine_version < VERSION_IDENT(2,2,0))
-      SET_PROPERTY(i, EP_SOLID, IS_HISTORIC_SOLID(i));
+      SET_PROPERTY(i, EP_SOLID_FOR_PUSHING, IS_HISTORIC_SOLID(i));
     else
-      SET_PROPERTY(i, EP_SOLID, (!IS_WALKABLE(i) &&
-                                !IS_DIGGABLE(i) &&
-                                !IS_COLLECTIBLE(i)));
+      SET_PROPERTY(i, EP_SOLID_FOR_PUSHING, (!IS_WALKABLE(i) &&
+                                            !IS_DIGGABLE(i) &&
+                                            !IS_COLLECTIBLE(i)));
 
     /* ---------- DRAGONFIRE_PROOF ----------------------------------------- */
-    if (IS_HISTORIC_SOLID(i) || i == EL_EXPLOSION)
+    if (IS_HISTORIC_SOLID(i) || i == EL_EXPLOSION ||
+       (IS_CUSTOM_ELEMENT(i) && IS_INDESTRUCTIBLE(i)))
       SET_PROPERTY(i, EP_DRAGONFIRE_PROOF, TRUE);
 
     /* ---------- EXPLOSION_PROOF ------------------------------------------ */
@@ -2559,37 +2555,43 @@ static void InitArtworkConfig()
   static char *direction_id_suffix[NUM_DIRECTIONS + 1];
   static char *special_id_suffix[NUM_SPECIAL_GFX_ARGS + 1];
   static char *dummy[1] = { NULL };
-  static char *ignore_image_tokens[] =
-  {
-    "name",
-    "sort_priority",
-    "global.num_toons",
-    "menu.draw_xoffset",
-    "menu.draw_yoffset",
-    "menu.draw_xoffset.MAIN",
-    "menu.draw_yoffset.MAIN",
-    "menu.draw_xoffset.LEVELS",
-    "menu.draw_yoffset.LEVELS",
-    "menu.draw_xoffset.SCORES",
-    "menu.draw_yoffset.SCORES",
-    "menu.draw_xoffset.EDITOR",
-    "menu.draw_yoffset.EDITOR",
-    "menu.draw_xoffset.INFO",
-    "menu.draw_yoffset.INFO",
-    "menu.draw_xoffset.SETUP",
-    "menu.draw_yoffset.SETUP",
-    "door.step_offset",
-    "door.step_delay",
-    NULL
-  };
-  static char *ignore_sound_tokens[] =
+  static char *ignore_generic_tokens[] =
   {
     "name",
     "sort_priority",
     NULL
   };
+  static char **ignore_image_tokens, **ignore_sound_tokens;
+  int num_ignore_generic_tokens;
+  int num_ignore_image_tokens, num_ignore_sound_tokens;
   int i;
 
+  /* dynamically determine list of generic tokens to be ignored */
+  num_ignore_generic_tokens = 0;
+  for (i=0; ignore_generic_tokens[i] != NULL; i++)
+    num_ignore_generic_tokens++;
+
+  /* dynamically determine list of image tokens to be ignored */
+  num_ignore_image_tokens = num_ignore_generic_tokens;
+  for (i=0; image_config_vars[i].token != NULL; i++)
+    num_ignore_image_tokens++;
+  ignore_image_tokens =
+    checked_malloc((num_ignore_image_tokens + 1) * sizeof(char *));
+  for (i=0; i < num_ignore_generic_tokens; i++)
+    ignore_image_tokens[i] = ignore_generic_tokens[i];
+  for (i=0; i < num_ignore_image_tokens - num_ignore_generic_tokens; i++)
+    ignore_image_tokens[num_ignore_generic_tokens + i] =
+      image_config_vars[i].token;
+  ignore_image_tokens[num_ignore_image_tokens] = NULL;
+
+  /* dynamically determine list of sound tokens to be ignored */
+  num_ignore_sound_tokens = num_ignore_generic_tokens;
+  ignore_sound_tokens =
+    checked_malloc((num_ignore_sound_tokens + 1) * sizeof(char *));
+  for (i=0; i < num_ignore_generic_tokens; i++)
+    ignore_sound_tokens[i] = ignore_generic_tokens[i];
+  ignore_sound_tokens[num_ignore_sound_tokens] = NULL;
+
   for (i=0; i<MAX_NUM_ELEMENTS; i++)
     image_id_prefix[i] = element_info[i].token_name;
   for (i=0; i<NUM_FONTS; i++)
index 706c4fda6dfe9c842e84b2aacaf1f7138b868424..ec071ef7556c8b57faf948deb819919049595d09 100644 (file)
@@ -545,6 +545,12 @@ struct ConfigInfo
   int type;
 };
 
+struct TokenIntPtrInfo
+{
+  char *token;
+  int *value;
+};
+
 struct FileInfo
 {
   char *token;
index a3f250949dacbfaf48f306523e1217bcf81a83a9..4f1b196dea116e6f95b9f656e82692f6ea33fba9 100644 (file)
@@ -92,6 +92,8 @@ struct TapeInfo               tape;
 struct SetupInfo       setup;
 struct GameInfo                game;
 struct GlobalInfo      global;
+struct MenuInfo                menu;
+struct DoorInfo                door;
 struct GraphicInfo     *graphic_info = NULL;
 struct SoundInfo       *sound_info = NULL;
 
@@ -3000,6 +3002,30 @@ struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1] =
   { NULL,              0,                              }
 };
 
+struct TokenIntPtrInfo image_config_vars[] =
+{
+  { "global.num_toons",                &global.num_toons                          },
+  { "menu.draw_xoffset",       &menu.draw_xoffset_default                 },
+  { "menu.draw_yoffset",       &menu.draw_yoffset_default                 },
+  { "menu.draw_xoffset.MAIN",  &menu.draw_xoffset[GFX_SPECIAL_ARG_MAIN]   },
+  { "menu.draw_yoffset.MAIN",  &menu.draw_yoffset[GFX_SPECIAL_ARG_MAIN]   },
+  { "menu.draw_xoffset.LEVELS",        &menu.draw_xoffset[GFX_SPECIAL_ARG_LEVELS] },
+  { "menu.draw_yoffset.LEVELS",        &menu.draw_yoffset[GFX_SPECIAL_ARG_LEVELS] },
+  { "menu.draw_xoffset.SCORES",        &menu.draw_xoffset[GFX_SPECIAL_ARG_SCORES] },
+  { "menu.draw_yoffset.SCORES",        &menu.draw_yoffset[GFX_SPECIAL_ARG_SCORES] },
+  { "menu.draw_xoffset.EDITOR",        &menu.draw_xoffset[GFX_SPECIAL_ARG_EDITOR] },
+  { "menu.draw_yoffset.EDITOR",        &menu.draw_yoffset[GFX_SPECIAL_ARG_EDITOR] },
+  { "menu.draw_xoffset.INFO",  &menu.draw_xoffset[GFX_SPECIAL_ARG_INFO]   },
+  { "menu.draw_yoffset.INFO",  &menu.draw_yoffset[GFX_SPECIAL_ARG_INFO]   },
+  { "menu.draw_xoffset.SETUP", &menu.draw_xoffset[GFX_SPECIAL_ARG_SETUP]  },
+  { "menu.draw_yoffset.SETUP", &menu.draw_yoffset[GFX_SPECIAL_ARG_SETUP]  },
+  { "door.step_offset",                &door.step_offset                          },
+  { "door.step_delay",         &door.step_delay                           },
+
+  { NULL,                      NULL,                                      }
+};
+
+
 /* ------------------------------------------------------------------------- */
 /* font definitions                                                          */
 /* ------------------------------------------------------------------------- */
index bfb6c400d831f33920545323a80ecc7c8f2f2f5a..2c7b84c3f40ff2610736974e80c192bb72c9d639 100644 (file)
 #define IN_SCR_FIELD(x,y) ((x)>=BX1 && (x)<=BX2 && (y)>=BY1 &&(y)<=BY2)
 #define IN_LEV_FIELD(x,y) ((x)>=0 && (x)<lev_fieldx && (y)>=0 &&(y)<lev_fieldy)
 
-/* values for base properties (storable) */
-#define EP_AMOEBALIVE          0
-#define EP_AMOEBOID            1
-#define EP_CAN_BE_CRUMBLED     2
-#define EP_KEYGATE             3
-#define EP_HISTORIC_SOLID      4
+/* values for configurable properties (custom elem's only, else pre-defined) */
+#define EP_DIGGABLE            0
+#define EP_COLLECTIBLE         1
+#define EP_UNUSED_2            2
+#define EP_UNUSED_3            3
+#define EP_UNUSED_4            4
 #define EP_INDESTRUCTIBLE      5
 #define EP_SLIPPERY            6
-#define EP_ENEMY               7
-#define EP_HISTORIC_WALL       8
+#define EP_UNUSED_7            7
+#define EP_UNUSED_8            8
 #define EP_CAN_FALL            9
 #define EP_CAN_SMASH           10
-#define EP_CAN_CHANGE          11
-#define EP_CAN_MOVE            12
-#define EP_COULD_MOVE          13
-#define EP_DONT_TOUCH          14
-#define EP_DONT_GO_TO          15
-#define EP_FOOD_DARK_YAMYAM    16
-#define EP_EM_SLIPPERY_WALL    17
-#define EP_BD_ELEMENT          18
-#define EP_SB_ELEMENT          19
-#define EP_GEM                 20
-#define EP_INACTIVE            21
-#define EP_EXPLOSIVE           22
-#define EP_FOOD_PENGUIN                23
+#define EP_WALKABLE_OVER       11
+#define EP_WALKABLE_INSIDE     12
+#define EP_WALKABLE_UNDER      13
+#define EP_PASSABLE_OVER       14
+#define EP_PASSABLE_INSIDE     15
+#define EP_PASSABLE_UNDER      16
+#define EP_UNUSED_17           17
+#define EP_UNUSED_18           18
+#define EP_UNUSED_19           19
+#define EP_UNUSED_20           20
+#define EP_UNUSED_21           21
+#define EP_UNUSED_22           22
+#define EP_UNUSED_23           23
 #define EP_PUSHABLE            24
-#define EP_PLAYER              25
-#define EP_WALKABLE_OVER       26
-#define EP_WALKABLE_INSIDE     27
-#define EP_WALKABLE_UNDER      28
-#define EP_PASSABLE_OVER       29
-#define EP_PASSABLE_INSIDE     30
-#define EP_PASSABLE_UNDER      31
-
-/* values for runtime properties (non-storable) */
-#define EP_ACCESSIBLE_OVER     32
-#define EP_ACCESSIBLE_INSIDE   33
-#define EP_ACCESSIBLE_UNDER    34
-#define EP_WALKABLE            35
-#define EP_PASSABLE            36
-#define EP_ACCESSIBLE          37
-#define EP_DIGGABLE            38
-#define EP_COLLECTIBLE         39
-#define EP_ACTIVE_BOMB         40
-#define EP_BELT                        41
-#define EP_BELT_ACTIVE         42
-#define EP_BELT_SWITCH         43
-#define EP_SP_ELEMENT          44
-#define EP_HAS_CONTENT         45
-#define EP_TUBE                        46
-#define EP_WALL                        47
-#define EP_SOLID               48
-#define EP_DRAGONFIRE_PROOF    49
-#define EP_EXPLOSION_PROOF     50
-
-#define NUM_ELEMENT_PROPERTIES 51
+
+/* values for special configurable properties (depending on level settings) */
+#define EP_EM_SLIPPERY_WALL    25
+
+/* values for pre-defined properties */
+#define EP_PLAYER              26
+#define EP_CAN_BE_CRUMBLED     27
+#define EP_CAN_MOVE            28
+#define EP_CAN_CHANGE          29
+#define EP_DONT_TOUCH          30
+#define EP_ENEMY               31
+#define EP_DONT_GO_TO          32
+#define EP_EXPLOSIVE           33
+#define EP_BD_ELEMENT          34
+#define EP_SP_ELEMENT          35
+#define EP_SB_ELEMENT          36
+#define EP_GEM                 37
+#define EP_FOOD_DARK_YAMYAM    38
+#define EP_FOOD_PENGUIN                39
+#define EP_HISTORIC_WALL       40
+#define EP_HISTORIC_SOLID      41
+#define EP_BELT                        42
+#define EP_BELT_ACTIVE         43
+#define EP_BELT_SWITCH         44
+#define EP_TUBE                        45
+#define EP_KEYGATE             46
+#define EP_AMOEBOID            47
+#define EP_AMOEBALIVE          48
+#define EP_HAS_CONTENT         49
+#define EP_ACTIVE_BOMB         50
+#define EP_INACTIVE            51
+
+/* values for derived properties (determined from properties above) */
+#define EP_ACCESSIBLE_OVER     52
+#define EP_ACCESSIBLE_INSIDE   53
+#define EP_ACCESSIBLE_UNDER    54
+#define EP_WALKABLE            55
+#define EP_PASSABLE            56
+#define EP_ACCESSIBLE          57
+#define EP_WALL                        58
+#define EP_SOLID_FOR_PUSHING   59
+#define EP_DRAGONFIRE_PROOF    60
+#define EP_EXPLOSION_PROOF     61
+#define NUM_ELEMENT_PROPERTIES 63
 
 #define NUM_EP_BITFIELDS       ((NUM_ELEMENT_PROPERTIES + 31) / 32)
 #define EP_BITFIELD_BASE       0
                                 (PROPERTY_VAR(e,p) |=  PROPERTY_BIT(p)) : \
                                 (PROPERTY_VAR(e,p) &= ~PROPERTY_BIT(p)))
 
-/* macros for base properties */
-#define IS_AMOEBALIVE(e)       HAS_PROPERTY(e, EP_AMOEBALIVE)
-#define IS_AMOEBOID(e)         HAS_PROPERTY(e, EP_AMOEBOID)
-#define CAN_BE_CRUMBLED(e)     HAS_PROPERTY(e, EP_CAN_BE_CRUMBLED)
-#define IS_KEYGATE(e)          HAS_PROPERTY(e, EP_KEYGATE)
-#define IS_HISTORIC_SOLID(e)   HAS_PROPERTY(e, EP_HISTORIC_SOLID)
+/* macros for configurable properties */
+#define IS_DIGGABLE(e)         HAS_PROPERTY(e, EP_DIGGABLE)
+#define IS_COLLECTIBLE(e)      HAS_PROPERTY(e, EP_COLLECTIBLE)
 #define IS_INDESTRUCTIBLE(e)   HAS_PROPERTY(e, EP_INDESTRUCTIBLE)
 #define IS_SLIPPERY(e)         HAS_PROPERTY(e, EP_SLIPPERY)
-#define IS_ENEMY(e)            HAS_PROPERTY(e, EP_ENEMY)
-#define IS_HISTORIC_WALL(e)    HAS_PROPERTY(e, EP_HISTORIC_WALL)
 #define CAN_FALL(e)            HAS_PROPERTY(e, EP_CAN_FALL)
 #define CAN_SMASH(e)           HAS_PROPERTY(e, EP_CAN_SMASH)
-#define CAN_CHANGE(e)          HAS_PROPERTY(e, EP_CAN_CHANGE)
+#define IS_WALKABLE_OVER(e)    HAS_PROPERTY(e, EP_WALKABLE_OVER)
+#define IS_WALKABLE_INSIDE(e)  HAS_PROPERTY(e, EP_WALKABLE_INSIDE)
+#define IS_WALKABLE_UNDER(e)   HAS_PROPERTY(e, EP_WALKABLE_UNDER)
+#define IS_PASSABLE_OVER(e)    HAS_PROPERTY(e, EP_PASSABLE_OVER)
+#define IS_PASSABLE_INSIDE(e)  HAS_PROPERTY(e, EP_PASSABLE_INSIDE)
+#define IS_PASSABLE_UNDER(e)   HAS_PROPERTY(e, EP_PASSABLE_UNDER)
+#define IS_PUSHABLE(e)         HAS_PROPERTY(e, EP_PUSHABLE)
+
+/* macros for special configurable properties */
+#define IS_EM_SLIPPERY_WALL(e) HAS_PROPERTY(e, EP_EM_SLIPPERY_WALL)
+
+/* macros for pre-defined properties */
+#define ELEM_IS_PLAYER(e)      HAS_PROPERTY(e, EP_PLAYER)
+#define CAN_BE_CRUMBLED(e)     HAS_PROPERTY(e, EP_CAN_BE_CRUMBLED)
 #define CAN_MOVE(e)            HAS_PROPERTY(e, EP_CAN_MOVE)
-#define COULD_MOVE(e)          HAS_PROPERTY(e, EP_COULD_MOVE)
+#define CAN_CHANGE(e)          HAS_PROPERTY(e, EP_CAN_CHANGE)
 #define DONT_TOUCH(e)          HAS_PROPERTY(e, EP_DONT_TOUCH)
+#define IS_ENEMY(e)            HAS_PROPERTY(e, EP_ENEMY)
 #define DONT_GO_TO(e)          HAS_PROPERTY(e, EP_DONT_GO_TO)
-#define IS_FOOD_DARK_YAMYAM(e) HAS_PROPERTY(e, EP_FOOD_DARK_YAMYAM)
-#define IS_EM_SLIPPERY_WALL(e) HAS_PROPERTY(e, EP_EM_SLIPPERY_WALL)
+#define IS_EXPLOSIVE(e)                HAS_PROPERTY(e, EP_EXPLOSIVE)
 #define IS_BD_ELEMENT(e)       HAS_PROPERTY(e, EP_BD_ELEMENT)
+#define IS_SP_ELEMENT(e)       HAS_PROPERTY(e, EP_SP_ELEMENT)
 #define IS_SB_ELEMENT(e)       HAS_PROPERTY(e, EP_SB_ELEMENT)
 #define IS_GEM(e)              HAS_PROPERTY(e, EP_GEM)
-#define IS_INACTIVE(e)         HAS_PROPERTY(e, EP_INACTIVE)
-#define IS_EXPLOSIVE(e)                HAS_PROPERTY(e, EP_EXPLOSIVE)
+#define IS_FOOD_DARK_YAMYAM(e) HAS_PROPERTY(e, EP_FOOD_DARK_YAMYAM)
 #define IS_FOOD_PENGUIN(e)     HAS_PROPERTY(e, EP_FOOD_PENGUIN)
-#define IS_PUSHABLE(e)         HAS_PROPERTY(e, EP_PUSHABLE)
-#define ELEM_IS_PLAYER(e)      HAS_PROPERTY(e, EP_PLAYER)
-#define IS_WALKABLE_OVER(e)    HAS_PROPERTY(e, EP_WALKABLE_OVER)
-#define IS_WALKABLE_INSIDE(e)  HAS_PROPERTY(e, EP_WALKABLE_INSIDE)
-#define IS_WALKABLE_UNDER(e)   HAS_PROPERTY(e, EP_WALKABLE_UNDER)
-#define IS_PASSABLE_OVER(e)    HAS_PROPERTY(e, EP_PASSABLE_OVER)
-#define IS_PASSABLE_INSIDE(e)  HAS_PROPERTY(e, EP_PASSABLE_INSIDE)
-#define IS_PASSABLE_UNDER(e)   HAS_PROPERTY(e, EP_PASSABLE_UNDER)
+#define IS_HISTORIC_WALL(e)    HAS_PROPERTY(e, EP_HISTORIC_WALL)
+#define IS_HISTORIC_SOLID(e)   HAS_PROPERTY(e, EP_HISTORIC_SOLID)
+#define IS_BELT(e)             HAS_PROPERTY(e, EP_BELT)
+#define IS_BELT_ACTIVE(e)      HAS_PROPERTY(e, EP_BELT_ACTIVE)
+#define IS_BELT_SWITCH(e)      HAS_PROPERTY(e, EP_BELT_SWITCH)
+#define IS_TUBE(e)             HAS_PROPERTY(e, EP_TUBE)
+#define IS_KEYGATE(e)          HAS_PROPERTY(e, EP_KEYGATE)
+#define IS_AMOEBOID(e)         HAS_PROPERTY(e, EP_AMOEBOID)
+#define IS_AMOEBALIVE(e)       HAS_PROPERTY(e, EP_AMOEBALIVE)
+#define HAS_CONTENT(e)         HAS_PROPERTY(e, EP_HAS_CONTENT)
+#define IS_ACTIVE_BOMB(e)      HAS_PROPERTY(e, EP_ACTIVE_BOMB)
+#define IS_INACTIVE(e)         HAS_PROPERTY(e, EP_INACTIVE)
 
-/* macros for runtime properties */
+/* macros for derived properties */
 #define IS_ACCESSIBLE_OVER(e)  HAS_PROPERTY(e, EP_ACCESSIBLE_OVER)
 #define IS_ACCESSIBLE_INSIDE(e)        HAS_PROPERTY(e, EP_ACCESSIBLE_INSIDE)
 #define IS_ACCESSIBLE_UNDER(e) HAS_PROPERTY(e, EP_ACCESSIBLE_UNDER)
 #define IS_WALKABLE(e)         HAS_PROPERTY(e, EP_WALKABLE)
 #define IS_PASSABLE(e)         HAS_PROPERTY(e, EP_PASSABLE)
 #define IS_ACCESSIBLE(e)       HAS_PROPERTY(e, EP_ACCESSIBLE)
-#define IS_DIGGABLE(e)         HAS_PROPERTY(e, EP_DIGGABLE)
-#define IS_COLLECTIBLE(e)      HAS_PROPERTY(e, EP_COLLECTIBLE)
-#define IS_ACTIVE_BOMB(e)      HAS_PROPERTY(e, EP_ACTIVE_BOMB)
-#define IS_BELT(e)             HAS_PROPERTY(e, EP_BELT)
-#define IS_BELT_ACTIVE(e)      HAS_PROPERTY(e, EP_BELT_ACTIVE)
-#define IS_BELT_SWITCH(e)      HAS_PROPERTY(e, EP_BELT_SWITCH)
-#define IS_SP_ELEMENT(e)       HAS_PROPERTY(e, EP_SP_ELEMENT)
-#define HAS_CONTENT(e)         HAS_PROPERTY(e, EP_HAS_CONTENT)
-#define IS_TUBE(e)             HAS_PROPERTY(e, EP_TUBE)
 #define IS_WALL(e)             HAS_PROPERTY(e, EP_WALL)
-#define IS_SOLID(e)            HAS_PROPERTY(e, EP_SOLID)
+#define IS_SOLID_FOR_PUSHING(e)        HAS_PROPERTY(e, EP_SOLID_FOR_PUSHING)
 #define IS_DRAGONFIRE_PROOF(e) HAS_PROPERTY(e, EP_DRAGONFIRE_PROOF)
 #define IS_EXPLOSION_PROOF(e)  HAS_PROPERTY(e, EP_EXPLOSION_PROOF)
 
@@ -1102,19 +1119,25 @@ struct GlobalInfo
 
   int num_toons;
 
-  int menu_draw_xoffset;
-  int menu_draw_yoffset;
-  int menu_draw_xoffset_MAIN;
-  int menu_draw_yoffset_MAIN;
-
-  int door_step_offset;
-  int door_step_delay;
-
   float frames_per_second;
   boolean fps_slowdown;
   int fps_slowdown_factor;
 };
 
+struct MenuInfo
+{
+  int draw_xoffset_default;
+  int draw_yoffset_default;
+  int draw_xoffset[NUM_SPECIAL_GFX_ARGS];
+  int draw_yoffset[NUM_SPECIAL_GFX_ARGS];
+};
+
+struct DoorInfo
+{
+  int step_offset;
+  int step_delay;
+};
+
 struct ElementInfo
 {
   char *token_name;            /* element token used in config files */
@@ -1264,10 +1287,13 @@ extern struct HiScore           highscore[];
 extern struct TapeInfo         tape;
 extern struct GameInfo         game;
 extern struct GlobalInfo       global;
+extern struct MenuInfo         menu;
+extern struct DoorInfo         door;
 extern struct ElementInfo      element_info[];
 extern struct ElementActionInfo        element_action_info[];
 extern struct ElementDirectionInfo element_direction_info[];
 extern struct SpecialSuffixInfo special_suffix_info[];
+extern struct TokenIntPtrInfo  image_config_vars[];
 extern struct FontInfo         font_info[];
 extern struct GraphicInfo      *graphic_info;
 extern struct SoundInfo               *sound_info;
index d02f2ccad59e8cdfc0155d590e6a37deb51fc930..e99022d4f1707b34b9908fa3fef774933e566ca9 100644 (file)
@@ -71,15 +71,12 @@ static void HandleChooseTree(int, int, int, int, int, TreeInfo **);
 static struct GadgetInfo *screen_gadget[NUM_SCREEN_GADGETS];
 static int setup_mode = SETUP_MODE_MAIN;
 
-#if 0
-static int mSX = SX;
-static int mSY = SY;
-#else
-#define mSX (SX + (game_status == GAME_MODE_MAIN ? global.menu_draw_xoffset_MAIN : \
-                  global.menu_draw_xoffset))
-#define mSY (SY + (game_status == GAME_MODE_MAIN ? global.menu_draw_yoffset_MAIN : \
-                  global.menu_draw_yoffset))
-#endif
+#define mSX (SX + (game_status >= GAME_MODE_MAIN &&    \
+                  game_status <= GAME_MODE_SETUP ?     \
+                  menu.draw_xoffset[game_status] : menu.draw_xoffset_default))
+#define mSY (SY + (game_status >= GAME_MODE_MAIN &&    \
+                  game_status <= GAME_MODE_SETUP ?     \
+                  menu.draw_yoffset[game_status] : menu.draw_yoffset_default))
 
 #if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND)
 #define NUM_SCROLLBAR_BITMAPS          2
@@ -106,14 +103,9 @@ static void drawCursorExt(int xpos, int ypos, int color, int graphic)
 
   ypos += MENU_SCREEN_START_YPOS;
 
-#if 1
   DrawBackground(mSX + xpos * TILEX, mSY + ypos * TILEY, TILEX, TILEY);
   DrawGraphicThruMaskExt(drawto, mSX + xpos * TILEX, mSY + ypos * TILEY,
                         graphic, 0);
-#else
-  DrawBackground(SX + xpos * 32, SY + ypos * 32, TILEX, TILEY);
-  DrawGraphicThruMask(xpos, ypos, graphic, 0);
-#endif
 }
 
 static void initCursor(int ypos, int graphic)
@@ -189,11 +181,6 @@ void DrawMainMenu()
   int level_width = font_width * strlen("Level:");
   int i;
 
-#if 0
-  mSX = SX + global.menu_draw_xoffset;
-  mSY = SY + global.menu_draw_yoffset;
-#endif
-
   UnmapAllGadgets();
   FadeSounds();
 
@@ -252,7 +239,7 @@ void DrawMainMenu()
   DrawText(mSX + 32, mSY + 3*32, "Level:", FONT_MENU_1);
   DrawText(mSX + 32, mSY + 4*32, "Hall Of Fame", FONT_MENU_1);
   DrawText(mSX + 32, mSY + 5*32, "Level Creator", FONT_MENU_1);
-  DrawText(mSY + 32, mSY + 6*32, "Info Screen", FONT_MENU_1);
+  DrawText(mSX + 32, mSY + 6*32, "Info Screen", FONT_MENU_1);
   DrawText(mSX + 32, mSY + 7*32, "Start Game", FONT_MENU_1);
   DrawText(mSX + 32, mSY + 8*32, "Setup", FONT_MENU_1);
   DrawText(mSX + 32, mSY + 9*32, "Quit", FONT_MENU_1);
@@ -343,8 +330,8 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button)
 
   if (mx || my)                /* mouse input */
   {
-    x = (mx - SX) / 32;
-    y = (my - SY) / 32 - MENU_SCREEN_START_YPOS;
+    x = (mx - mSX) / 32;
+    y = (my - mSY) / 32 - MENU_SCREEN_START_YPOS;
   }
   else if (dx || dy)   /* keyboard input */
   {
@@ -1221,7 +1208,10 @@ static void drawChooseTreeList(int first_entry, int num_page_entries,
   int max_buffer_len = (SCR_FIELDX - 2) * 2;
   int num_entries = numTreeInfoInGroup(ti);
   char *title_string = NULL;
-  int offset = (ti->type == TREE_TYPE_LEVEL_DIR ? 0 : 16);
+  int xoffset_setup = 16;
+  int yoffset_setup = 0;
+  int xoffset = (ti->type == TREE_TYPE_LEVEL_DIR ? 0 : xoffset_setup);
+  int yoffset = (ti->type == TREE_TYPE_LEVEL_DIR ? 0 : yoffset_setup);
   int last_game_status = game_status;  /* save current game status */
 
   DrawBackground(SX, SY, SXSIZE - 32, SYSIZE);
@@ -1233,7 +1223,7 @@ static void drawChooseTreeList(int first_entry, int num_page_entries,
      ti->type == TREE_TYPE_SOUNDS_DIR ? "Custom Sounds" :
      ti->type == TREE_TYPE_MUSIC_DIR ? "Custom Music" : "");
 
-  DrawText(SX + offset, SY + offset, title_string, FONT_TITLE_1);
+  DrawText(SX + xoffset, SY + yoffset, title_string, FONT_TITLE_1);
 
   /* force LEVELS font on artwork setup screen */
   game_status = GAME_MODE_LEVELS;
@@ -1264,16 +1254,18 @@ static void drawChooseTreeList(int first_entry, int num_page_entries,
   {
     int ypos = 1;
 
-    DrawBackground(SX, SY + ypos * 32, TILEX, TILEY);
-    DrawGraphicThruMask(0, ypos, IMG_MENU_BUTTON_UP, 0);
+    DrawBackground(mSX, mSY + ypos * TILEY, TILEX, TILEY);
+    DrawGraphicThruMaskExt(drawto, mSX, mSY + ypos * TILEY,
+                          IMG_MENU_BUTTON_UP, 0);
   }
 
   if (first_entry + num_page_entries < num_entries)
   {
     int ypos = MAX_MENU_ENTRIES_ON_SCREEN + 1;
 
-    DrawBackground(SX, SY + ypos * 32, TILEX, TILEY);
-    DrawGraphicThruMask(0, ypos, IMG_MENU_BUTTON_DOWN, 0);
+    DrawBackground(mSX, mSY + ypos * TILEY, TILEX, TILEY);
+    DrawGraphicThruMaskExt(drawto, mSX, mSY + ypos * TILEY,
+                          IMG_MENU_BUTTON_DOWN, 0);
   }
 
   game_status = last_game_status;      /* restore current game status */
@@ -1368,8 +1360,8 @@ static void HandleChooseTree(int mx, int my, int dx, int dy, int button,
 
   if (mx || my)                /* mouse input */
   {
-    x = (mx - SX) / 32;
-    y = (my - SY) / 32 - MENU_SCREEN_START_YPOS;
+    x = (mx - mSX) / 32;
+    y = (my - mSY) / 32 - MENU_SCREEN_START_YPOS;
   }
   else if (dx || dy)   /* keyboard input */
   {
@@ -2071,8 +2063,8 @@ void HandleSetupScreen_Generic(int mx, int my, int dx, int dy, int button)
 
   if (mx || my)                /* mouse input */
   {
-    x = (mx - SX) / 32;
-    y = (my - SY) / 32 - MENU_SCREEN_START_YPOS;
+    x = (mx - mSX) / 32;
+    y = (my - mSY) / 32 - MENU_SCREEN_START_YPOS;
   }
   else if (dx || dy)   /* keyboard input */
   {
@@ -2282,8 +2274,8 @@ void HandleSetupScreen_Input(int mx, int my, int dx, int dy, int button)
 
   if (mx || my)                /* mouse input */
   {
-    x = (mx - SX) / 32;
-    y = (my - SY) / 32 - MENU_SCREEN_START_YPOS;
+    x = (mx - mSX) / 32;
+    y = (my - mSY) / 32 - MENU_SCREEN_START_YPOS;
   }
   else if (dx || dy)   /* keyboard input */
   {
@@ -3017,16 +3009,16 @@ static void HandleScreenGadgets(struct GadgetInfo *gi)
   {
     case SCREEN_CTRL_ID_SCROLL_UP:
       if (game_status == GAME_MODE_LEVELS)
-       HandleChooseLevel(SX,SY + 32, 0,0, MB_MENU_MARK);
+       HandleChooseLevel(mSX,mSY + 32, 0,0, MB_MENU_MARK);
       else if (game_status == GAME_MODE_SETUP)
-       HandleSetupScreen(SX,SY + 32, 0,0, MB_MENU_MARK);
+       HandleSetupScreen(mSX,mSY + 32, 0,0, MB_MENU_MARK);
       break;
 
     case SCREEN_CTRL_ID_SCROLL_DOWN:
       if (game_status == GAME_MODE_LEVELS)
-       HandleChooseLevel(SX,SY + SYSIZE - 32, 0,0, MB_MENU_MARK);
+       HandleChooseLevel(mSX,mSY + SYSIZE - 32, 0,0, MB_MENU_MARK);
       else if (game_status == GAME_MODE_SETUP)
-       HandleSetupScreen(SX,SY + SYSIZE - 32, 0,0, MB_MENU_MARK);
+       HandleSetupScreen(mSX,mSY + SYSIZE - 32, 0,0, MB_MENU_MARK);
       break;
 
     case SCREEN_CTRL_ID_SCROLL_VERTICAL:
index 89de2f61e3647b96decb48cfcbd8ee8de248de71..31a555d67a2177b7fdc186f9dbe3989ed44f5829 100644 (file)
@@ -2010,8 +2010,8 @@ unsigned int MoveDoor(unsigned int door_state)
   static int door1 = DOOR_OPEN_1;
   static int door2 = DOOR_CLOSE_2;
   static unsigned long door_delay = 0;
-  int x, start, stepsize = global.door_step_offset;
-  unsigned long door_delay_value = global.door_step_delay;
+  int x, start, stepsize = door.step_offset;
+  unsigned long door_delay_value = door.step_delay;
 
   if (door_state == DOOR_GET_STATE)
     return(door1 | door2);