From: Ketmar Dark Date: Fri, 26 Jan 2018 18:38:34 +0000 (+0200) Subject: nail the sky on scaled small levels (actually, better sky moving in non-standard... X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=59151449d9cbdb719b15c37a07bbf77b33888549;p=d2df-sdl.git nail the sky on scaled small levels (actually, better sky moving in non-standard scales) --- diff --git a/src/game/g_game.pas b/src/game/g_game.pas index 4e33cad..fcb43f3 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -3336,6 +3336,9 @@ begin if (sY+sHeight > gMapInfo.Height) then sY := gMapInfo.Height-sHeight; if (sX < 0) then sX := 0; if (sY < 0) then sY := 0; + + if (gBackSize.X <= gPlayerScreenSize.X) or (gMapInfo.Width <= sWidth) then c := 0 else c := trunc((gBackSize.X-gPlayerScreenSize.X)*sX/(gMapInfo.Width-sWidth)); + if (gBackSize.Y <= gPlayerScreenSize.Y) or (gMapInfo.Height <= sHeight) then d := 0 else d := trunc((gBackSize.Y-gPlayerScreenSize.Y)*sY/(gMapInfo.Height-sHeight)); end; p.viewPortX := sX; p.viewPortY := sY;