1 // ============================================================================
2 // Rocks'n'Diamonds - McDuffin Strikes Back!
3 // ----------------------------------------------------------------------------
4 // (c) 1995-2014 by Artsoft Entertainment
7 // http://www.artsoft.org/
8 // ----------------------------------------------------------------------------
10 // ============================================================================
12 #include "libgame/libgame.h"
23 Bitmap *bitmap_db_store;
24 Bitmap *bitmap_db_cross;
25 Bitmap *bitmap_db_field;
26 Bitmap *bitmap_db_panel;
27 Bitmap *bitmap_db_door_1;
28 Bitmap *bitmap_db_door_2;
29 Bitmap *bitmap_db_toons;
30 DrawBuffer *fieldbuffer;
31 DrawBuffer *drawto_field;
34 boolean level_editor_test_game = FALSE;
35 boolean network_playing = FALSE;
37 #if defined(TARGET_SDL)
38 boolean network_server = FALSE;
39 SDL_Thread *server_thread;
42 int key_joystick_mapping = 0;
44 short Feld[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
45 short MovPos[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
46 short MovDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
47 short MovDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
48 short ChangeDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
49 short ChangePage[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
50 short CustomValue[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
51 short Store[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
52 short Store2[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
53 short StorePlayer[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
54 short Back[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
55 boolean Stop[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
56 boolean Pushed[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
57 short ChangeCount[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
58 short ChangeEvent[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
59 short WasJustMoving[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
60 short WasJustFalling[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
61 short CheckCollision[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
62 short CheckImpact[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
63 short AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
64 short AmoebaCnt[MAX_NUM_AMOEBA];
65 short AmoebaCnt2[MAX_NUM_AMOEBA];
66 short ExplodeField[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
67 short ExplodePhase[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
68 short ExplodeDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
69 int RunnerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
70 int PlayerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
72 int GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
73 int GfxRandom[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
74 int GfxElement[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
75 int GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
76 int GfxDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
77 int GfxRedraw[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
79 int ActiveElement[MAX_NUM_ELEMENTS];
80 int ActiveButton[NUM_IMAGE_FILES];
81 int ActiveFont[NUM_FONTS];
83 int lev_fieldx, lev_fieldy;
84 int scroll_x, scroll_y;
86 int WIN_XSIZE = WIN_XSIZE_DEFAULT;
87 int WIN_YSIZE = WIN_YSIZE_DEFAULT;
89 int SCR_FIELDX = SCR_FIELDX_DEFAULT;
90 int SCR_FIELDY = SCR_FIELDY_DEFAULT;
92 int REAL_SX = 6, REAL_SY = 6;
94 int DX = 566, DY = 60;
95 int VX = 566, VY = 400;
96 int EX = 566, EY = 356;
99 int FULL_SXSIZE = 2 + SXSIZE_DEFAULT + 2;
100 int FULL_SYSIZE = 2 + SYSIZE_DEFAULT + 2;
101 int SXSIZE = SXSIZE_DEFAULT;
102 int SYSIZE = SYSIZE_DEFAULT;
110 int TILESIZE_VAR = TILESIZE;
114 int ScreenMovDir = MV_NONE, ScreenMovPos = 0;
115 int ScreenGfxPos = 0;
116 int BorderElement = EL_STEELWALL;
117 int GameFrameDelay = GAME_FRAME_DELAY;
118 int FfwdFrameDelay = FFWD_FRAME_DELAY;
121 int SBX_Left, SBX_Right;
122 int SBY_Upper, SBY_Lower;
127 int TimeFrames, TimePlayed, TimeLeft, TapeTime;
129 boolean network_player_action_received = FALSE;
131 struct LevelSetInfo levelset;
132 struct LevelInfo level, level_template;
133 struct PlayerInfo stored_player[MAX_PLAYERS], *local_player = NULL;
134 struct HiScore highscore[MAX_SCORE_ENTRIES];
135 struct TapeInfo tape;
136 struct SetupInfo setup;
137 struct GameInfo game;
138 struct GlobalInfo global;
139 struct BorderInfo border;
140 struct ViewportInfo viewport;
141 struct TitleFadingInfo fading;
142 struct TitleFadingInfo title_initial_default;
143 struct TitleFadingInfo title_default;
144 struct TitleMessageInfo titlemessage_initial_default;
145 struct TitleMessageInfo titlemessage_initial[MAX_NUM_TITLE_MESSAGES];
146 struct TitleMessageInfo titlemessage_default;
147 struct TitleMessageInfo titlemessage[MAX_NUM_TITLE_MESSAGES];
148 struct TitleMessageInfo readme;
149 struct InitInfo init, init_last;
150 struct MenuInfo menu;
151 struct DoorInfo door_1, door_2;
152 struct RequestInfo request;
153 struct PreviewInfo preview;
154 struct EditorInfo editor;
156 struct GraphicInfo *graphic_info = NULL;
157 struct SoundInfo *sound_info = NULL;
158 struct MusicInfo *music_info = NULL;
159 struct MusicFileInfo *music_file_info = NULL;
160 struct HelpAnimInfo *helpanim_info = NULL;
162 SetupFileHash *helptext_info = NULL;
163 SetupFileHash *image_config_hash = NULL;
164 SetupFileHash *element_token_hash = NULL;
165 SetupFileHash *graphic_token_hash = NULL;
166 SetupFileHash *font_token_hash = NULL;
169 /* ------------------------------------------------------------------------- */
170 /* element definitions */
171 /* ------------------------------------------------------------------------- */
173 struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1];
175 /* this contains predefined structure elements to initialize "element_info" */
176 struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
178 /* keyword to start parser: "ELEMENT_INFO_START" <-- do not change! */
180 /* ----------------------------------------------------------------------- */
181 /* "real" level file elements */
182 /* ----------------------------------------------------------------------- */
232 "bug (random start direction)"
237 "spaceship (random start direction)"
242 "yam yam (random start direction)"
272 "quicksand (with rock)"
302 "dropping amoeba (EM style)"
317 "Conway's wall of life"
340 "robot_wheel.active",
342 "magic wheel (running)"
387 "gray door (opened by key 1)"
392 "gray door (opened by key 2)"
397 "gray door (opened by key 3)"
402 "gray door (opened by key 4)"
412 "pac man (random start direction)"
417 "invisible normal wall"
442 "amoeba with content"
462 "growing wall (horizontal, visible)"
477 "wall with BD style diamond"
480 "wall_emerald_yellow",
482 "wall with yellow emerald"
492 "magic wall (BD style)"
495 "invisible_steelwall",
497 "invisible steel wall"
500 "sokoban_field_player",
502 "sokoban field with player"
505 "dynabomb_increase_number",
507 "increases number of bombs"
510 "dynabomb_increase_size",
512 "increases explosion size"
515 "dynabomb_increase_power",
517 "increases power of explosion"
525 "sokoban_field_empty",
527 "sokoban empty field"
530 "sokoban_field_full",
532 "sokoban field with object"
535 "bd_butterfly.right",
537 "butterfly (starts moving right)"},
541 "butterfly (starts moving up)"
546 "butterfly (starts moving left)"},
550 "butterfly (starts moving down)"},
554 "firefly (starts moving right)"
559 "firefly (starts moving up)"
564 "firefly (starts moving left)"
569 "firefly (starts moving down)"
574 "butterfly (random start direction)"
579 "firefly (random start direction)"
604 "bug (starts moving right)"
609 "bug (starts moving up)"
614 "bug (starts moving left)"
619 "bug (starts moving down)"
624 "spaceship (starts moving right)"},
628 "spaceship (starts moving up)"
633 "spaceship (starts moving left)"},
637 "spaceship (starts moving down)"},
641 "pac man (starts moving right)"
646 "pac man (starts moving up)"
651 "pac man (starts moving left)"
656 "pac man (starts moving down)"
671 "wall with red emerald"
674 "wall_emerald_purple",
676 "wall with purple emerald"
681 "acid pool (top left)"
684 "acid_pool_topright",
686 "acid pool (top right)"
689 "acid_pool_bottomleft",
691 "acid pool (bottom left)"
699 "acid_pool_bottomright",
701 "acid pool (bottom right)"
706 "normal wall (BD style)"
731 "mole (random start direction)"
771 "fire breathing dragon"
774 "em_key_1_file_obsolete",
1084 "char_bracketright",
1179 "expandable_wall_horizontal",
1181 "growing wall (horizontal)"
1184 "expandable_wall_vertical",
1186 "growing wall (vertical)"
1189 "expandable_wall_any",
1191 "growing wall (any direction)"
1214 "em_key_2_file_obsolete",
1219 "em_key_3_file_obsolete",
1224 "em_key_4_file_obsolete",
1276 "port (leading right)"
1281 "port (leading down)"
1286 "port (leading left)"
1294 "sp_gravity_port_right",
1296 "gravity-on/off port (leading right)"
1299 "sp_gravity_port_down",
1301 "gravity-on/off port (leading down)"
1304 "sp_gravity_port_left",
1306 "gravity-on/off port (leading left)"
1309 "sp_gravity_port_up",
1311 "gravity-on/off port (leading up)"
1339 "sp_port_horizontal",
1346 "port (any direction)"
1369 "sp_hardware_base_1",
1374 "sp_hardware_green",
1389 "sp_hardware_yellow",
1394 "sp_hardware_base_2",
1399 "sp_hardware_base_3",
1404 "sp_hardware_base_4",
1409 "sp_hardware_base_5",
1414 "sp_hardware_base_6",
1431 "gray door (EM style, key 1)"
1436 "gray door (EM style, key 2)"
1441 "gray door (EM style, key 3)"
1446 "gray door (EM style, key 4)"
1451 "dynamite (EM style)"
1454 "em_dynamite.active",
1456 "burning dynamite (EM style)"
1484 "dc_gate_white_gray",
1486 "gray door (opened by white key)"
1506 "switch gate (open)"
1509 "switchgate_closed",
1511 "switch gate (closed)"
1514 "switchgate_switch_up",
1515 "switchgate_switch",
1516 "switch for switch gate"
1519 "switchgate_switch_down",
1520 "switchgate_switch",
1521 "switch for switch gate"
1534 "conveyor_belt_1_left",
1536 "conveyor belt 1 (left)"
1539 "conveyor_belt_1_middle",
1541 "conveyor belt 1 (middle)"
1544 "conveyor_belt_1_right",
1546 "conveyor belt 1 (right)"
1549 "conveyor_belt_1_switch_left",
1550 "conveyor_belt_switch",
1551 "switch for conveyor belt 1 (left)"
1554 "conveyor_belt_1_switch_middle",
1555 "conveyor_belt_switch",
1556 "switch for conveyor belt 1 (middle)"
1559 "conveyor_belt_1_switch_right",
1560 "conveyor_belt_switch",
1561 "switch for conveyor belt 1 (right)"
1564 "conveyor_belt_2_left",
1566 "conveyor belt 2 (left)"
1569 "conveyor_belt_2_middle",
1571 "conveyor belt 2 (middle)"
1574 "conveyor_belt_2_right",
1576 "conveyor belt 2 (right)"
1579 "conveyor_belt_2_switch_left",
1580 "conveyor_belt_switch",
1581 "switch for conveyor belt 2 (left)"
1584 "conveyor_belt_2_switch_middle",
1585 "conveyor_belt_switch",
1586 "switch for conveyor belt 2 (middle)"
1589 "conveyor_belt_2_switch_right",
1590 "conveyor_belt_switch",
1591 "switch for conveyor belt 2 (right)"
1594 "conveyor_belt_3_left",
1596 "conveyor belt 3 (left)"
1599 "conveyor_belt_3_middle",
1601 "conveyor belt 3 (middle)"
1604 "conveyor_belt_3_right",
1606 "conveyor belt 3 (right)"
1609 "conveyor_belt_3_switch_left",
1610 "conveyor_belt_switch",
1611 "switch for conveyor belt 3 (left)"
1614 "conveyor_belt_3_switch_middle",
1615 "conveyor_belt_switch",
1616 "switch for conveyor belt 3 (middle)"
1619 "conveyor_belt_3_switch_right",
1620 "conveyor_belt_switch",
1621 "switch for conveyor belt 3 (right)"
1624 "conveyor_belt_4_left",
1626 "conveyor belt 4 (left)"
1629 "conveyor_belt_4_middle",
1631 "conveyor belt 4 (middle)"
1634 "conveyor_belt_4_right",
1636 "conveyor belt 4 (right)"
1639 "conveyor_belt_4_switch_left",
1640 "conveyor_belt_switch",
1641 "switch for conveyor belt 4 (left)"
1644 "conveyor_belt_4_switch_middle",
1645 "conveyor_belt_switch",
1646 "switch for conveyor belt 4 (middle)"
1649 "conveyor_belt_4_switch_right",
1650 "conveyor_belt_switch",
1651 "switch for conveyor belt 4 (right)"
1656 "land mine (not removable)"
1659 "envelope_obsolete",
1661 "envelope (OBSOLETE)"
1666 "light switch (off)"
1669 "light_switch.active",
1676 "sign (exclamation)"
1679 "sign_radioactivity",
1681 "sign (radio activity)"
1691 "sign (wheel chair)"
1714 "sign_entry_forbidden",
1716 "sign (entry forbidden)"
1719 "sign_emergency_exit",
1721 "sign (emergency exit)"
1736 "mole (starts moving left)"
1741 "mole (starts moving right)"
1746 "mole (starts moving up)"
1751 "mole (starts moving down)"
1754 "steelwall_slippery",
1756 "slippery steel wall"
1766 "dx unknown element 15"
1771 "dx unknown element 42"
1786 "shield (deadly, kills enemies)"
1796 "time gate (closed)"
1799 "timegate_switch.active",
1801 "switch for time gate"
1806 "switch for time gate"
1814 "balloon_switch_left",
1816 "wind switch (left)"
1819 "balloon_switch_right",
1821 "wind switch (right)"
1824 "balloon_switch_up",
1829 "balloon_switch_down",
1831 "wind switch (down)"
1834 "balloon_switch_any",
1836 "wind switch (any direction)"
1901 "tube (any direction)"
1914 "tube_vertical_left",
1916 "tube (vertical & left)"
1919 "tube_vertical_right",
1921 "tube (vertical & right)"
1924 "tube_horizontal_up",
1926 "tube (horizontal & up)"
1929 "tube_horizontal_down",
1931 "tube (horizontal & down)"
1941 "tube (left & down)"
1951 "tube (right & down)"
1966 "stable bomb (DX style)"
2476 "custom element 100"
2481 "custom element 101"
2486 "custom element 102"
2491 "custom element 103"
2496 "custom element 104"
2501 "custom element 105"
2506 "custom element 106"
2511 "custom element 107"
2516 "custom element 108"
2521 "custom element 109"
2526 "custom element 110"
2531 "custom element 111"
2536 "custom element 112"
2541 "custom element 113"
2546 "custom element 114"
2551 "custom element 115"
2556 "custom element 116"
2561 "custom element 117"
2566 "custom element 118"
2571 "custom element 119"
2576 "custom element 120"
2581 "custom element 121"
2586 "custom element 122"
2591 "custom element 123"
2596 "custom element 124"
2601 "custom element 125"
2606 "custom element 126"
2611 "custom element 127"
2616 "custom element 128"
2621 "custom element 129"
2626 "custom element 130"
2631 "custom element 131"
2636 "custom element 132"
2641 "custom element 133"
2646 "custom element 134"
2651 "custom element 135"
2656 "custom element 136"
2661 "custom element 137"
2666 "custom element 138"
2671 "custom element 139"
2676 "custom element 140"
2681 "custom element 141"
2686 "custom element 142"
2691 "custom element 143"
2696 "custom element 144"
2701 "custom element 145"
2706 "custom element 146"
2711 "custom element 147"
2716 "custom element 148"
2721 "custom element 149"
2726 "custom element 150"
2731 "custom element 151"
2736 "custom element 152"
2741 "custom element 153"
2746 "custom element 154"
2751 "custom element 155"
2756 "custom element 156"
2761 "custom element 157"
2766 "custom element 158"
2771 "custom element 159"
2776 "custom element 160"
2781 "custom element 161"
2786 "custom element 162"
2791 "custom element 163"
2796 "custom element 164"
2801 "custom element 165"
2806 "custom element 166"
2811 "custom element 167"
2816 "custom element 168"
2821 "custom element 169"
2826 "custom element 170"
2831 "custom element 171"
2836 "custom element 172"
2841 "custom element 173"
2846 "custom element 174"
2851 "custom element 175"
2856 "custom element 176"
2861 "custom element 177"
2866 "custom element 178"
2871 "custom element 179"
2876 "custom element 180"
2881 "custom element 181"
2886 "custom element 182"
2891 "custom element 183"
2896 "custom element 184"
2901 "custom element 185"
2906 "custom element 186"
2911 "custom element 187"
2916 "custom element 188"
2921 "custom element 189"
2926 "custom element 190"
2931 "custom element 191"
2936 "custom element 192"
2941 "custom element 193"
2946 "custom element 194"
2951 "custom element 195"
2956 "custom element 196"
2961 "custom element 197"
2966 "custom element 198"
2971 "custom element 199"
2976 "custom element 200"
2981 "custom element 201"
2986 "custom element 202"
2991 "custom element 203"
2996 "custom element 204"
3001 "custom element 205"
3006 "custom element 206"
3011 "custom element 207"
3016 "custom element 208"
3021 "custom element 209"
3026 "custom element 210"
3031 "custom element 211"
3036 "custom element 212"
3041 "custom element 213"
3046 "custom element 214"
3051 "custom element 215"
3056 "custom element 216"
3061 "custom element 217"
3066 "custom element 218"
3071 "custom element 219"
3076 "custom element 220"
3081 "custom element 221"
3086 "custom element 222"
3091 "custom element 223"
3096 "custom element 224"
3101 "custom element 225"
3106 "custom element 226"
3111 "custom element 227"
3116 "custom element 228"
3121 "custom element 229"
3126 "custom element 230"
3131 "custom element 231"
3136 "custom element 232"
3141 "custom element 233"
3146 "custom element 234"
3151 "custom element 235"
3156 "custom element 236"
3161 "custom element 237"
3166 "custom element 238"
3171 "custom element 239"
3176 "custom element 240"
3181 "custom element 241"
3186 "custom element 242"
3191 "custom element 243"
3196 "custom element 244"
3201 "custom element 245"
3206 "custom element 246"
3211 "custom element 247"
3216 "custom element 248"
3221 "custom element 249"
3226 "custom element 250"
3231 "custom element 251"
3236 "custom element 252"
3241 "custom element 253"
3246 "custom element 254"
3251 "custom element 255"
3256 "custom element 256"
3466 "element triggering change"
3471 "player triggering change"
3474 "sp_gravity_on_port_right",
3475 "sp_gravity_on_port",
3476 "gravity-on port (leading right)"
3479 "sp_gravity_on_port_down",
3480 "sp_gravity_on_port",
3481 "gravity-on port (leading down)"
3484 "sp_gravity_on_port_left",
3485 "sp_gravity_on_port",
3486 "gravity-on port (leading left)"
3489 "sp_gravity_on_port_up",
3490 "sp_gravity_on_port",
3491 "gravity-on port (leading up)"
3494 "sp_gravity_off_port_right",
3495 "sp_gravity_off_port",
3496 "gravity-off port (leading right)"
3499 "sp_gravity_off_port_down",
3500 "sp_gravity_off_port",
3501 "gravity-off port (leading down)"
3504 "sp_gravity_off_port_left",
3505 "sp_gravity_off_port",
3506 "gravity-off port (leading left)"
3509 "sp_gravity_off_port_up",
3510 "sp_gravity_off_port",
3511 "gravity-off port (leading up)"
3514 "balloon_switch_none",
3521 "door 5 (EMC style)",
3526 "door 6 (EMC style)",
3531 "door 7 (EMC style)",
3536 "door 8 (EMC style)",
3541 "gray door (EMC style, key 5)",
3546 "gray door (EMC style, key 6)",
3551 "gray door (EMC style, key 7)",
3556 "gray door (EMC style, key 8)",
3561 "key 5 (EMC style)",
3566 "key 6 (EMC style)",
3571 "key 7 (EMC style)",
3576 "key 8 (EMC style)",
3594 "emc_magic_ball.active",
3596 "magic ball (activated)",
3599 "emc_magic_ball_switch",
3600 "emc_magic_ball_switch",
3601 "magic ball switch (off)",
3604 "emc_magic_ball_switch.active",
3605 "emc_magic_ball_switch",
3606 "magic ball switch (on)",
3609 "emc_spring_bumper",
3610 "emc_spring_bumper",
3669 "emc_wall_slippery_1",
3674 "emc_wall_slippery_2",
3679 "emc_wall_slippery_3",
3684 "emc_wall_slippery_4",
3706 "CE value of element triggering change"
3711 "CE score of element triggering change"
3716 "CE value of current element"
3721 "CE score of current element"
3726 "yam yam (starts moving left)"
3731 "yam yam (starts moving right)"
3736 "yam yam (starts moving up)"
3741 "yam yam (starts moving down)"
3744 "bd_expandable_wall",
3746 "growing wall (horizontal, BD style)"
3751 "CE 8 positions earlier in list"
3756 "CE 7 positions earlier in list"
3761 "CE 6 positions earlier in list"
3766 "CE 5 positions earlier in list"
3771 "CE 4 positions earlier in list"
3776 "CE 3 positions earlier in list"
3781 "CE 2 positions earlier in list"
3786 "CE 1 position earlier in list"
3791 "the current custom element"
3796 "CE 1 position later in list"
3801 "CE 2 positions later in list"
3806 "CE 3 positions later in list"
3811 "CE 4 positions later in list"
3816 "CE 5 positions later in list"
3821 "CE 6 positions later in list"
3826 "CE 7 positions later in list"
3831 "CE 8 positions later in list"
3836 "this element matches any element"
3844 "steel_char_exclam",
3849 "steel_char_quotedbl",
3854 "steel_char_numbersign",
3859 "steel_char_dollar",
3864 "steel_char_percent",
3869 "steel_char_ampersand",
3874 "steel_char_apostrophe",
3879 "steel_char_parenleft",
3884 "steel_char_parenright",
3889 "steel_char_asterisk",
3909 "steel_char_period",
3974 "steel_char_semicolon",
3989 "steel_char_greater",
3994 "steel_char_question",
4134 "steel_char_bracketleft",
4139 "steel_char_backslash",
4144 "steel_char_bracketright",
4149 "steel_char_asciicircum",
4154 "steel_char_underscore",
4159 "steel_char_copyright",
4161 "steel letter '\xa9'"
4164 "steel_char_aumlaut",
4166 "steel letter '\xc4'"
4169 "steel_char_oumlaut",
4171 "steel letter '\xd6'"
4174 "steel_char_uumlaut",
4176 "steel letter '\xdc'"
4179 "steel_char_degree",
4181 "steel letter '\xb0'"
4184 "steel_char_trademark",
4186 "steel letter '\xae'"
4189 "steel_char_cursor",
4191 "steel letter '\xa0'"
4194 "steel_char_unused",
4199 "steel_char_unused",
4204 "steel_char_unused",
4209 "steel_char_unused",
4214 "steel_char_unused",
4219 "steel_char_unused",
4224 "steel_char_unused",
4226 "steel letter 'button'"
4229 "steel_char_unused",
4234 "steel_char_unused",
4236 "steel letter 'down'"
4289 "steel_exit_closed",
4299 "dc_steelwall_1_left",
4304 "dc_steelwall_1_right",
4306 "steel wall (right)"
4309 "dc_steelwall_1_top",
4314 "dc_steelwall_1_bottom",
4316 "steel wall (bottom)"
4319 "dc_steelwall_1_horizontal",
4321 "steel wall (top/bottom)"
4324 "dc_steelwall_1_vertical",
4326 "steel wall (left/right)"
4329 "dc_steelwall_1_topleft",
4331 "steel wall (top/left)"
4334 "dc_steelwall_1_topright",
4336 "steel wall (top/right)"
4339 "dc_steelwall_1_bottomleft",
4341 "steel wall (bottom/left)"
4344 "dc_steelwall_1_bottomright",
4346 "steel wall (bottom/right)"
4349 "dc_steelwall_1_topleft_2",
4351 "steel wall (top/left corner)"
4354 "dc_steelwall_1_topright_2",
4356 "steel wall (top/right corner)"
4359 "dc_steelwall_1_bottomleft_2",
4361 "steel wall (bottom/left corner)"
4364 "dc_steelwall_1_bottomright_2",
4366 "steel wall (bottom/right corner)"
4369 "dc_steelwall_2_left",
4374 "dc_steelwall_2_right",
4376 "steel wall (right)"
4379 "dc_steelwall_2_top",
4384 "dc_steelwall_2_bottom",
4386 "steel wall (bottom)"
4389 "dc_steelwall_2_horizontal",
4391 "steel wall (horizontal)"
4394 "dc_steelwall_2_vertical",
4396 "steel wall (vertical)"
4399 "dc_steelwall_2_middle",
4401 "steel wall (middle)"
4404 "dc_steelwall_2_single",
4406 "steel wall (single)"
4409 "dc_switchgate_switch_up",
4410 "switchgate_switch",
4411 "switch for switch gate (steel)"
4414 "dc_switchgate_switch_down",
4415 "switchgate_switch",
4416 "switch for switch gate (steel)"
4419 "dc_timegate_switch",
4421 "switch for time gate (steel)"
4424 "dc_timegate_switch.active",
4426 "switch for time gate (steel)"
4431 "land mine (DC style, removable)"
4434 "expandable_steelwall",
4436 "growing steel wall"
4439 "expandable_steelwall_horizontal",
4441 "growing steel wall (horizontal)"
4444 "expandable_steelwall_vertical",
4446 "growing steel wall (vertical)"
4449 "expandable_steelwall_any",
4451 "growing steel wall (any direction)"
4456 "closed exit (EM style)"
4461 "open exit (EM style)"
4464 "em_steel_exit_closed",
4466 "closed steel exit (EM style)"
4469 "em_steel_exit_open",
4471 "open steel exit (EM style)"
4474 "dc_gate_fake_gray",
4476 "gray door (opened by no key)"
4481 "magic wall (DC style)"
4484 "quicksand_fast_empty",
4486 "fast quicksand (empty)"
4489 "quicksand_fast_full",
4491 "fast quicksand (with rock)"
4494 "from_level_template",
4495 "from_level_template",
4496 "element taken from level template"
4499 /* ----------------------------------------------------------------------- */
4500 /* "real" (and therefore drawable) runtime elements */
4501 /* ----------------------------------------------------------------------- */
4504 "dynabomb_player_1.active",
4509 "dynabomb_player_2.active",
4514 "dynabomb_player_3.active",
4519 "dynabomb_player_4.active",
4524 "sp_disk_red.active",
4529 "switchgate.opening",
4534 "switchgate.closing",
4559 "invisible_steelwall.active",
4564 "invisible_wall.active",
4569 "invisible_sand.active",
4574 "conveyor_belt_1_left.active",
4579 "conveyor_belt_1_middle.active",
4584 "conveyor_belt_1_right.active",
4589 "conveyor_belt_2_left.active",
4594 "conveyor_belt_2_middle.active",
4599 "conveyor_belt_2_right.active",
4604 "conveyor_belt_3_left.active",
4609 "conveyor_belt_3_middle.active",
4614 "conveyor_belt_3_right.active",
4619 "conveyor_belt_4_left.active",
4624 "conveyor_belt_4_middle.active",
4629 "conveyor_belt_4_right.active",
4644 "steel_exit.opening",
4649 "steel_exit.closing",
4664 "em_steel_exit.opening",
4669 "em_steel_exit.closing",
4689 "sp_terminal.active",
4694 "sp_buggy_base.activating",
4699 "sp_buggy_base.active",
4714 "quicksand.emptying",
4719 "quicksand_fast.emptying",
4724 "magic_wall.active",
4729 "bd_magic_wall.active",
4734 "dc_magic_wall.active",
4744 "bd_magic_wall_full",
4749 "dc_magic_wall_full",
4754 "magic_wall.emptying",
4759 "bd_magic_wall.emptying",
4764 "dc_magic_wall.emptying",
4774 "bd_magic_wall_dead",
4779 "dc_magic_wall_dead",
4785 "emc_fake_grass.active",
4790 "gate_1_gray.active",
4795 "gate_2_gray.active",
4800 "gate_3_gray.active",
4805 "gate_4_gray.active",
4810 "em_gate_1_gray.active",
4815 "em_gate_2_gray.active",
4820 "em_gate_3_gray.active",
4825 "em_gate_4_gray.active",
4830 "emc_gate_5_gray.active",
4835 "emc_gate_6_gray.active",
4840 "emc_gate_7_gray.active",
4845 "emc_gate_8_gray.active",
4850 "dc_gate_white_gray.active",
4855 "emc_dripper.active",
4860 "emc_spring_bumper.active",
4861 "emc_spring_bumper",
4865 /* ----------------------------------------------------------------------- */
4866 /* "unreal" (and therefore not drawable) runtime elements */
4867 /* ----------------------------------------------------------------------- */
4895 "acid_splash_right",
4910 "expandable_wall.growing",
4915 "expandable_steelwall.growing",
4925 "player_is_leaving",
4930 "player_is_exploding_1",
4935 "player_is_exploding_2",
4940 "player_is_exploding_3",
4945 "player_is_exploding_4",
4950 "quicksand.filling",
4955 "quicksand_fast.filling",
4960 "magic_wall.filling",
4965 "bd_magic_wall.filling",
4970 "dc_magic_wall.filling",
4980 "diagonal.shrinking",
4990 /* ----------------------------------------------------------------------- */
4991 /* dummy elements (never used as game elements, only used as graphics) */
4992 /* ----------------------------------------------------------------------- */
4995 "steelwall_topleft",
5000 "steelwall_topright",
5005 "steelwall_bottomleft",
5010 "steelwall_bottomright",
5015 "steelwall_horizontal",
5020 "steelwall_vertical",
5025 "invisible_steelwall_topleft",
5030 "invisible_steelwall_topright",
5035 "invisible_steelwall_bottomleft",
5040 "invisible_steelwall_bottomright",
5045 "invisible_steelwall_horizontal",
5050 "invisible_steelwall_vertical",
5065 "dynabomb_player_1",
5070 "dynabomb_player_2",
5075 "dynabomb_player_3",
5080 "dynabomb_player_4",
5085 "shield_normal.active",
5090 "shield_deadly.active",
5160 "internal_clipboard_custom",
5162 "empty custom element"
5165 "internal_clipboard_change",
5170 "internal_clipboard_group",
5172 "empty group element"
5180 "internal_cascade_bd",
5182 "show Boulder Dash elements"
5185 "internal_cascade_bd.active",
5187 "hide Boulder Dash elements"
5190 "internal_cascade_em",
5192 "show Emerald Mine elements"
5195 "internal_cascade_em.active",
5197 "hide Emerald Mine elements"
5200 "internal_cascade_emc",
5202 "show Emerald Mine Club elements"
5205 "internal_cascade_emc.active",
5207 "hide Emerald Mine Club elements"
5210 "internal_cascade_rnd",
5212 "show Rocks'n'Diamonds elements"
5215 "internal_cascade_rnd.active",
5217 "hide Rocks'n'Diamonds elements"
5220 "internal_cascade_sb",
5222 "show Sokoban elements"
5225 "internal_cascade_sb.active",
5227 "hide Sokoban elements"
5230 "internal_cascade_sp",
5232 "show Supaplex elements"
5235 "internal_cascade_sp.active",
5237 "hide Supaplex elements"
5240 "internal_cascade_dc",
5242 "show Diamond Caves II elements"
5245 "internal_cascade_dc.active",
5247 "hide Diamond Caves II elements"
5250 "internal_cascade_dx",
5252 "show DX Boulderdash elements"
5255 "internal_cascade_dx.active",
5257 "hide DX Boulderdash elements"
5260 "internal_cascade_chars",
5262 "show text elements"
5265 "internal_cascade_chars.active",
5267 "hide text elements"
5270 "internal_cascade_steel_chars",
5272 "show steel text elements"
5275 "internal_cascade_steel_chars.active",
5277 "hide steel text elements"
5280 "internal_cascade_ce",
5282 "show custom elements"
5285 "internal_cascade_ce.active",
5287 "hide custom elements"
5290 "internal_cascade_ge",
5292 "show group elements"
5295 "internal_cascade_ge.active",
5297 "hide group elements"
5300 "internal_cascade_ref",
5302 "show reference elements"
5305 "internal_cascade_ref.active",
5307 "hide reference elements"
5310 "internal_cascade_user",
5312 "show user defined elements"
5315 "internal_cascade_user.active",
5317 "hide user defined elements"
5320 "internal_cascade_dynamic",
5322 "show elements used in this level"
5325 "internal_cascade_dynamic.active",
5327 "hide elements used in this level"
5330 /* keyword to stop parser: "ELEMENT_INFO_END" <-- do not change! */
5340 /* ------------------------------------------------------------------------- */
5341 /* element action and direction definitions */
5342 /* ------------------------------------------------------------------------- */
5344 struct ElementActionInfo element_action_info[NUM_ACTIONS + 1 + 1] =
5346 { ".[DEFAULT]", ACTION_DEFAULT, TRUE },
5347 { ".waiting", ACTION_WAITING, TRUE },
5348 { ".falling", ACTION_FALLING, TRUE },
5349 { ".moving", ACTION_MOVING, TRUE },
5350 { ".digging", ACTION_DIGGING, FALSE },
5351 { ".snapping", ACTION_SNAPPING, FALSE },
5352 { ".collecting", ACTION_COLLECTING, FALSE },
5353 { ".dropping", ACTION_DROPPING, FALSE },
5354 { ".pushing", ACTION_PUSHING, FALSE },
5355 { ".walking", ACTION_WALKING, FALSE },
5356 { ".passing", ACTION_PASSING, FALSE },
5357 { ".impact", ACTION_IMPACT, FALSE },
5358 { ".breaking", ACTION_BREAKING, FALSE },
5359 { ".activating", ACTION_ACTIVATING, FALSE },
5360 { ".deactivating", ACTION_DEACTIVATING, FALSE },
5361 { ".opening", ACTION_OPENING, FALSE },
5362 { ".closing", ACTION_CLOSING, FALSE },
5363 { ".attacking", ACTION_ATTACKING, TRUE },
5364 { ".growing", ACTION_GROWING, TRUE },
5365 { ".shrinking", ACTION_SHRINKING, FALSE },
5366 { ".active", ACTION_ACTIVE, TRUE },
5367 { ".filling", ACTION_FILLING, FALSE },
5368 { ".emptying", ACTION_EMPTYING, FALSE },
5369 { ".changing", ACTION_CHANGING, FALSE },
5370 { ".exploding", ACTION_EXPLODING, FALSE },
5371 { ".boring", ACTION_BORING, FALSE },
5372 { ".boring[1]", ACTION_BORING_1, FALSE },
5373 { ".boring[2]", ACTION_BORING_2, FALSE },
5374 { ".boring[3]", ACTION_BORING_3, FALSE },
5375 { ".boring[4]", ACTION_BORING_4, FALSE },
5376 { ".boring[5]", ACTION_BORING_5, FALSE },
5377 { ".boring[6]", ACTION_BORING_6, FALSE },
5378 { ".boring[7]", ACTION_BORING_7, FALSE },
5379 { ".boring[8]", ACTION_BORING_8, FALSE },
5380 { ".boring[9]", ACTION_BORING_9, FALSE },
5381 { ".boring[10]", ACTION_BORING_10, FALSE },
5382 { ".sleeping", ACTION_SLEEPING, FALSE },
5383 { ".sleeping[1]", ACTION_SLEEPING_1, FALSE },
5384 { ".sleeping[2]", ACTION_SLEEPING_2, FALSE },
5385 { ".sleeping[3]", ACTION_SLEEPING_3, FALSE },
5386 { ".awakening", ACTION_AWAKENING, FALSE },
5387 { ".dying", ACTION_DYING, FALSE },
5388 { ".turning", ACTION_TURNING, FALSE },
5389 { ".turning_from_left", ACTION_TURNING_FROM_LEFT, FALSE },
5390 { ".turning_from_right", ACTION_TURNING_FROM_RIGHT, FALSE },
5391 { ".turning_from_up", ACTION_TURNING_FROM_UP, FALSE },
5392 { ".turning_from_down", ACTION_TURNING_FROM_DOWN, FALSE },
5393 { ".smashed_by_rock", ACTION_SMASHED_BY_ROCK, FALSE },
5394 { ".smashed_by_spring", ACTION_SMASHED_BY_SPRING, FALSE },
5395 { ".eating", ACTION_EATING, FALSE },
5396 { ".twinkling", ACTION_TWINKLING, FALSE },
5397 { ".splashing", ACTION_SPLASHING, FALSE },
5398 { ".page[1]", ACTION_PAGE_1, FALSE },
5399 { ".page[2]", ACTION_PAGE_2, FALSE },
5400 { ".page[3]", ACTION_PAGE_3, FALSE },
5401 { ".page[4]", ACTION_PAGE_4, FALSE },
5402 { ".page[5]", ACTION_PAGE_5, FALSE },
5403 { ".page[6]", ACTION_PAGE_6, FALSE },
5404 { ".page[7]", ACTION_PAGE_7, FALSE },
5405 { ".page[8]", ACTION_PAGE_8, FALSE },
5406 { ".page[9]", ACTION_PAGE_9, FALSE },
5407 { ".page[10]", ACTION_PAGE_10, FALSE },
5408 { ".page[11]", ACTION_PAGE_11, FALSE },
5409 { ".page[12]", ACTION_PAGE_12, FALSE },
5410 { ".page[13]", ACTION_PAGE_13, FALSE },
5411 { ".page[14]", ACTION_PAGE_14, FALSE },
5412 { ".page[15]", ACTION_PAGE_15, FALSE },
5413 { ".page[16]", ACTION_PAGE_16, FALSE },
5414 { ".page[17]", ACTION_PAGE_17, FALSE },
5415 { ".page[18]", ACTION_PAGE_18, FALSE },
5416 { ".page[19]", ACTION_PAGE_19, FALSE },
5417 { ".page[20]", ACTION_PAGE_20, FALSE },
5418 { ".page[21]", ACTION_PAGE_21, FALSE },
5419 { ".page[22]", ACTION_PAGE_22, FALSE },
5420 { ".page[23]", ACTION_PAGE_23, FALSE },
5421 { ".page[24]", ACTION_PAGE_24, FALSE },
5422 { ".page[25]", ACTION_PAGE_25, FALSE },
5423 { ".page[26]", ACTION_PAGE_26, FALSE },
5424 { ".page[27]", ACTION_PAGE_27, FALSE },
5425 { ".page[28]", ACTION_PAGE_28, FALSE },
5426 { ".page[29]", ACTION_PAGE_29, FALSE },
5427 { ".page[30]", ACTION_PAGE_30, FALSE },
5428 { ".page[31]", ACTION_PAGE_31, FALSE },
5429 { ".page[32]", ACTION_PAGE_32, FALSE },
5430 { ".other", ACTION_OTHER, FALSE },
5432 /* empty suffix always matches -- check as last entry in InitSoundInfo() */
5433 { "", ACTION_DEFAULT, TRUE },
5438 struct ElementDirectionInfo element_direction_info[NUM_DIRECTIONS_FULL + 1] =
5440 { ".left", MV_BIT_LEFT },
5441 { ".right", MV_BIT_RIGHT },
5442 { ".up", MV_BIT_UP },
5443 { ".down", MV_BIT_DOWN },
5444 { ".upleft", MV_BIT_UP },
5445 { ".upright", MV_BIT_RIGHT },
5446 { ".downleft", MV_BIT_LEFT },
5447 { ".downright", MV_BIT_DOWN },
5452 struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1 + 1] =
5454 { ".[DEFAULT]", GFX_SPECIAL_ARG_DEFAULT, },
5455 { ".LOADING", GFX_SPECIAL_ARG_LOADING, },
5456 { ".TITLE_INITIAL", GFX_SPECIAL_ARG_TITLE_INITIAL, },
5457 { ".TITLE", GFX_SPECIAL_ARG_TITLE, },
5458 { ".MAIN", GFX_SPECIAL_ARG_MAIN, },
5459 { ".LEVELS", GFX_SPECIAL_ARG_LEVELS },
5460 { ".LEVELNR", GFX_SPECIAL_ARG_LEVELNR },
5461 { ".SCORES", GFX_SPECIAL_ARG_SCORES, },
5462 { ".EDITOR", GFX_SPECIAL_ARG_EDITOR, },
5463 { ".INFO", GFX_SPECIAL_ARG_INFO, },
5464 { ".SETUP", GFX_SPECIAL_ARG_SETUP, },
5465 { ".PLAYING", GFX_SPECIAL_ARG_PLAYING, },
5466 { ".DOOR", GFX_SPECIAL_ARG_DOOR, },
5467 { ".TAPE", GFX_SPECIAL_ARG_TAPE, },
5468 { ".PANEL", GFX_SPECIAL_ARG_PANEL, },
5469 { ".PREVIEW", GFX_SPECIAL_ARG_PREVIEW, },
5470 { ".CRUMBLED", GFX_SPECIAL_ARG_CRUMBLED, },
5472 /* empty suffix always matches -- check as last entry in InitMusicInfo() */
5473 { "", GFX_SPECIAL_ARG_DEFAULT, },
5478 #include "conf_var.c" /* include auto-generated data structure definitions */
5481 /* ------------------------------------------------------------------------- */
5482 /* font definitions */
5483 /* ------------------------------------------------------------------------- */
5485 /* Important: When one entry is a prefix of another entry, the longer entry
5486 must come first, because the dynamic configuration does prefix matching!
5487 (These definitions must match the corresponding definitions in "main.h"!) */
5489 struct FontInfo font_info[NUM_FONTS + 1] =
5491 { "font.initial_1" },
5492 { "font.initial_2" },
5493 { "font.initial_3" },
5494 { "font.initial_4" },
5497 { "font.menu_1.active" },
5498 { "font.menu_2.active" },
5501 { "font.text_1.active" },
5502 { "font.text_2.active" },
5503 { "font.text_3.active" },
5504 { "font.text_4.active" },
5509 { "font.envelope_1" },
5510 { "font.envelope_2" },
5511 { "font.envelope_3" },
5512 { "font.envelope_4" },
5514 { "font.input_1.active" },
5515 { "font.input_2.active" },
5518 { "font.option_off" },
5519 { "font.option_on" },
5522 { "font.value_old" },
5523 { "font.level_number.active" },
5524 { "font.level_number" },
5525 { "font.tape_recorder" },
5526 { "font.game_info" },
5527 { "font.info.elements" },
5528 { "font.info.levelset" },
5534 /* ------------------------------------------------------------------------- */
5535 /* music token prefix definitions */
5536 /* ------------------------------------------------------------------------- */
5538 struct MusicPrefixInfo music_prefix_info[NUM_MUSIC_PREFIXES + 1] =
5540 { "background", TRUE },
5546 /* ========================================================================= */
5548 /* ========================================================================= */
5550 static void print_usage()
5553 "Usage: %s [OPTION]... [HOSTNAME [PORT]]\n"
5556 " -d, --display HOSTNAME[:SCREEN] specify X server display\n"
5557 " -b, --basepath DIRECTORY alternative base DIRECTORY\n"
5558 " -l, --level DIRECTORY alternative level DIRECTORY\n"
5559 " -g, --graphics DIRECTORY alternative graphics DIRECTORY\n"
5560 " -s, --sounds DIRECTORY alternative sounds DIRECTORY\n"
5561 " -m, --music DIRECTORY alternative music DIRECTORY\n"
5562 " -n, --network network multiplayer game\n"
5563 " --serveronly only start network server\n"
5564 " -v, --verbose verbose mode\n"
5565 " -V, --version show program version\n"
5566 " --debug display debugging information\n"
5567 " -e, --execute COMMAND execute batch COMMAND\n"
5569 "Valid commands for '--execute' option:\n"
5570 " \"print graphicsinfo.conf\" print default graphics config\n"
5571 " \"print soundsinfo.conf\" print default sounds config\n"
5572 " \"print musicinfo.conf\" print default music config\n"
5573 " \"print editorsetup.conf\" print default editor config\n"
5574 " \"print helpanim.conf\" print default helpanim config\n"
5575 " \"print helptext.conf\" print default helptext config\n"
5576 " \"dump level FILE\" dump level data from FILE\n"
5577 " \"dump tape FILE\" dump tape data from FILE\n"
5578 " \"autoplay LEVELDIR [NR ...]\" play level tapes for LEVELDIR\n"
5579 " \"convert LEVELDIR [NR]\" convert levels in LEVELDIR\n"
5580 " \"create images DIRECTORY\" write BMP images to DIRECTORY\n"
5581 " \"create CE image DIRECTORY\" write BMP image to DIRECTORY\n"
5583 program.command_basename);
5586 static void print_version()
5588 Print("%s %d.%d.%d.%d\n",
5589 PROGRAM_TITLE_STRING,
5590 PROGRAM_VERSION_MAJOR,
5591 PROGRAM_VERSION_MINOR,
5592 PROGRAM_VERSION_PATCH,
5593 PROGRAM_VERSION_BUILD);
5597 SDL_version sdl_version;
5599 SDL_VERSION(&sdl_version);
5600 Print("- SDL %d.%d.%d\n",
5605 SDL_IMAGE_VERSION(&sdl_version);
5606 Print("- SDL_image %d.%d.%d\n",
5611 SDL_MIXER_VERSION(&sdl_version);
5612 Print("- SDL_mixer %d.%d.%d\n",
5617 SDL_NET_VERSION(&sdl_version);
5618 Print("- SDL_net %d.%d.%d\n",
5625 static void InitProgramConfig(char *command_filename)
5627 char *command_basename = getBaseName(command_filename);
5628 char *config_filename = getProgramConfigFilename(command_filename);
5629 char *program_title = PROGRAM_TITLE_STRING;
5630 char *program_icon_file = PROGRAM_ICON_FILENAME;
5631 char *userdata_subdir;
5632 char *userdata_subdir_unix;
5634 // read default program config, if existing
5635 if (fileExists(config_filename))
5636 LoadSetupFromFilename(config_filename);
5638 // set program title from potentially redefined program title
5639 if (setup.internal.program_title != NULL &&
5640 strlen(setup.internal.program_title) > 0)
5641 program_title = getStringCopy(setup.internal.program_title);
5643 // set program icon file from potentially redefined program icon file
5644 if (setup.internal.program_icon_file != NULL &&
5645 strlen(setup.internal.program_icon_file) > 0)
5646 program_icon_file = getStringCopy(setup.internal.program_icon_file);
5648 // strip trailing executable suffix from command basename
5649 if (strSuffix(command_basename, ".exe"))
5650 command_basename[strlen(command_basename) - 4] = '\0';
5652 userdata_subdir_unix = getStringCat2(".", command_basename);
5654 #if defined(PLATFORM_WIN32) || defined(PLATFORM_MACOSX)
5655 userdata_subdir = program_title;
5656 #elif defined(PLATFORM_UNIX)
5657 userdata_subdir = userdata_subdir_unix;
5659 userdata_subdir = USERDATA_DIRECTORY_OTHER;
5662 InitProgramInfo(command_filename,
5665 userdata_subdir_unix,
5670 GAME_VERSION_ACTUAL);
5673 int main(int argc, char *argv[])
5675 InitProgramConfig(argv[0]);
5677 InitWindowTitleFunction(getWindowTitleString);
5678 InitExitMessageFunction(DisplayExitMessage);
5679 InitExitFunction(CloseAllAndExit);
5680 InitPlatformDependentStuff();
5682 GetOptions(argv, print_usage, print_version);
5688 return 0; /* to keep compilers happy */