Merge with default tip cursor_issues
authorunc0rr
Fri, 29 Apr 2011 13:56:38 +0400
branchcursor_issues
changeset 5189 dc1fe432b293
parent 5149 9aa840fdf922 (diff)
parent 5188 d0461bd6d45b (current diff)
child 5191 c7000a6b397b
Merge with default tip
misc/Icon.icns
misc/dsa_pub.pem
project_files/HedgewarsMobile/Audio/Music/main theme.ogg
project_files/HedgewarsMobile/Classes/GameSetup.h
project_files/HedgewarsMobile/Classes/GameSetup.m
project_files/HedgewarsMobile/Resources/Settings/iFrontend/basicFlags_en.plist
project_files/HedgewarsMobile/Resources/Settings/iFrontend/credits.plist
project_files/HedgewarsMobile/Resources/Settings/iFrontend/gameFlags_en.plist
project_files/HedgewarsMobile/SDL.patch
share/hedgewars/Data/Themes/Beach/Chunk.png
--- a/hedgewars/uWorld.pas	Fri Apr 29 03:31:50 2011 +0200
+++ b/hedgewars/uWorld.pas	Fri Apr 29 13:56:38 2011 +0400
@@ -1156,7 +1156,7 @@
 end;
 
 procedure MoveCamera;
-var EdgesDist,  wdy: LongInt;
+var EdgesDist, wdy, shs: LongInt;
     PrevSentPointTime: LongWord = 0;
 begin
 {$IFNDEF IPHONEOS}
@@ -1230,10 +1230,12 @@
             WorldDx:= WorldDx - CursorPoint.X + cScreenWidth div 2 - EdgesDist;
             CursorPoint.X:= cScreenWidth div 2 - EdgesDist
         end;
-    if CursorPoint.Y < EdgesDist then
+
+    shs:= cScreenHeight div 2 - trunc(cScreenHeight / cScaleFactor) + EdgesDist;
+    if CursorPoint.Y < shs then
     begin
-        WorldDy:= WorldDy + CursorPoint.Y - EdgesDist;
-        CursorPoint.Y:= EdgesDist
+        WorldDy:= WorldDy + CursorPoint.Y - shs;
+        CursorPoint.Y:= shs;
     end
     else
         if CursorPoint.Y > cScreenHeight - EdgesDist then