rnd-20030223-3-src
[rocksndiamonds.git] / src / main.c
index 7cb246320a9febf64a608a66fe714d4d98065ac8..7c91f3a9db1a5ae728489537c79fafbb33de43f7 100644 (file)
 #include "events.h"
 
 #if 0
-GC             tile_clip_gc;
-Bitmap        *pix[NUM_BITMAPS];
+GC                     tile_clip_gc;
+Bitmap                *pix[NUM_BITMAPS];
 #endif
-Bitmap        *bitmap_db_field, *bitmap_db_door;
+Bitmap                *bitmap_db_field, *bitmap_db_door;
 #if 0
-Pixmap         tile_clipmask[NUM_TILES];
+Pixmap                 tile_clipmask[NUM_TILES];
 #endif
-DrawBuffer     *fieldbuffer;
-DrawBuffer     *drawto_field;
+DrawBuffer          *fieldbuffer;
+DrawBuffer          *drawto_field;
 
-int            game_status = MAINMENU;
-boolean                level_editor_test_game = FALSE;
-boolean                network_playing = FALSE;
+int                    game_status = MAINMENU;
+boolean                        level_editor_test_game = FALSE;
+boolean                        network_playing = FALSE;
 
-int            key_joystick_mapping = 0;
+int                    key_joystick_mapping = 0;
 
-boolean                redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE];
-int            redraw_x1 = 0, redraw_y1 = 0;
+boolean                        redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE];
+int                    redraw_x1 = 0, redraw_y1 = 0;
 
