961 if (cTagsMask and htName) <> 0 then |
961 if (cTagsMask and htName) <> 0 then |
962 ty := ty - NameTagTex^.h - 2; |
962 ty := ty - NameTagTex^.h - 2; |
963 if (cTagsMask and htHealth) <> 0 then |
963 if (cTagsMask and htHealth) <> 0 then |
964 ty := ty - HealthTagTex^.h - 2; |
964 ty := ty - HealthTagTex^.h - 2; |
965 tx := ox; |
965 tx := ox; |
966 tx := round(max(((-cScreenWidth + 16) / cScaleFactor) + SpritesData[sprFinger].Width div 2, min(((cScreenWidth - 16) / cScaleFactor) - SpritesData[sprFinger].Width div 2, tx))); |
966 |
967 ty := round(max(cScreenHeight div 2 - ((cScreenHeight - 16) / cScaleFactor) + SpritesData[sprFinger].Height div 2, min(cScreenHeight div 2 - ((-cScreenHeight + SpritesData[sprFinger].Height) / (cScaleFactor)) - SpritesData[sprFinger].Width div 2 - 96, ty))); |
967 // don't go offscreen |
|
968 //tx := round(max(((-cScreenWidth + 16) / cScaleFactor) + SpritesData[sprFinger].Width div 2, min(((cScreenWidth - 16) / cScaleFactor) - SpritesData[sprFinger].Width div 2, tx))); |
|
969 //ty := round(max(cScreenHeight div 2 - ((cScreenHeight - 16) / cScaleFactor) + SpritesData[sprFinger].Height div 2, min(cScreenHeight div 2 - ((-cScreenHeight + SpritesData[sprFinger].Height) / (cScaleFactor)) - SpritesData[sprFinger].Width div 2 - 96, ty))); |
|
970 t:= 32;//trunc((SpritesData[sprFinger].Width + t) / cScaleFactor); |
|
971 tx := min(max(tx, ViewLeftX + t), ViewRightX - t); |
|
972 t:= 32;//trunc((SpritesData[sprFinger].Height + t) / cScaleFactor); |
|
973 ty := min(ty, ViewBottomY - 96); |
|
974 // don't overlap with HH or HH tags |
|
975 if ty < ViewTopY + t then ty:= max(ViewTopY + t, oy + t); |
968 |
976 |
969 dAngle := DxDy2Angle(int2hwfloat(ty - oy), int2hwfloat(tx - ox)) + 90; |
977 dAngle := DxDy2Angle(int2hwfloat(ty - oy), int2hwfloat(tx - ox)) + 90; |
970 |
978 |
971 DrawSpriteRotatedF(sprFinger, tx, ty, GameTicks div 32 mod 16, 1, dAngle); |
979 DrawSpriteRotatedF(sprFinger, tx, ty, RealTicks div 32 mod 16, 1, dAngle); |
972 end; |
980 end; |
973 |
981 |
974 |
982 |
975 if (Gear^.State and gstDrowning) = 0 then |
983 if (Gear^.State and gstDrowning) = 0 then |
976 if (Gear^.State and gstHHThinking) <> 0 then |
984 if (Gear^.State and gstHHThinking) <> 0 then |