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