Route screen size queries via Game.Renderer.

This commit is contained in:
Paul Chote
2013-09-20 00:09:05 +12:00
parent 65bbfbaef2
commit b7123cda7d
14 changed files with 49 additions and 54 deletions

View File

@@ -48,7 +48,7 @@ namespace OpenRA.Graphics
{
int verticesPerRow = 4*map.Bounds.Width;
int visibleRows = (int)(viewport.Height * 1f / Game.CellSize / viewport.Zoom + 2);
int visibleRows = (int)(Game.Renderer.Resolution.Height * 1f / Game.CellSize / viewport.Zoom + 2);
int firstRow = (int)(viewport.Location.Y * 1f / Game.CellSize - map.Bounds.Top);
int lastRow = firstRow + visibleRows;