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