added support for amoeba settings in BD engine to level editor
[rocksndiamonds.git] / src / main.c
index a1ba5c7c5cc6069b92d5ec07e8bb689848182b70..a727eaa53439274ce584613a0c1d062cc879bc55 100644 (file)
 #include "events.h"
 #include "config.h"
 
-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;
+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;
-int                    game_status_last_screen = -1;
-boolean                        level_editor_test_game = FALSE;
-boolean                        score_info_tape_play = 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;
 
-int                    key_joystick_mapping = 0;
+int                            key_joystick_mapping = 0;
 
-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];
+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                    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                            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                            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 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 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         *anim_url_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;
 
 
 // ----------------------------------------------------------------------------
@@ -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)"
   },
   {
@@ -6460,6 +6462,671 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
     "df_slope",
     "slope (DF style) (315\xb0)"
   },
+  {
+    "bd_empty_space",
+    "empty_space",
+    "empty space"
+  },
+  {
+    "bd_sand",
+    "bd_sand",
+    "sand"
+  },
+  {
+    "bd_sand_2",
+    "bd_sand",
+    "sand 2"
+  },
+  {
+    "bd_sand_ball",
+    "bd_sand_ball",
+    "sand ball"
+  },
+  {
+    "bd_sand_loose",
+    "bd_sand_loose",
+    "sand (loose)"
+  },
+  {
+    "bd_sand_sloped_up_right",
+    "bd_sand_sloped",
+    "sand (sloped up right)"
+  },
+  {
+    "bd_sand_sloped_up_left",
+    "bd_sand_sloped",
+    "sand (sloped up left)"
+  },
+  {
+    "bd_sand_sloped_down_left",
+    "bd_sand_sloped",
+    "sand (sloped down left)"
+  },
+  {
+    "bd_sand_sloped_down_right",
+    "bd_sand_sloped",
+    "sand (sloped down right)"
+  },
+  {
+    "bd_sand_glued",
+    "bd_sand_glued",
+    "glued sand"
+  },
+  {
+    "bd_wall_sloped_up_right",
+    "bd_wall_sloped",
+    "wall (sloped up right)"
+  },
+  {
+    "bd_wall_sloped_up_left",
+    "bd_wall_sloped",
+    "wall (sloped up left)"
+  },
+  {
+    "bd_wall_sloped_down_left",
+    "bd_wall_sloped",
+    "wall (sloped down left)"
+  },
+  {
+    "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
@@ -7201,6 +7868,11 @@ struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
     "graphic",
     "-"
   },
+  {
+    "bd_game_graphics_color_template",
+    "-",
+    "-"
+  },
   {
     "internal_clipboard_custom",
     "internal",
@@ -7231,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",