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