diff -r a26537586400 -r e6c0408b54ed hedgewars/uStore.pas --- a/hedgewars/uStore.pas Sun Mar 23 18:08:00 2008 +0000 +++ b/hedgewars/uStore.pas Mon Mar 24 19:18:13 2008 +0000 @@ -36,7 +36,7 @@ procedure DXOutText(X, Y: LongInt; Font: THWFont; s: string; Surface: PSDL_Surface); procedure DrawCentered(X, Top: LongInt; Source: PTexture); procedure DrawFromRect(X, Y: LongInt; r: PSDL_Rect; SourceTexture: PTexture; DestSurface: PSDL_Surface); -procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Surface: PSDL_Surface); +procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real); function RenderStringTex(s: string; Color: Longword; font: THWFont): PTexture; procedure RenderHealth(var Hedgehog: THedgehog); procedure AddProgress; @@ -471,7 +471,7 @@ DrawTexture(X - Source^.w div 2, Top, Source) end; -procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Surface: PSDL_Surface); +procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real); var l, r, t, b: real; begin @@ -488,23 +488,30 @@ r:= (Step + 1) * 32 / HHTexture^.w end; + +glPushMatrix(); +glTranslatef(X, Y, 0); +glRotatef(Angle, 0, 0, 1); + glBindTexture(GL_TEXTURE_2D, HHTexture^.id); glBegin(GL_QUADS); glTexCoord2f(l, t); -glVertex2i(X, Y); +glVertex2i(-16, -16); glTexCoord2f(r, t); -glVertex2i(32 + X, Y); +glVertex2i(16, -16); glTexCoord2f(r, b); -glVertex2i(32 + X, 32 + Y); +glVertex2i(16, 16); glTexCoord2f(l, b); -glVertex2i(X, 32 + Y); +glVertex2i(-16, 16); -glEnd() +glEnd(); + +glPopMatrix end; procedure StoreRelease;