rnd-20031008-1-src
[rocksndiamonds.git] / src / main.c
index 00347a4f572edab3154e31eb12af2881d9d15b8b..f6dc5542481490d36043e11ccff279ef926c0d3b 100644 (file)
 #include "init.h"
 #include "game.h"
 #include "events.h"
+#include "config.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 = -1;
+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                  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                  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];
+unsigned long          Changed[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+unsigned long          ChangeEvent[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          Properties[MAX_NUM_ELEMENTS][NUM_EP_BITFIELDS];
 
-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                    GfxElement[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 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 MenuInfo                menu;
+struct DoorInfo                door_1, door_2;
+struct GraphicInfo     *graphic_info = NULL;
+struct SoundInfo       *sound_info = NULL;
 
-/* filenames of sound effects */
-char *sound_name[NUM_SOUNDS] =
-{
-  "amoebe.wav",
-  "antigrav.wav",
-  "autsch.wav",
-  "blurb.wav",
-  "bong.wav",
-  "buing.wav",
-  "deng.wav",
-  "fuel.wav",
-  "gong.wav",
-  "halloffame.wav",
-  "holz.wav",
-  "hui.wav",
-  "kabumm.wav",
-  "kink.wav",
-  "klapper.wav",
-  "kling.wav",
-  "klopf.wav",
-  "klumpf.wav",
-  "knack.wav",
-  "knurk.wav",
-  "krach.wav",
-  "lachen.wav",
-  "laser.wav",
-  "miep.wav",
-  "njam.wav",
-  "oeffnen.wav",
-  "pling.wav",
-  "pong.wav",
-  "pusch.wav",
-  "quiek.wav",
-  "quirk.wav",
-  "rhythmloop.wav",
-  "roaaar.wav",
-  "roehr.wav",
-  "rumms.wav",
-  "schlopp.wav",
-  "schlurf.wav",
-  "schrff.wav",
-  "schwirr.wav",
-  "sirr.wav",
-  "slurp.wav",
-  "sproing.wav",
-  "warnton.wav",
-  "whoosh.wav",
-  "zisch.wav",
-  "base.wav",
-  "infotron.wav",
-  "zonkdown.wav",
-  "zonkpush.wav",
-  "bug.wav",
-  "boom.wav",
-  "booom.wav",
-  "exit.wav",
-  "empty.wav",
-  "gate.wav"
-};
-
-/* this is used to reduce memory usage of the different animation types */
-int graphics_action_mapping[] =
-{
-  0,           /* GFX_ACTION_DEFAULT           (0)  */
-  0,           /* GFX_ACTION_WAITING           (1)  */
 
-  1,           /* GFX_ACTION_FALLING           (2)  */
-  2,           /* GFX_ACTION_MOVING            (3)  */
-  3,           /* GFX_ACTION_DIGGING           (4)  */
-  4,           /* GFX_ACTION_SNAPPING          (5)  */
-  5,           /* GFX_ACTION_COLLECTING        (6)  */
-  6,           /* GFX_ACTION_PUSHING           (7)  */
+/* ------------------------------------------------------------------------- */
+/* element definitions                                                       */
+/* ------------------------------------------------------------------------- */
 
-  7,           /* GFX_ACTION_PASSING           (8)  */
-  7,           /* GFX_ACTION_IMPACT            (9)  */
-  7,           /* GFX_ACTION_CRACKING          (10) */
-  7,           /* GFX_ACTION_BREAKING          (11) */
-  7,           /* GFX_ACTION_ACTIVATING        (12) */
-  7,           /* GFX_ACTION_OPENING           (13) */
-  7,           /* GFX_ACTION_CLOSING           (14) */
-  7,           /* GFX_ACTION_EATING            (15) */
-  7,           /* GFX_ACTION_ATTACKING         (16) */
-  7,           /* GFX_ACTION_GROWING           (17) */
-  7,           /* GFX_ACTION_SHRINKING         (18) */
-  7            /* GFX_ACTION_OTHER             (19) */
-};
-
-struct FileInfo *image_files;
-struct FileInfo *sound_files;
-
-struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
+struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1] =
 {
-  /* "real" level file elements */
+  /* keyword to start parser: "ELEMENT_INFO_START" <-- do not change! */
+
+  /* ----------------------------------------------------------------------- */
+  /* "real" level file elements                                              */
+  /* ----------------------------------------------------------------------- */
 
   {
     "empty_space",
@@ -195,9 +129,9 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
     "normal wall"
   },
   {
-    "wall_crumbled",
+    "wall_slippery",
     "wall",
-    "round wall"
+    "slippery wall"
   },
   {
     "rock",
@@ -206,8 +140,8 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
   },
   {
     "key_obsolete",
-    "key",
-    "key"
+    "obsolete",
+    "key (OBSOLETE)"
   },
   {
     "emerald",
@@ -221,18 +155,18 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
   },
   {
     "player_obsolete",
-    "player",
-    "player"
+    "obsolete",
+    "player (OBSOLETE)"
   },
   {
     "bug",
     "bug",
-    "bug"
+    "bug (random start direction)"
   },
   {
     "spaceship",
     "spaceship",
-    "spaceship"
+    "spaceship (random start direction)"
   },
   {
     "yamyam",
@@ -310,8 +244,8 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
     "nut with emerald"
   },
   {
-    "gameoflife",
-    "gameoflife",
+    "game_of_life",
+    "game_of_life",
     "Conway's wall of life"
   },
   {
@@ -320,7 +254,7 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
     "biomaze"
   },
   {
-    "dynamite_active",
+    "dynamite.active",
     "dynamite",
     "burning dynamite"
   },
@@ -335,65 +269,65 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
     "magic wheel"
   },
   {
-    "robot_wheel_active",
+    "robot_wheel.active",
     "robot_wheel",
     "magic wheel (running)"
   },
   {
-    "key1",
+    "key_1",
     "key",
     "red key"
   },
   {
-    "key2",
+    "key_2",
     "key",
     "yellow key"
   },
   {
-    "key3",
+    "key_3",
     "key",
     "green key"
   },
   {
-    "key4",
+    "key_4",
     "key",
     "blue key"
   },
   {
-    "gate1",
+    "gate_1",
     "gate",
     "red door"
   },
   {
-    "gate2",
+    "gate_2",
     "gate",
     "yellow door"
   },
   {
-    "gate3",
+    "gate_3",
     "gate",
     "green door"
   },
   {
-    "gate4",
+    "gate_4",
     "gate",
     "blue door"
   },
   {
-    "gate1_gray",
+    "gate_1_gray",
     "gate",
     "gray door (opened by red key)"
   },
   {
-    "gate2_gray",
+    "gate_2_gray",
     "gate",
     "gray door (opened by yellow key)"},
   {
-    "gate3_gray",
+    "gate_3_gray",
     "gate",
     "gray door (opened by green key)"},
   {
-    "gate4_gray",
+    "gate_4_gray",
     "gate",
     "gray door (opened by blue key)"},
   {
@@ -404,7 +338,7 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
   {
     "pacman",
     "pacman",
-    "pac man"
+    "pac man (random start direction)"
   },
   {
     "invisible_wall",
@@ -417,7 +351,7 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
     "lamp (off)"
   },
   {
-    "lamp_active",
+    "lamp.active",
     "lamp",
     "lamp (on)"
   },
@@ -452,7 +386,7 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
     "time orb (empty)"
   },
   {
-    "wall_growing",
+    "expandable_wall",
     "wall",
     "growing wall"
   },
@@ -493,160 +427,160 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
   },
   {
     "unused_63",
-    NULL,
+    "unused",
     "(not used)"
   },
   {
-    "dynabomb_nr",
-    "dynabomb_nr",
+    "dynabomb_increase_number",
+    "dynabomb",
     "increases number of bombs"
   },
   {
-    "dynabomb_sz",
-    "dynabomb_sz",
+    "dynabomb_increase_size",
+    "dynabomb",
     "increases explosion size"
   },
   {
-    "dynabomb_xl",
-    "dynabomb_xl",
+    "dynabomb_increase_power",
+    "dynabomb",
     "increases power of explosion"
   },
   {
     "sokoban_object",
-    "sokoban_object",
+    "sokoban",
     "sokoban object"
   },
   {
     "sokoban_field_empty",
-    "sokoban_field",
+    "sokoban",
     "sokoban empty field"
   },
   {
     "sokoban_field_full",
-    "sokoban_field",
+    "sokoban",
     "sokoban field with object"
   },
   {
-    "bd_butterfly_right",
+    "bd_butterfly.right",
     "bd_butterfly",
     "butterfly (starts moving right)"},
   {
-    "bd_butterfly_up",
+    "bd_butterfly.up",
     "bd_butterfly",
     "butterfly (starts moving up)"
   },
   {
-    "bd_butterfly_left",
+    "bd_butterfly.left",
     "bd_butterfly",
     "butterfly (starts moving left)"},
   {
-    "bd_butterfly_down",
+    "bd_butterfly.down",
     "bd_butterfly",
     "butterfly (starts moving down)"},
   {
-    "bd_firefly_right",
+    "bd_firefly.right",
     "bd_firefly",
     "firefly (starts moving right)"
   },
   {
-    "bd_firefly_up",
+    "bd_firefly.up",
     "bd_firefly",
     "firefly (starts moving up)"
   },
   {
-    "bd_firefly_left",
+    "bd_firefly.left",
     "bd_firefly",
     "firefly (starts moving left)"
   },
   {
-    "bd_firefly_down",
+    "bd_firefly.down",
     "bd_firefly",
     "firefly (starts moving down)"
   },
   {
     "bd_butterfly",
     "bd_butterfly",
-    "butterfly"
+    "butterfly (random start direction)"
   },
   {
     "bd_firefly",
     "bd_firefly",
-    "firefly"
+    "firefly (random start direction)"
   },
   {
-    "player1",
+    "player_1",
     "player",
     "yellow player"
   },
   {
-    "player2",
+    "player_2",
     "player",
     "red player"
   },
   {
-    "player3",
+    "player_3",
     "player",
     "green player"
   },
   {
-    "player4",
+    "player_4",
     "player",
     "blue player"
   },
   {
-    "bug_right",
+    "bug.right",
     "bug",
     "bug (starts moving right)"
   },
   {
-    "bug_up",
+    "bug.up",
     "bug",
     "bug (starts moving up)"
   },
   {
-    "bug_left",
+    "bug.left",
     "bug",
     "bug (starts moving left)"
   },
   {
-    "bug_down",
+    "bug.down",
     "bug",
     "bug (starts moving down)"
   },
   {
-    "spaceship_right",
+    "spaceship.right",
     "spaceship",
     "spaceship (starts moving right)"},
   {
-    "spaceship_up",
+    "spaceship.up",
     "spaceship",
     "spaceship (starts moving up)"
   },
   {
-    "spaceship_left",
+    "spaceship.left",
     "spaceship",
     "spaceship (starts moving left)"},
   {
-    "spaceship_down",
+    "spaceship.down",
     "spaceship",
     "spaceship (starts moving down)"},
   {
-    "pacman_right",
+    "pacman.right",
     "pacman",
     "pac man (starts moving right)"
   },
   {
-    "pacman_up",
+    "pacman.up",
     "pacman",
     "pac man (starts moving up)"
   },
   {
-    "pacman_left",
+    "pacman.left",
     "pacman",
     "pac man (starts moving left)"
   },
   {
-    "pacman_down",
+    "pacman.down",
     "pacman",
     "pac man (starts moving down)"
   },
@@ -671,27 +605,27 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
     "wall with purple emerald"
   },
   {
-    "acidpool_topleft",
+    "acid_pool_topleft",
     "wall",
     "acid pool (top left)"
   },
   {
-    "acidpool_topright",
+    "acid_pool_topright",
     "wall",
     "acid pool (top right)"
   },
   {
-    "acidpool_bottomleft",
+    "acid_pool_bottomleft",
     "wall",
     "acid pool (bottom left)"
   },
   {
-    "acidpool_bottom",
+    "acid_pool_bottom",
     "wall",
     "acid pool (bottom)"
   },
   {
-    "acidpool_bottomright",
+    "acid_pool_bottomright",
     "wall",
     "acid pool (bottom right)"
   },
@@ -712,8 +646,8 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
   },
   {
     "black_orb",
-    NULL,
-    "black orb bomb"
+    "black_orb",
+    "bomb"
   },
   {
     "amoeba_to_diamond",
@@ -723,7 +657,7 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
   {
     "mole",
     "mole",
-    "mole"
+    "mole (random start direction)"
   },
   {
     "penguin",
@@ -736,23 +670,23 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
     "satellite"
   },
   {
-    "arrow_blue_left",
-    NULL,
+    "arrow_left",
+    "arrow",
     "arrow left"
   },
   {
-    "arrow_blue_right",
-    NULL,
+    "arrow_right",
+    "arrow",
     "arrow right"
   },
   {
-    "arrow_blue_up",
-    NULL,
+    "arrow_up",
+    "arrow",
     "arrow up"
   },
   {
-    "arrow_blue_down",
-    NULL,
+    "arrow_down",
+    "arrow",
     "arrow down"
   },
   {
@@ -766,459 +700,459 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
     "fire breathing dragon"
   },
   {
-    "em_key1_file",
-    "key",
-    "red key (EM style)"
+    "em_key_1_file_obsolete",
+    "obsolete",
+    "key (OBSOLETE)"
   },
   {
     "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,
-    "letter 'Ä'"
+    "char_bracketleft",
+    "char",
+    "letter '['"
   },
   {
-    "char_oe",
-    NULL,
-    "letter 'Ö'"
+    "char_backslash",
+    "char",
+    "letter '\\'"
   },
   {
-    "char_ue",
-    NULL,
-    "letter 'Ãœ'"
+    "char_bracketright",
+    "char",
+    "letter ']'"
   },
   {
-    "char_copyright",
-    NULL,
+    "char_asciicircum",
+    "char",
     "letter '^'"
   },
   {
     "char_underscore",
-    NULL,
-    "letter ''"
+    "char",
+    "letter '_'"
   },
   {
-    "char_empty",
-    NULL,
-    "letter ''"
+    "char_copyright",
+    "char",
+    "letter '©'"
   },
   {
-    "char_degree",
-    NULL,
-    "letter ''"
+    "char_aumlaut",
+    "char",
+    "letter 'Ä'"
   },
   {
-    "char_tm",
-    NULL,
-    "letter ''"
+    "char_oumlaut",
+    "char",
+    "letter 'Ö'"
   },
   {
-    "char_cursor",
-    NULL,
-    "letter ''"
+    "char_uumlaut",
+    "char",
+    "letter 'Ãœ'"
   },
   {
-    NULL,
-    NULL,
-    "letter ''"
+    "char_degree",
+    "char",
+    "letter '°'"
   },
   {
-    NULL,
-    NULL,
-    "letter ''"
+    "char_trademark",
+    "char",
+    "letter '®'"
   },
   {
-    NULL,
-    NULL,
-    "letter ''"
+    "char_cursor",
+    "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 ''"
   },
   {
-    "wall_growing_x",
+    "expandable_wall_horizontal",
     "wall",
     "growing wall (horizontal)"
   },
   {
-    "wall_growing_y",
+    "expandable_wall_vertical",
     "wall",
     "growing wall (vertical)"
   },
   {
-    "wall_growing_xy",
+    "expandable_wall_any",
     "wall",
-    "growing wall (all directions)"
+    "growing wall (any direction)"
   },
   {
-    "em_gate1",
+    "em_gate_1",
     "gate",
     "red door (EM style)"
   },
   {
-    "em_gate2",
+    "em_gate_2",
     "gate",
     "yellow door (EM style)"
   },
   {
-    "em_gate3",
+    "em_gate_3",
     "gate",
     "green door (EM style)"
   },
   {
-    "em_gate4",
+    "em_gate_4",
     "gate",
     "blue door (EM style)"
   },
   {
-    "em_key2_file",
-    "key",
-    "yellow key (EM style)"
+    "em_key_2_file_obsolete",
+    "obsolete",
+    "key (OBSOLETE)"
   },
   {
-    "em_key3_file",
-    "key",
-    "green key (EM style)"
+    "em_key_3_file_obsolete",
+    "obsolete",
+    "key (OBSOLETE)"
   },
   {
-    "em_key4_file",
-    "key",
-    "blue key (EM style)"
+    "em_key_4_file_obsolete",
+    "obsolete",
+    "key (OBSOLETE)"
   },
   {
     "sp_empty_space",
@@ -1251,7 +1185,7 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
     "chip (single)"
   },
   {
-    "sp_hard_gray",
+    "sp_hardware_gray",
     "wall",
     "hardware"
   },
@@ -1266,44 +1200,44 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
     "orange disk"
   },
   {
-    "sp_port1_right",
+    "sp_port_right",
     "sp_port",
     "port (leading right)"
   },
   {
-    "sp_port1_down",
+    "sp_port_down",
     "sp_port",
     "port (leading down)"
   },
   {
-    "sp_port1_left",
+    "sp_port_left",
     "sp_port",
     "port (leading left)"
   },
   {
-    "sp_port1_up",
+    "sp_port_up",
     "sp_port",
     "port (leading up)"
   },
   {
-    "sp_port2_right",
+    "sp_gravity_port_right",
     "sp_port",
-    "port (leading right)"
+    "gravity port (leading right)"
   },
   {
-    "sp_port2_down",
+    "sp_gravity_port_down",
     "sp_port",
-    "port (leading down)"
+    "gravity port (leading down)"
   },
   {
-    "sp_port2_left",
+    "sp_gravity_port_left",
     "sp_port",
-    "port (leading left)"
+    "gravity port (leading left)"
   },
   {
-    "sp_port2_up",
+    "sp_gravity_port_up",
     "sp_port",
-    "port (leading up)"
+    "gravity port (leading up)"
   },
   {
     "sp_sniksnak",
@@ -1322,23 +1256,23 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
   },
   {
     "sp_disk_red",
-    "sp_disk_red",
+    "dynamite",
     "red disk"
   },
   {
-    "sp_port_y",
+    "sp_port_vertical",
     "sp_port",
     "port (vertical)"
   },
   {
-    "sp_port_x",
+    "sp_port_horizontal",
     "sp_port",
     "port (horizontal)"
   },
   {
-    "sp_port_xy",
+    "sp_port_any",
     "sp_port",
-    "port (all directions)"
+    "port (any direction)"
   },
   {
     "sp_electron",
@@ -1361,93 +1295,93 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
     "chip (right half)"
   },
   {
-    "sp_hard_base1",
+    "sp_hardware_base_1",
     "wall",
     "hardware"
   },
   {
-    "sp_hard_green",
+    "sp_hardware_green",
     "wall",
     "hardware"
   },
   {
-    "sp_hard_blue",
+    "sp_hardware_blue",
     "wall",
     "hardware"
   },
   {
-    "sp_hard_red",
+    "sp_hardware_red",
     "wall",
     "hardware"
   },
   {
-    "sp_hard_yellow",
+    "sp_hardware_yellow",
     "wall",
     "hardware"
   },
   {
-    "sp_hard_base2",
+    "sp_hardware_base_2",
     "wall",
     "hardware"
   },
   {
-    "sp_hard_base3",
+    "sp_hardware_base_3",
     "wall",
     "hardware"
   },
   {
-    "sp_hard_base4",
+    "sp_hardware_base_4",
     "wall",
     "hardware"
   },
   {
-    "sp_hard_base5",
+    "sp_hardware_base_5",
     "wall",
     "hardware"
   },
   {
-    "sp_hard_base6",
+    "sp_hardware_base_6",
     "wall",
     "hardware"
   },
   {
-    "sp_chip_upper",
+    "sp_chip_top",
     "wall",
     "chip (upper half)"
   },
   {
-    "sp_chip_lower",
+    "sp_chip_bottom",
     "wall",
     "chip (lower half)"
   },
   {
-    "em_gate1_gray",
+    "em_gate_1_gray",
     "gate",
     "gray door (EM style, red key)"
   },
   {
-    "em_gate2_gray",
+    "em_gate_2_gray",
     "gate",
     "gray door (EM style, yellow key)"
   },
   {
-    "em_gate3_gray",
+    "em_gate_3_gray",
     "gate",
     "gray door (EM style, green key)"
   },
   {
-    "em_gate4_gray",
+    "em_gate_4_gray",
     "gate",
     "gray door (EM style, blue key)"
   },
   {
     "unused_254",
-    NULL,
+    "unused",
     "(not used)"
   },
   {
     "unused_255",
-    NULL,
+    "unused",
     "(not used)"
   },
   {
@@ -1517,131 +1451,131 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
   },
   {
     "unused_269",
-    NULL,
+    "unused",
     "-"
   },
   {
     "unused_270",
-    NULL,
+    "unused",
     "-"
   },
   {
-    "conveyor_belt1_left",
+    "conveyor_belt_1_left",
     "conveyor_belt",
     "red conveyor belt (left)"
   },
   {
-    "conveyor_belt1_middle",
+    "conveyor_belt_1_middle",
     "conveyor_belt",
     "red conveyor belt (middle)"
   },
   {
-    "conveyor_belt1_right",
+    "conveyor_belt_1_right",
     "conveyor_belt",
     "red conveyor belt (right)"
   },
   {
-    "conveyor_belt1_switch_left",
+    "conveyor_belt_1_switch_left",
     "conveyor_belt_switch",
     "switch for red conveyor belt (left)"
   },
   {
-    "conveyor_belt1_switch_middle",
+    "conveyor_belt_1_switch_middle",
     "conveyor_belt_switch",
     "switch for red conveyor belt (middle)"
   },
   {
-    "conveyor_belt1_switch_right",
+    "conveyor_belt_1_switch_right",
     "conveyor_belt_switch",
     "switch for red conveyor belt (right)"
   },
   {
-    "conveyor_belt2_left",
+    "conveyor_belt_2_left",
     "conveyor_belt",
     "yellow conveyor belt (left)"
   },
   {
-    "conveyor_belt2_middle",
+    "conveyor_belt_2_middle",
     "conveyor_belt",
     "yellow conveyor belt (middle)"
   },
   {
-    "conveyor_belt2_right",
+    "conveyor_belt_2_right",
     "conveyor_belt",
     "yellow conveyor belt (right)"
   },
   {
-    "conveyor_belt2_switch_left",
+    "conveyor_belt_2_switch_left",
     "conveyor_belt_switch",
     "switch for yellow conveyor belt (left)"
   },
   {
-    "conveyor_belt2_switch_middle",
+    "conveyor_belt_2_switch_middle",
     "conveyor_belt_switch",
     "switch for yellow conveyor belt (middle)"
   },
   {
-    "conveyor_belt2_switch_right",
+    "conveyor_belt_2_switch_right",
     "conveyor_belt_switch",
     "switch for yellow conveyor belt (right)"
   },
   {
-    "conveyor_belt3_left",
+    "conveyor_belt_3_left",
     "conveyor_belt",
     "green conveyor belt (left)"
   },
   {
-    "conveyor_belt3_middle",
+    "conveyor_belt_3_middle",
     "conveyor_belt",
     "green conveyor belt (middle)"
   },
   {
-    "conveyor_belt3_right",
+    "conveyor_belt_3_right",
     "conveyor_belt",
     "green conveyor belt (right)"
   },
   {
-    "conveyor_belt3_switch_left",
+    "conveyor_belt_3_switch_left",
     "conveyor_belt_switch",
     "switch for green conveyor belt (left)"
   },
   {
-    "conveyor_belt3_switch_middle",
+    "conveyor_belt_3_switch_middle",
     "conveyor_belt_switch",
     "switch for green conveyor belt (middle)"
   },
   {
-    "conveyor_belt3_switch_right",
+    "conveyor_belt_3_switch_right",
     "conveyor_belt_switch",
     "switch for green conveyor belt (right)"
   },
   {
-    "conveyor_belt4_left",
+    "conveyor_belt_4_left",
     "conveyor_belt",
     "blue conveyor belt (left)"
   },
   {
-    "conveyor_belt4_middle",
+    "conveyor_belt_4_middle",
     "conveyor_belt",
     "blue conveyor belt (middle)"
   },
   {
-    "conveyor_belt4_right",
+    "conveyor_belt_4_right",
     "conveyor_belt",
     "blue conveyor belt (right)"
   },
   {
-    "conveyor_belt4_switch_left",
+    "conveyor_belt_4_switch_left",
     "conveyor_belt_switch",
     "switch for blue conveyor belt (left)"
   },
   {
-    "conveyor_belt4_switch_middle",
+    "conveyor_belt_4_switch_middle",
     "conveyor_belt_switch",
     "switch for blue conveyor belt (middle)"
   },
   {
-    "conveyor_belt4_switch_right",
+    "conveyor_belt_4_switch_right",
     "conveyor_belt_switch",
     "switch for blue conveyor belt (right)"
   },
@@ -1651,9 +1585,9 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
     "land mine"
   },
   {
-    "envelope",
-    "envelope",
-    "mail envelope"
+    "envelope_obsolete",
+    "obsolete",
+    "envelope (OBSOLETE)"
   },
   {
     "light_switch",
@@ -1661,7 +1595,7 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
     "light switch (off)"
   },
   {
-    "light_switch_active",
+    "light_switch.active",
     "light_switch",
     "light switch (on)"
   },
@@ -1726,29 +1660,29 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
     "sign (other)"
   },
   {
-    "mole_left",
+    "mole.left",
     "mole",
     "mole (starts moving left)"
   },
   {
-    "mole_right",
+    "mole.right",
     "mole",
     "mole (starts moving right)"
   },
   {
-    "mole_up",
+    "mole.up",
     "mole",
     "mole (starts moving up)"
   },
   {
-    "mole_down",
+    "mole.down",
     "mole",
     "mole (starts moving down)"
   },
   {
-    "steelwall_slanted",
+    "steelwall_slippery",
     "wall",
-    "steel wall (slanted)"
+    "slippery steel wall"
   },
   {
     "invisible_sand",
@@ -1757,22 +1691,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)"
   },
   {
@@ -1791,7 +1725,7 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
     "time gate (closed)"
   },
   {
-    "timegate_switch_active",
+    "timegate_switch.active",
     "timegate_switch",
     "switch for time gate"
   },
@@ -1806,94 +1740,94 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
     "balloon"
   },
   {
-    "balloon_send_left",
+    "balloon_switch_left",
     "balloon_switch",
     "send balloon to the left"
   },
   {
-    "balloon_send_right",
+    "balloon_switch_right",
     "balloon_switch",
     "send balloon to the right"
   },
   {
-    "balloon_send_up",
+    "balloon_switch_up",
     "balloon_switch",
     "send balloon up"
   },
   {
-    "balloon_send_down",
+    "balloon_switch_down",
     "balloon_switch",
     "send balloon down"
   },
   {
-    "balloon_send_any_direction",
+    "balloon_switch_any",
     "balloon_switch",
     "send balloon in any direction"
   },
   {
-    "emc_steelwall1",
+    "emc_steelwall_1",
     "wall",
     "steel wall"
   },
   {
-    "emc_steelwall2",
+    "emc_steelwall_2",
     "wall",
     "steel wall"
   },
   {
-    "emc_steelwall3",
+    "emc_steelwall_3",
     "wall",
     "steel wall"
   },
   {
-    "emc_steelwall4",
+    "emc_steelwall_4",
     "wall",
     "steel wall"
   },
   {
-    "emc_wall_pillar_upper",
+    "emc_wall_1",
     "wall",
     "normal wall"
   },
   {
-    "emc_wall_pillar_middle",
+    "emc_wall_2",
     "wall",
     "normal wall"
   },
   {
-    "emc_wall_pillar_lower",
+    "emc_wall_3",
     "wall",
     "normal wall"
   },
   {
-    "emc_wall4",
+    "emc_wall_4",
     "wall",
     "normal wall"
   },
   {
-    "emc_wall5",
+    "emc_wall_5",
     "wall",
     "normal wall"
   },
   {
-    "emc_wall6",
+    "emc_wall_6",
     "wall",
     "normal wall"
   },
   {
-    "emc_wall7",
+    "emc_wall_7",
     "wall",
     "normal wall"
   },
   {
-    "emc_wall8",
+    "emc_wall_8",
     "wall",
     "normal wall"
   },
   {
-    "tube_all",
+    "tube_any",
     "tube",
-    "tube (all directions)"
+    "tube (any direction)"
   },
   {
     "tube_vertical",
@@ -1957,17 +1891,17 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
   },
   {
     "dx_supabomb",
-    "dx_bomb",
+    "bomb",
     "stable bomb (DX style)"
   },
   {
     "unused_358",
-    NULL,
+    "unused",
     "-"
   },
   {
     "unused_359",
-    NULL,
+    "unused",
     "-"
   },
   {
@@ -2610,158 +2544,840 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
     "custom",
     "custom element 128"
   },
-
-  /* "real" (and therefore drawable) runtime elements */
-
-  {
-    "em_key1",
-    "key",
-    "-"
-    },
   {
-    "em_key2",
-    "key",
-    "-"
-    },
+    "custom_129",
+    "custom",
+    "custom element 129"
+  },
   {
-    "em_key3",
-    "key",
-    "-"
+    "custom_130",
+    "custom",
+    "custom element 130"
   },
   {
-    "em_key4",
-    "key",
-    "-"
+    "custom_131",
+    "custom",
+    "custom element 131"
   },
   {
-    "dynabomb_player1_active",
-    "dynabomb",
-    "-"
+    "custom_132",
+    "custom",
+    "custom element 132"
   },
   {
-    "dynabomb_player2_active",
-    "dynabomb",
-    "-"
+    "custom_133",
+    "custom",
+    "custom element 133"
   },
   {
-    "dynabomb_player3_active",
-    "dynabomb",
-    "-"
+    "custom_134",
+    "custom",
+    "custom element 134"
   },
   {
-    "dynabomb_player4_active",
-    "dynabomb",
-    "-"
+    "custom_135",
+    "custom",
+    "custom element 135"
   },
   {
-    "switchgate_opening",
-    "switchgate",
-    "-"
+    "custom_136",
+    "custom",
+    "custom element 136"
   },
   {
-    "switchgate_closing",
-    "switchgate",
-    "-"
+    "custom_137",
+    "custom",
+    "custom element 137"
   },
   {
-    "timegate_opening",
-    "timegate",
-    "-"
+    "custom_138",
+    "custom",
+    "custom element 138"
   },
   {
-    "timegate_closing",
-    "timegate",
-    "-"
+    "custom_139",
+    "custom",
+    "custom element 139"
   },
   {
-    "pearl_breaking",
-    "pearl",
-    "-"
+    "custom_140",
+    "custom",
+    "custom element 140"
   },
   {
-    "trap_active",
-    "trap",
-    "-"
+    "custom_141",
+    "custom",
+    "custom element 141"
   },
   {
-    "invisible_steelwall_active",
-    "wall",
-    "-"
+    "custom_142",
+    "custom",
+    "custom element 142"
   },
   {
-    "invisible_wall_active",
-    "wall",
-    "-"
+    "custom_143",
+    "custom",
+    "custom element 143"
   },
   {
-    "invisible_sand_active",
-    "sand",
-    "-"
+    "custom_144",
+    "custom",
+    "custom element 144"
   },
   {
-    "conveyor_belt1_left_active",
-    "conveyor_belt",
-    "-"
+    "custom_145",
+    "custom",
+    "custom element 145"
   },
   {
-    "conveyor_belt1_middle_active",
-    "conveyor_belt",
-    "-"
+    "custom_146",
+    "custom",
+    "custom element 146"
   },
   {
-    "conveyor_belt1_right_active",
-    "conveyor_belt",
-    "-"
+    "custom_147",
+    "custom",
+    "custom element 147"
   },
   {
-    "conveyor_belt2_left_active",
-    "conveyor_belt",
-    "-"
+    "custom_148",
+    "custom",
+    "custom element 148"
   },
   {
-    "conveyor_belt2_middle_active",
-    "conveyor_belt",
-    "-"
+    "custom_149",
+    "custom",
+    "custom element 149"
   },
   {
-    "conveyor_belt2_right_active",
-    "conveyor_belt",
-    "-"
+    "custom_150",
+    "custom",
+    "custom element 150"
   },
   {
-    "conveyor_belt3_left_active",
-    "conveyor_belt",
-    "-"
+    "custom_151",
+    "custom",
+    "custom element 151"
   },
   {
-    "conveyor_belt3_middle_active",
-    "conveyor_belt",
-    "-"
+    "custom_152",
+    "custom",
+    "custom element 152"
   },
   {
-    "conveyor_belt3_right_active",
-    "conveyor_belt",
-    "-"
+    "custom_153",
+    "custom",
+    "custom element 153"
   },
   {
-    "conveyor_belt4_left_active",
-    "conveyor_belt",
-    "-"
+    "custom_154",
+    "custom",
+    "custom element 154"
   },
   {
-    "conveyor_belt4_middle_active",
-    "conveyor_belt",
-    "-"
+    "custom_155",
+    "custom",
+    "custom element 155"
   },
   {
-    "conveyor_belt4_right_active",
-    "conveyor_belt",
-    "-"
+    "custom_156",
+    "custom",
+    "custom element 156"
   },
   {
-    "exit_opening",
-    "exit",
-    "-"
+    "custom_157",
+    "custom",
+    "custom element 157"
+  },
+  {
+    "custom_158",
+    "custom",
+    "custom element 158"
+  },
+  {
+    "custom_159",
+    "custom",
+    "custom element 159"
+  },
+  {
+    "custom_160",
+    "custom",
+    "custom element 160"
+  },
+  {
+    "custom_161",
+    "custom",
+    "custom element 161"
+  },
+  {
+    "custom_162",
+    "custom",
+    "custom element 162"
+  },
+  {
+    "custom_163",
+    "custom",
+    "custom element 163"
+  },
+  {
+    "custom_164",
+    "custom",
+    "custom element 164"
+  },
+  {
+    "custom_165",
+    "custom",
+    "custom element 165"
+  },
+  {
+    "custom_166",
+    "custom",
+    "custom element 166"
+  },
+  {
+    "custom_167",
+    "custom",
+    "custom element 167"
+  },
+  {
+    "custom_168",
+    "custom",
+    "custom element 168"
+  },
+  {
+    "custom_169",
+    "custom",
+    "custom element 169"
+  },
+  {
+    "custom_170",
+    "custom",
+    "custom element 170"
+  },
+  {
+    "custom_171",
+    "custom",
+    "custom element 171"
+  },
+  {
+    "custom_172",
+    "custom",
+    "custom element 172"
+  },
+  {
+    "custom_173",
+    "custom",
+    "custom element 173"
+  },
+  {
+    "custom_174",
+    "custom",
+    "custom element 174"
+  },
+  {
+    "custom_175",
+    "custom",
+    "custom element 175"
+  },
+  {
+    "custom_176",
+    "custom",
+    "custom element 176"
+  },
+  {
+    "custom_177",
+    "custom",
+    "custom element 177"
+  },
+  {
+    "custom_178",
+    "custom",
+    "custom element 178"
+  },
+  {
+    "custom_179",
+    "custom",
+    "custom element 179"
+  },
+  {
+    "custom_180",
+    "custom",
+    "custom element 180"
+  },
+  {
+    "custom_181",
+    "custom",
+    "custom element 181"
+  },
+  {
+    "custom_182",
+    "custom",
+    "custom element 182"
+  },
+  {
+    "custom_183",
+    "custom",
+    "custom element 183"
+  },
+  {
+    "custom_184",
+    "custom",
+    "custom element 184"
+  },
+  {
+    "custom_185",
+    "custom",
+    "custom element 185"
+  },
+  {
+    "custom_186",
+    "custom",
+    "custom element 186"
+  },
+  {
+    "custom_187",
+    "custom",
+    "custom element 187"
+  },
+  {
+    "custom_188",
+    "custom",
+    "custom element 188"
+  },
+  {
+    "custom_189",
+    "custom",
+    "custom element 189"
+  },
+  {
+    "custom_190",
+    "custom",
+    "custom element 190"
+  },
+  {
+    "custom_191",
+    "custom",
+    "custom element 191"
+  },
+  {
+    "custom_192",
+    "custom",
+    "custom element 192"
+  },
+  {
+    "custom_193",
+    "custom",
+    "custom element 193"
+  },
+  {
+    "custom_194",
+    "custom",
+    "custom element 194"
+  },
+  {
+    "custom_195",
+    "custom",
+    "custom element 195"
+  },
+  {
+    "custom_196",
+    "custom",
+    "custom element 196"
+  },
+  {
+    "custom_197",
+    "custom",
+    "custom element 197"
+  },
+  {
+    "custom_198",
+    "custom",
+    "custom element 198"
+  },
+  {
+    "custom_199",
+    "custom",
+    "custom element 199"
+  },
+  {
+    "custom_200",
+    "custom",
+    "custom element 200"
+  },
+  {
+    "custom_201",
+    "custom",
+    "custom element 201"
+  },
+  {
+    "custom_202",
+    "custom",
+    "custom element 202"
+  },
+  {
+    "custom_203",
+    "custom",
+    "custom element 203"
+  },
+  {
+    "custom_204",
+    "custom",
+    "custom element 204"
+  },
+  {
+    "custom_205",
+    "custom",
+    "custom element 205"
+  },
+  {
+    "custom_206",
+    "custom",
+    "custom element 206"
+  },
+  {
+    "custom_207",
+    "custom",
+    "custom element 207"
+  },
+  {
+    "custom_208",
+    "custom",
+    "custom element 208"
+  },
+  {
+    "custom_209",
+    "custom",
+    "custom element 209"
+  },
+  {
+    "custom_210",
+    "custom",
+    "custom element 210"
+  },
+  {
+    "custom_211",
+    "custom",
+    "custom element 211"
+  },
+  {
+    "custom_212",
+    "custom",
+    "custom element 212"
+  },
+  {
+    "custom_213",
+    "custom",
+    "custom element 213"
+  },
+  {
+    "custom_214",
+    "custom",
+    "custom element 214"
+  },
+  {
+    "custom_215",
+    "custom",
+    "custom element 215"
+  },
+  {
+    "custom_216",
+    "custom",
+    "custom element 216"
+  },
+  {
+    "custom_217",
+    "custom",
+    "custom element 217"
+  },
+  {
+    "custom_218",
+    "custom",
+    "custom element 218"
+  },
+  {
+    "custom_219",
+    "custom",
+    "custom element 219"
+  },
+  {
+    "custom_220",
+    "custom",
+    "custom element 220"
+  },
+  {
+    "custom_221",
+    "custom",
+    "custom element 221"
+  },
+  {
+    "custom_222",
+    "custom",
+    "custom element 222"
+  },
+  {
+    "custom_223",
+    "custom",
+    "custom element 223"
+  },
+  {
+    "custom_224",
+    "custom",
+    "custom element 224"
+  },
+  {
+    "custom_225",
+    "custom",
+    "custom element 225"
+  },
+  {
+    "custom_226",
+    "custom",
+    "custom element 226"
+  },
+  {
+    "custom_227",
+    "custom",
+    "custom element 227"
+  },
+  {
+    "custom_228",
+    "custom",
+    "custom element 228"
+  },
+  {
+    "custom_229",
+    "custom",
+    "custom element 229"
+  },
+  {
+    "custom_230",
+    "custom",
+    "custom element 230"
+  },
+  {
+    "custom_231",
+    "custom",
+    "custom element 231"
+  },
+  {
+    "custom_232",
+    "custom",
+    "custom element 232"
+  },
+  {
+    "custom_233",
+    "custom",
+    "custom element 233"
+  },
+  {
+    "custom_234",
+    "custom",
+    "custom element 234"
+  },
+  {
+    "custom_235",
+    "custom",
+    "custom element 235"
+  },
+  {
+    "custom_236",
+    "custom",
+    "custom element 236"
+  },
+  {
+    "custom_237",
+    "custom",
+    "custom element 237"
+  },
+  {
+    "custom_238",
+    "custom",
+    "custom element 238"
+  },
+  {
+    "custom_239",
+    "custom",
+    "custom element 239"
+  },
+  {
+    "custom_240",
+    "custom",
+    "custom element 240"
+  },
+  {
+    "custom_241",
+    "custom",
+    "custom element 241"
+  },
+  {
+    "custom_242",
+    "custom",
+    "custom element 242"
+  },
+  {
+    "custom_243",
+    "custom",
+    "custom element 243"
+  },
+  {
+    "custom_244",
+    "custom",
+    "custom element 244"
+  },
+  {
+    "custom_245",
+    "custom",
+    "custom element 245"
+  },
+  {
+    "custom_246",
+    "custom",
+    "custom element 246"
+  },
+  {
+    "custom_247",
+    "custom",
+    "custom element 247"
+  },
+  {
+    "custom_248",
+    "custom",
+    "custom element 248"
+  },
+  {
+    "custom_249",
+    "custom",
+    "custom element 249"
+  },
+  {
+    "custom_250",
+    "custom",
+    "custom element 250"
+  },
+  {
+    "custom_251",
+    "custom",
+    "custom element 251"
+  },
+  {
+    "custom_252",
+    "custom",
+    "custom element 252"
+  },
+  {
+    "custom_253",
+    "custom",
+    "custom element 253"
+  },
+  {
+    "custom_254",
+    "custom",
+    "custom element 254"
+  },
+  {
+    "custom_255",
+    "custom",
+    "custom element 255"
+  },
+  {
+    "custom_256",
+    "custom",
+    "custom element 256"
+  },
+  {
+    "em_key_1",
+    "key",
+    "red key (EM style)"
+    },
+  {
+    "em_key_2",
+    "key",
+    "yellow key (EM style)"
+    },
+  {
+    "em_key_3",
+    "key",
+    "green key (EM style)"
+  },
+  {
+    "em_key_4",
+    "key",
+    "blue key (EM style)"
+  },
+  {
+    "envelope_1",
+    "envelope",
+    "mail envelope 1"
+  },
+  {
+    "envelope_2",
+    "envelope",
+    "mail envelope 2"
+  },
+  {
+    "envelope_3",
+    "envelope",
+    "mail envelope 3"
+  },
+  {
+    "envelope_4",
+    "envelope",
+    "mail envelope 4"
+  },
+
+  /* ----------------------------------------------------------------------- */
+  /* "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",
+    "wall",
+    "-"
+  },
+  {
+    "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",
+    "-"
+  },
+  {
+    "sp_exit.opening",
+    "sp_exit",
+    "-"
+  },
+  {
+    "sp_exit.closing",
+    "sp_exit",
+    "-"
   },
   {
     "sp_exit_open",
@@ -2769,17 +3385,17 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
     "-"
   },
   {
-    "sp_terminal_active",
+    "sp_terminal.active",
     "sp_terminal",
     "-"
   },
   {
-    "sp_buggy_base_activating",
+    "sp_buggy_base.activating",
     "sp_buggy_base",
     "-"
   },
   {
-    "sp_buggy_base_active",
+    "sp_buggy_base.active",
     "sp_buggy_base",
     "-"
   },
@@ -2789,22 +3405,22 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
     "-"
   },
   {
-    "amoeba_dripping",
+    "amoeba.dropping",
     "amoeba",
     "-"
   },
   {
-    "quicksand_emptying",
+    "quicksand.emptying",
     "quicksand",
     "-"
   },
   {
-    "magic_wall_active",
+    "magic_wall.active",
     "magic_wall",
     "-"
   },
   {
-    "bd_magic_wall_active",
+    "bd_magic_wall.active",
     "magic_wall",
     "-"
   },
@@ -2819,12 +3435,12 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
     "-"
   },
   {
-    "magic_wall_emptying",
+    "magic_wall.emptying",
     "magic_wall",
     "-"
   },
   {
-    "bd_magic_wall_emptying",
+    "bd_magic_wall.emptying",
     "magic_wall",
     "-"
   },
@@ -2839,17 +3455,361 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
     "-"
   },
 
+  /* ----------------------------------------------------------------------- */
+  /* "unreal" (and therefore not drawable) runtime elements                  */
+  /* ----------------------------------------------------------------------- */
+
   {
-    "",
-    NULL,
+    "blocked",
+    "-",
+    "-"
+  },
+  {
+    "explosion",
+    "-",
+    "-"
+  },
+  {
+    "nut_breaking",
+    "-",
+    "-"
+  },
+  {
+    "diamond_breaking",
+    "-",
+    "-"
+  },
+  {
+    "acid_splash_left",
+    "-",
+    "-"
+  },
+  {
+    "acid_splash_right",
+    "-",
+    "-"
+  },
+  {
+    "amoeba_growing",
+    "-",
+    "-"
+  },
+  {
+    "amoeba_shrinking",
+    "-",
+    "-"
+  },
+  {
+    "expandable_wall.growing",
+    "-",
     "-"
+  },
+  {
+    "flames",
+    "-",
+    "-"
+  },
+  {
+    "player_is_leaving",
+    "-",
+    "-"
+  },
+  {
+    "quicksand.filling",
+    "quicksand",
+    "-"
+  },
+  {
+    "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",
+    "-",
+    "-"
+  },
+  {
+    "dynabomb",
+    "-",
+    "-"
+  },
+  {
+    "dynabomb.active",
+    "-",
+    "-"
+  },
+  {
+    "dynabomb_player_1",
+    "-",
+    "-"
+  },
+  {
+    "dynabomb_player_2",
+    "-",
+    "-"
+  },
+  {
+    "dynabomb_player_3",
+    "-",
+    "-"
+  },
+  {
+    "dynabomb_player_4",
+    "-",
+    "-"
+  },
+  {
+    "shield_normal.active",
+    "-",
+    "-"
+  },
+  {
+    "shield_deadly.active",
+    "-",
+    "-"
+  },
+  {
+    "[default]",
+    "default",
+    "-"
+  },
+  {
+    "[bd_default]",
+    "bd_default",
+    "-"
+  },
+  {
+    "[sp_default]",
+    "sp_default",
+    "-"
+  },
+  {
+    "[sb_default]",
+    "sb_default",
+    "-"
+  },
+
+  /* keyword to stop parser: "ELEMENT_INFO_END" <-- do not change! */
+
+  {
+    NULL,
+    NULL,
+    NULL
   }
 };
 
