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