Moved footprint info onto its building.

This commit is contained in:
Bob
2009-10-20 23:55:57 +13:00
parent 6c0ced3e9a
commit cfa56a791d
16 changed files with 607 additions and 385 deletions

View File

@@ -24,13 +24,15 @@ namespace OpenRa.Game.Graphics
public void Scroll(float2 delta)
{
scrollPosition = (scrollPosition + delta).Constrain(float2.Zero, mapSize);
scrollPosition = ( scrollPosition + delta ).Constrain( float2.Zero, mapSize );
}
public Viewport(float2 size, float2 mapSize, Renderer renderer)
{
this.size = size;
this.mapSize = Game.CellSize * mapSize - size + new float2(128, 0);
if( this.mapSize.X < 0 ) this.mapSize.X = 0;
if( this.mapSize.Y < 0 ) this.mapSize.Y = 0;
this.renderer = renderer;
cursorRenderer = new SpriteRenderer(renderer, true);
}