hedgewars/uWorld.pas
branchhedgeroid
changeset 5375 ec4006837feb
parent 5341 479b4108789a
parent 5302 eaa445230124
child 5399 cdef954f8aec
equal deleted inserted replaced
5373:ad1c61a6ab4d 5375:ec4006837feb
  1225         begin
  1225         begin
  1226             WorldDx:= WorldDx - CursorPoint.X + cScreenWidth div 2 - EdgesDist;
  1226             WorldDx:= WorldDx - CursorPoint.X + cScreenWidth div 2 - EdgesDist;
  1227             CursorPoint.X:= cScreenWidth div 2 - EdgesDist
  1227             CursorPoint.X:= cScreenWidth div 2 - EdgesDist
  1228         end;
  1228         end;
  1229 
  1229 
  1230     shs:= cScreenHeight div 2 - trunc(cScreenHeight / cScaleFactor) + EdgesDist;
  1230     shs:= min(cScreenHeight div 2 - trunc(cScreenHeight / cScaleFactor) + EdgesDist, cScreenHeight - EdgesDist);
  1231     if CursorPoint.Y < shs then
  1231     if CursorPoint.Y < shs then
  1232     begin
  1232     begin
  1233         WorldDy:= WorldDy + CursorPoint.Y - shs;
  1233         WorldDy:= WorldDy + CursorPoint.Y - shs;
  1234         CursorPoint.Y:= shs;
  1234         CursorPoint.Y:= shs;
  1235     end
  1235     end
  1236     else
  1236     else
  1237         if CursorPoint.Y > cScreenHeight - EdgesDist then
  1237         if (CursorPoint.Y > cScreenHeight - EdgesDist) then
  1238         begin
  1238         begin
  1239            WorldDy:= WorldDy + CursorPoint.Y - cScreenHeight + EdgesDist;
  1239            WorldDy:= WorldDy + CursorPoint.Y - cScreenHeight + EdgesDist;
  1240            CursorPoint.Y:= cScreenHeight - EdgesDist
  1240            CursorPoint.Y:= cScreenHeight - EdgesDist
  1241         end;
  1241         end;
  1242 end
  1242 end