Merge branch 'master' of git://github.com/chrisforbes/OpenRA

This commit is contained in:
Paul Chote
2010-01-03 21:52:17 +13:00
6 changed files with 30 additions and 25 deletions

View File

@@ -40,6 +40,8 @@ namespace OpenRa.Game
readonly int paletteColumns;
readonly int2 paletteOrigin;
const int MinRows = 4;
public Chrome(Renderer r)
{
@@ -96,7 +98,7 @@ namespace OpenRa.Game
cantBuild = new Animation("clock");
cantBuild.PlayFetchIndex("idle", () => 0);
digitSprites = OpenRa.Game.Graphics.Util.MakeArray(10, a => a)
digitSprites = Graphics.Util.MakeArray(10, a => a)
.Select(n => new Sprite(specialBin, new Rectangle(32 + 13 * n, 0, 13, 17), TextureChannel.Alpha)).ToList();
shimSprites = new[]
@@ -408,7 +410,7 @@ namespace OpenRa.Game
if (++x == columns) { x = 0; y++; }
}
while (x != 0)
while (x != 0 || y < MinRows)
{
var rect = new Rectangle(origin.X + x * 64, origin.Y + 48 * y, 64, 48);
var drawPos = Game.viewport.Location + new float2(rect.Location);