hedgewars/uStore.pas
changeset 4385 f679ffa2dc8c
parent 4380 b78638b36b89
child 4390 f219628ed666
--- a/hedgewars/uStore.pas	Sat Nov 20 22:05:01 2010 +0300
+++ b/hedgewars/uStore.pas	Sat Nov 20 23:08:11 2010 +0300
@@ -27,7 +27,6 @@
 
 procedure StoreLoad;
 procedure StoreRelease;
-procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real);
 procedure RenderHealth(var Hedgehog: THedgehog);
 procedure AddProgress;
 procedure FinishProgress;
@@ -44,8 +43,7 @@
 
 type TGPUVendor = (gvUnknown, gvNVIDIA, gvATI, gvIntel, gvApple);
 
-var HHTexture: PTexture;
-    MaxTextureSize: LongInt;
+var MaxTextureSize: LongInt;
     cGPUVendor: TGPUVendor;
 
 function WriteInRect(Surface: PSDL_Surface; X, Y: LongInt; Color: LongWord; Font: THWFont; s: ansistring): TSDL_Rect;
@@ -363,57 +361,6 @@
 {$ENDIF}
 end;
 
-procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real);
-const VertexBuffer: array [0..3] of TVertex2f = (
-        (x: -16; y: -16),
-        (x:  16; y: -16),
-        (x:  16; y:  16),
-        (x: -16; y:  16));
-var l, r, t, b: real;
-    TextureBuffer: array [0..3] of TVertex2f;
-begin
-// don't draw anything outside the visible screen space (first check fixes some sprite drawing, e.g. hedgehogs)
-if (abs(X) > 32) and ((abs(X) - 16) * cScaleFactor > cScreenWidth) then
-    exit;
-if (abs(Y) > 32) and ((abs(Y - 0.5 * cScreenHeight) - 16) * cScaleFactor > cScreenHeight) then
-    exit;
-
-t:= Pos * 32 / HHTexture^.h;
-b:= (Pos + 1) * 32 / HHTexture^.h;
-
-if Dir = -1 then
-   begin
-   l:= (Step + 1) * 32 / HHTexture^.w;
-   r:= Step * 32 / HHTexture^.w
-   end else
-   begin
-   l:= Step * 32 / HHTexture^.w;
-   r:= (Step + 1) * 32 / HHTexture^.w
-   end;
-
-
-glPushMatrix();
-glTranslatef(X, Y, 0);
-glRotatef(Angle, 0, 0, 1);
-
-glBindTexture(GL_TEXTURE_2D, HHTexture^.id);
-
-TextureBuffer[0].X:= l;
-TextureBuffer[0].Y:= t;
-TextureBuffer[1].X:= r;
-TextureBuffer[1].Y:= t;
-TextureBuffer[2].X:= r;
-TextureBuffer[2].Y:= b;
-TextureBuffer[3].X:= l;
-TextureBuffer[3].Y:= b;
-
-glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]);
-glTexCoordPointer(2, GL_FLOAT, 0, @TextureBuffer[0]);
-glDrawArrays(GL_TRIANGLE_FAN, 0, Length(VertexBuffer));
-
-glPopMatrix
-end;
-
 procedure StoreRelease;
 var ii: TSprite;
 begin