git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1208 993157c7-ee19-0410-b2c4-bb4e9862e678

This commit is contained in:
beedee
2007-07-13 16:55:53 +00:00
parent 8ac1535e13
commit 289cc091bc
3 changed files with 15 additions and 10 deletions

View File

@@ -94,7 +94,7 @@ namespace OpenRa.Game
x1 = e.X;
y1 = e.Y;
scrollPos.X = Util.Constrain(scrollPos.X, new Range<float>(0, map.Width * 24 - ClientSize.Width));
scrollPos.X = Util.Constrain(scrollPos.X, new Range<float>(0, map.Width * 24 - ClientSize.Width + 128));
scrollPos.Y = Util.Constrain(scrollPos.Y, new Range<float>(0, map.Height * 24 - ClientSize.Height));
}
}
@@ -106,12 +106,14 @@ namespace OpenRa.Game
renderer.BeginFrame(r1, r2, scrollPos);
renderer.Device.EnableScissor(0, 0, ClientSize.Width - 128, ClientSize.Height);
terrain.Draw( ClientSize, scrollPos );
world.Draw(renderer,
new Range<float>(scrollPos.X, scrollPos.X + ClientSize.Width),
new Range<float>(scrollPos.Y, scrollPos.Y + ClientSize.Height));
renderer.Device.DisableScissor();
sidebar.Paint(ClientSize, scrollPos);
renderer.EndFrame();