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);
laser.redraw = TRUE;
}
-void ClickElement(int mx, int my, int button)
+void ClickElement(int x, int y, int button)
{
static unsigned int click_delay = 0;
static int click_delay_value = CLICK_DELAY_SHORT;
static boolean new_button = TRUE;
int element;
- int x = (mx - SX) / TILEX, y = (my - SY) / TILEY;
/* do not rotate objects hit by the laser after the game was solved */
if (game_mm.level_solved && Hit[x][y])
if (button == MB_MIDDLEBUTTON) /* middle button has no function */
return;
- if (!IN_PIX_FIELD(mx - SX, my - SY))
+ if (!IN_LEV_FIELD(x, y))
return;
if (Feld[x][y] == EL_EMPTY)
}
}
-static void GameActions_MM_Ext(byte action[MAX_PLAYERS], boolean warp_mode)
+static void GameActions_MM_Ext(struct MouseActionInfo action, boolean warp_mode)
{
static unsigned int action_delay = 0;
static unsigned int pacman_delay = 0;
return;
}
-void GameActions_MM(byte action[MAX_PLAYERS], boolean warp_mode)
+void GameActions_MM(struct MouseActionInfo action, boolean warp_mode)
{
- if (!button_status)
- ClickElement(0, 0, MB_NOT_PRESSED);
+ ClickElement(action.lx, action.ly, action.button);
GameActions_MM_Ext(action, warp_mode);
}