changeset 15908 | 014f4edd0421 |
parent 15857 | f0f615dcbe7c |
15907:a323e1954a6f | 15908:014f4edd0421 |
---|---|
63 , uCursor |
63 , uCursor |
64 , uCommands |
64 , uCommands |
65 , uTeams |
65 , uTeams |
66 , uDebug |
66 , uDebug |
67 , uInputHandler |
67 , uInputHandler |
68 , uDrawing |
|
68 {$IFDEF USE_VIDEO_RECORDING} |
69 {$IFDEF USE_VIDEO_RECORDING} |
69 , uVideoRec |
70 , uVideoRec |
70 {$ENDIF} |
71 {$ENDIF} |
71 ; |
72 ; |
72 |
73 |
1923 end; |
1924 end; |
1924 end; |
1925 end; |
1925 DrawTextureF(SpritesData[sprArrow].Texture, cDefaultZoomLevel / cScaleFactor, TargetCursorPoint.X + round(SpritesData[sprArrow].Width / cScaleFactor), cScreenHeight + round(SpritesData[sprArrow].Height / cScaleFactor) - TargetCursorPoint.Y, (RealTicks shr 6) mod 8, 1, SpritesData[sprArrow].Width, SpritesData[sprArrow].Height); |
1926 DrawTextureF(SpritesData[sprArrow].Texture, cDefaultZoomLevel / cScaleFactor, TargetCursorPoint.X + round(SpritesData[sprArrow].Width / cScaleFactor), cScreenHeight + round(SpritesData[sprArrow].Height / cScaleFactor) - TargetCursorPoint.Y, (RealTicks shr 6) mod 8, 1, SpritesData[sprArrow].Width, SpritesData[sprArrow].Height); |
1926 end; |
1927 end; |
1927 |
1928 |
1929 if uDrawing.isDrawingModeActive() then |
|
1930 DrawTextureF(SpritesData[sprArrow].Texture, cDefaultZoomLevel / cScaleFactor, CursorPoint.X + round(SpritesData[sprArrow].Width / cScaleFactor), cScreenHeight + round(SpritesData[sprArrow].Height / cScaleFactor) - CursorPoint.Y, (RealTicks shr 6) mod 8, 1, SpritesData[sprArrow].Width, SpritesData[sprArrow].Height); |
|
1931 |
|
1928 // debug stuff |
1932 // debug stuff |
1929 if cViewLimitsDebug then |
1933 if cViewLimitsDebug then |
1930 begin |
1934 begin |
1931 r.x:= ViewLeftX; |
1935 r.x:= ViewLeftX; |
1932 r.y:= ViewTopY; |
1936 r.y:= ViewTopY; |
2008 prevPoint:= CursorPoint; |
2012 prevPoint:= CursorPoint; |
2009 CameraBounds; |
2013 CameraBounds; |
2010 exit |
2014 exit |
2011 end; |
2015 end; |
2012 |
2016 |
2013 if isCursorVisible then |
2017 if isCursorVisible or uDrawing.isDrawingModeActive() then |
2014 begin |
2018 begin |
2015 if (not CurrentTeam^.ExtDriven) and (GameTicks >= PrevSentPointTime + cSendCursorPosTime) then |
2019 if isCursorVisible and (not CurrentTeam^.ExtDriven) and (GameTicks >= PrevSentPointTime + cSendCursorPosTime) then |
2016 begin |
2020 begin |
2017 SendIPCXY('P', CursorPoint.X - WorldDx, cScreenHeight - CursorPoint.Y - WorldDy); |
2021 SendIPCXY('P', CursorPoint.X - WorldDx, cScreenHeight - CursorPoint.Y - WorldDy); |
2018 PrevSentPointTime:= GameTicks |
2022 PrevSentPointTime:= GameTicks |
2019 end; |
2023 end; |
2020 EdgesDist:= cCursorEdgesDist |
2024 EdgesDist:= cCursorEdgesDist |
2022 else |
2026 else |
2023 EdgesDist:= cGearScrEdgesDist; |
2027 EdgesDist:= cGearScrEdgesDist; |
2024 |
2028 |
2025 // this generates the border around the screen that moves the camera when cursor is near it |
2029 // this generates the border around the screen that moves the camera when cursor is near it |
2026 if (CurrentTeam^.ExtDriven and isCursorVisible and autoCameraOn) or |
2030 if (CurrentTeam^.ExtDriven and isCursorVisible and autoCameraOn) or |
2027 (not CurrentTeam^.ExtDriven and isCursorVisible) or ((FollowGear <> nil) and autoCameraOn) then |
2031 (not CurrentTeam^.ExtDriven and isCursorVisible) or |
2032 ((FollowGear <> nil) and autoCameraOn) or uDrawing.isDrawingModeActive() then |
|
2028 begin |
2033 begin |
2029 if CursorPoint.X < - trunc(cScreenWidth / cScaleFactor) + EdgesDist then |
2034 if CursorPoint.X < - trunc(cScreenWidth / cScaleFactor) + EdgesDist then |
2030 begin |
2035 begin |
2031 WorldDx:= WorldDx - CursorPoint.X - trunc(cScreenWidth / cScaleFactor) + EdgesDist; |
2036 WorldDx:= WorldDx - CursorPoint.X - trunc(cScreenWidth / cScaleFactor) + EdgesDist; |
2032 CursorPoint.X:= - trunc(cScreenWidth / cScaleFactor) + EdgesDist |
2037 CursorPoint.X:= - trunc(cScreenWidth / cScaleFactor) + EdgesDist |