From f218d212ff389d5abf9d8afad495246ddc3325cc Mon Sep 17 00:00:00 2001 From: chrisf Date: Tue, 25 Mar 2008 00:48:07 +0000 Subject: [PATCH] git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1954 993157c7-ee19-0410-b2c4-bb4e9862e678 --- OpenRa.Game/Sprite.cs | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/OpenRa.Game/Sprite.cs b/OpenRa.Game/Sprite.cs index 4c19614c2a..7c978c3314 100644 --- a/OpenRa.Game/Sprite.cs +++ b/OpenRa.Game/Sprite.cs @@ -29,22 +29,15 @@ namespace OpenRa.Game uvhax = new float2[] { - MapTextureCoords( new float2(0,0) ), - MapTextureCoords( new float2(1,0) ), - MapTextureCoords( new float2(0,1) ), - MapTextureCoords( new float2(1,1) ), + new float2( uv.Left, uv.Top ), + new float2( uv.Right, uv.Top ), + new float2( uv.Left, uv.Bottom ), + new float2( uv.Right, uv.Bottom ), }; this.size = new float2(bounds.Size); } - public float2 MapTextureCoords(float2 p) - { - return new float2( - p.X > 0 ? uv.Right : uv.Left, - p.Y > 0 ? uv.Bottom : uv.Top); - } - public float2 FastMapTextureCoords(int k) { return uvhax[k];