added lines to avoid compiler hints, is this really the way we want to do it though? ;/ hedgeroid
authorXeli
Sat, 12 Nov 2011 14:45:36 +0100
branchhedgeroid
changeset 6228 1b7d4d7d162b
parent 6226 3106add9a5bf
child 6230 de1e43054017
added lines to avoid compiler hints, is this really the way we want to do it though? ;/
hedgewars/uTouch.pas
--- a/hedgewars/uTouch.pas	Fri Oct 28 18:33:38 2011 +0200
+++ b/hedgewars/uTouch.pas	Sat Nov 12 14:45:36 2011 +0100
@@ -157,6 +157,10 @@
     currentPinchDelta, zoom : hwFloat;
     tmpX, tmpY: LongInt;
 begin
+    x := x;
+    y := y;
+    dx := dx;
+    dy := dy;
     finger:= findFinger(pointerId);
     tmpX := convertToCursor(cScreenWidth, x);
     tmpY := convertToCursor(cScreenHeight, y);
@@ -199,6 +203,8 @@
 
 procedure onTouchUp(x,y: Longword; pointerId: SDL_FingerId);
 begin
+    x := x;
+    y := y;
     aiming:= false;
     stopFiring:= true;
     deleteFinger(pointerId);
@@ -218,6 +224,7 @@
 
 procedure onTouchDoubleClick(finger: Touch_Finger);
 begin
+    finger := finger;//avoid compiler hint
     ParseCommand('ljump', true);
 end;
 
@@ -259,7 +266,7 @@
     xCursor, yCursor, index : LongInt;
 begin
     //Check array sizes
-    if length(fingers) < pointerCount then 
+    if length(fingers) < Integer(pointerCount) then 
     begin
         setLength(fingers, length(fingers)*2);
         for index := length(fingers) div 2 to length(fingers) do fingers[index].id := nilFingerId;
@@ -284,7 +291,7 @@
 
 procedure deleteFinger(id: SDL_FingerId);
 var
-    index : Longint;
+    index : Longword;
 begin
     
     dec(pointerCount);
@@ -384,6 +391,8 @@
 begin
     if CurrentHedgehog^.Gear <> nil then
     begin
+        touchX := _0;//avoid compiler hint
+        touchY := _0;
         hogX := CurrentHedgehog^.Gear^.X;
         hogY := CurrentHedgehog^.Gear^.Y;
 
@@ -420,6 +429,8 @@
 var
     x,y : hwFloat;
 begin
+    x := _0;//avoid compiler hint
+    y := _0;
     convertToFingerCoord(x, y, int2hwFloat(CrosshairX), int2hwFloat(CrosshairY));
     isOnCrosshair:= Distance(int2hwFloat(finger.x)-x, int2hwFloat(finger.y)-y) < _50;
 end;
@@ -428,6 +439,8 @@
 var
     x,y : hwFloat;
 begin
+    x := _0;
+    y := _0;
     convertToFingerCoord(x, y, CurrentHedgehog^.Gear^.X, CurrentHedgehog^.Gear^.Y);
     isOnCurrentHog := Distance(int2hwFloat(finger.X)-x, int2hwFloat(finger.Y)-y) < _50;
 end;
@@ -472,7 +485,8 @@
 
 procedure initModule;
 var
-    index, uRenderCoordScaleX, uRenderCoordScaleY: Longword;
+    index: Longword;
+    //uRenderCoordScaleX, uRenderCoordScaleY: Longword;
 begin
     movingCrosshair := false;
     stopFiring:= false;
@@ -488,7 +502,7 @@
         fingers[index].id := nilFingerId;
 
 
-    uRenderCoordScaleX := Round(cScreenWidth/0.8 * 2);
+    //uRenderCoordScaleX := Round(cScreenWidth/0.8 * 2);
     fireButtonLeft := Round(cScreenWidth*0.01);
     fireButtonRight := Round(fireButtonLeft + (spritesData[sprFireButton].Width*0.4));
     fireButtonBottom := Round(cScreenHeight*0.99);