-fix teleport sound when moving to wrong positions
-DrawSprite now becomes a wrapper for DrawSprite2
--- a/hedgewars/GSHandlers.inc Sun Jul 05 16:37:05 2009 +0000
+++ b/hedgewars/GSHandlers.inc Mon Jul 06 00:39:32 2009 +0000
@@ -1516,7 +1516,8 @@
HHGear^.State:= HHGear^.State and not gstAttacking;
HHGear^.State:= HHGear^.State or gstHHChooseTarget;
DeleteGear(Gear);
- isCursorVisible:= true
+ isCursorVisible:= true;
+ PlaySound(sndDenied, false, nil);
end
else begin
DeleteCI(HHGear);
@@ -1526,10 +1527,10 @@
Gear^.Y:= HHGear^.Y;
HHGear^.X:= int2hwFloat(TargetPoint.X);
HHGear^.Y:= int2hwFloat(TargetPoint.Y);
- HHGear^.State:= HHGear^.State or gstMoving
+ HHGear^.State:= HHGear^.State or gstMoving;
+ playSound(sndWarp, false, nil);
end;
TargetPoint.X:= NoPointX;
-playSound(sndWarp, false, nil);
end;
--- a/hedgewars/uStore.pas Sun Jul 05 16:37:05 2009 +0000
+++ b/hedgewars/uStore.pas Mon Jul 06 00:39:32 2009 +0000
@@ -515,15 +515,8 @@
end;
procedure DrawSprite (Sprite: TSprite; X, Y, Frame: LongInt);
-var r: TSDL_Rect;
-var flag: integer = 0;
begin
-if flag = 0 then r.x:= 0
-else r.x := 0;
-r.w:= SpritesData[Sprite].Width;
-r.y:= Frame * SpritesData[Sprite].Height;
-r.h:= SpritesData[Sprite].Height;
-DrawFromRect(X, Y, @r, SpritesData[Sprite].Texture)
+DrawSprite2 (Sprite, X, Y, 0, Frame);
end;
procedure DrawSpriteClipped(Sprite: TSprite; X, Y, TopY, RightX, BottomY, LeftX: LongInt);