/* sounds for other game actions */
{ "game.starting", UNDEFINED_FILENAME },
+ { "game.leveltime_charging", "fuel.wav" },
+ { "game.health_charging", UNDEFINED_FILENAME },
{ "game.running_out_of_time", "gong.wav" },
{ "game.leveltime_bonus", "sirr.wav" },
+ { "game.health_bonus", "sirr.wav" },
{ "game.losing", "lachen.wav" },
{ "game.winning", UNDEFINED_FILENAME },
{ "game.sokoban_solving", "buing.wav" },
PlayLevelSoundElementAction(x, y, element, action);
}
+void PlayLevelSound_MM(int xx, int yy, int element_mm, int action_mm)
+{
+ int element = map_element_MM_to_RND(element_mm);
+ int action = map_action_MM_to_RND(action_mm);
+ int offset = 0;
+ int x = xx - offset;
+ int y = yy - offset;
+
+ PlayLevelSoundElementAction(x, y, element, action);
+}
+
+void PlaySound_MM(int sound_mm)
+{
+ int sound = map_sound_MM_to_RND(sound_mm);
+
+ if (sound == SND_UNDEFINED)
+ return;
+
+ PlaySound(sound);
+}
+
+void PlaySoundLoop_MM(int sound_mm)
+{
+ int sound = map_sound_MM_to_RND(sound_mm);
+
+ if (sound == SND_UNDEFINED)
+ return;
+
+ PlaySoundLoop(sound);
+}
+
+void StopSound_MM(int sound_mm)
+{
+ int sound = map_sound_MM_to_RND(sound_mm);
+
+ if (sound == SND_UNDEFINED)
+ return;
+
+ StopSound(sound);
+}
+
void RaiseScore(int value)
{
local_player->score += value;
void InitPlayLevelSound();
void PlayLevelSound_EM(int, int, int, int);
void PlayLevelSound_SP(int, int, int, int);
+void PlayLevelSound_MM(int, int, int, int);
+void PlaySound_MM(int);
+void PlaySoundLoop_MM(int);
+void StopSound_MM(int);
void RaiseScore(int);
void RaiseScoreElement(int);
#define EL_MM_EMPTY_NATIVE 0
#define EL_DF_EMPTY_NATIVE 304
+/* sounds */
+#define SND_MM_GAME_LEVELTIME_CHARGING 0
+
/* ------------------------------------------------------------------------- */
/* data structure definitions */
OpenDoor(DOOR_OPEN_ALL);
#endif
- if (setup.sound_loops)
- PlaySoundExt(SND_FUEL, SOUND_MAX_VOLUME, SOUND_MAX_RIGHT, SND_CTRL_PLAY_LOOP);
-
for (i = 0; i <= num_init_game_frames; i++)
{
- if (!setup.sound_loops)
- PlaySoundStereo(SND_FUEL, SOUND_MAX_RIGHT);
+ if (i == num_init_game_frames)
+ StopSound_MM(SND_MM_GAME_LEVELTIME_CHARGING);
+ else if (setup.sound_loops)
+ PlaySoundLoop_MM(SND_MM_GAME_LEVELTIME_CHARGING);
+ else
+ PlaySound_MM(SND_MM_GAME_LEVELTIME_CHARGING);
game_mm.energy_left = native_mm_level.time * i / num_init_game_frames;
#endif
}
- if (setup.sound_loops)
- StopSound(SND_FUEL);
-
#if 0
if (setup.sound_music && num_bg_loops)
PlayMusic(level_nr % num_bg_loops);
EL_EMPTY);
}
+int map_action_MM_to_RND(int action_mm)
+{
+ /* all MM actions are defined to exactly match their RND counterparts */
+ return action_mm;
+}
+
+int map_sound_MM_to_RND(int sound_mm)
+{
+ switch (sound_mm)
+ {
+ case SND_MM_GAME_LEVELTIME_CHARGING:
+ return SND_GAME_LEVELTIME_CHARGING;
+
+ default:
+ return SND_UNDEFINED;
+ }
+}
+
int map_mm_wall_element(int element)
{
return (element >= EL_MM_STEEL_WALL_START &&
int map_element_RND_to_MM(int);
int map_element_MM_to_RND(int);
+int map_action_MM_to_RND(int);
+int map_sound_MM_to_RND(int);
int map_mm_wall_element(int);
int map_mm_wall_element_editor(int);