From bb19976b48f6c44f7d7cd1fb63bbb83fbb7d1638 Mon Sep 17 00:00:00 2001 From: chrisf Date: Tue, 10 Jul 2007 03:18:21 +0000 Subject: [PATCH] git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1147 993157c7-ee19-0410-b2c4-bb4e9862e678 --- OpenRa.Game/MainWindow.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRa.Game/MainWindow.cs b/OpenRa.Game/MainWindow.cs index c913a1cce2..7994db9e14 100644 --- a/OpenRa.Game/MainWindow.cs +++ b/OpenRa.Game/MainWindow.cs @@ -70,7 +70,7 @@ namespace OpenRa.Game float U(SheetRectangle s, float u) { - float u0 = (float)s.origin.X / (float)s.sheet.bitmap.Width; + float u0 = (float)(s.origin.X + 0.5f) / (float)s.sheet.bitmap.Width; float u1 = (float)(s.origin.X + s.size.Width) / (float)s.sheet.bitmap.Width; return (u > 0) ? u1 : u0;// (1 - u) * u0 + u * u1; @@ -78,7 +78,7 @@ namespace OpenRa.Game float V(SheetRectangle s, float v) { - float v0 = (float)s.origin.Y / (float)s.sheet.bitmap.Height; + float v0 = (float)(s.origin.Y + 0.5f) / (float)s.sheet.bitmap.Height; float v1 = (float)(s.origin.Y + s.size.Height) / (float)s.sheet.bitmap.Height; return (v > 0) ? v1 : v0;// return (1 - v) * v0 + v * v1;