X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fgame_sp%2FMainGameLoop.c;h=ddf3d4e236b9317f80918bb03c2ae2645984a8d1;hb=0d95c7df5f708c3f30e10cab3894082019f8cd6c;hp=b4a91d006f98a80db10eb77fbad667a2988256c0;hpb=1533b136c6f8d0656cc45ca4c204104ef3d75249;p=rocksndiamonds.git diff --git a/src/game_sp/MainGameLoop.c b/src/game_sp/MainGameLoop.c index b4a91d00..ddf3d4e2 100644 --- a/src/game_sp/MainGameLoop.c +++ b/src/game_sp/MainGameLoop.c @@ -35,12 +35,20 @@ int subMainGameLoop() if (DemoFlag != 0) { +#if 1 + printf("::: playing demo ...\n"); +#endif + // EP set level success byte: demo, not game WasDemoFlag = 1; EP_GameDemoVar0DAA = 0; // demo } else // loc_g_1836: { +#if 1 + printf("::: playing game ...\n"); +#endif + // EP set level success byte: game, not demo WasDemoFlag = 0; EP_GameDemoVar0DAA = 1; // game @@ -138,8 +146,16 @@ locRepeatMainGameLoop: // start repeating game loop // ---------------------------------------------------------------------------- // +#if 0 + printf("::: >>>>>>>>>> MainGameLoop.c: subDoGameStuff() START\n"); +#endif + subDoGameStuff(); // do all game stuff +#if 0 + printf("::: <<<<<<<<<< MainGameLoop.c: subDoGameStuff() END\n"); +#endif + // // ---------------------------------------------------------------------------- @@ -158,7 +174,13 @@ locRepeatMainGameLoop: // start repeating game loop data_h_Ytmp = ScreenScrollYPos; // copy Y for next soft scroll data_h_Xtmp = ScreenScrollXPos; // copy X for next soft scroll if ((! UserDragFlag) && AutoScrollFlag) + { +#if 0 + printf("::: MainGameLoop.c: subMainGameLoop(): %d, %d\n", ScreenScrollXPos, ScreenScrollYPos); +#endif + ScrollTowards(ScreenScrollXPos, ScreenScrollYPos); + } if (ForcedExitFlag != 0) // Forced Exit?' yes--exit! goto locExitMainGameLoop; @@ -249,8 +271,13 @@ int subCalculateScreenScrollPos() Ay = MainForm.picPane.Height / 2; } +#if 1 + ScreenScrollXPos = Stretch * (MurphyScreenXPos + 16) - ax; + ScreenScrollYPos = Stretch * (MurphyScreenYPos + 16) - Ay; +#else ScreenScrollXPos = Stretch * (MurphyScreenXPos + 8) - ax; ScreenScrollYPos = Stretch * (MurphyScreenYPos + 8) - Ay; +#endif #if 0 printf("::: MainGameLoop.c: subCalculateScreenScrollPos(): %d, %d [%d, %d] -> %d, %d\n",