added support for amoeba settings in BD engine to level editor
[rocksndiamonds.git] / src / main.c
index 670f5335bf3d06b44fa8bf50fe6fa05c1457bfd7..a727eaa53439274ce584613a0c1d062cc879bc55 100644 (file)
@@ -4,7 +4,7 @@
 // (c) 1995-2014 by Artsoft Entertainment
 //                         Holger Schemel
 //                 info@artsoft.org
-//                 http://www.artsoft.org/
+//                 https://www.artsoft.org/
 // ----------------------------------------------------------------------------
 // main.c
 // ============================================================================
 #include "events.h"
 #include "config.h"
 
-Bitmap                *bitmap_db_field;
-Bitmap                *bitmap_db_panel;
-Bitmap                *bitmap_db_door_1;
-Bitmap                *bitmap_db_door_2;
-Bitmap                *bitmap_db_store_1;
-Bitmap                *bitmap_db_store_2;
-DrawBuffer            *fieldbuffer;
-DrawBuffer            *drawto_field;
+Bitmap                        *bitmap_db_field;
+Bitmap                        *bitmap_db_door_1;
+Bitmap                        *bitmap_db_door_2;
+Bitmap                        *bitmap_db_store_1;
+Bitmap                        *bitmap_db_store_2;
+DrawBuffer                    *fieldbuffer;
+DrawBuffer                    *drawto_field;
 
-int                    game_status = -1;
-boolean                        game_status_last_screen = -1;
-boolean                        level_editor_test_game = FALSE;
-boolean                        network_playing = FALSE;
+int                            game_status = -1;
+int                            game_status_last_screen = -1;
+boolean                                level_editor_test_game = FALSE;
+boolean                                score_info_tape_play = FALSE;
+boolean                                network_playing = FALSE;
 
-#if defined(TARGET_SDL)
-boolean                        network_server = FALSE;
-SDL_Thread            *server_thread;
-#endif
-
-int                    key_joystick_mapping = 0;
+int                            key_joystick_mapping = 0;
 
