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
};
-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,
-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,
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
};
-1
};
- static int ep_dont_go_to[] =
+ static int ep_enemy[] =
{
EL_BUG,
EL_SPACESHIP,
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,
-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,
-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,
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,
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,
-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,
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,
-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,
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
};
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 }
};
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,
EP_CAN_FALL,
EP_CAN_SMASH,
EP_CAN_MOVE,
- EP_COULD_MOVE,
EP_DONT_GO_TO,
EP_FOOD_DARK_YAMYAM,
EP_GEM,
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 ------------------------------------------ */
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++)
#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)
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 */
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;
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
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)
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();
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);
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 */
{
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);
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;
{
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 */
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 */
{
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 */
{
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 */
{
{
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: