Support custom zoom levels

This commit is contained in:
Paul Chote
2011-06-03 20:23:21 +12:00
parent 926b396605
commit fc783ddf80
12 changed files with 55 additions and 55 deletions

View File

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