X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fgame_sp%2FDDScrollBuffer.c;h=792648d4d79430d7723644659cd9f09b161d83b1;hp=80cddf0d7e745c733bec2879a954f0b29e3ba20a;hb=475d747d7f6122bf9b62ccf1518fc7e8fc0f201c;hpb=97fb6c2a140f361991541bcf5a5c1e5d18deaf74 diff --git a/src/game_sp/DDScrollBuffer.c b/src/game_sp/DDScrollBuffer.c index 80cddf0d..792648d4 100644 --- a/src/game_sp/DDScrollBuffer.c +++ b/src/game_sp/DDScrollBuffer.c @@ -227,7 +227,7 @@ void BlitScreenToBitmap_SP(Bitmap *target_bitmap) int py = 2 * TILEY + (mScrollY - mScrollY_last) % TILEY; int sx, sy, sxsize, sysize; -#if 1 +#if 0 printf("::: %d, %d / %d, %d / %ld, %ld (%ld, %ld) / %d, %d\n", MurphyScreenXPos, MurphyScreenYPos, ScreenScrollXPos, ScreenScrollYPos, @@ -246,40 +246,9 @@ void BlitScreenToBitmap_SP(Bitmap *target_bitmap) sx = SX + (full_xsize < xsize ? (xsize - full_xsize) / 2 : 0); sy = SY + (full_ysize < ysize ? (ysize - full_ysize) / 2 : 0); -#if 1 -#if 1 - { - px += game_sp.scroll_xoffset; - py += game_sp.scroll_yoffset; - } -#else - if (1) - { - px += TILEX / 2; - py += TILEY / 2; - } -#endif -#else -#if 1 - if (0 && !menBorder) - { - if (mScrollX < ScrollMinX + TILEX / 2) - px += ScrollMinX + TILEX / 2 - mScrollX; - else if (mScrollX > ScrollMaxX - TILEX / 2) - px -= mScrollX - (ScrollMaxX - TILEX / 2); - if (mScrollY < ScrollMinY + TILEY / 2) - py += ScrollMinY + TILEY / 2 - mScrollY; - else if (mScrollY > ScrollMaxY - TILEY / 2) - py -= mScrollY - (ScrollMaxY - TILEY / 2); - } -#else - if (!menBorder) - { - px += TILEX / 2; - py += TILEY / 2; - } -#endif -#endif + /* scroll correction for even number of visible tiles (half tile shifted) */ + px += game_sp.scroll_xoffset; + py += game_sp.scroll_yoffset; BlitBitmap(bitmap_db_field_sp, target_bitmap, px, py, sxsize, sysize, sx, sy); }