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