hedgewars/uGearsRender.pas
changeset 13238 bb73d6d3348a
parent 13219 9c81e34f1933
child 13287 b13071610c07
equal deleted inserted replaced
13237:2a3c52c49e8e 13238:bb73d6d3348a
   488                         with HH^ do
   488                         with HH^ do
   489                             if (curhat <> nil) then
   489                             if (curhat <> nil) then
   490                                 begin
   490                                 begin
   491                                 DrawTextureRotatedF(curhat, 1.0, -1.0, -6.0, ox, oy, 0, i, 32, 32,
   491                                 DrawTextureRotatedF(curhat, 1.0, -1.0, -6.0, ox, oy, 0, i, 32, 32,
   492                                     i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle);
   492                                     i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle);
   493                                 if curhat^.w > 64 then
   493                                 if (curhat^.w > 64) or ((curhat^.w = 64) and (curhat^.h = 32)) then
   494                                     begin
   494                                     begin
       
   495                                     if ((curhat^.w = 64) and (curhat^.h = 32)) then
       
   496                                         tx := 1
       
   497                                     else
       
   498                                         tx := 32;
   495                                     Tint(HH^.Team^.Clan^.Color shl 8 or $FF);
   499                                     Tint(HH^.Team^.Clan^.Color shl 8 or $FF);
   496                                     DrawTextureRotatedF(curhat, 1.0, -1.0, -6.0, ox, oy, 32, i, 32, 32,
   500                                     DrawTextureRotatedF(curhat, 1.0, -1.0, -6.0, ox, oy, tx, i, 32, 32,
   497                                         i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle);
   501                                         i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle);
   498                                     untint
   502                                     untint
   499                                     end
   503                                     end
   500                                 end
   504                                 end
   501                     end;
   505                     end;
   519                                 sy - 5,
   523                                 sy - 5,
   520                                 0,
   524                                 0,
   521                                 sign,
   525                                 sign,
   522                                 32,
   526                                 32,
   523                                 32);
   527                                 32);
   524                             if curhat^.w > 64 then
   528                             if (curhat^.w > 64) or ((curhat^.w = 64) and (curhat^.h = 32)) then
   525                                 begin
   529                                 begin
       
   530                                 if ((curhat^.w = 64) and (curhat^.h = 32)) then
       
   531                                     tx := 1
       
   532                                 else
       
   533                                     tx := 32;
   526                                 Tint(HH^.Team^.Clan^.Color shl 8 or $FF);
   534                                 Tint(HH^.Team^.Clan^.Color shl 8 or $FF);
   527                                 DrawTextureF(curhat,
   535                                 DrawTextureF(curhat,
   528                                     1,
   536                                     1,
   529                                     sx,
   537                                     sx,
   530                                     sy - 5,
   538                                     sy - 5,
   531                                     32,
   539                                     tx,
   532                                     sign,
   540                                     sign,
   533                                     32,
   541                                     32,
   534                                     32);
   542                                     32);
   535                                 untint
   543                                 untint
   536                                 end
   544                                 end