X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fcartoons.c;h=1d5373142b4a6fa18a90b2402383f5884f2570a3;hb=4b0c6356359ee52f98cee8fa578179c6c41d4ef1;hp=7cc59d1a05454557a136b2b6629c245993a87473;hpb=33df7a5ca87e883c2b718171fd7d05c22fc0353f;p=rocksndiamonds.git diff --git a/src/cartoons.c b/src/cartoons.c index 7cc59d1a..1d537314 100644 --- a/src/cartoons.c +++ b/src/cartoons.c @@ -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,12 +139,24 @@ void HandleAnimation(int mode) SetDrawtoField(DRAW_DIRECT); } + 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, + SX,SY); + } + return; break; case ANIM_CONTINUE: break; case ANIM_STOP: - redraw_mask |= REDRAW_FIELD; + redraw_mask |= (REDRAW_FIELD | REDRAW_FROM_BACKBUFFER); /* Redraw background even when in direct drawing mode */ draw_mode = direct_draw_on;