X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=cad2e92e227f2601b9973dadeb66bac58a3f3f28;hb=1c857c9422067bbce410dcc32e64bc9605649e58;hp=ee52b55f5eb6f4b7395fa2724b2e022809d95484;hpb=0e5aef968a447e03002cbcc120df7555df624b85;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index ee52b55f..cad2e92e 100644 --- a/src/game.c +++ b/src/game.c @@ -4392,13 +4392,16 @@ void GameEnd() local_player->LevelSolved_GameEnd = TRUE; - CloseDoor(DOOR_CLOSE_1); + if (!global.use_envelope_request) + CloseDoor(DOOR_CLOSE_1); if (local_player->LevelSolved_SaveTape) { SaveTapeChecked(tape.level_nr); /* ask to save tape */ } + CloseDoor(DOOR_CLOSE_ALL); + if (level_editor_test_game) { game_status = GAME_MODE_MAIN; @@ -4433,6 +4436,9 @@ void GameEnd() { game_status = GAME_MODE_SCORES; + /* needed if different viewport properties defined for scores */ + ChangeViewportPropertiesIfNeeded(); + DrawHallOfFame(hi_pos); if (raise_level) @@ -11188,8 +11194,10 @@ void GameActions() } else { - GameActions_RND(); + GameActions_RND_Main(); } + + redraw_mask |= REDRAW_FIELD; } void GameActions_EM_Main() @@ -11224,6 +11232,13 @@ void GameActions_SP_Main() AdvanceFrameAndPlayerCounters(-1); /* advance counters for all players */ } +void GameActions_RND_Main() +{ + GameActions_RND(); + + BlitScreenToBitmap_RND(backbuffer); +} + void GameActions_RND() { int magic_wall_x = 0, magic_wall_y = 0; @@ -11802,16 +11817,16 @@ static boolean AllPlayersInVisibleScreen() void ScrollLevel(int dx, int dy) { - int softscroll_offset = (setup.soft_scrolling ? 2 * TILEX_VAR : 0); + int scroll_offset = 2 * TILEX_VAR; int x, y; BlitBitmap(drawto_field, drawto_field, - FX + TILEX_VAR * (dx == -1) - softscroll_offset, - FY + TILEY_VAR * (dy == -1) - softscroll_offset, - SXSIZE - TILEX_VAR * (dx != 0) + 2 * softscroll_offset, - SYSIZE - TILEY_VAR * (dy != 0) + 2 * softscroll_offset, - FX + TILEX_VAR * (dx == 1) - softscroll_offset, - FY + TILEY_VAR * (dy == 1) - softscroll_offset); + FX + TILEX_VAR * (dx == -1) - scroll_offset, + FY + TILEY_VAR * (dy == -1) - scroll_offset, + SXSIZE - TILEX_VAR * (dx != 0) + 2 * scroll_offset, + SYSIZE - TILEY_VAR * (dy != 0) + 2 * scroll_offset, + FX + TILEX_VAR * (dx == 1) - scroll_offset, + FY + TILEY_VAR * (dy == 1) - scroll_offset); if (dx != 0) { @@ -14998,18 +15013,22 @@ void MapUndoRedoButtons() { UnmapGameButtonsAtSamePosition(GAME_CTRL_ID_UNDO); UnmapGameButtonsAtSamePosition(GAME_CTRL_ID_REDO); + UnmapGameButtonsAtSamePosition(GAME_CTRL_ID_PLAY); MapGadget(game_gadget[GAME_CTRL_ID_UNDO]); MapGadget(game_gadget[GAME_CTRL_ID_REDO]); + MapGadget(game_gadget[GAME_CTRL_ID_PLAY]); } void UnmapUndoRedoButtons() { UnmapGadget(game_gadget[GAME_CTRL_ID_UNDO]); UnmapGadget(game_gadget[GAME_CTRL_ID_REDO]); + UnmapGadget(game_gadget[GAME_CTRL_ID_PLAY]); MapGameButtonsAtSamePosition(GAME_CTRL_ID_UNDO); MapGameButtonsAtSamePosition(GAME_CTRL_ID_REDO); + MapGameButtonsAtSamePosition(GAME_CTRL_ID_PLAY); } void MapGameButtons() @@ -15018,7 +15037,8 @@ void MapGameButtons() for (i = 0; i < NUM_GAME_BUTTONS; i++) if (i != GAME_CTRL_ID_UNDO && - i != GAME_CTRL_ID_REDO) + i != GAME_CTRL_ID_REDO && + i != GAME_CTRL_ID_PLAY) MapGadget(game_gadget[i]); } @@ -15128,10 +15148,7 @@ static void HandleGameButtonsExt(int id, int button) SendToServer_ContinuePlaying(); else #endif - { - tape.pausing = FALSE; - DrawVideoDisplay(VIDEO_STATE_PAUSE_OFF, 0); - } + TapeTogglePause(TAPE_TOGGLE_MANUAL); } break;