hedgewars/uWorld.pas
changeset 10319 240775460dc5
parent 10318 c2e81eea375f
child 10320 0f9ad60f738c
equal deleted inserted replaced
10318:c2e81eea375f 10319:240775460dc5
  1483     VertexBuffer: array [0..3] of TVertex2f;
  1483     VertexBuffer: array [0..3] of TVertex2f;
  1484 begin
  1484 begin
  1485 ScreenBottom:= (WorldDy - trunc(cScreenHeight/cScaleFactor) - (cScreenHeight div 2) + cWaterLine);
  1485 ScreenBottom:= (WorldDy - trunc(cScreenHeight/cScaleFactor) - (cScreenHeight div 2) + cWaterLine);
  1486 
  1486 
  1487 // note: offsetY is negative!
  1487 // note: offsetY is negative!
  1488 offsetY:= 5 * max(-145,min(0, CWaterLine + WorldDy - ViewBottomY)); //10 * Min(0, -145 - ScreenBottom);
  1488 offsetY:= 10 *  Min(0, -145 - ScreenBottom); // TODO limit this in the other direction too
  1489 
  1489 
  1490 if (cReducedQuality and rqNoBackground) = 0 then
  1490 if (cReducedQuality and rqNoBackground) = 0 then
  1491     begin
  1491     begin
  1492         // Offsets relative to camera - spare them to wimpier cpus, no bg or flakes for them anyway
  1492         // Offsets relative to camera - spare them to wimpier cpus, no bg or flakes for them anyway
  1493         SkyOffset:= offsetY div 35 + cWaveHeight;
  1493         SkyOffset:= offsetY div 35 + cWaveHeight;