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