X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_sp%2FMainForm.c;fp=src%2Fgame_sp%2FMainForm.c;h=d2e401b049abaaf13977807ffa858ddbe97e288a;hb=1d3eff06cde10309320341fa92abec5b14f1c6f6;hp=c54bf63d21a3dbfd774b58b12ccd38dda746d2ce;hpb=c60227514289cd7d512539785bb2fe47d30db51a;p=rocksndiamonds.git diff --git a/src/game_sp/MainForm.c b/src/game_sp/MainForm.c index c54bf63d..d2e401b0 100644 --- a/src/game_sp/MainForm.c +++ b/src/game_sp/MainForm.c @@ -187,14 +187,23 @@ static void ReStretch() void SetScrollEdges() { +#if NEW_TILESIZE + int pseudo_sxsize = SXSIZE * TILESIZE / TILESIZE_VAR; + int pseudo_sysize = SYSIZE * TILESIZE / TILESIZE_VAR; +#endif int border1_offset = (menBorder ? 1 : 2); int border2_offset = (menBorder ? 0 : TILESIZE / 2); /* scroll correction for border frame (1 tile) or border element (2 tiles) */ ScrollMinX = 0; ScrollMinY = 0; +#if NEW_TILESIZE + ScrollMaxX = (DisplayMaxX + border1_offset) * TILEX - pseudo_sxsize; + ScrollMaxY = (DisplayMaxY + border1_offset) * TILEY - pseudo_sysize; +#else ScrollMaxX = (DisplayMaxX + border1_offset) * TILEX - SXSIZE; ScrollMaxY = (DisplayMaxY + border1_offset) * TILEY - SYSIZE; +#endif /* scroll correction for border element (half tile on left and right side) */ ScrollMinX += border2_offset;