fixing a pile of stupid texel-offset-related bugs

This commit is contained in:
Chris Forbes
2010-01-06 10:08:53 +13:00
parent 72605ebfc8
commit e82107b69b
2 changed files with 4 additions and 7 deletions

View File

@@ -19,10 +19,10 @@ namespace OpenRa.Game.Graphics
this.channel = channel; this.channel = channel;
uv = new RectangleF( uv = new RectangleF(
(float)(bounds.Left + 0.5f) / sheet.Size.Width, (float)(bounds.Left + .5f) / sheet.Size.Width,
(float)(bounds.Top + 0.5f) / sheet.Size.Height, (float)(bounds.Top + .5f) / sheet.Size.Height,
(float)(bounds.Width) / sheet.Size.Width, (float)(bounds.Width - .5f) / sheet.Size.Width,
(float)(bounds.Height) / sheet.Size.Height); (float)(bounds.Height - .5f) / sheet.Size.Height);
uvhax = new float2[] uvhax = new float2[]
{ {

View File

@@ -90,9 +90,6 @@ namespace OpenRa.Game
Game.CellSize * new float2(starti, j), Game.CellSize * new float2(starti, j),
PaletteType.Shroud, PaletteType.Shroud,
new float2(Game.CellSize * (i - starti), Game.CellSize)); new float2(Game.CellSize * (i - starti), Game.CellSize));
r.DrawSprite(sprites[i-1, j],
Game.CellSize * new float2(i-1, j),
PaletteType.Shroud);
starti = i+1; starti = i+1;
} }