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