hedgewars/uGears.pas
changeset 821 e6c0408b54ed
parent 815 82ff416301bd
child 822 2ae8fd8ef804
equal deleted inserted replaced
820:a26537586400 821:e6c0408b54ed
   470 end;
   470 end;
   471 
   471 
   472 procedure DrawHH(Gear: PGear; Surface: PSDL_Surface);
   472 procedure DrawHH(Gear: PGear; Surface: PSDL_Surface);
   473 var t: LongInt;
   473 var t: LongInt;
   474 begin
   474 begin
   475 DrawHedgehog(hwRound(Gear^.X) - 15 + WorldDx, hwRound(Gear^.Y) - 18 + WorldDy,
   475 if (Gear^.State and gstHHDriven) <> 0 then
   476              hwSign(Gear^.dX), 0,
   476    begin
       
   477    if CurAmmoGear <> nil then
       
   478       begin
       
   479       if (CurAmmoGear^.Kind = gtRope) then
       
   480       DrawHedgehog(hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy,
       
   481              1,
       
   482              1,
       
   483              0,
       
   484              DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) - 110);
       
   485       end else
       
   486       DrawHedgehog(hwRound(Gear^.X) + 1 + WorldDx, hwRound(Gear^.Y) - 3 + WorldDy,
       
   487              hwSign(Gear^.dX),
       
   488              0,
   477              PHedgehog(Gear^.Hedgehog)^.visStepPos div 2,
   489              PHedgehog(Gear^.Hedgehog)^.visStepPos div 2,
   478              Surface);
   490              0);
       
   491    end else
       
   492    DrawHedgehog(hwRound(Gear^.X) + 1 + WorldDx, hwRound(Gear^.Y) - 3 + WorldDy,
       
   493              hwSign(Gear^.dX),
       
   494              0,
       
   495              8,
       
   496              0);
   479 
   497 
   480 with PHedgehog(Gear^.Hedgehog)^ do
   498 with PHedgehog(Gear^.Hedgehog)^ do
   481      if (Gear^.State{ and not gstAnimation}) = 0 then
   499      if (Gear^.State{ and not gstAnimation}) = 0 then
   482         begin
   500         begin
   483         t:= hwRound(Gear^.Y) - cHHRadius - 10 + WorldDy;
   501         t:= hwRound(Gear^.Y) - cHHRadius - 10 + WorldDy;
   500       if (Gear^.State and gstHHDriven) <> 0 then
   518       if (Gear^.State and gstHHDriven) <> 0 then
   501         begin
   519         begin
   502         if bShowFinger and ((Gear^.State and gstHHDriven) <> 0) then
   520         if bShowFinger and ((Gear^.State and gstHHDriven) <> 0) then
   503            DrawSprite(sprFinger, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 64 + WorldDy,
   521            DrawSprite(sprFinger, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 64 + WorldDy,
   504                       GameTicks div 32 mod 16, Surface);
   522                       GameTicks div 32 mod 16, Surface);
       
   523 
   505         if (Gear^.State and (gstMoving or gstDrowning)) = 0 then
   524         if (Gear^.State and (gstMoving or gstDrowning)) = 0 then
   506            if (Gear^.State and gstHHThinking) <> 0 then
   525            if (Gear^.State and gstHHThinking) <> 0 then
   507               DrawSprite(sprQuestion, hwRound(Gear^.X) - 10 + WorldDx, hwRound(Gear^.Y) - cHHRadius - 34 + WorldDy, 0, Surface)
   526               DrawSprite(sprQuestion, hwRound(Gear^.X) - 10 + WorldDx, hwRound(Gear^.Y) - cHHRadius - 34 + WorldDy, 0, Surface)
   508               else
   527               else
   509               if ShowCrosshair and ((Gear^.State and gstAttacked) = 0) then
   528               if ShowCrosshair and ((Gear^.State and gstAttacked) = 0) then