fixed horrible bug causing memory access after last argument in 'argv[]'
[rocksndiamonds.git] / src / main.c
1 // ============================================================================
2 // Rocks'n'Diamonds - McDuffin Strikes Back!
3 // ----------------------------------------------------------------------------
4 // (c) 1995-2014 by Artsoft Entertainment
5 //                  Holger Schemel
6 //                  info@artsoft.org
7 //                  http://www.artsoft.org/
8 // ----------------------------------------------------------------------------
9 // main.c
10 // ============================================================================
11
12 #include "libgame/libgame.h"
13
14 #include "main.h"
15 #include "init.h"
16 #include "game.h"
17 #include "tape.h"
18 #include "tools.h"
19 #include "files.h"
20 #include "events.h"
21 #include "config.h"
22
23 Bitmap                 *bitmap_db_store;
24 Bitmap                 *bitmap_db_cross;
25 Bitmap                 *bitmap_db_field;
26 Bitmap                 *bitmap_db_panel;
27 Bitmap                 *bitmap_db_door_1;
28 Bitmap                 *bitmap_db_door_2;
29 Bitmap                 *bitmap_db_toons;
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 #if defined(TARGET_SDL)
38 boolean                 network_server = FALSE;
39 SDL_Thread             *server_thread;
40 #endif
41
42 int                     key_joystick_mapping = 0;
43
44 short                   Feld[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
45 short                   MovPos[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
46 short                   MovDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
47 short                   MovDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
48 short                   ChangeDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
49 short                   ChangePage[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
50 short                   CustomValue[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
51 short                   Store[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
52 short                   Store2[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
53 short                   StorePlayer[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
54 short                   Back[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
55 boolean                 Stop[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
56 boolean                 Pushed[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
57 short                   ChangeCount[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
58 short                   ChangeEvent[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
59 short                   WasJustMoving[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
60 short                   WasJustFalling[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
61 short                   CheckCollision[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
62 short                   CheckImpact[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
63 short                   AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
64 short                   AmoebaCnt[MAX_NUM_AMOEBA];
65 short                   AmoebaCnt2[MAX_NUM_AMOEBA];
66 short                   ExplodeField[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
67 short                   ExplodePhase[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
68 short                   ExplodeDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
69 int                     RunnerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
70 int                     PlayerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
71
72 int                     GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
73 int                     GfxRandom[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
74 int                     GfxElement[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
75 int                     GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
76 int                     GfxDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
77 int                     GfxRedraw[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
78
79 int                     ActiveElement[MAX_NUM_ELEMENTS];
80 int                     ActiveButton[NUM_IMAGE_FILES];
81 int                     ActiveFont[NUM_FONTS];
82
83 int                     lev_fieldx, lev_fieldy;
84 int                     scroll_x, scroll_y;
85
86 int                     WIN_XSIZE = WIN_XSIZE_DEFAULT;
87 int                     WIN_YSIZE = WIN_YSIZE_DEFAULT;
88
89 int                     SCR_FIELDX = SCR_FIELDX_DEFAULT;
90 int                     SCR_FIELDY = SCR_FIELDY_DEFAULT;
91
92 int                     REAL_SX = 6, REAL_SY = 6;
93 int                     SX = 8, SY = 8;
94 int                     DX = 566, DY = 60;
95 int                     VX = 566, VY = 400;
96 int                     EX = 566, EY = 356;
97 int                     dDX, dDY;
98
99 int                     FULL_SXSIZE = 2 + SXSIZE_DEFAULT + 2;
100 int                     FULL_SYSIZE = 2 + SYSIZE_DEFAULT + 2;
101 int                     SXSIZE = SXSIZE_DEFAULT;
102 int                     SYSIZE = SYSIZE_DEFAULT;
103
104 int                     FADE_SX = 6, FADE_SY = 6;
105 int                     FADE_SXSIZE = 2 + SXSIZE_DEFAULT + 2;
106 int                     FADE_SYSIZE = 2 + SXSIZE_DEFAULT + 2;
107
108 int                     DXSIZE = 100;
109 int                     DYSIZE = 280;
110 int                     VXSIZE = 100;
111 int                     VYSIZE = 100;
112 int                     EXSIZE = 100;
113 int                     EYSIZE = 144;
114 int                     TILESIZE_VAR = TILESIZE;
115
116 int                     FX, FY;
117 int                     ScrollStepSize;
118 int                     ScreenMovDir = MV_NONE, ScreenMovPos = 0;
119 int                     ScreenGfxPos = 0;
120 int                     BorderElement = EL_STEELWALL;
121 int                     GameFrameDelay = GAME_FRAME_DELAY;
122 int                     FfwdFrameDelay = FFWD_FRAME_DELAY;
123 int                     BX1, BY1;
124 int                     BX2, BY2;
125 int                     SBX_Left, SBX_Right;
126 int                     SBY_Upper, SBY_Lower;
127 int                     ZX, ZY;
128 int                     ExitX, ExitY;
129 int                     AllPlayersGone;
130
131 int                     TimeFrames, TimePlayed, TimeLeft, TapeTime;
132
133 boolean                 network_player_action_received = FALSE;
134
135 struct LevelSetInfo     levelset;
136 struct LevelInfo        level, level_template;
137 struct PlayerInfo       stored_player[MAX_PLAYERS], *local_player = NULL;
138 struct HiScore          highscore[MAX_SCORE_ENTRIES];
139 struct TapeInfo         tape;
140 struct SetupInfo        setup;
141 struct GameInfo         game;
142 struct GlobalInfo       global;
143 struct BorderInfo       border;
144 struct ViewportInfo     viewport;
145 struct TitleFadingInfo  fading;
146 struct TitleFadingInfo  title_initial_default;
147 struct TitleFadingInfo  title_default;
148 struct TitleMessageInfo titlemessage_initial_default;
149 struct TitleMessageInfo titlemessage_initial[MAX_NUM_TITLE_MESSAGES];
150 struct TitleMessageInfo titlemessage_default;
151 struct TitleMessageInfo titlemessage[MAX_NUM_TITLE_MESSAGES];
152 struct TitleMessageInfo readme;
153 struct InitInfo         init, init_last;
154 struct MenuInfo         menu;
155 struct DoorInfo         door_1, door_2;
156 struct RequestInfo      request;
157 struct PreviewInfo      preview;
158 struct EditorInfo       editor;
159
160 struct GraphicInfo     *graphic_info = NULL;
161 struct SoundInfo       *sound_info = NULL;
162 struct MusicInfo       *music_info = NULL;
163 struct MusicFileInfo   *music_file_info = NULL;
164 struct HelpAnimInfo    *helpanim_info = NULL;
165
166 SetupFileHash          *helptext_info = NULL;
167 SetupFileHash          *image_config_hash = NULL;
168 SetupFileHash          *element_token_hash = NULL;
169 SetupFileHash          *graphic_token_hash = NULL;
170 SetupFileHash          *font_token_hash = NULL;
171
172
173 /* ------------------------------------------------------------------------- */
174 /* element definitions                                                       */
175 /* ------------------------------------------------------------------------- */
176
177 struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1];
178
179 /* this contains predefined structure elements to initialize "element_info" */
180 struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
181 {
182   /* keyword to start parser: "ELEMENT_INFO_START" <-- do not change! */
183
184   /* ----------------------------------------------------------------------- */
185   /* "real" level file elements                                              */
186   /* ----------------------------------------------------------------------- */
187
188   {
189     "empty_space",
190     "empty_space",
191     "empty space"
192   },
193   {
194     "sand",
195     "sand",
196     "sand"
197   },
198   {
199     "wall",
200     "wall",
201     "normal wall"
202   },
203   {
204     "wall_slippery",
205     "wall",
206     "slippery wall"
207   },
208   {
209     "rock",
210     "rock",
211     "rock"
212   },
213   {
214     "key_obsolete",
215     "obsolete",
216     "key (OBSOLETE)"
217   },
218   {
219     "emerald",
220     "emerald",
221     "emerald"
222   },
223   {
224     "exit_closed",
225     "exit",
226     "closed exit"
227   },
228   {
229     "player_obsolete",
230     "obsolete",
231     "player (OBSOLETE)"
232   },
233   {
234     "bug",
235     "bug",
236     "bug (random start direction)"
237   },
238   {
239     "spaceship",
240     "spaceship",
241     "spaceship (random start direction)"
242   },
243   {
244     "yamyam",
245     "yamyam",
246     "yam yam (random start direction)"
247   },
248   {
249     "robot",
250     "robot",
251     "robot"
252   },
253   {
254     "steelwall",
255     "steelwall",
256     "steel wall"
257   },
258   {
259     "diamond",
260     "diamond",
261     "diamond"
262   },
263   {
264     "amoeba_dead",
265     "amoeba",
266     "dead amoeba"
267   },
268   {
269     "quicksand_empty",
270     "quicksand",
271     "quicksand (empty)"
272   },
273   {
274     "quicksand_full",
275     "quicksand",
276     "quicksand (with rock)"
277   },
278   {
279     "amoeba_drop",
280     "amoeba",
281     "amoeba drop"
282   },
283   {
284     "bomb",
285     "bomb",
286     "bomb"
287   },
288   {
289     "magic_wall",
290     "magic_wall",
291     "magic wall"
292   },
293   {
294     "speed_pill",
295     "speed_pill",
296     "speed pill"
297   },
298   {
299     "acid",
300     "acid",
301     "acid"
302   },
303   {
304     "amoeba_wet",
305     "amoeba",
306     "dropping amoeba (EM style)"
307   },
308   {
309     "amoeba_dry",
310     "amoeba",
311     "normal amoeba"
312   },
313   {
314     "nut",
315     "nut",
316     "nut with emerald"
317   },
318   {
319     "game_of_life",
320     "game_of_life",
321     "Conway's wall of life"
322   },
323   {
324     "biomaze",
325     "biomaze",
326     "biomaze"
327   },
328   {
329     "dynamite.active",
330     "dynamite",
331     "burning dynamite"
332   },
333   {
334     "stoneblock",
335     "wall",
336     "wall"
337   },
338   {
339     "robot_wheel",
340     "robot_wheel",
341     "magic wheel"
342   },
343   {
344     "robot_wheel.active",
345     "robot_wheel",
346     "magic wheel (running)"
347   },
348   {
349     "key_1",
350     "key",
351     "key 1"
352   },
353   {
354     "key_2",
355     "key",
356     "key 2"
357   },
358   {
359     "key_3",
360     "key",
361     "key 3"
362   },
363   {
364     "key_4",
365     "key",
366     "key 4"
367   },
368   {
369     "gate_1",
370     "gate",
371     "door 1"
372   },
373   {
374     "gate_2",
375     "gate",
376     "door 2"
377   },
378   {
379     "gate_3",
380     "gate",
381     "door 3"
382   },
383   {
384     "gate_4",
385     "gate",
386     "door 4"
387   },
388   {
389     "gate_1_gray",
390     "gate",
391     "gray door (opened by key 1)"
392   },
393   {
394     "gate_2_gray",
395     "gate",
396     "gray door (opened by key 2)"
397   },
398   {
399     "gate_3_gray",
400     "gate",
401     "gray door (opened by key 3)"
402   },
403   {
404     "gate_4_gray",
405     "gate",
406     "gray door (opened by key 4)"
407   },
408   {
409     "dynamite",
410     "dynamite",
411     "dynamite"
412   },
413   {
414     "pacman",
415     "pacman",
416     "pac man (random start direction)"
417   },
418   {
419     "invisible_wall",
420     "wall",
421     "invisible normal wall"
422   },
423   {
424     "lamp",
425     "lamp",
426     "lamp (off)"
427   },
428   {
429     "lamp.active",
430     "lamp",
431     "lamp (on)"
432   },
433   {
434     "wall_emerald",
435     "wall",
436     "wall with emerald"
437   },
438   {
439     "wall_diamond",
440     "wall",
441     "wall with diamond"
442   },
443   {
444     "amoeba_full",
445     "amoeba",
446     "amoeba with content"
447   },
448   {
449     "bd_amoeba",
450     "bd_amoeba",
451     "amoeba (BD style)"
452   },
453   {
454     "time_orb_full",
455     "time_orb_full",
456     "time orb (full)"
457   },
458   {
459     "time_orb_empty",
460     "time_orb_empty",
461     "time orb (empty)"
462   },
463   {
464     "expandable_wall",
465     "wall",
466     "growing wall (horizontal, visible)"
467   },
468   {
469     "bd_diamond",
470     "bd_diamond",
471     "diamond (BD style)"
472   },
473   {
474     "emerald_yellow",
475     "emerald",
476     "yellow emerald"
477   },
478   {
479     "wall_bd_diamond",
480     "wall",
481     "wall with BD style diamond"
482   },
483   {
484     "wall_emerald_yellow",
485     "wall",
486     "wall with yellow emerald"
487   },
488   {
489     "dark_yamyam",
490     "dark_yamyam",
491     "dark yam yam"
492   },
493   {
494     "bd_magic_wall",
495     "bd_magic_wall",
496     "magic wall (BD style)"
497   },
498   {
499     "invisible_steelwall",
500     "steelwall",
501     "invisible steel wall"
502   },
503   {
504     "sokoban_field_player",
505     "sokoban",
506     "sokoban field with player"
507   },
508   {
509     "dynabomb_increase_number",
510     "dynabomb",
511     "increases number of bombs"
512   },
513   {
514     "dynabomb_increase_size",
515     "dynabomb",
516     "increases explosion size"
517   },
518   {
519     "dynabomb_increase_power",
520     "dynabomb",
521     "increases power of explosion"
522   },
523   {
524     "sokoban_object",
525     "sokoban",
526     "sokoban object"
527   },
528   {
529     "sokoban_field_empty",
530     "sokoban",
531     "sokoban empty field"
532   },
533   {
534     "sokoban_field_full",
535     "sokoban",
536     "sokoban field with object"
537   },
538   {
539     "bd_butterfly.right",
540     "bd_butterfly",
541     "butterfly (starts moving right)"},
542   {
543     "bd_butterfly.up",
544     "bd_butterfly",
545     "butterfly (starts moving up)"
546   },
547   {
548     "bd_butterfly.left",
549     "bd_butterfly",
550     "butterfly (starts moving left)"},
551   {
552     "bd_butterfly.down",
553     "bd_butterfly",
554     "butterfly (starts moving down)"},
555   {
556     "bd_firefly.right",
557     "bd_firefly",
558     "firefly (starts moving right)"
559   },
560   {
561     "bd_firefly.up",
562     "bd_firefly",
563     "firefly (starts moving up)"
564   },
565   {
566     "bd_firefly.left",
567     "bd_firefly",
568     "firefly (starts moving left)"
569   },
570   {
571     "bd_firefly.down",
572     "bd_firefly",
573     "firefly (starts moving down)"
574   },
575   {
576     "bd_butterfly",
577     "bd_butterfly",
578     "butterfly (random start direction)"
579   },
580   {
581     "bd_firefly",
582     "bd_firefly",
583     "firefly (random start direction)"
584   },
585   {
586     "player_1",
587     "player",
588     "player 1"
589   },
590   {
591     "player_2",
592     "player",
593     "player 2"
594   },
595   {
596     "player_3",
597     "player",
598     "player 3"
599   },
600   {
601     "player_4",
602     "player",
603     "player 4"
604   },
605   {
606     "bug.right",
607     "bug",
608     "bug (starts moving right)"
609   },
610   {
611     "bug.up",
612     "bug",
613     "bug (starts moving up)"
614   },
615   {
616     "bug.left",
617     "bug",
618     "bug (starts moving left)"
619   },
620   {
621     "bug.down",
622     "bug",
623     "bug (starts moving down)"
624   },
625   {
626     "spaceship.right",
627     "spaceship",
628     "spaceship (starts moving right)"},
629   {
630     "spaceship.up",
631     "spaceship",
632     "spaceship (starts moving up)"
633   },
634   {
635     "spaceship.left",
636     "spaceship",
637     "spaceship (starts moving left)"},
638   {
639     "spaceship.down",
640     "spaceship",
641     "spaceship (starts moving down)"},
642   {
643     "pacman.right",
644     "pacman",
645     "pac man (starts moving right)"
646   },
647   {
648     "pacman.up",
649     "pacman",
650     "pac man (starts moving up)"
651   },
652   {
653     "pacman.left",
654     "pacman",
655     "pac man (starts moving left)"
656   },
657   {
658     "pacman.down",
659     "pacman",
660     "pac man (starts moving down)"
661   },
662   {
663     "emerald_red",
664     "emerald",
665     "red emerald"
666   },
667   {
668     "emerald_purple",
669     "emerald",
670     "purple emerald"
671   },
672   {
673     "wall_emerald_red",
674     "wall",
675     "wall with red emerald"
676   },
677   {
678     "wall_emerald_purple",
679     "wall",
680     "wall with purple emerald"
681   },
682   {
683     "acid_pool_topleft",
684     "wall",
685     "acid pool (top left)"
686   },
687   {
688     "acid_pool_topright",
689     "wall",
690     "acid pool (top right)"
691   },
692   {
693     "acid_pool_bottomleft",
694     "wall",
695     "acid pool (bottom left)"
696   },
697   {
698     "acid_pool_bottom",
699     "wall",
700     "acid pool (bottom)"
701   },
702   {
703     "acid_pool_bottomright",
704     "wall",
705     "acid pool (bottom right)"
706   },
707   {
708     "bd_wall",
709     "wall",
710     "normal wall (BD style)"
711   },
712   {
713     "bd_rock",
714     "bd_rock",
715     "rock (BD style)"
716   },
717   {
718     "exit_open",
719     "exit",
720     "open exit"
721   },
722   {
723     "black_orb",
724     "black_orb",
725     "black orb bomb"
726   },
727   {
728     "amoeba_to_diamond",
729     "amoeba",
730     "amoeba"
731   },
732   {
733     "mole",
734     "mole",
735     "mole (random start direction)"
736   },
737   {
738     "penguin",
739     "penguin",
740     "penguin"
741   },
742   {
743     "satellite",
744     "satellite",
745     "satellite"
746   },
747   {
748     "arrow_left",
749     "arrow",
750     "arrow left"
751   },
752   {
753     "arrow_right",
754     "arrow",
755     "arrow right"
756   },
757   {
758     "arrow_up",
759     "arrow",
760     "arrow up"
761   },
762   {
763     "arrow_down",
764     "arrow",
765     "arrow down"
766   },
767   {
768     "pig",
769     "pig",
770     "pig"
771   },
772   {
773     "dragon",
774     "dragon",
775     "fire breathing dragon"
776   },
777   {
778     "em_key_1_file_obsolete",
779     "obsolete",
780     "key (OBSOLETE)"
781   },
782   {
783     "char_space",
784     "char",
785     "letter ' '"
786   },
787   {
788     "char_exclam",
789     "char",
790     "letter '!'"
791   },
792   {
793     "char_quotedbl",
794     "char",
795     "letter '\"'"
796   },
797   {
798     "char_numbersign",
799     "char",
800     "letter '#'"
801   },
802   {
803     "char_dollar",
804     "char",
805     "letter '$'"
806   },
807   {
808     "char_percent",
809     "char",
810     "letter '%'"
811   },
812   {
813     "char_ampersand",
814     "char",
815     "letter '&'"
816   },
817   {
818     "char_apostrophe",
819     "char",
820     "letter '''"
821   },
822   {
823     "char_parenleft",
824     "char",
825     "letter '('"
826   },
827   {
828     "char_parenright",
829     "char",
830     "letter ')'"
831   },
832   {
833     "char_asterisk",
834     "char",
835     "letter '*'"
836   },
837   {
838     "char_plus",
839     "char",
840     "letter '+'"
841   },
842   {
843     "char_comma",
844     "char",
845     "letter ','"
846   },
847   {
848     "char_minus",
849     "char",
850     "letter '-'"
851   },
852   {
853     "char_period",
854     "char",
855     "letter '.'"
856   },
857   {
858     "char_slash",
859     "char",
860     "letter '/'"
861   },
862   {
863     "char_0",
864     "char",
865     "letter '0'"
866   },
867   {
868     "char_1",
869     "char",
870     "letter '1'"
871   },
872   {
873     "char_2",
874     "char",
875     "letter '2'"
876   },
877   {
878     "char_3",
879     "char",
880     "letter '3'"
881   },
882   {
883     "char_4",
884     "char",
885     "letter '4'"
886   },
887   {
888     "char_5",
889     "char",
890     "letter '5'"
891   },
892   {
893     "char_6",
894     "char",
895     "letter '6'"
896   },
897   {
898     "char_7",
899     "char",
900     "letter '7'"
901   },
902   {
903     "char_8",
904     "char",
905     "letter '8'"
906   },
907   {
908     "char_9",
909     "char",
910     "letter '9'"
911   },
912   {
913     "char_colon",
914     "char",
915     "letter ':'"
916   },
917   {
918     "char_semicolon",
919     "char",
920     "letter ';'"
921   },
922   {
923     "char_less",
924     "char",
925     "letter '<'"
926   },
927   {
928     "char_equal",
929     "char",
930     "letter '='"
931   },
932   {
933     "char_greater",
934     "char",
935     "letter '>'"
936   },
937   {
938     "char_question",
939     "char",
940     "letter '?'"
941   },
942   {
943     "char_at",
944     "char",
945     "letter '@'"
946   },
947   {
948     "char_a",
949     "char",
950     "letter 'A'"
951   },
952   {
953     "char_b",
954     "char",
955     "letter 'B'"
956   },
957   {
958     "char_c",
959     "char",
960     "letter 'C'"
961   },
962   {
963     "char_d",
964     "char",
965     "letter 'D'"
966   },
967   {
968     "char_e",
969     "char",
970     "letter 'E'"
971   },
972   {
973     "char_f",
974     "char",
975     "letter 'F'"
976   },
977   {
978     "char_g",
979     "char",
980     "letter 'G'"
981   },
982   {
983     "char_h",
984     "char",
985     "letter 'H'"
986   },
987   {
988     "char_i",
989     "char",
990     "letter 'I'"
991   },
992   {
993     "char_j",
994     "char",
995     "letter 'J'"
996   },
997   {
998     "char_k",
999     "char",
1000     "letter 'K'"
1001   },
1002   {
1003     "char_l",
1004     "char",
1005     "letter 'L'"
1006   },
1007   {
1008     "char_m",
1009     "char",
1010     "letter 'M'"
1011   },
1012   {
1013     "char_n",
1014     "char",
1015     "letter 'N'"
1016   },
1017   {
1018     "char_o",
1019     "char",
1020     "letter 'O'"
1021   },
1022   {
1023     "char_p",
1024     "char",
1025     "letter 'P'"
1026   },
1027   {
1028     "char_q",
1029     "char",
1030     "letter 'Q'"
1031   },
1032   {
1033     "char_r",
1034     "char",
1035     "letter 'R'"
1036   },
1037   {
1038     "char_s",
1039     "char",
1040     "letter 'S'"
1041   },
1042   {
1043     "char_t",
1044     "char",
1045     "letter 'T'"
1046   },
1047   {
1048     "char_u",
1049     "char",
1050     "letter 'U'"
1051   },
1052   {
1053     "char_v",
1054     "char",
1055     "letter 'V'"
1056   },
1057   {
1058     "char_w",
1059     "char",
1060     "letter 'W'"
1061   },
1062   {
1063     "char_x",
1064     "char",
1065     "letter 'X'"
1066   },
1067   {
1068     "char_y",
1069     "char",
1070     "letter 'Y'"
1071   },
1072   {
1073     "char_z",
1074     "char",
1075     "letter 'Z'"
1076   },
1077   {
1078     "char_bracketleft",
1079     "char",
1080     "letter '['"
1081   },
1082   {
1083     "char_backslash",
1084     "char",
1085     "letter '\\'"
1086   },
1087   {
1088     "char_bracketright",
1089     "char",
1090     "letter ']'"
1091   },
1092   {
1093     "char_asciicircum",
1094     "char",
1095     "letter '^'"
1096   },
1097   {
1098     "char_underscore",
1099     "char",
1100     "letter '_'"
1101   },
1102   {
1103     "char_copyright",
1104     "char",
1105     "letter '\xa9'"
1106   },
1107   {
1108     "char_aumlaut",
1109     "char",
1110     "letter '\xc4'"
1111   },
1112   {
1113     "char_oumlaut",
1114     "char",
1115     "letter '\xd6'"
1116   },
1117   {
1118     "char_uumlaut",
1119     "char",
1120     "letter '\xdc'"
1121   },
1122   {
1123     "char_degree",
1124     "char",
1125     "letter '\xb0'"
1126   },
1127   {
1128     "char_trademark",
1129     "char",
1130     "letter '\xae'"
1131   },
1132   {
1133     "char_cursor",
1134     "char",
1135     "letter '\xa0'"
1136   },
1137   {
1138     "char_unused",
1139     "char",
1140     "letter ''"
1141   },
1142   {
1143     "char_unused",
1144     "char",
1145     "letter ''"
1146   },
1147   {
1148     "char_unused",
1149     "char",
1150     "letter ''"
1151   },
1152   {
1153     "char_unused",
1154     "char",
1155     "letter ''"
1156   },
1157   {
1158     "char_unused",
1159     "char",
1160     "letter ''"
1161   },
1162   {
1163     "char_unused",
1164     "char",
1165     "letter ''"
1166   },
1167   {
1168     "char_unused",
1169     "char",
1170     "letter 'button'"
1171   },
1172   {
1173     "char_unused",
1174     "char",
1175     "letter 'up'"
1176   },
1177   {
1178     "char_unused",
1179     "char",
1180     "letter 'down'"
1181   },
1182   {
1183     "expandable_wall_horizontal",
1184     "wall",
1185     "growing wall (horizontal)"
1186   },
1187   {
1188     "expandable_wall_vertical",
1189     "wall",
1190     "growing wall (vertical)"
1191   },
1192   {
1193     "expandable_wall_any",
1194     "wall",
1195     "growing wall (any direction)"
1196   },
1197   {
1198     "em_gate_1",
1199     "gate",
1200     "door 1 (EM style)"
1201   },
1202   {
1203     "em_gate_2",
1204     "gate",
1205     "door 2 (EM style)"
1206   },
1207   {
1208     "em_gate_3",
1209     "gate",
1210     "door 3 (EM style)"
1211   },
1212   {
1213     "em_gate_4",
1214     "gate",
1215     "door 4 (EM style)"
1216   },
1217   {
1218     "em_key_2_file_obsolete",
1219     "obsolete",
1220     "key (OBSOLETE)"
1221   },
1222   {
1223     "em_key_3_file_obsolete",
1224     "obsolete",
1225     "key (OBSOLETE)"
1226   },
1227   {
1228     "em_key_4_file_obsolete",
1229     "obsolete",
1230     "key (OBSOLETE)"
1231   },
1232   {
1233     "sp_empty_space",
1234     "empty_space",
1235     "empty space"
1236   },
1237   {
1238     "sp_zonk",
1239     "sp_zonk",
1240     "zonk"
1241   },
1242   {
1243     "sp_base",
1244     "sp_base",
1245     "base"
1246   },
1247   {
1248     "sp_murphy",
1249     "player",
1250     "murphy"
1251   },
1252   {
1253     "sp_infotron",
1254     "sp_infotron",
1255     "infotron"
1256   },
1257   {
1258     "sp_chip_single",
1259     "wall",
1260     "chip (single)"
1261   },
1262   {
1263     "sp_hardware_gray",
1264     "wall",
1265     "hardware"
1266   },
1267   {
1268     "sp_exit_closed",
1269     "sp_exit",
1270     "exit"
1271   },
1272   {
1273     "sp_disk_orange",
1274     "sp_disk_orange",
1275     "orange disk"
1276   },
1277   {
1278     "sp_port_right",
1279     "sp_port",
1280     "port (leading right)"
1281   },
1282   {
1283     "sp_port_down",
1284     "sp_port",
1285     "port (leading down)"
1286   },
1287   {
1288     "sp_port_left",
1289     "sp_port",
1290     "port (leading left)"
1291   },
1292   {
1293     "sp_port_up",
1294     "sp_port",
1295     "port (leading up)"
1296   },
1297   {
1298     "sp_gravity_port_right",
1299     "sp_gravity_port",
1300     "gravity-on/off port (leading right)"
1301   },
1302   {
1303     "sp_gravity_port_down",
1304     "sp_gravity_port",
1305     "gravity-on/off port (leading down)"
1306   },
1307   {
1308     "sp_gravity_port_left",
1309     "sp_gravity_port",
1310     "gravity-on/off port (leading left)"
1311   },
1312   {
1313     "sp_gravity_port_up",
1314     "sp_gravity_port",
1315     "gravity-on/off port (leading up)"
1316   },
1317   {
1318     "sp_sniksnak",
1319     "sp_sniksnak",
1320     "snik snak"
1321   },
1322   {
1323     "sp_disk_yellow",
1324     "sp_disk_yellow",
1325     "yellow disk"
1326   },
1327   {
1328     "sp_terminal",
1329     "sp_terminal",
1330     "terminal"
1331   },
1332   {
1333     "sp_disk_red",
1334     "dynamite",
1335     "red disk"
1336   },
1337   {
1338     "sp_port_vertical",
1339     "sp_port",
1340     "port (vertical)"
1341   },
1342   {
1343     "sp_port_horizontal",
1344     "sp_port",
1345     "port (horizontal)"
1346   },
1347   {
1348     "sp_port_any",
1349     "sp_port",
1350     "port (any direction)"
1351   },
1352   {
1353     "sp_electron",
1354     "sp_electron",
1355     "electron"
1356   },
1357   {
1358     "sp_buggy_base",
1359     "sp_buggy_base",
1360     "buggy base"
1361   },
1362   {
1363     "sp_chip_left",
1364     "wall",
1365     "chip (left half)"
1366   },
1367   {
1368     "sp_chip_right",
1369     "wall",
1370     "chip (right half)"
1371   },
1372   {
1373     "sp_hardware_base_1",
1374     "wall",
1375     "hardware"
1376   },
1377   {
1378     "sp_hardware_green",
1379     "wall",
1380     "hardware"
1381   },
1382   {
1383     "sp_hardware_blue",
1384     "wall",
1385     "hardware"
1386   },
1387   {
1388     "sp_hardware_red",
1389     "wall",
1390     "hardware"
1391   },
1392   {
1393     "sp_hardware_yellow",
1394     "wall",
1395     "hardware"
1396   },
1397   {
1398     "sp_hardware_base_2",
1399     "wall",
1400     "hardware"
1401   },
1402   {
1403     "sp_hardware_base_3",
1404     "wall",
1405     "hardware"
1406   },
1407   {
1408     "sp_hardware_base_4",
1409     "wall",
1410     "hardware"
1411   },
1412   {
1413     "sp_hardware_base_5",
1414     "wall",
1415     "hardware"
1416   },
1417   {
1418     "sp_hardware_base_6",
1419     "wall",
1420     "hardware"
1421   },
1422   {
1423     "sp_chip_top",
1424     "wall",
1425     "chip (upper half)"
1426   },
1427   {
1428     "sp_chip_bottom",
1429     "wall",
1430     "chip (lower half)"
1431   },
1432   {
1433     "em_gate_1_gray",
1434     "gate",
1435     "gray door (EM style, key 1)"
1436   },
1437   {
1438     "em_gate_2_gray",
1439     "gate",
1440     "gray door (EM style, key 2)"
1441   },
1442   {
1443     "em_gate_3_gray",
1444     "gate",
1445     "gray door (EM style, key 3)"
1446   },
1447   {
1448     "em_gate_4_gray",
1449     "gate",
1450     "gray door (EM style, key 4)"
1451   },
1452   {
1453     "em_dynamite",
1454     "dynamite",
1455     "dynamite (EM style)"
1456   },
1457   {
1458     "em_dynamite.active",
1459     "dynamite",
1460     "burning dynamite (EM style)"
1461   },
1462   {
1463     "pearl",
1464     "pearl",
1465     "pearl"
1466   },
1467   {
1468     "crystal",
1469     "crystal",
1470     "crystal"
1471   },
1472   {
1473     "wall_pearl",
1474     "wall",
1475     "wall with pearl"
1476   },
1477   {
1478     "wall_crystal",
1479     "wall",
1480     "wall with crystal"
1481   },
1482   {
1483     "dc_gate_white",
1484     "gate",
1485     "white door"
1486   },
1487   {
1488     "dc_gate_white_gray",
1489     "gate",
1490     "gray door (opened by white key)"
1491   },
1492   {
1493     "dc_key_white",
1494     "key",
1495     "white key"
1496   },
1497   {
1498     "shield_normal",
1499     "shield_normal",
1500     "shield (normal)"
1501   },
1502   {
1503     "extra_time",
1504     "extra_time",
1505     "extra time"
1506   },
1507   {
1508     "switchgate_open",
1509     "switchgate",
1510     "switch gate (open)"
1511   },
1512   {
1513     "switchgate_closed",
1514     "switchgate",
1515     "switch gate (closed)"
1516   },
1517   {
1518     "switchgate_switch_up",
1519     "switchgate_switch",
1520     "switch for switch gate"
1521   },
1522   {
1523     "switchgate_switch_down",
1524     "switchgate_switch",
1525     "switch for switch gate"
1526   },
1527   {
1528     "unused_269",
1529     "unused",
1530     "-"
1531   },
1532   {
1533     "unused_270",
1534     "unused",
1535     "-"
1536   },
1537   {
1538     "conveyor_belt_1_left",
1539     "conveyor_belt",
1540     "conveyor belt 1 (left)"
1541   },
1542   {
1543     "conveyor_belt_1_middle",
1544     "conveyor_belt",
1545     "conveyor belt 1 (middle)"
1546   },
1547   {
1548     "conveyor_belt_1_right",
1549     "conveyor_belt",
1550     "conveyor belt 1 (right)"
1551   },
1552   {
1553     "conveyor_belt_1_switch_left",
1554     "conveyor_belt_switch",
1555     "switch for conveyor belt 1 (left)"
1556   },
1557   {
1558     "conveyor_belt_1_switch_middle",
1559     "conveyor_belt_switch",
1560     "switch for conveyor belt 1 (middle)"
1561   },
1562   {
1563     "conveyor_belt_1_switch_right",
1564     "conveyor_belt_switch",
1565     "switch for conveyor belt 1 (right)"
1566   },
1567   {
1568     "conveyor_belt_2_left",
1569     "conveyor_belt",
1570     "conveyor belt 2 (left)"
1571   },
1572   {
1573     "conveyor_belt_2_middle",
1574     "conveyor_belt",
1575     "conveyor belt 2 (middle)"
1576   },
1577   {
1578     "conveyor_belt_2_right",
1579     "conveyor_belt",
1580     "conveyor belt 2 (right)"
1581   },
1582   {
1583     "conveyor_belt_2_switch_left",
1584     "conveyor_belt_switch",
1585     "switch for conveyor belt 2 (left)"
1586   },
1587   {
1588     "conveyor_belt_2_switch_middle",
1589     "conveyor_belt_switch",
1590     "switch for conveyor belt 2 (middle)"
1591   },
1592   {
1593     "conveyor_belt_2_switch_right",
1594     "conveyor_belt_switch",
1595     "switch for conveyor belt 2 (right)"
1596   },
1597   {
1598     "conveyor_belt_3_left",
1599     "conveyor_belt",
1600     "conveyor belt 3 (left)"
1601   },
1602   {
1603     "conveyor_belt_3_middle",
1604     "conveyor_belt",
1605     "conveyor belt 3 (middle)"
1606   },
1607   {
1608     "conveyor_belt_3_right",
1609     "conveyor_belt",
1610     "conveyor belt 3 (right)"
1611   },
1612   {
1613     "conveyor_belt_3_switch_left",
1614     "conveyor_belt_switch",
1615     "switch for conveyor belt 3 (left)"
1616   },
1617   {
1618     "conveyor_belt_3_switch_middle",
1619     "conveyor_belt_switch",
1620     "switch for conveyor belt 3 (middle)"
1621   },
1622   {
1623     "conveyor_belt_3_switch_right",
1624     "conveyor_belt_switch",
1625     "switch for conveyor belt 3 (right)"
1626   },
1627   {
1628     "conveyor_belt_4_left",
1629     "conveyor_belt",
1630     "conveyor belt 4 (left)"
1631   },
1632   {
1633     "conveyor_belt_4_middle",
1634     "conveyor_belt",
1635     "conveyor belt 4 (middle)"
1636   },
1637   {
1638     "conveyor_belt_4_right",
1639     "conveyor_belt",
1640     "conveyor belt 4 (right)"
1641   },
1642   {
1643     "conveyor_belt_4_switch_left",
1644     "conveyor_belt_switch",
1645     "switch for conveyor belt 4 (left)"
1646   },
1647   {
1648     "conveyor_belt_4_switch_middle",
1649     "conveyor_belt_switch",
1650     "switch for conveyor belt 4 (middle)"
1651   },
1652   {
1653     "conveyor_belt_4_switch_right",
1654     "conveyor_belt_switch",
1655     "switch for conveyor belt 4 (right)"
1656   },
1657   {
1658     "landmine",
1659     "landmine",
1660     "land mine (not removable)"
1661   },
1662   {
1663     "envelope_obsolete",
1664     "obsolete",
1665     "envelope (OBSOLETE)"
1666   },
1667   {
1668     "light_switch",
1669     "light_switch",
1670     "light switch (off)"
1671   },
1672   {
1673     "light_switch.active",
1674     "light_switch",
1675     "light switch (on)"
1676   },
1677   {
1678     "sign_exclamation",
1679     "sign",
1680     "sign (exclamation)"
1681   },
1682   {
1683     "sign_radioactivity",
1684     "sign",
1685     "sign (radio activity)"
1686   },
1687   {
1688     "sign_stop",
1689     "sign",
1690     "sign (stop)"
1691   },
1692   {
1693     "sign_wheelchair",
1694     "sign",
1695     "sign (wheel chair)"
1696   },
1697   {
1698     "sign_parking",
1699     "sign",
1700     "sign (parking)"
1701   },
1702   {
1703     "sign_no_entry",
1704     "sign",
1705     "sign (no entry)"
1706   },
1707   {
1708     "sign_unused_1",
1709     "sign",
1710     "sign (unused)"
1711   },
1712   {
1713     "sign_give_way",
1714     "sign",
1715     "sign (give way)"
1716   },
1717   {
1718     "sign_entry_forbidden",
1719     "sign",
1720     "sign (entry forbidden)"
1721   },
1722   {
1723     "sign_emergency_exit",
1724     "sign",
1725     "sign (emergency exit)"
1726   },
1727   {
1728     "sign_yin_yang",
1729     "sign",
1730     "sign (yin yang)"
1731   },
1732   {
1733     "sign_unused_2",
1734     "sign",
1735     "sign (unused)"
1736   },
1737   {
1738     "mole.left",
1739     "mole",
1740     "mole (starts moving left)"
1741   },
1742   {
1743     "mole.right",
1744     "mole",
1745     "mole (starts moving right)"
1746   },
1747   {
1748     "mole.up",
1749     "mole",
1750     "mole (starts moving up)"
1751   },
1752   {
1753     "mole.down",
1754     "mole",
1755     "mole (starts moving down)"
1756   },
1757   {
1758     "steelwall_slippery",
1759     "steelwall",
1760     "slippery steel wall"
1761   },
1762   {
1763     "invisible_sand",
1764     "sand",
1765     "invisible sand"
1766   },
1767   {
1768     "dx_unknown_15",
1769     "unknown",
1770     "dx unknown element 15"
1771   },
1772   {
1773     "dx_unknown_42",
1774     "unknown",
1775     "dx unknown element 42"
1776   },
1777   {
1778     "unused_319",
1779     "unused",
1780     "(not used)"
1781   },
1782   {
1783     "unused_320",
1784     "unused",
1785     "(not used)"
1786   },
1787   {
1788     "shield_deadly",
1789     "shield_deadly",
1790     "shield (deadly, kills enemies)"
1791   },
1792   {
1793     "timegate_open",
1794     "timegate",
1795     "time gate (open)"
1796   },
1797   {
1798     "timegate_closed",
1799     "timegate",
1800     "time gate (closed)"
1801   },
1802   {
1803     "timegate_switch.active",
1804     "timegate_switch",
1805     "switch for time gate"
1806   },
1807   {
1808     "timegate_switch",
1809     "timegate_switch",
1810     "switch for time gate"
1811   },
1812   {
1813     "balloon",
1814     "balloon",
1815     "balloon"
1816   },
1817   {
1818     "balloon_switch_left",
1819     "balloon_switch",
1820     "wind switch (left)"
1821   },
1822   {
1823     "balloon_switch_right",
1824     "balloon_switch",
1825     "wind switch (right)"
1826   },
1827   {
1828     "balloon_switch_up",
1829     "balloon_switch",
1830     "wind switch (up)"
1831   },
1832   {
1833     "balloon_switch_down",
1834     "balloon_switch",
1835     "wind switch (down)"
1836   },
1837   {
1838     "balloon_switch_any",
1839     "balloon_switch",
1840     "wind switch (any direction)"
1841   },
1842   {
1843     "emc_steelwall_1",
1844     "steelwall",
1845     "steel wall"
1846   },
1847   {
1848     "emc_steelwall_2",
1849     "steelwall",
1850     "steel wall"
1851   },
1852   {
1853     "emc_steelwall_3",
1854     "steelwall",
1855     "steel wall"
1856   },
1857   {
1858     "emc_steelwall_4",
1859     "steelwall",
1860     "steel wall"
1861   },
1862   {
1863     "emc_wall_1",
1864     "wall",
1865     "normal wall"
1866   },
1867   {
1868     "emc_wall_2",
1869     "wall",
1870     "normal wall"
1871   },
1872   {
1873     "emc_wall_3",
1874     "wall",
1875     "normal wall"
1876   },
1877   {
1878     "emc_wall_4",
1879     "wall",
1880     "normal wall"
1881   },
1882   {
1883     "emc_wall_5",
1884     "wall",
1885     "normal wall"
1886   },
1887   {
1888     "emc_wall_6",
1889     "wall",
1890     "normal wall"
1891   },
1892   {
1893     "emc_wall_7",
1894     "wall",
1895     "normal wall"
1896   },
1897   {
1898     "emc_wall_8",
1899     "wall",
1900     "normal wall"
1901   },
1902   {
1903     "tube_any",
1904     "tube",
1905     "tube (any direction)"
1906   },
1907   {
1908     "tube_vertical",
1909     "tube",
1910     "tube (vertical)"
1911   },
1912   {
1913     "tube_horizontal",
1914     "tube",
1915     "tube (horizontal)"
1916   },
1917   {
1918     "tube_vertical_left",
1919     "tube",
1920     "tube (vertical & left)"
1921   },
1922   {
1923     "tube_vertical_right",
1924     "tube",
1925     "tube (vertical & right)"
1926   },
1927   {
1928     "tube_horizontal_up",
1929     "tube",
1930     "tube (horizontal & up)"
1931   },
1932   {
1933     "tube_horizontal_down",
1934     "tube",
1935     "tube (horizontal & down)"
1936   },
1937   {
1938     "tube_left_up",
1939     "tube",
1940     "tube (left & up)"
1941   },
1942   {
1943     "tube_left_down",
1944     "tube",
1945     "tube (left & down)"
1946   },
1947   {
1948     "tube_right_up",
1949     "tube",
1950     "tube (right & up)"
1951   },
1952   {
1953     "tube_right_down",
1954     "tube",
1955     "tube (right & down)"
1956   },
1957   {
1958     "spring",
1959     "spring",
1960     "spring"
1961   },
1962   {
1963     "trap",
1964     "trap",
1965     "trap"
1966   },
1967   {
1968     "dx_supabomb",
1969     "bomb",
1970     "stable bomb (DX style)"
1971   },
1972   {
1973     "unused_358",
1974     "unused",
1975     "-"
1976   },
1977   {
1978     "unused_359",
1979     "unused",
1980     "-"
1981   },
1982   {
1983     "custom_1",
1984     "custom",
1985     "custom element 1"
1986   },
1987   {
1988     "custom_2",
1989     "custom",
1990     "custom element 2"
1991   },
1992   {
1993     "custom_3",
1994     "custom",
1995     "custom element 3"
1996   },
1997   {
1998     "custom_4",
1999     "custom",
2000     "custom element 4"
2001   },
2002   {
2003     "custom_5",
2004     "custom",
2005     "custom element 5"
2006   },
2007   {
2008     "custom_6",
2009     "custom",
2010     "custom element 6"
2011   },
2012   {
2013     "custom_7",
2014     "custom",
2015     "custom element 7"
2016   },
2017   {
2018     "custom_8",
2019     "custom",
2020     "custom element 8"
2021   },
2022   {
2023     "custom_9",
2024     "custom",
2025     "custom element 9"
2026   },
2027   {
2028     "custom_10",
2029     "custom",
2030     "custom element 10"
2031   },
2032   {
2033     "custom_11",
2034     "custom",
2035     "custom element 11"
2036   },
2037   {
2038     "custom_12",
2039     "custom",
2040     "custom element 12"
2041   },
2042   {
2043     "custom_13",
2044     "custom",
2045     "custom element 13"
2046   },
2047   {
2048     "custom_14",
2049     "custom",
2050     "custom element 14"
2051   },
2052   {
2053     "custom_15",
2054     "custom",
2055     "custom element 15"
2056   },
2057   {
2058     "custom_16",
2059     "custom",
2060     "custom element 16"
2061   },
2062   {
2063     "custom_17",
2064     "custom",
2065     "custom element 17"
2066   },
2067   {
2068     "custom_18",
2069     "custom",
2070     "custom element 18"
2071   },
2072   {
2073     "custom_19",
2074     "custom",
2075     "custom element 19"
2076   },
2077   {
2078     "custom_20",
2079     "custom",
2080     "custom element 20"
2081   },
2082   {
2083     "custom_21",
2084     "custom",
2085     "custom element 21"
2086   },
2087   {
2088     "custom_22",
2089     "custom",
2090     "custom element 22"
2091   },
2092   {
2093     "custom_23",
2094     "custom",
2095     "custom element 23"
2096   },
2097   {
2098     "custom_24",
2099     "custom",
2100     "custom element 24"
2101   },
2102   {
2103     "custom_25",
2104     "custom",
2105     "custom element 25"
2106   },
2107   {
2108     "custom_26",
2109     "custom",
2110     "custom element 26"
2111   },
2112   {
2113     "custom_27",
2114     "custom",
2115     "custom element 27"
2116   },
2117   {
2118     "custom_28",
2119     "custom",
2120     "custom element 28"
2121   },
2122   {
2123     "custom_29",
2124     "custom",
2125     "custom element 29"
2126   },
2127   {
2128     "custom_30",
2129     "custom",
2130     "custom element 30"
2131   },
2132   {
2133     "custom_31",
2134     "custom",
2135     "custom element 31"
2136   },
2137   {
2138     "custom_32",
2139     "custom",
2140     "custom element 32"
2141   },
2142   {
2143     "custom_33",
2144     "custom",
2145     "custom element 33"
2146   },
2147   {
2148     "custom_34",
2149     "custom",
2150     "custom element 34"
2151   },
2152   {
2153     "custom_35",
2154     "custom",
2155     "custom element 35"
2156   },
2157   {
2158     "custom_36",
2159     "custom",
2160     "custom element 36"
2161   },
2162   {
2163     "custom_37",
2164     "custom",
2165     "custom element 37"
2166   },
2167   {
2168     "custom_38",
2169     "custom",
2170     "custom element 38"
2171   },
2172   {
2173     "custom_39",
2174     "custom",
2175     "custom element 39"
2176   },
2177   {
2178     "custom_40",
2179     "custom",
2180     "custom element 40"
2181   },
2182   {
2183     "custom_41",
2184     "custom",
2185     "custom element 41"
2186   },
2187   {
2188     "custom_42",
2189     "custom",
2190     "custom element 42"
2191   },
2192   {
2193     "custom_43",
2194     "custom",
2195     "custom element 43"
2196   },
2197   {
2198     "custom_44",
2199     "custom",
2200     "custom element 44"
2201   },
2202   {
2203     "custom_45",
2204     "custom",
2205     "custom element 45"
2206   },
2207   {
2208     "custom_46",
2209     "custom",
2210     "custom element 46"
2211   },
2212   {
2213     "custom_47",
2214     "custom",
2215     "custom element 47"
2216   },
2217   {
2218     "custom_48",
2219     "custom",
2220     "custom element 48"
2221   },
2222   {
2223     "custom_49",
2224     "custom",
2225     "custom element 49"
2226   },
2227   {
2228     "custom_50",
2229     "custom",
2230     "custom element 50"
2231   },
2232   {
2233     "custom_51",
2234     "custom",
2235     "custom element 51"
2236   },
2237   {
2238     "custom_52",
2239     "custom",
2240     "custom element 52"
2241   },
2242   {
2243     "custom_53",
2244     "custom",
2245     "custom element 53"
2246   },
2247   {
2248     "custom_54",
2249     "custom",
2250     "custom element 54"
2251   },
2252   {
2253     "custom_55",
2254     "custom",
2255     "custom element 55"
2256   },
2257   {
2258     "custom_56",
2259     "custom",
2260     "custom element 56"
2261   },
2262   {
2263     "custom_57",
2264     "custom",
2265     "custom element 57"
2266   },
2267   {
2268     "custom_58",
2269     "custom",
2270     "custom element 58"
2271   },
2272   {
2273     "custom_59",
2274     "custom",
2275     "custom element 59"
2276   },
2277   {
2278     "custom_60",
2279     "custom",
2280     "custom element 60"
2281   },
2282   {
2283     "custom_61",
2284     "custom",
2285     "custom element 61"
2286   },
2287   {
2288     "custom_62",
2289     "custom",
2290     "custom element 62"
2291   },
2292   {
2293     "custom_63",
2294     "custom",
2295     "custom element 63"
2296   },
2297   {
2298     "custom_64",
2299     "custom",
2300     "custom element 64"
2301   },
2302   {
2303     "custom_65",
2304     "custom",
2305     "custom element 65"
2306   },
2307   {
2308     "custom_66",
2309     "custom",
2310     "custom element 66"
2311   },
2312   {
2313     "custom_67",
2314     "custom",
2315     "custom element 67"
2316   },
2317   {
2318     "custom_68",
2319     "custom",
2320     "custom element 68"
2321   },
2322   {
2323     "custom_69",
2324     "custom",
2325     "custom element 69"
2326   },
2327   {
2328     "custom_70",
2329     "custom",
2330     "custom element 70"
2331   },
2332   {
2333     "custom_71",
2334     "custom",
2335     "custom element 71"
2336   },
2337   {
2338     "custom_72",
2339     "custom",
2340     "custom element 72"
2341   },
2342   {
2343     "custom_73",
2344     "custom",
2345     "custom element 73"
2346   },
2347   {
2348     "custom_74",
2349     "custom",
2350     "custom element 74"
2351   },
2352   {
2353     "custom_75",
2354     "custom",
2355     "custom element 75"
2356   },
2357   {
2358     "custom_76",
2359     "custom",
2360     "custom element 76"
2361   },
2362   {
2363     "custom_77",
2364     "custom",
2365     "custom element 77"
2366   },
2367   {
2368     "custom_78",
2369     "custom",
2370     "custom element 78"
2371   },
2372   {
2373     "custom_79",
2374     "custom",
2375     "custom element 79"
2376   },
2377   {
2378     "custom_80",
2379     "custom",
2380     "custom element 80"
2381   },
2382   {
2383     "custom_81",
2384     "custom",
2385     "custom element 81"
2386   },
2387   {
2388     "custom_82",
2389     "custom",
2390     "custom element 82"
2391   },
2392   {
2393     "custom_83",
2394     "custom",
2395     "custom element 83"
2396   },
2397   {
2398     "custom_84",
2399     "custom",
2400     "custom element 84"
2401   },
2402   {
2403     "custom_85",
2404     "custom",
2405     "custom element 85"
2406   },
2407   {
2408     "custom_86",
2409     "custom",
2410     "custom element 86"
2411   },
2412   {
2413     "custom_87",
2414     "custom",
2415     "custom element 87"
2416   },
2417   {
2418     "custom_88",
2419     "custom",
2420     "custom element 88"
2421   },
2422   {
2423     "custom_89",
2424     "custom",
2425     "custom element 89"
2426   },
2427   {
2428     "custom_90",
2429     "custom",
2430     "custom element 90"
2431   },
2432   {
2433     "custom_91",
2434     "custom",
2435     "custom element 91"
2436   },
2437   {
2438     "custom_92",
2439     "custom",
2440     "custom element 92"
2441   },
2442   {
2443     "custom_93",
2444     "custom",
2445     "custom element 93"
2446   },
2447   {
2448     "custom_94",
2449     "custom",
2450     "custom element 94"
2451   },
2452   {
2453     "custom_95",
2454     "custom",
2455     "custom element 95"
2456   },
2457   {
2458     "custom_96",
2459     "custom",
2460     "custom element 96"
2461   },
2462   {
2463     "custom_97",
2464     "custom",
2465     "custom element 97"
2466   },
2467   {
2468     "custom_98",
2469     "custom",
2470     "custom element 98"
2471   },
2472   {
2473     "custom_99",
2474     "custom",
2475     "custom element 99"
2476   },
2477   {
2478     "custom_100",
2479     "custom",
2480     "custom element 100"
2481   },
2482   {
2483     "custom_101",
2484     "custom",
2485     "custom element 101"
2486   },
2487   {
2488     "custom_102",
2489     "custom",
2490     "custom element 102"
2491   },
2492   {
2493     "custom_103",
2494     "custom",
2495     "custom element 103"
2496   },
2497   {
2498     "custom_104",
2499     "custom",
2500     "custom element 104"
2501   },
2502   {
2503     "custom_105",
2504     "custom",
2505     "custom element 105"
2506   },
2507   {
2508     "custom_106",
2509     "custom",
2510     "custom element 106"
2511   },
2512   {
2513     "custom_107",
2514     "custom",
2515     "custom element 107"
2516   },
2517   {
2518     "custom_108",
2519     "custom",
2520     "custom element 108"
2521   },
2522   {
2523     "custom_109",
2524     "custom",
2525     "custom element 109"
2526   },
2527   {
2528     "custom_110",
2529     "custom",
2530     "custom element 110"
2531   },
2532   {
2533     "custom_111",
2534     "custom",
2535     "custom element 111"
2536   },
2537   {
2538     "custom_112",
2539     "custom",
2540     "custom element 112"
2541   },
2542   {
2543     "custom_113",
2544     "custom",
2545     "custom element 113"
2546   },
2547   {
2548     "custom_114",
2549     "custom",
2550     "custom element 114"
2551   },
2552   {
2553     "custom_115",
2554     "custom",
2555     "custom element 115"
2556   },
2557   {
2558     "custom_116",
2559     "custom",
2560     "custom element 116"
2561   },
2562   {
2563     "custom_117",
2564     "custom",
2565     "custom element 117"
2566   },
2567   {
2568     "custom_118",
2569     "custom",
2570     "custom element 118"
2571   },
2572   {
2573     "custom_119",
2574     "custom",
2575     "custom element 119"
2576   },
2577   {
2578     "custom_120",
2579     "custom",
2580     "custom element 120"
2581   },
2582   {
2583     "custom_121",
2584     "custom",
2585     "custom element 121"
2586   },
2587   {
2588     "custom_122",
2589     "custom",
2590     "custom element 122"
2591   },
2592   {
2593     "custom_123",
2594     "custom",
2595     "custom element 123"
2596   },
2597   {
2598     "custom_124",
2599     "custom",
2600     "custom element 124"
2601   },
2602   {
2603     "custom_125",
2604     "custom",
2605     "custom element 125"
2606   },
2607   {
2608     "custom_126",
2609     "custom",
2610     "custom element 126"
2611   },
2612   {
2613     "custom_127",
2614     "custom",
2615     "custom element 127"
2616   },
2617   {
2618     "custom_128",
2619     "custom",
2620     "custom element 128"
2621   },
2622   {
2623     "custom_129",
2624     "custom",
2625     "custom element 129"
2626   },
2627   {
2628     "custom_130",
2629     "custom",
2630     "custom element 130"
2631   },
2632   {
2633     "custom_131",
2634     "custom",
2635     "custom element 131"
2636   },
2637   {
2638     "custom_132",
2639     "custom",
2640     "custom element 132"
2641   },
2642   {
2643     "custom_133",
2644     "custom",
2645     "custom element 133"
2646   },
2647   {
2648     "custom_134",
2649     "custom",
2650     "custom element 134"
2651   },
2652   {
2653     "custom_135",
2654     "custom",
2655     "custom element 135"
2656   },
2657   {
2658     "custom_136",
2659     "custom",
2660     "custom element 136"
2661   },
2662   {
2663     "custom_137",
2664     "custom",
2665     "custom element 137"
2666   },
2667   {
2668     "custom_138",
2669     "custom",
2670     "custom element 138"
2671   },
2672   {
2673     "custom_139",
2674     "custom",
2675     "custom element 139"
2676   },
2677   {
2678     "custom_140",
2679     "custom",
2680     "custom element 140"
2681   },
2682   {
2683     "custom_141",
2684     "custom",
2685     "custom element 141"
2686   },
2687   {
2688     "custom_142",
2689     "custom",
2690     "custom element 142"
2691   },
2692   {
2693     "custom_143",
2694     "custom",
2695     "custom element 143"
2696   },
2697   {
2698     "custom_144",
2699     "custom",
2700     "custom element 144"
2701   },
2702   {
2703     "custom_145",
2704     "custom",
2705     "custom element 145"
2706   },
2707   {
2708     "custom_146",
2709     "custom",
2710     "custom element 146"
2711   },
2712   {
2713     "custom_147",
2714     "custom",
2715     "custom element 147"
2716   },
2717   {
2718     "custom_148",
2719     "custom",
2720     "custom element 148"
2721   },
2722   {
2723     "custom_149",
2724     "custom",
2725     "custom element 149"
2726   },
2727   {
2728     "custom_150",
2729     "custom",
2730     "custom element 150"
2731   },
2732   {
2733     "custom_151",
2734     "custom",
2735     "custom element 151"
2736   },
2737   {
2738     "custom_152",
2739     "custom",
2740     "custom element 152"
2741   },
2742   {
2743     "custom_153",
2744     "custom",
2745     "custom element 153"
2746   },
2747   {
2748     "custom_154",
2749     "custom",
2750     "custom element 154"
2751   },
2752   {
2753     "custom_155",
2754     "custom",
2755     "custom element 155"
2756   },
2757   {
2758     "custom_156",
2759     "custom",
2760     "custom element 156"
2761   },
2762   {
2763     "custom_157",
2764     "custom",
2765     "custom element 157"
2766   },
2767   {
2768     "custom_158",
2769     "custom",
2770     "custom element 158"
2771   },
2772   {
2773     "custom_159",
2774     "custom",
2775     "custom element 159"
2776   },
2777   {
2778     "custom_160",
2779     "custom",
2780     "custom element 160"
2781   },
2782   {
2783     "custom_161",
2784     "custom",
2785     "custom element 161"
2786   },
2787   {
2788     "custom_162",
2789     "custom",
2790     "custom element 162"
2791   },
2792   {
2793     "custom_163",
2794     "custom",
2795     "custom element 163"
2796   },
2797   {
2798     "custom_164",
2799     "custom",
2800     "custom element 164"
2801   },
2802   {
2803     "custom_165",
2804     "custom",
2805     "custom element 165"
2806   },
2807   {
2808     "custom_166",
2809     "custom",
2810     "custom element 166"
2811   },
2812   {
2813     "custom_167",
2814     "custom",
2815     "custom element 167"
2816   },
2817   {
2818     "custom_168",
2819     "custom",
2820     "custom element 168"
2821   },
2822   {
2823     "custom_169",
2824     "custom",
2825     "custom element 169"
2826   },
2827   {
2828     "custom_170",
2829     "custom",
2830     "custom element 170"
2831   },
2832   {
2833     "custom_171",
2834     "custom",
2835     "custom element 171"
2836   },
2837   {
2838     "custom_172",
2839     "custom",
2840     "custom element 172"
2841   },
2842   {
2843     "custom_173",
2844     "custom",
2845     "custom element 173"
2846   },
2847   {
2848     "custom_174",
2849     "custom",
2850     "custom element 174"
2851   },
2852   {
2853     "custom_175",
2854     "custom",
2855     "custom element 175"
2856   },
2857   {
2858     "custom_176",
2859     "custom",
2860     "custom element 176"
2861   },
2862   {
2863     "custom_177",
2864     "custom",
2865     "custom element 177"
2866   },
2867   {
2868     "custom_178",
2869     "custom",
2870     "custom element 178"
2871   },
2872   {
2873     "custom_179",
2874     "custom",
2875     "custom element 179"
2876   },
2877   {
2878     "custom_180",
2879     "custom",
2880     "custom element 180"
2881   },
2882   {
2883     "custom_181",
2884     "custom",
2885     "custom element 181"
2886   },
2887   {
2888     "custom_182",
2889     "custom",
2890     "custom element 182"
2891   },
2892   {
2893     "custom_183",
2894     "custom",
2895     "custom element 183"
2896   },
2897   {
2898     "custom_184",
2899     "custom",
2900     "custom element 184"
2901   },
2902   {
2903     "custom_185",
2904     "custom",
2905     "custom element 185"
2906   },
2907   {
2908     "custom_186",
2909     "custom",
2910     "custom element 186"
2911   },
2912   {
2913     "custom_187",
2914     "custom",
2915     "custom element 187"
2916   },
2917   {
2918     "custom_188",
2919     "custom",
2920     "custom element 188"
2921   },
2922   {
2923     "custom_189",
2924     "custom",
2925     "custom element 189"
2926   },
2927   {
2928     "custom_190",
2929     "custom",
2930     "custom element 190"
2931   },
2932   {
2933     "custom_191",
2934     "custom",
2935     "custom element 191"
2936   },
2937   {
2938     "custom_192",
2939     "custom",
2940     "custom element 192"
2941   },
2942   {
2943     "custom_193",
2944     "custom",
2945     "custom element 193"
2946   },
2947   {
2948     "custom_194",
2949     "custom",
2950     "custom element 194"
2951   },
2952   {
2953     "custom_195",
2954     "custom",
2955     "custom element 195"
2956   },
2957   {
2958     "custom_196",
2959     "custom",
2960     "custom element 196"
2961   },
2962   {
2963     "custom_197",
2964     "custom",
2965     "custom element 197"
2966   },
2967   {
2968     "custom_198",
2969     "custom",
2970     "custom element 198"
2971   },
2972   {
2973     "custom_199",
2974     "custom",
2975     "custom element 199"
2976   },
2977   {
2978     "custom_200",
2979     "custom",
2980     "custom element 200"
2981   },
2982   {
2983     "custom_201",
2984     "custom",
2985     "custom element 201"
2986   },
2987   {
2988     "custom_202",
2989     "custom",
2990     "custom element 202"
2991   },
2992   {
2993     "custom_203",
2994     "custom",
2995     "custom element 203"
2996   },
2997   {
2998     "custom_204",
2999     "custom",
3000     "custom element 204"
3001   },
3002   {
3003     "custom_205",
3004     "custom",
3005     "custom element 205"
3006   },
3007   {
3008     "custom_206",
3009     "custom",
3010     "custom element 206"
3011   },
3012   {
3013     "custom_207",
3014     "custom",
3015     "custom element 207"
3016   },
3017   {
3018     "custom_208",
3019     "custom",
3020     "custom element 208"
3021   },
3022   {
3023     "custom_209",
3024     "custom",
3025     "custom element 209"
3026   },
3027   {
3028     "custom_210",
3029     "custom",
3030     "custom element 210"
3031   },
3032   {
3033     "custom_211",
3034     "custom",
3035     "custom element 211"
3036   },
3037   {
3038     "custom_212",
3039     "custom",
3040     "custom element 212"
3041   },
3042   {
3043     "custom_213",
3044     "custom",
3045     "custom element 213"
3046   },
3047   {
3048     "custom_214",
3049     "custom",
3050     "custom element 214"
3051   },
3052   {
3053     "custom_215",
3054     "custom",
3055     "custom element 215"
3056   },
3057   {
3058     "custom_216",
3059     "custom",
3060     "custom element 216"
3061   },
3062   {
3063     "custom_217",
3064     "custom",
3065     "custom element 217"
3066   },
3067   {
3068     "custom_218",
3069     "custom",
3070     "custom element 218"
3071   },
3072   {
3073     "custom_219",
3074     "custom",
3075     "custom element 219"
3076   },
3077   {
3078     "custom_220",
3079     "custom",
3080     "custom element 220"
3081   },
3082   {
3083     "custom_221",
3084     "custom",
3085     "custom element 221"
3086   },
3087   {
3088     "custom_222",
3089     "custom",
3090     "custom element 222"
3091   },
3092   {
3093     "custom_223",
3094     "custom",
3095     "custom element 223"
3096   },
3097   {
3098     "custom_224",
3099     "custom",
3100     "custom element 224"
3101   },
3102   {
3103     "custom_225",
3104     "custom",
3105     "custom element 225"
3106   },
3107   {
3108     "custom_226",
3109     "custom",
3110     "custom element 226"
3111   },
3112   {
3113     "custom_227",
3114     "custom",
3115     "custom element 227"
3116   },
3117   {
3118     "custom_228",
3119     "custom",
3120     "custom element 228"
3121   },
3122   {
3123     "custom_229",
3124     "custom",
3125     "custom element 229"
3126   },
3127   {
3128     "custom_230",
3129     "custom",
3130     "custom element 230"
3131   },
3132   {
3133     "custom_231",
3134     "custom",
3135     "custom element 231"
3136   },
3137   {
3138     "custom_232",
3139     "custom",
3140     "custom element 232"
3141   },
3142   {
3143     "custom_233",
3144     "custom",
3145     "custom element 233"
3146   },
3147   {
3148     "custom_234",
3149     "custom",
3150     "custom element 234"
3151   },
3152   {
3153     "custom_235",
3154     "custom",
3155     "custom element 235"
3156   },
3157   {
3158     "custom_236",
3159     "custom",
3160     "custom element 236"
3161   },
3162   {
3163     "custom_237",
3164     "custom",
3165     "custom element 237"
3166   },
3167   {
3168     "custom_238",
3169     "custom",
3170     "custom element 238"
3171   },
3172   {
3173     "custom_239",
3174     "custom",
3175     "custom element 239"
3176   },
3177   {
3178     "custom_240",
3179     "custom",
3180     "custom element 240"
3181   },
3182   {
3183     "custom_241",
3184     "custom",
3185     "custom element 241"
3186   },
3187   {
3188     "custom_242",
3189     "custom",
3190     "custom element 242"
3191   },
3192   {
3193     "custom_243",
3194     "custom",
3195     "custom element 243"
3196   },
3197   {
3198     "custom_244",
3199     "custom",
3200     "custom element 244"
3201   },
3202   {
3203     "custom_245",
3204     "custom",
3205     "custom element 245"
3206   },
3207   {
3208     "custom_246",
3209     "custom",
3210     "custom element 246"
3211   },
3212   {
3213     "custom_247",
3214     "custom",
3215     "custom element 247"
3216   },
3217   {
3218     "custom_248",
3219     "custom",
3220     "custom element 248"
3221   },
3222   {
3223     "custom_249",
3224     "custom",
3225     "custom element 249"
3226   },
3227   {
3228     "custom_250",
3229     "custom",
3230     "custom element 250"
3231   },
3232   {
3233     "custom_251",
3234     "custom",
3235     "custom element 251"
3236   },
3237   {
3238     "custom_252",
3239     "custom",
3240     "custom element 252"
3241   },
3242   {
3243     "custom_253",
3244     "custom",
3245     "custom element 253"
3246   },
3247   {
3248     "custom_254",
3249     "custom",
3250     "custom element 254"
3251   },
3252   {
3253     "custom_255",
3254     "custom",
3255     "custom element 255"
3256   },
3257   {
3258     "custom_256",
3259     "custom",
3260     "custom element 256"
3261   },
3262   {
3263     "em_key_1",
3264     "key",
3265     "key 1 (EM style)"
3266     },
3267   {
3268     "em_key_2",
3269     "key",
3270     "key 2 (EM style)"
3271     },
3272   {
3273     "em_key_3",
3274     "key",
3275     "key 3 (EM style)"
3276   },
3277   {
3278     "em_key_4",
3279     "key",
3280     "key 4 (EM style)"
3281   },
3282   {
3283     "envelope_1",
3284     "envelope",
3285     "mail envelope 1"
3286   },
3287   {
3288     "envelope_2",
3289     "envelope",
3290     "mail envelope 2"
3291   },
3292   {
3293     "envelope_3",
3294     "envelope",
3295     "mail envelope 3"
3296   },
3297   {
3298     "envelope_4",
3299     "envelope",
3300     "mail envelope 4"
3301   },
3302   {
3303     "group_1",
3304     "group",
3305     "group element 1"
3306   },
3307   {
3308     "group_2",
3309     "group",
3310     "group element 2"
3311   },
3312   {
3313     "group_3",
3314     "group",
3315     "group element 3"
3316   },
3317   {
3318     "group_4",
3319     "group",
3320     "group element 4"
3321   },
3322   {
3323     "group_5",
3324     "group",
3325     "group element 5"
3326   },
3327   {
3328     "group_6",
3329     "group",
3330     "group element 6"
3331   },
3332   {
3333     "group_7",
3334     "group",
3335     "group element 7"
3336   },
3337   {
3338     "group_8",
3339     "group",
3340     "group element 8"
3341   },
3342   {
3343     "group_9",
3344     "group",
3345     "group element 9"
3346   },
3347   {
3348     "group_10",
3349     "group",
3350     "group element 10"
3351   },
3352   {
3353     "group_11",
3354     "group",
3355     "group element 11"
3356   },
3357   {
3358     "group_12",
3359     "group",
3360     "group element 12"
3361   },
3362   {
3363     "group_13",
3364     "group",
3365     "group element 13"
3366   },
3367   {
3368     "group_14",
3369     "group",
3370     "group element 14"
3371   },
3372   {
3373     "group_15",
3374     "group",
3375     "group element 15"
3376   },
3377   {
3378     "group_16",
3379     "group",
3380     "group element 16"
3381   },
3382   {
3383     "group_17",
3384     "group",
3385     "group element 17"
3386   },
3387   {
3388     "group_18",
3389     "group",
3390     "group element 18"
3391   },
3392   {
3393     "group_19",
3394     "group",
3395     "group element 19"
3396   },
3397   {
3398     "group_20",
3399     "group",
3400     "group element 20"
3401   },
3402   {
3403     "group_21",
3404     "group",
3405     "group element 21"
3406   },
3407   {
3408     "group_22",
3409     "group",
3410     "group element 22"
3411   },
3412   {
3413     "group_23",
3414     "group",
3415     "group element 23"
3416   },
3417   {
3418     "group_24",
3419     "group",
3420     "group element 24"
3421   },
3422   {
3423     "group_25",
3424     "group",
3425     "group element 25"
3426   },
3427   {
3428     "group_26",
3429     "group",
3430     "group element 26"
3431   },
3432   {
3433     "group_27",
3434     "group",
3435     "group element 27"
3436   },
3437   {
3438     "group_28",
3439     "group",
3440     "group element 28"
3441   },
3442   {
3443     "group_29",
3444     "group",
3445     "group element 29"
3446   },
3447   {
3448     "group_30",
3449     "group",
3450     "group element 30"
3451   },
3452   {
3453     "group_31",
3454     "group",
3455     "group element 31"
3456   },
3457   {
3458     "group_32",
3459     "group",
3460     "group element 32"
3461   },
3462   {
3463     "unknown",
3464     "unknown",
3465     "unknown element"
3466   },
3467   {
3468     "trigger_element",
3469     "trigger",
3470     "element triggering change"
3471   },
3472   {
3473     "trigger_player",
3474     "trigger",
3475     "player triggering change"
3476   },
3477   {
3478     "sp_gravity_on_port_right",
3479     "sp_gravity_on_port",
3480     "gravity-on port (leading right)"
3481   },
3482   {
3483     "sp_gravity_on_port_down",
3484     "sp_gravity_on_port",
3485     "gravity-on port (leading down)"
3486   },
3487   {
3488     "sp_gravity_on_port_left",
3489     "sp_gravity_on_port",
3490     "gravity-on port (leading left)"
3491   },
3492   {
3493     "sp_gravity_on_port_up",
3494     "sp_gravity_on_port",
3495     "gravity-on port (leading up)"
3496   },
3497   {
3498     "sp_gravity_off_port_right",
3499     "sp_gravity_off_port",
3500     "gravity-off port (leading right)"
3501   },
3502   {
3503     "sp_gravity_off_port_down",
3504     "sp_gravity_off_port",
3505     "gravity-off port (leading down)"
3506   },
3507   {
3508     "sp_gravity_off_port_left",
3509     "sp_gravity_off_port",
3510     "gravity-off port (leading left)"
3511   },
3512   {
3513     "sp_gravity_off_port_up",
3514     "sp_gravity_off_port",
3515     "gravity-off port (leading up)"
3516   },
3517   {
3518     "balloon_switch_none",
3519     "balloon_switch",
3520     "wind switch (off)"
3521   },
3522   {
3523     "emc_gate_5",
3524     "gate",
3525     "door 5 (EMC style)",
3526   },
3527   {
3528     "emc_gate_6",
3529     "gate",
3530     "door 6 (EMC style)",
3531   },
3532   {
3533     "emc_gate_7",
3534     "gate",
3535     "door 7 (EMC style)",
3536   },
3537   {
3538     "emc_gate_8",
3539     "gate",
3540     "door 8 (EMC style)",
3541   },
3542   {
3543     "emc_gate_5_gray",
3544     "gate",
3545     "gray door (EMC style, key 5)",
3546   },
3547   {
3548     "emc_gate_6_gray",
3549     "gate",
3550     "gray door (EMC style, key 6)",
3551   },
3552   {
3553     "emc_gate_7_gray",
3554     "gate",
3555     "gray door (EMC style, key 7)",
3556   },
3557   {
3558     "emc_gate_8_gray",
3559     "gate",
3560     "gray door (EMC style, key 8)",
3561   },
3562   {
3563     "emc_key_5",
3564     "key",
3565     "key 5 (EMC style)",
3566   },
3567   {
3568     "emc_key_6",
3569     "key",
3570     "key 6 (EMC style)",
3571   },
3572   {
3573     "emc_key_7",
3574     "key",
3575     "key 7 (EMC style)",
3576   },
3577   {
3578     "emc_key_8",
3579     "key",
3580     "key 8 (EMC style)",
3581   },
3582   {
3583     "emc_android",
3584     "emc_android",
3585     "android",
3586   },
3587   {
3588     "emc_grass",
3589     "emc_grass",
3590     "grass",
3591   },
3592   {
3593     "emc_magic_ball",
3594     "emc_magic_ball",
3595     "magic ball",
3596   },
3597   {
3598     "emc_magic_ball.active",
3599     "emc_magic_ball",
3600     "magic ball (activated)",
3601   },
3602   {
3603     "emc_magic_ball_switch",
3604     "emc_magic_ball_switch",
3605     "magic ball switch (off)",
3606   },
3607   {
3608     "emc_magic_ball_switch.active",
3609     "emc_magic_ball_switch",
3610     "magic ball switch (on)",
3611   },
3612   {
3613     "emc_spring_bumper",
3614     "emc_spring_bumper",
3615     "spring bumper",
3616   },
3617   {
3618     "emc_plant",
3619     "emc_plant",
3620     "plant",
3621   },
3622   {
3623     "emc_lenses",
3624     "emc_lenses",
3625     "lenses",
3626   },
3627   {
3628     "emc_magnifier",
3629     "emc_magnifier",
3630     "magnifier",
3631   },
3632   {
3633     "emc_wall_9",
3634     "wall",
3635     "normal wall"
3636   },
3637   {
3638     "emc_wall_10",
3639     "wall",
3640     "normal wall"
3641   },
3642   {
3643     "emc_wall_11",
3644     "wall",
3645     "normal wall"
3646   },
3647   {
3648     "emc_wall_12",
3649     "wall",
3650     "normal wall"
3651   },
3652   {
3653     "emc_wall_13",
3654     "wall",
3655     "normal wall"
3656   },
3657   {
3658     "emc_wall_14",
3659     "wall",
3660     "normal wall"
3661   },
3662   {
3663     "emc_wall_15",
3664     "wall",
3665     "normal wall"
3666   },
3667   {
3668     "emc_wall_16",
3669     "wall",
3670     "normal wall"
3671   },
3672   {
3673     "emc_wall_slippery_1",
3674     "wall",
3675     "slippery wall"
3676   },
3677   {
3678     "emc_wall_slippery_2",
3679     "wall",
3680     "slippery wall"
3681   },
3682   {
3683     "emc_wall_slippery_3",
3684     "wall",
3685     "slippery wall"
3686   },
3687   {
3688     "emc_wall_slippery_4",
3689     "wall",
3690     "slippery wall"
3691   },
3692   {
3693     "emc_fake_grass",
3694     "fake_grass",
3695     "fake grass"
3696   },
3697   {
3698     "emc_fake_acid",
3699     "fake_acid",
3700     "fake acid"
3701   },
3702   {
3703     "emc_dripper",
3704     "dripper",
3705     "dripper"
3706   },
3707   {
3708     "trigger_ce_value",
3709     "trigger",
3710     "CE value of element triggering change"
3711   },
3712   {
3713     "trigger_ce_score",
3714     "trigger",
3715     "CE score of element triggering change"
3716   },
3717   {
3718     "current_ce_value",
3719     "current",
3720     "CE value of current element"
3721   },
3722   {
3723     "current_ce_score",
3724     "current",
3725     "CE score of current element"
3726   },
3727   {
3728     "yamyam.left",
3729     "yamyam",
3730     "yam yam (starts moving left)"
3731   },
3732   {
3733     "yamyam.right",
3734     "yamyam",
3735     "yam yam (starts moving right)"
3736   },
3737   {
3738     "yamyam.up",
3739     "yamyam",
3740     "yam yam (starts moving up)"
3741   },
3742   {
3743     "yamyam.down",
3744     "yamyam",
3745     "yam yam (starts moving down)"
3746   },
3747   {
3748     "bd_expandable_wall",
3749     "wall",
3750     "growing wall (horizontal, BD style)"
3751   },
3752   {
3753     "prev_ce_8",
3754     "prev_ce",
3755     "CE 8 positions earlier in list"
3756   },
3757   {
3758     "prev_ce_7",
3759     "prev_ce",
3760     "CE 7 positions earlier in list"
3761   },
3762   {
3763     "prev_ce_6",
3764     "prev_ce",
3765     "CE 6 positions earlier in list"
3766   },
3767   {
3768     "prev_ce_5",
3769     "prev_ce",
3770     "CE 5 positions earlier in list"
3771   },
3772   {
3773     "prev_ce_4",
3774     "prev_ce",
3775     "CE 4 positions earlier in list"
3776   },
3777   {
3778     "prev_ce_3",
3779     "prev_ce",
3780     "CE 3 positions earlier in list"
3781   },
3782   {
3783     "prev_ce_2",
3784     "prev_ce",
3785     "CE 2 positions earlier in list"
3786   },
3787   {
3788     "prev_ce_1",
3789     "prev_ce",
3790     "CE 1 position earlier in list"
3791   },
3792   {
3793     "self",
3794     "self",
3795     "the current custom element"
3796   },
3797   {
3798     "next_ce_1",
3799     "next_ce",
3800     "CE 1 position later in list"
3801   },
3802   {
3803     "next_ce_2",
3804     "next_ce",
3805     "CE 2 positions later in list"
3806   },
3807   {
3808     "next_ce_3",
3809     "next_ce",
3810     "CE 3 positions later in list"
3811   },
3812   {
3813     "next_ce_4",
3814     "next_ce",
3815     "CE 4 positions later in list"
3816   },
3817   {
3818     "next_ce_5",
3819     "next_ce",
3820     "CE 5 positions later in list"
3821   },
3822   {
3823     "next_ce_6",
3824     "next_ce",
3825     "CE 6 positions later in list"
3826   },
3827   {
3828     "next_ce_7",
3829     "next_ce",
3830     "CE 7 positions later in list"
3831   },
3832   {
3833     "next_ce_8",
3834     "next_ce",
3835     "CE 8 positions later in list"
3836   },
3837   {
3838     "any_element",
3839     "any_element",
3840     "this element matches any element"
3841   },
3842   {
3843     "steel_char_space",
3844     "steel_char",
3845     "steel letter ' '"
3846   },
3847   {
3848     "steel_char_exclam",
3849     "steel_char",
3850     "steel letter '!'"
3851   },
3852   {
3853     "steel_char_quotedbl",
3854     "steel_char",
3855     "steel letter '\"'"
3856   },
3857   {
3858     "steel_char_numbersign",
3859     "steel_char",
3860     "steel letter '#'"
3861   },
3862   {
3863     "steel_char_dollar",
3864     "steel_char",
3865     "steel letter '$'"
3866   },
3867   {
3868     "steel_char_percent",
3869     "steel_char",
3870     "steel letter '%'"
3871   },
3872   {
3873     "steel_char_ampersand",
3874     "steel_char",
3875     "steel letter '&'"
3876   },
3877   {
3878     "steel_char_apostrophe",
3879     "steel_char",
3880     "steel letter '''"
3881   },
3882   {
3883     "steel_char_parenleft",
3884     "steel_char",
3885     "steel letter '('"
3886   },
3887   {
3888     "steel_char_parenright",
3889     "steel_char",
3890     "steel letter ')'"
3891   },
3892   {
3893     "steel_char_asterisk",
3894     "steel_char",
3895     "steel letter '*'"
3896   },
3897   {
3898     "steel_char_plus",
3899     "steel_char",
3900     "steel letter '+'"
3901   },
3902   {
3903     "steel_char_comma",
3904     "steel_char",
3905     "steel letter ','"
3906   },
3907   {
3908     "steel_char_minus",
3909     "steel_char",
3910     "steel letter '-'"
3911   },
3912   {
3913     "steel_char_period",
3914     "steel_char",
3915     "steel letter '.'"
3916   },
3917   {
3918     "steel_char_slash",
3919     "steel_char",
3920     "steel letter '/'"
3921   },
3922   {
3923     "steel_char_0",
3924     "steel_char",
3925     "steel letter '0'"
3926   },
3927   {
3928     "steel_char_1",
3929     "steel_char",
3930     "steel letter '1'"
3931   },
3932   {
3933     "steel_char_2",
3934     "steel_char",
3935     "steel letter '2'"
3936   },
3937   {
3938     "steel_char_3",
3939     "steel_char",
3940     "steel letter '3'"
3941   },
3942   {
3943     "steel_char_4",
3944     "steel_char",
3945     "steel letter '4'"
3946   },
3947   {
3948     "steel_char_5",
3949     "steel_char",
3950     "steel letter '5'"
3951   },
3952   {
3953     "steel_char_6",
3954     "steel_char",
3955     "steel letter '6'"
3956   },
3957   {
3958     "steel_char_7",
3959     "steel_char",
3960     "steel letter '7'"
3961   },
3962   {
3963     "steel_char_8",
3964     "steel_char",
3965     "steel letter '8'"
3966   },
3967   {
3968     "steel_char_9",
3969     "steel_char",
3970     "steel letter '9'"
3971   },
3972   {
3973     "steel_char_colon",
3974     "steel_char",
3975     "steel letter ':'"
3976   },
3977   {
3978     "steel_char_semicolon",
3979     "steel_char",
3980     "steel letter ';'"
3981   },
3982   {
3983     "steel_char_less",
3984     "steel_char",
3985     "steel letter '<'"
3986   },
3987   {
3988     "steel_char_equal",
3989     "steel_char",
3990     "steel letter '='"
3991   },
3992   {
3993     "steel_char_greater",
3994     "steel_char",
3995     "steel letter '>'"
3996   },
3997   {
3998     "steel_char_question",
3999     "steel_char",
4000     "steel letter '?'"
4001   },
4002   {
4003     "steel_char_at",
4004     "steel_char",
4005     "steel letter '@'"
4006   },
4007   {
4008     "steel_char_a",
4009     "steel_char",
4010     "steel letter 'A'"
4011   },
4012   {
4013     "steel_char_b",
4014     "steel_char",
4015     "steel letter 'B'"
4016   },
4017   {
4018     "steel_char_c",
4019     "steel_char",
4020     "steel letter 'C'"
4021   },
4022   {
4023     "steel_char_d",
4024     "steel_char",
4025     "steel letter 'D'"
4026   },
4027   {
4028     "steel_char_e",
4029     "steel_char",
4030     "steel letter 'E'"
4031   },
4032   {
4033     "steel_char_f",
4034     "steel_char",
4035     "steel letter 'F'"
4036   },
4037   {
4038     "steel_char_g",
4039     "steel_char",
4040     "steel letter 'G'"
4041   },
4042   {
4043     "steel_char_h",
4044     "steel_char",
4045     "steel letter 'H'"
4046   },
4047   {
4048     "steel_char_i",
4049     "steel_char",
4050     "steel letter 'I'"
4051   },
4052   {
4053     "steel_char_j",
4054     "steel_char",
4055     "steel letter 'J'"
4056   },
4057   {
4058     "steel_char_k",
4059     "steel_char",
4060     "steel letter 'K'"
4061   },
4062   {
4063     "steel_char_l",
4064     "steel_char",
4065     "steel letter 'L'"
4066   },
4067   {
4068     "steel_char_m",
4069     "steel_char",
4070     "steel letter 'M'"
4071   },
4072   {
4073     "steel_char_n",
4074     "steel_char",
4075     "steel letter 'N'"
4076   },
4077   {
4078     "steel_char_o",
4079     "steel_char",
4080     "steel letter 'O'"
4081   },
4082   {
4083     "steel_char_p",
4084     "steel_char",
4085     "steel letter 'P'"
4086   },
4087   {
4088     "steel_char_q",
4089     "steel_char",
4090     "steel letter 'Q'"
4091   },
4092   {
4093     "steel_char_r",
4094     "steel_char",
4095     "steel letter 'R'"
4096   },
4097   {
4098     "steel_char_s",
4099     "steel_char",
4100     "steel letter 'S'"
4101   },
4102   {
4103     "steel_char_t",
4104     "steel_char",
4105     "steel letter 'T'"
4106   },
4107   {
4108     "steel_char_u",
4109     "steel_char",
4110     "steel letter 'U'"
4111   },
4112   {
4113     "steel_char_v",
4114     "steel_char",
4115     "steel letter 'V'"
4116   },
4117   {
4118     "steel_char_w",
4119     "steel_char",
4120     "steel letter 'W'"
4121   },
4122   {
4123     "steel_char_x",
4124     "steel_char",
4125     "steel letter 'X'"
4126   },
4127   {
4128     "steel_char_y",
4129     "steel_char",
4130     "steel letter 'Y'"
4131   },
4132   {
4133     "steel_char_z",
4134     "steel_char",
4135     "steel letter 'Z'"
4136   },
4137   {
4138     "steel_char_bracketleft",
4139     "steel_char",
4140     "steel letter '['"
4141   },
4142   {
4143     "steel_char_backslash",
4144     "steel_char",
4145     "steel letter '\\'"
4146   },
4147   {
4148     "steel_char_bracketright",
4149     "steel_char",
4150     "steel letter ']'"
4151   },
4152   {
4153     "steel_char_asciicircum",
4154     "steel_char",
4155     "steel letter '^'"
4156   },
4157   {
4158     "steel_char_underscore",
4159     "steel_char",
4160     "steel letter '_'"
4161   },
4162   {
4163     "steel_char_copyright",
4164     "steel_char",
4165     "steel letter '\xa9'"
4166   },
4167   {
4168     "steel_char_aumlaut",
4169     "steel_char",
4170     "steel letter '\xc4'"
4171   },
4172   {
4173     "steel_char_oumlaut",
4174     "steel_char",
4175     "steel letter '\xd6'"
4176   },
4177   {
4178     "steel_char_uumlaut",
4179     "steel_char",
4180     "steel letter '\xdc'"
4181   },
4182   {
4183     "steel_char_degree",
4184     "steel_char",
4185     "steel letter '\xb0'"
4186   },
4187   {
4188     "steel_char_trademark",
4189     "steel_char",
4190     "steel letter '\xae'"
4191   },
4192   {
4193     "steel_char_cursor",
4194     "steel_char",
4195     "steel letter '\xa0'"
4196   },
4197   {
4198     "steel_char_unused",
4199     "steel_char",
4200     "steel letter ''"
4201   },
4202   {
4203     "steel_char_unused",
4204     "steel_char",
4205     "steel letter ''"
4206   },
4207   {
4208     "steel_char_unused",
4209     "steel_char",
4210     "steel letter ''"
4211   },
4212   {
4213     "steel_char_unused",
4214     "steel_char",
4215     "steel letter ''"
4216   },
4217   {
4218     "steel_char_unused",
4219     "steel_char",
4220     "steel letter ''"
4221   },
4222   {
4223     "steel_char_unused",
4224     "steel_char",
4225     "steel letter ''"
4226   },
4227   {
4228     "steel_char_unused",
4229     "steel_char",
4230     "steel letter 'button'"
4231   },
4232   {
4233     "steel_char_unused",
4234     "steel_char",
4235     "steel letter 'up'"
4236   },
4237   {
4238     "steel_char_unused",
4239     "steel_char",
4240     "steel letter 'down'"
4241   },
4242   {
4243     "sperms",
4244     "frankie",
4245     "sperms"
4246   },
4247   {
4248     "bullet",
4249     "frankie",
4250     "bullet"
4251   },
4252   {
4253     "heart",
4254     "frankie",
4255     "heart"
4256   },
4257   {
4258     "cross",
4259     "frankie",
4260     "cross"
4261   },
4262   {
4263     "frankie",
4264     "frankie",
4265     "frankie"
4266   },
4267   {
4268     "sign_sperms",
4269     "sign",
4270     "sign (sperms)"
4271   },
4272   {
4273     "sign_bullet",
4274     "sign",
4275     "sign (bullet)"
4276   },
4277   {
4278     "sign_heart",
4279     "sign",
4280     "sign (heart)"
4281   },
4282   {
4283     "sign_cross",
4284     "sign",
4285     "sign (cross)"
4286   },
4287   {
4288     "sign_frankie",
4289     "sign",
4290     "sign (frankie)"
4291   },
4292   {
4293     "steel_exit_closed",
4294     "steel_exit",
4295     "closed steel exit"
4296   },
4297   {
4298     "steel_exit_open",
4299     "steel_exit",
4300     "open steel exit"
4301   },
4302   {
4303     "dc_steelwall_1_left",
4304     "steelwall",
4305     "steel wall (left)"
4306   },
4307   {
4308     "dc_steelwall_1_right",
4309     "steelwall",
4310     "steel wall (right)"
4311   },
4312   {
4313     "dc_steelwall_1_top",
4314     "steelwall",
4315     "steel wall (top)"
4316   },
4317   {
4318     "dc_steelwall_1_bottom",
4319     "steelwall",
4320     "steel wall (bottom)"
4321   },
4322   {
4323     "dc_steelwall_1_horizontal",
4324     "steelwall",
4325     "steel wall (top/bottom)"
4326   },
4327   {
4328     "dc_steelwall_1_vertical",
4329     "steelwall",
4330     "steel wall (left/right)"
4331   },
4332   {
4333     "dc_steelwall_1_topleft",
4334     "steelwall",
4335     "steel wall (top/left)"
4336   },
4337   {
4338     "dc_steelwall_1_topright",
4339     "steelwall",
4340     "steel wall (top/right)"
4341   },
4342   {
4343     "dc_steelwall_1_bottomleft",
4344     "steelwall",
4345     "steel wall (bottom/left)"
4346   },
4347   {
4348     "dc_steelwall_1_bottomright",
4349     "steelwall",
4350     "steel wall (bottom/right)"
4351   },
4352   {
4353     "dc_steelwall_1_topleft_2",
4354     "steelwall",
4355     "steel wall (top/left corner)"
4356   },
4357   {
4358     "dc_steelwall_1_topright_2",
4359     "steelwall",
4360     "steel wall (top/right corner)"
4361   },
4362   {
4363     "dc_steelwall_1_bottomleft_2",
4364     "steelwall",
4365     "steel wall (bottom/left corner)"
4366   },
4367   {
4368     "dc_steelwall_1_bottomright_2",
4369     "steelwall",
4370     "steel wall (bottom/right corner)"
4371   },
4372   {
4373     "dc_steelwall_2_left",
4374     "steelwall",
4375     "steel wall (left)"
4376   },
4377   {
4378     "dc_steelwall_2_right",
4379     "steelwall",
4380     "steel wall (right)"
4381   },
4382   {
4383     "dc_steelwall_2_top",
4384     "steelwall",
4385     "steel wall (top)"
4386   },
4387   {
4388     "dc_steelwall_2_bottom",
4389     "steelwall",
4390     "steel wall (bottom)"
4391   },
4392   {
4393     "dc_steelwall_2_horizontal",
4394     "steelwall",
4395     "steel wall (horizontal)"
4396   },
4397   {
4398     "dc_steelwall_2_vertical",
4399     "steelwall",
4400     "steel wall (vertical)"
4401   },
4402   {
4403     "dc_steelwall_2_middle",
4404     "steelwall",
4405     "steel wall (middle)"
4406   },
4407   {
4408     "dc_steelwall_2_single",
4409     "steelwall",
4410     "steel wall (single)"
4411   },
4412   {
4413     "dc_switchgate_switch_up",
4414     "switchgate_switch",
4415     "switch for switch gate (steel)"
4416   },
4417   {
4418     "dc_switchgate_switch_down",
4419     "switchgate_switch",
4420     "switch for switch gate (steel)"
4421   },
4422   {
4423     "dc_timegate_switch",
4424     "timegate_switch",
4425     "switch for time gate (steel)"
4426   },
4427   {
4428     "dc_timegate_switch.active",
4429     "timegate_switch",
4430     "switch for time gate (steel)"
4431   },
4432   {
4433     "dc_landmine",
4434     "dc_landmine",
4435     "land mine (DC style, removable)"
4436   },
4437   {
4438     "expandable_steelwall",
4439     "steelwall",
4440     "growing steel wall"
4441   },
4442   {
4443     "expandable_steelwall_horizontal",
4444     "steelwall",
4445     "growing steel wall (horizontal)"
4446   },
4447   {
4448     "expandable_steelwall_vertical",
4449     "steelwall",
4450     "growing steel wall (vertical)"
4451   },
4452   {
4453     "expandable_steelwall_any",
4454     "steelwall",
4455     "growing steel wall (any direction)"
4456   },
4457   {
4458     "em_exit_closed",
4459     "em_exit",
4460     "closed exit (EM style)"
4461   },
4462   {
4463     "em_exit_open",
4464     "em_exit",
4465     "open exit (EM style)"
4466   },
4467   {
4468     "em_steel_exit_closed",
4469     "em_steel_exit",
4470     "closed steel exit (EM style)"
4471   },
4472   {
4473     "em_steel_exit_open",
4474     "em_steel_exit",
4475     "open steel exit (EM style)"
4476   },
4477   {
4478     "dc_gate_fake_gray",
4479     "gate",
4480     "gray door (opened by no key)"
4481   },
4482   {
4483     "dc_magic_wall",
4484     "dc_magic_wall",
4485     "magic wall (DC style)"
4486   },
4487   {
4488     "quicksand_fast_empty",
4489     "quicksand",
4490     "fast quicksand (empty)"
4491   },
4492   {
4493     "quicksand_fast_full",
4494     "quicksand",
4495     "fast quicksand (with rock)"
4496   },
4497   {
4498     "from_level_template",
4499     "from_level_template",
4500     "element taken from level template"
4501   },
4502
4503   /* ----------------------------------------------------------------------- */
4504   /* "real" (and therefore drawable) runtime elements                        */
4505   /* ----------------------------------------------------------------------- */
4506
4507   {
4508     "dynabomb_player_1.active",
4509     "dynabomb",
4510     "-"
4511   },
4512   {
4513     "dynabomb_player_2.active",
4514     "dynabomb",
4515     "-"
4516   },
4517   {
4518     "dynabomb_player_3.active",
4519     "dynabomb",
4520     "-"
4521   },
4522   {
4523     "dynabomb_player_4.active",
4524     "dynabomb",
4525     "-"
4526   },
4527   {
4528     "sp_disk_red.active",
4529     "dynamite",
4530     "-"
4531   },
4532   {
4533     "switchgate.opening",
4534     "switchgate",
4535     "-"
4536   },
4537   {
4538     "switchgate.closing",
4539     "switchgate",
4540     "-"
4541   },
4542   {
4543     "timegate.opening",
4544     "timegate",
4545     "-"
4546   },
4547   {
4548     "timegate.closing",
4549     "timegate",
4550     "-"
4551   },
4552   {
4553     "pearl.breaking",
4554     "pearl",
4555     "-"
4556   },
4557   {
4558     "trap.active",
4559     "trap",
4560     "-"
4561   },
4562   {
4563     "invisible_steelwall.active",
4564     "steelwall",
4565     "-"
4566   },
4567   {
4568     "invisible_wall.active",
4569     "wall",
4570     "-"
4571   },
4572   {
4573     "invisible_sand.active",
4574     "sand",
4575     "-"
4576   },
4577   {
4578     "conveyor_belt_1_left.active",
4579     "conveyor_belt",
4580     "-"
4581   },
4582   {
4583     "conveyor_belt_1_middle.active",
4584     "conveyor_belt",
4585     "-"
4586   },
4587   {
4588     "conveyor_belt_1_right.active",
4589     "conveyor_belt",
4590     "-"
4591   },
4592   {
4593     "conveyor_belt_2_left.active",
4594     "conveyor_belt",
4595     "-"
4596   },
4597   {
4598     "conveyor_belt_2_middle.active",
4599     "conveyor_belt",
4600     "-"
4601   },
4602   {
4603     "conveyor_belt_2_right.active",
4604     "conveyor_belt",
4605     "-"
4606   },
4607   {
4608     "conveyor_belt_3_left.active",
4609     "conveyor_belt",
4610     "-"
4611   },
4612   {
4613     "conveyor_belt_3_middle.active",
4614     "conveyor_belt",
4615     "-"
4616   },
4617   {
4618     "conveyor_belt_3_right.active",
4619     "conveyor_belt",
4620     "-"
4621   },
4622   {
4623     "conveyor_belt_4_left.active",
4624     "conveyor_belt",
4625     "-"
4626   },
4627   {
4628     "conveyor_belt_4_middle.active",
4629     "conveyor_belt",
4630     "-"
4631   },
4632   {
4633     "conveyor_belt_4_right.active",
4634     "conveyor_belt",
4635     "-"
4636   },
4637   {
4638     "exit.opening",
4639     "exit",
4640     "-"
4641   },
4642   {
4643     "exit.closing",
4644     "exit",
4645     "-"
4646   },
4647   {
4648     "steel_exit.opening",
4649     "steel_exit",
4650     "-"
4651   },
4652   {
4653     "steel_exit.closing",
4654     "steel_exit",
4655     "-"
4656   },
4657   {
4658     "em_exit.opening",
4659     "em_exit",
4660     "-"
4661   },
4662   {
4663     "em_exit.closing",
4664     "em_exit",
4665     "-"
4666   },
4667   {
4668     "em_steel_exit.opening",
4669     "em_steel_exit",
4670     "-"
4671   },
4672   {
4673     "em_steel_exit.closing",
4674     "em_steel_exit",
4675     "-"
4676   },
4677   {
4678     "sp_exit.opening",
4679     "sp_exit",
4680     "-"
4681   },
4682   {
4683     "sp_exit.closing",
4684     "sp_exit",
4685     "-"
4686   },
4687   {
4688     "sp_exit_open",
4689     "sp_exit",
4690     "-"
4691   },
4692   {
4693     "sp_terminal.active",
4694     "sp_terminal",
4695     "-"
4696   },
4697   {
4698     "sp_buggy_base.activating",
4699     "sp_buggy_base",
4700     "-"
4701   },
4702   {
4703     "sp_buggy_base.active",
4704     "sp_buggy_base",
4705     "-"
4706   },
4707   {
4708     "sp_murphy_clone",
4709     "murphy_clone",
4710     "-"
4711   },
4712   {
4713     "amoeba.dropping",
4714     "amoeba",
4715     "-"
4716   },
4717   {
4718     "quicksand.emptying",
4719     "quicksand",
4720     "-"
4721   },
4722   {
4723     "quicksand_fast.emptying",
4724     "quicksand",
4725     "-"
4726   },
4727   {
4728     "magic_wall.active",
4729     "magic_wall",
4730     "-"
4731   },
4732   {
4733     "bd_magic_wall.active",
4734     "magic_wall",
4735     "-"
4736   },
4737   {
4738     "dc_magic_wall.active",
4739     "magic_wall",
4740     "-"
4741   },
4742   {
4743     "magic_wall_full",
4744     "magic_wall",
4745     "-"
4746   },
4747   {
4748     "bd_magic_wall_full",
4749     "magic_wall",
4750     "-"
4751   },
4752   {
4753     "dc_magic_wall_full",
4754     "magic_wall",
4755     "-"
4756   },
4757   {
4758     "magic_wall.emptying",
4759     "magic_wall",
4760     "-"
4761   },
4762   {
4763     "bd_magic_wall.emptying",
4764     "magic_wall",
4765     "-"
4766   },
4767   {
4768     "dc_magic_wall.emptying",
4769     "magic_wall",
4770     "-"
4771   },
4772   {
4773     "magic_wall_dead",
4774     "magic_wall",
4775     "-"
4776   },
4777   {
4778     "bd_magic_wall_dead",
4779     "magic_wall",
4780     "-"
4781   },
4782   {
4783     "dc_magic_wall_dead",
4784     "magic_wall",
4785     "-"
4786   },
4787
4788   {
4789     "emc_fake_grass.active",
4790     "fake_grass",
4791     "-"
4792   },
4793   {
4794     "gate_1_gray.active",
4795     "gate",
4796     ""
4797   },
4798   {
4799     "gate_2_gray.active",
4800     "gate",
4801     ""
4802   },
4803   {
4804     "gate_3_gray.active",
4805     "gate",
4806     ""
4807   },
4808   {
4809     "gate_4_gray.active",
4810     "gate",
4811     ""
4812   },
4813   {
4814     "em_gate_1_gray.active",
4815     "gate",
4816     ""
4817   },
4818   {
4819     "em_gate_2_gray.active",
4820     "gate",
4821     ""
4822   },
4823   {
4824     "em_gate_3_gray.active",
4825     "gate",
4826     ""
4827   },
4828   {
4829     "em_gate_4_gray.active",
4830     "gate",
4831     ""
4832   },
4833   {
4834     "emc_gate_5_gray.active",
4835     "gate",
4836     "",
4837   },
4838   {
4839     "emc_gate_6_gray.active",
4840     "gate",
4841     "",
4842   },
4843   {
4844     "emc_gate_7_gray.active",
4845     "gate",
4846     "",
4847   },
4848   {
4849     "emc_gate_8_gray.active",
4850     "gate",
4851     "",
4852   },
4853   {
4854     "dc_gate_white_gray.active",
4855     "gate",
4856     "",
4857   },
4858   {
4859     "emc_dripper.active",
4860     "dripper",
4861     "dripper"
4862   },
4863   {
4864     "emc_spring_bumper.active",
4865     "emc_spring_bumper",
4866     "spring bumper",
4867   },
4868
4869   /* ----------------------------------------------------------------------- */
4870   /* "unreal" (and therefore not drawable) runtime elements                  */
4871   /* ----------------------------------------------------------------------- */
4872
4873   {
4874     "blocked",
4875     "-",
4876     "-"
4877   },
4878   {
4879     "explosion",
4880     "-",
4881     "-"
4882   },
4883   {
4884     "nut.breaking",
4885     "-",
4886     "-"
4887   },
4888   {
4889     "diamond.breaking",
4890     "-",
4891     "-"
4892   },
4893   {
4894     "acid_splash_left",
4895     "-",
4896     "-"
4897   },
4898   {
4899     "acid_splash_right",
4900     "-",
4901     "-"
4902   },
4903   {
4904     "amoeba.growing",
4905     "-",
4906     "-"
4907   },
4908   {
4909     "amoeba.shrinking",
4910     "-",
4911     "-"
4912   },
4913   {
4914     "expandable_wall.growing",
4915     "-",
4916     "-"
4917   },
4918   {
4919     "expandable_steelwall.growing",
4920     "-",
4921     "-"
4922   },
4923   {
4924     "flames",
4925     "-",
4926     "-"
4927   },
4928   {
4929     "player_is_leaving",
4930     "-",
4931     "-"
4932   },
4933   {
4934     "player_is_exploding_1",
4935     "-",
4936     "-"
4937   },
4938   {
4939     "player_is_exploding_2",
4940     "-",
4941     "-"
4942   },
4943   {
4944     "player_is_exploding_3",
4945     "-",
4946     "-"
4947   },
4948   {
4949     "player_is_exploding_4",
4950     "-",
4951     "-"
4952   },
4953   {
4954     "quicksand.filling",
4955     "quicksand",
4956     "-"
4957   },
4958   {
4959     "quicksand_fast.filling",
4960     "quicksand",
4961     "-"
4962   },
4963   {
4964     "magic_wall.filling",
4965     "-",
4966     "-"
4967   },
4968   {
4969     "bd_magic_wall.filling",
4970     "-",
4971     "-"
4972   },
4973   {
4974     "dc_magic_wall.filling",
4975     "-",
4976     "-"
4977   },
4978   {
4979     "element.snapping",
4980     "-",
4981     "-"
4982   },
4983   {
4984     "diagonal.shrinking",
4985     "-",
4986     "-"
4987   },
4988   {
4989     "diagonal.growing",
4990     "-",
4991     "-"
4992   },
4993
4994   /* ----------------------------------------------------------------------- */
4995   /* dummy elements (never used as game elements, only used as graphics)     */
4996   /* ----------------------------------------------------------------------- */
4997
4998   {
4999     "steelwall_topleft",
5000     "-",
5001     "-"
5002   },
5003   {
5004     "steelwall_topright",
5005     "-",
5006     "-"
5007   },
5008   {
5009     "steelwall_bottomleft",
5010     "-",
5011     "-"
5012   },
5013   {
5014     "steelwall_bottomright",
5015     "-",
5016     "-"
5017   },
5018   {
5019     "steelwall_horizontal",
5020     "-",
5021     "-"
5022   },
5023   {
5024     "steelwall_vertical",
5025     "-",
5026     "-"
5027   },
5028   {
5029     "invisible_steelwall_topleft",
5030     "-",
5031     "-"
5032   },
5033   {
5034     "invisible_steelwall_topright",
5035     "-",
5036     "-"
5037   },
5038   {
5039     "invisible_steelwall_bottomleft",
5040     "-",
5041     "-"
5042   },
5043   {
5044     "invisible_steelwall_bottomright",
5045     "-",
5046     "-"
5047   },
5048   {
5049     "invisible_steelwall_horizontal",
5050     "-",
5051     "-"
5052   },
5053   {
5054     "invisible_steelwall_vertical",
5055     "-",
5056     "-"
5057   },
5058   {
5059     "dynabomb",
5060     "-",
5061     "-"
5062   },
5063   {
5064     "dynabomb.active",
5065     "-",
5066     "-"
5067   },
5068   {
5069     "dynabomb_player_1",
5070     "-",
5071     "-"
5072   },
5073   {
5074     "dynabomb_player_2",
5075     "-",
5076     "-"
5077   },
5078   {
5079     "dynabomb_player_3",
5080     "-",
5081     "-"
5082   },
5083   {
5084     "dynabomb_player_4",
5085     "-",
5086     "-"
5087   },
5088   {
5089     "shield_normal.active",
5090     "-",
5091     "-"
5092   },
5093   {
5094     "shield_deadly.active",
5095     "-",
5096     "-"
5097   },
5098   {
5099     "amoeba",
5100     "amoeba",
5101     "-"
5102   },
5103   {
5104     "[default]",
5105     "default",
5106     "-"
5107   },
5108   {
5109     "[bd_default]",
5110     "bd_default",
5111     "-"
5112   },
5113   {
5114     "[sp_default]",
5115     "sp_default",
5116     "-"
5117   },
5118   {
5119     "[sb_default]",
5120     "sb_default",
5121     "-"
5122   },
5123   {
5124     "graphic_1",
5125     "graphic",
5126     "-"
5127   },
5128   {
5129     "graphic_2",
5130     "graphic",
5131     "-"
5132   },
5133   {
5134     "graphic_3",
5135     "graphic",
5136     "-"
5137   },
5138   {
5139     "graphic_4",
5140     "graphic",
5141     "-"
5142   },
5143   {
5144     "graphic_5",
5145     "graphic",
5146     "-"
5147   },
5148   {
5149     "graphic_6",
5150     "graphic",
5151     "-"
5152   },
5153   {
5154     "graphic_7",
5155     "graphic",
5156     "-"
5157   },
5158   {
5159     "graphic_8",
5160     "graphic",
5161     "-"
5162   },
5163   {
5164     "internal_clipboard_custom",
5165     "internal",
5166     "empty custom element"
5167   },
5168   {
5169     "internal_clipboard_change",
5170     "internal",
5171     "empty change page"
5172   },
5173   {
5174     "internal_clipboard_group",
5175     "internal",
5176     "empty group element"
5177   },
5178   {
5179     "internal_dummy",
5180     "internal",
5181     "-"
5182   },
5183   {
5184     "internal_cascade_bd",
5185     "internal",
5186     "show Boulder Dash elements"
5187   },
5188   {
5189     "internal_cascade_bd.active",
5190     "internal",
5191     "hide Boulder Dash elements"
5192   },
5193   {
5194     "internal_cascade_em",
5195     "internal",
5196     "show Emerald Mine elements"
5197   },
5198   {
5199     "internal_cascade_em.active",
5200     "internal",
5201     "hide Emerald Mine elements"
5202   },
5203   {
5204     "internal_cascade_emc",
5205     "internal",
5206     "show Emerald Mine Club elements"
5207   },
5208   {
5209     "internal_cascade_emc.active",
5210     "internal",
5211     "hide Emerald Mine Club elements"
5212   },
5213   {
5214     "internal_cascade_rnd",
5215     "internal",
5216     "show Rocks'n'Diamonds elements"
5217   },
5218   {
5219     "internal_cascade_rnd.active",
5220     "internal",
5221     "hide Rocks'n'Diamonds elements"
5222   },
5223   {
5224     "internal_cascade_sb",
5225     "internal",
5226     "show Sokoban elements"
5227   },
5228   {
5229     "internal_cascade_sb.active",
5230     "internal",
5231     "hide Sokoban elements"
5232   },
5233   {
5234     "internal_cascade_sp",
5235     "internal",
5236     "show Supaplex elements"
5237   },
5238   {
5239     "internal_cascade_sp.active",
5240     "internal",
5241     "hide Supaplex elements"
5242   },
5243   {
5244     "internal_cascade_dc",
5245     "internal",
5246     "show Diamond Caves II elements"
5247   },
5248   {
5249     "internal_cascade_dc.active",
5250     "internal",
5251     "hide Diamond Caves II elements"
5252   },
5253   {
5254     "internal_cascade_dx",
5255     "internal",
5256     "show DX Boulderdash elements"
5257   },
5258   {
5259     "internal_cascade_dx.active",
5260     "internal",
5261     "hide DX Boulderdash elements"
5262   },
5263   {
5264     "internal_cascade_chars",
5265     "internal",
5266     "show text elements"
5267   },
5268   {
5269     "internal_cascade_chars.active",
5270     "internal",
5271     "hide text elements"
5272   },
5273   {
5274     "internal_cascade_steel_chars",
5275     "internal",
5276     "show steel text elements"
5277   },
5278   {
5279     "internal_cascade_steel_chars.active",
5280     "internal",
5281     "hide steel text elements"
5282   },
5283   {
5284     "internal_cascade_ce",
5285     "internal",
5286     "show custom elements"
5287   },
5288   {
5289     "internal_cascade_ce.active",
5290     "internal",
5291     "hide custom elements"
5292   },
5293   {
5294     "internal_cascade_ge",
5295     "internal",
5296     "show group elements"
5297   },
5298   {
5299     "internal_cascade_ge.active",
5300     "internal",
5301     "hide group elements"
5302   },
5303   {
5304     "internal_cascade_ref",
5305     "internal",
5306     "show reference elements"
5307   },
5308   {
5309     "internal_cascade_ref.active",
5310     "internal",
5311     "hide reference elements"
5312   },
5313   {
5314     "internal_cascade_user",
5315     "internal",
5316     "show user defined elements"
5317   },
5318   {
5319     "internal_cascade_user.active",
5320     "internal",
5321     "hide user defined elements"
5322   },
5323   {
5324     "internal_cascade_dynamic",
5325     "internal",
5326     "show elements used in this level"
5327   },
5328   {
5329     "internal_cascade_dynamic.active",
5330     "internal",
5331     "hide elements used in this level"
5332   },
5333
5334   /* keyword to stop parser: "ELEMENT_INFO_END" <-- do not change! */
5335
5336   {
5337     NULL,
5338     NULL,
5339     NULL
5340   }
5341 };
5342
5343
5344 /* ------------------------------------------------------------------------- */
5345 /* element action and direction definitions                                  */
5346 /* ------------------------------------------------------------------------- */
5347
5348 struct ElementActionInfo element_action_info[NUM_ACTIONS + 1 + 1] =
5349 {
5350   { ".[DEFAULT]",               ACTION_DEFAULT,                 TRUE    },
5351   { ".waiting",                 ACTION_WAITING,                 TRUE    },
5352   { ".falling",                 ACTION_FALLING,                 TRUE    },
5353   { ".moving",                  ACTION_MOVING,                  TRUE    },
5354   { ".digging",                 ACTION_DIGGING,                 FALSE   },
5355   { ".snapping",                ACTION_SNAPPING,                FALSE   },
5356   { ".collecting",              ACTION_COLLECTING,              FALSE   },
5357   { ".dropping",                ACTION_DROPPING,                FALSE   },
5358   { ".pushing",                 ACTION_PUSHING,                 FALSE   },
5359   { ".walking",                 ACTION_WALKING,                 FALSE   },
5360   { ".passing",                 ACTION_PASSING,                 FALSE   },
5361   { ".impact",                  ACTION_IMPACT,                  FALSE   },
5362   { ".breaking",                ACTION_BREAKING,                FALSE   },
5363   { ".activating",              ACTION_ACTIVATING,              FALSE   },
5364   { ".deactivating",            ACTION_DEACTIVATING,            FALSE   },
5365   { ".opening",                 ACTION_OPENING,                 FALSE   },
5366   { ".closing",                 ACTION_CLOSING,                 FALSE   },
5367   { ".attacking",               ACTION_ATTACKING,               TRUE    },
5368   { ".growing",                 ACTION_GROWING,                 TRUE    },
5369   { ".shrinking",               ACTION_SHRINKING,               FALSE   },
5370   { ".active",                  ACTION_ACTIVE,                  TRUE    },
5371   { ".filling",                 ACTION_FILLING,                 FALSE   },
5372   { ".emptying",                ACTION_EMPTYING,                FALSE   },
5373   { ".changing",                ACTION_CHANGING,                FALSE   },
5374   { ".exploding",               ACTION_EXPLODING,               FALSE   },
5375   { ".boring",                  ACTION_BORING,                  FALSE   },
5376   { ".boring[1]",               ACTION_BORING_1,                FALSE   },
5377   { ".boring[2]",               ACTION_BORING_2,                FALSE   },
5378   { ".boring[3]",               ACTION_BORING_3,                FALSE   },
5379   { ".boring[4]",               ACTION_BORING_4,                FALSE   },
5380   { ".boring[5]",               ACTION_BORING_5,                FALSE   },
5381   { ".boring[6]",               ACTION_BORING_6,                FALSE   },
5382   { ".boring[7]",               ACTION_BORING_7,                FALSE   },
5383   { ".boring[8]",               ACTION_BORING_8,                FALSE   },
5384   { ".boring[9]",               ACTION_BORING_9,                FALSE   },
5385   { ".boring[10]",              ACTION_BORING_10,               FALSE   },
5386   { ".sleeping",                ACTION_SLEEPING,                FALSE   },
5387   { ".sleeping[1]",             ACTION_SLEEPING_1,              FALSE   },
5388   { ".sleeping[2]",             ACTION_SLEEPING_2,              FALSE   },
5389   { ".sleeping[3]",             ACTION_SLEEPING_3,              FALSE   },
5390   { ".awakening",               ACTION_AWAKENING,               FALSE   },
5391   { ".dying",                   ACTION_DYING,                   FALSE   },
5392   { ".turning",                 ACTION_TURNING,                 FALSE   },
5393   { ".turning_from_left",       ACTION_TURNING_FROM_LEFT,       FALSE   },
5394   { ".turning_from_right",      ACTION_TURNING_FROM_RIGHT,      FALSE   },
5395   { ".turning_from_up",         ACTION_TURNING_FROM_UP,         FALSE   },
5396   { ".turning_from_down",       ACTION_TURNING_FROM_DOWN,       FALSE   },
5397   { ".smashed_by_rock",         ACTION_SMASHED_BY_ROCK,         FALSE   },
5398   { ".smashed_by_spring",       ACTION_SMASHED_BY_SPRING,       FALSE   },
5399   { ".eating",                  ACTION_EATING,                  FALSE   },
5400   { ".twinkling",               ACTION_TWINKLING,               FALSE   },
5401   { ".splashing",               ACTION_SPLASHING,               FALSE   },
5402   { ".page[1]",                 ACTION_PAGE_1,                  FALSE   },
5403   { ".page[2]",                 ACTION_PAGE_2,                  FALSE   },
5404   { ".page[3]",                 ACTION_PAGE_3,                  FALSE   },
5405   { ".page[4]",                 ACTION_PAGE_4,                  FALSE   },
5406   { ".page[5]",                 ACTION_PAGE_5,                  FALSE   },
5407   { ".page[6]",                 ACTION_PAGE_6,                  FALSE   },
5408   { ".page[7]",                 ACTION_PAGE_7,                  FALSE   },
5409   { ".page[8]",                 ACTION_PAGE_8,                  FALSE   },
5410   { ".page[9]",                 ACTION_PAGE_9,                  FALSE   },
5411   { ".page[10]",                ACTION_PAGE_10,                 FALSE   },
5412   { ".page[11]",                ACTION_PAGE_11,                 FALSE   },
5413   { ".page[12]",                ACTION_PAGE_12,                 FALSE   },
5414   { ".page[13]",                ACTION_PAGE_13,                 FALSE   },
5415   { ".page[14]",                ACTION_PAGE_14,                 FALSE   },
5416   { ".page[15]",                ACTION_PAGE_15,                 FALSE   },
5417   { ".page[16]",                ACTION_PAGE_16,                 FALSE   },
5418   { ".page[17]",                ACTION_PAGE_17,                 FALSE   },
5419   { ".page[18]",                ACTION_PAGE_18,                 FALSE   },
5420   { ".page[19]",                ACTION_PAGE_19,                 FALSE   },
5421   { ".page[20]",                ACTION_PAGE_20,                 FALSE   },
5422   { ".page[21]",                ACTION_PAGE_21,                 FALSE   },
5423   { ".page[22]",                ACTION_PAGE_22,                 FALSE   },
5424   { ".page[23]",                ACTION_PAGE_23,                 FALSE   },
5425   { ".page[24]",                ACTION_PAGE_24,                 FALSE   },
5426   { ".page[25]",                ACTION_PAGE_25,                 FALSE   },
5427   { ".page[26]",                ACTION_PAGE_26,                 FALSE   },
5428   { ".page[27]",                ACTION_PAGE_27,                 FALSE   },
5429   { ".page[28]",                ACTION_PAGE_28,                 FALSE   },
5430   { ".page[29]",                ACTION_PAGE_29,                 FALSE   },
5431   { ".page[30]",                ACTION_PAGE_30,                 FALSE   },
5432   { ".page[31]",                ACTION_PAGE_31,                 FALSE   },
5433   { ".page[32]",                ACTION_PAGE_32,                 FALSE   },
5434   { ".other",                   ACTION_OTHER,                   FALSE   },
5435
5436   /* empty suffix always matches -- check as last entry in InitSoundInfo() */
5437   { "",                         ACTION_DEFAULT,                 TRUE    },
5438
5439   { NULL,                       0,                              0       }
5440 };
5441
5442 struct ElementDirectionInfo element_direction_info[NUM_DIRECTIONS_FULL + 1] =
5443 {
5444   { ".left",                    MV_BIT_LEFT                             },
5445   { ".right",                   MV_BIT_RIGHT                            },
5446   { ".up",                      MV_BIT_UP                               },
5447   { ".down",                    MV_BIT_DOWN                             },
5448   { ".upleft",                  MV_BIT_UP                               },
5449   { ".upright",                 MV_BIT_RIGHT                            },
5450   { ".downleft",                MV_BIT_LEFT                             },
5451   { ".downright",               MV_BIT_DOWN                             },
5452
5453   { NULL,                       0                                       }
5454 };
5455
5456 struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1 + 1] =
5457 {
5458   { ".[DEFAULT]",               GFX_SPECIAL_ARG_DEFAULT,                },
5459   { ".LOADING",                 GFX_SPECIAL_ARG_LOADING,                },
5460   { ".TITLE_INITIAL",           GFX_SPECIAL_ARG_TITLE_INITIAL,          },
5461   { ".TITLE",                   GFX_SPECIAL_ARG_TITLE,                  },
5462   { ".MAIN",                    GFX_SPECIAL_ARG_MAIN,                   },
5463   { ".LEVELS",                  GFX_SPECIAL_ARG_LEVELS                  },
5464   { ".LEVELNR",                 GFX_SPECIAL_ARG_LEVELNR                 },
5465   { ".SCORES",                  GFX_SPECIAL_ARG_SCORES,                 },
5466   { ".EDITOR",                  GFX_SPECIAL_ARG_EDITOR,                 },
5467   { ".INFO",                    GFX_SPECIAL_ARG_INFO,                   },
5468   { ".SETUP",                   GFX_SPECIAL_ARG_SETUP,                  },
5469   { ".PLAYING",                 GFX_SPECIAL_ARG_PLAYING,                },
5470   { ".DOOR",                    GFX_SPECIAL_ARG_DOOR,                   },
5471   { ".TAPE",                    GFX_SPECIAL_ARG_TAPE,                   },
5472   { ".PANEL",                   GFX_SPECIAL_ARG_PANEL,                  },
5473   { ".PREVIEW",                 GFX_SPECIAL_ARG_PREVIEW,                },
5474   { ".CRUMBLED",                GFX_SPECIAL_ARG_CRUMBLED,               },
5475
5476   /* empty suffix always matches -- check as last entry in InitMusicInfo() */
5477   { "",                         GFX_SPECIAL_ARG_DEFAULT,                },
5478
5479   { NULL,                       0,                                      }
5480 };
5481
5482 #include "conf_var.c"   /* include auto-generated data structure definitions */
5483
5484
5485 /* ------------------------------------------------------------------------- */
5486 /* font definitions                                                          */
5487 /* ------------------------------------------------------------------------- */
5488
5489 /* Important: When one entry is a prefix of another entry, the longer entry
5490    must come first, because the dynamic configuration does prefix matching!
5491    (These definitions must match the corresponding definitions in "main.h"!) */
5492
5493 struct FontInfo font_info[NUM_FONTS + 1] =
5494 {
5495   { "font.initial_1"            },
5496   { "font.initial_2"            },
5497   { "font.initial_3"            },
5498   { "font.initial_4"            },
5499   { "font.title_1"              },
5500   { "font.title_2"              },
5501   { "font.menu_1.active"        },
5502   { "font.menu_2.active"        },
5503   { "font.menu_1"               },
5504   { "font.menu_2"               },
5505   { "font.text_1.active"        },
5506   { "font.text_2.active"        },
5507   { "font.text_3.active"        },
5508   { "font.text_4.active"        },
5509   { "font.text_1"               },
5510   { "font.text_2"               },
5511   { "font.text_3"               },
5512   { "font.text_4"               },
5513   { "font.envelope_1"           },
5514   { "font.envelope_2"           },
5515   { "font.envelope_3"           },
5516   { "font.envelope_4"           },
5517   { "font.request"              },
5518   { "font.input_1.active"       },
5519   { "font.input_2.active"       },
5520   { "font.input_1"              },
5521   { "font.input_2"              },
5522   { "font.option_off"           },
5523   { "font.option_on"            },
5524   { "font.value_1"              },
5525   { "font.value_2"              },
5526   { "font.value_old"            },
5527   { "font.level_number.active"  },
5528   { "font.level_number"         },
5529   { "font.tape_recorder"        },
5530   { "font.game_info"            },
5531   { "font.info.elements"        },
5532   { "font.info.levelset"        },
5533
5534   { NULL                        }
5535 };
5536
5537
5538 /* ------------------------------------------------------------------------- */
5539 /* music token prefix definitions                                            */
5540 /* ------------------------------------------------------------------------- */
5541
5542 struct MusicPrefixInfo music_prefix_info[NUM_MUSIC_PREFIXES + 1] =
5543 {
5544   { "background",               TRUE    },
5545
5546   { NULL,                       0       }
5547 };
5548
5549
5550 /* ========================================================================= */
5551 /* main()                                                                    */
5552 /* ========================================================================= */
5553
5554 static void print_usage()
5555 {
5556   Print("\n"
5557         "Usage: %s [OPTION]... [HOSTNAME [PORT]]\n"
5558         "\n"
5559         "Options:\n"
5560         "  -d, --display HOSTNAME[:SCREEN]  specify X server display\n"
5561         "  -b, --basepath DIRECTORY         alternative base DIRECTORY\n"
5562         "  -l, --level DIRECTORY            alternative level DIRECTORY\n"
5563         "  -g, --graphics DIRECTORY         alternative graphics DIRECTORY\n"
5564         "  -s, --sounds DIRECTORY           alternative sounds DIRECTORY\n"
5565         "  -m, --music DIRECTORY            alternative music DIRECTORY\n"
5566         "  -n, --network                    network multiplayer game\n"
5567         "      --serveronly                 only start network server\n"
5568         "  -v, --verbose                    verbose mode\n"
5569         "  -V, --version                    show program version\n"
5570         "      --debug                      display debugging information\n"
5571         "  -e, --execute COMMAND            execute batch COMMAND\n"
5572         "\n"
5573         "Valid commands for '--execute' option:\n"
5574         "  \"print graphicsinfo.conf\"        print default graphics config\n"
5575         "  \"print soundsinfo.conf\"          print default sounds config\n"
5576         "  \"print musicinfo.conf\"           print default music config\n"
5577         "  \"print editorsetup.conf\"         print default editor config\n"
5578         "  \"print helpanim.conf\"            print default helpanim config\n"
5579         "  \"print helptext.conf\"            print default helptext config\n"
5580         "  \"dump level FILE\"                dump level data from FILE\n"
5581         "  \"dump tape FILE\"                 dump tape data from FILE\n"
5582         "  \"autotest LEVELDIR [NR ...]\"     test level tapes for LEVELDIR\n"
5583         "  \"autoplay LEVELDIR [NR ...]\"     play level tapes for LEVELDIR\n"
5584         "  \"autoffwd LEVELDIR [NR ...]\"     ffwd level tapes for LEVELDIR\n"
5585         "  \"convert LEVELDIR [NR]\"          convert levels in LEVELDIR\n"
5586         "  \"create images DIRECTORY\"        write BMP images to DIRECTORY\n"
5587         "  \"create CE image DIRECTORY\"      write BMP image to DIRECTORY\n"
5588         "\n",
5589         program.command_basename);
5590 }
5591
5592 static void print_version()
5593 {
5594   Print("%s %d.%d.%d.%d\n",
5595         PROGRAM_TITLE_STRING,
5596         PROGRAM_VERSION_MAJOR,
5597         PROGRAM_VERSION_MINOR,
5598         PROGRAM_VERSION_PATCH,
5599         PROGRAM_VERSION_BUILD);
5600
5601   if (options.debug)
5602   {
5603     SDL_version sdl_version;
5604
5605     SDL_VERSION(&sdl_version);
5606     Print("- SDL %d.%d.%d\n",
5607           sdl_version.major,
5608           sdl_version.minor,
5609           sdl_version.patch);
5610
5611     SDL_IMAGE_VERSION(&sdl_version);
5612     Print("- SDL_image %d.%d.%d\n",
5613           sdl_version.major,
5614           sdl_version.minor,
5615           sdl_version.patch);
5616
5617     SDL_MIXER_VERSION(&sdl_version);
5618     Print("- SDL_mixer %d.%d.%d\n",
5619           sdl_version.major,
5620           sdl_version.minor,
5621           sdl_version.patch);
5622
5623     SDL_NET_VERSION(&sdl_version);
5624     Print("- SDL_net %d.%d.%d\n",
5625           sdl_version.major,
5626           sdl_version.minor,
5627           sdl_version.patch);
5628   }
5629 }
5630
5631 static void InitProgramConfig(char *command_filename)
5632 {
5633   char *program_title = PROGRAM_TITLE_STRING;
5634   char *program_icon_file = PROGRAM_ICON_FILENAME;
5635   char *config_filename = getProgramConfigFilename(command_filename);
5636   char *userdata_basename = getBaseNameNoSuffix(command_filename);
5637   char *userdata_subdir;
5638   char *userdata_subdir_unix;
5639
5640   // read default program config, if existing
5641   if (fileExists(config_filename))
5642   {
5643     // if program config file exists, derive Unix user data directory from it
5644     userdata_basename = getBaseName(config_filename);
5645
5646     if (strSuffix(userdata_basename, ".conf"))
5647       userdata_basename[strlen(userdata_basename) - 4] = '\0';
5648
5649     LoadSetupFromFilename(config_filename);
5650   }
5651
5652   // set user data directory for Linux/Unix (but not Mac OS X)
5653   userdata_subdir_unix = getStringCat2(".", userdata_basename);
5654
5655   // set program title from potentially redefined program title
5656   if (setup.internal.program_title != NULL &&
5657       strlen(setup.internal.program_title) > 0)
5658     program_title = getStringCopy(setup.internal.program_title);
5659
5660   // set program icon file from potentially redefined program icon file
5661   if (setup.internal.program_icon_file != NULL &&
5662       strlen(setup.internal.program_icon_file) > 0)
5663     program_icon_file = getStringCopy(setup.internal.program_icon_file);
5664
5665 #if defined(PLATFORM_WIN32) || defined(PLATFORM_MACOSX)
5666   userdata_subdir = program_title;
5667 #elif defined(PLATFORM_UNIX)
5668   userdata_subdir = userdata_subdir_unix;
5669 #else
5670   userdata_subdir = USERDATA_DIRECTORY_OTHER;
5671 #endif
5672
5673   InitProgramInfo(command_filename,
5674                   config_filename,
5675                   userdata_subdir,
5676                   program_title,
5677                   program_title,
5678                   program_icon_file,
5679                   COOKIE_PREFIX,
5680                   GAME_VERSION_ACTUAL);
5681 }
5682
5683 int main(int argc, char *argv[])
5684 {
5685   InitProgramConfig(argv[0]);
5686
5687   InitWindowTitleFunction(getWindowTitleString);
5688   InitExitMessageFunction(DisplayExitMessage);
5689   InitExitFunction(CloseAllAndExit);
5690   InitPlatformDependentStuff();
5691
5692   GetOptions(argc, argv, print_usage, print_version);
5693   OpenAll();
5694
5695   EventLoop();
5696   CloseAllAndExit(0);
5697
5698   return 0;     /* to keep compilers happy */
5699 }