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