X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_sp%2FMainGameLoop.c;h=60a479db7c6ec9056ce2541e7743139efa34222d;hb=f7b79b71faf7e5fbe38df38d26d1156f3ba2f0ce;hp=e1f81f4ddedf7d1e953beaabfdc1c67c1d63a066;hpb=3c080c7b33b6dfcc6e0039b592c5f268535873e7;p=rocksndiamonds.git diff --git a/src/game_sp/MainGameLoop.c b/src/game_sp/MainGameLoop.c index e1f81f4d..60a479db 100644 --- a/src/game_sp/MainGameLoop.c +++ b/src/game_sp/MainGameLoop.c @@ -117,8 +117,15 @@ locRepeatMainGameLoop: // start repeating game loop LastFrame = Clock.TickNow(); // store the frame time #endif // never any additional code between here! + + + +#if 0 if (! NoDisplayFlag) // copy the BackBuffer(=Stage) to visible screen Stage.Blt(); +#endif + + // FS end of synchronization // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -279,11 +286,16 @@ locRepeatMainGameLoop: // start repeating game loop locExitMainGameLoop: -#if 0 +#if 1 printf("::: locExitMainGameLoop reached [%d]\n", LeadOutCounter); + printf("::: [KillMurphyFlag == %d]\n", KillMurphyFlag); #endif - +#if 1 + /* if the game is not won when reaching this point, then it is lost */ + if (!game_sp_info.LevelSolved) + game_sp_info.GameOver = TRUE; +#endif #if 1 return subMainGameLoop; @@ -569,9 +581,26 @@ int subCalculateScreenScrollPos() int ax, Ay; +#if 1 + int jump_pos = TILEX / 2; + + if (MurphyScreenXPos < -jump_pos) + { + MurphyScreenXPos = FieldWidth * TILEX + MurphyScreenXPos; + MurphyScreenYPos -= TILEY; + } + else if (MurphyScreenXPos >= FieldWidth * TILEX - jump_pos) + { + MurphyScreenXPos = MurphyScreenXPos - FieldWidth * TILEX; + MurphyScreenYPos += TILEY; + } +#endif + if (ExplosionShake != 0) { subGetRandomNumber(); + + // printf("::: ExplosionShake [%d]\n", FrameCounter); } {