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