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