fixed short reactivation of overlay buttons while closing door after game
[rocksndiamonds.git] / src / conf_hlp.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 // conf_hlp.c
10 // ============================================================================
11
12 #include "libgame/libgame.h"
13 #include "main.h"
14
15
16 // List values that are not defined in the configuration file are set to
17 // reliable default values. If that value is GFX_ARG_UNDEFINED, it will
18 // be dynamically determined, using some of the other list values.
19
20 struct ConfigInfo helpanim_config[] =
21 {
22   { "player_1.moving.down",                     "16"                    },
23   { "player_1.moving.up",                       "16"                    },
24   { "player_1.moving.left",                     "16"                    },
25   { "player_1.moving.right",                    "16"                    },
26   { "player_1.pushing.left",                    "16"                    },
27   { "player_1.pushing.right",                   "16"                    },
28   { "end",                                      ""                      },
29
30   { "sand",                                     "50"                    },
31   { "sand.digging.left",                        "8"                     },
32   { "empty_space",                              "10"                    },
33   { "sand",                                     "50"                    },
34   { "sand.digging.right",                       "8"                     },
35   { "empty_space",                              "10"                    },
36   { "sand",                                     "50"                    },
37   { "sand.digging.up",                          "8"                     },
38   { "empty_space",                              "10"                    },
39   { "sand",                                     "50"                    },
40   { "sand.digging.down",                        "8"                     },
41   { "empty_space",                              "10"                    },
42   { "end",                                      ""                      },
43
44   { "empty_space",                              "-1"                    },
45   { "end",                                      ""                      },
46
47   { "quicksand_empty",                          "-1"                    },
48   { "end",                                      ""                      },
49
50   { "steelwall",                                "-1"                    },
51   { "end",                                      ""                      },
52
53   { "wall",                                     "-1"                    },
54   { "end",                                      ""                      },
55
56   { "expandable_wall.growing.left",             "20"                    },
57   { "wall",                                     "50"                    },
58   { "expandable_wall.growing.right",            "20"                    },
59   { "wall",                                     "50"                    },
60   { "expandable_wall.growing.up",               "20"                    },
61   { "wall",                                     "50"                    },
62   { "expandable_wall.growing.down",             "20"                    },
63   { "wall",                                     "50"                    },
64   { "empty_space",                              "20"                    },
65   { "end",                                      ""                      },
66
67   { "invisible_wall",                           "-1"                    },
68   { "end",                                      ""                      },
69
70   { "wall_slippery",                            "-1"                    },
71   { "end",                                      ""                      },
72
73   { "char_space",                               "10"                    },
74   { "char_exclam",                              "10"                    },
75   { "char_quotedbl",                            "10"                    },
76   { "char_numbersign",                          "10"                    },
77   { "char_dollar",                              "10"                    },
78   { "char_percent",                             "10"                    },
79   { "char_ampersand",                           "10"                    },
80   { "char_apostrophe",                          "10"                    },
81   { "char_parenleft",                           "10"                    },
82   { "char_parenright",                          "10"                    },
83   { "char_asterisk",                            "10"                    },
84   { "char_plus",                                "10"                    },
85   { "char_comma",                               "10"                    },
86   { "char_minus",                               "10"                    },
87   { "char_period",                              "10"                    },
88   { "char_slash",                               "10"                    },
89   { "char_0",                                   "10"                    },
90   { "char_1",                                   "10"                    },
91   { "char_2",                                   "10"                    },
92   { "char_3",                                   "10"                    },
93   { "char_4",                                   "10"                    },
94   { "char_5",                                   "10"                    },
95   { "char_6",                                   "10"                    },
96   { "char_7",                                   "10"                    },
97   { "char_8",                                   "10"                    },
98   { "char_9",                                   "10"                    },
99   { "char_colon",                               "10"                    },
100   { "char_semicolon",                           "10"                    },
101   { "char_less",                                "10"                    },
102   { "char_equal",                               "10"                    },
103   { "char_greater",                             "10"                    },
104   { "char_question",                            "10"                    },
105   { "char_at",                                  "10"                    },
106   { "char_a",                                   "10"                    },
107   { "char_b",                                   "10"                    },
108   { "char_c",                                   "10"                    },
109   { "char_d",                                   "10"                    },
110   { "char_e",                                   "10"                    },
111   { "char_f",                                   "10"                    },
112   { "char_g",                                   "10"                    },
113   { "char_h",                                   "10"                    },
114   { "char_i",                                   "10"                    },
115   { "char_j",                                   "10"                    },
116   { "char_k",                                   "10"                    },
117   { "char_l",                                   "10"                    },
118   { "char_m",                                   "10"                    },
119   { "char_n",                                   "10"                    },
120   { "char_o",                                   "10"                    },
121   { "char_p",                                   "10"                    },
122   { "char_q",                                   "10"                    },
123   { "char_r",                                   "10"                    },
124   { "char_s",                                   "10"                    },
125   { "char_t",                                   "10"                    },
126   { "char_u",                                   "10"                    },
127   { "char_v",                                   "10"                    },
128   { "char_w",                                   "10"                    },
129   { "char_x",                                   "10"                    },
130   { "char_y",                                   "10"                    },
131   { "char_z",                                   "10"                    },
132   { "char_bracketleft",                         "10"                    },
133   { "char_backslash",                           "10"                    },
134   { "char_bracketright",                        "10"                    },
135   { "char_asciicircum",                         "10"                    },
136   { "char_underscore",                          "10"                    },
137   { "char_copyright",                           "10"                    },
138   { "char_aumlaut",                             "10"                    },
139   { "char_oumlaut",                             "10"                    },
140   { "char_uumlaut",                             "10"                    },
141   { "char_degree",                              "10"                    },
142   { "char_trademark",                           "10"                    },
143   { "char_cursor",                              "10"                    },
144   { "end",                                      ""                      },
145
146   { "emerald",                                  "50"                    },
147   { "emerald.collecting",                       "8"                     },
148   { "empty_space",                              "10"                    },
149   { "end",                                      ""                      },
150
151   { "diamond",                                  "50"                    },
152   { "diamond.collecting",                       "8"                     },
153   { "empty_space",                              "10"                    },
154   { "end",                                      ""                      },
155
156   { "bd_diamond",                               "50"                    },
157   { "bd_diamond.collecting",                    "8"                     },
158   { "empty_space",                              "10"                    },
159   { "end",                                      ""                      },
160
161   { "emerald_yellow",                           "50"                    },
162   { "emerald_yellow.collecting",                "8"                     },
163   { "empty_space",                              "10"                    },
164   { "emerald_red",                              "50"                    },
165   { "emerald_red.collecting",                   "8"                     },
166   { "empty_space",                              "10"                    },
167   { "emerald_purple",                           "50"                    },
168   { "emerald_purple.collecting",                "8"                     },
169   { "empty_space",                              "10"                    },
170   { "end",                                      ""                      },
171
172   { "bd_rock",                                  "-1"                    },
173   { "end",                                      ""                      },
174
175   { "bomb",                                     "100"                   },
176   { "bomb.exploding",                           "16"                    },
177   { "empty_space",                              "10"                    },
178   { "end",                                      ""                      },
179
180   { "nut",                                      "100"                   },
181   { "nut.breaking",                             "6"                     },
182   { "emerald",                                  "20"                    },
183   { "end",                                      ""                      },
184
185   { "wall_emerald",                             "100"                   },
186   { "wall_emerald.exploding",                   "16"                    },
187   { "emerald",                                  "20"                    },
188   { "end",                                      ""                      },
189
190   { "wall_diamond",                             "100"                   },
191   { "wall_diamond.exploding",                   "16"                    },
192   { "diamond",                                  "20"                    },
193   { "end",                                      ""                      },
194
195   { "wall_bd_diamond",                          "100"                   },
196   { "wall_bd_diamond.exploding",                "16"                    },
197   { "bd_diamond",                               "20"                    },
198   { "end",                                      ""                      },
199
200   { "wall_emerald_yellow",                      "100"                   },
201   { "wall_emerald_yellow.exploding",            "16"                    },
202   { "emerald_yellow",                           "20"                    },
203   { "wall_emerald_red",                         "100"                   },
204   { "wall_emerald_red.exploding",               "16"                    },
205   { "emerald_red",                              "20"                    },
206   { "wall_emerald_purple",                      "100"                   },
207   { "wall_emerald_purple.exploding",            "16"                    },
208   { "emerald_purple",                           "20"                    },
209   { "end",                                      ""                      },
210
211   { "acid",                                     "-1"                    },
212   { "end",                                      ""                      },
213
214   { "key_1",                                    "50"                    },
215   { "key_2",                                    "50"                    },
216   { "key_3",                                    "50"                    },
217   { "key_4",                                    "50"                    },
218   { "end",                                      ""                      },
219
220   { "gate_1",                                   "50"                    },
221   { "gate_2",                                   "50"                    },
222   { "gate_3",                                   "50"                    },
223   { "gate_4",                                   "50"                    },
224   { "end",                                      ""                      },
225
226   { "gate_1_gray",                              "50"                    },
227   { "gate_2_gray",                              "50"                    },
228   { "gate_3_gray",                              "50"                    },
229   { "gate_4_gray",                              "50"                    },
230   { "end",                                      ""                      },
231
232   { "dynamite",                                 "-1"                    },
233   { "end",                                      ""                      },
234
235   { "dynamite.active",                          "96"                    },
236   { "dynamite.exploding",                       "16"                    },
237   { "empty_space",                              "20"                    },
238   { "end",                                      ""                      },
239
240   { "dynabomb.active",                          "100"                   },
241   { "dynabomb.exploding",                       "16"                    },
242   { "empty_space",                              "20"                    },
243   { "end",                                      ""                      },
244
245   { "dynabomb_increase_number",                 "-1"                    },
246   { "end",                                      ""                      },
247
248   { "dynabomb_increase_size",                   "-1"                    },
249   { "end",                                      ""                      },
250
251   { "dynabomb_increase_power",                  "-1"                    },
252   { "end",                                      ""                      },
253
254   { "spaceship.turning_from_right.up",          "8"                     },
255   { "spaceship.turning_from_up.left",           "8"                     },
256   { "spaceship.turning_from_left.down",         "8"                     },
257   { "spaceship.turning_from_down.right",        "8"                     },
258   { "end",                                      ""                      },
259
260   { "bug.turning_from_right.up",                "8"                     },
261   { "bug.turning_from_up.left",                 "8"                     },
262   { "bug.turning_from_left.down",               "8"                     },
263   { "bug.turning_from_down.right",              "8"                     },
264   { "end",                                      ""                      },
265
266   { "bd_butterfly",                             "-1"                    },
267   { "end",                                      ""                      },
268
269   { "bd_firefly",                               "-1"                    },
270   { "end",                                      ""                      },
271
272   { "pacman.right",                             "16"                    },
273   { "pacman.up",                                "16"                    },
274   { "pacman.left",                              "16"                    },
275   { "pacman.down",                              "16"                    },
276   { "end",                                      ""                      },
277
278   { "yamyam",                                   "-1"                    },
279   { "end",                                      ""                      },
280
281   { "dark_yamyam",                              "-1"                    },
282   { "end",                                      ""                      },
283
284   { "robot",                                    "-1"                    },
285   { "end",                                      ""                      },
286
287   { "mole.moving.right",                        "16"                    },
288   { "mole.moving.up",                           "16"                    },
289   { "mole.moving.left",                         "16"                    },
290   { "mole.moving.down",                         "16"                    },
291   { "end",                                      ""                      },
292
293   { "penguin.moving.right",                     "16"                    },
294   { "penguin.moving.up",                        "16"                    },
295   { "penguin.moving.left",                      "16"                    },
296   { "penguin.moving.down",                      "16"                    },
297   { "end",                                      ""                      },
298
299   { "pig.moving.right",                         "16"                    },
300   { "pig.moving.up",                            "16"                    },
301   { "pig.moving.left",                          "16"                    },
302   { "pig.moving.down",                          "16"                    },
303   { "end",                                      ""                      },
304
305   { "dragon.moving.right",                      "16"                    },
306   { "dragon.moving.up",                         "16"                    },
307   { "dragon.moving.left",                       "16"                    },
308   { "dragon.moving.down",                       "16"                    },
309   { "end",                                      ""                      },
310
311   { "satellite",                                "-1"                    },
312   { "end",                                      ""                      },
313
314   { "robot_wheel",                              "50"                    },
315   { "robot_wheel.active",                       "100"                   },
316   { "end",                                      ""                      },
317
318   { "lamp",                                     "50"                    },
319   { "lamp.active",                              "50"                    },
320   { "end",                                      ""                      },
321
322   { "time_orb_full",                            "50"                    },
323   { "time_orb_empty",                           "50"                    },
324   { "end",                                      ""                      },
325
326   { "amoeba_drop",                              "50"                    },
327   { "amoeba.growing",                           "6"                     },
328   { "amoeba_wet",                               "20"                    },
329   { "end",                                      ""                      },
330
331   { "amoeba_dead",                              "-1"                    },
332   { "end",                                      ""                      },
333
334   { "amoeba_wet",                               "-1"                    },
335   { "end",                                      ""                      },
336
337   { "amoeba_wet",                               "100"                   },
338   { "amoeba.growing",                           "6"                     },
339   { "end",                                      ""                      },
340
341   { "amoeba_full",                              "50"                    },
342   { "amoeba_dead",                              "50"                    },
343   { "amoeba.exploding",                         "16"                    },
344   { "diamond",                                  "20"                    },
345   { "end",                                      ""                      },
346
347   { "game_of_life",                             "-1"                    },
348   { "end",                                      ""                      },
349
350   { "biomaze",                                  "-1"                    },
351   { "end",                                      ""                      },
352
353   { "magic_wall.active",                        "-1"                    },
354   { "end",                                      ""                      },
355
356   { "bd_magic_wall.active",                     "-1"                    },
357   { "end",                                      ""                      },
358
359   { "exit_closed",                              "200"                   },
360   { "exit.opening",                             "30"                    },
361   { "exit_open",                                "100"                   },
362   { "exit.closing",                             "30"                    },
363   { "end",                                      ""                      },
364
365   { "exit_open",                                "-1"                    },
366   { "end",                                      ""                      },
367
368   { "sokoban_object",                           "-1"                    },
369   { "end",                                      ""                      },
370
371   { "sokoban_field_empty",                      "-1"                    },
372   { "end",                                      ""                      },
373
374   { "sokoban_field_full",                       "-1"                    },
375   { "end",                                      ""                      },
376
377   { "speed_pill",                               "-1"                    },
378   { "end",                                      ""                      },
379
380   { NULL,                                       NULL                    }
381 };
382
383 struct ConfigInfo helptext_config[] =
384 {
385   {
386     "player_1",
387     "THE HERO: (Is _this_ guy good old Rockford?)"
388   },
389   {
390     "sand",
391     "Normal sand: You can dig through it"
392   },
393   {
394     "empty_space",
395     "Empty field: You can walk through it"
396   },
397   {
398     "quicksand_empty",
399     "Quicksand: You cannot pass it, but rocks can fall through it"
400   },
401   {
402     "steelwall",
403     "Massive Wall: Nothing can go through it"
404   },
405   {
406     "wall",
407     "Normal Wall: You can't go through it, but you can bomb it away"
408   },
409   {
410     "expandable_wall",
411     "Growing Wall: Grows in several directions if there is an empty field"
412   },
413   {
414     "invisible_wall",
415     "Invisible Wall: Behaves like normal wall, but is invisible"
416   },
417   {
418     "wall_slippery",
419     "Old Wall: Like normal wall, but some things can fall down from it"
420   },
421   {
422     "char_space",
423     "Letter Wall: Looks like a letter, behaves like a normal wall"
424   },
425   {
426     "emerald",
427     "Emerald: You must collect enough of them to finish a level"
428   },
429   {
430     "diamond",
431     "Diamond: Counts as 3 emeralds, but can be destroyed by rocks"
432   },
433   {
434     "bd_diamond",
435     "Diamond (BD style): Counts like one emerald and behaves a bit different"
436   },
437   {
438     "emerald_yellow",
439     "Colorful Gems: Seem to behave like Emeralds"
440   },
441   {
442     "bd_rock",
443     "Rock: Smashes several things; Can be moved by the player"
444   },
445   {
446     "bomb",
447     "Bomb: You can move it, but be careful when dropping it"
448   },
449   {
450     "nut",
451     "Nut: Throw a rock on it to open it; Each nut contains an emerald"
452   },
453   {
454     "wall_emerald",
455     "Wall with an emerald inside: Bomb the wall away to get it"
456   },
457   {
458     "wall_diamond",
459     "Wall with a diamond inside: Bomb the wall away to get it"
460   },
461   {
462     "wall_bd_diamond",
463     "Wall with BD style diamond inside: Bomb the wall away to get it"
464   },
465   {
466     "wall_emerald_yellow",
467     "Wall with colorful gem inside: Bomb the wall away to get it"
468   },
469   {
470     "acid",
471     "Acid: Things that fall in are gone forever (including our hero)"
472   },
473   {
474     "key_1",
475     "Key: Opens the door that has the same color (red/yellow/green/blue)"
476   },
477   {
478     "gate_1",
479     "Door: Can be opened by the key with the same color"
480   },
481   {
482     "gate_1_gray",
483     "Door: You have to find out the right color of the key for it"
484   },
485   {
486     "dynamite",
487     "Dynamite: Collect it and use it to destroy walls or kill enemies"
488   },
489   {
490     "dynamite.active",
491     "Dynamite: This one explodes after a few seconds"
492   },
493   {
494     "dynabomb",
495     "Dyna Bomb: Explodes in 4 directions with variable explosion size"
496   },
497   {
498     "dynabomb_increase_number",
499     "Dyna Bomb: Increases the number of dyna bombs available at a time"
500   },
501   {
502     "dynabomb_increase_size",
503     "Dyna Bomb: Increases the size of explosion of dyna bombs"
504   },
505   {
506     "dynabomb_increase_power",
507     "Dyna Bomb: Increases the power of explosion of dyna bombs"
508   },
509   {
510     "spaceship",
511     "Spaceship: Moves at the left side of walls; don't touch it!"
512   },
513   {
514     "bug",
515     "Bug: Moves at the right side of walls; don't touch it!"
516   },
517   {
518     "bd_butterfly",
519     "Butterfly: Moves at the right side of walls; don't touch it!"
520   },
521   {
522     "bd_firefly",
523     "Firefly: Moves at the left side of walls; don't touch it!"
524   },
525   {
526     "pacman",
527     "Pacman: Eats the amoeba and you, if you're not careful"
528   },
529   {
530     "yamyam",
531     "Yam Yam: Eats diamonds and you, if you're not careful"
532   },
533   {
534     "dark_yamyam",
535     "Dark Yam Yam: Eats almost everything"
536   },
537   {
538     "robot",
539     "Robot: Tries to kill the player"
540   },
541   {
542     "mole",
543     "The mole: Eats the amoeba and turns empty space into normal sand"
544   },
545   {
546     "penguin",
547     "The penguin: Guide him to the exit, but keep him away from monsters!"
548   },
549   {
550     "pig",
551     "The Pig: Harmless, but eats all gems it can get"
552   },
553   {
554     "dragon",
555     "The Dragon: Breathes fire, especially to some monsters"
556   },
557   {
558     "satellite",
559     "Sonde: Follows you everywhere; harmless, but may block your way"
560   },
561   {
562     "robot_wheel",
563     "Magic Wheel: Touch it to get rid of the robots for some seconds"
564   },
565   {
566     "lamp",
567     "Light Bulb: All of them must be switched on to finish a level"
568   },
569   {
570     "time_orb_full",
571     "Extra Time Orb: Adds some seconds to the time available for the level"
572   },
573   {
574     "amoeba_drop",
575     "Amoeba Drop: Grows to an amoeba on the ground - don't touch it"
576   },
577   {
578     "amoeba_dead",
579     "Dead Amoeba: Does not grow, but can still kill bugs and spaceships"
580   },
581   {
582     "amoeba_wet",
583     "Normal Amoeba: Grows through empty fields, sand and quicksand"
584   },
585   {
586     "amoeba_wet",
587     "Dropping Amoeba: This one makes drops that grow to a new amoeba"
588   },
589   {
590     "amoeba_full",
591     "Living Amoeba (BD style): Contains other element, when surrounded"
592   },
593   {
594     "game_of_life",
595     "Game Of Life: Behaves like the well known 'Game Of Life' (2333 style)"
596   },
597   {
598     "biomaze",
599     "Biomaze: A bit like the 'Game Of Life', but builds crazy mazes"
600   },
601   {
602     "magic_wall",
603     "Magic Wall: Changes rocks, emeralds and diamonds when they pass it"
604   },
605   {
606     "bd_magic_wall",
607     "Magic Wall (BD style): Changes rocks and BD style diamonds"
608   },
609   {
610     "exit_closed",
611     "Exit door: Opens if you have enough emeralds to finish the level"
612   },
613   {
614     "exit_open",
615     "Open exit door: Enter here to leave the level and exit the actual game"
616   },
617   {
618     "sokoban_object",
619     "Sokoban element: Object which must be pushed to an empty field"
620   },
621   {
622     "sokoban_field_empty",
623     "Sokoban element: Empty field where a Sokoban object can be placed on"
624   },
625   {
626     "sokoban_field_full",
627     "Sokoban element: Field with object which can be pushed away"
628   },
629   {
630     "speed_pill",
631     "Speed pill: Lets the player run twice as fast as normally"
632   },
633
634   {
635     NULL,
636     NULL
637   }
638 };