X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=fbaccc24f0d04bdff5a5f8a33fa7d002435dbd54;hb=1d5a33fc89d071c8e8a242ff3b51258f1b6b0e1e;hp=ec95ff6dcf71d38bed26507ac7ee088a04a5e998;hpb=95d786b6fe8474c30a22f839751e0d04c7682ded;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index ec95ff6d..fbaccc24 100644 --- a/src/game.c +++ b/src/game.c @@ -389,7 +389,9 @@ void InitGame() ScreenMovPos = 0; ScreenGfxPos = 0; - AllPlayersGone = SiebAktiv = FALSE; + AllPlayersGone = FALSE; + SiebAktiv = FALSE; + SiebCount = 0; for (i=0; i 0) { - for (y=0; y0 && TimeFrames>=(1000/GameFrameDelay) && !tape.pausing) + if (TimeLeft > 0 && TimeFrames >= (1000 / GameFrameDelay) && !tape.pausing) { TimeFrames = 0; TimeLeft--; @@ -3610,7 +3631,7 @@ boolean MoveFigureOneStep(struct PlayerInfo *player, jy = player->jy = new_jy; StorePlayer[jx][jy] = player->element_nr; - player->MovPos = (dx > 0 || dy > 0 ? -1 : 1) * 7*TILEX/8; + player->MovPos = (dx > 0 || dy > 0 ? -1 : 1) * (TILEX - TILEX / MoveSpeed); ScrollFigure(player, SCROLL_INIT); @@ -3634,10 +3655,15 @@ boolean MoveFigure(struct PlayerInfo *player, int dx, int dy) /* should only happen if pre-1.2 tape recordings are played */ /* this is only for backward compatibility */ + int old_move_speed = MoveSpeed; + #if DEBUG printf("THIS SHOULD ONLY HAPPEN WITH PRE-1.2 LEVEL TAPES.\n"); #endif + /* scroll remaining steps with finest movement resolution */ + MoveSpeed = 8; + while (player->MovPos) { ScrollFigure(player, SCROLL_GO_ON); @@ -3646,6 +3672,8 @@ boolean MoveFigure(struct PlayerInfo *player, int dx, int dy) DrawAllPlayers(); BackToFront(); } + + MoveSpeed = old_move_speed; } if (player->last_move_dir & (MV_LEFT | MV_RIGHT)) @@ -3780,7 +3808,7 @@ void ScrollFigure(struct PlayerInfo *player, int mode) else if (!FrameReached(&player->actual_frame_counter, 1)) return; - player->MovPos += (player->MovPos > 0 ? -1 : 1) * TILEX/8; + player->MovPos += (player->MovPos > 0 ? -1 : 1) * TILEX / MoveSpeed; player->GfxPos = ScrollStepSize * (player->MovPos / ScrollStepSize); if (Feld[last_jx][last_jy] == EL_PLAYER_IS_LEAVING) @@ -3820,7 +3848,7 @@ void ScrollScreen(struct PlayerInfo *player, int mode) if (ScreenMovPos) { - ScreenMovPos += (ScreenMovPos > 0 ? -1 : 1) * TILEX/8; + ScreenMovPos += (ScreenMovPos > 0 ? -1 : 1) * TILEX / MoveSpeed; ScreenGfxPos = ScrollStepSize * (ScreenMovPos / ScrollStepSize); redraw_mask |= REDRAW_FIELD; }