hedgewars/uCollisions.pas
changeset 498 9c8b385dc9a1
parent 393 db01cc79f278
child 504 13b6ebc53627
--- a/hedgewars/uCollisions.pas	Thu Mar 15 22:46:37 2007 +0000
+++ b/hedgewars/uCollisions.pas	Sat Mar 17 18:17:19 2007 +0000
@@ -34,7 +34,7 @@
 function TestCollisionXwithGear(Gear: PGear; Dir: LongInt): boolean;
 function TestCollisionYwithGear(Gear: PGear; Dir: LongInt): boolean;
 function TestCollisionY(Gear: PGear; Dir: LongInt): boolean;
-function TestCollisionXwithXYShift(Gear: PGear; ShiftX, ShiftY: hwFloat; Dir: LongInt): boolean;
+function TestCollisionXwithXYShift(Gear: PGear; ShiftX: hwFloat; ShiftY: LongInt; Dir: LongInt): boolean;
 function TestCollisionYwithXYShift(Gear: PGear; ShiftX, ShiftY: LongInt; Dir: LongInt): boolean;
 
 implementation
@@ -119,13 +119,13 @@
 TestCollisionXwithGear:= false
 end;
 
-function TestCollisionXwithXYShift(Gear: PGear; ShiftX, ShiftY: hwFloat; Dir: LongInt): boolean;
+function TestCollisionXwithXYShift(Gear: PGear; ShiftX: hwFloat; ShiftY: LongInt; Dir: LongInt): boolean;
 begin
 Gear^.X:= Gear^.X + ShiftX;
-Gear^.Y:= Gear^.Y + ShiftY;
+Gear^.Y:= Gear^.Y + int2hwFloat(ShiftY);
 TestCollisionXwithXYShift:= TestCollisionXwithGear(Gear, Dir);
 Gear^.X:= Gear^.X - ShiftX;
-Gear^.Y:= Gear^.Y - ShiftY
+Gear^.Y:= Gear^.Y - int2hwFloat(ShiftY)
 end;
 
 function TestCollisionYwithGear(Gear: PGear; Dir: LongInt): boolean;
@@ -168,11 +168,11 @@
 
 function TestCollisionYwithXYShift(Gear: PGear; ShiftX, ShiftY: LongInt; Dir: LongInt): boolean;
 begin
-Gear^.X:= Gear^.X + ShiftX;
-Gear^.Y:= Gear^.Y + ShiftY;
+Gear^.X:= Gear^.X + int2hwFloat(ShiftX);
+Gear^.Y:= Gear^.Y + int2hwFloat(ShiftY);
 TestCollisionYwithXYShift:= TestCollisionYwithGear(Gear, Dir);
-Gear^.X:= Gear^.X - ShiftX;
-Gear^.Y:= Gear^.Y - ShiftY
+Gear^.X:= Gear^.X - int2hwFloat(ShiftX);
+Gear^.Y:= Gear^.Y - int2hwFloat(ShiftY)
 end;
 
 end.