-short          Feld[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short          Ur[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          Store[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short          Store2[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short          StorePlayer[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-boolean                Stop[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short          JustStopped[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short          AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short          AmoebaCnt[MAX_NUM_AMOEBA], AmoebaCnt2[MAX_NUM_AMOEBA];
-short          ExplodePhase[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short          ExplodeField[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                  Feld[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                  Ur[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                  Store[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                  Store2[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                  StorePlayer[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+boolean                        Stop[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                  JustStopped[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                  ExplodePhase[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short                  ExplodeField[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 
-unsigned long  Properties1[MAX_NUM_ELEMENTS];
-unsigned long  Properties2[MAX_NUM_ELEMENTS];
+unsigned long          Properties1[MAX_NUM_ELEMENTS];
+unsigned long          Properties2[MAX_NUM_ELEMENTS];
 
-int            GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-short          GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+int                    GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+int                    GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+int                    GfxRandom[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 
-int            lev_fieldx,lev_fieldy, scroll_x,scroll_y;
+int                    lev_fieldx, lev_fieldy;
+int                    scroll_x, scroll_y;
 
-int            FX = SX, FY = SY, ScrollStepSize;
-int            ScreenMovDir = MV_NO_MOVING, ScreenMovPos = 0;
-int            ScreenGfxPos = 0;
-int            BorderElement = EL_STEELWALL;
-int            GameFrameDelay = GAME_FRAME_DELAY;
-int            FfwdFrameDelay = FFWD_FRAME_DELAY;
-int            BX1 = 0, BY1 = 0, BX2 = SCR_FIELDX-1, BY2 = SCR_FIELDY-1;
-int            SBX_Left, SBX_Right;
-int            SBY_Upper, SBY_Lower;
-int            ZX,ZY, ExitX,ExitY;
-int            AllPlayersGone;
+int                    FX = SX, FY = SY;
+int                    ScrollStepSize;
+int                    ScreenMovDir = MV_NO_MOVING, ScreenMovPos = 0;
+int                    ScreenGfxPos = 0;
+int                    BorderElement = EL_STEELWALL;
+int                    GameFrameDelay = GAME_FRAME_DELAY;
+int                    FfwdFrameDelay = FFWD_FRAME_DELAY;
+int                    BX1 = 0, BY1 = 0;
+int                    BX2 = SCR_FIELDX - 1, BY2 = SCR_FIELDY - 1;
+int                    SBX_Left, SBX_Right;
+int                    SBY_Upper, SBY_Lower;
+int                    ZX, ZY;
+int                    ExitX, ExitY;
+int                    AllPlayersGone;
 
-int            TimeFrames, TimePlayed, TimeLeft;
+int                    TimeFrames, TimePlayed, TimeLeft;
 
-boolean                network_player_action_received = FALSE;
+boolean                        network_player_action_received = FALSE;
 
 struct LevelInfo       level;
 struct PlayerInfo      stored_player[MAX_PLAYERS], *local_player = NULL;
@@ -84,12 +90,19 @@ struct TapeInfo             tape;
 struct SetupInfo       setup;
 struct GameInfo                game;
 struct GlobalInfo      global;
-struct FileInfo               *image_files;
-struct FileInfo               *sound_files;
+struct GraphicInfo     *graphic_info = NULL;
+struct SoundInfo       *sound_info = NULL;
 
-struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
+
+/* ------------------------------------------------------------------------- */
+/* element definitions                                                       */
+/* ------------------------------------------------------------------------- */
+
+struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] =
 {
-  /* "real" level file elements */
+  /* ----------------------------------------------------------------------- */
+  /* "real" level file elements                                              */
+  /* ----------------------------------------------------------------------- */
 
   {
     "empty_space",
@@ -405,7 +418,7 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
   },
   {
     "unused_63",
-    NULL,
+    "unused",
     "(not used)"
   },
   {
@@ -624,7 +637,7 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
   },
   {
     "black_orb",
-    NULL,
+    "black_orb",
     "black orb bomb"
   },
   {
@@ -649,22 +662,22 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
   },
   {
     "arrow_blue_left",
-    NULL,
+    "arrow",
     "arrow left"
   },
   {
     "arrow_blue_right",
-    NULL,
+    "arrow",
     "arrow right"
   },
   {
     "arrow_blue_up",
-    NULL,
+    "arrow",
     "arrow up"
   },
   {
     "arrow_blue_down",
-    NULL,
+    "arrow",
     "arrow down"
   },
   {
@@ -684,402 +697,402 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
   },
   {
     "char_space",
-    NULL,
+    "char",
     "letter ' '"
   },
   {
     "char_exclam",
-    NULL,
+    "char",
     "letter '!'"
   },
   {
     "char_quotedbl",
-    NULL,
+    "char",
     "letter '\"'"
   },
   {
     "char_numbersign",
-    NULL,
+    "char",
     "letter '#'"
   },
   {
     "char_dollar",
-    NULL,
+    "char",
     "letter '$'"
   },
   {
     "char_procent",
-    NULL,
+    "char",
     "letter '%'"
   },
   {
     "char_ampersand",
-    NULL,
+    "char",
     "letter '&'"
   },
   {
     "char_apostrophe",
-    NULL,
+    "char",
     "letter '''"
   },
   {
     "char_parenleft",
-    NULL,
+    "char",
     "letter '('"
   },
   {
     "char_parenright",
-    NULL,
+    "char",
     "letter ')'"
   },
   {
     "char_asterisk",
-    NULL,
+    "char",
     "letter '*'"
   },
   {
     "char_plus",
-    NULL,
+    "char",
     "letter '+'"
   },
   {
     "char_comma",
-    NULL,
+    "char",
     "letter ','"
   },
   {
     "char_minus",
-    NULL,
+    "char",
     "letter '-'"
   },
   {
     "char_period",
-    NULL,
+    "char",
     "letter '.'"
   },
   {
     "char_slash",
-    NULL,
+    "char",
     "letter '/'"
   },
   {
     "char_0",
-    NULL,
+    "char",
     "letter '0'"
   },
   {
     "char_1",
-    NULL,
+    "char",
     "letter '1'"
   },
   {
     "char_2",
-    NULL,
+    "char",
     "letter '2'"
   },
   {
     "char_3",
-    NULL,
+    "char",
     "letter '3'"
   },
   {
     "char_4",
-    NULL,
+    "char",
     "letter '4'"
   },
   {
     "char_5",
-    NULL,
+    "char",
     "letter '5'"
   },
   {
     "char_6",
-    NULL,
+    "char",
     "letter '6'"
   },
   {
     "char_7",
-    NULL,
+    "char",
     "letter '7'"
   },
   {
     "char_8",
-    NULL,
+    "char",
     "letter '8'"
   },
   {
     "char_9",
-    NULL,
+    "char",
     "letter '9'"
   },
   {
     "char_colon",
-    NULL,
+    "char",
     "letter ':'"
   },
   {
     "char_semicolon",
-    NULL,
+    "char",
     "letter ';'"
   },
   {
     "char_less",
-    NULL,
+    "char",
     "letter '<'"
   },
   {
     "char_equal",
-    NULL,
+    "char",
     "letter '='"
   },
   {
     "char_greater",
-    NULL,
+    "char",
     "letter '>'"
   },
   {
     "char_question",
-    NULL,
+    "char",
     "letter '?'"
   },
   {
     "char_at",
-    NULL,
+    "char",
     "letter '@'"
   },
   {
     "char_a",
-    NULL,
+    "char",
     "letter 'A'"
   },
   {
     "char_b",
-    NULL,
+    "char",
     "letter 'B'"
   },
   {
     "char_c",
-    NULL,
+    "char",
     "letter 'C'"
   },
   {
     "char_d",
-    NULL,
+    "char",
     "letter 'D'"
   },
   {
     "char_e",
-    NULL,
+    "char",
     "letter 'E'"
   },
   {
     "char_f",
-    NULL,
+    "char",
     "letter 'F'"
   },
   {
     "char_g",
-    NULL,
+    "char",
     "letter 'G'"
   },
   {
     "char_h",
-    NULL,
+    "char",
     "letter 'H'"
   },
   {
     "char_i",
-    NULL,
+    "char",
     "letter 'I'"
   },
   {
     "char_j",
-    NULL,
+    "char",
     "letter 'J'"
   },
   {
     "char_k",
-    NULL,
+    "char",
     "letter 'K'"
   },
   {
     "char_l",
-    NULL,
+    "char",
     "letter 'L'"
   },
   {
     "char_m",
-    NULL,
+    "char",
     "letter 'M'"
   },
   {
     "char_n",
-    NULL,
+    "char",
     "letter 'N'"
   },
   {
     "char_o",
-    NULL,
+    "char",
     "letter 'O'"
   },
   {
     "char_p",
-    NULL,
+    "char",
     "letter 'P'"
   },
   {
     "char_q",
-    NULL,
+    "char",
     "letter 'Q'"
   },
   {
     "char_r",
-    NULL,
+    "char",
     "letter 'R'"
   },
   {
     "char_s",
-    NULL,
+    "char",
     "letter 'S'"
   },
   {
     "char_t",
-    NULL,
+    "char",
     "letter 'T'"
   },
   {
     "char_u",
-    NULL,
+    "char",
     "letter 'U'"
   },
   {
     "char_v",
-    NULL,
+    "char",
     "letter 'V'"
   },
   {
     "char_w",
-    NULL,
+    "char",
     "letter 'W'"
   },
   {
     "char_x",
-    NULL,
+    "char",
     "letter 'X'"
   },
   {
     "char_y",
-    NULL,
+    "char",
     "letter 'Y'"
   },
   {
     "char_z",
-    NULL,
+    "char",
     "letter 'Z'"
   },
   {
     "char_ae",
-    NULL,
+    "char",
     "letter 'Ä'"
   },
   {
     "char_oe",
-    NULL,
+    "char",
     "letter 'Ö'"
   },
   {
     "char_ue",
-    NULL,
+    "char",
     "letter 'Ü'"
   },
   {
     "char_copyright",
-    NULL,
+    "char",
     "letter '^'"
   },
   {
     "char_underscore",
-    NULL,
+    "char",
     "letter ''"
   },
   {
     "char_empty",
-    NULL,
+    "char",
     "letter ''"
   },
   {
     "char_degree",
-    NULL,
+    "char",
     "letter ''"
   },
   {
     "char_tm",
-    NULL,
+    "char",
     "letter ''"
   },
   {
     "char_cursor",
-    NULL,
+    "char",
     "letter ''"
   },
   {
-    NULL,
-    NULL,
+    "char_unused",
+    "char",
     "letter ''"
   },
   {
-    NULL,
-    NULL,
+    "char_unused",
+    "char",
     "letter ''"
   },
   {
-    NULL,
-    NULL,
+    "char_unused",
+    "char",
     "letter ''"
   },
   {
-    NULL,
-    NULL,
+    "char_unused",
+    "char",
     "letter ''"
   },
   {
-    NULL,
-    NULL,
+    "char_unused",
+    "char",
     "letter ''"
   },
   {
-    NULL,
-    NULL,
+    "char_unused",
+    "char",
     "letter ''"
   },
   {
-    NULL,
-    NULL,
+    "char_unused",
+    "char",
     "letter ''"
   },
   {
-    NULL,
-    NULL,
+    "char_unused",
+    "char",
     "letter ''"
   },
   {
-    NULL,
-    NULL,
+    "char_unused",
+    "char",
     "letter ''"
   },
   {
-    NULL,
-    NULL,
+    "char_unused",
+    "char",
     "letter ''"
   },
   {
-    NULL,
-    NULL,
+    "char_unused",
+    "char",
     "letter ''"
   },
   {
-    NULL,
-    NULL,
+    "char_unused",
+    "char",
     "letter ''"
   },
   {
@@ -1354,12 +1367,12 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
   },
   {
     "unused_254",
-    NULL,
+    "unused",
     "(not used)"
   },
   {
     "unused_255",
-    NULL,
+    "unused",
     "(not used)"
   },
   {
@@ -1429,12 +1442,12 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
   },
   {
     "unused_269",
-    NULL,
+    "unused",
     "-"
   },
   {
     "unused_270",
-    NULL,
+    "unused",
     "-"
   },
   {
@@ -1669,22 +1682,22 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
   },
   {
     "dx_unknown_15",
-    NULL,
+    "unknown",
     "dx unknown element 15"
   },
   {
     "dx_unknown_42",
-    NULL,
+    "unknown",
     "dx unknown element 42"
   },
   {
     "unused_319",
-    NULL,
+    "unused",
     "(not used)"
   },
   {
     "unused_320",
-    NULL,
+    "unused",
     "(not used)"
   },
   {
@@ -1874,656 +1887,658 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
   },
   {
     "unused_358",
-    NULL,
+    "unused",
     "-"
   },
   {
     "unused_359",
-    NULL,
+    "unused",
     "-"
   },
   {
     "custom_1",
-    "custom",
+    "custom_1",
     "custom element 1"
   },
   {
     "custom_2",
-    "custom",
+    "custom_2",
     "custom element 2"
   },
   {
     "custom_3",
-    "custom",
+    "custom_3",
     "custom element 3"
   },
   {
     "custom_4",
-    "custom",
+    "custom_4",
     "custom element 4"
   },
   {
     "custom_5",
-    "custom",
+    "custom_5",
     "custom element 5"
   },
   {
     "custom_6",
-    "custom",
+    "custom_6",
     "custom element 6"
   },
   {
     "custom_7",
-    "custom",
+    "custom_7",
     "custom element 7"
   },
   {
     "custom_8",
-    "custom",
+    "custom_8",
     "custom element 8"
   },
   {
     "custom_9",
-    "custom",
+    "custom_9",
     "custom element 9"
   },
   {
     "custom_10",
-    "custom",
+    "custom_10",
     "custom element 10"
   },
   {
     "custom_11",
-    "custom",
+    "custom_11",
     "custom element 11"
   },
   {
     "custom_12",
-    "custom",
+    "custom_12",
     "custom element 12"
   },
   {
     "custom_13",
-    "custom",
+    "custom_13",
     "custom element 13"
   },
   {
     "custom_14",
-    "custom",
+    "custom_14",
     "custom element 14"
   },
   {
     "custom_15",
-    "custom",
+    "custom_15",
     "custom element 15"
   },
   {
     "custom_16",
-    "custom",
+    "custom_16",
     "custom element 16"
   },
   {
     "custom_17",
-    "custom",
+    "custom_17",
     "custom element 17"
   },
   {
     "custom_18",
-    "custom",
+    "custom_18",
     "custom element 18"
   },
   {
     "custom_19",
-    "custom",
+    "custom_19",
     "custom element 19"
   },
   {
     "custom_20",
-    "custom",
+    "custom_20",
     "custom element 20"
   },
   {
     "custom_21",
-    "custom",
+    "custom_21",
     "custom element 21"
   },
   {
     "custom_22",
-    "custom",
+    "custom_22",
     "custom element 22"
   },
   {
     "custom_23",
-    "custom",
+    "custom_23",
     "custom element 23"
   },
   {
     "custom_24",
-    "custom",
+    "custom_24",
     "custom element 24"
   },
   {
     "custom_25",
-    "custom",
+    "custom_25",
     "custom element 25"
   },
   {
     "custom_26",
-    "custom",
+    "custom_26",
     "custom element 26"
   },
   {
     "custom_27",
-    "custom",
+    "custom_27",
     "custom element 27"
   },
   {
     "custom_28",
-    "custom",
+    "custom_28",
     "custom element 28"
   },
   {
     "custom_29",
-    "custom",
+    "custom_29",
     "custom element 29"
   },
   {
     "custom_30",
-    "custom",
+    "custom_30",
     "custom element 30"
   },
   {
     "custom_31",
-    "custom",
+    "custom_31",
     "custom element 31"
   },
   {
     "custom_32",
-    "custom",
+    "custom_32",
     "custom element 32"
   },
   {
     "custom_33",
-    "custom",
+    "custom_33",
     "custom element 33"
   },
   {
     "custom_34",
-    "custom",
+    "custom_34",
     "custom element 34"
   },
   {
     "custom_35",
-    "custom",
+    "custom_35",
     "custom element 35"
   },
   {
     "custom_36",
-    "custom",
+    "custom_36",
     "custom element 36"
   },
   {
     "custom_37",
-    "custom",
+    "custom_37",
     "custom element 37"
   },
   {
     "custom_38",
-    "custom",
+    "custom_38",
     "custom element 38"
   },
   {
     "custom_39",
-    "custom",
+    "custom_39",
     "custom element 39"
   },
   {
     "custom_40",
-    "custom",
+    "custom_40",
     "custom element 40"
   },
   {
     "custom_41",
-    "custom",
+    "custom_41",
     "custom element 41"
   },
   {
     "custom_42",
-    "custom",
+    "custom_42",
     "custom element 42"
   },
   {
     "custom_43",
-    "custom",
+    "custom_43",
     "custom element 43"
   },
   {
     "custom_44",
-    "custom",
+    "custom_44",
     "custom element 44"
   },
   {
     "custom_45",
-    "custom",
+    "custom_45",
     "custom element 45"
   },
   {
     "custom_46",
-    "custom",
+    "custom_46",
     "custom element 46"
   },
   {
     "custom_47",
-    "custom",
+    "custom_47",
     "custom element 47"
   },
   {
     "custom_48",
-    "custom",
+    "custom_48",
     "custom element 48"
   },
   {
     "custom_49",
-    "custom",
+    "custom_49",
     "custom element 49"
   },
   {
     "custom_50",
-    "custom",
+    "custom_50",
     "custom element 50"
   },
   {
     "custom_51",
-    "custom",
+    "custom_51",
     "custom element 51"
   },
   {
     "custom_52",
-    "custom",
+    "custom_52",
     "custom element 52"
   },
   {
     "custom_53",
-    "custom",
+    "custom_53",
     "custom element 53"
   },
   {
     "custom_54",
-    "custom",
+    "custom_54",
     "custom element 54"
   },
   {
     "custom_55",
-    "custom",
+    "custom_55",
     "custom element 55"
   },
   {
     "custom_56",
-    "custom",
+    "custom_56",
     "custom element 56"
   },
   {
     "custom_57",
-    "custom",
+    "custom_57",
     "custom element 57"
   },
   {
     "custom_58",
-    "custom",
+    "custom_58",
     "custom element 58"
   },
   {
     "custom_59",
-    "custom",
+    "custom_59",
     "custom element 59"
   },
   {
     "custom_60",
-    "custom",
+    "custom_60",
     "custom element 60"
   },
   {
     "custom_61",
-    "custom",
+    "custom_61",
     "custom element 61"
   },
   {
     "custom_62",
-    "custom",
+    "custom_62",
     "custom element 62"
   },
   {
     "custom_63",
-    "custom",
+    "custom_63",
     "custom element 63"
   },
   {
     "custom_64",
-    "custom",
+    "custom_64",
     "custom element 64"
   },
   {
     "custom_65",
-    "custom",
+    "custom_65",
     "custom element 65"
   },
   {
     "custom_66",
-    "custom",
+    "custom_66",
     "custom element 66"
   },
   {
     "custom_67",
-    "custom",
+    "custom_67",
     "custom element 67"
   },
   {
     "custom_68",
-    "custom",
+    "custom_68",
     "custom element 68"
   },
   {
     "custom_69",
-    "custom",
+    "custom_69",
     "custom element 69"
   },
   {
     "custom_70",
-    "custom",
+    "custom_70",
     "custom element 70"
   },
   {
     "custom_71",
-    "custom",
+    "custom_71",
     "custom element 71"
   },
   {
     "custom_72",
-    "custom",
+    "custom_72",
     "custom element 72"
   },
   {
     "custom_73",
-    "custom",
+    "custom_73",
     "custom element 73"
   },
   {
     "custom_74",
-    "custom",
+    "custom_74",
     "custom element 74"
   },
   {
     "custom_75",
-    "custom",
+    "custom_75",
     "custom element 75"
   },
   {
     "custom_76",
-    "custom",
+    "custom_76",
     "custom element 76"
   },
   {
     "custom_77",
-    "custom",
+    "custom_77",
     "custom element 77"
   },
   {
     "custom_78",
-    "custom",
+    "custom_78",
     "custom element 78"
   },
   {
     "custom_79",
-    "custom",
+    "custom_79",
     "custom element 79"
   },
   {
     "custom_80",
-    "custom",
+    "custom_80",
     "custom element 80"
   },
   {
     "custom_81",
-    "custom",
+    "custom_81",
     "custom element 81"
   },
   {
     "custom_82",
-    "custom",
+    "custom_82",
     "custom element 82"
   },
   {
     "custom_83",
-    "custom",
+    "custom_83",
     "custom element 83"
   },
   {
     "custom_84",
-    "custom",
+    "custom_84",
     "custom element 84"
   },
   {
     "custom_85",
-    "custom",
+    "custom_85",
     "custom element 85"
   },
   {
     "custom_86",
-    "custom",
+    "custom_86",
     "custom element 86"
   },
   {
     "custom_87",
-    "custom",
+    "custom_87",
     "custom element 87"
   },
   {
     "custom_88",
-    "custom",
+    "custom_88",
     "custom element 88"
   },
   {
     "custom_89",
-    "custom",
+    "custom_89",
     "custom element 89"
   },
   {
     "custom_90",
-    "custom",
+    "custom_90",
     "custom element 90"
   },
   {
     "custom_91",
-    "custom",
+    "custom_91",
     "custom element 91"
   },
   {
     "custom_92",
-    "custom",
+    "custom_92",
     "custom element 92"
   },
   {
     "custom_93",
-    "custom",
+    "custom_93",
     "custom element 93"
   },
   {
     "custom_94",
-    "custom",
+    "custom_94",
     "custom element 94"
   },
   {
     "custom_95",
-    "custom",
+    "custom_95",
     "custom element 95"
   },
   {
     "custom_96",
-    "custom",
+    "custom_96",
     "custom element 96"
   },
   {
     "custom_97",
-    "custom",
+    "custom_97",
     "custom element 97"
   },
   {
     "custom_98",
-    "custom",
+    "custom_98",
     "custom element 98"
   },
   {
     "custom_99",
-    "custom",
+    "custom_99",
     "custom element 99"
   },
   {
     "custom_100",
-    "custom",
+    "custom_100",
     "custom element 100"
   },
   {
     "custom_101",
-    "custom",
+    "custom_101",
     "custom element 101"
   },
   {
     "custom_102",
-    "custom",
+    "custom_102",
     "custom element 102"
   },
   {
     "custom_103",
-    "custom",
+    "custom_103",
     "custom element 103"
   },
   {
     "custom_104",
-    "custom",
+    "custom_104",
     "custom element 104"
   },
   {
     "custom_105",
-    "custom",
+    "custom_105",
     "custom element 105"
   },
   {
     "custom_106",
-    "custom",
+    "custom_106",
     "custom element 106"
   },
   {
     "custom_107",
-    "custom",
+    "custom_107",
     "custom element 107"
   },
   {
     "custom_108",
-    "custom",
+    "custom_108",
     "custom element 108"
   },
   {
     "custom_109",
-    "custom",
+    "custom_109",
     "custom element 109"
   },
   {
     "custom_110",
-    "custom",
+    "custom_110",
     "custom element 110"
   },
   {
     "custom_111",
-    "custom",
+    "custom_111",
     "custom element 111"
   },
   {
     "custom_112",
-    "custom",
+    "custom_112",
     "custom element 112"
   },
   {
     "custom_113",
-    "custom",
+    "custom_113",
     "custom element 113"
   },
   {
     "custom_114",
-    "custom",
+    "custom_114",
     "custom element 114"
   },
   {
     "custom_115",
-    "custom",
+    "custom_115",
     "custom element 115"
   },
   {
     "custom_116",
-    "custom",
+    "custom_116",
     "custom element 116"
   },
   {
     "custom_117",
-    "custom",
+    "custom_117",
     "custom element 117"
   },
   {
     "custom_118",
-    "custom",
+    "custom_118",
     "custom element 118"
   },
   {
     "custom_119",
-    "custom",
+    "custom_119",
     "custom element 119"
   },
   {
     "custom_120",
-    "custom",
+    "custom_120",
     "custom element 120"
   },
   {
     "custom_121",
-    "custom",
+    "custom_121",
     "custom element 121"
   },
   {
     "custom_122",
-    "custom",
+    "custom_122",
     "custom element 122"
   },
   {
     "custom_123",
-    "custom",
+    "custom_123",
     "custom element 123"
   },
   {
     "custom_124",
-    "custom",
+    "custom_124",
     "custom element 124"
   },
   {
     "custom_125",
-    "custom",
+    "custom_125",
     "custom element 125"
   },
   {
     "custom_126",
-    "custom",
+    "custom_126",
     "custom element 126"
   },
   {
     "custom_127",
-    "custom",
+    "custom_127",
     "custom element 127"
   },
   {
     "custom_128",
-    "custom",
+    "custom_128",
     "custom element 128"
   },
 
-  /* "real" (and therefore drawable) runtime elements */
+  /* ----------------------------------------------------------------------- */
+  /* "real" (and therefore drawable) runtime elements                        */
+  /* ----------------------------------------------------------------------- */
 
   {
     "em_key1",
@@ -2751,8 +2766,163 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
     "-"
   },
 
+  /* ----------------------------------------------------------------------- */
+  /* "unreal" (and therefore not drawable) runtime elements                  */
+  /* ----------------------------------------------------------------------- */
+
+  {
+    "blocked",
+    "-",
+    "-"
+  },
+  {
+    "explosion",
+    "-",
+    "-"
+  },
+  {
+    "nut_cracking",
+    "-",
+    "-"
+  },
+  {
+    "acid_splash_left",
+    "-",
+    "-"
+  },
+  {
+    "acid_splash_right",
+    "-",
+    "-"
+  },
+  {
+    "amoeba_creating",
+    "-",
+    "-"
+  },
+  {
+    "amoeba_shrinking",
+    "-",
+    "-"
+  },
+  {
+    "wall_growing_active",
+    "-",
+    "-"
+  },
+  {
+    "flames",
+    "-",
+    "-"
+  },
+  {
+    "player_is_leaving",
+    "-",
+    "-"
+  },
+  {
+    "quicksand_filling",
+    "-",
+    "-"
+  },
+  {
+    "magic_wall_filling",
+    "-",
+    "-"
+  },
+  {
+    "bd_magic_wall_filling",
+    "-",
+    "-"
+  },
+
+  /* ----------------------------------------------------------------------- */
+  /* dummy elements (never used as game elements, only used as graphics)     */
+  /* ----------------------------------------------------------------------- */
+
+  {
+    "steelwall_topleft",
+    "-",
+    "-"
+  },
+  {
+    "steelwall_topright",
+    "-",
+    "-"
+  },
+  {
+    "steelwall_bottomleft",
+    "-",
+    "-"
+  },
+  {
+    "steelwall_bottomright",
+    "-",
+    "-"
+  },
+  {
+    "steelwall_horizontal",
+    "-",
+    "-"
+  },
+  {
+    "steelwall_vertical",
+    "-",
+    "-"
+  },
+  {
+    "invisible_steelwall_topleft",
+    "-",
+    "-"
+  },
+  {
+    "invisible_steelwall_topright",
+    "-",
+    "-"
+  },
+  {
+    "invisible_steelwall_bottomleft",
+    "-",
+    "-"
+  },
+  {
+    "invisible_steelwall_bottomright",
+    "-",
+    "-"
+  },
+  {
+    "invisible_steelwall_horizontal",
+    "-",
+    "-"
+  },
+  {
+    "invisible_steelwall_vertical",
+    "-",
+    "-"
+  },
+  {
+    "sand_crumbled",
+    "-",
+    "-"
+  },
+  {
+    "dynabomb_active",
+    "-",
+    "-"
+  },
+  {
+    "shield_normal_active",
+    "-",
+    "-"
+  },
+  {
+    "shield_deadly_active",
+    "-",
+    "-"
+  },
+
   {
-    "",
+    NULL,
     NULL,
     "-"
   }
@@ -2760,34 +2930,80 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
 
 
 /* ------------------------------------------------------------------------- */
-/* sound definitions                                                         */
+/* element action and direction definitions                                  */
 /* ------------------------------------------------------------------------- */
 
-struct SoundActionProperties sound_action_properties[] =
+struct ElementActionInfo element_action_info[NUM_ACTIONS + 1] =
 {
-  /* insert _all_ loop sound actions here */
-  { ".waiting",                ACTION_WAITING,         TRUE },
-  { ".moving",         ACTION_MOVING,          TRUE }, /* continuos moving */
-  { ".active",         ACTION_ACTIVE,          TRUE },
-  { ".growing",                ACTION_GROWING,         TRUE },
-  { ".attacking",      ACTION_ATTACKING,       TRUE },
+  { ".[DEFAULT]",      ACTION_DEFAULT,         TRUE    },
+  { ".waiting",                ACTION_WAITING,         TRUE    },
+  { ".falling",                ACTION_FALLING,         TRUE    },
+  { ".moving",         ACTION_MOVING,          TRUE    },
+  { ".digging",                ACTION_DIGGING,         FALSE   },
+  { ".snapping",       ACTION_SNAPPING,        FALSE   },
+  { ".collecting",     ACTION_COLLECTING,      FALSE   },
+  { ".pushing",                ACTION_PUSHING,         FALSE   },
+  { ".passing",                ACTION_PASSING,         FALSE   },
+  { ".impact",         ACTION_IMPACT,          FALSE   },
+  { ".cracking",       ACTION_CRACKING,        FALSE   },
+  { ".breaking",       ACTION_BREAKING,        FALSE   },
+  { ".activating",     ACTION_ACTIVATING,      FALSE   },
+  { ".opening",                ACTION_OPENING,         FALSE   },
+  { ".closing",                ACTION_CLOSING,         FALSE   },
+  { ".eating",         ACTION_EATING,          FALSE   },
+  { ".attacking",      ACTION_ATTACKING,       TRUE    },
+  { ".growing",                ACTION_GROWING,         TRUE    },
+  { ".shrinking",      ACTION_SHRINKING,       FALSE   },
+  { ".active",         ACTION_ACTIVE,          TRUE    },
+  { ".other",          ACTION_OTHER,           FALSE   },
 
-  /* other (non-loop) sound actions are optional */
-#if 0
-  { ".stepping",       ACTION_MOVING,          FALSE }, /* discrete moving */
-#endif
-  { ".digging",                ACTION_DIGGING,         FALSE },
-  { ".collecting",     ACTION_COLLECTING,      FALSE },
-  { ".passing",                ACTION_PASSING,         FALSE },
-  { ".impact",         ACTION_IMPACT,          FALSE },
-  { ".pushing",                ACTION_PUSHING,         FALSE },
-  { ".activating",     ACTION_ACTIVATING,      FALSE },
-  { NULL,              0,                      0 },
+  { NULL,              0,                      0       }
 };
 
+struct ElementDirectionInfo element_direction_info[NUM_DIRECTIONS + 1] =
+{
+  { ".left",           MV_BIT_LEFT                     },
+  { ".right",          MV_BIT_RIGHT                    },
+  { ".up",             MV_BIT_UP                       },
+  { ".down",           MV_BIT_DOWN                     },
 
-struct GraphicInfo graphic_info[NUM_IMAGE_FILES];
-struct SoundInfo sound_info[NUM_SOUND_FILES];
+  { NULL,              0                               }
+};
+
+struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1] =
+{
+  { ".EDITOR",         0,                              },
+  { ".PREVIEW",                0,                              },
+
+  { NULL,              0,                              }
+};
+
+/* ------------------------------------------------------------------------- */
+/* font definitions                                                          */
+/* ------------------------------------------------------------------------- */
+
+struct FontInfo font_info[NUM_FONTS + 1] =
+{
+  { "font.initial_1"   },
+  { "font.initial_2"   },
+  { "font.initial_3"   },
+  { "font.initial_4"   },
+  { "font.big_1"       },
+  { "font.big_2"       },
+  { "font.big_3"       },
+  { "font.big_4"       },
+  { "font.medium_1"    },
+  { "font.medium_2"    },
+  { "font.medium_3"    },
+  { "font.medium_4"    },
+  { "font.small_1"     },
+  { "font.small_2"     },
+  { "font.small_3"     },
+  { "font.small_4"     },
+  { "font.tape"                },
+  { "font.game"                },
+  { "font.narrow"      },
+};
 
 
 /* ========================================================================= */