hedgewars/uGearsRender.pas
changeset 7565 00568d3054d0
parent 7547 6e9c5feb88eb
child 7671 43f38923bc6e
equal deleted inserted replaced
7544:a72ace943bfd 7565:00568d3054d0
   374                         begin
   374                         begin
   375                         dAngle:= 180;
   375                         dAngle:= 180;
   376                         hAngle:= 0;
   376                         hAngle:= 0;
   377                         i:= -1
   377                         i:= -1
   378                         end;
   378                         end;
   379                 if ((Gear^.State and gstWinner) = 0) then
   379                     if ((Gear^.State and gstWinner) = 0) then
   380                     begin
   380                         begin
   381                     DrawHedgehog(ox, oy,
   381                         DrawHedgehog(ox, oy,
   382                             i,
   382                                 i,
   383                             1,
   383                                 1,
   384                             0,
   384                                 0,
   385                             DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + dAngle);
   385                                 DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + dAngle);
   386                     with HH^ do
   386                         with HH^ do
   387                         if (HatTex <> nil) then
   387                             if (HatTex <> nil) then
   388                             begin
       
   389                             DrawTextureRotatedF(HatTex, 1.0, -1.0, -6.0, ox, oy, 0, i, 32, 32,
       
   390                                 i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle);
       
   391                             if HatTex^.w > 64 then
       
   392                                 begin
   388                                 begin
   393                                 Tint(HH^.Team^.Clan^.Color shl 8 or $FF);
   389                                 DrawTextureRotatedF(HatTex, 1.0, -1.0, -6.0, ox, oy, 0, i, 32, 32,
   394                                 DrawTextureRotatedF(HatTex, 1.0, -1.0, -6.0, ox, oy, 32, i, 32, 32,
       
   395                                     i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle);
   390                                     i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle);
   396                                 Tint($FF, $FF, $FF, $FF)
   391                                 if HatTex^.w > 64 then
       
   392                                     begin
       
   393                                     Tint(HH^.Team^.Clan^.Color shl 8 or $FF);
       
   394                                     DrawTextureRotatedF(HatTex, 1.0, -1.0, -6.0, ox, oy, 32, i, 32, 32,
       
   395                                         i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle);
       
   396                                     Tint($FF, $FF, $FF, $FF)
       
   397                                     end
   397                                 end
   398                                 end
   398                             end
       
   399                     end;
   399                     end;
   400                     DrawAltWeapon(Gear, ox, oy);
   400                     DrawAltWeapon(Gear, ox, oy);
   401                     defaultPos:= false
   401                     defaultPos:= false
   402                     end;
   402                     end;
   403                 gtBlowTorch:
   403                 gtBlowTorch: