rnd-20100220-1-src
[rocksndiamonds.git] / src / game_sp / MainGameLoop.c
index bae1d6d95d4aa886acbca1a8586bacae1bd36874..028c861e03a5741f44a9eccff4d84465340cfed1 100644 (file)
@@ -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
   // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -286,8 +293,8 @@ locExitMainGameLoop:
 
 #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;
+  if (!game_sp.LevelSolved)
+    game_sp.GameOver = TRUE;
 #endif
 
 #if 1
@@ -574,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);
   }
 
   {