96 if AMxShift = 0 then |
96 if AMxShift = 0 then |
97 begin |
97 begin |
98 CursorPoint.X:= cScreenWidth div 2; |
98 CursorPoint.X:= cScreenWidth div 2; |
99 CursorPoint.Y:= cScreenHeight div 2; |
99 CursorPoint.Y:= cScreenHeight div 2; |
100 prevPoint:= CursorPoint; |
100 prevPoint:= CursorPoint; |
101 SDL_WarpMouse(CursorPoint.X, CursorPoint.Y) |
101 SDL_WarpMouse(CursorPoint.X + cScreenWidth div 2, CursorPoint.Y) |
102 end; |
102 end; |
103 if cReducedQuality then |
103 if cReducedQuality then |
104 AMxShift:= 210 |
104 AMxShift:= 210 |
105 else |
105 else |
106 if AMxShift < 210 then inc(AMxShift, MENUSPEED); |
106 if AMxShift < 210 then inc(AMxShift, MENUSPEED); |
492 prevPoint.X:= CursorPoint.X; |
492 prevPoint.X:= CursorPoint.X; |
493 prevPoint.Y:= CursorPoint.Y; |
493 prevPoint.Y:= CursorPoint.Y; |
494 exit |
494 exit |
495 end |
495 end |
496 else begin |
496 else begin |
497 CursorPoint.x:= (prevPoint.x * 7 + (hwRound(FollowGear^.X) + hwSign(FollowGear^.dX) * 100) + WorldDx) div 8; |
497 //CursorPoint.x:= (prevPoint.x * 7 + (hwRound(FollowGear^.X) + hwSign(FollowGear^.dX) * 100) + WorldDx) div 8; |
498 CursorPoint.y:= (prevPoint.y * 7 + (hwRound(FollowGear^.Y) + WorldDy)) div 8 |
498 //CursorPoint.y:= (prevPoint.y * 7 + (hwRound(FollowGear^.Y) + WorldDy)) div 8 |
|
499 CursorPoint.x:= (hwRound(FollowGear^.X) + hwSign(FollowGear^.dX) * 100) + WorldDx; |
499 end; |
500 end; |
500 |
501 |
501 if ((CursorPoint.X = prevPoint.X)and(CursorPoint.Y = prevpoint.Y)) then exit; |
502 if ((CursorPoint.X = prevPoint.X)and(CursorPoint.Y = prevpoint.Y)) then exit; |
502 |
503 |
503 if AMxShift < 210 then |
504 if AMxShift < 210 then |
504 begin |
505 begin |
505 if CursorPoint.X < cScreenWidth + AMxShift - 175 then CursorPoint.X:= cScreenWidth + AMxShift - 175; |
506 if CursorPoint.X < cScreenWidth div 2 + AMxShift - 175 then CursorPoint.X:= cScreenWidth div 2 + AMxShift - 175; |
506 if CursorPoint.X > cScreenWidth + AMxShift - 10 then CursorPoint.X:= cScreenWidth + AMxShift - 10; |
507 if CursorPoint.X > cScreenWidth div 2 + AMxShift - 10 then CursorPoint.X:= cScreenWidth div 2 + AMxShift - 10; |
507 if CursorPoint.Y < cScreenHeight - 75 - SlotsNum * 33 then CursorPoint.Y:= cScreenHeight - 75 - SlotsNum * 33; |
508 if CursorPoint.Y < cScreenHeight - 75 - SlotsNum * 33 then CursorPoint.Y:= cScreenHeight - 75 - SlotsNum * 33; |
508 if CursorPoint.Y > cScreenHeight - 76 then CursorPoint.Y:= cScreenHeight - 76; |
509 if CursorPoint.Y > cScreenHeight - 76 then CursorPoint.Y:= cScreenHeight - 76; |
509 prevPoint:= CursorPoint; |
510 prevPoint:= CursorPoint; |
510 if cHasFocus then SDL_WarpMouse(CursorPoint.X, CursorPoint.Y); |
511 if cHasFocus then SDL_WarpMouse(CursorPoint.X + cScreenWidth div 2, CursorPoint.Y); |
511 exit |
512 exit |
512 end; |
513 end; |
513 |
514 |
514 if isCursorVisible then |
515 if isCursorVisible then |
515 begin |
516 begin |