SetGameStatus(GAME_MODE_PLAYING);
if (level_editor_test_game)
- FadeSkipNextFadeIn();
+ FadeSkipNextFadeOut();
else
FadeSetEnterScreen();
ExpireSoundLoops(TRUE);
- if (!level_editor_test_game)
- FadeOut(fade_mask);
+ FadeOut(fade_mask);
+
+ if (level_editor_test_game)
+ FadeSkipNextFadeIn();
// needed if different viewport properties defined for playing
ChangeViewportPropertiesIfNeeded();
DrawAllPlayers();
PlayAllPlayersSound();
- if (local_player->show_envelope != 0 && (!local_player->active ||
- local_player->MovPos == 0))
+ for (i = 0; i < MAX_PLAYERS; i++)
{
- ShowEnvelope(local_player->show_envelope - EL_ENVELOPE_1);
+ struct PlayerInfo *player = &stored_player[i];
+
+ if (player->show_envelope != 0 && (!player->active ||
+ player->MovPos == 0))
+ {
+ ShowEnvelope(player->show_envelope - EL_ENVELOPE_1);
- local_player->show_envelope = 0;
+ player->show_envelope = 0;
+ }
}
// use random number generator in every frame to make it less predictable
}
else
{
- int offset = game.scroll_delay_value;
+ int offset_raw = game.scroll_delay_value;
if (jx != old_jx) // player has moved horizontally
{
+ int offset = MIN(offset_raw, (SCR_FIELDX - 2) / 2);
int offset_x = offset * (player->MovDir == MV_LEFT ? +1 : -1);
int new_scroll_x = jx - MIDPOSX + offset_x;
}
else // player has moved vertically
{
+ int offset = MIN(offset_raw, (SCR_FIELDY - 2) / 2);
int offset_y = offset * (player->MovDir == MV_UP ? +1 : -1);
int new_scroll_y = jy - MIDPOSY + offset_y;
MapGadget(game_gadget[GAME_CTRL_ID_UNDO]);
MapGadget(game_gadget[GAME_CTRL_ID_REDO]);
-
- ModifyGadget(game_gadget[GAME_CTRL_ID_PAUSE2], GDI_CHECKED, TRUE, GDI_END);
}
void UnmapUndoRedoButtons(void)
MapGameButtonsAtSamePosition(GAME_CTRL_ID_UNDO);
MapGameButtonsAtSamePosition(GAME_CTRL_ID_REDO);
+}
+
+void ModifyPauseButtons(void)
+{
+ static int ids[] =
+ {
+ GAME_CTRL_ID_PAUSE,
+ GAME_CTRL_ID_PAUSE2,
+ GAME_CTRL_ID_PANEL_PAUSE,
+ -1
+ };
+ int i;
- ModifyGadget(game_gadget[GAME_CTRL_ID_PAUSE2], GDI_CHECKED, FALSE, GDI_END);
+ for (i = 0; ids[i] > -1; i++)
+ ModifyGadget(game_gadget[ids[i]], GDI_CHECKED, tape.pausing, GDI_END);
}
static void MapGameButtonsExt(boolean on_tape)
for (i = 0; i < NUM_GAME_BUTTONS; i++)
if (!on_tape || gamebutton_info[i].allowed_on_tape)
RedrawGadget(game_gadget[i]);
-
- // RedrawGadget() may have set REDRAW_ALL if buttons are defined off-area
- redraw_mask &= ~REDRAW_ALL;
}
static void SetGadgetState(struct GadgetInfo *gi, boolean state)