rnd-20060812-2-src
[rocksndiamonds.git] / src / main.c
1 /***********************************************************
2 * Rocks'n'Diamonds -- McDuffin Strikes Back!               *
3 *----------------------------------------------------------*
4 * (c) 1995-2002 Artsoft Entertainment                      *
5 *               Holger Schemel                             *
6 *               Detmolder Strasse 189                      *
7 *               33604 Bielefeld                            *
8 *               Germany                                    *
9 *               e-mail: info@artsoft.org                   *
10 *----------------------------------------------------------*
11 * main.c                                                   *
12 ***********************************************************/
13
14 #include "libgame/libgame.h"
15
16 #include "main.h"
17 #include "init.h"
18 #include "game.h"
19 #include "tape.h"
20 #include "events.h"
21 #include "config.h"
22
23 Bitmap                 *bitmap_db_title;
24 Bitmap                 *bitmap_db_field;
25 Bitmap                 *bitmap_db_panel;
26 Bitmap                 *bitmap_db_door;
27 DrawBuffer             *fieldbuffer;
28 DrawBuffer             *drawto_field;
29
30 int                     game_status = -1;
31 boolean                 level_editor_test_game = FALSE;
32 boolean                 network_playing = FALSE;
33
34 #if defined(TARGET_SDL)
35 boolean                 network_server = FALSE;
36 SDL_Thread             *server_thread;
37 #endif
38
39 int                     key_joystick_mapping = 0;
40
41 boolean                 redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE];
42 int                     redraw_x1 = 0, redraw_y1 = 0;
43
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                   AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
63 short                   AmoebaCnt[MAX_NUM_AMOEBA];
64 short                   AmoebaCnt2[MAX_NUM_AMOEBA];
65 short                   ExplodeField[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
66 short                   ExplodePhase[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
67 short                   ExplodeDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
68 int                     RunnerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
69 int                     PlayerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
70
71 #if 0
72 unsigned long           Properties[MAX_NUM_ELEMENTS][NUM_EP_BITFIELDS];
73 #endif
74
75 int                     GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
76 int                     GfxRandom[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
77 int                     GfxElement[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
78 int                     GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
79 int                     GfxDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
80
81 int                     lev_fieldx, lev_fieldy;
82 int                     scroll_x, scroll_y;
83
84 int                     FX = SX, FY = SY;
85 int                     ScrollStepSize;
86 int                     ScreenMovDir = MV_NONE, ScreenMovPos = 0;
87 int                     ScreenGfxPos = 0;
88 int                     BorderElement = EL_STEELWALL;
89 int                     GameFrameDelay = GAME_FRAME_DELAY;
90 int                     FfwdFrameDelay = FFWD_FRAME_DELAY;
91 int                     BX1 = 0, BY1 = 0;
92 int                     BX2 = SCR_FIELDX - 1, BY2 = SCR_FIELDY - 1;
93 int                     SBX_Left, SBX_Right;
94 int                     SBY_Upper, SBY_Lower;
95 int                     ZX, ZY;
96 int                     ExitX, ExitY;
97 int                     AllPlayersGone;
98
99 int                     TimeFrames, TimePlayed, TimeLeft, TapeTime;
100
101 boolean                 network_player_action_received = FALSE;
102
103 struct LevelSetInfo     levelset;
104 struct LevelInfo        level, level_template;
105 struct PlayerInfo       stored_player[MAX_PLAYERS], *local_player = NULL;
106 struct HiScore          highscore[MAX_SCORE_ENTRIES];
107 struct TapeInfo         tape;
108 struct SetupInfo        setup;
109 struct GameInfo         game;
110 struct GlobalInfo       global;
111 struct MenuInfo         menu;
112 struct DoorInfo         door_1, door_2;
113 struct PreviewInfo      preview;
114 struct GraphicInfo     *graphic_info = NULL;
115 struct SoundInfo       *sound_info = NULL;
116 struct MusicInfo       *music_info = NULL;
117 struct MusicFileInfo   *music_file_info = NULL;
118 struct HelpAnimInfo    *helpanim_info = NULL;
119 SetupFileHash          *helptext_info = NULL;
120
121
122 /* ------------------------------------------------------------------------- */
123 /* element definitions                                                       */
124 /* ------------------------------------------------------------------------- */
125
126 struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1];
127
128 /* this contains predefined structure elements to initialize "element_info" */
129 struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
130 {
131   /* keyword to start parser: "ELEMENT_INFO_START" <-- do not change! */
132
133   /* ----------------------------------------------------------------------- */
134   /* "real" level file elements                                              */
135   /* ----------------------------------------------------------------------- */
136
137   {
138     "empty_space",
139     "empty_space",
140     "empty space"
141   },
142   {
143     "sand",
144     "sand",
145     "sand"
146   },
147   {
148     "wall",
149     "wall",
150     "normal wall"
151   },
152   {
153     "wall_slippery",
154     "wall",
155     "slippery wall"
156   },
157   {
158     "rock",
159     "rock",
160     "rock"
161   },
162   {
163     "key_obsolete",
164     "obsolete",
165     "key (OBSOLETE)"
166   },
167   {
168     "emerald",
169     "emerald",
170     "emerald"
171   },
172   {
173     "exit_closed",
174     "exit",
175     "closed exit"
176   },
177   {
178     "player_obsolete",
179     "obsolete",
180     "player (OBSOLETE)"
181   },
182   {
183     "bug",
184     "bug",
185     "bug (random start direction)"
186   },
187   {
188     "spaceship",
189     "spaceship",
190     "spaceship (random start direction)"
191   },
192   {
193     "yamyam",
194     "yamyam",
195     "yam yam (random start direction)"
196   },
197   {
198     "robot",
199     "robot",
200     "robot"
201   },
202   {
203     "steelwall",
204     "steelwall",
205     "steel wall"
206   },
207   {
208     "diamond",
209     "diamond",
210     "diamond"
211   },
212   {
213     "amoeba_dead",
214     "amoeba",
215     "dead amoeba"
216   },
217   {
218     "quicksand_empty",
219     "quicksand",
220     "empty quicksand"
221   },
222   {
223     "quicksand_full",
224     "quicksand",
225     "quicksand with rock"
226   },
227   {
228     "amoeba_drop",
229     "amoeba",
230     "amoeba drop"
231   },
232   {
233     "bomb",
234     "bomb",
235     "bomb"
236   },
237   {
238     "magic_wall",
239     "magic_wall",
240     "magic wall"
241   },
242   {
243     "speed_pill",
244     "speed_pill",
245     "speed pill"
246   },
247   {
248     "acid",
249     "acid",
250     "acid"
251   },
252   {
253     "amoeba_wet",
254     "amoeba",
255     "dropping amoeba (EM style)"
256   },
257   {
258     "amoeba_dry",
259     "amoeba",
260     "normal amoeba"
261   },
262   {
263     "nut",
264     "nut",
265     "nut with emerald"
266   },
267   {
268     "game_of_life",
269     "game_of_life",
270     "Conway's wall of life"
271   },
272   {
273     "biomaze",
274     "biomaze",
275     "biomaze"
276   },
277   {
278     "dynamite.active",
279     "dynamite",
280     "burning dynamite"
281   },
282   {
283     "stoneblock",
284     "wall",
285     "wall"
286   },
287   {
288     "robot_wheel",
289     "robot_wheel",
290     "magic wheel"
291   },
292   {
293     "robot_wheel.active",
294     "robot_wheel",
295     "magic wheel (running)"
296   },
297   {
298     "key_1",
299     "key",
300     "key 1"
301   },
302   {
303     "key_2",
304     "key",
305     "key 2"
306   },
307   {
308     "key_3",
309     "key",
310     "key 3"
311   },
312   {
313     "key_4",
314     "key",
315     "key 4"
316   },
317   {
318     "gate_1",
319     "gate",
320     "door 1"
321   },
322   {
323     "gate_2",
324     "gate",
325     "door 2"
326   },
327   {
328     "gate_3",
329     "gate",
330     "door 3"
331   },
332   {
333     "gate_4",
334     "gate",
335     "door 4"
336   },
337   {
338     "gate_1_gray",
339     "gate",
340     "gray door (opened by key 1)"
341   },
342   {
343     "gate_2_gray",
344     "gate",
345     "gray door (opened by key 2)"
346   },
347   {
348     "gate_3_gray",
349     "gate",
350     "gray door (opened by key 3)"
351   },
352   {
353     "gate_4_gray",
354     "gate",
355     "gray door (opened by key 4)"
356   },
357   {
358     "dynamite",
359     "dynamite",
360     "dynamite"
361   },
362   {
363     "pacman",
364     "pacman",
365     "pac man (random start direction)"
366   },
367   {
368     "invisible_wall",
369     "wall",
370     "invisible normal wall"
371   },
372   {
373     "lamp",
374     "lamp",
375     "lamp (off)"
376   },
377   {
378     "lamp.active",
379     "lamp",
380     "lamp (on)"
381   },
382   {
383     "wall_emerald",
384     "wall",
385     "wall with emerald"
386   },
387   {
388     "wall_diamond",
389     "wall",
390     "wall with diamond"
391   },
392   {
393     "amoeba_full",
394     "amoeba",
395     "amoeba with content"
396   },
397   {
398     "bd_amoeba",
399     "bd_amoeba",
400     "amoeba (BD style)"
401   },
402   {
403     "time_orb_full",
404     "time_orb_full",
405     "time orb (full)"
406   },
407   {
408     "time_orb_empty",
409     "time_orb_empty",
410     "time orb (empty)"
411   },
412   {
413     "expandable_wall",
414     "wall",
415     "growing wall (horizontal, visible)"
416   },
417   {
418     "bd_diamond",
419     "bd_diamond",
420     "diamond (BD style)"
421   },
422   {
423     "emerald_yellow",
424     "emerald",
425     "yellow emerald"
426   },
427   {
428     "wall_bd_diamond",
429     "wall",
430     "wall with BD style diamond"
431   },
432   {
433     "wall_emerald_yellow",
434     "wall",
435     "wall with yellow emerald"
436   },
437   {
438     "dark_yamyam",
439     "dark_yamyam",
440     "dark yam yam"
441   },
442   {
443     "bd_magic_wall",
444     "bd_magic_wall",
445     "magic wall (BD style)"
446   },
447   {
448     "invisible_steelwall",
449     "steelwall",
450     "invisible steel wall"
451   },
452   {
453     "sokoban_field_player",
454     "sokoban",
455     "sokoban field with player"
456   },
457   {
458     "dynabomb_increase_number",
459     "dynabomb",
460     "increases number of bombs"
461   },
462   {
463     "dynabomb_increase_size",
464     "dynabomb",
465     "increases explosion size"
466   },
467   {
468     "dynabomb_increase_power",
469     "dynabomb",
470     "increases power of explosion"
471   },
472   {
473     "sokoban_object",
474     "sokoban",
475     "sokoban object"
476   },
477   {
478     "sokoban_field_empty",
479     "sokoban",
480     "sokoban empty field"
481   },
482   {
483     "sokoban_field_full",
484     "sokoban",
485     "sokoban field with object"
486   },
487   {
488     "bd_butterfly.right",
489     "bd_butterfly",
490     "butterfly (starts moving right)"},
491   {
492     "bd_butterfly.up",
493     "bd_butterfly",
494     "butterfly (starts moving up)"
495   },
496   {
497     "bd_butterfly.left",
498     "bd_butterfly",
499     "butterfly (starts moving left)"},
500   {
501     "bd_butterfly.down",
502     "bd_butterfly",
503     "butterfly (starts moving down)"},
504   {
505     "bd_firefly.right",
506     "bd_firefly",
507     "firefly (starts moving right)"
508   },
509   {
510     "bd_firefly.up",
511     "bd_firefly",
512     "firefly (starts moving up)"
513   },
514   {
515     "bd_firefly.left",
516     "bd_firefly",
517     "firefly (starts moving left)"
518   },
519   {
520     "bd_firefly.down",
521     "bd_firefly",
522     "firefly (starts moving down)"
523   },
524   {
525     "bd_butterfly",
526     "bd_butterfly",
527     "butterfly (random start direction)"
528   },
529   {
530     "bd_firefly",
531     "bd_firefly",
532     "firefly (random start direction)"
533   },
534   {
535     "player_1",
536     "player",
537     "player 1"
538   },
539   {
540     "player_2",
541     "player",
542     "player 2"
543   },
544   {
545     "player_3",
546     "player",
547     "player 3"
548   },
549   {
550     "player_4",
551     "player",
552     "player 4"
553   },
554   {
555     "bug.right",
556     "bug",
557     "bug (starts moving right)"
558   },
559   {
560     "bug.up",
561     "bug",
562     "bug (starts moving up)"
563   },
564   {
565     "bug.left",
566     "bug",
567     "bug (starts moving left)"
568   },
569   {
570     "bug.down",
571     "bug",
572     "bug (starts moving down)"
573   },
574   {
575     "spaceship.right",
576     "spaceship",
577     "spaceship (starts moving right)"},
578   {
579     "spaceship.up",
580     "spaceship",
581     "spaceship (starts moving up)"
582   },
583   {
584     "spaceship.left",
585     "spaceship",
586     "spaceship (starts moving left)"},
587   {
588     "spaceship.down",
589     "spaceship",
590     "spaceship (starts moving down)"},
591   {
592     "pacman.right",
593     "pacman",
594     "pac man (starts moving right)"
595   },
596   {
597     "pacman.up",
598     "pacman",
599     "pac man (starts moving up)"
600   },
601   {
602     "pacman.left",
603     "pacman",
604     "pac man (starts moving left)"
605   },
606   {
607     "pacman.down",
608     "pacman",
609     "pac man (starts moving down)"
610   },
611   {
612     "emerald_red",
613     "emerald",
614     "red emerald"
615   },
616   {
617     "emerald_purple",
618     "emerald",
619     "purple emerald"
620   },
621   {
622     "wall_emerald_red",
623     "wall",
624     "wall with red emerald"
625   },
626   {
627     "wall_emerald_purple",
628     "wall",
629     "wall with purple emerald"
630   },
631   {
632     "acid_pool_topleft",
633     "wall",
634     "acid pool (top left)"
635   },
636   {
637     "acid_pool_topright",
638     "wall",
639     "acid pool (top right)"
640   },
641   {
642     "acid_pool_bottomleft",
643     "wall",
644     "acid pool (bottom left)"
645   },
646   {
647     "acid_pool_bottom",
648     "wall",
649     "acid pool (bottom)"
650   },
651   {
652     "acid_pool_bottomright",
653     "wall",
654     "acid pool (bottom right)"
655   },
656   {
657     "bd_wall",
658     "wall",
659     "normal wall (BD style)"
660   },
661   {
662     "bd_rock",
663     "bd_rock",
664     "rock (BD style)"
665   },
666   {
667     "exit_open",
668     "exit",
669     "open exit"
670   },
671   {
672     "black_orb",
673     "black_orb",
674     "black orb bomb"
675   },
676   {
677     "amoeba_to_diamond",
678     "amoeba",
679     "amoeba"
680   },
681   {
682     "mole",
683     "mole",
684     "mole (random start direction)"
685   },
686   {
687     "penguin",
688     "penguin",
689     "penguin"
690   },
691   {
692     "satellite",
693     "satellite",
694     "satellite"
695   },
696   {
697     "arrow_left",
698     "arrow",
699     "arrow left"
700   },
701   {
702     "arrow_right",
703     "arrow",
704     "arrow right"
705   },
706   {
707     "arrow_up",
708     "arrow",
709     "arrow up"
710   },
711   {
712     "arrow_down",
713     "arrow",
714     "arrow down"
715   },
716   {
717     "pig",
718     "pig",
719     "pig"
720   },
721   {
722     "dragon",
723     "dragon",
724     "fire breathing dragon"
725   },
726   {
727     "em_key_1_file_obsolete",
728     "obsolete",
729     "key (OBSOLETE)"
730   },
731   {
732     "char_space",
733     "char",
734     "letter ' '"
735   },
736   {
737     "char_exclam",
738     "char",
739     "letter '!'"
740   },
741   {
742     "char_quotedbl",
743     "char",
744     "letter '\"'"
745   },
746   {
747     "char_numbersign",
748     "char",
749     "letter '#'"
750   },
751   {
752     "char_dollar",
753     "char",
754     "letter '$'"
755   },
756   {
757     "char_percent",
758     "char",
759     "letter '%'"
760   },
761   {
762     "char_ampersand",
763     "char",
764     "letter '&'"
765   },
766   {
767     "char_apostrophe",
768     "char",
769     "letter '''"
770   },
771   {
772     "char_parenleft",
773     "char",
774     "letter '('"
775   },
776   {
777     "char_parenright",
778     "char",
779     "letter ')'"
780   },
781   {
782     "char_asterisk",
783     "char",
784     "letter '*'"
785   },
786   {
787     "char_plus",
788     "char",
789     "letter '+'"
790   },
791   {
792     "char_comma",
793     "char",
794     "letter ','"
795   },
796   {
797     "char_minus",
798     "char",
799     "letter '-'"
800   },
801   {
802     "char_period",
803     "char",
804     "letter '.'"
805   },
806   {
807     "char_slash",
808     "char",
809     "letter '/'"
810   },
811   {
812     "char_0",
813     "char",
814     "letter '0'"
815   },
816   {
817     "char_1",
818     "char",
819     "letter '1'"
820   },
821   {
822     "char_2",
823     "char",
824     "letter '2'"
825   },
826   {
827     "char_3",
828     "char",
829     "letter '3'"
830   },
831   {
832     "char_4",
833     "char",
834     "letter '4'"
835   },
836   {
837     "char_5",
838     "char",
839     "letter '5'"
840   },
841   {
842     "char_6",
843     "char",
844     "letter '6'"
845   },
846   {
847     "char_7",
848     "char",
849     "letter '7'"
850   },
851   {
852     "char_8",
853     "char",
854     "letter '8'"
855   },
856   {
857     "char_9",
858     "char",
859     "letter '9'"
860   },
861   {
862     "char_colon",
863     "char",
864     "letter ':'"
865   },
866   {
867     "char_semicolon",
868     "char",
869     "letter ';'"
870   },
871   {
872     "char_less",
873     "char",
874     "letter '<'"
875   },
876   {
877     "char_equal",
878     "char",
879     "letter '='"
880   },
881   {
882     "char_greater",
883     "char",
884     "letter '>'"
885   },
886   {
887     "char_question",
888     "char",
889     "letter '?'"
890   },
891   {
892     "char_at",
893     "char",
894     "letter '@'"
895   },
896   {
897     "char_a",
898     "char",
899     "letter 'A'"
900   },
901   {
902     "char_b",
903     "char",
904     "letter 'B'"
905   },
906   {
907     "char_c",
908     "char",
909     "letter 'C'"
910   },
911   {
912     "char_d",
913     "char",
914     "letter 'D'"
915   },
916   {
917     "char_e",
918     "char",
919     "letter 'E'"
920   },
921   {
922     "char_f",
923     "char",
924     "letter 'F'"
925   },
926   {
927     "char_g",
928     "char",
929     "letter 'G'"
930   },
931   {
932     "char_h",
933     "char",
934     "letter 'H'"
935   },
936   {
937     "char_i",
938     "char",
939     "letter 'I'"
940   },
941   {
942     "char_j",
943     "char",
944     "letter 'J'"
945   },
946   {
947     "char_k",
948     "char",
949     "letter 'K'"
950   },
951   {
952     "char_l",
953     "char",
954     "letter 'L'"
955   },
956   {
957     "char_m",
958     "char",
959     "letter 'M'"
960   },
961   {
962     "char_n",
963     "char",
964     "letter 'N'"
965   },
966   {
967     "char_o",
968     "char",
969     "letter 'O'"
970   },
971   {
972     "char_p",
973     "char",
974     "letter 'P'"
975   },
976   {
977     "char_q",
978     "char",
979     "letter 'Q'"
980   },
981   {
982     "char_r",
983     "char",
984     "letter 'R'"
985   },
986   {
987     "char_s",
988     "char",
989     "letter 'S'"
990   },
991   {
992     "char_t",
993     "char",
994     "letter 'T'"
995   },
996   {
997     "char_u",
998     "char",
999     "letter 'U'"
1000   },
1001   {
1002     "char_v",
1003     "char",
1004     "letter 'V'"
1005   },
1006   {
1007     "char_w",
1008     "char",
1009     "letter 'W'"
1010   },
1011   {
1012     "char_x",
1013     "char",
1014     "letter 'X'"
1015   },
1016   {
1017     "char_y",
1018     "char",
1019     "letter 'Y'"
1020   },
1021   {
1022     "char_z",
1023     "char",
1024     "letter 'Z'"
1025   },
1026   {
1027     "char_bracketleft",
1028     "char",
1029     "letter '['"
1030   },
1031   {
1032     "char_backslash",
1033     "char",
1034     "letter '\\'"
1035   },
1036   {
1037     "char_bracketright",
1038     "char",
1039     "letter ']'"
1040   },
1041   {
1042     "char_asciicircum",
1043     "char",
1044     "letter '^'"
1045   },
1046   {
1047     "char_underscore",
1048     "char",
1049     "letter '_'"
1050   },
1051   {
1052     "char_copyright",
1053     "char",
1054     "letter '©'"
1055   },
1056   {
1057     "char_aumlaut",
1058     "char",
1059     "letter 'Ä'"
1060   },
1061   {
1062     "char_oumlaut",
1063     "char",
1064     "letter 'Ö'"
1065   },
1066   {
1067     "char_uumlaut",
1068     "char",
1069     "letter 'Ãœ'"
1070   },
1071   {
1072     "char_degree",
1073     "char",
1074     "letter '°'"
1075   },
1076   {
1077     "char_trademark",
1078     "char",
1079     "letter '®'"
1080   },
1081   {
1082     "char_cursor",
1083     "char",
1084     "letter ' '"
1085   },
1086   {
1087     "char_unused",
1088     "char",
1089     "letter ''"
1090   },
1091   {
1092     "char_unused",
1093     "char",
1094     "letter ''"
1095   },
1096   {
1097     "char_unused",
1098     "char",
1099     "letter ''"
1100   },
1101   {
1102     "char_unused",
1103     "char",
1104     "letter ''"
1105   },
1106   {
1107     "char_unused",
1108     "char",
1109     "letter ''"
1110   },
1111   {
1112     "char_unused",
1113     "char",
1114     "letter ''"
1115   },
1116   {
1117     "char_unused",
1118     "char",
1119     "letter ''"
1120   },
1121   {
1122     "char_unused",
1123     "char",
1124     "letter ''"
1125   },
1126   {
1127     "char_unused",
1128     "char",
1129     "letter ''"
1130   },
1131   {
1132     "expandable_wall_horizontal",
1133     "wall",
1134     "growing wall (horizontal)"
1135   },
1136   {
1137     "expandable_wall_vertical",
1138     "wall",
1139     "growing wall (vertical)"
1140   },
1141   {
1142     "expandable_wall_any",
1143     "wall",
1144     "growing wall (any direction)"
1145   },
1146   {
1147     "em_gate_1",
1148     "gate",
1149     "door 1 (EM style)"
1150   },
1151   {
1152     "em_gate_2",
1153     "gate",
1154     "door 2 (EM style)"
1155   },
1156   {
1157     "em_gate_3",
1158     "gate",
1159     "door 3 (EM style)"
1160   },
1161   {
1162     "em_gate_4",
1163     "gate",
1164     "door 4 (EM style)"
1165   },
1166   {
1167     "em_key_2_file_obsolete",
1168     "obsolete",
1169     "key (OBSOLETE)"
1170   },
1171   {
1172     "em_key_3_file_obsolete",
1173     "obsolete",
1174     "key (OBSOLETE)"
1175   },
1176   {
1177     "em_key_4_file_obsolete",
1178     "obsolete",
1179     "key (OBSOLETE)"
1180   },
1181   {
1182     "sp_empty_space",
1183     "empty_space",
1184     "empty space"
1185   },
1186   {
1187     "sp_zonk",
1188     "sp_zonk",
1189     "zonk"
1190   },
1191   {
1192     "sp_base",
1193     "sp_base",
1194     "base"
1195   },
1196   {
1197     "sp_murphy",
1198     "player",
1199     "murphy"
1200   },
1201   {
1202     "sp_infotron",
1203     "sp_infotron",
1204     "infotron"
1205   },
1206   {
1207     "sp_chip_single",
1208     "wall",
1209     "chip (single)"
1210   },
1211   {
1212     "sp_hardware_gray",
1213     "wall",
1214     "hardware"
1215   },
1216   {
1217     "sp_exit_closed",
1218     "sp_exit",
1219     "exit"
1220   },
1221   {
1222     "sp_disk_orange",
1223     "sp_disk_orange",
1224     "orange disk"
1225   },
1226   {
1227     "sp_port_right",
1228     "sp_port",
1229     "port (leading right)"
1230   },
1231   {
1232     "sp_port_down",
1233     "sp_port",
1234     "port (leading down)"
1235   },
1236   {
1237     "sp_port_left",
1238     "sp_port",
1239     "port (leading left)"
1240   },
1241   {
1242     "sp_port_up",
1243     "sp_port",
1244     "port (leading up)"
1245   },
1246   {
1247     "sp_gravity_port_right",
1248     "sp_port",
1249     "gravity port (leading right)"
1250   },
1251   {
1252     "sp_gravity_port_down",
1253     "sp_port",
1254     "gravity port (leading down)"
1255   },
1256   {
1257     "sp_gravity_port_left",
1258     "sp_port",
1259     "gravity port (leading left)"
1260   },
1261   {
1262     "sp_gravity_port_up",
1263     "sp_port",
1264     "gravity port (leading up)"
1265   },
1266   {
1267     "sp_sniksnak",
1268     "sp_sniksnak",
1269     "snik snak"
1270   },
1271   {
1272     "sp_disk_yellow",
1273     "sp_disk_yellow",
1274     "yellow disk"
1275   },
1276   {
1277     "sp_terminal",
1278     "sp_terminal",
1279     "terminal"
1280   },
1281   {
1282     "sp_disk_red",
1283     "dynamite",
1284     "red disk"
1285   },
1286   {
1287     "sp_port_vertical",
1288     "sp_port",
1289     "port (vertical)"
1290   },
1291   {
1292     "sp_port_horizontal",
1293     "sp_port",
1294     "port (horizontal)"
1295   },
1296   {
1297     "sp_port_any",
1298     "sp_port",
1299     "port (any direction)"
1300   },
1301   {
1302     "sp_electron",
1303     "sp_electron",
1304     "electron"
1305   },
1306   {
1307     "sp_buggy_base",
1308     "sp_buggy_base",
1309     "buggy base"
1310   },
1311   {
1312     "sp_chip_left",
1313     "wall",
1314     "chip (left half)"
1315   },
1316   {
1317     "sp_chip_right",
1318     "wall",
1319     "chip (right half)"
1320   },
1321   {
1322     "sp_hardware_base_1",
1323     "wall",
1324     "hardware"
1325   },
1326   {
1327     "sp_hardware_green",
1328     "wall",
1329     "hardware"
1330   },
1331   {
1332     "sp_hardware_blue",
1333     "wall",
1334     "hardware"
1335   },
1336   {
1337     "sp_hardware_red",
1338     "wall",
1339     "hardware"
1340   },
1341   {
1342     "sp_hardware_yellow",
1343     "wall",
1344     "hardware"
1345   },
1346   {
1347     "sp_hardware_base_2",
1348     "wall",
1349     "hardware"
1350   },
1351   {
1352     "sp_hardware_base_3",
1353     "wall",
1354     "hardware"
1355   },
1356   {
1357     "sp_hardware_base_4",
1358     "wall",
1359     "hardware"
1360   },
1361   {
1362     "sp_hardware_base_5",
1363     "wall",
1364     "hardware"
1365   },
1366   {
1367     "sp_hardware_base_6",
1368     "wall",
1369     "hardware"
1370   },
1371   {
1372     "sp_chip_top",
1373     "wall",
1374     "chip (upper half)"
1375   },
1376   {
1377     "sp_chip_bottom",
1378     "wall",
1379     "chip (lower half)"
1380   },
1381   {
1382     "em_gate_1_gray",
1383     "gate",
1384     "gray door (EM style, key 1)"
1385   },
1386   {
1387     "em_gate_2_gray",
1388     "gate",
1389     "gray door (EM style, key 2)"
1390   },
1391   {
1392     "em_gate_3_gray",
1393     "gate",
1394     "gray door (EM style, key 3)"
1395   },
1396   {
1397     "em_gate_4_gray",
1398     "gate",
1399     "gray door (EM style, key 4)"
1400   },
1401   {
1402     "em_dynamite",
1403     "dynamite",
1404     "dynamite (EM style)"
1405   },
1406   {
1407     "em_dynamite.active",
1408     "dynamite",
1409     "burning dynamite (EM style)"
1410   },
1411   {
1412     "pearl",
1413     "pearl",
1414     "pearl"
1415   },
1416   {
1417     "crystal",
1418     "crystal",
1419     "crystal"
1420   },
1421   {
1422     "wall_pearl",
1423     "wall",
1424     "wall with pearl"
1425   },
1426   {
1427     "wall_crystal",
1428     "wall",
1429     "wall with crystal"
1430   },
1431   {
1432     "door_white",
1433     "gate",
1434     "white door"
1435   },
1436   {
1437     "door_white_gray",
1438     "gate",
1439     "gray door (opened by white key)"
1440   },
1441   {
1442     "key_white",
1443     "key",
1444     "white key"
1445   },
1446   {
1447     "shield_normal",
1448     "shield_normal",
1449     "shield (normal)"
1450   },
1451   {
1452     "extra_time",
1453     "extra_time",
1454     "extra time"
1455   },
1456   {
1457     "switchgate_open",
1458     "switchgate",
1459     "switch gate (open)"
1460   },
1461   {
1462     "switchgate_closed",
1463     "switchgate",
1464     "switch gate (closed)"
1465   },
1466   {
1467     "switchgate_switch_up",
1468     "switchgate_switch",
1469     "switch for switch gate"
1470   },
1471   {
1472     "switchgate_switch_down",
1473     "switchgate_switch",
1474     "switch for switch gate"
1475   },
1476   {
1477     "unused_269",
1478     "unused",
1479     "-"
1480   },
1481   {
1482     "unused_270",
1483     "unused",
1484     "-"
1485   },
1486   {
1487     "conveyor_belt_1_left",
1488     "conveyor_belt",
1489     "conveyor belt 1 (left)"
1490   },
1491   {
1492     "conveyor_belt_1_middle",
1493     "conveyor_belt",
1494     "conveyor belt 1 (middle)"
1495   },
1496   {
1497     "conveyor_belt_1_right",
1498     "conveyor_belt",
1499     "conveyor belt 1 (right)"
1500   },
1501   {
1502     "conveyor_belt_1_switch_left",
1503     "conveyor_belt_switch",
1504     "switch for conveyor belt 1 (left)"
1505   },
1506   {
1507     "conveyor_belt_1_switch_middle",
1508     "conveyor_belt_switch",
1509     "switch for conveyor belt 1 (middle)"
1510   },
1511   {
1512     "conveyor_belt_1_switch_right",
1513     "conveyor_belt_switch",
1514     "switch for conveyor belt 1 (right)"
1515   },
1516   {
1517     "conveyor_belt_2_left",
1518     "conveyor_belt",
1519     "conveyor belt 2 (left)"
1520   },
1521   {
1522     "conveyor_belt_2_middle",
1523     "conveyor_belt",
1524     "conveyor belt 2 (middle)"
1525   },
1526   {
1527     "conveyor_belt_2_right",
1528     "conveyor_belt",
1529     "conveyor belt 2 (right)"
1530   },
1531   {
1532     "conveyor_belt_2_switch_left",
1533     "conveyor_belt_switch",
1534     "switch for conveyor belt 2 (left)"
1535   },
1536   {
1537     "conveyor_belt_2_switch_middle",
1538     "conveyor_belt_switch",
1539     "switch for conveyor belt 2 (middle)"
1540   },
1541   {
1542     "conveyor_belt_2_switch_right",
1543     "conveyor_belt_switch",
1544     "switch for conveyor belt 2 (right)"
1545   },
1546   {
1547     "conveyor_belt_3_left",
1548     "conveyor_belt",
1549     "conveyor belt 3 (left)"
1550   },
1551   {
1552     "conveyor_belt_3_middle",
1553     "conveyor_belt",
1554     "conveyor belt 3 (middle)"
1555   },
1556   {
1557     "conveyor_belt_3_right",
1558     "conveyor_belt",
1559     "conveyor belt 3 (right)"
1560   },
1561   {
1562     "conveyor_belt_3_switch_left",
1563     "conveyor_belt_switch",
1564     "switch for conveyor belt 3 (left)"
1565   },
1566   {
1567     "conveyor_belt_3_switch_middle",
1568     "conveyor_belt_switch",
1569     "switch for conveyor belt 3 (middle)"
1570   },
1571   {
1572     "conveyor_belt_3_switch_right",
1573     "conveyor_belt_switch",
1574     "switch for conveyor belt 3 (right)"
1575   },
1576   {
1577     "conveyor_belt_4_left",
1578     "conveyor_belt",
1579     "conveyor belt 4 (left)"
1580   },
1581   {
1582     "conveyor_belt_4_middle",
1583     "conveyor_belt",
1584     "conveyor belt 4 (middle)"
1585   },
1586   {
1587     "conveyor_belt_4_right",
1588     "conveyor_belt",
1589     "conveyor belt 4 (right)"
1590   },
1591   {
1592     "conveyor_belt_4_switch_left",
1593     "conveyor_belt_switch",
1594     "switch for conveyor belt 4 (left)"
1595   },
1596   {
1597     "conveyor_belt_4_switch_middle",
1598     "conveyor_belt_switch",
1599     "switch for conveyor belt 4 (middle)"
1600   },
1601   {
1602     "conveyor_belt_4_switch_right",
1603     "conveyor_belt_switch",
1604     "switch for conveyor belt 4 (right)"
1605   },
1606   {
1607     "landmine",
1608     "sand",
1609     "land mine"
1610   },
1611   {
1612     "envelope_obsolete",
1613     "obsolete",
1614     "envelope (OBSOLETE)"
1615   },
1616   {
1617     "light_switch",
1618     "light_switch",
1619     "light switch (off)"
1620   },
1621   {
1622     "light_switch.active",
1623     "light_switch",
1624     "light switch (on)"
1625   },
1626   {
1627     "sign_exclamation",
1628     "wall",
1629     "sign (exclamation)"
1630   },
1631   {
1632     "sign_radioactivity",
1633     "wall",
1634     "sign (radio activity)"
1635   },
1636   {
1637     "sign_stop",
1638     "wall",
1639     "sign (stop)"
1640   },
1641   {
1642     "sign_wheelchair",
1643     "wall",
1644     "sign (wheel chair)"
1645   },
1646   {
1647     "sign_parking",
1648     "wall",
1649     "sign (parking)"
1650   },
1651   {
1652     "sign_oneway",
1653     "wall",
1654     "sign (one way)"
1655   },
1656   {
1657     "sign_heart",
1658     "wall",
1659     "sign (heart)"
1660   },
1661   {
1662     "sign_triangle",
1663     "wall",
1664     "sign (triangle)"
1665   },
1666   {
1667     "sign_round",
1668     "wall",
1669     "sign (round)"
1670   },
1671   {
1672     "sign_exit",
1673     "wall",
1674     "sign (exit)"
1675   },
1676   {
1677     "sign_yinyang",
1678     "wall",
1679     "sign (yin yang)"
1680   },
1681   {
1682     "sign_other",
1683     "wall",
1684     "sign (other)"
1685   },
1686   {
1687     "mole.left",
1688     "mole",
1689     "mole (starts moving left)"
1690   },
1691   {
1692     "mole.right",
1693     "mole",
1694     "mole (starts moving right)"
1695   },
1696   {
1697     "mole.up",
1698     "mole",
1699     "mole (starts moving up)"
1700   },
1701   {
1702     "mole.down",
1703     "mole",
1704     "mole (starts moving down)"
1705   },
1706   {
1707     "steelwall_slippery",
1708     "steelwall",
1709     "slippery steel wall"
1710   },
1711   {
1712     "invisible_sand",
1713     "sand",
1714     "invisible sand"
1715   },
1716   {
1717     "dx_unknown_15",
1718     "unknown",
1719     "dx unknown element 15"
1720   },
1721   {
1722     "dx_unknown_42",
1723     "unknown",
1724     "dx unknown element 42"
1725   },
1726   {
1727     "unused_319",
1728     "unused",
1729     "(not used)"
1730   },
1731   {
1732     "unused_320",
1733     "unused",
1734     "(not used)"
1735   },
1736   {
1737     "shield_deadly",
1738     "shield_deadly",
1739     "shield (deadly, kills enemies)"
1740   },
1741   {
1742     "timegate_open",
1743     "timegate",
1744     "time gate (open)"
1745   },
1746   {
1747     "timegate_closed",
1748     "timegate",
1749     "time gate (closed)"
1750   },
1751   {
1752     "timegate_switch.active",
1753     "timegate_switch",
1754     "switch for time gate"
1755   },
1756   {
1757     "timegate_switch",
1758     "timegate_switch",
1759     "switch for time gate"
1760   },
1761   {
1762     "balloon",
1763     "balloon",
1764     "balloon"
1765   },
1766   {
1767     "balloon_switch_left",
1768     "balloon_switch",
1769     "wind switch (left)"
1770   },
1771   {
1772     "balloon_switch_right",
1773     "balloon_switch",
1774     "wind switch (right)"
1775   },
1776   {
1777     "balloon_switch_up",
1778     "balloon_switch",
1779     "wind switch (up)"
1780   },
1781   {
1782     "balloon_switch_down",
1783     "balloon_switch",
1784     "wind switch (down)"
1785   },
1786   {
1787     "balloon_switch_any",
1788     "balloon_switch",
1789     "wind switch (any direction)"
1790   },
1791   {
1792     "emc_steelwall_1",
1793     "steelwall",
1794     "steel wall"
1795   },
1796   {
1797     "emc_steelwall_2",
1798     "steelwall",
1799     "steel wall"
1800   },
1801   {
1802     "emc_steelwall_3",
1803     "steelwall",
1804     "steel wall"
1805   },
1806   {
1807     "emc_steelwall_4",
1808     "steelwall",
1809     "steel wall"
1810   },
1811   {
1812     "emc_wall_1",
1813     "wall",
1814     "normal wall"
1815   },
1816   {
1817     "emc_wall_2",
1818     "wall",
1819     "normal wall"
1820   },
1821   {
1822     "emc_wall_3",
1823     "wall",
1824     "normal wall"
1825   },
1826   {
1827     "emc_wall_4",
1828     "wall",
1829     "normal wall"
1830   },
1831   {
1832     "emc_wall_5",
1833     "wall",
1834     "normal wall"
1835   },
1836   {
1837     "emc_wall_6",
1838     "wall",
1839     "normal wall"
1840   },
1841   {
1842     "emc_wall_7",
1843     "wall",
1844     "normal wall"
1845   },
1846   {
1847     "emc_wall_8",
1848     "wall",
1849     "normal wall"
1850   },
1851   {
1852     "tube_any",
1853     "tube",
1854     "tube (any direction)"
1855   },
1856   {
1857     "tube_vertical",
1858     "tube",
1859     "tube (vertical)"
1860   },
1861   {
1862     "tube_horizontal",
1863     "tube",
1864     "tube (horizontal)"
1865   },
1866   {
1867     "tube_vertical_left",
1868     "tube",
1869     "tube (vertical & left)"
1870   },
1871   {
1872     "tube_vertical_right",
1873     "tube",
1874     "tube (vertical & right)"
1875   },
1876   {
1877     "tube_horizontal_up",
1878     "tube",
1879     "tube (horizontal & up)"
1880   },
1881   {
1882     "tube_horizontal_down",
1883     "tube",
1884     "tube (horizontal & down)"
1885   },
1886   {
1887     "tube_left_up",
1888     "tube",
1889     "tube (left & up)"
1890   },
1891   {
1892     "tube_left_down",
1893     "tube",
1894     "tube (left & down)"
1895   },
1896   {
1897     "tube_right_up",
1898     "tube",
1899     "tube (right & up)"
1900   },
1901   {
1902     "tube_right_down",
1903     "tube",
1904     "tube (right & down)"
1905   },
1906   {
1907     "spring",
1908     "spring",
1909     "spring"
1910   },
1911   {
1912     "trap",
1913     "trap",
1914     "trap"
1915   },
1916   {
1917     "dx_supabomb",
1918     "bomb",
1919     "stable bomb (DX style)"
1920   },
1921   {
1922     "unused_358",
1923     "unused",
1924     "-"
1925   },
1926   {
1927     "unused_359",
1928     "unused",
1929     "-"
1930   },
1931   {
1932     "custom_1",
1933     "custom",
1934     "custom element 1"
1935   },
1936   {
1937     "custom_2",
1938     "custom",
1939     "custom element 2"
1940   },
1941   {
1942     "custom_3",
1943     "custom",
1944     "custom element 3"
1945   },
1946   {
1947     "custom_4",
1948     "custom",
1949     "custom element 4"
1950   },
1951   {
1952     "custom_5",
1953     "custom",
1954     "custom element 5"
1955   },
1956   {
1957     "custom_6",
1958     "custom",
1959     "custom element 6"
1960   },
1961   {
1962     "custom_7",
1963     "custom",
1964     "custom element 7"
1965   },
1966   {
1967     "custom_8",
1968     "custom",
1969     "custom element 8"
1970   },
1971   {
1972     "custom_9",
1973     "custom",
1974     "custom element 9"
1975   },
1976   {
1977     "custom_10",
1978     "custom",
1979     "custom element 10"
1980   },
1981   {
1982     "custom_11",
1983     "custom",
1984     "custom element 11"
1985   },
1986   {
1987     "custom_12",
1988     "custom",
1989     "custom element 12"
1990   },
1991   {
1992     "custom_13",
1993     "custom",
1994     "custom element 13"
1995   },
1996   {
1997     "custom_14",
1998     "custom",
1999     "custom element 14"
2000   },
2001   {
2002     "custom_15",
2003     "custom",
2004     "custom element 15"
2005   },
2006   {
2007     "custom_16",
2008     "custom",
2009     "custom element 16"
2010   },
2011   {
2012     "custom_17",
2013     "custom",
2014     "custom element 17"
2015   },
2016   {
2017     "custom_18",
2018     "custom",
2019     "custom element 18"
2020   },
2021   {
2022     "custom_19",
2023     "custom",
2024     "custom element 19"
2025   },
2026   {
2027     "custom_20",
2028     "custom",
2029     "custom element 20"
2030   },
2031   {
2032     "custom_21",
2033     "custom",
2034     "custom element 21"
2035   },
2036   {
2037     "custom_22",
2038     "custom",
2039     "custom element 22"
2040   },
2041   {
2042     "custom_23",
2043     "custom",
2044     "custom element 23"
2045   },
2046   {
2047     "custom_24",
2048     "custom",
2049     "custom element 24"
2050   },
2051   {
2052     "custom_25",
2053     "custom",
2054     "custom element 25"
2055   },
2056   {
2057     "custom_26",
2058     "custom",
2059     "custom element 26"
2060   },
2061   {
2062     "custom_27",
2063     "custom",
2064     "custom element 27"
2065   },
2066   {
2067     "custom_28",
2068     "custom",
2069     "custom element 28"
2070   },
2071   {
2072     "custom_29",
2073     "custom",
2074     "custom element 29"
2075   },
2076   {
2077     "custom_30",
2078     "custom",
2079     "custom element 30"
2080   },
2081   {
2082     "custom_31",
2083     "custom",
2084     "custom element 31"
2085   },
2086   {
2087     "custom_32",
2088     "custom",
2089     "custom element 32"
2090   },
2091   {
2092     "custom_33",
2093     "custom",
2094     "custom element 33"
2095   },
2096   {
2097     "custom_34",
2098     "custom",
2099     "custom element 34"
2100   },
2101   {
2102     "custom_35",
2103     "custom",
2104     "custom element 35"
2105   },
2106   {
2107     "custom_36",
2108     "custom",
2109     "custom element 36"
2110   },
2111   {
2112     "custom_37",
2113     "custom",
2114     "custom element 37"
2115   },
2116   {
2117     "custom_38",
2118     "custom",
2119     "custom element 38"
2120   },
2121   {
2122     "custom_39",
2123     "custom",
2124     "custom element 39"
2125   },
2126   {
2127     "custom_40",
2128     "custom",
2129     "custom element 40"
2130   },
2131   {
2132     "custom_41",
2133     "custom",
2134     "custom element 41"
2135   },
2136   {
2137     "custom_42",
2138     "custom",
2139     "custom element 42"
2140   },
2141   {
2142     "custom_43",
2143     "custom",
2144     "custom element 43"
2145   },
2146   {
2147     "custom_44",
2148     "custom",
2149     "custom element 44"
2150   },
2151   {
2152     "custom_45",
2153     "custom",
2154     "custom element 45"
2155   },
2156   {
2157     "custom_46",
2158     "custom",
2159     "custom element 46"
2160   },
2161   {
2162     "custom_47",
2163     "custom",
2164     "custom element 47"
2165   },
2166   {
2167     "custom_48",
2168     "custom",
2169     "custom element 48"
2170   },
2171   {
2172     "custom_49",
2173     "custom",
2174     "custom element 49"
2175   },
2176   {
2177     "custom_50",
2178     "custom",
2179     "custom element 50"
2180   },
2181   {
2182     "custom_51",
2183     "custom",
2184     "custom element 51"
2185   },
2186   {
2187     "custom_52",
2188     "custom",
2189     "custom element 52"
2190   },
2191   {
2192     "custom_53",
2193     "custom",
2194     "custom element 53"
2195   },
2196   {
2197     "custom_54",
2198     "custom",
2199     "custom element 54"
2200   },
2201   {
2202     "custom_55",
2203     "custom",
2204     "custom element 55"
2205   },
2206   {
2207     "custom_56",
2208     "custom",
2209     "custom element 56"
2210   },
2211   {
2212     "custom_57",
2213     "custom",
2214     "custom element 57"
2215   },
2216   {
2217     "custom_58",
2218     "custom",
2219     "custom element 58"
2220   },
2221   {
2222     "custom_59",
2223     "custom",
2224     "custom element 59"
2225   },
2226   {
2227     "custom_60",
2228     "custom",
2229     "custom element 60"
2230   },
2231   {
2232     "custom_61",
2233     "custom",
2234     "custom element 61"
2235   },
2236   {
2237     "custom_62",
2238     "custom",
2239     "custom element 62"
2240   },
2241   {
2242     "custom_63",
2243     "custom",
2244     "custom element 63"
2245   },
2246   {
2247     "custom_64",
2248     "custom",
2249     "custom element 64"
2250   },
2251   {
2252     "custom_65",
2253     "custom",
2254     "custom element 65"
2255   },
2256   {
2257     "custom_66",
2258     "custom",
2259     "custom element 66"
2260   },
2261   {
2262     "custom_67",
2263     "custom",
2264     "custom element 67"
2265   },
2266   {
2267     "custom_68",
2268     "custom",
2269     "custom element 68"
2270   },
2271   {
2272     "custom_69",
2273     "custom",
2274     "custom element 69"
2275   },
2276   {
2277     "custom_70",
2278     "custom",
2279     "custom element 70"
2280   },
2281   {
2282     "custom_71",
2283     "custom",
2284     "custom element 71"
2285   },
2286   {
2287     "custom_72",
2288     "custom",
2289     "custom element 72"
2290   },
2291   {
2292     "custom_73",
2293     "custom",
2294     "custom element 73"
2295   },
2296   {
2297     "custom_74",
2298     "custom",
2299     "custom element 74"
2300   },
2301   {
2302     "custom_75",
2303     "custom",
2304     "custom element 75"
2305   },
2306   {
2307     "custom_76",
2308     "custom",
2309     "custom element 76"
2310   },
2311   {
2312     "custom_77",
2313     "custom",
2314     "custom element 77"
2315   },
2316   {
2317     "custom_78",
2318     "custom",
2319     "custom element 78"
2320   },
2321   {
2322     "custom_79",
2323     "custom",
2324     "custom element 79"
2325   },
2326   {
2327     "custom_80",
2328     "custom",
2329     "custom element 80"
2330   },
2331   {
2332     "custom_81",
2333     "custom",
2334     "custom element 81"
2335   },
2336   {
2337     "custom_82",
2338     "custom",
2339     "custom element 82"
2340   },
2341   {
2342     "custom_83",
2343     "custom",
2344     "custom element 83"
2345   },
2346   {
2347     "custom_84",
2348     "custom",
2349     "custom element 84"
2350   },
2351   {
2352     "custom_85",
2353     "custom",
2354     "custom element 85"
2355   },
2356   {
2357     "custom_86",
2358     "custom",
2359     "custom element 86"
2360   },
2361   {
2362     "custom_87",
2363     "custom",
2364     "custom element 87"
2365   },
2366   {
2367     "custom_88",
2368     "custom",
2369     "custom element 88"
2370   },
2371   {
2372     "custom_89",
2373     "custom",
2374     "custom element 89"
2375   },
2376   {
2377     "custom_90",
2378     "custom",
2379     "custom element 90"
2380   },
2381   {
2382     "custom_91",
2383     "custom",
2384     "custom element 91"
2385   },
2386   {
2387     "custom_92",
2388     "custom",
2389     "custom element 92"
2390   },
2391   {
2392     "custom_93",
2393     "custom",
2394     "custom element 93"
2395   },
2396   {
2397     "custom_94",
2398     "custom",
2399     "custom element 94"
2400   },
2401   {
2402     "custom_95",
2403     "custom",
2404     "custom element 95"
2405   },
2406   {
2407     "custom_96",
2408     "custom",
2409     "custom element 96"
2410   },
2411   {
2412     "custom_97",
2413     "custom",
2414     "custom element 97"
2415   },
2416   {
2417     "custom_98",
2418     "custom",
2419     "custom element 98"
2420   },
2421   {
2422     "custom_99",
2423     "custom",
2424     "custom element 99"
2425   },
2426   {
2427     "custom_100",
2428     "custom",
2429     "custom element 100"
2430   },
2431   {
2432     "custom_101",
2433     "custom",
2434     "custom element 101"
2435   },
2436   {
2437     "custom_102",
2438     "custom",
2439     "custom element 102"
2440   },
2441   {
2442     "custom_103",
2443     "custom",
2444     "custom element 103"
2445   },
2446   {
2447     "custom_104",
2448     "custom",
2449     "custom element 104"
2450   },
2451   {
2452     "custom_105",
2453     "custom",
2454     "custom element 105"
2455   },
2456   {
2457     "custom_106",
2458     "custom",
2459     "custom element 106"
2460   },
2461   {
2462     "custom_107",
2463     "custom",
2464     "custom element 107"
2465   },
2466   {
2467     "custom_108",
2468     "custom",
2469     "custom element 108"
2470   },
2471   {
2472     "custom_109",
2473     "custom",
2474     "custom element 109"
2475   },
2476   {
2477     "custom_110",
2478     "custom",
2479     "custom element 110"
2480   },
2481   {
2482     "custom_111",
2483     "custom",
2484     "custom element 111"
2485   },
2486   {
2487     "custom_112",
2488     "custom",
2489     "custom element 112"
2490   },
2491   {
2492     "custom_113",
2493     "custom",
2494     "custom element 113"
2495   },
2496   {
2497     "custom_114",
2498     "custom",
2499     "custom element 114"
2500   },
2501   {
2502     "custom_115",
2503     "custom",
2504     "custom element 115"
2505   },
2506   {
2507     "custom_116",
2508     "custom",
2509     "custom element 116"
2510   },
2511   {
2512     "custom_117",
2513     "custom",
2514     "custom element 117"
2515   },
2516   {
2517     "custom_118",
2518     "custom",
2519     "custom element 118"
2520   },
2521   {
2522     "custom_119",
2523     "custom",
2524     "custom element 119"
2525   },
2526   {
2527     "custom_120",
2528     "custom",
2529     "custom element 120"
2530   },
2531   {
2532     "custom_121",
2533     "custom",
2534     "custom element 121"
2535   },
2536   {
2537     "custom_122",
2538     "custom",
2539     "custom element 122"
2540   },
2541   {
2542     "custom_123",
2543     "custom",
2544     "custom element 123"
2545   },
2546   {
2547     "custom_124",
2548     "custom",
2549     "custom element 124"
2550   },
2551   {
2552     "custom_125",
2553     "custom",
2554     "custom element 125"
2555   },
2556   {
2557     "custom_126",
2558     "custom",
2559     "custom element 126"
2560   },
2561   {
2562     "custom_127",
2563     "custom",
2564     "custom element 127"
2565   },
2566   {
2567     "custom_128",
2568     "custom",
2569     "custom element 128"
2570   },
2571   {
2572     "custom_129",
2573     "custom",
2574     "custom element 129"
2575   },
2576   {
2577     "custom_130",
2578     "custom",
2579     "custom element 130"
2580   },
2581   {
2582     "custom_131",
2583     "custom",
2584     "custom element 131"
2585   },
2586   {
2587     "custom_132",
2588     "custom",
2589     "custom element 132"
2590   },
2591   {
2592     "custom_133",
2593     "custom",
2594     "custom element 133"
2595   },
2596   {
2597     "custom_134",
2598     "custom",
2599     "custom element 134"
2600   },
2601   {
2602     "custom_135",
2603     "custom",
2604     "custom element 135"
2605   },
2606   {
2607     "custom_136",
2608     "custom",
2609     "custom element 136"
2610   },
2611   {
2612     "custom_137",
2613     "custom",
2614     "custom element 137"
2615   },
2616   {
2617     "custom_138",
2618     "custom",
2619     "custom element 138"
2620   },
2621   {
2622     "custom_139",
2623     "custom",
2624     "custom element 139"
2625   },
2626   {
2627     "custom_140",
2628     "custom",
2629     "custom element 140"
2630   },
2631   {
2632     "custom_141",
2633     "custom",
2634     "custom element 141"
2635   },
2636   {
2637     "custom_142",
2638     "custom",
2639     "custom element 142"
2640   },
2641   {
2642     "custom_143",
2643     "custom",
2644     "custom element 143"
2645   },
2646   {
2647     "custom_144",
2648     "custom",
2649     "custom element 144"
2650   },
2651   {
2652     "custom_145",
2653     "custom",
2654     "custom element 145"
2655   },
2656   {
2657     "custom_146",
2658     "custom",
2659     "custom element 146"
2660   },
2661   {
2662     "custom_147",
2663     "custom",
2664     "custom element 147"
2665   },
2666   {
2667     "custom_148",
2668     "custom",
2669     "custom element 148"
2670   },
2671   {
2672     "custom_149",
2673     "custom",
2674     "custom element 149"
2675   },
2676   {
2677     "custom_150",
2678     "custom",
2679     "custom element 150"
2680   },
2681   {
2682     "custom_151",
2683     "custom",
2684     "custom element 151"
2685   },
2686   {
2687     "custom_152",
2688     "custom",
2689     "custom element 152"
2690   },
2691   {
2692     "custom_153",
2693     "custom",
2694     "custom element 153"
2695   },
2696   {
2697     "custom_154",
2698     "custom",
2699     "custom element 154"
2700   },
2701   {
2702     "custom_155",
2703     "custom",
2704     "custom element 155"
2705   },
2706   {
2707     "custom_156",
2708     "custom",
2709     "custom element 156"
2710   },
2711   {
2712     "custom_157",
2713     "custom",
2714     "custom element 157"
2715   },
2716   {
2717     "custom_158",
2718     "custom",
2719     "custom element 158"
2720   },
2721   {
2722     "custom_159",
2723     "custom",
2724     "custom element 159"
2725   },
2726   {
2727     "custom_160",
2728     "custom",
2729     "custom element 160"
2730   },
2731   {
2732     "custom_161",
2733     "custom",
2734     "custom element 161"
2735   },
2736   {
2737     "custom_162",
2738     "custom",
2739     "custom element 162"
2740   },
2741   {
2742     "custom_163",
2743     "custom",
2744     "custom element 163"
2745   },
2746   {
2747     "custom_164",
2748     "custom",
2749     "custom element 164"
2750   },
2751   {
2752     "custom_165",
2753     "custom",
2754     "custom element 165"
2755   },
2756   {
2757     "custom_166",
2758     "custom",
2759     "custom element 166"
2760   },
2761   {
2762     "custom_167",
2763     "custom",
2764     "custom element 167"
2765   },
2766   {
2767     "custom_168",
2768     "custom",
2769     "custom element 168"
2770   },
2771   {
2772     "custom_169",
2773     "custom",
2774     "custom element 169"
2775   },
2776   {
2777     "custom_170",
2778     "custom",
2779     "custom element 170"
2780   },
2781   {
2782     "custom_171",
2783     "custom",
2784     "custom element 171"
2785   },
2786   {
2787     "custom_172",
2788     "custom",
2789     "custom element 172"
2790   },
2791   {
2792     "custom_173",
2793     "custom",
2794     "custom element 173"
2795   },
2796   {
2797     "custom_174",
2798     "custom",
2799     "custom element 174"
2800   },
2801   {
2802     "custom_175",
2803     "custom",
2804     "custom element 175"
2805   },
2806   {
2807     "custom_176",
2808     "custom",
2809     "custom element 176"
2810   },
2811   {
2812     "custom_177",
2813     "custom",
2814     "custom element 177"
2815   },
2816   {
2817     "custom_178",
2818     "custom",
2819     "custom element 178"
2820   },
2821   {
2822     "custom_179",
2823     "custom",
2824     "custom element 179"
2825   },
2826   {
2827     "custom_180",
2828     "custom",
2829     "custom element 180"
2830   },
2831   {
2832     "custom_181",
2833     "custom",
2834     "custom element 181"
2835   },
2836   {
2837     "custom_182",
2838     "custom",
2839     "custom element 182"
2840   },
2841   {
2842     "custom_183",
2843     "custom",
2844     "custom element 183"
2845   },
2846   {
2847     "custom_184",
2848     "custom",
2849     "custom element 184"
2850   },
2851   {
2852     "custom_185",
2853     "custom",
2854     "custom element 185"
2855   },
2856   {
2857     "custom_186",
2858     "custom",
2859     "custom element 186"
2860   },
2861   {
2862     "custom_187",
2863     "custom",
2864     "custom element 187"
2865   },
2866   {
2867     "custom_188",
2868     "custom",
2869     "custom element 188"
2870   },
2871   {
2872     "custom_189",
2873     "custom",
2874     "custom element 189"
2875   },
2876   {
2877     "custom_190",
2878     "custom",
2879     "custom element 190"
2880   },
2881   {
2882     "custom_191",
2883     "custom",
2884     "custom element 191"
2885   },
2886   {
2887     "custom_192",
2888     "custom",
2889     "custom element 192"
2890   },
2891   {
2892     "custom_193",
2893     "custom",
2894     "custom element 193"
2895   },
2896   {
2897     "custom_194",
2898     "custom",
2899     "custom element 194"
2900   },
2901   {
2902     "custom_195",
2903     "custom",
2904     "custom element 195"
2905   },
2906   {
2907     "custom_196",
2908     "custom",
2909     "custom element 196"
2910   },
2911   {
2912     "custom_197",
2913     "custom",
2914     "custom element 197"
2915   },
2916   {
2917     "custom_198",
2918     "custom",
2919     "custom element 198"
2920   },
2921   {
2922     "custom_199",
2923     "custom",
2924     "custom element 199"
2925   },
2926   {
2927     "custom_200",
2928     "custom",
2929     "custom element 200"
2930   },
2931   {
2932     "custom_201",
2933     "custom",
2934     "custom element 201"
2935   },
2936   {
2937     "custom_202",
2938     "custom",
2939     "custom element 202"
2940   },
2941   {
2942     "custom_203",
2943     "custom",
2944     "custom element 203"
2945   },
2946   {
2947     "custom_204",
2948     "custom",
2949     "custom element 204"
2950   },
2951   {
2952     "custom_205",
2953     "custom",
2954     "custom element 205"
2955   },
2956   {
2957     "custom_206",
2958     "custom",
2959     "custom element 206"
2960   },
2961   {
2962     "custom_207",
2963     "custom",
2964     "custom element 207"
2965   },
2966   {
2967     "custom_208",
2968     "custom",
2969     "custom element 208"
2970   },
2971   {
2972     "custom_209",
2973     "custom",
2974     "custom element 209"
2975   },
2976   {
2977     "custom_210",
2978     "custom",
2979     "custom element 210"
2980   },
2981   {
2982     "custom_211",
2983     "custom",
2984     "custom element 211"
2985   },
2986   {
2987     "custom_212",
2988     "custom",
2989     "custom element 212"
2990   },
2991   {
2992     "custom_213",
2993     "custom",
2994     "custom element 213"
2995   },
2996   {
2997     "custom_214",
2998     "custom",
2999     "custom element 214"
3000   },
3001   {
3002     "custom_215",
3003     "custom",
3004     "custom element 215"
3005   },
3006   {
3007     "custom_216",
3008     "custom",
3009     "custom element 216"
3010   },
3011   {
3012     "custom_217",
3013     "custom",
3014     "custom element 217"
3015   },
3016   {
3017     "custom_218",
3018     "custom",
3019     "custom element 218"
3020   },
3021   {
3022     "custom_219",
3023     "custom",
3024     "custom element 219"
3025   },
3026   {
3027     "custom_220",
3028     "custom",
3029     "custom element 220"
3030   },
3031   {
3032     "custom_221",
3033     "custom",
3034     "custom element 221"
3035   },
3036   {
3037     "custom_222",
3038     "custom",
3039     "custom element 222"
3040   },
3041   {
3042     "custom_223",
3043     "custom",
3044     "custom element 223"
3045   },
3046   {
3047     "custom_224",
3048     "custom",
3049     "custom element 224"
3050   },
3051   {
3052     "custom_225",
3053     "custom",
3054     "custom element 225"
3055   },
3056   {
3057     "custom_226",
3058     "custom",
3059     "custom element 226"
3060   },
3061   {
3062     "custom_227",
3063     "custom",
3064     "custom element 227"
3065   },
3066   {
3067     "custom_228",
3068     "custom",
3069     "custom element 228"
3070   },
3071   {
3072     "custom_229",
3073     "custom",
3074     "custom element 229"
3075   },
3076   {
3077     "custom_230",
3078     "custom",
3079     "custom element 230"
3080   },
3081   {
3082     "custom_231",
3083     "custom",
3084     "custom element 231"
3085   },
3086   {
3087     "custom_232",
3088     "custom",
3089     "custom element 232"
3090   },
3091   {
3092     "custom_233",
3093     "custom",
3094     "custom element 233"
3095   },
3096   {
3097     "custom_234",
3098     "custom",
3099     "custom element 234"
3100   },
3101   {
3102     "custom_235",
3103     "custom",
3104     "custom element 235"
3105   },
3106   {
3107     "custom_236",
3108     "custom",
3109     "custom element 236"
3110   },
3111   {
3112     "custom_237",
3113     "custom",
3114     "custom element 237"
3115   },
3116   {
3117     "custom_238",
3118     "custom",
3119     "custom element 238"
3120   },
3121   {
3122     "custom_239",
3123     "custom",
3124     "custom element 239"
3125   },
3126   {
3127     "custom_240",
3128     "custom",
3129     "custom element 240"
3130   },
3131   {
3132     "custom_241",
3133     "custom",
3134     "custom element 241"
3135   },
3136   {
3137     "custom_242",
3138     "custom",
3139     "custom element 242"
3140   },
3141   {
3142     "custom_243",
3143     "custom",
3144     "custom element 243"
3145   },
3146   {
3147     "custom_244",
3148     "custom",
3149     "custom element 244"
3150   },
3151   {
3152     "custom_245",
3153     "custom",
3154     "custom element 245"
3155   },
3156   {
3157     "custom_246",
3158     "custom",
3159     "custom element 246"
3160   },
3161   {
3162     "custom_247",
3163     "custom",
3164     "custom element 247"
3165   },
3166   {
3167     "custom_248",
3168     "custom",
3169     "custom element 248"
3170   },
3171   {
3172     "custom_249",
3173     "custom",
3174     "custom element 249"
3175   },
3176   {
3177     "custom_250",
3178     "custom",
3179     "custom element 250"
3180   },
3181   {
3182     "custom_251",
3183     "custom",
3184     "custom element 251"
3185   },
3186   {
3187     "custom_252",
3188     "custom",
3189     "custom element 252"
3190   },
3191   {
3192     "custom_253",
3193     "custom",
3194     "custom element 253"
3195   },
3196   {
3197     "custom_254",
3198     "custom",
3199     "custom element 254"
3200   },
3201   {
3202     "custom_255",
3203     "custom",
3204     "custom element 255"
3205   },
3206   {
3207     "custom_256",
3208     "custom",
3209     "custom element 256"
3210   },
3211   {
3212     "em_key_1",
3213     "key",
3214     "key 1 (EM style)"
3215     },
3216   {
3217     "em_key_2",
3218     "key",
3219     "key 2 (EM style)"
3220     },
3221   {
3222     "em_key_3",
3223     "key",
3224     "key 3 (EM style)"
3225   },
3226   {
3227     "em_key_4",
3228     "key",
3229     "key 4 (EM style)"
3230   },
3231   {
3232     "envelope_1",
3233     "envelope",
3234     "mail envelope 1"
3235   },
3236   {
3237     "envelope_2",
3238     "envelope",
3239     "mail envelope 2"
3240   },
3241   {
3242     "envelope_3",
3243     "envelope",
3244     "mail envelope 3"
3245   },
3246   {
3247     "envelope_4",
3248     "envelope",
3249     "mail envelope 4"
3250   },
3251   {
3252     "group_1",
3253     "group",
3254     "group element 1"
3255   },
3256   {
3257     "group_2",
3258     "group",
3259     "group element 2"
3260   },
3261   {
3262     "group_3",
3263     "group",
3264     "group element 3"
3265   },
3266   {
3267     "group_4",
3268     "group",
3269     "group element 4"
3270   },
3271   {
3272     "group_5",
3273     "group",
3274     "group element 5"
3275   },
3276   {
3277     "group_6",
3278     "group",
3279     "group element 6"
3280   },
3281   {
3282     "group_7",
3283     "group",
3284     "group element 7"
3285   },
3286   {
3287     "group_8",
3288     "group",
3289     "group element 8"
3290   },
3291   {
3292     "group_9",
3293     "group",
3294     "group element 9"
3295   },
3296   {
3297     "group_10",
3298     "group",
3299     "group element 10"
3300   },
3301   {
3302     "group_11",
3303     "group",
3304     "group element 11"
3305   },
3306   {
3307     "group_12",
3308     "group",
3309     "group element 12"
3310   },
3311   {
3312     "group_13",
3313     "group",
3314     "group element 13"
3315   },
3316   {
3317     "group_14",
3318     "group",
3319     "group element 14"
3320   },
3321   {
3322     "group_15",
3323     "group",
3324     "group element 15"
3325   },
3326   {
3327     "group_16",
3328     "group",
3329     "group element 16"
3330   },
3331   {
3332     "group_17",
3333     "group",
3334     "group element 17"
3335   },
3336   {
3337     "group_18",
3338     "group",
3339     "group element 18"
3340   },
3341   {
3342     "group_19",
3343     "group",
3344     "group element 19"
3345   },
3346   {
3347     "group_20",
3348     "group",
3349     "group element 20"
3350   },
3351   {
3352     "group_21",
3353     "group",
3354     "group element 21"
3355   },
3356   {
3357     "group_22",
3358     "group",
3359     "group element 22"
3360   },
3361   {
3362     "group_23",
3363     "group",
3364     "group element 23"
3365   },
3366   {
3367     "group_24",
3368     "group",
3369     "group element 24"
3370   },
3371   {
3372     "group_25",
3373     "group",
3374     "group element 25"
3375   },
3376   {
3377     "group_26",
3378     "group",
3379     "group element 26"
3380   },
3381   {
3382     "group_27",
3383     "group",
3384     "group element 27"
3385   },
3386   {
3387     "group_28",
3388     "group",
3389     "group element 28"
3390   },
3391   {
3392     "group_29",
3393     "group",
3394     "group element 29"
3395   },
3396   {
3397     "group_30",
3398     "group",
3399     "group element 30"
3400   },
3401   {
3402     "group_31",
3403     "group",
3404     "group element 31"
3405   },
3406   {
3407     "group_32",
3408     "group",
3409     "group element 32"
3410   },
3411   {
3412     "unknown",
3413     "unknown",
3414     "unknown element"
3415   },
3416   {
3417     "trigger_element",
3418     "trigger",
3419     "element triggering change"
3420   },
3421   {
3422     "trigger_player",
3423     "trigger",
3424     "player triggering change"
3425   },
3426   {
3427     "sp_gravity_on_port_right",
3428     "sp_port",
3429     "gravity on port (leading right)"
3430   },
3431   {
3432     "sp_gravity_on_port_down",
3433     "sp_port",
3434     "gravity on port (leading down)"
3435   },
3436   {
3437     "sp_gravity_on_port_left",
3438     "sp_port",
3439     "gravity on port (leading left)"
3440   },
3441   {
3442     "sp_gravity_on_port_up",
3443     "sp_port",
3444     "gravity on port (leading up)"
3445   },
3446   {
3447     "sp_gravity_off_port_right",
3448     "sp_port",
3449     "gravity off port (leading right)"
3450   },
3451   {
3452     "sp_gravity_off_port_down",
3453     "sp_port",
3454     "gravity off port (leading down)"
3455   },
3456   {
3457     "sp_gravity_off_port_left",
3458     "sp_port",
3459     "gravity off port (leading left)"
3460   },
3461   {
3462     "sp_gravity_off_port_up",
3463     "sp_port",
3464     "gravity off port (leading up)"
3465   },
3466   {
3467     "balloon_switch_none",
3468     "balloon_switch",
3469     "wind switch (off)"
3470   },
3471   {
3472     "emc_gate_5",
3473     "gate",
3474     "door 5 (EMC style)",
3475   },
3476   {
3477     "emc_gate_6",
3478     "gate",
3479     "door 6 (EMC style)",
3480   },
3481   {
3482     "emc_gate_7",
3483     "gate",
3484     "door 7 (EMC style)",
3485   },
3486   {
3487     "emc_gate_8",
3488     "gate",
3489     "door 8 (EMC style)",
3490   },
3491   {
3492     "emc_gate_5_gray",
3493     "gate",
3494     "gray door (EMC style, key 5)",
3495   },
3496   {
3497     "emc_gate_6_gray",
3498     "gate",
3499     "gray door (EMC style, key 6)",
3500   },
3501   {
3502     "emc_gate_7_gray",
3503     "gate",
3504     "gray door (EMC style, key 7)",
3505   },
3506   {
3507     "emc_gate_8_gray",
3508     "gate",
3509     "gray door (EMC style, key 8)",
3510   },
3511   {
3512     "emc_key_5",
3513     "key",
3514     "key 5 (EMC style)",
3515   },
3516   {
3517     "emc_key_6",
3518     "key",
3519     "key 6 (EMC style)",
3520   },
3521   {
3522     "emc_key_7",
3523     "key",
3524     "key 7 (EMC style)",
3525   },
3526   {
3527     "emc_key_8",
3528     "key",
3529     "key 8 (EMC style)",
3530   },
3531   {
3532     "emc_android",
3533     "emc_android",
3534     "android",
3535   },
3536   {
3537     "emc_grass",
3538     "emc_grass",
3539     "grass",
3540   },
3541   {
3542     "emc_magic_ball",
3543     "emc_magic_ball",
3544     "magic ball",
3545   },
3546   {
3547     "emc_magic_ball.active",
3548     "emc_magic_ball",
3549     "magic ball (activated)",
3550   },
3551   {
3552     "emc_magic_ball_switch",
3553     "emc_magic_ball_switch",
3554     "magic ball switch (off)",
3555   },
3556   {
3557     "emc_magic_ball_switch.active",
3558     "emc_magic_ball_switch",
3559     "magic ball switch (on)",
3560   },
3561   {
3562     "emc_spring_bumper",
3563     "emc_spring_bumper",
3564     "spring bumper",
3565   },
3566   {
3567     "emc_plant",
3568     "emc_plant",
3569     "plant",
3570   },
3571   {
3572     "emc_lenses",
3573     "emc_lenses",
3574     "lenses",
3575   },
3576   {
3577     "emc_magnifier",
3578     "emc_magnifier",
3579     "magnifier",
3580   },
3581   {
3582     "emc_wall_9",
3583     "wall",
3584     "normal wall"
3585   },
3586   {
3587     "emc_wall_10",
3588     "wall",
3589     "normal wall"
3590   },
3591   {
3592     "emc_wall_11",
3593     "wall",
3594     "normal wall"
3595   },
3596   {
3597     "emc_wall_12",
3598     "wall",
3599     "normal wall"
3600   },
3601   {
3602     "emc_wall_13",
3603     "wall",
3604     "normal wall"
3605   },
3606   {
3607     "emc_wall_14",
3608     "wall",
3609     "normal wall"
3610   },
3611   {
3612     "emc_wall_15",
3613     "wall",
3614     "normal wall"
3615   },
3616   {
3617     "emc_wall_16",
3618     "wall",
3619     "normal wall"
3620   },
3621   {
3622     "emc_wall_slippery_1",
3623     "wall",
3624     "slippery wall"
3625   },
3626   {
3627     "emc_wall_slippery_2",
3628     "wall",
3629     "slippery wall"
3630   },
3631   {
3632     "emc_wall_slippery_3",
3633     "wall",
3634     "slippery wall"
3635   },
3636   {
3637     "emc_wall_slippery_4",
3638     "wall",
3639     "slippery wall"
3640   },
3641   {
3642     "emc_fake_grass",
3643     "fake_grass",
3644     "fake grass"
3645   },
3646   {
3647     "emc_fake_acid",
3648     "fake_acid",
3649     "fake acid"
3650   },
3651   {
3652     "emc_dripper",
3653     "dripper",
3654     "dripper"
3655   },
3656   {
3657     "trigger_ce_value",
3658     "trigger",
3659     "CE value of element triggering change"
3660   },
3661   {
3662     "trigger_ce_score",
3663     "trigger",
3664     "CE score of element triggering change"
3665   },
3666   {
3667     "current_ce_value",
3668     "current",
3669     "CE value of current element"
3670   },
3671   {
3672     "current_ce_score",
3673     "current",
3674     "CE score of current element"
3675   },
3676   {
3677     "yamyam.left",
3678     "yamyam",
3679     "yam yam (starts moving left)"
3680   },
3681   {
3682     "yamyam.right",
3683     "yamyam",
3684     "yam yam (starts moving right)"
3685   },
3686   {
3687     "yamyam.up",
3688     "yamyam",
3689     "yam yam (starts moving up)"
3690   },
3691   {
3692     "yamyam.down",
3693     "yamyam",
3694     "yam yam (starts moving down)"
3695   },
3696   {
3697     "bd_expandable_wall",
3698     "wall",
3699     "growing wall (horizontal, BD style)"
3700   },
3701   {
3702     "last_ce_8",
3703     "last_ce",
3704     "CE 8 positions earlier in list"
3705   },
3706   {
3707     "last_ce_7",
3708     "last_ce",
3709     "CE 7 positions earlier in list"
3710   },
3711   {
3712     "last_ce_6",
3713     "last_ce",
3714     "CE 6 positions earlier in list"
3715   },
3716   {
3717     "last_ce_5",
3718     "last_ce",
3719     "CE 5 positions earlier in list"
3720   },
3721   {
3722     "last_ce_4",
3723     "last_ce",
3724     "CE 4 positions earlier in list"
3725   },
3726   {
3727     "last_ce_3",
3728     "last_ce",
3729     "CE 3 positions earlier in list"
3730   },
3731   {
3732     "last_ce_2",
3733     "last_ce",
3734     "CE 2 positions earlier in list"
3735   },
3736   {
3737     "last_ce_1",
3738     "last_ce",
3739     "CE 1 position earlier in list"
3740   },
3741   {
3742     "self",
3743     "self",
3744     "the current custom element"
3745   },
3746   {
3747     "next_ce_1",
3748     "next_ce",
3749     "CE 1 position later in list"
3750   },
3751   {
3752     "next_ce_2",
3753     "next_ce",
3754     "CE 2 positions later in list"
3755   },
3756   {
3757     "next_ce_3",
3758     "next_ce",
3759     "CE 3 positions later in list"
3760   },
3761   {
3762     "next_ce_4",
3763     "next_ce",
3764     "CE 4 positions later in list"
3765   },
3766   {
3767     "next_ce_5",
3768     "next_ce",
3769     "CE 5 positions later in list"
3770   },
3771   {
3772     "next_ce_6",
3773     "next_ce",
3774     "CE 6 positions later in list"
3775   },
3776   {
3777     "next_ce_7",
3778     "next_ce",
3779     "CE 7 positions later in list"
3780   },
3781   {
3782     "next_ce_8",
3783     "next_ce",
3784     "CE 8 positions later in list"
3785   },
3786   {
3787     "any_element",
3788     "any_element",
3789     "this element matches any element"
3790   },
3791
3792   /* ----------------------------------------------------------------------- */
3793   /* "real" (and therefore drawable) runtime elements                        */
3794   /* ----------------------------------------------------------------------- */
3795
3796   {
3797     "dynabomb_player_1.active",
3798     "dynabomb",
3799     "-"
3800   },
3801   {
3802     "dynabomb_player_2.active",
3803     "dynabomb",
3804     "-"
3805   },
3806   {
3807     "dynabomb_player_3.active",
3808     "dynabomb",
3809     "-"
3810   },
3811   {
3812     "dynabomb_player_4.active",
3813     "dynabomb",
3814     "-"
3815   },
3816   {
3817     "sp_disk_red.active",
3818     "dynamite",
3819     "-"
3820   },
3821   {
3822     "switchgate.opening",
3823     "switchgate",
3824     "-"
3825   },
3826   {
3827     "switchgate.closing",
3828     "switchgate",
3829     "-"
3830   },
3831   {
3832     "timegate.opening",
3833     "timegate",
3834     "-"
3835   },
3836   {
3837     "timegate.closing",
3838     "timegate",
3839     "-"
3840   },
3841   {
3842     "pearl.breaking",
3843     "pearl",
3844     "-"
3845   },
3846   {
3847     "trap.active",
3848     "trap",
3849     "-"
3850   },
3851   {
3852     "invisible_steelwall.active",
3853     "steelwall",
3854     "-"
3855   },
3856   {
3857     "invisible_wall.active",
3858     "wall",
3859     "-"
3860   },
3861   {
3862     "invisible_sand.active",
3863     "sand",
3864     "-"
3865   },
3866   {
3867     "conveyor_belt_1_left.active",
3868     "conveyor_belt",
3869     "-"
3870   },
3871   {
3872     "conveyor_belt_1_middle.active",
3873     "conveyor_belt",
3874     "-"
3875   },
3876   {
3877     "conveyor_belt_1_right.active",
3878     "conveyor_belt",
3879     "-"
3880   },
3881   {
3882     "conveyor_belt_2_left.active",
3883     "conveyor_belt",
3884     "-"
3885   },
3886   {
3887     "conveyor_belt_2_middle.active",
3888     "conveyor_belt",
3889     "-"
3890   },
3891   {
3892     "conveyor_belt_2_right.active",
3893     "conveyor_belt",
3894     "-"
3895   },
3896   {
3897     "conveyor_belt_3_left.active",
3898     "conveyor_belt",
3899     "-"
3900   },
3901   {
3902     "conveyor_belt_3_middle.active",
3903     "conveyor_belt",
3904     "-"
3905   },
3906   {
3907     "conveyor_belt_3_right.active",
3908     "conveyor_belt",
3909     "-"
3910   },
3911   {
3912     "conveyor_belt_4_left.active",
3913     "conveyor_belt",
3914     "-"
3915   },
3916   {
3917     "conveyor_belt_4_middle.active",
3918     "conveyor_belt",
3919     "-"
3920   },
3921   {
3922     "conveyor_belt_4_right.active",
3923     "conveyor_belt",
3924     "-"
3925   },
3926   {
3927     "exit.opening",
3928     "exit",
3929     "-"
3930   },
3931   {
3932     "exit.closing",
3933     "exit",
3934     "-"
3935   },
3936   {
3937     "sp_exit.opening",
3938     "sp_exit",
3939     "-"
3940   },
3941   {
3942     "sp_exit.closing",
3943     "sp_exit",
3944     "-"
3945   },
3946   {
3947     "sp_exit_open",
3948     "sp_exit",
3949     "-"
3950   },
3951   {
3952     "sp_terminal.active",
3953     "sp_terminal",
3954     "-"
3955   },
3956   {
3957     "sp_buggy_base.activating",
3958     "sp_buggy_base",
3959     "-"
3960   },
3961   {
3962     "sp_buggy_base.active",
3963     "sp_buggy_base",
3964     "-"
3965   },
3966   {
3967     "sp_murphy_clone",
3968     "murphy_clone",
3969     "-"
3970   },
3971   {
3972     "amoeba.dropping",
3973     "amoeba",
3974     "-"
3975   },
3976   {
3977     "quicksand.emptying",
3978     "quicksand",
3979     "-"
3980   },
3981   {
3982     "magic_wall.active",
3983     "magic_wall",
3984     "-"
3985   },
3986   {
3987     "bd_magic_wall.active",
3988     "magic_wall",
3989     "-"
3990   },
3991   {
3992     "magic_wall_full",
3993     "magic_wall",
3994     "-"
3995   },
3996   {
3997     "bd_magic_wall_full",
3998     "magic_wall",
3999     "-"
4000   },
4001   {
4002     "magic_wall.emptying",
4003     "magic_wall",
4004     "-"
4005   },
4006   {
4007     "bd_magic_wall.emptying",
4008     "magic_wall",
4009     "-"
4010   },
4011   {
4012     "magic_wall_dead",
4013     "magic_wall",
4014     "-"
4015   },
4016   {
4017     "bd_magic_wall_dead",
4018     "magic_wall",
4019     "-"
4020   },
4021
4022   {
4023     "emc_fake_grass.active",
4024     "fake_grass",
4025     "-"
4026   },
4027   {
4028     "gate_1_gray.active",
4029     "gate",
4030     ""
4031   },
4032   {
4033     "gate_2_gray.active",
4034     "gate",
4035     ""
4036   },
4037   {
4038     "gate_3_gray.active",
4039     "gate",
4040     ""
4041   },
4042   {
4043     "gate_4_gray.active",
4044     "gate",
4045     ""
4046   },
4047   {
4048     "em_gate_1_gray.active",
4049     "gate",
4050     ""
4051   },
4052   {
4053     "em_gate_2_gray.active",
4054     "gate",
4055     ""
4056   },
4057   {
4058     "em_gate_3_gray.active",
4059     "gate",
4060     ""
4061   },
4062   {
4063     "em_gate_4_gray.active",
4064     "gate",
4065     ""
4066   },
4067   {
4068     "emc_gate_5_gray.active",
4069     "gate",
4070     "",
4071   },
4072   {
4073     "emc_gate_6_gray.active",
4074     "gate",
4075     "",
4076   },
4077   {
4078     "emc_gate_7_gray.active",
4079     "gate",
4080     "",
4081   },
4082   {
4083     "emc_gate_8_gray.active",
4084     "gate",
4085     "",
4086   },
4087   {
4088     "emc_dripper.active",
4089     "dripper",
4090     "dripper"
4091   },
4092   {
4093     "emc_spring_bumper.active",
4094     "emc_spring_bumper",
4095     "spring bumper",
4096   },
4097
4098   /* ----------------------------------------------------------------------- */
4099   /* "unreal" (and therefore not drawable) runtime elements                  */
4100   /* ----------------------------------------------------------------------- */
4101
4102   {
4103     "blocked",
4104     "-",
4105     "-"
4106   },
4107   {
4108     "explosion",
4109     "-",
4110     "-"
4111   },
4112   {
4113     "nut.breaking",
4114     "-",
4115     "-"
4116   },
4117   {
4118     "diamond.breaking",
4119     "-",
4120     "-"
4121   },
4122   {
4123     "acid_splash_left",
4124     "-",
4125     "-"
4126   },
4127   {
4128     "acid_splash_right",
4129     "-",
4130     "-"
4131   },
4132   {
4133     "amoeba.growing",
4134     "-",
4135     "-"
4136   },
4137   {
4138     "amoeba.shrinking",
4139     "-",
4140     "-"
4141   },
4142   {
4143     "expandable_wall.growing",
4144     "-",
4145     "-"
4146   },
4147   {
4148     "flames",
4149     "-",
4150     "-"
4151   },
4152   {
4153     "player_is_leaving",
4154     "-",
4155     "-"
4156   },
4157   {
4158     "player_is_exploding_1",
4159     "-",
4160     "-"
4161   },
4162   {
4163     "player_is_exploding_2",
4164     "-",
4165     "-"
4166   },
4167   {
4168     "player_is_exploding_3",
4169     "-",
4170     "-"
4171   },
4172   {
4173     "player_is_exploding_4",
4174     "-",
4175     "-"
4176   },
4177   {
4178     "quicksand.filling",
4179     "quicksand",
4180     "-"
4181   },
4182   {
4183     "magic_wall.filling",
4184     "-",
4185     "-"
4186   },
4187   {
4188     "bd_magic_wall.filling",
4189     "-",
4190     "-"
4191   },
4192   {
4193     "element.snapping",
4194     "-",
4195     "-"
4196   },
4197   {
4198     "diagonal.shrinking",
4199     "-",
4200     "-"
4201   },
4202   {
4203     "diagonal.growing",
4204     "-",
4205     "-"
4206   },
4207
4208   /* ----------------------------------------------------------------------- */
4209   /* dummy elements (never used as game elements, only used as graphics)     */
4210   /* ----------------------------------------------------------------------- */
4211
4212   {
4213     "steelwall_topleft",
4214     "-",
4215     "-"
4216   },
4217   {
4218     "steelwall_topright",
4219     "-",
4220     "-"
4221   },
4222   {
4223     "steelwall_bottomleft",
4224     "-",
4225     "-"
4226   },
4227   {
4228     "steelwall_bottomright",
4229     "-",
4230     "-"
4231   },
4232   {
4233     "steelwall_horizontal",
4234     "-",
4235     "-"
4236   },
4237   {
4238     "steelwall_vertical",
4239     "-",
4240     "-"
4241   },
4242   {
4243     "invisible_steelwall_topleft",
4244     "-",
4245     "-"
4246   },
4247   {
4248     "invisible_steelwall_topright",
4249     "-",
4250     "-"
4251   },
4252   {
4253     "invisible_steelwall_bottomleft",
4254     "-",
4255     "-"
4256   },
4257   {
4258     "invisible_steelwall_bottomright",
4259     "-",
4260     "-"
4261   },
4262   {
4263     "invisible_steelwall_horizontal",
4264     "-",
4265     "-"
4266   },
4267   {
4268     "invisible_steelwall_vertical",
4269     "-",
4270     "-"
4271   },
4272   {
4273     "dynabomb",
4274     "-",
4275     "-"
4276   },
4277   {
4278     "dynabomb.active",
4279     "-",
4280     "-"
4281   },
4282   {
4283     "dynabomb_player_1",
4284     "-",
4285     "-"
4286   },
4287   {
4288     "dynabomb_player_2",
4289     "-",
4290     "-"
4291   },
4292   {
4293     "dynabomb_player_3",
4294     "-",
4295     "-"
4296   },
4297   {
4298     "dynabomb_player_4",
4299     "-",
4300     "-"
4301   },
4302   {
4303     "shield_normal.active",
4304     "-",
4305     "-"
4306   },
4307   {
4308     "shield_deadly.active",
4309     "-",
4310     "-"
4311   },
4312   {
4313     "amoeba",
4314     "amoeba",
4315     "-"
4316   },
4317   {
4318     "[default]",
4319     "default",
4320     "-"
4321   },
4322   {
4323     "[bd_default]",
4324     "bd_default",
4325     "-"
4326   },
4327   {
4328     "[sp_default]",
4329     "sp_default",
4330     "-"
4331   },
4332   {
4333     "[sb_default]",
4334     "sb_default",
4335     "-"
4336   },
4337   {
4338     "internal_clipboard_custom",
4339     "internal",
4340     "empty custom element"
4341   },
4342   {
4343     "internal_clipboard_change",
4344     "internal",
4345     "empty change page"
4346   },
4347   {
4348     "internal_clipboard_group",
4349     "internal",
4350     "empty group element"
4351   },
4352   {
4353     "internal_dummy",
4354     "internal",
4355     "-"
4356   },
4357   {
4358     "internal_cascade_bd",
4359     "internal",
4360     "show Boulder Dash elements"
4361   },
4362   {
4363     "internal_cascade_bd.active",
4364     "internal",
4365     "hide Boulder Dash elements"
4366   },
4367   {
4368     "internal_cascade_em",
4369     "internal",
4370     "show Emerald Mine elements"
4371   },
4372   {
4373     "internal_cascade_em.active",
4374     "internal",
4375     "hide Emerald Mine elements"
4376   },
4377   {
4378     "internal_cascade_emc",
4379     "internal",
4380     "show Emerald Mine Club elements"
4381   },
4382   {
4383     "internal_cascade_emc.active",
4384     "internal",
4385     "hide Emerald Mine Club elements"
4386   },
4387   {
4388     "internal_cascade_rnd",
4389     "internal",
4390     "show Rocks'n'Diamonds elements"
4391   },
4392   {
4393     "internal_cascade_rnd.active",
4394     "internal",
4395     "hide Rocks'n'Diamonds elements"
4396   },
4397   {
4398     "internal_cascade_sb",
4399     "internal",
4400     "show Sokoban elements"
4401   },
4402   {
4403     "internal_cascade_sb.active",
4404     "internal",
4405     "hide Sokoban elements"
4406   },
4407   {
4408     "internal_cascade_sp",
4409     "internal",
4410     "show Supaplex elements"
4411   },
4412   {
4413     "internal_cascade_sp.active",
4414     "internal",
4415     "hide Supaplex elements"
4416   },
4417   {
4418     "internal_cascade_dc",
4419     "internal",
4420     "show Diamond Caves II elements"
4421   },
4422   {
4423     "internal_cascade_dc.active",
4424     "internal",
4425     "hide Diamond Caves II elements"
4426   },
4427   {
4428     "internal_cascade_dx",
4429     "internal",
4430     "show DX Boulderdash elements"
4431   },
4432   {
4433     "internal_cascade_dx.active",
4434     "internal",
4435     "hide DX Boulderdash elements"
4436   },
4437   {
4438     "internal_cascade_chars",
4439     "internal",
4440     "show text elements"
4441   },
4442   {
4443     "internal_cascade_chars.active",
4444     "internal",
4445     "hide text elements"
4446   },
4447   {
4448     "internal_cascade_ce",
4449     "internal",
4450     "show custom elements"
4451   },
4452   {
4453     "internal_cascade_ce.active",
4454     "internal",
4455     "hide custom elements"
4456   },
4457   {
4458     "internal_cascade_ge",
4459     "internal",
4460     "show group elements"
4461   },
4462   {
4463     "internal_cascade_ge.active",
4464     "internal",
4465     "hide group elements"
4466   },
4467   {
4468     "internal_cascade_ref",
4469     "internal",
4470     "show reference elements"
4471   },
4472   {
4473     "internal_cascade_ref.active",
4474     "internal",
4475     "hide reference elements"
4476   },
4477   {
4478     "internal_cascade_user",
4479     "internal",
4480     "show user defined elements"
4481   },
4482   {
4483     "internal_cascade_user.active",
4484     "internal",
4485     "hide user defined elements"
4486   },
4487   {
4488     "internal_cascade_dynamic",
4489     "internal",
4490     "show elements used in this level"
4491   },
4492   {
4493     "internal_cascade_dynamic.active",
4494     "internal",
4495     "hide elements used in this level"
4496   },
4497
4498   /* keyword to stop parser: "ELEMENT_INFO_END" <-- do not change! */
4499
4500   {
4501     NULL,
4502     NULL,
4503     NULL
4504   }
4505 };
4506
4507
4508 /* ------------------------------------------------------------------------- */
4509 /* element action and direction definitions                                  */
4510 /* ------------------------------------------------------------------------- */
4511
4512 struct ElementActionInfo element_action_info[NUM_ACTIONS + 1 + 1] =
4513 {
4514   { ".[DEFAULT]",               ACTION_DEFAULT,                 TRUE    },
4515   { ".waiting",                 ACTION_WAITING,                 TRUE    },
4516   { ".falling",                 ACTION_FALLING,                 TRUE    },
4517   { ".moving",                  ACTION_MOVING,                  TRUE    },
4518   { ".digging",                 ACTION_DIGGING,                 FALSE   },
4519   { ".snapping",                ACTION_SNAPPING,                FALSE   },
4520   { ".collecting",              ACTION_COLLECTING,              FALSE   },
4521   { ".dropping",                ACTION_DROPPING,                FALSE   },
4522   { ".pushing",                 ACTION_PUSHING,                 FALSE   },
4523   { ".walking",                 ACTION_WALKING,                 FALSE   },
4524   { ".passing",                 ACTION_PASSING,                 FALSE   },
4525   { ".impact",                  ACTION_IMPACT,                  FALSE   },
4526   { ".breaking",                ACTION_BREAKING,                FALSE   },
4527   { ".activating",              ACTION_ACTIVATING,              FALSE   },
4528   { ".deactivating",            ACTION_DEACTIVATING,            FALSE   },
4529   { ".opening",                 ACTION_OPENING,                 FALSE   },
4530   { ".closing",                 ACTION_CLOSING,                 FALSE   },
4531   { ".attacking",               ACTION_ATTACKING,               TRUE    },
4532   { ".growing",                 ACTION_GROWING,                 TRUE    },
4533   { ".shrinking",               ACTION_SHRINKING,               FALSE   },
4534   { ".active",                  ACTION_ACTIVE,                  TRUE    },
4535   { ".filling",                 ACTION_FILLING,                 FALSE   },
4536   { ".emptying",                ACTION_EMPTYING,                FALSE   },
4537   { ".changing",                ACTION_CHANGING,                FALSE   },
4538   { ".exploding",               ACTION_EXPLODING,               FALSE   },
4539   { ".boring",                  ACTION_BORING,                  FALSE   },
4540   { ".boring[1]",               ACTION_BORING_1,                FALSE   },
4541   { ".boring[2]",               ACTION_BORING_2,                FALSE   },
4542   { ".boring[3]",               ACTION_BORING_3,                FALSE   },
4543   { ".boring[4]",               ACTION_BORING_4,                FALSE   },
4544   { ".boring[5]",               ACTION_BORING_5,                FALSE   },
4545   { ".boring[6]",               ACTION_BORING_6,                FALSE   },
4546   { ".boring[7]",               ACTION_BORING_7,                FALSE   },
4547   { ".boring[8]",               ACTION_BORING_8,                FALSE   },
4548   { ".boring[9]",               ACTION_BORING_9,                FALSE   },
4549   { ".boring[10]",              ACTION_BORING_10,               FALSE   },
4550   { ".sleeping",                ACTION_SLEEPING,                FALSE   },
4551   { ".sleeping[1]",             ACTION_SLEEPING_1,              FALSE   },
4552   { ".sleeping[2]",             ACTION_SLEEPING_2,              FALSE   },
4553   { ".sleeping[3]",             ACTION_SLEEPING_3,              FALSE   },
4554   { ".awakening",               ACTION_AWAKENING,               FALSE   },
4555   { ".dying",                   ACTION_DYING,                   FALSE   },
4556   { ".turning",                 ACTION_TURNING,                 FALSE   },
4557   { ".turning_from_left",       ACTION_TURNING_FROM_LEFT,       FALSE   },
4558   { ".turning_from_right",      ACTION_TURNING_FROM_RIGHT,      FALSE   },
4559   { ".turning_from_up",         ACTION_TURNING_FROM_UP,         FALSE   },
4560   { ".turning_from_down",       ACTION_TURNING_FROM_DOWN,       FALSE   },
4561   { ".smashed_by_rock",         ACTION_SMASHED_BY_ROCK,         FALSE   },
4562   { ".smashed_by_spring",       ACTION_SMASHED_BY_SPRING,       FALSE   },
4563   { ".eating",                  ACTION_EATING,                  FALSE   },
4564   { ".twinkling",               ACTION_TWINKLING,               FALSE   },
4565   { ".splashing",               ACTION_SPLASHING,               FALSE   },
4566   { ".page[1]",                 ACTION_PAGE_1,                  FALSE   },
4567   { ".page[2]",                 ACTION_PAGE_2,                  FALSE   },
4568   { ".page[3]",                 ACTION_PAGE_3,                  FALSE   },
4569   { ".page[4]",                 ACTION_PAGE_4,                  FALSE   },
4570   { ".page[5]",                 ACTION_PAGE_5,                  FALSE   },
4571   { ".page[6]",                 ACTION_PAGE_6,                  FALSE   },
4572   { ".page[7]",                 ACTION_PAGE_7,                  FALSE   },
4573   { ".page[8]",                 ACTION_PAGE_8,                  FALSE   },
4574   { ".page[9]",                 ACTION_PAGE_9,                  FALSE   },
4575   { ".page[10]",                ACTION_PAGE_10,                 FALSE   },
4576   { ".page[11]",                ACTION_PAGE_11,                 FALSE   },
4577   { ".page[12]",                ACTION_PAGE_12,                 FALSE   },
4578   { ".page[13]",                ACTION_PAGE_13,                 FALSE   },
4579   { ".page[14]",                ACTION_PAGE_14,                 FALSE   },
4580   { ".page[15]",                ACTION_PAGE_15,                 FALSE   },
4581   { ".page[16]",                ACTION_PAGE_16,                 FALSE   },
4582   { ".page[17]",                ACTION_PAGE_17,                 FALSE   },
4583   { ".page[18]",                ACTION_PAGE_18,                 FALSE   },
4584   { ".page[19]",                ACTION_PAGE_19,                 FALSE   },
4585   { ".page[20]",                ACTION_PAGE_20,                 FALSE   },
4586   { ".page[21]",                ACTION_PAGE_21,                 FALSE   },
4587   { ".page[22]",                ACTION_PAGE_22,                 FALSE   },
4588   { ".page[23]",                ACTION_PAGE_23,                 FALSE   },
4589   { ".page[24]",                ACTION_PAGE_24,                 FALSE   },
4590   { ".page[25]",                ACTION_PAGE_25,                 FALSE   },
4591   { ".page[26]",                ACTION_PAGE_26,                 FALSE   },
4592   { ".page[27]",                ACTION_PAGE_27,                 FALSE   },
4593   { ".page[28]",                ACTION_PAGE_28,                 FALSE   },
4594   { ".page[29]",                ACTION_PAGE_29,                 FALSE   },
4595   { ".page[30]",                ACTION_PAGE_30,                 FALSE   },
4596   { ".page[31]",                ACTION_PAGE_31,                 FALSE   },
4597   { ".page[32]",                ACTION_PAGE_32,                 FALSE   },
4598   { ".other",                   ACTION_OTHER,                   FALSE   },
4599
4600   /* empty suffix always matches -- check as last entry in InitSoundInfo() */
4601   { "",                         ACTION_DEFAULT,                 TRUE    },
4602
4603   { NULL,                       0,                              0       }
4604 };
4605
4606 struct ElementDirectionInfo element_direction_info[NUM_DIRECTIONS_FULL + 1] =
4607 {
4608   { ".left",            MV_BIT_LEFT                     },
4609   { ".right",           MV_BIT_RIGHT                    },
4610   { ".up",              MV_BIT_UP                       },
4611   { ".down",            MV_BIT_DOWN                     },
4612   { ".upleft",          MV_BIT_UP                       },
4613   { ".upright",         MV_BIT_RIGHT                    },
4614   { ".downleft",        MV_BIT_LEFT                     },
4615   { ".downright",       MV_BIT_DOWN                     },
4616
4617   { NULL,               0                               }
4618 };
4619
4620 struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1 + 1] =
4621 {
4622   { ".[DEFAULT]",       GAME_MODE_DEFAULT,              },
4623   { ".TITLE",           GAME_MODE_TITLE,                },
4624   { ".MAIN",            GAME_MODE_MAIN,                 },
4625   { ".LEVELS",          GAME_MODE_LEVELS                },
4626   { ".SCORES",          GAME_MODE_SCORES,               },
4627   { ".EDITOR",          GAME_MODE_EDITOR,               },
4628   { ".INFO",            GAME_MODE_INFO,                 },
4629   { ".SETUP",           GAME_MODE_SETUP,                },
4630   { ".PLAYING",         GAME_MODE_PLAYING,              },
4631   { ".DOOR",            GAME_MODE_PSEUDO_DOOR,          },
4632   { ".PREVIEW",         GAME_MODE_PSEUDO_PREVIEW,       },
4633   { ".CRUMBLED",        GAME_MODE_PSEUDO_CRUMBLED,      },
4634
4635   /* empty suffix always matches -- check as last entry in InitMusicInfo() */
4636   { "",                 GAME_MODE_DEFAULT,              },
4637
4638   { NULL,               0,                              }
4639 };
4640
4641 struct TokenIntPtrInfo image_config_vars[] =
4642 {
4643   { "global.num_toons",         &global.num_toons                           },
4644
4645   { "menu.draw_xoffset",        &menu.draw_xoffset[GFX_SPECIAL_ARG_DEFAULT] },
4646   { "menu.draw_yoffset",        &menu.draw_yoffset[GFX_SPECIAL_ARG_DEFAULT] },
4647   { "menu.draw_xoffset.MAIN",   &menu.draw_xoffset[GFX_SPECIAL_ARG_MAIN]    },
4648   { "menu.draw_yoffset.MAIN",   &menu.draw_yoffset[GFX_SPECIAL_ARG_MAIN]    },
4649   { "menu.draw_xoffset.LEVELS", &menu.draw_xoffset[GFX_SPECIAL_ARG_LEVELS]  },
4650   { "menu.draw_yoffset.LEVELS", &menu.draw_yoffset[GFX_SPECIAL_ARG_LEVELS]  },
4651   { "menu.draw_xoffset.SCORES", &menu.draw_xoffset[GFX_SPECIAL_ARG_SCORES]  },
4652   { "menu.draw_yoffset.SCORES", &menu.draw_yoffset[GFX_SPECIAL_ARG_SCORES]  },
4653   { "menu.draw_xoffset.EDITOR", &menu.draw_xoffset[GFX_SPECIAL_ARG_EDITOR]  },
4654   { "menu.draw_yoffset.EDITOR", &menu.draw_yoffset[GFX_SPECIAL_ARG_EDITOR]  },
4655   { "menu.draw_xoffset.INFO",   &menu.draw_xoffset[GFX_SPECIAL_ARG_INFO]    },
4656   { "menu.draw_yoffset.INFO",   &menu.draw_yoffset[GFX_SPECIAL_ARG_INFO]    },
4657   { "menu.draw_xoffset.SETUP",  &menu.draw_xoffset[GFX_SPECIAL_ARG_SETUP]   },
4658   { "menu.draw_yoffset.SETUP",  &menu.draw_yoffset[GFX_SPECIAL_ARG_SETUP]   },
4659
4660   { "menu.scrollbar_xoffset",   &menu.scrollbar_xoffset                     },
4661
4662   { "menu.list_size",           &menu.list_size[GFX_SPECIAL_ARG_DEFAULT]    },
4663   { "menu.list_size.LEVELS",    &menu.list_size[GFX_SPECIAL_ARG_LEVELS]     },
4664   { "menu.list_size.SCORES",    &menu.list_size[GFX_SPECIAL_ARG_SCORES]     },
4665   { "menu.list_size.INFO",      &menu.list_size[GFX_SPECIAL_ARG_INFO]       },
4666
4667   { "door_1.width",             &door_1.width                               },
4668   { "door_1.height",            &door_1.height                              },
4669   { "door_1.step_offset",       &door_1.step_offset                         },
4670   { "door_1.step_delay",        &door_1.step_delay                          },
4671   { "door_1.anim_mode",         &door_1.anim_mode                           },
4672   { "door_2.width",             &door_2.width                               },
4673   { "door_2.height",            &door_2.height                              },
4674   { "door_2.step_offset",       &door_2.step_offset                         },
4675   { "door_2.step_delay",        &door_2.step_delay                          },
4676   { "door_2.anim_mode",         &door_2.anim_mode                           },
4677
4678   { "preview.x",                &preview.x                                  },
4679   { "preview.y",                &preview.y                                  },
4680   { "preview.xsize",            &preview.xsize                              },
4681   { "preview.ysize",            &preview.ysize                              },
4682   { "preview.tile_size",        &preview.tile_size                          },
4683   { "preview.step_offset",      &preview.step_offset                        },
4684   { "preview.step_delay",       &preview.step_delay                         },
4685
4686   { "game.panel.level.x",       &game.panel.level.x                         },
4687   { "game.panel.level.y",       &game.panel.level.y                         },
4688   { "game.panel.gems.x",        &game.panel.gems.x                          },
4689   { "game.panel.gems.y",        &game.panel.gems.y                          },
4690   { "game.panel.inventory.x",   &game.panel.inventory.x                     },
4691   { "game.panel.inventory.y",   &game.panel.inventory.y                     },
4692   { "game.panel.keys.x",        &game.panel.keys.x                          },
4693   { "game.panel.keys.y",        &game.panel.keys.y                          },
4694   { "game.panel.score.x",       &game.panel.score.x                         },
4695   { "game.panel.score.y",       &game.panel.score.y                         },
4696   { "game.panel.time.x",        &game.panel.time.x                          },
4697   { "game.panel.time.y",        &game.panel.time.y                          },
4698
4699   { "[player].boring_delay_fixed",      &game.player_boring_delay_fixed     },
4700   { "[player].boring_delay_random",     &game.player_boring_delay_random    },
4701   { "[player].sleeping_delay_fixed",    &game.player_sleeping_delay_fixed   },
4702   { "[player].sleeping_delay_random",   &game.player_sleeping_delay_random  },
4703
4704   { NULL,                       NULL,                                       }
4705 };
4706
4707
4708 /* ------------------------------------------------------------------------- */
4709 /* font definitions                                                          */
4710 /* ------------------------------------------------------------------------- */
4711
4712 /* Important: When one entry is a prefix of another entry, the longer entry
4713    must come first, because the dynamic configuration does prefix matching! */
4714
4715 struct FontInfo font_info[NUM_FONTS + 1] =
4716 {
4717   { "font.initial_1"            },
4718   { "font.initial_2"            },
4719   { "font.initial_3"            },
4720   { "font.initial_4"            },
4721   { "font.title_1"              },
4722   { "font.title_2"              },
4723   { "font.menu_1"               },
4724   { "font.menu_2"               },
4725   { "font.text_1.active"        },
4726   { "font.text_2.active"        },
4727   { "font.text_3.active"        },
4728   { "font.text_4.active"        },
4729   { "font.text_1"               },
4730   { "font.text_2"               },
4731   { "font.text_3"               },
4732   { "font.text_4"               },
4733   { "font.envelope_1"           },
4734   { "font.envelope_2"           },
4735   { "font.envelope_3"           },
4736   { "font.envelope_4"           },
4737   { "font.input_1.active"       },
4738   { "font.input_2.active"       },
4739   { "font.input_1"              },
4740   { "font.input_2"              },
4741   { "font.option_off"           },
4742   { "font.option_on"            },
4743   { "font.value_1"              },
4744   { "font.value_2"              },
4745   { "font.value_old"            },
4746   { "font.level_number.active"  },
4747   { "font.level_number"         },
4748   { "font.tape_recorder"        },
4749   { "font.game_info"            },
4750 };
4751
4752
4753 /* ------------------------------------------------------------------------- */
4754 /* music token prefix definitions                                            */
4755 /* ------------------------------------------------------------------------- */
4756
4757 struct MusicPrefixInfo music_prefix_info[NUM_MUSIC_PREFIXES + 1] =
4758 {
4759   { "background",               TRUE    },
4760
4761   { NULL,                       0       }
4762 };
4763
4764
4765 /* ========================================================================= */
4766 /* main()                                                                    */
4767 /* ========================================================================= */
4768
4769 static void print_usage()
4770 {
4771   printf("\n"
4772          "Usage: %s [OPTION]... [HOSTNAME [PORT]]\n"
4773          "\n"
4774          "Options:\n"
4775          "  -d, --display HOSTNAME[:SCREEN]  specify X server display\n"
4776          "  -b, --basepath DIRECTORY         alternative base DIRECTORY\n"
4777          "  -l, --level DIRECTORY            alternative level DIRECTORY\n"
4778          "  -g, --graphics DIRECTORY         alternative graphics DIRECTORY\n"
4779          "  -s, --sounds DIRECTORY           alternative sounds DIRECTORY\n"
4780          "  -m, --music DIRECTORY            alternative music DIRECTORY\n"
4781          "  -n, --network                    network multiplayer game\n"
4782          "      --serveronly                 only start network server\n"
4783          "  -v, --verbose                    verbose mode\n"
4784          "      --debug                      display debugging information\n"
4785          "  -e, --execute COMMAND            execute batch COMMAND\n"
4786          "\n"
4787          "Valid commands for '--execute' option:\n"
4788          "  \"print graphicsinfo.conf\"        print default graphics config\n"
4789          "  \"print soundsinfo.conf\"          print default sounds config\n"
4790          "  \"print musicinfo.conf\"           print default music config\n"
4791          "  \"print editorsetup.conf\"         print default editor config\n"
4792          "  \"print helpanim.conf\"            print default helpanim config\n"
4793          "  \"print helptext.conf\"            print default helptext config\n"
4794          "  \"dump level FILE\"                dump level data from FILE\n"
4795          "  \"dump tape FILE\"                 dump tape data from FILE\n"
4796          "  \"autoplay LEVELDIR [NR ...]\"     play level tapes for LEVELDIR\n"
4797          "  \"convert LEVELDIR [NR]\"          convert levels in LEVELDIR\n"
4798          "\n",
4799          program.command_basename);
4800 }
4801
4802 int main(int argc, char *argv[])
4803 {
4804   char * window_title_string = getWindowTitleString();
4805
4806   InitProgramInfo(argv[0], USERDATA_DIRECTORY, USERDATA_DIRECTORY_UNIX,
4807                   PROGRAM_TITLE_STRING, window_title_string, ICON_TITLE_STRING,
4808                   X11_ICON_FILENAME, X11_ICONMASK_FILENAME, SDL_ICON_FILENAME,
4809                   MSDOS_POINTER_FILENAME,
4810                   COOKIE_PREFIX, FILENAME_PREFIX, GAME_VERSION_ACTUAL);
4811
4812   InitExitFunction(CloseAllAndExit);
4813   InitPlatformDependentStuff();
4814
4815   GetOptions(argv, print_usage);
4816   OpenAll();
4817
4818   EventLoop();
4819   CloseAllAndExit(0);
4820
4821   return 0;     /* to keep compilers happy */
4822 }