rnd-20030118-2-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
21 #if 0
22 GC              tile_clip_gc;
23 Bitmap         *pix[NUM_BITMAPS];
24 #endif
25 Bitmap         *bitmap_db_field, *bitmap_db_door;
26 #if 0
27 Pixmap          tile_clipmask[NUM_TILES];
28 #endif
29 DrawBuffer     *fieldbuffer;
30 DrawBuffer     *drawto_field;
31
32 int             game_status = MAINMENU;
33 boolean         level_editor_test_game = FALSE;
34 boolean         network_playing = FALSE;
35
36 int             key_joystick_mapping = 0;
37
38 boolean         redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE];
39 int             redraw_x1 = 0, redraw_y1 = 0;
40
41 short           Feld[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
42 short           Ur[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           Store[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
47 short           Store2[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
48 short           StorePlayer[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
49 boolean         Stop[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
50 short           JustStopped[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
51 short           AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
52 short           AmoebaCnt[MAX_NUM_AMOEBA], AmoebaCnt2[MAX_NUM_AMOEBA];
53 short           ExplodePhase[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
54 short           ExplodeField[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
55
56 unsigned long   Properties1[MAX_NUM_ELEMENTS];
57 unsigned long   Properties2[MAX_NUM_ELEMENTS];
58
59 int             GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
60 short           GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
61
62 int             lev_fieldx,lev_fieldy, scroll_x,scroll_y;
63
64 int             FX = SX, FY = SY, ScrollStepSize;
65 int             ScreenMovDir = MV_NO_MOVING, ScreenMovPos = 0;
66 int             ScreenGfxPos = 0;
67 int             BorderElement = EL_STEELWALL;
68 int             GameFrameDelay = GAME_FRAME_DELAY;
69 int             FfwdFrameDelay = FFWD_FRAME_DELAY;
70 int             BX1 = 0, BY1 = 0, BX2 = SCR_FIELDX-1, BY2 = SCR_FIELDY-1;
71 int             SBX_Left, SBX_Right;
72 int             SBY_Upper, SBY_Lower;
73 int             ZX,ZY, ExitX,ExitY;
74 int             AllPlayersGone;
75
76 int             TimeFrames, TimePlayed, TimeLeft;
77
78 boolean         network_player_action_received = FALSE;
79
80 struct LevelInfo        level;
81 struct PlayerInfo       stored_player[MAX_PLAYERS], *local_player = NULL;
82 struct HiScore          highscore[MAX_SCORE_ENTRIES];
83 struct TapeInfo         tape;
84 struct SetupInfo        setup;
85 struct GameInfo         game;
86 struct GlobalInfo       global;
87
88
89 /* this is used to reduce memory usage of the different animation types */
90 int graphics_action_mapping[] =
91 {
92   0,            /* GFX_ACTION_DEFAULT           (0)  */
93   0,            /* GFX_ACTION_WAITING           (1)  */
94
95   1,            /* GFX_ACTION_FALLING           (2)  */
96   2,            /* GFX_ACTION_MOVING            (3)  */
97   3,            /* GFX_ACTION_DIGGING           (4)  */
98   4,            /* GFX_ACTION_SNAPPING          (5)  */
99   5,            /* GFX_ACTION_COLLECTING        (6)  */
100   6,            /* GFX_ACTION_PUSHING           (7)  */
101
102   7,            /* GFX_ACTION_PASSING           (8)  */
103   7,            /* GFX_ACTION_IMPACT            (9)  */
104   7,            /* GFX_ACTION_CRACKING          (10) */
105   7,            /* GFX_ACTION_BREAKING          (11) */
106   7,            /* GFX_ACTION_ACTIVATING        (12) */
107   7,            /* GFX_ACTION_OPENING           (13) */
108   7,            /* GFX_ACTION_CLOSING           (14) */
109   7,            /* GFX_ACTION_EATING            (15) */
110   7,            /* GFX_ACTION_ATTACKING         (16) */
111   7,            /* GFX_ACTION_GROWING           (17) */
112   7,            /* GFX_ACTION_SHRINKING         (18) */
113   7             /* GFX_ACTION_OTHER             (19) */
114 };
115
116 struct FileInfo *image_files;
117 struct FileInfo *sound_files;
118
119 struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
120 {
121   /* "real" level file elements */
122
123   {
124     "empty_space",
125     "empty_space",
126     "empty space"
127   },
128   {
129     "sand",
130     "sand",
131     "sand"
132   },
133   {
134     "wall",
135     "wall",
136     "normal wall"
137   },
138   {
139     "wall_crumbled",
140     "wall",
141     "round wall"
142   },
143   {
144     "rock",
145     "rock",
146     "rock"
147   },
148   {
149     "key_obsolete",
150     "key",
151     "key"
152   },
153   {
154     "emerald",
155     "emerald",
156     "emerald"
157   },
158   {
159     "exit_closed",
160     "exit",
161     "closed exit"
162   },
163   {
164     "player_obsolete",
165     "player",
166     "player"
167   },
168   {
169     "bug",
170     "bug",
171     "bug"
172   },
173   {
174     "spaceship",
175     "spaceship",
176     "spaceship"
177   },
178   {
179     "yamyam",
180     "yamyam",
181     "yam yam"
182   },
183   {
184     "robot",
185     "robot",
186     "robot"
187   },
188   {
189     "steelwall",
190     "wall",
191     "steel wall"
192   },
193   {
194     "diamond",
195     "diamond",
196     "diamond"
197   },
198   {
199     "amoeba_dead",
200     "amoeba",
201     "dead amoeba"
202   },
203   {
204     "quicksand_empty",
205     "quicksand",
206     "empty quicksand"
207   },
208   {
209     "quicksand_full",
210     "quicksand",
211     "quicksand with rock"
212   },
213   {
214     "amoeba_drop",
215     "amoeba",
216     "amoeba drop"
217   },
218   {
219     "bomb",
220     "bomb",
221     "bomb"
222   },
223   {
224     "magic_wall",
225     "magic_wall",
226     "magic wall"
227   },
228   {
229     "speed_pill",
230     "speed_pill",
231     "speed pill"
232   },
233   {
234     "acid",
235     "acid",
236     "acid"
237   },
238   {
239     "amoeba_wet",
240     "amoeba",
241     "dropping amoeba"
242   },
243   {
244     "amoeba_dry",
245     "amoeba",
246     "normal amoeba"
247   },
248   {
249     "nut",
250     "nut",
251     "nut with emerald"
252   },
253   {
254     "gameoflife",
255     "gameoflife",
256     "Conway's wall of life"
257   },
258   {
259     "biomaze",
260     "biomaze",
261     "biomaze"
262   },
263   {
264     "dynamite_active",
265     "dynamite",
266     "burning dynamite"
267   },
268   {
269     "stoneblock",
270     "wall",
271     "wall"
272   },
273   {
274     "robot_wheel",
275     "robot_wheel",
276     "magic wheel"
277   },
278   {
279     "robot_wheel_active",
280     "robot_wheel",
281     "magic wheel (running)"
282   },
283   {
284     "key1",
285     "key",
286     "red key"
287   },
288   {
289     "key2",
290     "key",
291     "yellow key"
292   },
293   {
294     "key3",
295     "key",
296     "green key"
297   },
298   {
299     "key4",
300     "key",
301     "blue key"
302   },
303   {
304     "gate1",
305     "gate",
306     "red door"
307   },
308   {
309     "gate2",
310     "gate",
311     "yellow door"
312   },
313   {
314     "gate3",
315     "gate",
316     "green door"
317   },
318   {
319     "gate4",
320     "gate",
321     "blue door"
322   },
323   {
324     "gate1_gray",
325     "gate",
326     "gray door (opened by red key)"
327   },
328   {
329     "gate2_gray",
330     "gate",
331     "gray door (opened by yellow key)"},
332   {
333     "gate3_gray",
334     "gate",
335     "gray door (opened by green key)"},
336   {
337     "gate4_gray",
338     "gate",
339     "gray door (opened by blue key)"},
340   {
341     "dynamite",
342     "dynamite",
343     "dynamite"
344   },
345   {
346     "pacman",
347     "pacman",
348     "pac man"
349   },
350   {
351     "invisible_wall",
352     "wall",
353     "invisible normal wall"
354   },
355   {
356     "lamp",
357     "lamp",
358     "lamp (off)"
359   },
360   {
361     "lamp_active",
362     "lamp",
363     "lamp (on)"
364   },
365   {
366     "wall_emerald",
367     "wall",
368     "wall with emerald"
369   },
370   {
371     "wall_diamond",
372     "wall",
373     "wall with diamond"
374   },
375   {
376     "amoeba_full",
377     "amoeba",
378     "amoeba with content"
379   },
380   {
381     "bd_amoeba",
382     "bd_amoeba",
383     "amoeba (BD style)"
384   },
385   {
386     "time_orb_full",
387     "time_orb_full",
388     "time orb (full)"
389   },
390   {
391     "time_orb_empty",
392     "time_orb_empty",
393     "time orb (empty)"
394   },
395   {
396     "wall_growing",
397     "wall",
398     "growing wall"
399   },
400   {
401     "bd_diamond",
402     "bd_diamond",
403     "diamond (BD style)"
404   },
405   {
406     "emerald_yellow",
407     "emerald",
408     "yellow emerald"
409   },
410   {
411     "wall_bd_diamond",
412     "wall",
413     "wall with BD style diamond"
414   },
415   {
416     "wall_emerald_yellow",
417     "wall",
418     "wall with yellow emerald"
419   },
420   {
421     "dark_yamyam",
422     "dark_yamyam",
423     "dark yam yam"
424   },
425   {
426     "bd_magic_wall",
427     "bd_magic_wall",
428     "magic wall (BD style)"
429   },
430   {
431     "invisible_steelwall",
432     "wall",
433     "invisible steel wall"
434   },
435   {
436     "unused_63",
437     NULL,
438     "(not used)"
439   },
440   {
441     "dynabomb_nr",
442     "dynabomb_nr",
443     "increases number of bombs"
444   },
445   {
446     "dynabomb_sz",
447     "dynabomb_sz",
448     "increases explosion size"
449   },
450   {
451     "dynabomb_xl",
452     "dynabomb_xl",
453     "increases power of explosion"
454   },
455   {
456     "sokoban_object",
457     "sokoban_object",
458     "sokoban object"
459   },
460   {
461     "sokoban_field_empty",
462     "sokoban_field",
463     "sokoban empty field"
464   },
465   {
466     "sokoban_field_full",
467     "sokoban_field",
468     "sokoban field with object"
469   },
470   {
471     "bd_butterfly_right",
472     "bd_butterfly",
473     "butterfly (starts moving right)"},
474   {
475     "bd_butterfly_up",
476     "bd_butterfly",
477     "butterfly (starts moving up)"
478   },
479   {
480     "bd_butterfly_left",
481     "bd_butterfly",
482     "butterfly (starts moving left)"},
483   {
484     "bd_butterfly_down",
485     "bd_butterfly",
486     "butterfly (starts moving down)"},
487   {
488     "bd_firefly_right",
489     "bd_firefly",
490     "firefly (starts moving right)"
491   },
492   {
493     "bd_firefly_up",
494     "bd_firefly",
495     "firefly (starts moving up)"
496   },
497   {
498     "bd_firefly_left",
499     "bd_firefly",
500     "firefly (starts moving left)"
501   },
502   {
503     "bd_firefly_down",
504     "bd_firefly",
505     "firefly (starts moving down)"
506   },
507   {
508     "bd_butterfly",
509     "bd_butterfly",
510     "butterfly"
511   },
512   {
513     "bd_firefly",
514     "bd_firefly",
515     "firefly"
516   },
517   {
518     "player1",
519     "player",
520     "yellow player"
521   },
522   {
523     "player2",
524     "player",
525     "red player"
526   },
527   {
528     "player3",
529     "player",
530     "green player"
531   },
532   {
533     "player4",
534     "player",
535     "blue player"
536   },
537   {
538     "bug_right",
539     "bug",
540     "bug (starts moving right)"
541   },
542   {
543     "bug_up",
544     "bug",
545     "bug (starts moving up)"
546   },
547   {
548     "bug_left",
549     "bug",
550     "bug (starts moving left)"
551   },
552   {
553     "bug_down",
554     "bug",
555     "bug (starts moving down)"
556   },
557   {
558     "spaceship_right",
559     "spaceship",
560     "spaceship (starts moving right)"},
561   {
562     "spaceship_up",
563     "spaceship",
564     "spaceship (starts moving up)"
565   },
566   {
567     "spaceship_left",
568     "spaceship",
569     "spaceship (starts moving left)"},
570   {
571     "spaceship_down",
572     "spaceship",
573     "spaceship (starts moving down)"},
574   {
575     "pacman_right",
576     "pacman",
577     "pac man (starts moving right)"
578   },
579   {
580     "pacman_up",
581     "pacman",
582     "pac man (starts moving up)"
583   },
584   {
585     "pacman_left",
586     "pacman",
587     "pac man (starts moving left)"
588   },
589   {
590     "pacman_down",
591     "pacman",
592     "pac man (starts moving down)"
593   },
594   {
595     "emerald_red",
596     "emerald",
597     "red emerald"
598   },
599   {
600     "emerald_purple",
601     "emerald",
602     "purple emerald"
603   },
604   {
605     "wall_emerald_red",
606     "wall",
607     "wall with red emerald"
608   },
609   {
610     "wall_emerald_purple",
611     "wall",
612     "wall with purple emerald"
613   },
614   {
615     "acidpool_topleft",
616     "wall",
617     "acid pool (top left)"
618   },
619   {
620     "acidpool_topright",
621     "wall",
622     "acid pool (top right)"
623   },
624   {
625     "acidpool_bottomleft",
626     "wall",
627     "acid pool (bottom left)"
628   },
629   {
630     "acidpool_bottom",
631     "wall",
632     "acid pool (bottom)"
633   },
634   {
635     "acidpool_bottomright",
636     "wall",
637     "acid pool (bottom right)"
638   },
639   {
640     "bd_wall",
641     "wall",
642     "normal wall (BD style)"
643   },
644   {
645     "bd_rock",
646     "bd_rock",
647     "rock (BD style)"
648   },
649   {
650     "exit_open",
651     "exit",
652     "open exit"
653   },
654   {
655     "black_orb",
656     NULL,
657     "black orb bomb"
658   },
659   {
660     "amoeba_to_diamond",
661     "amoeba",
662     "amoeba"
663   },
664   {
665     "mole",
666     "mole",
667     "mole"
668   },
669   {
670     "penguin",
671     "penguin",
672     "penguin"
673   },
674   {
675     "satellite",
676     "satellite",
677     "satellite"
678   },
679   {
680     "arrow_blue_left",
681     NULL,
682     "arrow left"
683   },
684   {
685     "arrow_blue_right",
686     NULL,
687     "arrow right"
688   },
689   {
690     "arrow_blue_up",
691     NULL,
692     "arrow up"
693   },
694   {
695     "arrow_blue_down",
696     NULL,
697     "arrow down"
698   },
699   {
700     "pig",
701     "pig",
702     "pig"
703   },
704   {
705     "dragon",
706     "dragon",
707     "fire breathing dragon"
708   },
709   {
710     "em_key1_file",
711     "key",
712     "red key (EM style)"
713   },
714   {
715     "char_space",
716     NULL,
717     "letter ' '"
718   },
719   {
720     "char_exclam",
721     NULL,
722     "letter '!'"
723   },
724   {
725     "char_quotedbl",
726     NULL,
727     "letter '\"'"
728   },
729   {
730     "char_numbersign",
731     NULL,
732     "letter '#'"
733   },
734   {
735     "char_dollar",
736     NULL,
737     "letter '$'"
738   },
739   {
740     "char_procent",
741     NULL,
742     "letter '%'"
743   },
744   {
745     "char_ampersand",
746     NULL,
747     "letter '&'"
748   },
749   {
750     "char_apostrophe",
751     NULL,
752     "letter '''"
753   },
754   {
755     "char_parenleft",
756     NULL,
757     "letter '('"
758   },
759   {
760     "char_parenright",
761     NULL,
762     "letter ')'"
763   },
764   {
765     "char_asterisk",
766     NULL,
767     "letter '*'"
768   },
769   {
770     "char_plus",
771     NULL,
772     "letter '+'"
773   },
774   {
775     "char_comma",
776     NULL,
777     "letter ','"
778   },
779   {
780     "char_minus",
781     NULL,
782     "letter '-'"
783   },
784   {
785     "char_period",
786     NULL,
787     "letter '.'"
788   },
789   {
790     "char_slash",
791     NULL,
792     "letter '/'"
793   },
794   {
795     "char_0",
796     NULL,
797     "letter '0'"
798   },
799   {
800     "char_1",
801     NULL,
802     "letter '1'"
803   },
804   {
805     "char_2",
806     NULL,
807     "letter '2'"
808   },
809   {
810     "char_3",
811     NULL,
812     "letter '3'"
813   },
814   {
815     "char_4",
816     NULL,
817     "letter '4'"
818   },
819   {
820     "char_5",
821     NULL,
822     "letter '5'"
823   },
824   {
825     "char_6",
826     NULL,
827     "letter '6'"
828   },
829   {
830     "char_7",
831     NULL,
832     "letter '7'"
833   },
834   {
835     "char_8",
836     NULL,
837     "letter '8'"
838   },
839   {
840     "char_9",
841     NULL,
842     "letter '9'"
843   },
844   {
845     "char_colon",
846     NULL,
847     "letter ':'"
848   },
849   {
850     "char_semicolon",
851     NULL,
852     "letter ';'"
853   },
854   {
855     "char_less",
856     NULL,
857     "letter '<'"
858   },
859   {
860     "char_equal",
861     NULL,
862     "letter '='"
863   },
864   {
865     "char_greater",
866     NULL,
867     "letter '>'"
868   },
869   {
870     "char_question",
871     NULL,
872     "letter '?'"
873   },
874   {
875     "char_at",
876     NULL,
877     "letter '@'"
878   },
879   {
880     "char_a",
881     NULL,
882     "letter 'A'"
883   },
884   {
885     "char_b",
886     NULL,
887     "letter 'B'"
888   },
889   {
890     "char_c",
891     NULL,
892     "letter 'C'"
893   },
894   {
895     "char_d",
896     NULL,
897     "letter 'D'"
898   },
899   {
900     "char_e",
901     NULL,
902     "letter 'E'"
903   },
904   {
905     "char_f",
906     NULL,
907     "letter 'F'"
908   },
909   {
910     "char_g",
911     NULL,
912     "letter 'G'"
913   },
914   {
915     "char_h",
916     NULL,
917     "letter 'H'"
918   },
919   {
920     "char_i",
921     NULL,
922     "letter 'I'"
923   },
924   {
925     "char_j",
926     NULL,
927     "letter 'J'"
928   },
929   {
930     "char_k",
931     NULL,
932     "letter 'K'"
933   },
934   {
935     "char_l",
936     NULL,
937     "letter 'L'"
938   },
939   {
940     "char_m",
941     NULL,
942     "letter 'M'"
943   },
944   {
945     "char_n",
946     NULL,
947     "letter 'N'"
948   },
949   {
950     "char_o",
951     NULL,
952     "letter 'O'"
953   },
954   {
955     "char_p",
956     NULL,
957     "letter 'P'"
958   },
959   {
960     "char_q",
961     NULL,
962     "letter 'Q'"
963   },
964   {
965     "char_r",
966     NULL,
967     "letter 'R'"
968   },
969   {
970     "char_s",
971     NULL,
972     "letter 'S'"
973   },
974   {
975     "char_t",
976     NULL,
977     "letter 'T'"
978   },
979   {
980     "char_u",
981     NULL,
982     "letter 'U'"
983   },
984   {
985     "char_v",
986     NULL,
987     "letter 'V'"
988   },
989   {
990     "char_w",
991     NULL,
992     "letter 'W'"
993   },
994   {
995     "char_x",
996     NULL,
997     "letter 'X'"
998   },
999   {
1000     "char_y",
1001     NULL,
1002     "letter 'Y'"
1003   },
1004   {
1005     "char_z",
1006     NULL,
1007     "letter 'Z'"
1008   },
1009   {
1010     "char_ae",
1011     NULL,
1012     "letter 'Ä'"
1013   },
1014   {
1015     "char_oe",
1016     NULL,
1017     "letter 'Ö'"
1018   },
1019   {
1020     "char_ue",
1021     NULL,
1022     "letter 'Ãœ'"
1023   },
1024   {
1025     "char_copyright",
1026     NULL,
1027     "letter '^'"
1028   },
1029   {
1030     "char_underscore",
1031     NULL,
1032     "letter ''"
1033   },
1034   {
1035     "char_empty",
1036     NULL,
1037     "letter ''"
1038   },
1039   {
1040     "char_degree",
1041     NULL,
1042     "letter ''"
1043   },
1044   {
1045     "char_tm",
1046     NULL,
1047     "letter ''"
1048   },
1049   {
1050     "char_cursor",
1051     NULL,
1052     "letter ''"
1053   },
1054   {
1055     NULL,
1056     NULL,
1057     "letter ''"
1058   },
1059   {
1060     NULL,
1061     NULL,
1062     "letter ''"
1063   },
1064   {
1065     NULL,
1066     NULL,
1067     "letter ''"
1068   },
1069   {
1070     NULL,
1071     NULL,
1072     "letter ''"
1073   },
1074   {
1075     NULL,
1076     NULL,
1077     "letter ''"
1078   },
1079   {
1080     NULL,
1081     NULL,
1082     "letter ''"
1083   },
1084   {
1085     NULL,
1086     NULL,
1087     "letter ''"
1088   },
1089   {
1090     NULL,
1091     NULL,
1092     "letter ''"
1093   },
1094   {
1095     NULL,
1096     NULL,
1097     "letter ''"
1098   },
1099   {
1100     NULL,
1101     NULL,
1102     "letter ''"
1103   },
1104   {
1105     NULL,
1106     NULL,
1107     "letter ''"
1108   },
1109   {
1110     NULL,
1111     NULL,
1112     "letter ''"
1113   },
1114   {
1115     "wall_growing_x",
1116     "wall",
1117     "growing wall (horizontal)"
1118   },
1119   {
1120     "wall_growing_y",
1121     "wall",
1122     "growing wall (vertical)"
1123   },
1124   {
1125     "wall_growing_xy",
1126     "wall",
1127     "growing wall (all directions)"
1128   },
1129   {
1130     "em_gate1",
1131     "gate",
1132     "red door (EM style)"
1133   },
1134   {
1135     "em_gate2",
1136     "gate",
1137     "yellow door (EM style)"
1138   },
1139   {
1140     "em_gate3",
1141     "gate",
1142     "green door (EM style)"
1143   },
1144   {
1145     "em_gate4",
1146     "gate",
1147     "blue door (EM style)"
1148   },
1149   {
1150     "em_key2_file",
1151     "key",
1152     "yellow key (EM style)"
1153   },
1154   {
1155     "em_key3_file",
1156     "key",
1157     "green key (EM style)"
1158   },
1159   {
1160     "em_key4_file",
1161     "key",
1162     "blue key (EM style)"
1163   },
1164   {
1165     "sp_empty_space",
1166     "empty_space",
1167     "empty space"
1168   },
1169   {
1170     "sp_zonk",
1171     "sp_zonk",
1172     "zonk"
1173   },
1174   {
1175     "sp_base",
1176     "sp_base",
1177     "base"
1178   },
1179   {
1180     "sp_murphy",
1181     "player",
1182     "murphy"
1183   },
1184   {
1185     "sp_infotron",
1186     "sp_infotron",
1187     "infotron"
1188   },
1189   {
1190     "sp_chip_single",
1191     "wall",
1192     "chip (single)"
1193   },
1194   {
1195     "sp_hard_gray",
1196     "wall",
1197     "hardware"
1198   },
1199   {
1200     "sp_exit_closed",
1201     "sp_exit",
1202     "exit"
1203   },
1204   {
1205     "sp_disk_orange",
1206     "sp_disk_orange",
1207     "orange disk"
1208   },
1209   {
1210     "sp_port1_right",
1211     "sp_port",
1212     "port (leading right)"
1213   },
1214   {
1215     "sp_port1_down",
1216     "sp_port",
1217     "port (leading down)"
1218   },
1219   {
1220     "sp_port1_left",
1221     "sp_port",
1222     "port (leading left)"
1223   },
1224   {
1225     "sp_port1_up",
1226     "sp_port",
1227     "port (leading up)"
1228   },
1229   {
1230     "sp_port2_right",
1231     "sp_port",
1232     "port (leading right)"
1233   },
1234   {
1235     "sp_port2_down",
1236     "sp_port",
1237     "port (leading down)"
1238   },
1239   {
1240     "sp_port2_left",
1241     "sp_port",
1242     "port (leading left)"
1243   },
1244   {
1245     "sp_port2_up",
1246     "sp_port",
1247     "port (leading up)"
1248   },
1249   {
1250     "sp_sniksnak",
1251     "sp_sniksnak",
1252     "snik snak"
1253   },
1254   {
1255     "sp_disk_yellow",
1256     "sp_disk_yellow",
1257     "yellow disk"
1258   },
1259   {
1260     "sp_terminal",
1261     "sp_terminal",
1262     "terminal"
1263   },
1264   {
1265     "sp_disk_red",
1266     "sp_disk_red",
1267     "red disk"
1268   },
1269   {
1270     "sp_port_y",
1271     "sp_port",
1272     "port (vertical)"
1273   },
1274   {
1275     "sp_port_x",
1276     "sp_port",
1277     "port (horizontal)"
1278   },
1279   {
1280     "sp_port_xy",
1281     "sp_port",
1282     "port (all directions)"
1283   },
1284   {
1285     "sp_electron",
1286     "sp_electron",
1287     "electron"
1288   },
1289   {
1290     "sp_buggy_base",
1291     "sp_buggy_base",
1292     "buggy base"
1293   },
1294   {
1295     "sp_chip_left",
1296     "wall",
1297     "chip (left half)"
1298   },
1299   {
1300     "sp_chip_right",
1301     "wall",
1302     "chip (right half)"
1303   },
1304   {
1305     "sp_hard_base1",
1306     "wall",
1307     "hardware"
1308   },
1309   {
1310     "sp_hard_green",
1311     "wall",
1312     "hardware"
1313   },
1314   {
1315     "sp_hard_blue",
1316     "wall",
1317     "hardware"
1318   },
1319   {
1320     "sp_hard_red",
1321     "wall",
1322     "hardware"
1323   },
1324   {
1325     "sp_hard_yellow",
1326     "wall",
1327     "hardware"
1328   },
1329   {
1330     "sp_hard_base2",
1331     "wall",
1332     "hardware"
1333   },
1334   {
1335     "sp_hard_base3",
1336     "wall",
1337     "hardware"
1338   },
1339   {
1340     "sp_hard_base4",
1341     "wall",
1342     "hardware"
1343   },
1344   {
1345     "sp_hard_base5",
1346     "wall",
1347     "hardware"
1348   },
1349   {
1350     "sp_hard_base6",
1351     "wall",
1352     "hardware"
1353   },
1354   {
1355     "sp_chip_upper",
1356     "wall",
1357     "chip (upper half)"
1358   },
1359   {
1360     "sp_chip_lower",
1361     "wall",
1362     "chip (lower half)"
1363   },
1364   {
1365     "em_gate1_gray",
1366     "gate",
1367     "gray door (EM style, red key)"
1368   },
1369   {
1370     "em_gate2_gray",
1371     "gate",
1372     "gray door (EM style, yellow key)"
1373   },
1374   {
1375     "em_gate3_gray",
1376     "gate",
1377     "gray door (EM style, green key)"
1378   },
1379   {
1380     "em_gate4_gray",
1381     "gate",
1382     "gray door (EM style, blue key)"
1383   },
1384   {
1385     "unused_254",
1386     NULL,
1387     "(not used)"
1388   },
1389   {
1390     "unused_255",
1391     NULL,
1392     "(not used)"
1393   },
1394   {
1395     "pearl",
1396     "pearl",
1397     "pearl"
1398   },
1399   {
1400     "crystal",
1401     "crystal",
1402     "crystal"
1403   },
1404   {
1405     "wall_pearl",
1406     "wall",
1407     "wall with pearl"
1408   },
1409   {
1410     "wall_crystal",
1411     "wall",
1412     "wall with crystal"
1413   },
1414   {
1415     "door_white",
1416     "gate",
1417     "white door"
1418   },
1419   {
1420     "door_white_gray",
1421     "gate",
1422     "gray door (opened by white key)"
1423   },
1424   {
1425     "key_white",
1426     "key",
1427     "white key"
1428   },
1429   {
1430     "shield_normal",
1431     "shield_normal",
1432     "shield (normal)"
1433   },
1434   {
1435     "extra_time",
1436     "extra_time",
1437     "extra time"
1438   },
1439   {
1440     "switchgate_open",
1441     "switchgate",
1442     "switch gate (open)"
1443   },
1444   {
1445     "switchgate_closed",
1446     "switchgate",
1447     "switch gate (closed)"
1448   },
1449   {
1450     "switchgate_switch_up",
1451     "switchgate_switch",
1452     "switch for switch gate"
1453   },
1454   {
1455     "switchgate_switch_down",
1456     "switchgate_switch",
1457     "switch for switch gate"
1458   },
1459   {
1460     "unused_269",
1461     NULL,
1462     "-"
1463   },
1464   {
1465     "unused_270",
1466     NULL,
1467     "-"
1468   },
1469   {
1470     "conveyor_belt1_left",
1471     "conveyor_belt",
1472     "red conveyor belt (left)"
1473   },
1474   {
1475     "conveyor_belt1_middle",
1476     "conveyor_belt",
1477     "red conveyor belt (middle)"
1478   },
1479   {
1480     "conveyor_belt1_right",
1481     "conveyor_belt",
1482     "red conveyor belt (right)"
1483   },
1484   {
1485     "conveyor_belt1_switch_left",
1486     "conveyor_belt_switch",
1487     "switch for red conveyor belt (left)"
1488   },
1489   {
1490     "conveyor_belt1_switch_middle",
1491     "conveyor_belt_switch",
1492     "switch for red conveyor belt (middle)"
1493   },
1494   {
1495     "conveyor_belt1_switch_right",
1496     "conveyor_belt_switch",
1497     "switch for red conveyor belt (right)"
1498   },
1499   {
1500     "conveyor_belt2_left",
1501     "conveyor_belt",
1502     "yellow conveyor belt (left)"
1503   },
1504   {
1505     "conveyor_belt2_middle",
1506     "conveyor_belt",
1507     "yellow conveyor belt (middle)"
1508   },
1509   {
1510     "conveyor_belt2_right",
1511     "conveyor_belt",
1512     "yellow conveyor belt (right)"
1513   },
1514   {
1515     "conveyor_belt2_switch_left",
1516     "conveyor_belt_switch",
1517     "switch for yellow conveyor belt (left)"
1518   },
1519   {
1520     "conveyor_belt2_switch_middle",
1521     "conveyor_belt_switch",
1522     "switch for yellow conveyor belt (middle)"
1523   },
1524   {
1525     "conveyor_belt2_switch_right",
1526     "conveyor_belt_switch",
1527     "switch for yellow conveyor belt (right)"
1528   },
1529   {
1530     "conveyor_belt3_left",
1531     "conveyor_belt",
1532     "green conveyor belt (left)"
1533   },
1534   {
1535     "conveyor_belt3_middle",
1536     "conveyor_belt",
1537     "green conveyor belt (middle)"
1538   },
1539   {
1540     "conveyor_belt3_right",
1541     "conveyor_belt",
1542     "green conveyor belt (right)"
1543   },
1544   {
1545     "conveyor_belt3_switch_left",
1546     "conveyor_belt_switch",
1547     "switch for green conveyor belt (left)"
1548   },
1549   {
1550     "conveyor_belt3_switch_middle",
1551     "conveyor_belt_switch",
1552     "switch for green conveyor belt (middle)"
1553   },
1554   {
1555     "conveyor_belt3_switch_right",
1556     "conveyor_belt_switch",
1557     "switch for green conveyor belt (right)"
1558   },
1559   {
1560     "conveyor_belt4_left",
1561     "conveyor_belt",
1562     "blue conveyor belt (left)"
1563   },
1564   {
1565     "conveyor_belt4_middle",
1566     "conveyor_belt",
1567     "blue conveyor belt (middle)"
1568   },
1569   {
1570     "conveyor_belt4_right",
1571     "conveyor_belt",
1572     "blue conveyor belt (right)"
1573   },
1574   {
1575     "conveyor_belt4_switch_left",
1576     "conveyor_belt_switch",
1577     "switch for blue conveyor belt (left)"
1578   },
1579   {
1580     "conveyor_belt4_switch_middle",
1581     "conveyor_belt_switch",
1582     "switch for blue conveyor belt (middle)"
1583   },
1584   {
1585     "conveyor_belt4_switch_right",
1586     "conveyor_belt_switch",
1587     "switch for blue conveyor belt (right)"
1588   },
1589   {
1590     "landmine",
1591     "sand",
1592     "land mine"
1593   },
1594   {
1595     "envelope",
1596     "envelope",
1597     "mail envelope"
1598   },
1599   {
1600     "light_switch",
1601     "light_switch",
1602     "light switch (off)"
1603   },
1604   {
1605     "light_switch_active",
1606     "light_switch",
1607     "light switch (on)"
1608   },
1609   {
1610     "sign_exclamation",
1611     "wall",
1612     "sign (exclamation)"
1613   },
1614   {
1615     "sign_radioactivity",
1616     "wall",
1617     "sign (radio activity)"
1618   },
1619   {
1620     "sign_stop",
1621     "wall",
1622     "sign (stop)"
1623   },
1624   {
1625     "sign_wheelchair",
1626     "wall",
1627     "sign (wheel chair)"
1628   },
1629   {
1630     "sign_parking",
1631     "wall",
1632     "sign (parking)"
1633   },
1634   {
1635     "sign_oneway",
1636     "wall",
1637     "sign (one way)"
1638   },
1639   {
1640     "sign_heart",
1641     "wall",
1642     "sign (heart)"
1643   },
1644   {
1645     "sign_triangle",
1646     "wall",
1647     "sign (triangle)"
1648   },
1649   {
1650     "sign_round",
1651     "wall",
1652     "sign (round)"
1653   },
1654   {
1655     "sign_exit",
1656     "wall",
1657     "sign (exit)"
1658   },
1659   {
1660     "sign_yinyang",
1661     "wall",
1662     "sign (yin yang)"
1663   },
1664   {
1665     "sign_other",
1666     "wall",
1667     "sign (other)"
1668   },
1669   {
1670     "mole_left",
1671     "mole",
1672     "mole (starts moving left)"
1673   },
1674   {
1675     "mole_right",
1676     "mole",
1677     "mole (starts moving right)"
1678   },
1679   {
1680     "mole_up",
1681     "mole",
1682     "mole (starts moving up)"
1683   },
1684   {
1685     "mole_down",
1686     "mole",
1687     "mole (starts moving down)"
1688   },
1689   {
1690     "steelwall_slanted",
1691     "wall",
1692     "steel wall (slanted)"
1693   },
1694   {
1695     "invisible_sand",
1696     "sand",
1697     "invisible sand"
1698   },
1699   {
1700     "dx_unknown_15",
1701     NULL,
1702     "dx unknown element 15"
1703   },
1704   {
1705     "dx_unknown_42",
1706     NULL,
1707     "dx unknown element 42"
1708   },
1709   {
1710     "unused_319",
1711     NULL,
1712     "(not used)"
1713   },
1714   {
1715     "unused_320",
1716     NULL,
1717     "(not used)"
1718   },
1719   {
1720     "shield_deadly",
1721     "shield_deadly",
1722     "shield (deadly, kills enemies)"
1723   },
1724   {
1725     "timegate_open",
1726     "timegate",
1727     "time gate (open)"
1728   },
1729   {
1730     "timegate_closed",
1731     "timegate",
1732     "time gate (closed)"
1733   },
1734   {
1735     "timegate_switch_active",
1736     "timegate_switch",
1737     "switch for time gate"
1738   },
1739   {
1740     "timegate_switch",
1741     "timegate_switch",
1742     "switch for time gate"
1743   },
1744   {
1745     "balloon",
1746     "balloon",
1747     "balloon"
1748   },
1749   {
1750     "balloon_send_left",
1751     "balloon_switch",
1752     "send balloon to the left"
1753   },
1754   {
1755     "balloon_send_right",
1756     "balloon_switch",
1757     "send balloon to the right"
1758   },
1759   {
1760     "balloon_send_up",
1761     "balloon_switch",
1762     "send balloon up"
1763   },
1764   {
1765     "balloon_send_down",
1766     "balloon_switch",
1767     "send balloon down"
1768   },
1769   {
1770     "balloon_send_any_direction",
1771     "balloon_switch",
1772     "send balloon in any direction"
1773   },
1774   {
1775     "emc_steelwall1",
1776     "wall",
1777     "steel wall"
1778   },
1779   {
1780     "emc_steelwall2",
1781     "wall",
1782     "steel wall"
1783   },
1784   {
1785     "emc_steelwall3",
1786     "wall",
1787     "steel wall"
1788   },
1789   {
1790     "emc_steelwall4",
1791     "wall",
1792     "steel wall"
1793   },
1794   {
1795     "emc_wall_pillar_upper",
1796     "wall",
1797     "normal wall"
1798   },
1799   {
1800     "emc_wall_pillar_middle",
1801     "wall",
1802     "normal wall"
1803   },
1804   {
1805     "emc_wall_pillar_lower",
1806     "wall",
1807     "normal wall"
1808   },
1809   {
1810     "emc_wall4",
1811     "wall",
1812     "normal wall"
1813   },
1814   {
1815     "emc_wall5",
1816     "wall",
1817     "normal wall"
1818   },
1819   {
1820     "emc_wall6",
1821     "wall",
1822     "normal wall"
1823   },
1824   {
1825     "emc_wall7",
1826     "wall",
1827     "normal wall"
1828   },
1829   {
1830     "emc_wall8",
1831     "wall",
1832     "normal wall"
1833   },
1834   {
1835     "tube_all",
1836     "tube",
1837     "tube (all directions)"
1838   },
1839   {
1840     "tube_vertical",
1841     "tube",
1842     "tube (vertical)"
1843   },
1844   {
1845     "tube_horizontal",
1846     "tube",
1847     "tube (horizontal)"
1848   },
1849   {
1850     "tube_vertical_left",
1851     "tube",
1852     "tube (vertical & left)"
1853   },
1854   {
1855     "tube_vertical_right",
1856     "tube",
1857     "tube (vertical & right)"
1858   },
1859   {
1860     "tube_horizontal_up",
1861     "tube",
1862     "tube (horizontal & up)"
1863   },
1864   {
1865     "tube_horizontal_down",
1866     "tube",
1867     "tube (horizontal & down)"
1868   },
1869   {
1870     "tube_left_up",
1871     "tube",
1872     "tube (left & up)"
1873   },
1874   {
1875     "tube_left_down",
1876     "tube",
1877     "tube (left & down)"
1878   },
1879   {
1880     "tube_right_up",
1881     "tube",
1882     "tube (right & up)"
1883   },
1884   {
1885     "tube_right_down",
1886     "tube",
1887     "tube (right & down)"
1888   },
1889   {
1890     "spring",
1891     "spring",
1892     "spring"
1893   },
1894   {
1895     "trap",
1896     "trap",
1897     "trap"
1898   },
1899   {
1900     "dx_supabomb",
1901     "dx_bomb",
1902     "stable bomb (DX style)"
1903   },
1904   {
1905     "unused_358",
1906     NULL,
1907     "-"
1908   },
1909   {
1910     "unused_359",
1911     NULL,
1912     "-"
1913   },
1914   {
1915     "custom_1",
1916     "custom",
1917     "custom element 1"
1918   },
1919   {
1920     "custom_2",
1921     "custom",
1922     "custom element 2"
1923   },
1924   {
1925     "custom_3",
1926     "custom",
1927     "custom element 3"
1928   },
1929   {
1930     "custom_4",
1931     "custom",
1932     "custom element 4"
1933   },
1934   {
1935     "custom_5",
1936     "custom",
1937     "custom element 5"
1938   },
1939   {
1940     "custom_6",
1941     "custom",
1942     "custom element 6"
1943   },
1944   {
1945     "custom_7",
1946     "custom",
1947     "custom element 7"
1948   },
1949   {
1950     "custom_8",
1951     "custom",
1952     "custom element 8"
1953   },
1954   {
1955     "custom_9",
1956     "custom",
1957     "custom element 9"
1958   },
1959   {
1960     "custom_10",
1961     "custom",
1962     "custom element 10"
1963   },
1964   {
1965     "custom_11",
1966     "custom",
1967     "custom element 11"
1968   },
1969   {
1970     "custom_12",
1971     "custom",
1972     "custom element 12"
1973   },
1974   {
1975     "custom_13",
1976     "custom",
1977     "custom element 13"
1978   },
1979   {
1980     "custom_14",
1981     "custom",
1982     "custom element 14"
1983   },
1984   {
1985     "custom_15",
1986     "custom",
1987     "custom element 15"
1988   },
1989   {
1990     "custom_16",
1991     "custom",
1992     "custom element 16"
1993   },
1994   {
1995     "custom_17",
1996     "custom",
1997     "custom element 17"
1998   },
1999   {
2000     "custom_18",
2001     "custom",
2002     "custom element 18"
2003   },
2004   {
2005     "custom_19",
2006     "custom",
2007     "custom element 19"
2008   },
2009   {
2010     "custom_20",
2011     "custom",
2012     "custom element 20"
2013   },
2014   {
2015     "custom_21",
2016     "custom",
2017     "custom element 21"
2018   },
2019   {
2020     "custom_22",
2021     "custom",
2022     "custom element 22"
2023   },
2024   {
2025     "custom_23",
2026     "custom",
2027     "custom element 23"
2028   },
2029   {
2030     "custom_24",
2031     "custom",
2032     "custom element 24"
2033   },
2034   {
2035     "custom_25",
2036     "custom",
2037     "custom element 25"
2038   },
2039   {
2040     "custom_26",
2041     "custom",
2042     "custom element 26"
2043   },
2044   {
2045     "custom_27",
2046     "custom",
2047     "custom element 27"
2048   },
2049   {
2050     "custom_28",
2051     "custom",
2052     "custom element 28"
2053   },
2054   {
2055     "custom_29",
2056     "custom",
2057     "custom element 29"
2058   },
2059   {
2060     "custom_30",
2061     "custom",
2062     "custom element 30"
2063   },
2064   {
2065     "custom_31",
2066     "custom",
2067     "custom element 31"
2068   },
2069   {
2070     "custom_32",
2071     "custom",
2072     "custom element 32"
2073   },
2074   {
2075     "custom_33",
2076     "custom",
2077     "custom element 33"
2078   },
2079   {
2080     "custom_34",
2081     "custom",
2082     "custom element 34"
2083   },
2084   {
2085     "custom_35",
2086     "custom",
2087     "custom element 35"
2088   },
2089   {
2090     "custom_36",
2091     "custom",
2092     "custom element 36"
2093   },
2094   {
2095     "custom_37",
2096     "custom",
2097     "custom element 37"
2098   },
2099   {
2100     "custom_38",
2101     "custom",
2102     "custom element 38"
2103   },
2104   {
2105     "custom_39",
2106     "custom",
2107     "custom element 39"
2108   },
2109   {
2110     "custom_40",
2111     "custom",
2112     "custom element 40"
2113   },
2114   {
2115     "custom_41",
2116     "custom",
2117     "custom element 41"
2118   },
2119   {
2120     "custom_42",
2121     "custom",
2122     "custom element 42"
2123   },
2124   {
2125     "custom_43",
2126     "custom",
2127     "custom element 43"
2128   },
2129   {
2130     "custom_44",
2131     "custom",
2132     "custom element 44"
2133   },
2134   {
2135     "custom_45",
2136     "custom",
2137     "custom element 45"
2138   },
2139   {
2140     "custom_46",
2141     "custom",
2142     "custom element 46"
2143   },
2144   {
2145     "custom_47",
2146     "custom",
2147     "custom element 47"
2148   },
2149   {
2150     "custom_48",
2151     "custom",
2152     "custom element 48"
2153   },
2154   {
2155     "custom_49",
2156     "custom",
2157     "custom element 49"
2158   },
2159   {
2160     "custom_50",
2161     "custom",
2162     "custom element 50"
2163   },
2164   {
2165     "custom_51",
2166     "custom",
2167     "custom element 51"
2168   },
2169   {
2170     "custom_52",
2171     "custom",
2172     "custom element 52"
2173   },
2174   {
2175     "custom_53",
2176     "custom",
2177     "custom element 53"
2178   },
2179   {
2180     "custom_54",
2181     "custom",
2182     "custom element 54"
2183   },
2184   {
2185     "custom_55",
2186     "custom",
2187     "custom element 55"
2188   },
2189   {
2190     "custom_56",
2191     "custom",
2192     "custom element 56"
2193   },
2194   {
2195     "custom_57",
2196     "custom",
2197     "custom element 57"
2198   },
2199   {
2200     "custom_58",
2201     "custom",
2202     "custom element 58"
2203   },
2204   {
2205     "custom_59",
2206     "custom",
2207     "custom element 59"
2208   },
2209   {
2210     "custom_60",
2211     "custom",
2212     "custom element 60"
2213   },
2214   {
2215     "custom_61",
2216     "custom",
2217     "custom element 61"
2218   },
2219   {
2220     "custom_62",
2221     "custom",
2222     "custom element 62"
2223   },
2224   {
2225     "custom_63",
2226     "custom",
2227     "custom element 63"
2228   },
2229   {
2230     "custom_64",
2231     "custom",
2232     "custom element 64"
2233   },
2234   {
2235     "custom_65",
2236     "custom",
2237     "custom element 65"
2238   },
2239   {
2240     "custom_66",
2241     "custom",
2242     "custom element 66"
2243   },
2244   {
2245     "custom_67",
2246     "custom",
2247     "custom element 67"
2248   },
2249   {
2250     "custom_68",
2251     "custom",
2252     "custom element 68"
2253   },
2254   {
2255     "custom_69",
2256     "custom",
2257     "custom element 69"
2258   },
2259   {
2260     "custom_70",
2261     "custom",
2262     "custom element 70"
2263   },
2264   {
2265     "custom_71",
2266     "custom",
2267     "custom element 71"
2268   },
2269   {
2270     "custom_72",
2271     "custom",
2272     "custom element 72"
2273   },
2274   {
2275     "custom_73",
2276     "custom",
2277     "custom element 73"
2278   },
2279   {
2280     "custom_74",
2281     "custom",
2282     "custom element 74"
2283   },
2284   {
2285     "custom_75",
2286     "custom",
2287     "custom element 75"
2288   },
2289   {
2290     "custom_76",
2291     "custom",
2292     "custom element 76"
2293   },
2294   {
2295     "custom_77",
2296     "custom",
2297     "custom element 77"
2298   },
2299   {
2300     "custom_78",
2301     "custom",
2302     "custom element 78"
2303   },
2304   {
2305     "custom_79",
2306     "custom",
2307     "custom element 79"
2308   },
2309   {
2310     "custom_80",
2311     "custom",
2312     "custom element 80"
2313   },
2314   {
2315     "custom_81",
2316     "custom",
2317     "custom element 81"
2318   },
2319   {
2320     "custom_82",
2321     "custom",
2322     "custom element 82"
2323   },
2324   {
2325     "custom_83",
2326     "custom",
2327     "custom element 83"
2328   },
2329   {
2330     "custom_84",
2331     "custom",
2332     "custom element 84"
2333   },
2334   {
2335     "custom_85",
2336     "custom",
2337     "custom element 85"
2338   },
2339   {
2340     "custom_86",
2341     "custom",
2342     "custom element 86"
2343   },
2344   {
2345     "custom_87",
2346     "custom",
2347     "custom element 87"
2348   },
2349   {
2350     "custom_88",
2351     "custom",
2352     "custom element 88"
2353   },
2354   {
2355     "custom_89",
2356     "custom",
2357     "custom element 89"
2358   },
2359   {
2360     "custom_90",
2361     "custom",
2362     "custom element 90"
2363   },
2364   {
2365     "custom_91",
2366     "custom",
2367     "custom element 91"
2368   },
2369   {
2370     "custom_92",
2371     "custom",
2372     "custom element 92"
2373   },
2374   {
2375     "custom_93",
2376     "custom",
2377     "custom element 93"
2378   },
2379   {
2380     "custom_94",
2381     "custom",
2382     "custom element 94"
2383   },
2384   {
2385     "custom_95",
2386     "custom",
2387     "custom element 95"
2388   },
2389   {
2390     "custom_96",
2391     "custom",
2392     "custom element 96"
2393   },
2394   {
2395     "custom_97",
2396     "custom",
2397     "custom element 97"
2398   },
2399   {
2400     "custom_98",
2401     "custom",
2402     "custom element 98"
2403   },
2404   {
2405     "custom_99",
2406     "custom",
2407     "custom element 99"
2408   },
2409   {
2410     "custom_100",
2411     "custom",
2412     "custom element 100"
2413   },
2414   {
2415     "custom_101",
2416     "custom",
2417     "custom element 101"
2418   },
2419   {
2420     "custom_102",
2421     "custom",
2422     "custom element 102"
2423   },
2424   {
2425     "custom_103",
2426     "custom",
2427     "custom element 103"
2428   },
2429   {
2430     "custom_104",
2431     "custom",
2432     "custom element 104"
2433   },
2434   {
2435     "custom_105",
2436     "custom",
2437     "custom element 105"
2438   },
2439   {
2440     "custom_106",
2441     "custom",
2442     "custom element 106"
2443   },
2444   {
2445     "custom_107",
2446     "custom",
2447     "custom element 107"
2448   },
2449   {
2450     "custom_108",
2451     "custom",
2452     "custom element 108"
2453   },
2454   {
2455     "custom_109",
2456     "custom",
2457     "custom element 109"
2458   },
2459   {
2460     "custom_110",
2461     "custom",
2462     "custom element 110"
2463   },
2464   {
2465     "custom_111",
2466     "custom",
2467     "custom element 111"
2468   },
2469   {
2470     "custom_112",
2471     "custom",
2472     "custom element 112"
2473   },
2474   {
2475     "custom_113",
2476     "custom",
2477     "custom element 113"
2478   },
2479   {
2480     "custom_114",
2481     "custom",
2482     "custom element 114"
2483   },
2484   {
2485     "custom_115",
2486     "custom",
2487     "custom element 115"
2488   },
2489   {
2490     "custom_116",
2491     "custom",
2492     "custom element 116"
2493   },
2494   {
2495     "custom_117",
2496     "custom",
2497     "custom element 117"
2498   },
2499   {
2500     "custom_118",
2501     "custom",
2502     "custom element 118"
2503   },
2504   {
2505     "custom_119",
2506     "custom",
2507     "custom element 119"
2508   },
2509   {
2510     "custom_120",
2511     "custom",
2512     "custom element 120"
2513   },
2514   {
2515     "custom_121",
2516     "custom",
2517     "custom element 121"
2518   },
2519   {
2520     "custom_122",
2521     "custom",
2522     "custom element 122"
2523   },
2524   {
2525     "custom_123",
2526     "custom",
2527     "custom element 123"
2528   },
2529   {
2530     "custom_124",
2531     "custom",
2532     "custom element 124"
2533   },
2534   {
2535     "custom_125",
2536     "custom",
2537     "custom element 125"
2538   },
2539   {
2540     "custom_126",
2541     "custom",
2542     "custom element 126"
2543   },
2544   {
2545     "custom_127",
2546     "custom",
2547     "custom element 127"
2548   },
2549   {
2550     "custom_128",
2551     "custom",
2552     "custom element 128"
2553   },
2554
2555   /* "real" (and therefore drawable) runtime elements */
2556
2557   {
2558     "em_key1",
2559     "key",
2560     "-"
2561     },
2562   {
2563     "em_key2",
2564     "key",
2565     "-"
2566     },
2567   {
2568     "em_key3",
2569     "key",
2570     "-"
2571   },
2572   {
2573     "em_key4",
2574     "key",
2575     "-"
2576   },
2577   {
2578     "dynabomb_player1_active",
2579     "dynabomb",
2580     "-"
2581   },
2582   {
2583     "dynabomb_player2_active",
2584     "dynabomb",
2585     "-"
2586   },
2587   {
2588     "dynabomb_player3_active",
2589     "dynabomb",
2590     "-"
2591   },
2592   {
2593     "dynabomb_player4_active",
2594     "dynabomb",
2595     "-"
2596   },
2597   {
2598     "switchgate_opening",
2599     "switchgate",
2600     "-"
2601   },
2602   {
2603     "switchgate_closing",
2604     "switchgate",
2605     "-"
2606   },
2607   {
2608     "timegate_opening",
2609     "timegate",
2610     "-"
2611   },
2612   {
2613     "timegate_closing",
2614     "timegate",
2615     "-"
2616   },
2617   {
2618     "pearl_breaking",
2619     "pearl",
2620     "-"
2621   },
2622   {
2623     "trap_active",
2624     "trap",
2625     "-"
2626   },
2627   {
2628     "invisible_steelwall_active",
2629     "wall",
2630     "-"
2631   },
2632   {
2633     "invisible_wall_active",
2634     "wall",
2635     "-"
2636   },
2637   {
2638     "invisible_sand_active",
2639     "sand",
2640     "-"
2641   },
2642   {
2643     "conveyor_belt1_left_active",
2644     "conveyor_belt",
2645     "-"
2646   },
2647   {
2648     "conveyor_belt1_middle_active",
2649     "conveyor_belt",
2650     "-"
2651   },
2652   {
2653     "conveyor_belt1_right_active",
2654     "conveyor_belt",
2655     "-"
2656   },
2657   {
2658     "conveyor_belt2_left_active",
2659     "conveyor_belt",
2660     "-"
2661   },
2662   {
2663     "conveyor_belt2_middle_active",
2664     "conveyor_belt",
2665     "-"
2666   },
2667   {
2668     "conveyor_belt2_right_active",
2669     "conveyor_belt",
2670     "-"
2671   },
2672   {
2673     "conveyor_belt3_left_active",
2674     "conveyor_belt",
2675     "-"
2676   },
2677   {
2678     "conveyor_belt3_middle_active",
2679     "conveyor_belt",
2680     "-"
2681   },
2682   {
2683     "conveyor_belt3_right_active",
2684     "conveyor_belt",
2685     "-"
2686   },
2687   {
2688     "conveyor_belt4_left_active",
2689     "conveyor_belt",
2690     "-"
2691   },
2692   {
2693     "conveyor_belt4_middle_active",
2694     "conveyor_belt",
2695     "-"
2696   },
2697   {
2698     "conveyor_belt4_right_active",
2699     "conveyor_belt",
2700     "-"
2701   },
2702   {
2703     "exit_opening",
2704     "exit",
2705     "-"
2706   },
2707   {
2708     "sp_exit_open",
2709     "sp_exit",
2710     "-"
2711   },
2712   {
2713     "sp_terminal_active",
2714     "sp_terminal",
2715     "-"
2716   },
2717   {
2718     "sp_buggy_base_activating",
2719     "sp_buggy_base",
2720     "-"
2721   },
2722   {
2723     "sp_buggy_base_active",
2724     "sp_buggy_base",
2725     "-"
2726   },
2727   {
2728     "sp_murphy_clone",
2729     "murphy_clone",
2730     "-"
2731   },
2732   {
2733     "amoeba_dripping",
2734     "amoeba",
2735     "-"
2736   },
2737   {
2738     "quicksand_emptying",
2739     "quicksand",
2740     "-"
2741   },
2742   {
2743     "magic_wall_active",
2744     "magic_wall",
2745     "-"
2746   },
2747   {
2748     "bd_magic_wall_active",
2749     "magic_wall",
2750     "-"
2751   },
2752   {
2753     "magic_wall_full",
2754     "magic_wall",
2755     "-"
2756   },
2757   {
2758     "bd_magic_wall_full",
2759     "magic_wall",
2760     "-"
2761   },
2762   {
2763     "magic_wall_emptying",
2764     "magic_wall",
2765     "-"
2766   },
2767   {
2768     "bd_magic_wall_emptying",
2769     "magic_wall",
2770     "-"
2771   },
2772   {
2773     "magic_wall_dead",
2774     "magic_wall",
2775     "-"
2776   },
2777   {
2778     "bd_magic_wall_dead",
2779     "magic_wall",
2780     "-"
2781   },
2782
2783   {
2784     "",
2785     NULL,
2786     "-"
2787   }
2788 };
2789
2790 struct NewGraphicInfo graphic_info[NUM_IMAGE_FILES];
2791
2792
2793 /* ========================================================================= */
2794 /* main()                                                                    */
2795 /* ========================================================================= */
2796
2797 int main(int argc, char *argv[])
2798 {
2799   InitCommandName(argv[0]);
2800   InitExitFunction(CloseAllAndExit);
2801   InitPlatformDependantStuff();
2802
2803   GetOptions(argv);
2804   OpenAll();
2805
2806   EventLoop();
2807   CloseAllAndExit(0);
2808
2809   return 0;     /* to keep compilers happy */
2810 }