hedgewars/uGears.pas
changeset 1251 1f545d9a10ca
parent 1242 4aca5f7b2504
child 1253 79f47495b346
equal deleted inserted replaced
1250:180b044f09b7 1251:1f545d9a10ca
   841 				0);
   841 				0);
   842 			defaultPos:= false
   842 			defaultPos:= false
   843 		end;
   843 		end;
   844 	end;
   844 	end;
   845 
   845 
   846 
   846 with PHedgehog(Gear^.Hedgehog)^ do
   847 if defaultPos then
   847 	begin
   848 	begin
   848 	if defaultPos then
   849 	DrawRotatedF(sprHHIdle,
   849 		begin
   850 		hwRound(Gear^.X) + 1 + WorldDx,
   850 		DrawRotatedF(sprHHIdle,
   851 		hwRound(Gear^.Y) - 3 + WorldDy,
   851 			hwRound(Gear^.X) + 1 + WorldDx,
   852 		(RealTicks div 128 + Gear^.Pos) mod 19,
   852 			hwRound(Gear^.Y) - 3 + WorldDy,
   853 		hwSign(Gear^.dX),
   853 			(RealTicks div 128 + Gear^.Pos) mod 19,
   854 		0);
   854 			hwSign(Gear^.dX),
   855 	DrawTextureF(PHedgehog(Gear^.Hedgehog)^.HatTex,
   855 			0);
   856 		hwRound(Gear^.X) + 1 + WorldDx,
   856 		if HatVisibility < 1.0 then
   857 		hwRound(Gear^.Y) - 8 + WorldDy,
   857 			HatVisibility:= HatVisibility + 0.05;
   858 		(RealTicks div 128 + Gear^.Pos) mod 19,
   858 		end
   859 		hwSign(Gear^.dX),
   859 	else
   860 		32);
   860 		if HatVisibility > 0.0 then
       
   861 			HatVisibility:= HatVisibility - 0.05;
       
   862 
       
   863 	if HatVisibility > 0 then
       
   864 		DrawTextureF(HatTex,
       
   865 			HatVisibility,
       
   866 			hwRound(Gear^.X) + 1 + WorldDx,
       
   867 			hwRound(Gear^.Y) - 8 + WorldDy,
       
   868 			(RealTicks div 128 + Gear^.Pos) mod 19,
       
   869 			hwSign(Gear^.dX),
       
   870 			32);
   861 	end;
   871 	end;
       
   872 
   862 
   873 
   863 with PHedgehog(Gear^.Hedgehog)^ do
   874 with PHedgehog(Gear^.Hedgehog)^ do
   864 	begin
   875 	begin
   865 	if ((Gear^.State and not gstWinner) = 0)
   876 	if ((Gear^.State and not gstWinner) = 0)
   866 		or (bShowFinger and ((Gear^.State and gstHHDriven) <> 0)) then
   877 		or (bShowFinger and ((Gear^.State and gstHHDriven) <> 0)) then