disable the followgear vertical offset for small screen devices
authorkoda
Sat, 24 Sep 2011 14:48:23 +0200
changeset 6016 85410eef7ba4
parent 6015 daffc14a518a
child 6017 24631fd2fb9e
disable the followgear vertical offset for small screen devices
hedgewars/uWorld.pas
--- a/hedgewars/uWorld.pas	Sat Sep 24 22:14:10 2011 +0200
+++ b/hedgewars/uWorld.pas	Sat Sep 24 14:48:23 2011 +0200
@@ -54,7 +54,8 @@
     uRender,
     uCaptions,
     uCursor,
-    uCommands
+    uCommands,
+    uMobile
     ;
 
 var cWaveWidth, cWaveHeight: LongInt;
@@ -1196,7 +1197,10 @@
     else
     begin
         CursorPoint.X:= (prevPoint.X * 7 + hwRound(FollowGear^.X) + hwSign(FollowGear^.dX) * z + WorldDx) div 8;
-        CursorPoint.Y:= (prevPoint.Y * 7 + cScreenHeight - (hwRound(FollowGear^.Y)+ hwSign(FollowGear^.dY) * z + WorldDy)) div 8;
+        if isPhone() then
+            CursorPoint.Y:= (prevPoint.Y * 7 + cScreenHeight - (hwRound(FollowGear^.Y) + WorldDy)) div 8
+        else
+            CursorPoint.Y:= (prevPoint.Y * 7 + cScreenHeight - (hwRound(FollowGear^.Y) + hwSign(FollowGear^.dY) * z + WorldDy)) div 8;
     end;
 
 wdy:= trunc(cScreenHeight / cScaleFactor) + cScreenHeight div 2 - cWaterLine - cVisibleWater;