970 t:= 32;//trunc((SpritesData[sprFinger].Width + t) / cScaleFactor); |
970 t:= 32;//trunc((SpritesData[sprFinger].Width + t) / cScaleFactor); |
971 tx := min(max(tx, ViewLeftX + t), ViewRightX - t); |
971 tx := min(max(tx, ViewLeftX + t), ViewRightX - t); |
972 t:= 32;//trunc((SpritesData[sprFinger].Height + t) / cScaleFactor); |
972 t:= 32;//trunc((SpritesData[sprFinger].Height + t) / cScaleFactor); |
973 ty := min(ty, ViewBottomY - 96); |
973 ty := min(ty, ViewBottomY - 96); |
974 // don't overlap with HH or HH tags |
974 // don't overlap with HH or HH tags |
975 if ty < ViewTopY + t then ty:= max(ViewTopY + t, oy + t); |
975 if ty < ViewTopY + t then |
|
976 begin |
|
977 if abs(tx - ox) < abs(ty - oy) then |
|
978 ty:= max(ViewTopY + t, oy + t) |
|
979 else |
|
980 ty:= max(ViewTopY + t, ty); |
|
981 end; |
976 |
982 |
977 dAngle := DxDy2Angle(int2hwfloat(ty - oy), int2hwfloat(tx - ox)) + 90; |
983 dAngle := DxDy2Angle(int2hwfloat(ty - oy), int2hwfloat(tx - ox)) + 90; |
978 |
984 |
979 DrawSpriteRotatedF(sprFinger, tx, ty, RealTicks div 32 mod 16, 1, dAngle); |
985 DrawSpriteRotatedF(sprFinger, tx, ty, RealTicks div 32 mod 16, 1, dAngle); |
980 end; |
986 end; |