1 /***********************************************************
2 * Rocks'n'Diamonds -- McDuffin Strikes Back! *
3 *----------------------------------------------------------*
4 * (c) 1995-2006 Artsoft Entertainment *
6 * Detmolder Strasse 189 *
9 * e-mail: info@artsoft.org *
10 *----------------------------------------------------------*
12 ***********************************************************/
14 #include "libgame/libgame.h"
23 Bitmap *bitmap_db_cross;
24 Bitmap *bitmap_db_field;
25 Bitmap *bitmap_db_panel;
26 Bitmap *bitmap_db_door;
27 DrawBuffer *fieldbuffer;
28 DrawBuffer *drawto_field;
31 boolean level_editor_test_game = FALSE;
32 boolean network_playing = FALSE;
34 #if defined(TARGET_SDL)
35 boolean network_server = FALSE;
36 SDL_Thread *server_thread;
39 int key_joystick_mapping = 0;
41 boolean redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE];
42 int redraw_x1 = 0, redraw_y1 = 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];
78 int lev_fieldx, lev_fieldy;
79 int scroll_x, scroll_y;
83 int ScreenMovDir = MV_NONE, ScreenMovPos = 0;
85 int BorderElement = EL_STEELWALL;
86 int GameFrameDelay = GAME_FRAME_DELAY;
87 int FfwdFrameDelay = FFWD_FRAME_DELAY;
89 int BX2 = SCR_FIELDX - 1, BY2 = SCR_FIELDY - 1;
90 int SBX_Left, SBX_Right;
91 int SBY_Upper, SBY_Lower;
96 int TimeFrames, TimePlayed, TimeLeft, TapeTime;
98 boolean network_player_action_received = FALSE;
100 struct LevelSetInfo levelset;
101 struct LevelInfo level, level_template;
102 struct PlayerInfo stored_player[MAX_PLAYERS], *local_player = NULL;
103 struct HiScore highscore[MAX_SCORE_ENTRIES];
104 struct TapeInfo tape;
105 struct SetupInfo setup;
106 struct GameInfo game;
107 struct GlobalInfo global;
108 struct BorderInfo border;
109 struct TitleInfo title;
110 struct TitleMessageInfo titlemessage[MAX_NUM_TITLE_MESSAGES];
111 struct TitleMessageInfo titlemessage_initial[MAX_NUM_TITLE_MESSAGES];
112 struct MenuInfo menu;
113 struct DoorInfo door_1, door_2;
114 struct PreviewInfo preview;
115 struct GraphicInfo *graphic_info = NULL;
116 struct SoundInfo *sound_info = NULL;
117 struct MusicInfo *music_info = NULL;
118 struct MusicFileInfo *music_file_info = NULL;
119 struct HelpAnimInfo *helpanim_info = NULL;
120 SetupFileHash *helptext_info = NULL;
123 /* ------------------------------------------------------------------------- */
124 /* element definitions */
125 /* ------------------------------------------------------------------------- */
127 struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1];
129 /* this contains predefined structure elements to initialize "element_info" */
130 struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
132 /* keyword to start parser: "ELEMENT_INFO_START" <-- do not change! */
134 /* ----------------------------------------------------------------------- */
135 /* "real" level file elements */
136 /* ----------------------------------------------------------------------- */
186 "bug (random start direction)"
191 "spaceship (random start direction)"
196 "yam yam (random start direction)"
226 "quicksand (with rock)"
256 "dropping amoeba (EM style)"
271 "Conway's wall of life"
294 "robot_wheel.active",
296 "magic wheel (running)"
341 "gray door (opened by key 1)"
346 "gray door (opened by key 2)"
351 "gray door (opened by key 3)"
356 "gray door (opened by key 4)"
366 "pac man (random start direction)"
371 "invisible normal wall"
396 "amoeba with content"
416 "growing wall (horizontal, visible)"
431 "wall with BD style diamond"
434 "wall_emerald_yellow",
436 "wall with yellow emerald"
446 "magic wall (BD style)"
449 "invisible_steelwall",
451 "invisible steel wall"
454 "sokoban_field_player",
456 "sokoban field with player"
459 "dynabomb_increase_number",
461 "increases number of bombs"
464 "dynabomb_increase_size",
466 "increases explosion size"
469 "dynabomb_increase_power",
471 "increases power of explosion"
479 "sokoban_field_empty",
481 "sokoban empty field"
484 "sokoban_field_full",
486 "sokoban field with object"
489 "bd_butterfly.right",
491 "butterfly (starts moving right)"},
495 "butterfly (starts moving up)"
500 "butterfly (starts moving left)"},
504 "butterfly (starts moving down)"},
508 "firefly (starts moving right)"
513 "firefly (starts moving up)"
518 "firefly (starts moving left)"
523 "firefly (starts moving down)"
528 "butterfly (random start direction)"
533 "firefly (random start direction)"
558 "bug (starts moving right)"
563 "bug (starts moving up)"
568 "bug (starts moving left)"
573 "bug (starts moving down)"
578 "spaceship (starts moving right)"},
582 "spaceship (starts moving up)"
587 "spaceship (starts moving left)"},
591 "spaceship (starts moving down)"},
595 "pac man (starts moving right)"
600 "pac man (starts moving up)"
605 "pac man (starts moving left)"
610 "pac man (starts moving down)"
625 "wall with red emerald"
628 "wall_emerald_purple",
630 "wall with purple emerald"
635 "acid pool (top left)"
638 "acid_pool_topright",
640 "acid pool (top right)"
643 "acid_pool_bottomleft",
645 "acid pool (bottom left)"
653 "acid_pool_bottomright",
655 "acid pool (bottom right)"
660 "normal wall (BD style)"
685 "mole (random start direction)"
725 "fire breathing dragon"
728 "em_key_1_file_obsolete",
1038 "char_bracketright",
1133 "expandable_wall_horizontal",
1135 "growing wall (horizontal)"
1138 "expandable_wall_vertical",
1140 "growing wall (vertical)"
1143 "expandable_wall_any",
1145 "growing wall (any direction)"
1168 "em_key_2_file_obsolete",
1173 "em_key_3_file_obsolete",
1178 "em_key_4_file_obsolete",
1230 "port (leading right)"
1235 "port (leading down)"
1240 "port (leading left)"
1248 "sp_gravity_port_right",
1250 "gravity port (leading right)"
1253 "sp_gravity_port_down",
1255 "gravity port (leading down)"
1258 "sp_gravity_port_left",
1260 "gravity port (leading left)"
1263 "sp_gravity_port_up",
1265 "gravity port (leading up)"
1293 "sp_port_horizontal",
1300 "port (any direction)"
1323 "sp_hardware_base_1",
1328 "sp_hardware_green",
1343 "sp_hardware_yellow",
1348 "sp_hardware_base_2",
1353 "sp_hardware_base_3",
1358 "sp_hardware_base_4",
1363 "sp_hardware_base_5",
1368 "sp_hardware_base_6",
1385 "gray door (EM style, key 1)"
1390 "gray door (EM style, key 2)"
1395 "gray door (EM style, key 3)"
1400 "gray door (EM style, key 4)"
1405 "dynamite (EM style)"
1408 "em_dynamite.active",
1410 "burning dynamite (EM style)"
1438 "dc_gate_white_gray",
1440 "gray door (opened by white key)"
1460 "switch gate (open)"
1463 "switchgate_closed",
1465 "switch gate (closed)"
1468 "switchgate_switch_up",
1469 "switchgate_switch",
1470 "switch for switch gate"
1473 "switchgate_switch_down",
1474 "switchgate_switch",
1475 "switch for switch gate"
1488 "conveyor_belt_1_left",
1490 "conveyor belt 1 (left)"
1493 "conveyor_belt_1_middle",
1495 "conveyor belt 1 (middle)"
1498 "conveyor_belt_1_right",
1500 "conveyor belt 1 (right)"
1503 "conveyor_belt_1_switch_left",
1504 "conveyor_belt_switch",
1505 "switch for conveyor belt 1 (left)"
1508 "conveyor_belt_1_switch_middle",
1509 "conveyor_belt_switch",
1510 "switch for conveyor belt 1 (middle)"
1513 "conveyor_belt_1_switch_right",
1514 "conveyor_belt_switch",
1515 "switch for conveyor belt 1 (right)"
1518 "conveyor_belt_2_left",
1520 "conveyor belt 2 (left)"
1523 "conveyor_belt_2_middle",
1525 "conveyor belt 2 (middle)"
1528 "conveyor_belt_2_right",
1530 "conveyor belt 2 (right)"
1533 "conveyor_belt_2_switch_left",
1534 "conveyor_belt_switch",
1535 "switch for conveyor belt 2 (left)"
1538 "conveyor_belt_2_switch_middle",
1539 "conveyor_belt_switch",
1540 "switch for conveyor belt 2 (middle)"
1543 "conveyor_belt_2_switch_right",
1544 "conveyor_belt_switch",
1545 "switch for conveyor belt 2 (right)"
1548 "conveyor_belt_3_left",
1550 "conveyor belt 3 (left)"
1553 "conveyor_belt_3_middle",
1555 "conveyor belt 3 (middle)"
1558 "conveyor_belt_3_right",
1560 "conveyor belt 3 (right)"
1563 "conveyor_belt_3_switch_left",
1564 "conveyor_belt_switch",
1565 "switch for conveyor belt 3 (left)"
1568 "conveyor_belt_3_switch_middle",
1569 "conveyor_belt_switch",
1570 "switch for conveyor belt 3 (middle)"
1573 "conveyor_belt_3_switch_right",
1574 "conveyor_belt_switch",
1575 "switch for conveyor belt 3 (right)"
1578 "conveyor_belt_4_left",
1580 "conveyor belt 4 (left)"
1583 "conveyor_belt_4_middle",
1585 "conveyor belt 4 (middle)"
1588 "conveyor_belt_4_right",
1590 "conveyor belt 4 (right)"
1593 "conveyor_belt_4_switch_left",
1594 "conveyor_belt_switch",
1595 "switch for conveyor belt 4 (left)"
1598 "conveyor_belt_4_switch_middle",
1599 "conveyor_belt_switch",
1600 "switch for conveyor belt 4 (middle)"
1603 "conveyor_belt_4_switch_right",
1604 "conveyor_belt_switch",
1605 "switch for conveyor belt 4 (right)"
1610 "land mine (not removable)"
1613 "envelope_obsolete",
1615 "envelope (OBSOLETE)"
1620 "light switch (off)"
1623 "light_switch.active",
1630 "sign (exclamation)"
1633 "sign_radioactivity",
1635 "sign (radio activity)"
1645 "sign (wheel chair)"
1668 "sign_entry_forbidden",
1670 "sign (entry forbidden)"
1673 "sign_emergency_exit",
1675 "sign (emergency exit)"
1690 "mole (starts moving left)"
1695 "mole (starts moving right)"
1700 "mole (starts moving up)"
1705 "mole (starts moving down)"
1708 "steelwall_slippery",
1710 "slippery steel wall"
1720 "dx unknown element 15"
1725 "dx unknown element 42"
1740 "shield (deadly, kills enemies)"
1750 "time gate (closed)"
1753 "timegate_switch.active",
1755 "switch for time gate"
1760 "switch for time gate"
1768 "balloon_switch_left",
1770 "wind switch (left)"
1773 "balloon_switch_right",
1775 "wind switch (right)"
1778 "balloon_switch_up",
1783 "balloon_switch_down",
1785 "wind switch (down)"
1788 "balloon_switch_any",
1790 "wind switch (any direction)"
1855 "tube (any direction)"
1868 "tube_vertical_left",
1870 "tube (vertical & left)"
1873 "tube_vertical_right",
1875 "tube (vertical & right)"
1878 "tube_horizontal_up",
1880 "tube (horizontal & up)"
1883 "tube_horizontal_down",
1885 "tube (horizontal & down)"
1895 "tube (left & down)"
1905 "tube (right & down)"
1920 "stable bomb (DX style)"
2430 "custom element 100"
2435 "custom element 101"
2440 "custom element 102"
2445 "custom element 103"
2450 "custom element 104"
2455 "custom element 105"
2460 "custom element 106"
2465 "custom element 107"
2470 "custom element 108"
2475 "custom element 109"
2480 "custom element 110"
2485 "custom element 111"
2490 "custom element 112"
2495 "custom element 113"
2500 "custom element 114"
2505 "custom element 115"
2510 "custom element 116"
2515 "custom element 117"
2520 "custom element 118"
2525 "custom element 119"
2530 "custom element 120"
2535 "custom element 121"
2540 "custom element 122"
2545 "custom element 123"
2550 "custom element 124"
2555 "custom element 125"
2560 "custom element 126"
2565 "custom element 127"
2570 "custom element 128"
2575 "custom element 129"
2580 "custom element 130"
2585 "custom element 131"
2590 "custom element 132"
2595 "custom element 133"
2600 "custom element 134"
2605 "custom element 135"
2610 "custom element 136"
2615 "custom element 137"
2620 "custom element 138"
2625 "custom element 139"
2630 "custom element 140"
2635 "custom element 141"
2640 "custom element 142"
2645 "custom element 143"
2650 "custom element 144"
2655 "custom element 145"
2660 "custom element 146"
2665 "custom element 147"
2670 "custom element 148"
2675 "custom element 149"
2680 "custom element 150"
2685 "custom element 151"
2690 "custom element 152"
2695 "custom element 153"
2700 "custom element 154"
2705 "custom element 155"
2710 "custom element 156"
2715 "custom element 157"
2720 "custom element 158"
2725 "custom element 159"
2730 "custom element 160"
2735 "custom element 161"
2740 "custom element 162"
2745 "custom element 163"
2750 "custom element 164"
2755 "custom element 165"
2760 "custom element 166"
2765 "custom element 167"
2770 "custom element 168"
2775 "custom element 169"
2780 "custom element 170"
2785 "custom element 171"
2790 "custom element 172"
2795 "custom element 173"
2800 "custom element 174"
2805 "custom element 175"
2810 "custom element 176"
2815 "custom element 177"
2820 "custom element 178"
2825 "custom element 179"
2830 "custom element 180"
2835 "custom element 181"
2840 "custom element 182"
2845 "custom element 183"
2850 "custom element 184"
2855 "custom element 185"
2860 "custom element 186"
2865 "custom element 187"
2870 "custom element 188"
2875 "custom element 189"
2880 "custom element 190"
2885 "custom element 191"
2890 "custom element 192"
2895 "custom element 193"
2900 "custom element 194"
2905 "custom element 195"
2910 "custom element 196"
2915 "custom element 197"
2920 "custom element 198"
2925 "custom element 199"
2930 "custom element 200"
2935 "custom element 201"
2940 "custom element 202"
2945 "custom element 203"
2950 "custom element 204"
2955 "custom element 205"
2960 "custom element 206"
2965 "custom element 207"
2970 "custom element 208"
2975 "custom element 209"
2980 "custom element 210"
2985 "custom element 211"
2990 "custom element 212"
2995 "custom element 213"
3000 "custom element 214"
3005 "custom element 215"
3010 "custom element 216"
3015 "custom element 217"
3020 "custom element 218"
3025 "custom element 219"
3030 "custom element 220"
3035 "custom element 221"
3040 "custom element 222"
3045 "custom element 223"
3050 "custom element 224"
3055 "custom element 225"
3060 "custom element 226"
3065 "custom element 227"
3070 "custom element 228"
3075 "custom element 229"
3080 "custom element 230"
3085 "custom element 231"
3090 "custom element 232"
3095 "custom element 233"
3100 "custom element 234"
3105 "custom element 235"
3110 "custom element 236"
3115 "custom element 237"
3120 "custom element 238"
3125 "custom element 239"
3130 "custom element 240"
3135 "custom element 241"
3140 "custom element 242"
3145 "custom element 243"
3150 "custom element 244"
3155 "custom element 245"
3160 "custom element 246"
3165 "custom element 247"
3170 "custom element 248"
3175 "custom element 249"
3180 "custom element 250"
3185 "custom element 251"
3190 "custom element 252"
3195 "custom element 253"
3200 "custom element 254"
3205 "custom element 255"
3210 "custom element 256"
3420 "element triggering change"
3425 "player triggering change"
3428 "sp_gravity_on_port_right",
3430 "gravity on port (leading right)"
3433 "sp_gravity_on_port_down",
3435 "gravity on port (leading down)"
3438 "sp_gravity_on_port_left",
3440 "gravity on port (leading left)"
3443 "sp_gravity_on_port_up",
3445 "gravity on port (leading up)"
3448 "sp_gravity_off_port_right",
3450 "gravity off port (leading right)"
3453 "sp_gravity_off_port_down",
3455 "gravity off port (leading down)"
3458 "sp_gravity_off_port_left",
3460 "gravity off port (leading left)"
3463 "sp_gravity_off_port_up",
3465 "gravity off port (leading up)"
3468 "balloon_switch_none",
3475 "door 5 (EMC style)",
3480 "door 6 (EMC style)",
3485 "door 7 (EMC style)",
3490 "door 8 (EMC style)",
3495 "gray door (EMC style, key 5)",
3500 "gray door (EMC style, key 6)",
3505 "gray door (EMC style, key 7)",
3510 "gray door (EMC style, key 8)",
3515 "key 5 (EMC style)",
3520 "key 6 (EMC style)",
3525 "key 7 (EMC style)",
3530 "key 8 (EMC style)",
3548 "emc_magic_ball.active",
3550 "magic ball (activated)",
3553 "emc_magic_ball_switch",
3554 "emc_magic_ball_switch",
3555 "magic ball switch (off)",
3558 "emc_magic_ball_switch.active",
3559 "emc_magic_ball_switch",
3560 "magic ball switch (on)",
3563 "emc_spring_bumper",
3564 "emc_spring_bumper",
3623 "emc_wall_slippery_1",
3628 "emc_wall_slippery_2",
3633 "emc_wall_slippery_3",
3638 "emc_wall_slippery_4",
3660 "CE value of element triggering change"
3665 "CE score of element triggering change"
3670 "CE value of current element"
3675 "CE score of current element"
3680 "yam yam (starts moving left)"
3685 "yam yam (starts moving right)"
3690 "yam yam (starts moving up)"
3695 "yam yam (starts moving down)"
3698 "bd_expandable_wall",
3700 "growing wall (horizontal, BD style)"
3705 "CE 8 positions earlier in list"
3710 "CE 7 positions earlier in list"
3715 "CE 6 positions earlier in list"
3720 "CE 5 positions earlier in list"
3725 "CE 4 positions earlier in list"
3730 "CE 3 positions earlier in list"
3735 "CE 2 positions earlier in list"
3740 "CE 1 position earlier in list"
3745 "the current custom element"
3750 "CE 1 position later in list"
3755 "CE 2 positions later in list"
3760 "CE 3 positions later in list"
3765 "CE 4 positions later in list"
3770 "CE 5 positions later in list"
3775 "CE 6 positions later in list"
3780 "CE 7 positions later in list"
3785 "CE 8 positions later in list"
3790 "this element matches any element"
3798 "steel_char_exclam",
3803 "steel_char_quotedbl",
3808 "steel_char_numbersign",
3813 "steel_char_dollar",
3818 "steel_char_percent",
3823 "steel_char_ampersand",
3828 "steel_char_apostrophe",
3833 "steel_char_parenleft",
3838 "steel_char_parenright",
3843 "steel_char_asterisk",
3863 "steel_char_period",
3928 "steel_char_semicolon",
3943 "steel_char_greater",
3948 "steel_char_question",
4088 "steel_char_bracketleft",
4093 "steel_char_backslash",
4098 "steel_char_bracketright",
4103 "steel_char_asciicircum",
4108 "steel_char_underscore",
4113 "steel_char_copyright",
4118 "steel_char_aumlaut",
4123 "steel_char_oumlaut",
4128 "steel_char_uumlaut",
4133 "steel_char_degree",
4138 "steel_char_trademark",
4143 "steel_char_cursor",
4148 "steel_char_unused",
4153 "steel_char_unused",
4158 "steel_char_unused",
4163 "steel_char_unused",
4168 "steel_char_unused",
4173 "steel_char_unused",
4178 "steel_char_unused",
4180 "steel letter 'button'"
4183 "steel_char_unused",
4188 "steel_char_unused",
4190 "steel letter 'down'"
4243 "steel_exit_closed",
4253 "dc_steelwall_1_left",
4258 "dc_steelwall_1_right",
4260 "steel wall (right)"
4263 "dc_steelwall_1_top",
4268 "dc_steelwall_1_bottom",
4270 "steel wall (bottom)"
4273 "dc_steelwall_1_horizontal",
4275 "steel wall (top/bottom)"
4278 "dc_steelwall_1_vertical",
4280 "steel wall (left/right)"
4283 "dc_steelwall_1_topleft",
4285 "steel wall (top/left)"
4288 "dc_steelwall_1_topright",
4290 "steel wall (top/right)"
4293 "dc_steelwall_1_bottomleft",
4295 "steel wall (bottom/left)"
4298 "dc_steelwall_1_bottomright",
4300 "steel wall (bottom/right)"
4303 "dc_steelwall_1_topleft_2",
4305 "steel wall (top/left corner)"
4308 "dc_steelwall_1_topright_2",
4310 "steel wall (top/right corner)"
4313 "dc_steelwall_1_bottomleft_2",
4315 "steel wall (bottom/left corner)"
4318 "dc_steelwall_1_bottomright_2",
4320 "steel wall (bottom/right corner)"
4323 "dc_steelwall_2_left",
4328 "dc_steelwall_2_right",
4330 "steel wall (right)"
4333 "dc_steelwall_2_top",
4338 "dc_steelwall_2_bottom",
4340 "steel wall (bottom)"
4343 "dc_steelwall_2_horizontal",
4345 "steel wall (horizontal)"
4348 "dc_steelwall_2_vertical",
4350 "steel wall (vertical)"
4353 "dc_steelwall_2_middle",
4355 "steel wall (middle)"
4358 "dc_steelwall_2_single",
4360 "steel wall (single)"
4363 "dc_switchgate_switch_up",
4364 "switchgate_switch",
4365 "switch for switch gate (steel)"
4368 "dc_switchgate_switch_down",
4369 "switchgate_switch",
4370 "switch for switch gate (steel)"
4373 "dc_timegate_switch",
4375 "switch for time gate (steel)"
4378 "dc_timegate_switch.active",
4380 "switch for time gate (steel)"
4385 "land mine (DC style, removable)"
4388 "expandable_steelwall",
4390 "growing steel wall"
4393 "expandable_steelwall_horizontal",
4395 "growing steel wall (horizontal)"
4398 "expandable_steelwall_vertical",
4400 "growing steel wall (vertical)"
4403 "expandable_steelwall_any",
4405 "growing steel wall (any direction)"
4410 "closed exit (EM style)"
4415 "open exit (EM style)"
4418 "em_steel_exit_closed",
4420 "closed steel exit (EM style)"
4423 "em_steel_exit_open",
4425 "open steel exit (EM style)"
4428 "dc_gate_fake_gray",
4430 "gray door (opened by no key)"
4435 "magic wall (DC style)"
4438 "quicksand_fast_empty",
4440 "fast quicksand (empty)"
4443 "quicksand_fast_full",
4445 "fast quicksand (with rock)"
4448 /* ----------------------------------------------------------------------- */
4449 /* "real" (and therefore drawable) runtime elements */
4450 /* ----------------------------------------------------------------------- */
4453 "dynabomb_player_1.active",
4458 "dynabomb_player_2.active",
4463 "dynabomb_player_3.active",
4468 "dynabomb_player_4.active",
4473 "sp_disk_red.active",
4478 "switchgate.opening",
4483 "switchgate.closing",
4508 "invisible_steelwall.active",
4513 "invisible_wall.active",
4518 "invisible_sand.active",
4523 "conveyor_belt_1_left.active",
4528 "conveyor_belt_1_middle.active",
4533 "conveyor_belt_1_right.active",
4538 "conveyor_belt_2_left.active",
4543 "conveyor_belt_2_middle.active",
4548 "conveyor_belt_2_right.active",
4553 "conveyor_belt_3_left.active",
4558 "conveyor_belt_3_middle.active",
4563 "conveyor_belt_3_right.active",
4568 "conveyor_belt_4_left.active",
4573 "conveyor_belt_4_middle.active",
4578 "conveyor_belt_4_right.active",
4593 "steel_exit.opening",
4598 "steel_exit.closing",
4613 "em_steel_exit.opening",
4618 "em_steel_exit.closing",
4638 "sp_terminal.active",
4643 "sp_buggy_base.activating",
4648 "sp_buggy_base.active",
4663 "quicksand.emptying",
4668 "quicksand_fast.emptying",
4673 "magic_wall.active",
4678 "bd_magic_wall.active",
4683 "dc_magic_wall.active",
4693 "bd_magic_wall_full",
4698 "dc_magic_wall_full",
4703 "magic_wall.emptying",
4708 "bd_magic_wall.emptying",
4713 "dc_magic_wall.emptying",
4723 "bd_magic_wall_dead",
4728 "dc_magic_wall_dead",
4734 "emc_fake_grass.active",
4739 "gate_1_gray.active",
4744 "gate_2_gray.active",
4749 "gate_3_gray.active",
4754 "gate_4_gray.active",
4759 "em_gate_1_gray.active",
4764 "em_gate_2_gray.active",
4769 "em_gate_3_gray.active",
4774 "em_gate_4_gray.active",
4779 "emc_gate_5_gray.active",
4784 "emc_gate_6_gray.active",
4789 "emc_gate_7_gray.active",
4794 "emc_gate_8_gray.active",
4799 "dc_gate_white_gray.active",
4804 "emc_dripper.active",
4809 "emc_spring_bumper.active",
4810 "emc_spring_bumper",
4814 /* ----------------------------------------------------------------------- */
4815 /* "unreal" (and therefore not drawable) runtime elements */
4816 /* ----------------------------------------------------------------------- */
4844 "acid_splash_right",
4859 "expandable_wall.growing",
4864 "expandable_steelwall.growing",
4874 "player_is_leaving",
4879 "player_is_exploding_1",
4884 "player_is_exploding_2",
4889 "player_is_exploding_3",
4894 "player_is_exploding_4",
4899 "quicksand.filling",
4904 "quicksand_fast.filling",
4909 "magic_wall.filling",
4914 "bd_magic_wall.filling",
4919 "dc_magic_wall.filling",
4929 "diagonal.shrinking",
4939 /* ----------------------------------------------------------------------- */
4940 /* dummy elements (never used as game elements, only used as graphics) */
4941 /* ----------------------------------------------------------------------- */
4944 "steelwall_topleft",
4949 "steelwall_topright",
4954 "steelwall_bottomleft",
4959 "steelwall_bottomright",
4964 "steelwall_horizontal",
4969 "steelwall_vertical",
4974 "invisible_steelwall_topleft",
4979 "invisible_steelwall_topright",
4984 "invisible_steelwall_bottomleft",
4989 "invisible_steelwall_bottomright",
4994 "invisible_steelwall_horizontal",
4999 "invisible_steelwall_vertical",
5014 "dynabomb_player_1",
5019 "dynabomb_player_2",
5024 "dynabomb_player_3",
5029 "dynabomb_player_4",
5034 "shield_normal.active",
5039 "shield_deadly.active",
5069 "internal_clipboard_custom",
5071 "empty custom element"
5074 "internal_clipboard_change",
5079 "internal_clipboard_group",
5081 "empty group element"
5089 "internal_cascade_bd",
5091 "show Boulder Dash elements"
5094 "internal_cascade_bd.active",
5096 "hide Boulder Dash elements"
5099 "internal_cascade_em",
5101 "show Emerald Mine elements"
5104 "internal_cascade_em.active",
5106 "hide Emerald Mine elements"
5109 "internal_cascade_emc",
5111 "show Emerald Mine Club elements"
5114 "internal_cascade_emc.active",
5116 "hide Emerald Mine Club elements"
5119 "internal_cascade_rnd",
5121 "show Rocks'n'Diamonds elements"
5124 "internal_cascade_rnd.active",
5126 "hide Rocks'n'Diamonds elements"
5129 "internal_cascade_sb",
5131 "show Sokoban elements"
5134 "internal_cascade_sb.active",
5136 "hide Sokoban elements"
5139 "internal_cascade_sp",
5141 "show Supaplex elements"
5144 "internal_cascade_sp.active",
5146 "hide Supaplex elements"
5149 "internal_cascade_dc",
5151 "show Diamond Caves II elements"
5154 "internal_cascade_dc.active",
5156 "hide Diamond Caves II elements"
5159 "internal_cascade_dx",
5161 "show DX Boulderdash elements"
5164 "internal_cascade_dx.active",
5166 "hide DX Boulderdash elements"
5169 "internal_cascade_chars",
5171 "show text elements"
5174 "internal_cascade_chars.active",
5176 "hide text elements"
5179 "internal_cascade_steel_chars",
5181 "show steel text elements"
5184 "internal_cascade_steel_chars.active",
5186 "hide steel text elements"
5189 "internal_cascade_ce",
5191 "show custom elements"
5194 "internal_cascade_ce.active",
5196 "hide custom elements"
5199 "internal_cascade_ge",
5201 "show group elements"
5204 "internal_cascade_ge.active",
5206 "hide group elements"
5209 "internal_cascade_ref",
5211 "show reference elements"
5214 "internal_cascade_ref.active",
5216 "hide reference elements"
5219 "internal_cascade_user",
5221 "show user defined elements"
5224 "internal_cascade_user.active",
5226 "hide user defined elements"
5229 "internal_cascade_dynamic",
5231 "show elements used in this level"
5234 "internal_cascade_dynamic.active",
5236 "hide elements used in this level"
5239 /* keyword to stop parser: "ELEMENT_INFO_END" <-- do not change! */
5249 /* ------------------------------------------------------------------------- */
5250 /* element action and direction definitions */
5251 /* ------------------------------------------------------------------------- */
5253 struct ElementActionInfo element_action_info[NUM_ACTIONS + 1 + 1] =
5255 { ".[DEFAULT]", ACTION_DEFAULT, TRUE },
5256 { ".waiting", ACTION_WAITING, TRUE },
5257 { ".falling", ACTION_FALLING, TRUE },
5258 { ".moving", ACTION_MOVING, TRUE },
5259 { ".digging", ACTION_DIGGING, FALSE },
5260 { ".snapping", ACTION_SNAPPING, FALSE },
5261 { ".collecting", ACTION_COLLECTING, FALSE },
5262 { ".dropping", ACTION_DROPPING, FALSE },
5263 { ".pushing", ACTION_PUSHING, FALSE },
5264 { ".walking", ACTION_WALKING, FALSE },
5265 { ".passing", ACTION_PASSING, FALSE },
5266 { ".impact", ACTION_IMPACT, FALSE },
5267 { ".breaking", ACTION_BREAKING, FALSE },
5268 { ".activating", ACTION_ACTIVATING, FALSE },
5269 { ".deactivating", ACTION_DEACTIVATING, FALSE },
5270 { ".opening", ACTION_OPENING, FALSE },
5271 { ".closing", ACTION_CLOSING, FALSE },
5272 { ".attacking", ACTION_ATTACKING, TRUE },
5273 { ".growing", ACTION_GROWING, TRUE },
5274 { ".shrinking", ACTION_SHRINKING, FALSE },
5275 { ".active", ACTION_ACTIVE, TRUE },
5276 { ".filling", ACTION_FILLING, FALSE },
5277 { ".emptying", ACTION_EMPTYING, FALSE },
5278 { ".changing", ACTION_CHANGING, FALSE },
5279 { ".exploding", ACTION_EXPLODING, FALSE },
5280 { ".boring", ACTION_BORING, FALSE },
5281 { ".boring[1]", ACTION_BORING_1, FALSE },
5282 { ".boring[2]", ACTION_BORING_2, FALSE },
5283 { ".boring[3]", ACTION_BORING_3, FALSE },
5284 { ".boring[4]", ACTION_BORING_4, FALSE },
5285 { ".boring[5]", ACTION_BORING_5, FALSE },
5286 { ".boring[6]", ACTION_BORING_6, FALSE },
5287 { ".boring[7]", ACTION_BORING_7, FALSE },
5288 { ".boring[8]", ACTION_BORING_8, FALSE },
5289 { ".boring[9]", ACTION_BORING_9, FALSE },
5290 { ".boring[10]", ACTION_BORING_10, FALSE },
5291 { ".sleeping", ACTION_SLEEPING, FALSE },
5292 { ".sleeping[1]", ACTION_SLEEPING_1, FALSE },
5293 { ".sleeping[2]", ACTION_SLEEPING_2, FALSE },
5294 { ".sleeping[3]", ACTION_SLEEPING_3, FALSE },
5295 { ".awakening", ACTION_AWAKENING, FALSE },
5296 { ".dying", ACTION_DYING, FALSE },
5297 { ".turning", ACTION_TURNING, FALSE },
5298 { ".turning_from_left", ACTION_TURNING_FROM_LEFT, FALSE },
5299 { ".turning_from_right", ACTION_TURNING_FROM_RIGHT, FALSE },
5300 { ".turning_from_up", ACTION_TURNING_FROM_UP, FALSE },
5301 { ".turning_from_down", ACTION_TURNING_FROM_DOWN, FALSE },
5302 { ".smashed_by_rock", ACTION_SMASHED_BY_ROCK, FALSE },
5303 { ".smashed_by_spring", ACTION_SMASHED_BY_SPRING, FALSE },
5304 { ".eating", ACTION_EATING, FALSE },
5305 { ".twinkling", ACTION_TWINKLING, FALSE },
5306 { ".splashing", ACTION_SPLASHING, FALSE },
5307 { ".page[1]", ACTION_PAGE_1, FALSE },
5308 { ".page[2]", ACTION_PAGE_2, FALSE },
5309 { ".page[3]", ACTION_PAGE_3, FALSE },
5310 { ".page[4]", ACTION_PAGE_4, FALSE },
5311 { ".page[5]", ACTION_PAGE_5, FALSE },
5312 { ".page[6]", ACTION_PAGE_6, FALSE },
5313 { ".page[7]", ACTION_PAGE_7, FALSE },
5314 { ".page[8]", ACTION_PAGE_8, FALSE },
5315 { ".page[9]", ACTION_PAGE_9, FALSE },
5316 { ".page[10]", ACTION_PAGE_10, FALSE },
5317 { ".page[11]", ACTION_PAGE_11, FALSE },
5318 { ".page[12]", ACTION_PAGE_12, FALSE },
5319 { ".page[13]", ACTION_PAGE_13, FALSE },
5320 { ".page[14]", ACTION_PAGE_14, FALSE },
5321 { ".page[15]", ACTION_PAGE_15, FALSE },
5322 { ".page[16]", ACTION_PAGE_16, FALSE },
5323 { ".page[17]", ACTION_PAGE_17, FALSE },
5324 { ".page[18]", ACTION_PAGE_18, FALSE },
5325 { ".page[19]", ACTION_PAGE_19, FALSE },
5326 { ".page[20]", ACTION_PAGE_20, FALSE },
5327 { ".page[21]", ACTION_PAGE_21, FALSE },
5328 { ".page[22]", ACTION_PAGE_22, FALSE },
5329 { ".page[23]", ACTION_PAGE_23, FALSE },
5330 { ".page[24]", ACTION_PAGE_24, FALSE },
5331 { ".page[25]", ACTION_PAGE_25, FALSE },
5332 { ".page[26]", ACTION_PAGE_26, FALSE },
5333 { ".page[27]", ACTION_PAGE_27, FALSE },
5334 { ".page[28]", ACTION_PAGE_28, FALSE },
5335 { ".page[29]", ACTION_PAGE_29, FALSE },
5336 { ".page[30]", ACTION_PAGE_30, FALSE },
5337 { ".page[31]", ACTION_PAGE_31, FALSE },
5338 { ".page[32]", ACTION_PAGE_32, FALSE },
5339 { ".other", ACTION_OTHER, FALSE },
5341 /* empty suffix always matches -- check as last entry in InitSoundInfo() */
5342 { "", ACTION_DEFAULT, TRUE },
5347 struct ElementDirectionInfo element_direction_info[NUM_DIRECTIONS_FULL + 1] =
5349 { ".left", MV_BIT_LEFT },
5350 { ".right", MV_BIT_RIGHT },
5351 { ".up", MV_BIT_UP },
5352 { ".down", MV_BIT_DOWN },
5353 { ".upleft", MV_BIT_UP },
5354 { ".upright", MV_BIT_RIGHT },
5355 { ".downleft", MV_BIT_LEFT },
5356 { ".downright", MV_BIT_DOWN },
5361 struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1 + 1] =
5363 { ".[DEFAULT]", GFX_SPECIAL_ARG_DEFAULT, },
5364 { ".TITLE", GFX_SPECIAL_ARG_TITLE, },
5365 { ".MESSAGE", GFX_SPECIAL_ARG_MESSAGE, },
5366 { ".MAIN", GFX_SPECIAL_ARG_MAIN, },
5367 { ".LEVELS", GFX_SPECIAL_ARG_LEVELS },
5368 { ".SCORES", GFX_SPECIAL_ARG_SCORES, },
5369 { ".EDITOR", GFX_SPECIAL_ARG_EDITOR, },
5370 { ".INFO", GFX_SPECIAL_ARG_INFO, },
5371 { ".SETUP", GFX_SPECIAL_ARG_SETUP, },
5372 { ".PLAYING", GFX_SPECIAL_ARG_PLAYING, },
5373 { ".DOOR", GFX_SPECIAL_ARG_DOOR, },
5374 { ".PREVIEW", GFX_SPECIAL_ARG_PREVIEW, },
5375 { ".CRUMBLED", GFX_SPECIAL_ARG_CRUMBLED, },
5377 /* empty suffix always matches -- check as last entry in InitMusicInfo() */
5378 { "", GFX_SPECIAL_ARG_DEFAULT, },
5383 struct TokenIntPtrInfo image_config_vars[] =
5386 "titlemessage_initial_1.x",
5387 &titlemessage_initial[0].x
5390 "titlemessage_initial_1.y",
5391 &titlemessage_initial[0].y
5394 "titlemessage_initial_1.width",
5395 &titlemessage_initial[0].width
5398 "titlemessage_initial_1.height",
5399 &titlemessage_initial[0].height
5402 "titlemessage_initial_1.chars",
5403 &titlemessage_initial[0].chars
5406 "titlemessage_initial_1.lines",
5407 &titlemessage_initial[0].lines
5410 "titlemessage_initial_1.align",
5411 &titlemessage_initial[0].align
5414 "titlemessage_initial_1.autowrap",
5415 &titlemessage_initial[0].autowrap
5418 "titlemessage_initial_1.centered",
5419 &titlemessage_initial[0].centered
5422 "titlemessage_initial_1.skip_comments",
5423 &titlemessage_initial[0].skip_comments
5426 "titlemessage_initial_1.sort_priority",
5427 &titlemessage_initial[0].sort_priority
5430 "titlemessage_initial_2.x",
5431 &titlemessage_initial[1].x
5434 "titlemessage_initial_2.y",
5435 &titlemessage_initial[1].y
5438 "titlemessage_initial_2.width",
5439 &titlemessage_initial[1].width
5442 "titlemessage_initial_2.height",
5443 &titlemessage_initial[1].height
5446 "titlemessage_initial_2.chars",
5447 &titlemessage_initial[1].chars
5450 "titlemessage_initial_2.lines",
5451 &titlemessage_initial[1].lines
5454 "titlemessage_initial_2.align",
5455 &titlemessage_initial[1].align
5458 "titlemessage_initial_2.autowrap",
5459 &titlemessage_initial[1].autowrap
5462 "titlemessage_initial_2.centered",
5463 &titlemessage_initial[1].centered
5466 "titlemessage_initial_2.skip_comments",
5467 &titlemessage_initial[1].skip_comments
5470 "titlemessage_initial_2.sort_priority",
5471 &titlemessage_initial[1].sort_priority
5474 "titlemessage_initial_3.x",
5475 &titlemessage_initial[2].x
5478 "titlemessage_initial_3.y",
5479 &titlemessage_initial[2].y
5482 "titlemessage_initial_3.width",
5483 &titlemessage_initial[2].width
5486 "titlemessage_initial_3.height",
5487 &titlemessage_initial[2].height
5490 "titlemessage_initial_3.chars",
5491 &titlemessage_initial[2].chars
5494 "titlemessage_initial_3.lines",
5495 &titlemessage_initial[2].lines
5498 "titlemessage_initial_3.align",
5499 &titlemessage_initial[2].align
5502 "titlemessage_initial_3.autowrap",
5503 &titlemessage_initial[2].autowrap
5506 "titlemessage_initial_3.centered",
5507 &titlemessage_initial[2].centered
5510 "titlemessage_initial_3.skip_comments",
5511 &titlemessage_initial[2].skip_comments
5514 "titlemessage_initial_3.sort_priority",
5515 &titlemessage_initial[2].sort_priority
5518 "titlemessage_initial_4.x",
5519 &titlemessage_initial[3].x
5522 "titlemessage_initial_4.y",
5523 &titlemessage_initial[3].y
5526 "titlemessage_initial_4.width",
5527 &titlemessage_initial[3].width
5530 "titlemessage_initial_4.height",
5531 &titlemessage_initial[3].height
5534 "titlemessage_initial_4.chars",
5535 &titlemessage_initial[3].chars
5538 "titlemessage_initial_4.lines",
5539 &titlemessage_initial[3].lines
5542 "titlemessage_initial_4.align",
5543 &titlemessage_initial[3].align
5546 "titlemessage_initial_4.autowrap",
5547 &titlemessage_initial[3].autowrap
5550 "titlemessage_initial_4.centered",
5551 &titlemessage_initial[3].centered
5554 "titlemessage_initial_4.skip_comments",
5555 &titlemessage_initial[3].skip_comments
5558 "titlemessage_initial_4.sort_priority",
5559 &titlemessage_initial[3].sort_priority
5562 "titlemessage_initial_5.x",
5563 &titlemessage_initial[4].x
5566 "titlemessage_initial_5.y",
5567 &titlemessage_initial[4].y
5570 "titlemessage_initial_5.width",
5571 &titlemessage_initial[4].width
5574 "titlemessage_initial_5.height",
5575 &titlemessage_initial[4].height
5578 "titlemessage_initial_5.chars",
5579 &titlemessage_initial[4].chars
5582 "titlemessage_initial_5.lines",
5583 &titlemessage_initial[4].lines
5586 "titlemessage_initial_5.align",
5587 &titlemessage_initial[4].align
5590 "titlemessage_initial_5.autowrap",
5591 &titlemessage_initial[4].autowrap
5594 "titlemessage_initial_5.centered",
5595 &titlemessage_initial[4].centered
5598 "titlemessage_initial_5.skip_comments",
5599 &titlemessage_initial[4].skip_comments
5602 "titlemessage_initial_5.sort_priority",
5603 &titlemessage_initial[4].sort_priority
5614 "titlemessage_1.width",
5615 &titlemessage[0].width
5618 "titlemessage_1.height",
5619 &titlemessage[0].height
5622 "titlemessage_1.chars",
5623 &titlemessage[0].chars
5626 "titlemessage_1.lines",
5627 &titlemessage[0].lines
5630 "titlemessage_1.align",
5631 &titlemessage[0].align
5634 "titlemessage_1.autowrap",
5635 &titlemessage[0].autowrap
5638 "titlemessage_1.centered",
5639 &titlemessage[0].centered
5642 "titlemessage_1.skip_comments",
5643 &titlemessage[0].skip_comments
5646 "titlemessage_1.sort_priority",
5647 &titlemessage[0].sort_priority
5658 "titlemessage_2.width",
5659 &titlemessage[1].width
5662 "titlemessage_2.height",
5663 &titlemessage[1].height
5666 "titlemessage_2.chars",
5667 &titlemessage[1].chars
5670 "titlemessage_2.lines",
5671 &titlemessage[1].lines
5674 "titlemessage_2.align",
5675 &titlemessage[1].align
5678 "titlemessage_2.autowrap",
5679 &titlemessage[1].autowrap
5682 "titlemessage_2.centered",
5683 &titlemessage[1].centered
5686 "titlemessage_2.skip_comments",
5687 &titlemessage[1].skip_comments
5690 "titlemessage_2.sort_priority",
5691 &titlemessage[1].sort_priority
5702 "titlemessage_3.width",
5703 &titlemessage[2].width
5706 "titlemessage_3.height",
5707 &titlemessage[2].height
5710 "titlemessage_3.chars",
5711 &titlemessage[2].chars
5714 "titlemessage_3.lines",
5715 &titlemessage[2].lines
5718 "titlemessage_3.align",
5719 &titlemessage[2].align
5722 "titlemessage_3.autowrap",
5723 &titlemessage[2].autowrap
5726 "titlemessage_3.centered",
5727 &titlemessage[2].centered
5730 "titlemessage_3.skip_comments",
5731 &titlemessage[2].skip_comments
5734 "titlemessage_3.sort_priority",
5735 &titlemessage[2].sort_priority
5746 "titlemessage_4.width",
5747 &titlemessage[3].width
5750 "titlemessage_4.height",
5751 &titlemessage[3].height
5754 "titlemessage_4.chars",
5755 &titlemessage[3].chars
5758 "titlemessage_4.lines",
5759 &titlemessage[3].lines
5762 "titlemessage_4.align",
5763 &titlemessage[3].align
5766 "titlemessage_4.autowrap",
5767 &titlemessage[3].autowrap
5770 "titlemessage_4.centered",
5771 &titlemessage[3].centered
5774 "titlemessage_4.skip_comments",
5775 &titlemessage[3].skip_comments
5778 "titlemessage_4.sort_priority",
5779 &titlemessage[3].sort_priority
5790 "titlemessage_5.width",
5791 &titlemessage[4].width
5794 "titlemessage_5.height",
5795 &titlemessage[4].height
5798 "titlemessage_5.chars",
5799 &titlemessage[4].chars
5802 "titlemessage_5.lines",
5803 &titlemessage[4].lines
5806 "titlemessage_5.align",
5807 &titlemessage[4].align
5810 "titlemessage_5.autowrap",
5811 &titlemessage[4].autowrap
5814 "titlemessage_5.centered",
5815 &titlemessage[4].centered
5818 "titlemessage_5.skip_comments",
5819 &titlemessage[4].skip_comments
5822 "titlemessage_5.sort_priority",
5823 &titlemessage[4].sort_priority
5832 "border.draw_masked.TITLE",
5833 &border.draw_masked[GFX_SPECIAL_ARG_TITLE]
5836 "border.draw_masked.MAIN",
5837 &border.draw_masked[GFX_SPECIAL_ARG_MAIN]
5840 "border.draw_masked.LEVELS",
5841 &border.draw_masked[GFX_SPECIAL_ARG_LEVELS]
5844 "border.draw_masked.SCORES",
5845 &border.draw_masked[GFX_SPECIAL_ARG_SCORES]
5848 "border.draw_masked.EDITOR",
5849 &border.draw_masked[GFX_SPECIAL_ARG_EDITOR]
5852 "border.draw_masked.INFO",
5853 &border.draw_masked[GFX_SPECIAL_ARG_INFO]
5856 "border.draw_masked.SETUP",
5857 &border.draw_masked[GFX_SPECIAL_ARG_SETUP]
5860 "border.draw_masked.PLAYING",
5861 &border.draw_masked[GFX_SPECIAL_ARG_PLAYING]
5864 "border.draw_masked.DOOR",
5865 &border.draw_masked[GFX_SPECIAL_ARG_DOOR]
5895 "menu.draw_xoffset",
5896 &menu.draw_xoffset[GFX_SPECIAL_ARG_DEFAULT]
5899 "menu.draw_yoffset",
5900 &menu.draw_yoffset[GFX_SPECIAL_ARG_DEFAULT]
5903 "menu.draw_xoffset.MAIN",
5904 &menu.draw_xoffset[GFX_SPECIAL_ARG_MAIN]
5907 "menu.draw_yoffset.MAIN",
5908 &menu.draw_yoffset[GFX_SPECIAL_ARG_MAIN]
5911 "menu.draw_xoffset.LEVELS",
5912 &menu.draw_xoffset[GFX_SPECIAL_ARG_LEVELS]
5915 "menu.draw_yoffset.LEVELS",
5916 &menu.draw_yoffset[GFX_SPECIAL_ARG_LEVELS]
5919 "menu.draw_xoffset.SCORES",
5920 &menu.draw_xoffset[GFX_SPECIAL_ARG_SCORES]
5923 "menu.draw_yoffset.SCORES",
5924 &menu.draw_yoffset[GFX_SPECIAL_ARG_SCORES]
5927 "menu.draw_xoffset.EDITOR",
5928 &menu.draw_xoffset[GFX_SPECIAL_ARG_EDITOR]
5931 "menu.draw_yoffset.EDITOR",
5932 &menu.draw_yoffset[GFX_SPECIAL_ARG_EDITOR]
5935 "menu.draw_xoffset.INFO",
5936 &menu.draw_xoffset[GFX_SPECIAL_ARG_INFO]
5939 "menu.draw_yoffset.INFO",
5940 &menu.draw_yoffset[GFX_SPECIAL_ARG_INFO]
5943 "menu.draw_xoffset.INFO[ELEMENTS]",
5944 &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_ELEMENTS]
5947 "menu.draw_yoffset.INFO[ELEMENTS]",
5948 &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_ELEMENTS]
5951 "menu.draw_xoffset.INFO[MUSIC]",
5952 &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_MUSIC]
5955 "menu.draw_yoffset.INFO[MUSIC]",
5956 &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_MUSIC]
5959 "menu.draw_xoffset.INFO[CREDITS]",
5960 &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_CREDITS]
5963 "menu.draw_yoffset.INFO[CREDITS]",
5964 &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_CREDITS]
5967 "menu.draw_xoffset.INFO[PROGRAM]",
5968 &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_PROGRAM]
5971 "menu.draw_yoffset.INFO[PROGRAM]",
5972 &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_PROGRAM]
5975 "menu.draw_xoffset.INFO[VERSION]",
5976 &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_VERSION]
5979 "menu.draw_yoffset.INFO[VERSION]",
5980 &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_VERSION]
5983 "menu.draw_xoffset.INFO[LEVELSET]",
5984 &menu.draw_xoffset_info[GFX_SPECIAL_ARG_INFO_LEVELSET]
5987 "menu.draw_yoffset.INFO[LEVELSET]",
5988 &menu.draw_yoffset_info[GFX_SPECIAL_ARG_INFO_LEVELSET]
5991 "menu.draw_xoffset.SETUP",
5992 &menu.draw_xoffset[GFX_SPECIAL_ARG_SETUP]
5995 "menu.draw_yoffset.SETUP",
5996 &menu.draw_yoffset[GFX_SPECIAL_ARG_SETUP]
6000 "menu.scrollbar_xoffset",
6001 &menu.scrollbar_xoffset
6006 &menu.list_size[GFX_SPECIAL_ARG_DEFAULT]
6009 "menu.list_size.LEVELS",
6010 &menu.list_size[GFX_SPECIAL_ARG_LEVELS]
6013 "menu.list_size.SCORES",
6014 &menu.list_size[GFX_SPECIAL_ARG_SCORES]
6017 "menu.list_size.INFO",
6018 &menu.list_size[GFX_SPECIAL_ARG_INFO]
6021 { "main.button.name.x", &menu.main.button.name.x },
6022 { "main.button.name.y", &menu.main.button.name.y },
6023 { "main.button.levels.x", &menu.main.button.levels.x },
6024 { "main.button.levels.y", &menu.main.button.levels.y },
6025 { "main.button.scores.x", &menu.main.button.scores.x },
6026 { "main.button.scores.y", &menu.main.button.scores.y },
6027 { "main.button.editor.x", &menu.main.button.editor.x },
6028 { "main.button.editor.y", &menu.main.button.editor.y },
6029 { "main.button.info.x", &menu.main.button.info.x },
6030 { "main.button.info.y", &menu.main.button.info.y },
6031 { "main.button.game.x", &menu.main.button.game.x },
6032 { "main.button.game.y", &menu.main.button.game.y },
6033 { "main.button.setup.x", &menu.main.button.setup.x },
6034 { "main.button.setup.y", &menu.main.button.setup.y },
6035 { "main.button.quit.x", &menu.main.button.quit.x },
6036 { "main.button.quit.y", &menu.main.button.quit.y },
6038 { "main.button.prev_level.x", &menu.main.button.prev_level.x },
6039 { "main.button.prev_level.y", &menu.main.button.prev_level.y },
6040 { "main.button.next_level.x", &menu.main.button.next_level.x },
6041 { "main.button.next_level.y", &menu.main.button.next_level.y },
6043 { "main.text.name.x", &menu.main.text.name.x },
6044 { "main.text.name.y", &menu.main.text.name.y },
6045 { "main.text.name.width", &menu.main.text.name.width },
6046 { "main.text.name.height", &menu.main.text.name.height },
6047 { "main.text.name.align", &menu.main.text.name.align },
6048 { "main.text.levels.x", &menu.main.text.levels.x },
6049 { "main.text.levels.y", &menu.main.text.levels.y },
6050 { "main.text.levels.width", &menu.main.text.levels.width },
6051 { "main.text.levels.height", &menu.main.text.levels.height },
6052 { "main.text.levels.align", &menu.main.text.levels.align },
6053 { "main.text.scores.x", &menu.main.text.scores.x },
6054 { "main.text.scores.y", &menu.main.text.scores.y },
6055 { "main.text.scores.width", &menu.main.text.scores.width },
6056 { "main.text.scores.height", &menu.main.text.scores.height },
6057 { "main.text.scores.align", &menu.main.text.scores.align },
6058 { "main.text.editor.x", &menu.main.text.editor.x },
6059 { "main.text.editor.y", &menu.main.text.editor.y },
6060 { "main.text.editor.width", &menu.main.text.editor.width },
6061 { "main.text.editor.height", &menu.main.text.editor.height },
6062 { "main.text.editor.align", &menu.main.text.editor.align },
6063 { "main.text.info.x", &menu.main.text.info.x },
6064 { "main.text.info.y", &menu.main.text.info.y },
6065 { "main.text.info.width", &menu.main.text.info.width },
6066 { "main.text.info.height", &menu.main.text.info.height },
6067 { "main.text.info.align", &menu.main.text.info.align },
6068 { "main.text.game.x", &menu.main.text.game.x },
6069 { "main.text.game.y", &menu.main.text.game.y },
6070 { "main.text.game.width", &menu.main.text.game.width },
6071 { "main.text.game.height", &menu.main.text.game.height },
6072 { "main.text.game.align", &menu.main.text.game.align },
6073 { "main.text.setup.x", &menu.main.text.setup.x },
6074 { "main.text.setup.y", &menu.main.text.setup.y },
6075 { "main.text.setup.width", &menu.main.text.setup.width },
6076 { "main.text.setup.height", &menu.main.text.setup.height },
6077 { "main.text.setup.align", &menu.main.text.setup.align },
6078 { "main.text.quit.x", &menu.main.text.quit.x },
6079 { "main.text.quit.y", &menu.main.text.quit.y },
6080 { "main.text.quit.width", &menu.main.text.quit.width },
6081 { "main.text.quit.height", &menu.main.text.quit.height },
6082 { "main.text.quit.align", &menu.main.text.quit.align },
6084 { "main.text.current_level.x", &menu.main.text.current_level.x },
6085 { "main.text.current_level.y", &menu.main.text.current_level.y },
6086 { "main.text.current_level.align", &menu.main.text.current_level.align },
6087 { "main.text.first_level.x", &menu.main.text.first_level.x },
6088 { "main.text.first_level.y", &menu.main.text.first_level.y },
6089 { "main.text.first_level.align", &menu.main.text.first_level.align },
6090 { "main.text.last_level.x", &menu.main.text.last_level.x },
6091 { "main.text.last_level.y", &menu.main.text.last_level.y },
6092 { "main.text.last_level.align", &menu.main.text.last_level.align },
6093 { "main.text.level_info_1.x", &menu.main.text.level_info_1.x },
6094 { "main.text.level_info_1.y", &menu.main.text.level_info_1.y },
6095 { "main.text.level_info_1.align", &menu.main.text.level_info_1.align },
6096 { "main.text.level_info_1.chars", &menu.main.text.level_info_1.chars },
6097 { "main.text.level_info_2.x", &menu.main.text.level_info_2.x },
6098 { "main.text.level_info_2.y", &menu.main.text.level_info_2.y },
6099 { "main.text.level_info_2.align", &menu.main.text.level_info_2.align },
6100 { "main.text.level_info_2.chars", &menu.main.text.level_info_2.chars },
6101 { "main.text.title_1.x", &menu.main.text.title_1.x },
6102 { "main.text.title_1.y", &menu.main.text.title_1.y },
6103 { "main.text.title_1.align", &menu.main.text.title_1.align },
6104 { "main.text.title_2.x", &menu.main.text.title_2.x },
6105 { "main.text.title_2.y", &menu.main.text.title_2.y },
6106 { "main.text.title_2.align", &menu.main.text.title_2.align },
6107 { "main.text.title_3.x", &menu.main.text.title_3.x },
6108 { "main.text.title_3.y", &menu.main.text.title_3.y },
6109 { "main.text.title_3.align", &menu.main.text.title_3.align },
6111 { "main.input.name.x", &menu.main.input.name.x },
6112 { "main.input.name.y", &menu.main.input.name.y },
6113 { "main.input.name.align", &menu.main.input.name.align },
6115 { "preview.x", &preview.x },
6116 { "preview.y", &preview.y },
6117 { "preview.align", &preview.align },
6118 { "preview.xsize", &preview.xsize },
6119 { "preview.ysize", &preview.ysize },
6120 { "preview.xoffset", &preview.xoffset },
6121 { "preview.yoffset", &preview.yoffset },
6122 { "preview.tile_size", &preview.tile_size },
6123 { "preview.step_offset", &preview.step_offset },
6124 { "preview.step_delay", &preview.step_delay },
6125 { "preview.anim_mode", &preview.anim_mode },
6127 { "door_1.width", &door_1.width },
6128 { "door_1.height", &door_1.height },
6129 { "door_1.step_offset", &door_1.step_offset },
6130 { "door_1.step_delay", &door_1.step_delay },
6131 { "door_1.anim_mode", &door_1.anim_mode },
6132 { "door_2.width", &door_2.width },
6133 { "door_2.height", &door_2.height },
6134 { "door_2.step_offset", &door_2.step_offset },
6135 { "door_2.step_delay", &door_2.step_delay },
6136 { "door_2.anim_mode", &door_2.anim_mode },
6138 { "game.panel.level.x", &game.panel.level.x },
6139 { "game.panel.level.y", &game.panel.level.y },
6140 { "game.panel.level.align", &game.panel.level.align },
6141 { "game.panel.level.digits", &game.panel.level.chars },
6142 { "game.panel.gems.x", &game.panel.gems.x },
6143 { "game.panel.gems.y", &game.panel.gems.y },
6144 { "game.panel.gems.align", &game.panel.gems.align },
6145 { "game.panel.gems.digits", &game.panel.gems.chars },
6146 { "game.panel.inventory.x", &game.panel.inventory.x },
6147 { "game.panel.inventory.y", &game.panel.inventory.y },
6148 { "game.panel.inventory.align", &game.panel.inventory.align },
6149 { "game.panel.inventory.digits", &game.panel.inventory.chars },
6150 { "game.panel.keys.x", &game.panel.keys.x },
6151 { "game.panel.keys.y", &game.panel.keys.y },
6152 { "game.panel.keys.align", &game.panel.keys.align },
6153 { "game.panel.score.x", &game.panel.score.x },
6154 { "game.panel.score.y", &game.panel.score.y },
6155 { "game.panel.score.align", &game.panel.score.align },
6156 { "game.panel.score.digits", &game.panel.score.chars },
6157 { "game.panel.time.x", &game.panel.time.x },
6158 { "game.panel.time.y", &game.panel.time.y },
6159 { "game.panel.time.align", &game.panel.time.align },
6160 { "game.panel.time.digits", &game.panel.time.chars },
6162 { "[player].boring_delay_fixed", &game.player_boring_delay_fixed },
6163 { "[player].boring_delay_random", &game.player_boring_delay_random },
6164 { "[player].sleeping_delay_fixed", &game.player_sleeping_delay_fixed },
6165 { "[player].sleeping_delay_random", &game.player_sleeping_delay_random },
6171 /* ------------------------------------------------------------------------- */
6172 /* font definitions */
6173 /* ------------------------------------------------------------------------- */
6175 /* Important: When one entry is a prefix of another entry, the longer entry
6176 must come first, because the dynamic configuration does prefix matching!
6177 (These definitions must match the corresponding definitions in "main.h"!) */
6179 struct FontInfo font_info[NUM_FONTS + 1] =
6181 { "font.initial_1" },
6182 { "font.initial_2" },
6183 { "font.initial_3" },
6184 { "font.initial_4" },
6187 { "font.menu_1.active" },
6188 { "font.menu_2.active" },
6191 { "font.text_1.active" },
6192 { "font.text_2.active" },
6193 { "font.text_3.active" },
6194 { "font.text_4.active" },
6199 { "font.envelope_1" },
6200 { "font.envelope_2" },
6201 { "font.envelope_3" },
6202 { "font.envelope_4" },
6203 { "font.input_1.active" },
6204 { "font.input_2.active" },
6207 { "font.option_off" },
6208 { "font.option_on" },
6211 { "font.value_old" },
6212 { "font.level_number.active" },
6213 { "font.level_number" },
6214 { "font.tape_recorder" },
6215 { "font.game_info" },
6216 { "font.info.elements" },
6217 { "font.info.levelset" },
6221 /* ------------------------------------------------------------------------- */
6222 /* music token prefix definitions */
6223 /* ------------------------------------------------------------------------- */
6225 struct MusicPrefixInfo music_prefix_info[NUM_MUSIC_PREFIXES + 1] =
6227 { "background", TRUE },
6233 /* ========================================================================= */
6235 /* ========================================================================= */
6237 static void print_usage()
6240 "Usage: %s [OPTION]... [HOSTNAME [PORT]]\n"
6243 " -d, --display HOSTNAME[:SCREEN] specify X server display\n"
6244 " -b, --basepath DIRECTORY alternative base DIRECTORY\n"
6245 " -l, --level DIRECTORY alternative level DIRECTORY\n"
6246 " -g, --graphics DIRECTORY alternative graphics DIRECTORY\n"
6247 " -s, --sounds DIRECTORY alternative sounds DIRECTORY\n"
6248 " -m, --music DIRECTORY alternative music DIRECTORY\n"
6249 " -n, --network network multiplayer game\n"
6250 " --serveronly only start network server\n"
6251 " -v, --verbose verbose mode\n"
6252 " --debug display debugging information\n"
6253 " -e, --execute COMMAND execute batch COMMAND\n"
6255 "Valid commands for '--execute' option:\n"
6256 " \"print graphicsinfo.conf\" print default graphics config\n"
6257 " \"print soundsinfo.conf\" print default sounds config\n"
6258 " \"print musicinfo.conf\" print default music config\n"
6259 " \"print editorsetup.conf\" print default editor config\n"
6260 " \"print helpanim.conf\" print default helpanim config\n"
6261 " \"print helptext.conf\" print default helptext config\n"
6262 " \"dump level FILE\" dump level data from FILE\n"
6263 " \"dump tape FILE\" dump tape data from FILE\n"
6264 " \"autoplay LEVELDIR [NR ...]\" play level tapes for LEVELDIR\n"
6265 " \"convert LEVELDIR [NR]\" convert levels in LEVELDIR\n"
6267 program.command_basename);
6270 int main(int argc, char *argv[])
6272 char * window_title_string = getWindowTitleString();
6274 InitProgramInfo(argv[0], USERDATA_DIRECTORY, USERDATA_DIRECTORY_UNIX,
6275 PROGRAM_TITLE_STRING, window_title_string, ICON_TITLE_STRING,
6276 X11_ICON_FILENAME, X11_ICONMASK_FILENAME, SDL_ICON_FILENAME,
6277 MSDOS_POINTER_FILENAME,
6278 COOKIE_PREFIX, FILENAME_PREFIX, GAME_VERSION_ACTUAL);
6280 InitExitFunction(CloseAllAndExit);
6281 InitPlatformDependentStuff();
6283 GetOptions(argv, print_usage);
6289 return 0; /* to keep compilers happy */