X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_sp%2FMainGameLoop.c;h=48a1ac480480d7f726566432518004d3db5b7061;hb=61c3da024802ecc0268bab42d7499fc0346e4fd3;hp=2a6d25515b21287fff51ec4edb236d1f1f8e7525;hpb=41def9c1d8c6939b8754fdab43579272e49d4da4;p=rocksndiamonds.git diff --git a/src/game_sp/MainGameLoop.c b/src/game_sp/MainGameLoop.c index 2a6d2551..48a1ac48 100644 --- a/src/game_sp/MainGameLoop.c +++ b/src/game_sp/MainGameLoop.c @@ -51,6 +51,11 @@ void subMainGameLoop_Main(byte action, boolean warp_mode) TimerVar = TimerVar + 1; +#if 1 + if (ExplosionShakeMurphy > 0) + ExplosionShakeMurphy--; +#endif + #if 1 if (ExitToMenuFlag == 1) { @@ -84,7 +89,7 @@ void subMainGameLoop_Main(byte action, boolean warp_mode) locExitMainGameLoop: #endif -#if 1 +#if 0 printf("::: locExitMainGameLoop reached [%d]\n", LeadOutCounter); printf("::: [KillMurphyFlag == %d]\n", KillMurphyFlag); #endif @@ -98,11 +103,10 @@ locExitMainGameLoop: void subCalculateScreenScrollPos() { - int ax, ay; - #if 1 int jump_pos = TILEX / 2; + /* handle wrap-around */ if (MurphyScreenXPos < -jump_pos) { MurphyScreenXPos = FieldWidth * TILEX + MurphyScreenXPos; @@ -122,17 +126,6 @@ void subCalculateScreenScrollPos() // printf("::: ExplosionShake [%d]\n", FrameCounter); } -#if 1 - ax = (SCR_FIELDX / 2) * TILESIZE; - ay = (SCR_FIELDY / 2) * TILESIZE; - - ScreenScrollXPos = MurphyScreenXPos - ax; - ScreenScrollYPos = MurphyScreenYPos - ay; -#else - ax = SXSIZE / 2; - ay = SYSIZE / 2; - - ScreenScrollXPos = (MurphyScreenXPos + TILEX / 2) - ax; - ScreenScrollYPos = (MurphyScreenYPos + TILEY / 2) - ay; -#endif + ScreenScrollXPos = MurphyScreenXPos - (SCR_FIELDX / 2) * TILESIZE; + ScreenScrollYPos = MurphyScreenYPos - (SCR_FIELDY / 2) * TILESIZE; }