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