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