DEADSOFTWARE

nail the sky on scaled small levels (actually, better sky moving in non-standard...
authorKetmar Dark <ketmar@ketmar.no-ip.org>
Fri, 26 Jan 2018 18:38:34 +0000 (20:38 +0200)
committerKetmar Dark <ketmar@ketmar.no-ip.org>
Fri, 26 Jan 2018 18:39:38 +0000 (20:39 +0200)
src/game/g_game.pas

index 4e33cad10f28e10a42aeb2709acff3725a37abbd..fcb43f319d324f9cf568c3d6abd04837aabd3ebe 100644 (file)
@@ -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;