From 59151449d9cbdb719b15c37a07bbf77b33888549 Mon Sep 17 00:00:00 2001 From: Ketmar Dark Date: Fri, 26 Jan 2018 20:38:34 +0200 Subject: [PATCH] nail the sky on scaled small levels (actually, better sky moving in non-standard scales) --- src/game/g_game.pas | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.29.2