fixed graphical bugs caused by commit f77bbb8f and 1b4dc759
[rocksndiamonds.git] / src / conf_snd.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_snd.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 SND_ARG_UNDEFINED, it will
18 // be dynamically determined, using some of the other list values.
19
20 struct ConfigTypeInfo sound_config_suffix[] =
21 {
22   { ".mode_loop",                       ARG_UNDEFINED,  TYPE_BOOLEAN    },
23   { ".volume",                          "100",          TYPE_INTEGER    },
24   { ".priority",                        "0",            TYPE_INTEGER    },
25
26   { NULL,                               NULL,           0               }
27 };
28
29 struct ConfigInfo sound_config[] =
30 {
31   // some default sounds
32   { "[default].digging",                "schlurf.wav"                   },
33   { "[default].collecting",             "pong.wav"                      },
34   { "[default].snapping",               "pong.wav"                      },
35   { "[default].pushing",                "pusch.wav"                     },
36   { "[default].impact",                 "klopf.wav"                     },
37   { "[default].walking",                "empty.wav"                     },
38   { "[default].passing",                "gate.wav"                      },
39   { "[default].dying",                  "autsch.wav"                    },
40   { "[default].exploding",              "roaaar.wav"                    },
41   { "[default].hitting",                "kink.wav"                      },
42   { "[sp_default].exploding",           "booom.wav"                     },
43   { "[mm_default].exploding",           "kabumm.wav"                    },
44
45   // sounds for Boulder Dash style elements and actions
46   { "bd_diamond.collecting",            "pong.wav"                      },
47   { "bd_diamond.impact",                "pling.wav"                     },
48   { "bd_rock.pushing",                  "pusch.wav"                     },
49   { "bd_rock.impact",                   "klopf.wav"                     },
50   { "bd_magic_wall.activating",         "quirk.wav"                     },
51   { "bd_magic_wall.active",             "miep.wav"                      },
52   { "bd_magic_wall.filling",            "quirk.wav"                     },
53   { "bd_amoeba.waiting",                UNDEFINED_FILENAME              },
54   { "bd_amoeba.growing",                "amoebe.wav"                    },
55   { "bd_amoeba.turning_to_gem",         "pling.wav"                     },
56   { "bd_amoeba.turning_to_rock",        "klopf.wav"                     },
57   { "bd_butterfly.moving",              "klapper.wav"                   },
58   { "bd_butterfly.waiting",             "klapper.wav"                   },
59   { "bd_firefly.moving",                "roehr.wav"                     },
60   { "bd_firefly.waiting",               "roehr.wav"                     },
61
62   // sounds for Supaplex style elements and actions
63   { "sp_base.digging",                  "base.wav"                      },
64   { "sp_buggy_base.digging",            "base.wav"                      },
65   { "sp_buggy_base.active",             "bug.wav"                       },
66   { "sp_infotron.collecting",           "infotron.wav"                  },
67   { "sp_infotron.impact",               "pling.wav"                     },
68   { "sp_zonk.pushing",                  "zonkpush.wav"                  },
69   { "sp_zonk.impact",                   "zonkdown.wav"                  },
70   { "sp_disk_red.collecting",           "infotron.wav"                  },
71   { "sp_disk_orange.pushing",           "zonkpush.wav"                  },
72   { "sp_disk_yellow.pushing",           "pusch.wav"                     },
73   { "[sp_port].passing",                "gate.wav"                      },
74   { "[sp_exit].passing",                "exit.wav"                      },
75   { "[sp_exit].opening",                UNDEFINED_FILENAME              },
76   { "[sp_exit].closing",                UNDEFINED_FILENAME              },
77   { "sp_sniksnak.moving",               UNDEFINED_FILENAME              },
78   { "sp_sniksnak.waiting",              UNDEFINED_FILENAME              },
79   { "sp_electron.moving",               UNDEFINED_FILENAME              },
80   { "sp_electron.waiting",              UNDEFINED_FILENAME              },
81   { "sp_terminal.activating",           UNDEFINED_FILENAME              },
82   { "sp_terminal.active",               UNDEFINED_FILENAME              },
83
84   // sounds for Sokoban style elements and actions
85   { "[sokoban].pushing",                "pusch.wav"                     },
86   { "[sokoban].filling",                "deng.wav"                      },
87   { "[sokoban].emptying",               UNDEFINED_FILENAME              },
88
89   // sounds for Emerald Mine style elements and actions
90   { "[player].moving",                  "empty.wav"                     },
91   { "[player].moving.mode_loop",        "false"                         },
92   { "sand.digging",                     "schlurf.wav"                   },
93   { "[emerald].collecting",             "pong.wav"                      },
94   { "[emerald].impact",                 "pling.wav"                     },
95   { "diamond.collecting",               "pong.wav"                      },
96   { "diamond.impact",                   "pling.wav"                     },
97   { "diamond.breaking",                 "quirk.wav"                     },
98   { "rock.pushing",                     "pusch.wav"                     },
99   { "rock.impact",                      "klopf.wav"                     },
100   { "bomb.pushing",                     "pusch.wav"                     },
101   { "nut.pushing",                      "knurk.wav"                     },
102   { "nut.breaking",                     "knack.wav"                     },
103   { "nut.impact",                       "klumpf.wav"                    },
104   { "[dynamite].collecting",            "pong.wav"                      },
105   { "[dynamite].dropping",              "deng.wav"                      },
106   { "[dynamite].active",                "zisch.wav"                     },
107   { "[key].collecting",                 "pong.wav"                      },
108   { "[gate].passing",                   "gate.wav"                      },
109   { "bug.moving",                       "klapper.wav"                   },
110   { "bug.waiting",                      "klapper.wav"                   },
111   { "spaceship.moving",                 "roehr.wav"                     },
112   { "spaceship.waiting",                "roehr.wav"                     },
113   { "yamyam.moving",                    UNDEFINED_FILENAME              },
114   { "yamyam.waiting",                   "njam.wav"                      },
115   { "yamyam.digging",                   "njam.wav"                      },
116   { "robot.moving",                     "schlurf.wav"                   },
117   { "robot.moving.mode_loop",           "false"                         },
118   { "robot.waiting",                    UNDEFINED_FILENAME              },
119   { "robot_wheel.activating",           "deng.wav"                      },
120   { "robot_wheel.active",               "miep.wav"                      },
121   { "magic_wall.activating",            "quirk.wav"                     },
122   { "magic_wall.active",                "miep.wav"                      },
123   { "magic_wall.filling",               "quirk.wav"                     },
124   { "dc_magic_wall.activating",         "quirk.wav"                     },
125   { "dc_magic_wall.active",             "miep.wav"                      },
126   { "dc_magic_wall.filling",            "quirk.wav"                     },
127   { "[amoeba].waiting",                 UNDEFINED_FILENAME              },
128   { "[amoeba].growing",                 "amoebe.wav"                    },
129   { "[amoeba].dropping",                UNDEFINED_FILENAME              },
130   { "acid.splashing",                   "blurb.wav"                     },
131   { "[quicksand].filling",              UNDEFINED_FILENAME              },
132   { "[quicksand].emptying",             UNDEFINED_FILENAME              },
133   { "[exit].opening",                   "oeffnen.wav"                   },
134   { "[exit].closing",                   "oeffnen.wav"                   },
135   { "[exit].passing",                   "buing.wav"                     },
136   { "[steel_exit].opening",             "oeffnen.wav"                   },
137   { "[steel_exit].closing",             "oeffnen.wav"                   },
138   { "[steel_exit].passing",             "buing.wav"                     },
139   { "[em_exit].opening",                "gong.wav"                      },
140   { "[em_exit].closing",                UNDEFINED_FILENAME              },
141   { "[em_exit].passing",                "buing.wav"                     },
142   { "[em_steel_exit].opening",          "gong.wav"                      },
143   { "[em_steel_exit].closing",          UNDEFINED_FILENAME              },
144   { "[em_steel_exit].passing",          "buing.wav"                     },
145   { "penguin.passing",                  "buing.wav"                     },
146
147   // sounds for Emerald Mine Club style elements and actions
148   { "balloon.moving",                   UNDEFINED_FILENAME              },
149   { "balloon.waiting",                  UNDEFINED_FILENAME              },
150   { "balloon.pushing",                  "schlurf.wav"                   },
151   { "[balloon_switch].activating",      UNDEFINED_FILENAME              },
152   { "spring.moving",                    UNDEFINED_FILENAME              },
153   { "spring.pushing",                   "pusch.wav"                     },
154   { "spring.impact",                    "klopf.wav"                     },
155   { "[wall].growing",                   UNDEFINED_FILENAME              },
156   { "emc_android.pushing",              "pusch.wav"                     },
157   { "emc_android.moving",               "roehr.wav"                     },
158   { "emc_android.moving.mode_loop",     "false"                         },
159   { "emc_android.dropping",             "deng.wav"                      },
160   { "emc_magic_ball.dropping",          "deng.wav"                      },
161
162   // sounds for Diamond Caves style elements and actions
163   { "pearl.collecting",                 "pong.wav"                      },
164   { "pearl.breaking",                   "knack.wav"                     },
165   { "pearl.impact",                     "pling.wav"                     },
166   { "crystal.collecting",               "pong.wav"                      },
167   { "crystal.impact",                   "pling.wav"                     },
168   { "[envelope].collecting",            "pong.wav"                      },
169   { "[envelope].opening",               UNDEFINED_FILENAME              },
170   { "[envelope].closing",               UNDEFINED_FILENAME              },
171   { "invisible_sand.digging",           "schlurf.wav"                   },
172   { "invisible_sand.active.digging",    "schlurf.wav"                   },
173   { "shield_normal.collecting",         "pong.wav"                      },
174   { "shield_normal.active",             UNDEFINED_FILENAME              },
175   { "shield_deadly.collecting",         "pong.wav"                      },
176   { "shield_deadly.active",             UNDEFINED_FILENAME              },
177   { "extra_time.collecting",            "gong.wav"                      },
178   { "mole.moving",                      UNDEFINED_FILENAME              },
179   { "mole.waiting",                     UNDEFINED_FILENAME              },
180   { "mole.digging",                     "blurb.wav"                     },
181   { "[switchgate_switch].activating",   UNDEFINED_FILENAME              },
182   { "[switchgate].opening",             "oeffnen.wav"                   },
183   { "[switchgate].closing",             "oeffnen.wav"                   },
184   { "[switchgate].passing",             "gate.wav"                      },
185   { "[timegate_switch].activating",     "deng.wav"                      },
186   { "[timegate_switch].active",         "miep.wav"                      },
187   { "[timegate_switch].deactivating",   UNDEFINED_FILENAME              },
188   { "[timegate].opening",               "oeffnen.wav"                   },
189   { "[timegate].closing",               "oeffnen.wav"                   },
190   { "[timegate].passing",               "gate.wav"                      },
191   { "[conveyor_belt_switch].activating",UNDEFINED_FILENAME              },
192   { "[conveyor_belt].active",           UNDEFINED_FILENAME              },
193   { "[conveyor_belt_switch].deactivating",UNDEFINED_FILENAME            },
194   { "light_switch.activating",          UNDEFINED_FILENAME              },
195   { "light_switch.deactivating",        UNDEFINED_FILENAME              },
196
197   // sounds for DX Boulderdash style elements and actions
198   { "dx_supabomb.pushing",              "pusch.wav"                     },
199   { "trap.digging",                     "schlurf.wav"                   },
200   { "trap.activating",                  UNDEFINED_FILENAME              },
201   { "[tube].walking",                   UNDEFINED_FILENAME              },
202
203   // sounds for Rocks'n'Diamonds style elements and actions
204   { "amoeba.turning_to_gem",            "pling.wav"                     },
205   { "amoeba.turning_to_rock",           "klopf.wav"                     },
206   { "speed_pill.collecting",            "pong.wav"                      },
207   { "dynabomb_increase_number.collecting","pong.wav"                    },
208   { "dynabomb_increase_size.collecting","pong.wav"                      },
209   { "dynabomb_increase_power.collecting","pong.wav"                     },
210   { "[dynabomb].dropping",              "deng.wav"                      },
211   { "[dynabomb].active",                "zisch.wav"                     },
212   { "satellite.moving",                 UNDEFINED_FILENAME              },
213   { "satellite.waiting",                UNDEFINED_FILENAME              },
214   { "satellite.pushing",                "pusch.wav"                     },
215   { "lamp.activating",                  "deng.wav"                      },
216   { "lamp.deactivating",                "deng.wav"                      },
217   { "time_orb_full.collecting",         "gong.wav"                      },
218   { "time_orb_full.impact",             "deng.wav"                      },
219   { "time_orb_empty.pushing",           "pusch.wav"                     },
220   { "time_orb_empty.impact",            "deng.wav"                      },
221   { "game_of_life.waiting",             UNDEFINED_FILENAME              },
222   { "game_of_life.growing",             "amoebe.wav"                    },
223   { "biomaze.waiting",                  UNDEFINED_FILENAME              },
224   { "biomaze.growing",                  "amoebe.wav"                    },
225   { "pacman.moving",                    UNDEFINED_FILENAME              },
226   { "pacman.waiting",                   UNDEFINED_FILENAME              },
227   { "pacman.digging",                   UNDEFINED_FILENAME              },
228   { "dark_yamyam.moving",               UNDEFINED_FILENAME              },
229   { "dark_yamyam.waiting",              "njam.wav"                      },
230   { "dark_yamyam.digging",              UNDEFINED_FILENAME              },
231   { "penguin.moving",                   UNDEFINED_FILENAME              },
232   { "penguin.waiting",                  UNDEFINED_FILENAME              },
233   { "pig.moving",                       UNDEFINED_FILENAME              },
234   { "pig.waiting",                      UNDEFINED_FILENAME              },
235   { "pig.digging",                      UNDEFINED_FILENAME              },
236   { "dragon.moving",                    UNDEFINED_FILENAME              },
237   { "dragon.waiting",                   UNDEFINED_FILENAME              },
238   { "dragon.attacking",                 UNDEFINED_FILENAME              },
239
240   // sounds for Mirror Magic style elements and actions
241   { "[mm_mcduffin].hitting",            "autsch.wav"                    },
242   { "[mm_mirror].hitting",              "laser.wav"                     },
243   { "[mm_mirror_fixed].hitting",        "laser.wav"                     },
244   { "[mm_prism].hitting",               "laser.wav"                     },
245   { "[mm_exit].hitting",                "holz.wav"                      },
246   { "[mm_exit].opening",                "kling.wav"                     },
247   { "mm_exit_open.hitting",             UNDEFINED_FILENAME              },
248   { "[df_mirror].hitting",              "laser.wav"                     },
249   { "[df_mirror_rotating].hitting",     "laser.wav"                     },
250   { "[df_refractor].hitting",           "laser.wav"                     },
251   { "[df_receiver].hitting",            "holz.wav"                      },
252   { "[df_receiver].opening",            "kling.wav"                     },
253   { "[mm_wooden_wall].hitting",         "holz.wav"                      },
254   { "[mm_wooden_block].hitting",        "holz.wav"                      },
255   { "[mm_wooden_block].pushing",        "bong.wav"                      },
256   { "[mm_wooden_lock].hitting",         "holz.wav"                      },
257   { "[mm_wooden_grid_fixed].hitting",   "holz.wav"                      },
258   { "[mm_fuse].hitting",                "holz.wav"                      },
259   { "[mm_ice_wall].hitting",            "holz.wav"                      },
260   { "[mm_ice_wall].shrinking",          "slurp.wav"                     },
261   { "[mm_amoeba_wall].hitting",         "holz.wav"                      },
262   { "[mm_amoeba_wall].growing",         "amoebe.wav"                    },
263   { "[mm_amoeba_wall].growing.mode_loop","false"                        },
264   { "[df_wooden_wall].hitting",         "holz.wav"                      },
265   { "[df_wooden_grid_fixed].hitting",   "holz.wav"                      },
266   { "[df_wooden_grid_rotating].hitting","holz.wav"                      },
267   { "[mm_steel_wall].hitting",          "hui.wav"                       },
268   { "[mm_steel_grid_fixed].hitting",    "hui.wav"                       },
269   { "[mm_steel_block].hitting",         "hui.wav"                       },
270   { "[mm_steel_block].pushing",         "bong.wav"                      },
271   { "[mm_steel_lock].hitting",          "hui.wav"                       },
272   { "[df_steel_wall].hitting",          "hui.wav"                       },
273   { "[df_steel_grid_fixed].hitting",    "hui.wav"                       },
274   { "[df_steel_grid_rotating].hitting", "hui.wav"                       },
275
276   { "[mm_pacman].exploding",            "quiek.wav"                     },
277   { "[mm_mcduffin].exploding",          "roaaar.wav"                    },
278   { "[mm_bomb].exploding",              "roaaar.wav"                    },
279   { "[mm_key].exploding",               "kling.wav"                     },
280   { "[mm_steel_lock].exploding",        "whoosh.wav"                    },
281   { "[mm_wooden_lock].exploding",       "whoosh.wav"                    },
282
283   // sounds not associated to game elements (used for menu screens etc.)
284   // keyword to stop parser: "NO_MORE_ELEMENT_SOUNDS" <-- do not change!
285
286   // sounds for other game actions
287   { "game.starting",                    UNDEFINED_FILENAME              },
288   { "game.leveltime_charging",          "fuel.wav"                      },
289   { "game.health_charging",             "warnton.wav"                   },
290   { "game.running_out_of_time",         "gong.wav"                      },
291   { "game.leveltime_bonus",             "sirr.wav"                      },
292   { "game.health_bonus",                "sirr.wav"                      },
293   { "game.losing",                      "lachen.wav"                    },
294   { "game.winning",                     UNDEFINED_FILENAME              },
295   { "game.sokoban_solving",             "buing.wav"                     },
296
297   // sounds for other non-game actions
298   { "door.opening",                     "door.wav"                      },
299   { "door.closing",                     "door.wav"                      },
300   { "door_1.opening",                   UNDEFINED_FILENAME              },
301   { "door_1.closing",                   UNDEFINED_FILENAME              },
302   { "door_2.opening",                   UNDEFINED_FILENAME              },
303   { "door_2.closing",                   UNDEFINED_FILENAME              },
304
305   { "request.opening",                  UNDEFINED_FILENAME              },
306   { "request.closing",                  UNDEFINED_FILENAME              },
307
308   // sounds for menu actions
309   { "menu.item.activating",             "empty.wav"                     },
310   { "menu.item.selecting",              "base.wav"                      },
311
312   { "menu.button.pressing",             UNDEFINED_FILENAME              },
313   { "menu.button.releasing",            UNDEFINED_FILENAME              },
314
315   { "background.TITLE_INITIAL",         UNDEFINED_FILENAME              },
316   { "background.TITLE",                 UNDEFINED_FILENAME              },
317   { "background.MAIN",                  UNDEFINED_FILENAME              },
318   { "background.LEVELS",                UNDEFINED_FILENAME              },
319   { "background.LEVELNR",               UNDEFINED_FILENAME              },
320   { "background.SCORES",                "halloffame.wav"                },
321   { "background.SCORES.mode_loop",      "false"                         },
322   { "background.EDITOR",                UNDEFINED_FILENAME              },
323   { "background.INFO",                  UNDEFINED_FILENAME              },
324   { "background.SETUP",                 UNDEFINED_FILENAME              },
325
326   { "background.titlescreen_initial_1", UNDEFINED_FILENAME              },
327   { "background.titlescreen_initial_2", UNDEFINED_FILENAME              },
328   { "background.titlescreen_initial_3", UNDEFINED_FILENAME              },
329   { "background.titlescreen_initial_4", UNDEFINED_FILENAME              },
330   { "background.titlescreen_initial_5", UNDEFINED_FILENAME              },
331   { "background.titlescreen_1",         UNDEFINED_FILENAME              },
332   { "background.titlescreen_2",         UNDEFINED_FILENAME              },
333   { "background.titlescreen_3",         UNDEFINED_FILENAME              },
334   { "background.titlescreen_4",         UNDEFINED_FILENAME              },
335   { "background.titlescreen_5",         UNDEFINED_FILENAME              },
336   { "background.titlemessage_initial_1",UNDEFINED_FILENAME              },
337   { "background.titlemessage_initial_2",UNDEFINED_FILENAME              },
338   { "background.titlemessage_initial_3",UNDEFINED_FILENAME              },
339   { "background.titlemessage_initial_4",UNDEFINED_FILENAME              },
340   { "background.titlemessage_initial_5",UNDEFINED_FILENAME              },
341   { "background.titlemessage_1",        UNDEFINED_FILENAME              },
342   { "background.titlemessage_2",        UNDEFINED_FILENAME              },
343   { "background.titlemessage_3",        UNDEFINED_FILENAME              },
344   { "background.titlemessage_4",        UNDEFINED_FILENAME              },
345   { "background.titlemessage_5",        UNDEFINED_FILENAME              },
346
347   { NULL,                               NULL                            }
348 };