-#if 0
-struct GraphicInfo graphic_info[MAX_GRAPHICS];
-#endif
-struct NewGraphicInfo new_graphic_info[NUM_IMAGE_FILES];
+
+/* ------------------------------------------------------------------------- */
+/* element action and direction definitions                                  */
+/* ------------------------------------------------------------------------- */
+
+struct ElementActionInfo element_action_info[NUM_ACTIONS + 1 + 1] =
+{
+  { ".[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   },
+  { ".dropping",       ACTION_DROPPING,        FALSE   },
+  { ".pushing",                ACTION_PUSHING,         FALSE   },
+  { ".walking",                ACTION_WALKING,         FALSE   },
+  { ".passing",                ACTION_PASSING,         FALSE   },
+  { ".impact",         ACTION_IMPACT,          FALSE   },
+  { ".breaking",       ACTION_BREAKING,        FALSE   },
+  { ".activating",     ACTION_ACTIVATING,      FALSE   },
+  { ".deactivating",   ACTION_DEACTIVATING,    FALSE   },
+  { ".opening",                ACTION_OPENING,         FALSE   },
+  { ".closing",                ACTION_CLOSING,         FALSE   },
+  { ".attacking",      ACTION_ATTACKING,       TRUE    },
+  { ".growing",                ACTION_GROWING,         TRUE    },
+  { ".shrinking",      ACTION_SHRINKING,       FALSE   },
+  { ".active",         ACTION_ACTIVE,          TRUE    },
+  { ".filling",                ACTION_FILLING,         FALSE   },
+  { ".emptying",       ACTION_EMPTYING,        FALSE   },
+  { ".changing",       ACTION_CHANGING,        FALSE   },
+  { ".exploding",      ACTION_EXPLODING,       FALSE   },
+  { ".dying",          ACTION_DYING,           FALSE   },
+  { ".other",          ACTION_OTHER,           FALSE   },
+
+  /* empty suffix always matches -- check as last entry in InitSoundInfo() */
+  { "",                        ACTION_DEFAULT,         TRUE    },
+
+  { 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                     },
+
+  { NULL,              0                               }
+};
+
+struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1] =
+{
+  { ".MAIN",           GAME_MODE_MAIN,                 },
+  { ".LEVELS",         GAME_MODE_LEVELS                },
+  { ".SCORES",         GAME_MODE_SCORES,               },
+  { ".EDITOR",         GAME_MODE_EDITOR,               },
+  { ".INFO",           GAME_MODE_INFO,                 },
+  { ".SETUP",          GAME_MODE_SETUP,                },
+  { ".PLAYING",                GAME_MODE_PLAYING,              },
+  { ".DOOR",           GAME_MODE_PSEUDO_DOOR,          },
+  { ".PREVIEW",                GAME_MODE_PSEUDO_PREVIEW,       },
+  { ".CRUMBLED",       GAME_MODE_PSEUDO_CRUMBLED,      },
+
+  { NULL,              0,                              }
+};
+
+struct TokenIntPtrInfo image_config_vars[] =
+{
+  { "global.num_toons",                &global.num_toons                          },
+
+  { "menu.draw_xoffset",       &menu.draw_xoffset_default                 },
+  { "menu.draw_yoffset",       &menu.draw_yoffset_default                 },
+  { "menu.draw_xoffset.MAIN",  &menu.draw_xoffset[GFX_SPECIAL_ARG_MAIN]   },
+  { "menu.draw_yoffset.MAIN",  &menu.draw_yoffset[GFX_SPECIAL_ARG_MAIN]   },
+  { "menu.draw_xoffset.LEVELS",        &menu.draw_xoffset[GFX_SPECIAL_ARG_LEVELS] },
+  { "menu.draw_yoffset.LEVELS",        &menu.draw_yoffset[GFX_SPECIAL_ARG_LEVELS] },
+  { "menu.draw_xoffset.SCORES",        &menu.draw_xoffset[GFX_SPECIAL_ARG_SCORES] },
+  { "menu.draw_yoffset.SCORES",        &menu.draw_yoffset[GFX_SPECIAL_ARG_SCORES] },
+  { "menu.draw_xoffset.EDITOR",        &menu.draw_xoffset[GFX_SPECIAL_ARG_EDITOR] },
+  { "menu.draw_yoffset.EDITOR",        &menu.draw_yoffset[GFX_SPECIAL_ARG_EDITOR] },
+  { "menu.draw_xoffset.INFO",  &menu.draw_xoffset[GFX_SPECIAL_ARG_INFO]   },
+  { "menu.draw_yoffset.INFO",  &menu.draw_yoffset[GFX_SPECIAL_ARG_INFO]   },
+  { "menu.draw_xoffset.SETUP", &menu.draw_xoffset[GFX_SPECIAL_ARG_SETUP]  },
+  { "menu.draw_yoffset.SETUP", &menu.draw_yoffset[GFX_SPECIAL_ARG_SETUP]  },
+
+  { "menu.scrollbar_xoffset",  &menu.scrollbar_xoffset                    },
+
+  { "menu.list_size",          &menu.list_size_default                    },
+  { "menu.list_size.LEVELS",   &menu.list_size[GFX_SPECIAL_ARG_LEVELS]    },
+  { "menu.list_size.SCORES",   &menu.list_size[GFX_SPECIAL_ARG_SCORES]    },
+  { "menu.list_size.INFO",     &menu.list_size[GFX_SPECIAL_ARG_INFO]      },
+
+  { "door_1.step_offset",      &door_1.step_offset                        },
+  { "door_1.step_delay",       &door_1.step_delay                         },
+  { "door_1.anim_mode",                &door_1.anim_mode                          },
+  { "door_2.step_offset",      &door_2.step_offset                        },
+  { "door_2.step_delay",       &door_2.step_delay                         },
+  { "door_2.anim_mode",                &door_2.anim_mode                          },
+
+  { NULL,                      NULL,                                      }
+};
+
+
+/* ------------------------------------------------------------------------- */
+/* 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! */
+
+struct FontInfo font_info[NUM_FONTS + 1] =
+{
+  { "font.initial_1"           },
+  { "font.initial_2"           },
+  { "font.initial_3"           },
+  { "font.initial_4"           },
+  { "font.title_1"             },
+  { "font.title_2"             },
+  { "font.menu_1"              },
+  { "font.menu_2"              },
+  { "font.text_1.active"       },
+  { "font.text_2.active"       },
+  { "font.text_3.active"       },
+  { "font.text_4.active"       },
+  { "font.text_1"              },
+  { "font.text_2"              },
+  { "font.text_3"              },
+  { "font.text_4"              },
+  { "font.envelope_1"          },
+  { "font.envelope_2"          },
+  { "font.envelope_3"          },
+  { "font.envelope_4"          },
+  { "font.input_1.active"      },
+  { "font.input_2.active"      },
+  { "font.input_1"             },
+  { "font.input_2"             },
+  { "font.option_off"          },
+  { "font.option_on"           },
+  { "font.value_1"             },
+  { "font.value_2"             },
+  { "font.value_old"           },
+  { "font.level_number"                },
+  { "font.tape_recorder"       },
+  { "font.game_info"           },
+};
 
 
 /* ========================================================================= */
@@ -2858,9 +3818,14 @@ struct NewGraphicInfo new_graphic_info[NUM_IMAGE_FILES];
 
 int main(int argc, char *argv[])
 {
-  InitCommandName(argv[0]);
+  InitProgramInfo(argv[0], USERDATA_DIRECTORY,
+                 PROGRAM_TITLE_STRING, getWindowTitleString(),
+                 ICON_TITLE_STRING, X11_ICON_FILENAME, X11_ICONMASK_FILENAME,
+                 MSDOS_POINTER_FILENAME,
+                 COOKIE_PREFIX, FILENAME_PREFIX, GAME_VERSION_ACTUAL);
+
   InitExitFunction(CloseAllAndExit);
-  InitPlatformDependantStuff();
+  InitPlatformDependentStuff();
 
   GetOptions(argv);
   OpenAll();