rnd-19980915
[rocksndiamonds.git] / src / cartoons.c
index 1c193f6f689ae3b334210ee8ed3c04b27530df27..1d5373142b4a6fa18a90b2402383f5884f2570a3 100644 (file)
@@ -125,7 +125,7 @@ void HandleAnimation(int mode)
       reset_delay = TRUE;
 
       /* Fill empty backbuffer for animation functions */
-      if (direct_draw_on && game_status==PLAYING)
+      if (direct_draw_on && game_status == PLAYING)
       {
        int xx,yy;
 
@@ -139,10 +139,17 @@ void HandleAnimation(int mode)
        SetDrawtoField(DRAW_DIRECT);
       }
 
-      if (soft_scrolling_on && game_status==PLAYING)
+      if (soft_scrolling_on && game_status == PLAYING)
+      {
+       int fx = FX, fy = FY;
+
+        fx += (PlayerMovDir & (MV_LEFT|MV_RIGHT) ? ScreenMovPos : 0);
+        fy += (PlayerMovDir & (MV_UP|MV_DOWN)    ? ScreenMovPos : 0);
+
        XCopyArea(display,fieldbuffer,backbuffer,gc,
-                 FX,FY, SXSIZE,SYSIZE,
+                 fx,fy, SXSIZE,SYSIZE,
                  SX,SY);
+      }
 
       return;
       break;