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