hedgewars/GearDrawing.inc
changeset 4047 6c07a302b7c0
parent 4044 de7170e51cc6
child 4077 e7d838d063a4
equal deleted inserted replaced
4034:634a8c8682de 4047:6c07a302b7c0
   276                         hwSign(Gear^.dX),
   276                         hwSign(Gear^.dX),
   277                         0);
   277                         0);
   278                 defaultPos:= false
   278                 defaultPos:= false
   279                 end;
   279                 end;
   280             gtResurrector: begin
   280             gtResurrector: begin
   281                 DrawRotated(sprHandResurrector, hwRound(Gear^.X) + WorldDx,
   281                 DrawRotated(sprHandResurrector, sx, sy, 0, 0); 
   282                         hwRound(Gear^.Y) + WorldDy, 0, 0); 
   282                 defaultPos:= false
   283                 DrawRotated(sprCross, hwRound(CurAmmoGear^.X) + WorldDx,
       
   284                         hwRound(CurAmmoGear^.Y) + WorldDy + (CurAmmoGear^.Power), 0, 0);
       
   285                 defaultPos := false;
       
   286                 Tint($33, $33, $FF, max($00, floor($C0 * abs(1 - (GameTicks mod 6000) / 3000))));
       
   287                 DrawTexture(sx - 108, sy - 108 + (CurAmmoGear^.Power),
       
   288                         SpritesData[sprVampiric].Texture, 4.5);
       
   289                 Tint($FF, $FF, $FF, $FF);
       
   290                 end;
   283                 end;
   291             gtKamikaze: begin
   284             gtKamikaze: begin
   292                 if CurAmmoGear^.Pos = 0 then
   285                 if CurAmmoGear^.Pos = 0 then
   293                     DrawHedgehog(sx, sy,
   286                     DrawHedgehog(sx, sy,
   294                             hwSign(Gear^.dX),
   287                             hwSign(Gear^.dX),
   668 if HH^.Effects[hePoisoned] then
   661 if HH^.Effects[hePoisoned] then
   669     begin
   662     begin
   670     Tint($00, $FF, $40, $80);
   663     Tint($00, $FF, $40, $80);
   671     DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 1.5, 0, 0, sx, sy, 0, 1, 22, 22, 360 - (RealTicks shr 37) mod 360);
   664     DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 1.5, 0, 0, sx, sy, 0, 1, 22, 22, 360 - (RealTicks shr 37) mod 360);
   672     end;
   665     end;
       
   666 if HH^.Effects[heResurrected] then
       
   667     begin
       
   668     Tint($f5, $db, $35, $20);
       
   669     DrawSprite(sprVampiric, sx - 24, sy - 24, 0);
       
   670     end;
   673 
   671 
   674 if Gear^.Invulnerable then
   672 if Gear^.Invulnerable then
   675     begin
   673     begin
   676     Tint($FF, $FF, $FF, max($40, floor($FF * abs(1 - ((RealTicks div 2 + Gear^.uid * 491) mod 1500) / 750))));
   674     Tint($FF, $FF, $FF, max($40, floor($FF * abs(1 - ((RealTicks div 2 + Gear^.uid * 491) mod 1500) / 750))));
   677     DrawSprite(sprInvulnerable, sx - 24, sy - 24, 0);
   675     DrawSprite(sprInvulnerable, sx - 24, sy - 24, 0);
   726            gtGrave: begin 
   724            gtGrave: begin 
   727                     DrawTextureF(PHedgehog(Gear^.Hedgehog)^.Team^.GraveTex, 1, x, y, (GameTicks shr 7+Gear^.uid) and 7, 1, 32, 32);
   725                     DrawTextureF(PHedgehog(Gear^.Hedgehog)^.Team^.GraveTex, 1, x, y, (GameTicks shr 7+Gear^.uid) and 7, 1, 32, 32);
   728                     if Gear^.Health > 0 then
   726                     if Gear^.Health > 0 then
   729                         begin
   727                         begin
   730                         //Tint($33, $33, $FF, max($40, floor($FF * abs(1 - (GameTicks mod (6000 div Gear^.Health)) / 750))));
   728                         //Tint($33, $33, $FF, max($40, floor($FF * abs(1 - (GameTicks mod (6000 div Gear^.Health)) / 750))));
   731                         Tint($33, $33, $FF, max($40, floor($FF * abs(1 - (GameTicks mod 1500) / (750 + Gear^.Health)))));
   729                         Tint($f5, $db, $35, max($40, floor($FF * abs(1 - (GameTicks mod 1500) / (750 + Gear^.Health)))));
   732                         //Tint($FF, $FF, $FF, max($40, floor($FF * abs(1 - (RealTicks mod 1500) / 750))));
   730                         //Tint($FF, $FF, $FF, max($40, floor($FF * abs(1 - (RealTicks mod 1500) / 750))));
   733                         DrawSprite(sprVampiric, x - 24, y - 24, 0);
   731                         DrawSprite(sprVampiric, x - 24, y - 24, 0);
   734                         Tint($FF, $FF, $FF, $FF)
   732                         Tint($FF, $FF, $FF, $FF)
   735                         end
   733                         end
   736                     end;
   734                     end;
   858                     else
   856                     else
   859                         Tint($C0, $C0, $00, $C0);
   857                         Tint($C0, $C0, $00, $C0);
   860                     DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 3, 0, 0, x, y, 0, 1, 22, 22, (RealTicks shr 36 + Gear^.UID * 100) mod 360);
   858                     DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 3, 0, 0, x, y, 0, 1, 22, 22, (RealTicks shr 36 + Gear^.UID * 100) mod 360);
   861                     Tint($FF, $FF, $FF, $FF)
   859                     Tint($FF, $FF, $FF, $FF)
   862                     end;
   860                     end;
       
   861      gtResurrector: begin
       
   862                     DrawRotated(sprCross, x, y, 0, 0);
       
   863                     Tint($f5, $db, $35, max($00, floor($C0 * abs(1 - (GameTicks mod 6000) / 3000))));
       
   864                     DrawTexture(x - 108, y - 108, SpritesData[sprVampiric].Texture, 4.5);
       
   865                     Tint($FF, $FF, $FF, $FF);
       
   866                     end;
   863          end;
   867          end;
   864       if Gear^.RenderTimer and (Gear^.Tex <> nil) then DrawCentered(x + 8, y + 8, Gear^.Tex);
   868       if Gear^.RenderTimer and (Gear^.Tex <> nil) then DrawCentered(x + 8, y + 8, Gear^.Tex);
   865       Gear:= Gear^.NextGear
   869       Gear:= Gear^.NextGear
   866       end;
   870       end;
   867 end;
   871 end;