Engine:
* Fixed sometimes broken drawing of static graves (clamping issue?)
* Removed the (now obsolete) DrawSurfSprite from uStore
--- a/hedgewars/uGears.pas Mon Feb 22 05:50:29 2010 +0000
+++ b/hedgewars/uGears.pas Mon Feb 22 10:56:43 2010 +0000
@@ -1527,7 +1527,7 @@
gtHealthTag: if Gear^.Tex <> nil then DrawCentered(hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.Tex);
- gtGrave: DrawSurfSprite(hwRound(Gear^.X) + WorldDx - 16, hwRound(Gear^.Y) + WorldDy - 16, 32, (GameTicks shr 7) and 7, PHedgehog(Gear^.Hedgehog)^.Team^.GraveTex);
+ gtGrave: DrawTextureF(PHedgehog(Gear^.Hedgehog)^.Team^.GraveTex, 1, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, (GameTicks shr 7) and 7, 1, 32, 32);
gtUFO: DrawSprite(sprUFO, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 16 + WorldDy, (GameTicks shr 7) mod 4);
--- a/hedgewars/uStore.pas Mon Feb 22 05:50:29 2010 +0000
+++ b/hedgewars/uStore.pas Mon Feb 22 10:56:43 2010 +0000
@@ -51,7 +51,6 @@
procedure DrawSprite (Sprite: TSprite; X, Y, Frame: LongInt);
procedure DrawSprite2(Sprite: TSprite; X, Y, FrameX, FrameY: LongInt);
procedure DrawSpriteClipped(Sprite: TSprite; X, Y, TopY, RightX, BottomY, LeftX: LongInt);
-procedure DrawSurfSprite(X, Y, Height, Frame: LongInt; Source: PTexture);
procedure DrawTexture(X, Y: LongInt; Texture: PTexture);
procedure DrawTextureF(Texture: PTexture; Scale: GLfloat; X, Y, Frame, Dir, w, h: LongInt);
procedure DrawRotatedTextureF(Texture: PTexture; Scale, OffsetX, OffsetY: GLfloat; X, Y, Frame, Dir, w, h: LongInt; Angle: real);
@@ -693,16 +692,6 @@
DrawFromRect(X, Y, @r, SpritesData[Sprite].Texture)
end;
-procedure DrawSurfSprite(X, Y, Height, Frame: LongInt; Source: PTexture);
-var r: TSDL_Rect;
-begin
-r.x:= 0;
-r.w:= Source^.w;
-r.y:= Frame * Height;
-r.h:= Height;
-DrawFromRect(X, Y, @r, Source)
-end;
-
procedure DrawCentered(X, Top: LongInt; Source: PTexture);
begin
DrawTexture(X - Source^.w shr 1, Top, Source)