rnd-20100418-1-src
[rocksndiamonds.git] / src / game_sp / MainGameLoop.c
index 2a6d25515b21287fff51ec4edb236d1f1f8e7525..b72852921178bfc94c229f60176ddd92ade58401 100644 (file)
@@ -98,11 +98,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 +121,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;
 }