equal
deleted
inserted
replaced
2015 |
2015 |
2016 // this generates the border around the screen that moves the camera when cursor is near it |
2016 // this generates the border around the screen that moves the camera when cursor is near it |
2017 if (CurrentTeam^.ExtDriven and isCursorVisible and autoCameraOn) or |
2017 if (CurrentTeam^.ExtDriven and isCursorVisible and autoCameraOn) or |
2018 (not CurrentTeam^.ExtDriven and isCursorVisible) or ((FollowGear <> nil) and autoCameraOn) then |
2018 (not CurrentTeam^.ExtDriven and isCursorVisible) or ((FollowGear <> nil) and autoCameraOn) then |
2019 begin |
2019 begin |
2020 if CursorPoint.X < - cScreenWidth div 2 + EdgesDist then |
2020 if CursorPoint.X < - trunc(cScreenWidth / cScaleFactor) + EdgesDist then |
2021 begin |
2021 begin |
2022 WorldDx:= WorldDx - CursorPoint.X - cScreenWidth div 2 + EdgesDist; |
2022 WorldDx:= WorldDx - CursorPoint.X - trunc(cScreenWidth / cScaleFactor) + EdgesDist; |
2023 CursorPoint.X:= - cScreenWidth div 2 + EdgesDist |
2023 CursorPoint.X:= - trunc(cScreenWidth / cScaleFactor) + EdgesDist |
2024 end |
2024 end |
2025 else |
2025 else |
2026 if CursorPoint.X > cScreenWidth div 2 - EdgesDist then |
2026 if CursorPoint.X > trunc(cScreenWidth / cScaleFactor) - EdgesDist then |
2027 begin |
2027 begin |
2028 WorldDx:= WorldDx - CursorPoint.X + cScreenWidth div 2 - EdgesDist; |
2028 WorldDx:= WorldDx - CursorPoint.X + trunc(cScreenWidth / cScaleFactor) - EdgesDist; |
2029 CursorPoint.X:= cScreenWidth div 2 - EdgesDist |
2029 CursorPoint.X:= trunc(cScreenWidth / cScaleFactor) - EdgesDist |
2030 end; |
2030 end; |
2031 |
2031 |
2032 shs:= min(cScreenHeight div 2 - trunc(cScreenHeight / cScaleFactor) + EdgesDist, cScreenHeight - EdgesDist); |
2032 shs:= min(cScreenHeight div 2 - trunc(cScreenHeight / cScaleFactor) + EdgesDist, cScreenHeight - EdgesDist); |
2033 if CursorPoint.Y < shs then |
2033 if CursorPoint.Y < shs then |
2034 begin |
2034 begin |