hedgewars/uGearsRender.pas
changeset 10264 cb4331b032f4
parent 10142 adb804cb2638
child 10312 eda8d563f677
equal deleted inserted replaced
10263:6ef900411158 10264:cb4331b032f4
    69 
    69 
    70     glPushMatrix;
    70     glPushMatrix;
    71 
    71 
    72     glTranslatef(WorldDx, WorldDy, 0);
    72     glTranslatef(WorldDx, WorldDy, 0);
    73 
    73 
    74     glLineWidth(2.0 * zoom);
    74     glLineWidth(2.0 * cScaleFactor);
    75 
    75 
    76     Tint($C0, $C0, $C0, $FF);
    76     Tint($C0, $C0, $C0, $FF);
    77 
    77 
    78     glVertexPointer(2, GL_FLOAT, 0, @RopePoints.rounded[0]);
    78     glVertexPointer(2, GL_FLOAT, 0, @RopePoints.rounded[0]);
    79     glDrawArrays(GL_LINE_STRIP, 0, RopePoints.Count + 2);
    79     glDrawArrays(GL_LINE_STRIP, 0, RopePoints.Count + 2);
   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) / zoom) + SpritesData[sprFinger].Width div 2, min(((cScreenWidth - 16) / zoom) - SpritesData[sprFinger].Width div 2, tx)));
   966                 tx := round(max(((-cScreenWidth + 16) / cScaleFactor) + SpritesData[sprFinger].Width div 2, min(((cScreenWidth - 16) / cScaleFactor) - SpritesData[sprFinger].Width div 2, tx)));
   967                 ty := round(max(cScreenHeight div 2 - ((cScreenHeight - 16) / (zoom)) + SpritesData[sprFinger].Height div 2, min(cScreenHeight div 2 - ((-cScreenHeight + SpritesData[sprFinger].Height) / (zoom)) - SpritesData[sprFinger].Width div 2 - 96, ty)));
   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)));
   968 
   968 
   969                 dAngle := DxDy2Angle(int2hwfloat(ty - oy), int2hwfloat(tx - ox)) + 90;
   969                 dAngle := DxDy2Angle(int2hwfloat(ty - oy), int2hwfloat(tx - ox)) + 90;
   970 
   970 
   971                 DrawSpriteRotatedF(sprFinger, tx, ty, GameTicks div 32 mod 16, 1, dAngle);
   971                 DrawSpriteRotatedF(sprFinger, tx, ty, GameTicks div 32 mod 16, 1, dAngle);
   972                 end;
   972                 end;