-short                  Feld[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short                  MovPos[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short                  MovDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short                  MovDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short                  ChangeDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short                  ChangePage[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short                  CustomValue[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short                  Store[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short                  Store2[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short                  StorePlayer[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short                  Back[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-boolean                        Stop[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-boolean                        Pushed[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short                  ChangeCount[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short                  ChangeEvent[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short                  WasJustMoving[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short                  WasJustFalling[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short                  CheckCollision[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short                  CheckImpact[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short                  AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short                  AmoebaCnt[MAX_NUM_AMOEBA];
-short                  AmoebaCnt2[MAX_NUM_AMOEBA];
-short                  ExplodeField[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short                  ExplodePhase[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short                  ExplodeDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-int                    RunnerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-int                    PlayerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                          Tile[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                          Last[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                          MovPos[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                          MovDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                          MovDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                          ChangeDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                          ChangePage[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                          CustomValue[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                          Store[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                          Store2[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                          StorePlayer[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                          Back[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+boolean                                Stop[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+boolean                                Pushed[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                          ChangeCount[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                          ChangeEvent[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                          WasJustMoving[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                          WasJustFalling[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                          CheckCollision[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                          CheckImpact[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                          AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                          AmoebaCnt[MAX_NUM_AMOEBA];
+short                          AmoebaCnt2[MAX_NUM_AMOEBA];
+short                          ExplodeField[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                          ExplodePhase[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                          ExplodeDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+int                            RunnerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+int                            PlayerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 
-int                    GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-int                    GfxRandom[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-int                    GfxElement[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-int                    GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-int                    GfxDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-int                    GfxRedraw[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+int                            GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+int                            GfxRandom[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+int                            GfxRandomStatic[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+int                            GfxElement[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+int                            GfxElementEmpty[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+int                            GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+int                            GfxDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+int                            GfxRedraw[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 
-int                    ActiveElement[MAX_NUM_ELEMENTS];
-int                    ActiveButton[NUM_IMAGE_FILES];
-int                    ActiveFont[NUM_FONTS];
+int                            ActiveElement[MAX_NUM_ELEMENTS];
+int                            ActiveButton[NUM_IMAGE_FILES];
+int                            ActiveFont[NUM_FONTS];
 
-int                    lev_fieldx, lev_fieldy;
-int                    scroll_x, scroll_y;
+int                            lev_fieldx, lev_fieldy;
+int                            scroll_x, scroll_y;
 
-int                    WIN_XSIZE = WIN_XSIZE_DEFAULT;
-int                    WIN_YSIZE = WIN_YSIZE_DEFAULT;
+int                            WIN_XSIZE = WIN_XSIZE_DEFAULT;
+int                            WIN_YSIZE = WIN_YSIZE_DEFAULT;
 
-int                    SCR_FIELDX = SCR_FIELDX_DEFAULT;
-int                    SCR_FIELDY = SCR_FIELDY_DEFAULT;
+int                            SCR_FIELDX = SCR_FIELDX_DEFAULT;
+int                            SCR_FIELDY = SCR_FIELDY_DEFAULT;
 
-int                    REAL_SX = 6, REAL_SY = 6;
-int                    SX = 8, SY = 8;
-int                    DX = 566, DY = 60;
-int                    VX = 566, VY = 400;
-int                    EX = 566, EY = 356;
-int                    dDX, dDY;
+int                            REAL_SX = 6, REAL_SY = 6;
+int                            SX = 8, SY = 8;
+int                            DX = 566, DY = 60;
+int                            VX = 566, VY = 400;
+int                            EX = 566, EY = 356;
+int                            dDX, dDY;
 
-int                    FULL_SXSIZE = 2 + SXSIZE_DEFAULT + 2;
-int                    FULL_SYSIZE = 2 + SYSIZE_DEFAULT + 2;
-int                    SXSIZE = SXSIZE_DEFAULT;
-int                    SYSIZE = SYSIZE_DEFAULT;
+int                            FULL_SXSIZE = 2 + SXSIZE_DEFAULT + 2;
+int                            FULL_SYSIZE = 2 + SYSIZE_DEFAULT + 2;
+int                            SXSIZE = SXSIZE_DEFAULT;
+int                            SYSIZE = SYSIZE_DEFAULT;
 
-int                    FADE_SX = 6, FADE_SY = 6;
-int                    FADE_SXSIZE = 2 + SXSIZE_DEFAULT + 2;
-int                    FADE_SYSIZE = 2 + SXSIZE_DEFAULT + 2;
+int                            FADE_SX = 6, FADE_SY = 6;
+int                            FADE_SXSIZE = 2 + SXSIZE_DEFAULT + 2;
+int                            FADE_SYSIZE = 2 + SXSIZE_DEFAULT + 2;
 
-int                    DXSIZE = 100;
-int                    DYSIZE = 280;
-int                    VXSIZE = 100;
-int                    VYSIZE = 100;
-int                    EXSIZE = 100;
-int                    EYSIZE = 144;
-int                    TILESIZE_VAR = TILESIZE;
+int                            DXSIZE = 100;
+int                            DYSIZE = 280;
+int                            VXSIZE = 100;
+int                            VYSIZE = 100;
+int                            EXSIZE = 100;
+int                            EYSIZE = 144;
+int                            TILESIZE_VAR = TILESIZE;
 
-int                    FX, FY;
-int                    ScrollStepSize;
-int                    ScreenMovDir = MV_NONE, ScreenMovPos = 0;
-int                    ScreenGfxPos = 0;
-int                    BorderElement = EL_STEELWALL;
-int                    MenuFrameDelay = MENU_FRAME_DELAY;
-int                    GameFrameDelay = GAME_FRAME_DELAY;
-int                    FfwdFrameDelay = FFWD_FRAME_DELAY;
-int                    BX1, BY1;
-int                    BX2, BY2;
-int                    SBX_Left, SBX_Right;
-int                    SBY_Upper, SBY_Lower;
-int                    ZX, ZY;
-int                    ExitX, ExitY;
-int                    AllPlayersGone;
+int                            FX, FY;
+int                            ScrollStepSize;
+int                            ScreenMovDir = MV_NONE, ScreenMovPos = 0;
+int                            ScreenGfxPos = 0;
+int                            BorderElement = EL_STEELWALL;
+int                            MenuFrameDelay = MENU_FRAME_DELAY;
+int                            GameFrameDelay = GAME_FRAME_DELAY;
+int                            FfwdFrameDelay = FFWD_FRAME_DELAY;
+int                            BX1, BY1;
+int                            BX2, BY2;
+int                            SBX_Left, SBX_Right;
+int                            SBY_Upper, SBY_Lower;
 
-int                    TimeFrames, TimePlayed, TimeLeft, TapeTime;
+int                            TimeFrames, TimePlayed, TimeLeft;
+int                            TapeTimeFrames, TapeTime;
 
-boolean                        network_player_action_received = FALSE;
+boolean                                network_player_action_received = FALSE;
 
-struct LevelSetInfo    levelset;
-struct LevelInfo       level, level_template;
-struct PlayerInfo      stored_player[MAX_PLAYERS], *local_player = NULL;
-struct HiScore         highscore[MAX_SCORE_ENTRIES];
-struct TapeInfo                tape;
-struct SetupInfo       setup;
-struct GameInfo                game;
-struct GlobalInfo      global;
-struct BorderInfo      border;
-struct ViewportInfo    viewport;
-struct TitleFadingInfo fading;
-struct TitleFadingInfo title_initial_first_default;
-struct TitleFadingInfo title_initial_default;
-struct TitleFadingInfo title_first_default;
-struct TitleFadingInfo title_default;
-struct TitleMessageInfo        titlescreen_initial_first_default;
-struct TitleMessageInfo        titlescreen_initial_first[MAX_NUM_TITLE_IMAGES];
-struct TitleMessageInfo        titlescreen_initial_default;
-struct TitleMessageInfo        titlescreen_initial[MAX_NUM_TITLE_IMAGES];
-struct TitleMessageInfo        titlescreen_first_default;
-struct TitleMessageInfo        titlescreen_first[MAX_NUM_TITLE_IMAGES];
-struct TitleMessageInfo        titlescreen_default;
-struct TitleMessageInfo        titlescreen[MAX_NUM_TITLE_IMAGES];
-struct TitleMessageInfo        titlemessage_initial_first_default;
-struct TitleMessageInfo        titlemessage_initial_first[MAX_NUM_TITLE_MESSAGES];
-struct TitleMessageInfo        titlemessage_initial_default;
-struct TitleMessageInfo        titlemessage_initial[MAX_NUM_TITLE_MESSAGES];
-struct TitleMessageInfo        titlemessage_first_default;
-struct TitleMessageInfo        titlemessage_first[MAX_NUM_TITLE_MESSAGES];
-struct TitleMessageInfo        titlemessage_default;
-struct TitleMessageInfo        titlemessage[MAX_NUM_TITLE_MESSAGES];
-struct TitleMessageInfo        readme;
-struct InitInfo                init, init_last;
-struct MenuInfo                menu;
-struct DoorInfo                door_1, door_2;
-struct RequestInfo     request;
-struct PreviewInfo     preview;
-struct EditorInfo      editor;
+struct LevelInfo               level, level_template;
+struct PlayerInfo              stored_player[MAX_PLAYERS], *local_player = NULL;
+struct ScoreInfo               scores, server_scores;
+struct TapeInfo                        tape;
+struct GameInfo                        game;
+struct GlobalInfo              global;
+struct BorderInfo              border;
+struct ViewportInfo            viewport;
+struct TitleFadingInfo         fading;
+struct TitleFadingInfo         title_initial_first_default;
+struct TitleFadingInfo         title_initial_default;
+struct TitleFadingInfo         title_first_default;
+struct TitleFadingInfo         title_default;
+struct TitleMessageInfo                titlescreen_initial_first_default;
+struct TitleMessageInfo                titlescreen_initial_first[MAX_NUM_TITLE_IMAGES];
+struct TitleMessageInfo                titlescreen_initial_default;
+struct TitleMessageInfo                titlescreen_initial[MAX_NUM_TITLE_IMAGES];
+struct TitleMessageInfo                titlescreen_first_default;
+struct TitleMessageInfo                titlescreen_first[MAX_NUM_TITLE_IMAGES];
+struct TitleMessageInfo                titlescreen_default;
+struct TitleMessageInfo                titlescreen[MAX_NUM_TITLE_IMAGES];
+struct TitleMessageInfo                titlemessage_initial_first_default;
+struct TitleMessageInfo                titlemessage_initial_first[MAX_NUM_TITLE_MESSAGES];
+struct TitleMessageInfo                titlemessage_initial_default;
+struct TitleMessageInfo                titlemessage_initial[MAX_NUM_TITLE_MESSAGES];
+struct TitleMessageInfo                titlemessage_first_default;
+struct TitleMessageInfo                titlemessage_first[MAX_NUM_TITLE_MESSAGES];
+struct TitleMessageInfo                titlemessage_default;
+struct TitleMessageInfo                titlemessage[MAX_NUM_TITLE_MESSAGES];
+struct TitleMessageInfo                readme;
+struct InitInfo                        init, init_last;
+struct MenuInfo                        menu;
+struct DoorInfo                        door_1, door_2;
+struct RequestInfo             request;
+struct PreviewInfo             preview;
+struct EditorInfo              editor;
 
-struct GraphicInfo     *graphic_info = NULL;
-struct SoundInfo       *sound_info = NULL;
-struct MusicInfo       *music_info = NULL;
-struct MusicFileInfo   *music_file_info = NULL;
-struct HelpAnimInfo    *helpanim_info = NULL;
+struct GraphicInfo            *graphic_info = NULL;
+struct SoundInfo              *sound_info = NULL;
+struct MusicInfo              *music_info = NULL;
+struct MusicFileInfo          *music_file_info = NULL;
+struct HelpAnimInfo           *helpanim_info = NULL;
 
-SetupFileHash          *helptext_info = NULL;
-SetupFileHash         *image_config_hash = NULL;
-SetupFileHash         *element_token_hash = NULL;
-SetupFileHash         *graphic_token_hash = NULL;
-SetupFileHash         *font_token_hash = NULL;
-SetupFileHash         *hide_setup_hash = NULL;
+SetupFileHash                 *helptext_info = NULL;
+SetupFileHash                 *image_config_hash = NULL;
+SetupFileHash                 *sound_config_hash = NULL;
+SetupFileHash                 *element_token_hash = NULL;
+SetupFileHash                 *graphic_token_hash = NULL;
+SetupFileHash                 *font_token_hash = NULL;
+SetupFileHash                 *hide_setup_hash = NULL;
+SetupFileHash                 *anim_url_hash = NULL;
 
 
-/* ------------------------------------------------------------------------- */
-/* element definitions                                                       */
-/* ------------------------------------------------------------------------- */
+// ----------------------------------------------------------------------------
+// element definitions
+// ----------------------------------------------------------------------------
 
 struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1];
 
-/* this contains predefined structure elements to initialize "element_info" */
+// this contains predefined structure elements to initialize "element_info"
 struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
 {
-  /* keyword to start parser: "ELEMENT_INFO_START" <-- do not change! */
+  // keyword to start parser: "ELEMENT_INFO_START" <-- do not change!
 
-  /* ----------------------------------------------------------------------- */
-  /* "real" level file elements                                              */
-  /* ----------------------------------------------------------------------- */
+  // --------------------------------------------------------------------------
+  // "real" level file elements
+  // --------------------------------------------------------------------------
 
   {
     "empty_space",
@@ -554,7 +550,8 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
   {
     "bd_butterfly.right",
     "bd_butterfly",
-    "butterfly (starts moving right)"},
+    "butterfly (starts moving right)"
+  },
   {
     "bd_butterfly.up",
     "bd_butterfly",
@@ -563,11 +560,13 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
   {
     "bd_butterfly.left",
     "bd_butterfly",
-    "butterfly (starts moving left)"},
+    "butterfly (starts moving left)"
+  },
   {
     "bd_butterfly.down",
     "bd_butterfly",
-    "butterfly (starts moving down)"},
+    "butterfly (starts moving down)"
+  },
   {
     "bd_firefly.right",
     "bd_firefly",
@@ -641,7 +640,8 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
   {
     "spaceship.right",
     "spaceship",
-    "spaceship (starts moving right)"},
+    "spaceship (starts moving right)"
+  },
   {
     "spaceship.up",
     "spaceship",
@@ -650,11 +650,13 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
   {
     "spaceship.left",
     "spaceship",
-    "spaceship (starts moving left)"},
+    "spaceship (starts moving left)"
+  },
   {
     "spaceship.down",
     "spaceship",
-    "spaceship (starts moving down)"},
+    "spaceship (starts moving down)"
+  },
   {
     "pacman.right",
     "pacman",
@@ -1181,17 +1183,17 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
     "letter ''"
   },
   {
-    "char_unused",
+    "char_button",
     "char",
     "letter 'button'"
   },
   {
-    "char_unused",
+    "char_up",
     "char",
     "letter 'up'"
   },
   {
-    "char_unused",
+    "char_down",
     "char",
     "letter 'down'"
   },
@@ -1858,62 +1860,62 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
   {
     "emc_steelwall_1",
     "steelwall",
-    "steel wall"
+    "steel wall 1 (EMC style)"
   },
   {
     "emc_steelwall_2",
     "steelwall",
-    "steel wall"
+    "steel wall 2 (EMC style)"
   },
   {
     "emc_steelwall_3",
     "steelwall",
-    "steel wall"
+    "steel wall 3 (EMC style)"
   },
   {
     "emc_steelwall_4",
     "steelwall",
-    "steel wall"
+    "steel wall 4 (EMC style)"
   },
   {
     "emc_wall_1",
     "wall",
-    "normal wall"
+    "normal wall 1 (EMC style)"
   },
   {
     "emc_wall_2",
     "wall",
-    "normal wall"
+    "normal wall 2 (EMC style)"
   },
   {
     "emc_wall_3",
     "wall",
-    "normal wall"
+    "normal wall 3 (EMC style)"
   },
   {
     "emc_wall_4",
     "wall",
-    "normal wall"
+    "normal wall 4 (EMC style)"
   },
   {
     "emc_wall_5",
     "wall",
-    "normal wall"
+    "normal wall 5 (EMC style)"
   },
   {
     "emc_wall_6",
     "wall",
-    "normal wall"
+    "normal wall 6 (EMC style)"
   },
   {
     "emc_wall_7",
     "wall",
-    "normal wall"
+    "normal wall 7 (EMC style)"
   },
   {
     "emc_wall_8",
     "wall",
-    "normal wall"
+    "normal wall 8 (EMC style)"
   },
   {
     "tube_any",
@@ -3648,62 +3650,62 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
   {
     "emc_wall_9",
     "wall",
-    "normal wall"
+    "normal wall 9 (EMC style)"
   },
   {
     "emc_wall_10",
     "wall",
-    "normal wall"
+    "normal wall 10 (EMC style)"
   },
   {
     "emc_wall_11",
     "wall",
-    "normal wall"
+    "normal wall 11 (EMC style)"
   },
   {
     "emc_wall_12",
     "wall",
-    "normal wall"
+    "normal wall 12 (EMC style)"
   },
   {
     "emc_wall_13",
     "wall",
-    "normal wall"
+    "normal wall 13 (EMC style)"
   },
   {
     "emc_wall_14",
     "wall",
-    "normal wall"
+    "normal wall 14 (EMC style)"
   },
   {
     "emc_wall_15",
     "wall",
-    "normal wall"
+    "normal wall 15 (EMC style)"
   },
   {
     "emc_wall_16",
     "wall",
-    "normal wall"
+    "normal wall 16 (EMC style)"
   },
   {
     "emc_wall_slippery_1",
     "wall",
-    "slippery wall"
+    "slippery wall 1 (EMC style)"
   },
   {
     "emc_wall_slippery_2",
     "wall",
-    "slippery wall"
+    "slippery wall 2 (EMC style)"
   },
   {
     "emc_wall_slippery_3",
     "wall",
-    "slippery wall"
+    "slippery wall 3 (EMC style)"
   },
   {
     "emc_wall_slippery_4",
     "wall",
-    "slippery wall"
+    "slippery wall 4 (EMC style)"
   },
   {
     "emc_fake_grass",
@@ -3762,7 +3764,7 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
   },
   {
     "bd_expandable_wall",
-    "wall",
+    "bd_expandable_wall",
     "growing wall (horizontal, BD style)"
   },
   {
@@ -4241,17 +4243,17 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
     "steel letter ''"
   },
   {
-    "steel_char_unused",
+    "steel_char_button",
     "steel_char",
     "steel letter 'button'"
   },
   {
-    "steel_char_unused",
+    "steel_char_up",
     "steel_char",
     "steel letter 'up'"
   },
   {
-    "steel_char_unused",
+    "steel_char_down",
     "steel_char",
     "steel letter 'down'"
   },
@@ -4318,112 +4320,112 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
   {
     "dc_steelwall_1_left",
     "steelwall",
-    "steel wall (left)"
+    "steel wall (left)"
   },
   {
     "dc_steelwall_1_right",
     "steelwall",
-    "steel wall (right)"
+    "steel wall (right)"
   },
   {
     "dc_steelwall_1_top",
     "steelwall",
-    "steel wall (top)"
+    "steel wall (top)"
   },
   {
     "dc_steelwall_1_bottom",
     "steelwall",
-    "steel wall (bottom)"
+    "steel wall (bottom)"
   },
   {
     "dc_steelwall_1_horizontal",
     "steelwall",
-    "steel wall (top/bottom)"
+    "steel wall (top/bottom)"
   },
   {
     "dc_steelwall_1_vertical",
     "steelwall",
-    "steel wall (left/right)"
+    "steel wall (left/right)"
   },
   {
     "dc_steelwall_1_topleft",
     "steelwall",
-    "steel wall (top/left)"
+    "steel wall (top/left)"
   },
   {
     "dc_steelwall_1_topright",
     "steelwall",
-    "steel wall (top/right)"
+    "steel wall (top/right)"
   },
   {
     "dc_steelwall_1_bottomleft",
     "steelwall",
-    "steel wall (bottom/left)"
+    "steel wall (bottom/left)"
   },
   {
     "dc_steelwall_1_bottomright",
     "steelwall",
-    "steel wall (bottom/right)"
+    "steel wall (bottom/right)"
   },
   {
     "dc_steelwall_1_topleft_2",
     "steelwall",
-    "steel wall (top/left corner)"
+    "steel wall (top/left corner)"
   },
   {
     "dc_steelwall_1_topright_2",
     "steelwall",
-    "steel wall (top/right corner)"
+    "steel wall (top/right corner)"
   },
   {
     "dc_steelwall_1_bottomleft_2",
     "steelwall",
-    "steel wall (bottom/left corner)"
+    "steel wall (bottom/left corner)"
   },
   {
     "dc_steelwall_1_bottomright_2",
     "steelwall",
-    "steel wall (bottom/right corner)"
+    "steel wall (bottom/right corner)"
   },
   {
     "dc_steelwall_2_left",
     "steelwall",
-    "steel wall (left)"
+    "steel wall (left)"
   },
   {
     "dc_steelwall_2_right",
     "steelwall",
-    "steel wall (right)"
+    "steel wall (right)"
   },
   {
     "dc_steelwall_2_top",
     "steelwall",
-    "steel wall (top)"
+    "steel wall (top)"
   },
   {
     "dc_steelwall_2_bottom",
     "steelwall",
-    "steel wall (bottom)"
+    "steel wall (bottom)"
   },
   {
     "dc_steelwall_2_horizontal",
     "steelwall",
-    "steel wall (horizontal)"
+    "steel wall (horizontal)"
   },
   {
     "dc_steelwall_2_vertical",
     "steelwall",
-    "steel wall (vertical)"
+    "steel wall (vertical)"
   },
   {
     "dc_steelwall_2_middle",
     "steelwall",
-    "steel wall (middle)"
+    "steel wall (middle)"
   },
   {
     "dc_steelwall_2_single",
     "steelwall",
-    "steel wall (single)"
+    "steel wall (single)"
   },
   {
     "dc_switchgate_switch_up",
@@ -4663,7 +4665,7 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
   {
     "mm_kettle",
     "mm_kettle",
-    "magic kettle"
+    "magic cauldron"
   },
   {
     "mm_bomb",
@@ -4678,322 +4680,322 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
   {
     "mm_steel_wall_1",
     "mm_steel_wall",
-    "steel wall"
+    "steel wall 1 (MM style)"
   },
   {
     "mm_steel_wall_2",
     "mm_steel_wall",
-    "steel wall"
+    "steel wall 2 (MM style)"
   },
   {
     "mm_steel_wall_3",
     "mm_steel_wall",
-    "steel wall"
+    "steel wall 3 (MM style)"
   },
   {
     "mm_steel_wall_4",
     "mm_steel_wall",
-    "steel wall"
+    "steel wall 4 (MM style)"
   },
   {
     "mm_steel_wall_5",
     "mm_steel_wall",
-    "steel wall"
+    "steel wall 5 (MM style)"
   },
   {
     "mm_steel_wall_6",
     "mm_steel_wall",
-    "steel wall"
+    "steel wall 6 (MM style)"
   },
   {
     "mm_steel_wall_7",
     "mm_steel_wall",
-    "steel wall"
+    "steel wall 7 (MM style)"
   },
   {
     "mm_steel_wall_8",
     "mm_steel_wall",
-    "steel wall"
+    "steel wall 8 (MM style)"
   },
   {
     "mm_steel_wall_9",
     "mm_steel_wall",
-    "steel wall"
+    "steel wall 9 (MM style)"
   },
   {
     "mm_steel_wall_10",
     "mm_steel_wall",
-    "steel wall"
+    "steel wall 10 (MM style)"
   },
   {
     "mm_steel_wall_11",
     "mm_steel_wall",
-    "steel wall"
+    "steel wall 11 (MM style)"
   },
   {
     "mm_steel_wall_12",
     "mm_steel_wall",
-    "steel wall"
+    "steel wall 12 (MM style)"
   },
   {
     "mm_steel_wall_13",
     "mm_steel_wall",
-    "steel wall"
+    "steel wall 13 (MM style)"
   },
   {
     "mm_steel_wall_14",
     "mm_steel_wall",
-    "steel wall"
+    "steel wall 14 (MM style)"
   },
   {
     "mm_steel_wall_15",
     "mm_steel_wall",
-    "steel wall"
+    "steel wall 15 (MM style)"
   },
   {
     "mm_steel_wall_16",
     "mm_steel_wall",
-    "steel wall"
+    "steel wall 16 (MM style)"
   },
   {
     "mm_wooden_wall_1",
     "mm_wooden_wall",
-    "wooden wall"
+    "wooden wall 1 (MM style)"
   },
   {
     "mm_wooden_wall_2",
     "mm_wooden_wall",
-    "wooden wall"
+    "wooden wall 2 (MM style)"
   },
   {
     "mm_wooden_wall_3",
     "mm_wooden_wall",
-    "wooden wall"
+    "wooden wall 3 (MM style)"
   },
   {
     "mm_wooden_wall_4",
     "mm_wooden_wall",
-    "wooden wall"
+    "wooden wall 4 (MM style)"
   },
   {
     "mm_wooden_wall_5",
     "mm_wooden_wall",
-    "wooden wall"
+    "wooden wall 5 (MM style)"
   },
   {
     "mm_wooden_wall_6",
     "mm_wooden_wall",
-    "wooden wall"
+    "wooden wall 6 (MM style)"
   },
   {
     "mm_wooden_wall_7",
     "mm_wooden_wall",
-    "wooden wall"
+    "wooden wall 7 (MM style)"
   },
   {
     "mm_wooden_wall_8",
     "mm_wooden_wall",
-    "wooden wall"
+    "wooden wall 8 (MM style)"
   },
   {
     "mm_wooden_wall_9",
     "mm_wooden_wall",
-    "wooden wall"
+    "wooden wall 9 (MM style)"
   },
   {
     "mm_wooden_wall_10",
     "mm_wooden_wall",
-    "wooden wall"
+    "wooden wall 10 (MM style)"
   },
   {
     "mm_wooden_wall_11",
     "mm_wooden_wall",
-    "wooden wall"
+    "wooden wall 11 (MM style)"
   },
   {
     "mm_wooden_wall_12",
     "mm_wooden_wall",
-    "wooden wall"
+    "wooden wall 12 (MM style)"
   },
   {
     "mm_wooden_wall_13",
     "mm_wooden_wall",
-    "wooden wall"
+    "wooden wall 13 (MM style)"
   },
   {
     "mm_wooden_wall_14",
     "mm_wooden_wall",
-    "wooden wall"
+    "wooden wall 14 (MM style)"
   },
   {
     "mm_wooden_wall_15",
     "mm_wooden_wall",
-    "wooden wall"
+    "wooden wall 15 (MM style)"
   },
   {
     "mm_wooden_wall_16",
     "mm_wooden_wall",
-    "wooden wall"
+    "wooden wall 16 (MM style)"
   },
   {
     "mm_ice_wall_1",
     "mm_ice_wall",
-    "ice wall"
+    "ice wall 1"
   },
   {
     "mm_ice_wall_2",
     "mm_ice_wall",
-    "ice wall"
+    "ice wall 2"
   },
   {
     "mm_ice_wall_3",
     "mm_ice_wall",
-    "ice wall"
+    "ice wall 3"
   },
   {
     "mm_ice_wall_4",
     "mm_ice_wall",
-    "ice wall"
+    "ice wall 4"
   },
   {
     "mm_ice_wall_5",
     "mm_ice_wall",
-    "ice wall"
+    "ice wall 5"
   },
   {
     "mm_ice_wall_6",
     "mm_ice_wall",
-    "ice wall"
+    "ice wall 6"
   },
   {
     "mm_ice_wall_7",
     "mm_ice_wall",
-    "ice wall"
+    "ice wall 7"
   },
   {
     "mm_ice_wall_8",
     "mm_ice_wall",
-    "ice wall"
+    "ice wall 8"
   },
   {
     "mm_ice_wall_9",
     "mm_ice_wall",
-    "ice wall"
+    "ice wall 9"
   },
   {
     "mm_ice_wall_10",
     "mm_ice_wall",
-    "ice wall"
+    "ice wall 10"
   },
   {
     "mm_ice_wall_11",
     "mm_ice_wall",
-    "ice wall"
+    "ice wall 11"
   },
   {
     "mm_ice_wall_12",
     "mm_ice_wall",
-    "ice wall"
+    "ice wall 12"
   },
   {
     "mm_ice_wall_13",
     "mm_ice_wall",
-    "ice wall"
+    "ice wall 13"
   },
   {
     "mm_ice_wall_14",
     "mm_ice_wall",
-    "ice wall"
+    "ice wall 14"
   },
   {
     "mm_ice_wall_15",
     "mm_ice_wall",
-    "ice wall"
+    "ice wall 15"
   },
   {
     "mm_ice_wall_16",
     "mm_ice_wall",
-    "ice wall"
+    "ice wall 16"
   },
   {
     "mm_amoeba_wall_1",
     "mm_amoeba_wall",
-    "amoeba wall"
+    "amoeba wall 1"
   },
   {
     "mm_amoeba_wall_2",
     "mm_amoeba_wall",
-    "amoeba wall"
+    "amoeba wall 2"
   },
   {
     "mm_amoeba_wall_3",
     "mm_amoeba_wall",
-    "amoeba wall"
+    "amoeba wall 3"
   },
   {
     "mm_amoeba_wall_4",
     "mm_amoeba_wall",
-    "amoeba wall"
+    "amoeba wall 4"
   },
   {
     "mm_amoeba_wall_5",
     "mm_amoeba_wall",
-    "amoeba wall"
+    "amoeba wall 5"
   },
   {
     "mm_amoeba_wall_6",
     "mm_amoeba_wall",
-    "amoeba wall"
+    "amoeba wall 6"
   },
   {
     "mm_amoeba_wall_7",
     "mm_amoeba_wall",
-    "amoeba wall"
+    "amoeba wall 7"
   },
   {
     "mm_amoeba_wall_8",
     "mm_amoeba_wall",
-    "amoeba wall"
+    "amoeba wall 8"
   },
   {
     "mm_amoeba_wall_9",
     "mm_amoeba_wall",
-    "amoeba wall"
+    "amoeba wall 9"
   },
   {
     "mm_amoeba_wall_10",
     "mm_amoeba_wall",
-    "amoeba wall"
+    "amoeba wall 10"
   },
   {
     "mm_amoeba_wall_11",
     "mm_amoeba_wall",
-    "amoeba wall"
+    "amoeba wall 11"
   },
   {
     "mm_amoeba_wall_12",
     "mm_amoeba_wall",
-    "amoeba wall"
+    "amoeba wall 12"
   },
   {
     "mm_amoeba_wall_13",
     "mm_amoeba_wall",
-    "amoeba wall"
+    "amoeba wall 13"
   },
   {
     "mm_amoeba_wall_14",
     "mm_amoeba_wall",
-    "amoeba wall"
+    "amoeba wall 14"
   },
   {
     "mm_amoeba_wall_15",
     "mm_amoeba_wall",
-    "amoeba wall"
+    "amoeba wall 15"
   },
   {
     "mm_amoeba_wall_16",
     "mm_amoeba_wall",
-    "amoeba wall"
+    "amoeba wall 16"
   },
   {
     "mm_wooden_block",
@@ -5218,17 +5220,17 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
   {
     "mm_mirror_fixed_2",
     "mm_mirror_fixed",
-    "fixed mirror (0\xb0)"
+    "fixed mirror (45\xb0)"
   },
   {
     "mm_mirror_fixed_3",
     "mm_mirror_fixed",
-    "fixed mirror (0\xb0)"
+    "fixed mirror (90\xb0)"
   },
   {
     "mm_mirror_fixed_4",
     "mm_mirror_fixed",
-    "fixed mirror (0\xb0)"
+    "fixed mirror (135\xb0)"
   },
   {
     "mm_steel_lock",
@@ -5296,24 +5298,24 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
     "extra energy ball (empty)"
   },
   {
-    "mm_unused_156",
-    "unused",
-    "(not used)"
+    "mm_envelope_1",
+    "mm_envelope",
+    "mail envelope 1 (MM style)"
   },
   {
-    "mm_unused_157",
-    "unused",
-    "(not used)"
+    "mm_envelope_2",
+    "mm_envelope",
+    "mail envelope 2 (MM style)"
   },
   {
-    "mm_unused_158",
-    "unused",
-    "(not used)"
+    "mm_envelope_3",
+    "mm_envelope",
+    "mail envelope 3 (MM style)"
   },
   {
-    "mm_unused_159",
-    "unused",
-    "(not used)"
+    "mm_envelope_4",
+    "mm_envelope",
+    "mail envelope 4 (MM style)"
   },
   {
     "df_mirror_1",
@@ -5398,242 +5400,242 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
   {
     "df_wooden_grid_fixed_1",
     "df_wooden_grid_fixed",
-    "fixed wooden polarizer (0\xb0)"
+    "fixed wooden polarizer (DF) (0\xb0)"
   },
   {
     "df_wooden_grid_fixed_2",
     "df_wooden_grid_fixed",
-    "fixed wooden polarizer (22.5\xb0)"
+    "fixed wooden polarizer (DF) (22.5\xb0)"
   },
   {
     "df_wooden_grid_fixed_3",
     "df_wooden_grid_fixed",
-    "fixed wooden polarizer (45\xb0)"
+    "fixed wooden polarizer (DF) (45\xb0)"
   },
   {
     "df_wooden_grid_fixed_4",
     "df_wooden_grid_fixed",
-    "fixed wooden polarizer (67.5\xb0)"
+    "fixed wooden polarizer (DF) (67.5\xb0)"
   },
   {
     "df_wooden_grid_fixed_5",
     "df_wooden_grid_fixed",
-    "fixed wooden polarizer (90\xb0)"
+    "fixed wooden polarizer (DF) (90\xb0)"
   },
   {
     "df_wooden_grid_fixed_6",
     "df_wooden_grid_fixed",
-    "fixed wooden polarizer (112.5\xb0)"
+    "fixed wooden polarizer (DF) (112.5\xb0)"
   },
   {
     "df_wooden_grid_fixed_7",
     "df_wooden_grid_fixed",
-    "fixed wooden polarizer (135\xb0)"
+    "fixed wooden polarizer (DF) (135\xb0)"
   },
   {
     "df_wooden_grid_fixed_8",
     "df_wooden_grid_fixed",
-    "fixed wooden polarizer (157.5\xb0)"
+    "fixed wooden polarizer (DF) (157.5\xb0)"
   },
   {
     "df_steel_grid_fixed_1",
     "df_steel_grid_fixed",
-    "fixed steel polarizer (0\xb0)"
+    "fixed steel polarizer (DF) (0\xb0)"
   },
   {
     "df_steel_grid_fixed_2",
     "df_steel_grid_fixed",
-    "fixed steel polarizer (22.5\xb0)"
+    "fixed steel polarizer (DF) (22.5\xb0)"
   },
   {
     "df_steel_grid_fixed_3",
     "df_steel_grid_fixed",
-    "fixed steel polarizer (45\xb0)"
+    "fixed steel polarizer (DF) (45\xb0)"
   },
   {
     "df_steel_grid_fixed_4",
     "df_steel_grid_fixed",
-    "fixed steel polarizer (67.5\xb0)"
+    "fixed steel polarizer (DF) (67.5\xb0)"
   },
   {
     "df_steel_grid_fixed_5",
     "df_steel_grid_fixed",
-    "fixed steel polarizer (90\xb0)"
+    "fixed steel polarizer (DF) (90\xb0)"
   },
   {
     "df_steel_grid_fixed_6",
     "df_steel_grid_fixed",
-    "fixed steel polarizer (112.5\xb0)"
+    "fixed steel polarizer (DF) (112.5\xb0)"
   },
   {
     "df_steel_grid_fixed_7",
     "df_steel_grid_fixed",
-    "fixed steel polarizer (135\xb0)"
+    "fixed steel polarizer (DF) (135\xb0)"
   },
   {
     "df_steel_grid_fixed_8",
     "df_steel_grid_fixed",
-    "fixed steel polarizer (157.5\xb0)"
+    "fixed steel polarizer (DF) (157.5\xb0)"
   },
   {
     "df_wooden_wall_1",
     "df_wooden_wall",
-    "wooden wall (DF style)"
+    "wooden wall (DF style)"
   },
   {
     "df_wooden_wall_2",
     "df_wooden_wall",
-    "wooden wall (DF style)"
+    "wooden wall (DF style)"
   },
   {
     "df_wooden_wall_3",
     "df_wooden_wall",
-    "wooden wall (DF style)"
+    "wooden wall (DF style)"
   },
   {
     "df_wooden_wall_4",
     "df_wooden_wall",
-    "wooden wall (DF style)"
+    "wooden wall (DF style)"
   },
   {
     "df_wooden_wall_5",
     "df_wooden_wall",
-    "wooden wall (DF style)"
+    "wooden wall (DF style)"
   },
   {
     "df_wooden_wall_6",
     "df_wooden_wall",
-    "wooden wall (DF style)"
+    "wooden wall (DF style)"
   },
   {
     "df_wooden_wall_7",
     "df_wooden_wall",
-    "wooden wall (DF style)"
+    "wooden wall (DF style)"
   },
   {
     "df_wooden_wall_8",
     "df_wooden_wall",
-    "wooden wall (DF style)"
+    "wooden wall (DF style)"
   },
   {
     "df_wooden_wall_9",
     "df_wooden_wall",
-    "wooden wall (DF style)"
+    "wooden wall (DF style)"
   },
   {
     "df_wooden_wall_10",
     "df_wooden_wall",
-    "wooden wall (DF style)"
+    "wooden wall 10 (DF style)"
   },
   {
     "df_wooden_wall_11",
     "df_wooden_wall",
-    "wooden wall (DF style)"
+    "wooden wall 11 (DF style)"
   },
   {
     "df_wooden_wall_12",
     "df_wooden_wall",
-    "wooden wall (DF style)"
+    "wooden wall 12 (DF style)"
   },
   {
     "df_wooden_wall_13",
     "df_wooden_wall",
-    "wooden wall (DF style)"
+    "wooden wall 13 (DF style)"
   },
   {
     "df_wooden_wall_14",
     "df_wooden_wall",
-    "wooden wall (DF style)"
+    "wooden wall 14 (DF style)"
   },
   {
     "df_wooden_wall_15",
     "df_wooden_wall",
-    "wooden wall (DF style)"
+    "wooden wall 15 (DF style)"
   },
   {
     "df_wooden_wall_16",
     "df_wooden_wall",
-    "wooden wall (DF style)"
+    "wooden wall 16 (DF style)"
   },
   {
     "df_steel_wall_1",
     "df_steel_wall",
-    "steel wall (DF style)"
+    "steel wall (DF style)"
   },
   {
     "df_steel_wall_2",
     "df_steel_wall",
-    "steel wall (DF style)"
+    "steel wall (DF style)"
   },
   {
     "df_steel_wall_3",
     "df_steel_wall",
-    "steel wall (DF style)"
+    "steel wall (DF style)"
   },
   {
     "df_steel_wall_4",
     "df_steel_wall",
-    "steel wall (DF style)"
+    "steel wall (DF style)"
   },
   {
     "df_steel_wall_5",
     "df_steel_wall",
-    "steel wall (DF style)"
+    "steel wall (DF style)"
   },
   {
     "df_steel_wall_6",
     "df_steel_wall",
-    "steel wall (DF style)"
+    "steel wall (DF style)"
   },
   {
     "df_steel_wall_7",
     "df_steel_wall",
-    "steel wall (DF style)"
+    "steel wall (DF style)"
   },
   {
     "df_steel_wall_8",
     "df_steel_wall",
-    "steel wall (DF style)"
+    "steel wall (DF style)"
   },
   {
     "df_steel_wall_9",
     "df_steel_wall",
-    "steel wall (DF style)"
+    "steel wall (DF style)"
   },
   {
     "df_steel_wall_10",
     "df_steel_wall",
-    "steel wall (DF style)"
+    "steel wall 10 (DF style)"
   },
   {
     "df_steel_wall_11",
     "df_steel_wall",
-    "steel wall (DF style)"
+    "steel wall 11 (DF style)"
   },
   {
     "df_steel_wall_12",
     "df_steel_wall",
-    "steel wall (DF style)"
+    "steel wall 12 (DF style)"
   },
   {
     "df_steel_wall_13",
     "df_steel_wall",
-    "steel wall (DF style)"
+    "steel wall 13 (DF style)"
   },
   {
     "df_steel_wall_14",
     "df_steel_wall",
-    "steel wall (DF style)"
+    "steel wall 14 (DF style)"
   },
   {
     "df_steel_wall_15",
     "df_steel_wall",
-    "steel wall (DF style)"
+    "steel wall 15 (DF style)"
   },
   {
     "df_steel_wall_16",
     "df_steel_wall",
-    "steel wall (DF style)"
+    "steel wall 16 (DF style)"
   },
   {
     "df_empty_space",
@@ -6233,12 +6235,12 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
   {
     "mm_steel_wall",
     "mm_steel_wall",
-    "steel wall",
+    "steel wall (MM style)",
   },
   {
     "mm_wooden_wall",
     "mm_wooden_wall",
-    "wooden wall",
+    "wooden wall (MM style)",
   },
   {
     "mm_ice_wall",
@@ -6270,270 +6272,1125 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
     "df_wooden_wall",
     "wooden wall (DF style)",
   },
-
-  /* ----------------------------------------------------------------------- */
-  /* "real" (and therefore drawable) runtime elements                        */
-  /* ----------------------------------------------------------------------- */
-
   {
-    "dynabomb_player_1.active",
-    "dynabomb",
-    "-"
+    "spring.left",
+    "spring",
+    "spring (starts moving left)"
   },
   {
-    "dynabomb_player_2.active",
-    "dynabomb",
-    "-"
+    "spring.right",
+    "spring",
+    "spring (starts moving right)"
   },
   {
-    "dynabomb_player_3.active",
-    "dynabomb",
-    "-"
+    "empty_space_1",
+    "empty_space",
+    "empty space 1"
   },
   {
-    "dynabomb_player_4.active",
-    "dynabomb",
-    "-"
+    "empty_space_2",
+    "empty_space",
+    "empty space 2"
   },
   {
-    "sp_disk_red.active",
-    "dynamite",
-    "-"
+    "empty_space_3",
+    "empty_space",
+    "empty space 3"
   },
   {
-    "switchgate.opening",
-    "switchgate",
-    "-"
+    "empty_space_4",
+    "empty_space",
+    "empty space 4"
   },
   {
-    "switchgate.closing",
-    "switchgate",
-    "-"
+    "empty_space_5",
+    "empty_space",
+    "empty space 5"
   },
   {
-    "timegate.opening",
-    "timegate",
-    "-"
+    "empty_space_6",
+    "empty_space",
+    "empty space 6"
   },
   {
-    "timegate.closing",
-    "timegate",
-    "-"
+    "empty_space_7",
+    "empty_space",
+    "empty space 7"
   },
   {
-    "pearl.breaking",
-    "pearl",
-    "-"
+    "empty_space_8",
+    "empty_space",
+    "empty space 8"
   },
   {
-    "trap.active",
-    "trap",
-    "-"
+    "empty_space_9",
+    "empty_space",
+    "empty space 9"
   },
   {
-    "invisible_steelwall.active",
-    "steelwall",
-    "-"
+    "empty_space_10",
+    "empty_space",
+    "empty space 10"
   },
   {
-    "invisible_wall.active",
-    "wall",
-    "-"
+    "empty_space_11",
+    "empty_space",
+    "empty space 11"
   },
   {
-    "invisible_sand.active",
-    "sand",
-    "-"
+    "empty_space_12",
+    "empty_space",
+    "empty space 12"
   },
   {
-    "conveyor_belt_1_left.active",
-    "conveyor_belt",
-    "-"
+    "empty_space_13",
+    "empty_space",
+    "empty space 13"
   },
   {
-    "conveyor_belt_1_middle.active",
-    "conveyor_belt",
-    "-"
+    "empty_space_14",
+    "empty_space",
+    "empty space 14"
   },
   {
-    "conveyor_belt_1_right.active",
-    "conveyor_belt",
-    "-"
+    "empty_space_15",
+    "empty_space",
+    "empty space 15"
   },
   {
-    "conveyor_belt_2_left.active",
-    "conveyor_belt",
-    "-"
+    "empty_space_16",
+    "empty_space",
+    "empty space 16"
   },
   {
-    "conveyor_belt_2_middle.active",
-    "conveyor_belt",
-    "-"
+    "df_mirror_fixed_1",
+    "df_mirror_fixed",
+    "fixed mirror (DF style) (0\xb0)"
   },
   {
-    "conveyor_belt_2_right.active",
-    "conveyor_belt",
-    "-"
+    "df_mirror_fixed_2",
+    "df_mirror_fixed",
+    "fixed mirror (DF style) (11.25\xb0)"
   },
   {
-    "conveyor_belt_3_left.active",
-    "conveyor_belt",
-    "-"
+    "df_mirror_fixed_3",
+    "df_mirror_fixed",
+    "fixed mirror (DF style) (22.5\xb0)"
   },
   {
-    "conveyor_belt_3_middle.active",
-    "conveyor_belt",
-    "-"
+    "df_mirror_fixed_4",
+    "df_mirror_fixed",
+    "fixed mirror (DF style) (33.75\xb0)"
   },
   {
-    "conveyor_belt_3_right.active",
-    "conveyor_belt",
-    "-"
+    "df_mirror_fixed_5",
+    "df_mirror_fixed",
+    "fixed mirror (DF style) (45\xb0)"
   },
   {
-    "conveyor_belt_4_left.active",
-    "conveyor_belt",
-    "-"
+    "df_mirror_fixed_6",
+    "df_mirror_fixed",
+    "fixed mirror (DF style) (56.25\xb0)"
   },
   {
-    "conveyor_belt_4_middle.active",
-    "conveyor_belt",
-    "-"
+    "df_mirror_fixed_7",
+    "df_mirror_fixed",
+    "fixed mirror (DF style) (67.5\xb0)"
   },
   {
-    "conveyor_belt_4_right.active",
-    "conveyor_belt",
-    "-"
+    "df_mirror_fixed_8",
+    "df_mirror_fixed",
+    "fixed mirror (DF style) (78.75\xb0)"
   },
   {
-    "exit.opening",
-    "exit",
-    "-"
+    "df_mirror_fixed_9",
+    "df_mirror_fixed",
+    "fixed mirror (DF style) (90\xb0)"
   },
   {
-    "exit.closing",
-    "exit",
-    "-"
+    "df_mirror_fixed_10",
+    "df_mirror_fixed",
+    "fixed mirror (DF style) (101.25\xb0)"
   },
   {
-    "steel_exit.opening",
-    "steel_exit",
-    "-"
+    "df_mirror_fixed_11",
+    "df_mirror_fixed",
+    "fixed mirror (DF style) (112.5\xb0)"
   },
   {
-    "steel_exit.closing",
-    "steel_exit",
-    "-"
+    "df_mirror_fixed_12",
+    "df_mirror_fixed",
+    "fixed mirror (DF style) (123.75\xb0)"
   },
   {
-    "em_exit.opening",
-    "em_exit",
-    "-"
+    "df_mirror_fixed_13",
+    "df_mirror_fixed",
+    "fixed mirror (DF style) (135\xb0)"
   },
   {
-    "em_exit.closing",
-    "em_exit",
-    "-"
+    "df_mirror_fixed_14",
+    "df_mirror_fixed",
+    "fixed mirror (DF style) (146.25\xb0)"
   },
   {
-    "em_steel_exit.opening",
-    "em_steel_exit",
-    "-"
+    "df_mirror_fixed_15",
+    "df_mirror_fixed",
+    "fixed mirror (DF style) (157.5\xb0)"
   },
   {
-    "em_steel_exit.closing",
-    "em_steel_exit",
-    "-"
+    "df_mirror_fixed_16",
+    "df_mirror_fixed",
+    "fixed mirror (DF style) (168.75\xb0)"
   },
   {
-    "sp_exit.opening",
-    "sp_exit",
-    "-"
+    "df_slope_1",
+    "df_slope",
+    "slope (DF style) (45\xb0)"
   },
   {
-    "sp_exit.closing",
-    "sp_exit",
-    "-"
+    "df_slope_2",
+    "df_slope",
+    "slope (DF style) (135\xb0)"
   },
   {
-    "sp_exit_open",
-    "sp_exit",
-    "-"
+    "df_slope_3",
+    "df_slope",
+    "slope (DF style) (225\xb0)"
   },
   {
-    "sp_terminal.active",
-    "sp_terminal",
-    "-"
+    "df_slope_4",
+    "df_slope",
+    "slope (DF style) (315\xb0)"
   },
   {
-    "sp_buggy_base.activating",
-    "sp_buggy_base",
-    "-"
+    "bd_empty_space",
+    "empty_space",
+    "empty space"
   },
   {
-    "sp_buggy_base.active",
-    "sp_buggy_base",
-    "-"
+    "bd_sand",
+    "bd_sand",
+    "sand"
   },
   {
-    "sp_murphy_clone",
-    "murphy_clone",
-    "-"
+    "bd_sand_2",
+    "bd_sand",
+    "sand 2"
   },
   {
-    "amoeba.dropping",
-    "amoeba",
-    "-"
+    "bd_sand_ball",
+    "bd_sand_ball",
+    "sand ball"
   },
   {
-    "quicksand.emptying",
-    "quicksand",
-    "-"
+    "bd_sand_loose",
+    "bd_sand_loose",
+    "sand (loose)"
   },
   {
-    "quicksand_fast.emptying",
-    "quicksand",
-    "-"
+    "bd_sand_sloped_up_right",
+    "bd_sand_sloped",
+    "sand (sloped up right)"
   },
   {
-    "magic_wall.active",
-    "magic_wall",
-    "-"
+    "bd_sand_sloped_up_left",
+    "bd_sand_sloped",
+    "sand (sloped up left)"
   },
   {
-    "bd_magic_wall.active",
-    "magic_wall",
-    "-"
+    "bd_sand_sloped_down_left",
+    "bd_sand_sloped",
+    "sand (sloped down left)"
   },
   {
-    "dc_magic_wall.active",
-    "magic_wall",
-    "-"
+    "bd_sand_sloped_down_right",
+    "bd_sand_sloped",
+    "sand (sloped down right)"
   },
   {
-    "magic_wall_full",
-    "magic_wall",
-    "-"
+    "bd_sand_glued",
+    "bd_sand_glued",
+    "glued sand"
   },
   {
-    "bd_magic_wall_full",
-    "magic_wall",
-    "-"
+    "bd_wall_sloped_up_right",
+    "bd_wall_sloped",
+    "wall (sloped up right)"
   },
   {
-    "dc_magic_wall_full",
-    "magic_wall",
-    "-"
+    "bd_wall_sloped_up_left",
+    "bd_wall_sloped",
+    "wall (sloped up left)"
   },
   {
-    "magic_wall.emptying",
-    "magic_wall",
-    "-"
+    "bd_wall_sloped_down_left",
+    "bd_wall_sloped",
+    "wall (sloped down left)"
   },
   {
-    "bd_magic_wall.emptying",
-    "magic_wall",
-    "-"
+    "bd_wall_sloped_down_right",
+    "bd_wall_sloped",
+    "wall (sloped down right)"
+  },
+  {
+    "bd_wall_non_sloped",
+    "bd_wall",
+    "wall (non sloped)"
+  },
+  {
+    "bd_wall_diggable",
+    "bd_wall",
+    "diggable wall"
+  },
+  {
+    "bd_wall_diamond",
+    "bd_wall",
+    "wall with diamond"
+  },
+  {
+    "bd_wall_key_1",
+    "bd_wall",
+    "wall with key 1"
+  },
+  {
+    "bd_wall_key_2",
+    "bd_wall",
+    "wall with key 2"
+  },
+  {
+    "bd_wall_key_3",
+    "bd_wall",
+    "wall with key 3"
+  },
+  {
+    "bd_falling_wall",
+    "bd_wall",
+    "falling wall"
+  },
+  {
+    "bd_steelwall",
+    "bd_steelwall",
+    "steel wall"
+  },
+  {
+    "bd_steelwall_sloped_up_right",
+    "bd_steelwall_sloped",
+    "steel wall (sloped up right)"
+  },
+  {
+    "bd_steelwall_sloped_up_left",
+    "bd_steelwall_sloped",
+    "steel wall (sloped up left)"
+  },
+  {
+    "bd_steelwall_sloped_down_left",
+    "bd_steelwall_sloped",
+    "steel wall (sloped down left)"
+  },
+  {
+    "bd_steelwall_sloped_down_right",
+    "bd_steelwall_sloped",
+    "steel wall (sloped down right)"
+  },
+  {
+    "bd_steelwall_explodable",
+    "bd_steelwall",
+    "explodable steel wall"
+  },
+  {
+    "bd_steelwall_diggable",
+    "bd_steelwall",
+    "diggable steel wall"
+  },
+  {
+    "bd_expandable_wall_horizontal",
+    "bd_expandable_wall",
+    "expandable wall (horizontal)"
+  },
+  {
+    "bd_expandable_wall_vertical",
+    "bd_expandable_wall",
+    "expandable wall (vertical)"
+  },
+  {
+    "bd_expandable_wall_any",
+    "bd_expandable_wall",
+    "expandable wall (any direction)"
+  },
+  {
+    "bd_expandable_steelwall_horizontal",
+    "bd_expandable_steelwall",
+    "expandable steelwall (horizontal)"
+  },
+  {
+    "bd_expandable_steelwall_vertical",
+    "bd_expandable_steelwall",
+    "expandable steelwall (vertical)"
+  },
+  {
+    "bd_expandable_steelwall_any",
+    "bd_expandable_steelwall",
+    "expandable steelwall (any direction)"
+  },
+  {
+    "bd_expandable_wall_switch_horizontal",
+    "bd_expandable_wall_switch",
+    "switch for expandable wall (horizontal)"
+  },
+  {
+    "bd_expandable_wall_switch_vertical",
+    "bd_expandable_wall_switch",
+    "switch for expandable wall (vertical)"
+  },
+  {
+    "bd_inbox",
+    "bd_inbox",
+    "inbox with player"
+  },
+  {
+    "bd_exit_closed",
+    "bd_exit",
+    "closed exit"
+  },
+  {
+    "bd_exit_open",
+    "bd_exit",
+    "open exit"
+  },
+  {
+    "bd_invisible_exit_closed",
+    "bd_invisible_exit",
+    "invisible exit (closed)"
+  },
+  {
+    "bd_invisible_exit_open",
+    "bd_invisible_exit",
+    "invisible exit (open)"
+  },
+  {
+    "bd_flying_rock",
+    "bd_flying_rock",
+    "flying rock"
+  },
+  {
+    "bd_mega_rock",
+    "bd_mega_rock",
+    "mega rock"
+  },
+  {
+    "bd_rock_glued",
+    "bd_rock_glued",
+    "glued rock"
+  },
+  {
+    "bd_flying_diamond",
+    "bd_flying_diamond",
+    "flying diamond"
+  },
+  {
+    "bd_diamond_glued",
+    "bd_diamond_glued",
+    "glued diamond"
+  },
+  {
+    "bd_diamond_key",
+    "bd_diamond_key",
+    "diamond key"
+  },
+  {
+    "bd_trapped_diamond",
+    "bd_trapped_diamond",
+    "trapped diamond"
+  },
+  {
+    "bd_nut",
+    "bd_nut",
+    "nut with diamond"
+  },
+  {
+    "bd_amoeba_2",
+    "bd_amoeba",
+    "amoeba 2 (BD style)"
+  },
+  {
+    "bd_bladder",
+    "bd_bladder",
+    "bladder"
+  },
+  {
+    "bd_bladder_spender",
+    "bd_bladder_spender",
+    "bladder spender"
+  },
+  {
+    "bd_creature_switch",
+    "bd_creature_switch",
+    "switch for creature (off)"
+  },
+  {
+    "bd_creature_switch.active",
+    "bd_creature_switch",
+    "switch for creature (on)"
+  },
+  {
+    "bd_biter_switch_1",
+    "bd_biter_switch",
+    "switch for biter"
+  },
+  {
+    "bd_biter_switch_2",
+    "bd_biter_switch",
+    "switch for biter"
+  },
+  {
+    "bd_biter_switch_3",
+    "bd_biter_switch",
+    "switch for biter"
+  },
+  {
+    "bd_biter_switch_4",
+    "bd_biter_switch",
+    "switch for biter"
+  },
+  {
+    "bd_replicator",
+    "bd_replicator",
+    "replicator"
+  },
+  {
+    "bd_replicator.active",
+    "bd_replicator",
+    "replicator (active)"
+  },
+  {
+    "bd_replicator_switch",
+    "bd_replicator_switch",
+    "switch for replicator (off)"
+  },
+  {
+    "bd_replicator_switch.active",
+    "bd_replicator_switch",
+    "switch for replicator (on)"
+  },
+  {
+    "bd_conveyor_left",
+    "bd_conveyor",
+    "conveyor belt (left)"
+  },
+  {
+    "bd_conveyor_left.active",
+    "bd_conveyor",
+    "conveyor belt (left) (active)"
+  },
+  {
+    "bd_conveyor_right",
+    "bd_conveyor",
+    "conveyor belt (right)"
+  },
+  {
+    "bd_conveyor_right.active",
+    "bd_conveyor",
+    "conveyor belt (right) (active)"
+  },
+  {
+    "bd_conveyor_switch",
+    "bd_conveyor_switch",
+    "switch for conveyor belt (off)"
+  },
+  {
+    "bd_conveyor_switch.active",
+    "bd_conveyor_switch",
+    "switch for conveyor belt (on)"
+  },
+  {
+    "bd_conveyor_dir_switch_left",
+    "bd_conveyor_dir_switch",
+    "switch for conveyor belt direction (left)"
+  },
+  {
+    "bd_conveyor_dir_switch_right",
+    "bd_conveyor_dir_switch",
+    "switch for conveyor belt direction (right)"
+  },
+  {
+    "bd_gravity_switch",
+    "bd_gravity_switch",
+    "gravity switch"
+  },
+  {
+    "bd_gravity_switch.active",
+    "bd_gravity_switch",
+    "gravity switch (active)"
+  },
+  {
+    "bd_acid",
+    "bd_acid",
+    "acid"
+  },
+  {
+    "bd_box",
+    "bd_box",
+    "box"
+  },
+  {
+    "bd_time_penalty",
+    "bd_time_penalty",
+    "time penalty"
+  },
+  {
+    "bd_gravestone",
+    "bd_gravestone",
+    "gravestone"
+  },
+  {
+    "bd_clock",
+    "bd_clock",
+    "clock"
+  },
+  {
+    "bd_pot",
+    "bd_pot",
+    "pot"
+  },
+  {
+    "bd_pneumatic_hammer",
+    "bd_pneumatic_hammer",
+    "pneumatic hammer"
+  },
+  {
+    "bd_teleporter",
+    "bd_teleporter",
+    "teleporter"
+  },
+  {
+    "bd_skeleton",
+    "bd_skeleton",
+    "skeleton"
+  },
+  {
+    "bd_water",
+    "bd_water",
+    "water"
+  },
+  {
+    "bd_key_1",
+    "bd_key",
+    "key 1"
+    },
+  {
+    "bd_key_2",
+    "bd_key",
+    "key 2"
+    },
+  {
+    "bd_key_3",
+    "bd_key",
+    "key 3"
+  },
+  {
+    "bd_gate_1",
+    "bd_gate",
+    "door 1"
+  },
+  {
+    "bd_gate_2",
+    "bd_gate",
+    "door 2"
+  },
+  {
+    "bd_gate_3",
+    "bd_gate",
+    "door 3"
+  },
+  {
+    "bd_lava",
+    "bd_lava",
+    "lava"
+  },
+  {
+    "bd_sweet",
+    "bd_sweet",
+    "sweet"
+  },
+  {
+    "bd_voodoo_doll",
+    "bd_voodoo_doll",
+    "voodoo doll"
+  },
+  {
+    "bd_slime",
+    "bd_slime",
+    "slime"
+  },
+  {
+    "bd_waiting_rock",
+    "bd_waiting_rock",
+    "waiting rock"
+  },
+  {
+    "bd_chasing_rock",
+    "bd_chasing_rock",
+    "chasing rock"
+  },
+  {
+    "bd_ghost",
+    "bd_ghost",
+    "ghost"
+  },
+  {
+    "bd_cow",
+    "bd_cow",
+    "cow (random start direction)"
+  },
+  {
+    "bd_cow.left",
+    "bd_cow",
+    "cow (starts moving left)"
+  },
+  {
+    "bd_cow.up",
+    "bd_cow",
+    "cow (starts moving up)"
+  },
+  {
+    "bd_cow.right",
+    "bd_cow",
+    "cow (starts moving right)"
+  },
+  {
+    "bd_cow.down",
+    "bd_cow",
+    "cow (starts moving down)"
+  },
+  {
+    "bd_butterfly_2",
+    "bd_butterfly",
+    "butterfly 2 (random start direction)"
+  },
+  {
+    "bd_butterfly_2.right",
+    "bd_butterfly",
+    "butterfly 2 (starts moving right)"
+  },
+  {
+    "bd_butterfly_2.up",
+    "bd_butterfly",
+    "butterfly 2 (starts moving up)"
+  },
+  {
+    "bd_butterfly_2.left",
+    "bd_butterfly",
+    "butterfly 2 (starts moving left)"
+  },
+  {
+    "bd_butterfly_2.down",
+    "bd_butterfly",
+    "butterfly 2 (starts moving down)"
+  },
+  {
+    "bd_firefly_2",
+    "bd_firefly",
+    "firefly 2 (random start direction)"
+  },
+  {
+    "bd_firefly_2.right",
+    "bd_firefly",
+    "firefly 2 (starts moving right)"
+  },
+  {
+    "bd_firefly_2.up",
+    "bd_firefly",
+    "firefly 2 (starts moving up)"
+  },
+  {
+    "bd_firefly_2.left",
+    "bd_firefly",
+    "firefly 2 (starts moving left)"
+  },
+  {
+    "bd_firefly_2.down",
+    "bd_firefly",
+    "firefly 2 (starts moving down)"
+  },
+  {
+    "bd_stonefly",
+    "bd_stonefly",
+    "stonefly (random start direction)"
+  },
+  {
+    "bd_stonefly.right",
+    "bd_stonefly",
+    "stonefly (starts moving right)"
+  },
+  {
+    "bd_stonefly.up",
+    "bd_stonefly",
+    "stonefly (starts moving up)"
+  },
+  {
+    "bd_stonefly.left",
+    "bd_stonefly",
+    "stonefly (starts moving left)"
+  },
+  {
+    "bd_stonefly.down",
+    "bd_stonefly",
+    "stonefly (starts moving down)"
+  },
+  {
+    "bd_biter",
+    "bd_biter",
+    "biter (random start direction)"
+  },
+  {
+    "bd_biter.right",
+    "bd_biter",
+    "biter (starts moving right)"
+  },
+  {
+    "bd_biter.up",
+    "bd_biter",
+    "biter (starts moving up)"
+  },
+  {
+    "bd_biter.left",
+    "bd_biter",
+    "biter (starts moving left)"
+  },
+  {
+    "bd_biter.down",
+    "bd_biter",
+    "biter (starts moving down)"
+  },
+  {
+    "bd_dragonfly",
+    "bd_dragonfly",
+    "dragonfly (random start direction)"
+  },
+  {
+    "bd_dragonfly.right",
+    "bd_dragonfly",
+    "dragonfly (starts moving right)"
+  },
+  {
+    "bd_dragonfly.up",
+    "bd_dragonfly",
+    "dragonfly (starts moving up)"
+  },
+  {
+    "bd_dragonfly.left",
+    "bd_dragonfly",
+    "dragonfly (starts moving left)"
+  },
+  {
+    "bd_dragonfly.down",
+    "bd_dragonfly",
+    "dragonfly (starts moving down)"
+  },
+  {
+    "bd_bomb",
+    "bd_bomb",
+    "bomb"
+  },
+  {
+    "bd_nitro_pack",
+    "bd_nitro_pack",
+    "nitro pack"
+  },
+  {
+    "bd_player",
+    "bd_player",
+    "player"
+  },
+  {
+    "bd_player_with_bomb",
+    "bd_player",
+    "player with bomb",
+  },
+  {
+    "bd_player_glued",
+    "bd_player",
+    "glued player",
+  },
+  {
+    "bd_player_stirring",
+    "bd_player",
+    "stirring player"
+  },
+  {
+    "bd_fake_bonus",
+    "bd_fake_bonus",
+    "fake bonus"
+  },
+  {
+    "bd_covered",
+    "bd_covered",
+    "covered"
+  },
+
+  // --------------------------------------------------------------------------
+  // "real" (and therefore drawable) runtime elements
+  // --------------------------------------------------------------------------
+
+  {
+    "dynabomb_player_1.active",
+    "dynabomb",
+    "-"
+  },
+  {
+    "dynabomb_player_2.active",
+    "dynabomb",
+    "-"
+  },
+  {
+    "dynabomb_player_3.active",
+    "dynabomb",
+    "-"
+  },
+  {
+    "dynabomb_player_4.active",
+    "dynabomb",
+    "-"
+  },
+  {
+    "sp_disk_red.active",
+    "dynamite",
+    "-"
+  },
+  {
+    "switchgate.opening",
+    "switchgate",
+    "-"
+  },
+  {
+    "switchgate.closing",
+    "switchgate",
+    "-"
+  },
+  {
+    "timegate.opening",
+    "timegate",
+    "-"
+  },
+  {
+    "timegate.closing",
+    "timegate",
+    "-"
+  },
+  {
+    "pearl.breaking",
+    "pearl",
+    "-"
+  },
+  {
+    "trap.active",
+    "trap",
+    "-"
+  },
+  {
+    "invisible_steelwall.active",
+    "steelwall",
+    "-"
+  },
+  {
+    "invisible_wall.active",
+    "wall",
+    "-"
+  },
+  {
+    "invisible_sand.active",
+    "sand",
+    "-"
+  },
+  {
+    "conveyor_belt_1_left.active",
+    "conveyor_belt",
+    "-"
+  },
+  {
+    "conveyor_belt_1_middle.active",
+    "conveyor_belt",
+    "-"
+  },
+  {
+    "conveyor_belt_1_right.active",
+    "conveyor_belt",
+    "-"
+  },
+  {
+    "conveyor_belt_2_left.active",
+    "conveyor_belt",
+    "-"
+  },
+  {
+    "conveyor_belt_2_middle.active",
+    "conveyor_belt",
+    "-"
+  },
+  {
+    "conveyor_belt_2_right.active",
+    "conveyor_belt",
+    "-"
+  },
+  {
+    "conveyor_belt_3_left.active",
+    "conveyor_belt",
+    "-"
+  },
+  {
+    "conveyor_belt_3_middle.active",
+    "conveyor_belt",
+    "-"
+  },
+  {
+    "conveyor_belt_3_right.active",
+    "conveyor_belt",
+    "-"
+  },
+  {
+    "conveyor_belt_4_left.active",
+    "conveyor_belt",
+    "-"
+  },
+  {
+    "conveyor_belt_4_middle.active",
+    "conveyor_belt",
+    "-"
+  },
+  {
+    "conveyor_belt_4_right.active",
+    "conveyor_belt",
+    "-"
+  },
+  {
+    "exit.opening",
+    "exit",
+    "-"
+  },
+  {
+    "exit.closing",
+    "exit",
+    "-"
+  },
+  {
+    "steel_exit.opening",
+    "steel_exit",
+    "-"
+  },
+  {
+    "steel_exit.closing",
+    "steel_exit",
+    "-"
+  },
+  {
+    "em_exit.opening",
+    "em_exit",
+    "-"
+  },
+  {
+    "em_exit.closing",
+    "em_exit",
+    "-"
+  },
+  {
+    "em_steel_exit.opening",
+    "em_steel_exit",
+    "-"
+  },
+  {
+    "em_steel_exit.closing",
+    "em_steel_exit",
+    "-"
+  },
+  {
+    "sp_exit.opening",
+    "sp_exit",
+    "-"
+  },
+  {
+    "sp_exit.closing",
+    "sp_exit",
+    "-"
+  },
+  {
+    "sp_exit_open",
+    "sp_exit",
+    "-"
+  },
+  {
+    "sp_terminal.active",
+    "sp_terminal",
+    "-"
+  },
+  {
+    "sp_buggy_base.activating",
+    "sp_buggy_base",
+    "-"
+  },
+  {
+    "sp_buggy_base.active",
+    "sp_buggy_base",
+    "-"
+  },
+  {
+    "sp_murphy_clone",
+    "murphy_clone",
+    "-"
+  },
+  {
+    "amoeba.dropping",
+    "amoeba",
+    "-"
+  },
+  {
+    "quicksand.emptying",
+    "quicksand",
+    "-"
+  },
+  {
+    "quicksand_fast.emptying",
+    "quicksand",
+    "-"
+  },
+  {
+    "magic_wall.active",
+    "magic_wall",
+    "-"
+  },
+  {
+    "bd_magic_wall.active",
+    "magic_wall",
+    "-"
+  },
+  {
+    "dc_magic_wall.active",
+    "magic_wall",
+    "-"
+  },
+  {
+    "magic_wall_full",
+    "magic_wall",
+    "-"
+  },
+  {
+    "bd_magic_wall_full",
+    "magic_wall",
+    "-"
+  },
+  {
+    "dc_magic_wall_full",
+    "magic_wall",
+    "-"
+  },
+  {
+    "magic_wall.emptying",
+    "magic_wall",
+    "-"
+  },
+  {
+    "bd_magic_wall.emptying",
+    "magic_wall",
+    "-"
   },
   {
     "dc_magic_wall.emptying",
@@ -6646,6 +7503,11 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
     "mm_exit",
     "-"
   },
+  {
+    "mm_gray_ball.active",
+    "mm_gray_ball",
+    "-",
+  },
   {
     "mm_gray_ball.opening",
     "mm_gray_ball",
@@ -6681,10 +7543,20 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
     "mm_pacman",
     "pac man (eating down)"
   },
+  {
+    "mm_bomb.active",
+    "mm_bomb",
+    "active bomb (MM style)"
+  },
+  {
+    "df_mine.active",
+    "df_mine",
+    "active mine"
+  },
 
-  /* ----------------------------------------------------------------------- */
-  /* "unreal" (and therefore not drawable) runtime elements                  */
-  /* ----------------------------------------------------------------------- */
+  // --------------------------------------------------------------------------
+  // "unreal" (and therefore not drawable) runtime elements
+  // --------------------------------------------------------------------------
 
   {
     "blocked",
@@ -6807,9 +7679,9 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
     "-"
   },
 
-  /* ----------------------------------------------------------------------- */
-  /* dummy elements (never used as game elements, only used as graphics)     */
-  /* ----------------------------------------------------------------------- */
+  // --------------------------------------------------------------------------
+  // dummy elements (never used as game elements, only used as graphics)
+  // --------------------------------------------------------------------------
 
   {
     "steelwall_topleft",
@@ -6931,56 +7803,6 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
     "-",
     "-"
   },
-  {
-    "mm_mask_mcduffin.right",
-    "-",
-    "-"
-  },
-  {
-    "mm_mask_mcduffin.up",
-    "-",
-    "-"
-  },
-  {
-    "mm_mask_mcduffin.left",
-    "-",
-    "-"
-  },
-  {
-    "mm_mask_mcduffin.down",
-    "-",
-    "-"
-  },
-  {
-    "mm_mask_grid_1",
-    "-",
-    "-"
-  },
-  {
-    "mm_mask_grid_2",
-    "-",
-    "-"
-  },
-  {
-    "mm_mask_grid_3",
-    "-",
-    "-"
-  },
-  {
-    "mm_mask_grid_4",
-    "-",
-    "-"
-  },
-  {
-    "mm_mask_rectangle",
-    "-",
-    "-"
-  },
-  {
-    "mm_mask_circle",
-    "-",
-    "-"
-  },
   {
     "[default]",
     "default",
@@ -7046,6 +7868,11 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
     "graphic",
     "-"
   },
+  {
+    "bd_game_graphics_color_template",
+    "-",
+    "-"
+  },
   {
     "internal_clipboard_custom",
     "internal",
@@ -7076,6 +7903,16 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
     "internal",
     "hide Boulder Dash elements"
   },
+  {
+    "internal_cascade_bd_native",
+    "internal",
+    "show native Boulder Dash elements"
+  },
+  {
+    "internal_cascade_bd_native.active",
+    "internal",
+    "hide native Boulder Dash elements"
+  },
   {
     "internal_cascade_em",
     "internal",
@@ -7206,6 +8043,16 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
     "internal",
     "hide group elements"
   },
+  {
+    "internal_cascade_es",
+    "internal",
+    "show empty space elements"
+  },
+  {
+    "internal_cascade_es.active",
+    "internal",
+    "hide empty space elements"
+  },
   {
     "internal_cascade_ref",
     "internal",
@@ -7237,7 +8084,7 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
     "hide elements used in this level"
   },
 
-  /* keyword to stop parser: "ELEMENT_INFO_END" <-- do not change! */
+  // keyword to stop parser: "ELEMENT_INFO_END" <-- do not change!
 
   {
     NULL,
@@ -7247,9 +8094,9 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
 };
 
 
-/* ------------------------------------------------------------------------- */
-/* element action and direction definitions                                  */
-/* ------------------------------------------------------------------------- */
+// ----------------------------------------------------------------------------
+// element action and direction definitions
+// ----------------------------------------------------------------------------
 
 struct ElementActionInfo element_action_info[NUM_ACTIONS + 1 + 1] =
 {
@@ -7372,7 +8219,7 @@ struct ElementActionInfo element_action_info[NUM_ACTIONS + 1 + 1] =
   { ".part_32",                        ACTION_PART_32,                 FALSE   },
   { ".other",                  ACTION_OTHER,                   FALSE   },
 
-  /* empty suffix always matches -- check as last entry in InitSoundInfo() */
+  // empty suffix always matches -- check as last entry in InitSoundInfo()
   { "",                                ACTION_DEFAULT,                 TRUE    },
 
   { NULL,                      0,                              0       }
@@ -7395,6 +8242,7 @@ struct ElementDirectionInfo element_direction_info[NUM_DIRECTIONS_FULL + 1] =
 struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1 + 1] =
 {
   { ".[DEFAULT]",              GFX_SPECIAL_ARG_DEFAULT,                },
+  { ".LOADING_INITIAL",                GFX_SPECIAL_ARG_LOADING_INITIAL,        },
   { ".LOADING",                        GFX_SPECIAL_ARG_LOADING,                },
   { ".TITLE_INITIAL",          GFX_SPECIAL_ARG_TITLE_INITIAL,          },
   { ".TITLE_INITIAL_1",                GFX_SPECIAL_ARG_TITLE_INITIAL_1,        },
@@ -7409,9 +8257,11 @@ struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1 + 1] =
   { ".TITLE_4",                        GFX_SPECIAL_ARG_TITLE_4,                },
   { ".TITLE_5",                        GFX_SPECIAL_ARG_TITLE_5,                },
   { ".MAIN",                   GFX_SPECIAL_ARG_MAIN,                   },
+  { ".NAMES",                  GFX_SPECIAL_ARG_NAMES,                  },
   { ".LEVELS",                 GFX_SPECIAL_ARG_LEVELS                  },
   { ".LEVELNR",                        GFX_SPECIAL_ARG_LEVELNR                 },
   { ".SCORES",                 GFX_SPECIAL_ARG_SCORES,                 },
+  { ".SCOREINFO",              GFX_SPECIAL_ARG_SCOREINFO,              },
   { ".EDITOR",                 GFX_SPECIAL_ARG_EDITOR,                 },
   { ".INFO",                   GFX_SPECIAL_ARG_INFO,                   },
   { ".SETUP",                  GFX_SPECIAL_ARG_SETUP,                  },
@@ -7422,31 +8272,35 @@ struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1 + 1] =
   { ".PREVIEW",                        GFX_SPECIAL_ARG_PREVIEW,                },
   { ".CRUMBLED",               GFX_SPECIAL_ARG_CRUMBLED,               },
   { ".MAINONLY",               GFX_SPECIAL_ARG_MAINONLY,               },
+  { ".NAMESONLY",              GFX_SPECIAL_ARG_NAMESONLY,              },
+  { ".SCORESONLY",             GFX_SPECIAL_ARG_SCORESONLY,             },
   { ".TYPENAME",               GFX_SPECIAL_ARG_TYPENAME,               },
+  { ".TYPENAMES",              GFX_SPECIAL_ARG_TYPENAMES,              },
   { ".SUBMENU",                        GFX_SPECIAL_ARG_SUBMENU,                },
   { ".MENU",                   GFX_SPECIAL_ARG_MENU,                   },
   { ".TOONS",                  GFX_SPECIAL_ARG_TOONS,                  },
   { ".SCORESOLD",              GFX_SPECIAL_ARG_SCORESOLD,              },
   { ".SCORESNEW",              GFX_SPECIAL_ARG_SCORESNEW,              },
+  { ".NO_TITLE",               GFX_SPECIAL_ARG_NO_TITLE,               },
   { ".FADING",                 GFX_SPECIAL_ARG_FADING,                 },
   { ".QUIT",                   GFX_SPECIAL_ARG_QUIT,                   },
 
-  /* empty suffix always matches -- check as last entry in InitMusicInfo() */
+  // empty suffix always matches -- check as last entry in InitMusicInfo()
   { "",                                GFX_SPECIAL_ARG_DEFAULT,                },
 
   { NULL,                      0,                                      }
 };
 
-#include "conf_var.c"  /* include auto-generated data structure definitions */
+#include "conf_var.c"  // include auto-generated data structure definitions
 
 
-/* ------------------------------------------------------------------------- */
-/* font definitions                                                          */
-/* ------------------------------------------------------------------------- */
+// ----------------------------------------------------------------------------
+// font definitions
+// ----------------------------------------------------------------------------
 
-/* Important: When one entry is a prefix of another entry, the longer entry
-   must come first, because the dynamic configuration does prefix matching!
-   (These definitions must match the corresponding definitions in "main.h"!) */
+// Important: When one entry is a prefix of another entry, the longer entry
+// must come first, because the dynamic configuration does prefix matching!
+// (These definitions must match the corresponding definitions in "main.h"!)
 
 struct FontInfo font_info[NUM_FONTS + 1] =
 {
@@ -7472,6 +8326,7 @@ struct FontInfo font_info[NUM_FONTS + 1] =
   { "font.envelope_2"          },
   { "font.envelope_3"          },
   { "font.envelope_4"          },
+  { "font.request_narrow"      },
   { "font.request"             },
   { "font.input_1.active"      },
   { "font.input_2.active"      },
@@ -7483,6 +8338,7 @@ struct FontInfo font_info[NUM_FONTS + 1] =
   { "font.option_on"           },
   { "font.value_1"             },
   { "font.value_2"             },
+  { "font.value_old_narrow"    },
   { "font.value_old"           },
   { "font.value_narrow"                },
   { "font.level_number.active" },
@@ -7491,16 +8347,17 @@ struct FontInfo font_info[NUM_FONTS + 1] =
   { "font.game_info"           },
   { "font.info.elements"       },
   { "font.info.levelset"       },
+  { "font.main.network_players"        },
 
   { NULL                       }
 };
 
 struct GlobalAnimInfo global_anim_info[NUM_GLOBAL_ANIM_TOKENS + 1];
 
-/* this contains predefined structure elements to init "global_anim_info" */
+// this contains predefined structure elements to init "global_anim_info"
 struct GlobalAnimNameInfo global_anim_name_info[NUM_GLOBAL_ANIM_TOKENS + 1] =
 {
-  /* (real) graphic definitions used to define animation graphics */
+  // (real) graphic definitions used to define animation graphics
   { "gfx.global.anim_1",       },
   { "gfx.global.anim_2",       },
   { "gfx.global.anim_3",       },
@@ -7534,7 +8391,7 @@ struct GlobalAnimNameInfo global_anim_name_info[NUM_GLOBAL_ANIM_TOKENS + 1] =
   { "gfx.global.anim_31",      },
   { "gfx.global.anim_32",      },
 
-  /* (dummy) graphic definitions used to define animation controls */
+  // (dummy) graphic definitions used to define animation controls
   { "global.anim_1",           },
   { "global.anim_2",           },
   { "global.anim_3",           },
@@ -7571,10 +8428,15 @@ struct GlobalAnimNameInfo global_anim_name_info[NUM_GLOBAL_ANIM_TOKENS + 1] =
   { NULL                       }
 };
 
+struct GlobalAnimEventInfo global_anim_event_info =
+{
+  NULL, 0
+};
+
 
-/* ------------------------------------------------------------------------- */
-/* music token prefix definitions                                            */
-/* ------------------------------------------------------------------------- */
+// ----------------------------------------------------------------------------
+// music token prefix definitions
+// ----------------------------------------------------------------------------
 
 struct MusicPrefixInfo music_prefix_info[NUM_MUSIC_PREFIXES + 1] =
 {
@@ -7584,27 +8446,28 @@ struct MusicPrefixInfo music_prefix_info[NUM_MUSIC_PREFIXES + 1] =
 };
 
 
-/* ========================================================================= */
-/* main()                                                                    */
-/* ========================================================================= */
+// ============================================================================
+// main()
+// ============================================================================
 
-static void print_usage()
+static void print_usage(void)
 {
   Print("\n"
        "Usage: %s [OPTION]... [HOSTNAME [PORT]]\n"
        "\n"
        "Options:\n"
        "  -b, --basepath DIRECTORY         alternative base DIRECTORY\n"
-       "  -l, --level DIRECTORY            alternative level DIRECTORY\n"
+       "  -l, --levels DIRECTORY           alternative levels DIRECTORY\n"
        "  -g, --graphics DIRECTORY         alternative graphics DIRECTORY\n"
        "  -s, --sounds DIRECTORY           alternative sounds DIRECTORY\n"
        "  -m, --music DIRECTORY            alternative music DIRECTORY\n"
+       "      --display NR                 open program window on display NR\n"
        "      --mytapes                    use private tapes for tape tests\n"
        "  -n, --network                    network multiplayer game\n"
        "      --serveronly                 only start network server\n"
        "  -v, --verbose                    verbose mode\n"
        "  -V, --version                    show program version\n"
-       "      --debug                      display debugging information\n"
+       "      --debug[=MODE]               show (and limit) debug output\n"
        "  -e, --execute COMMAND            execute batch COMMAND\n"
        "\n"
        "Valid commands for '--execute' option:\n"
@@ -7616,18 +8479,20 @@ static void print_usage()
        "  \"print helptext.conf\"            print default helptext config\n"
        "  \"dump level FILE\"                dump level data from FILE\n"
        "  \"dump tape FILE\"                 dump tape data from FILE\n"
-       "  \"autotest LEVELDIR [NR ...]\"     test level tapes for LEVELDIR\n"
        "  \"autoplay LEVELDIR [NR ...]\"     play level tapes for LEVELDIR\n"
        "  \"autoffwd LEVELDIR [NR ...]\"     ffwd level tapes for LEVELDIR\n"
        "  \"autowarp LEVELDIR [NR ...]\"     warp level tapes for LEVELDIR\n"
+       "  \"autotest LEVELDIR [NR ...]\"     test level tapes for LEVELDIR\n"
+       "  \"autofix LEVELDIR [NR ...]\"      test and fix tapes for LEVELDIR\n"
+       "  \"patch tapes MODE LEVELDIR [NR]\" patch level tapes for LEVELDIR\n"
        "  \"convert LEVELDIR [NR]\"          convert levels in LEVELDIR\n"
-       "  \"create images DIRECTORY\"        write BMP images to DIRECTORY\n"
-       "  \"create CE image DIRECTORY\"      write BMP image to DIRECTORY\n"
+       "  \"create sketch images DIRECTORY\" write BMP images to DIRECTORY\n"
+       "  \"create collect image DIRECTORY\" write BMP image to DIRECTORY\n"
        "\n",
        program.command_basename);
 }
 
-static void print_version()
+static void print_version(void)
 {
   Print("%s", getProgramInitString());
 
@@ -7635,10 +8500,10 @@ static void print_version()
   {
     Print(" (%s %d.%d.%d.%d%s)",
          PROGRAM_TITLE_STRING,
+         PROGRAM_VERSION_SUPER,
          PROGRAM_VERSION_MAJOR,
          PROGRAM_VERSION_MINOR,
          PROGRAM_VERSION_PATCH,
-         PROGRAM_VERSION_BUILD,
          PROGRAM_VERSION_EXTRA);
   }
 
@@ -7679,29 +8544,13 @@ static void InitProgramConfig(char *command_filename)
   char *program_title = PROGRAM_TITLE_STRING;
   char *program_icon_file = PROGRAM_ICON_FILENAME;
   char *program_version = getProgramRealVersionString();
+  char *program_basename = getBaseNameNoSuffix(command_filename);
   char *config_filename = getProgramConfigFilename(command_filename);
-  char *userdata_basename = getBaseNameNoSuffix(command_filename);
   char *userdata_subdir;
-  char *userdata_subdir_unix;
 
   // read default program config, if existing
   if (fileExists(config_filename))
-  {
-    // if program config file exists, derive Unix user data directory from it
-    // (but only if the program config file is not generic "setup.conf" file)
-    if (!strEqual(getBaseNamePtr(config_filename), SETUP_FILENAME))
-    {
-      userdata_basename = getBaseName(config_filename);
-
-      if (strSuffix(userdata_basename, ".conf"))
-       userdata_basename[strlen(userdata_basename) - 5] = '\0';
-    }
-
     LoadSetupFromFilename(config_filename);
-  }
-
-  // set user data directory for Linux/Unix (but not Mac OS X)
-  userdata_subdir_unix = getStringCat2(".", userdata_basename);
 
   // set program title from potentially redefined program title
   if (setup.internal.program_title != NULL &&
@@ -7718,10 +8567,10 @@ static void InitProgramConfig(char *command_filename)
       strlen(setup.internal.program_icon_file) > 0)
     program_icon_file = getStringCopy(setup.internal.program_icon_file);
 
-#if defined(PLATFORM_WIN32) || defined(PLATFORM_MACOSX)
+#if defined(PLATFORM_WINDOWS) || defined(PLATFORM_MAC) || defined(PLATFORM_EMSCRIPTEN)
   userdata_subdir = program_title;
 #elif defined(PLATFORM_UNIX)
-  userdata_subdir = userdata_subdir_unix;
+  userdata_subdir = getStringCat2(".", program_basename);
 #else
   userdata_subdir = USERDATA_DIRECTORY_OTHER;
 #endif
@@ -7737,7 +8586,7 @@ static void InitProgramConfig(char *command_filename)
   InitProgramInfo(command_filename,
                  config_filename,
                  userdata_subdir,
-                 program_title,
+                 program_basename,
                  program_title,
                  program_icon_file,
                  COOKIE_PREFIX,
@@ -7760,5 +8609,5 @@ int main(int argc, char *argv[])
   EventLoop();
   CloseAllAndExit(0);
 
-  return 0;    /* to keep compilers happy */
+  return 0;    // to keep compilers happy
 }