changeset 2597 | f777ac80ffef |
parent 2568 | e654cbfb23ba |
child 2599 | c7153d2348f3 |
2596:41b46f83d088 | 2597:f777ac80ffef |
---|---|
779 |
779 |
780 procedure DrawHH(Gear: PGear); |
780 procedure DrawHH(Gear: PGear); |
781 var i, t: LongInt; |
781 var i, t: LongInt; |
782 amt: TAmmoType; |
782 amt: TAmmoType; |
783 hx, hy, cx, cy, tx, ty, sx, sy, m: LongInt; // hedgehog, crosshair, temp, sprite, direction |
783 hx, hy, cx, cy, tx, ty, sx, sy, m: LongInt; // hedgehog, crosshair, temp, sprite, direction |
784 lx, ly, dx, dy, ax, ay, aAngle, dAngle: real; // laser, change |
784 lx, ly, dx, dy, ax, ay, aAngle, dAngle, hAngle: real; // laser, change |
785 defaultPos, HatVisible: boolean; |
785 defaultPos, HatVisible: boolean; |
786 VertexBuffer: array [0..1] of TVertex2f; |
786 VertexBuffer: array [0..1] of TVertex2f; |
787 begin |
787 begin |
788 m:= 1; |
788 m:= 1; |
789 if ((Gear^.State and gstHHHJump) <> 0) and not cArtillery then m:= -1; |
789 if ((Gear^.State and gstHHHJump) <> 0) and not cArtillery then m:= -1; |
926 end; |
926 end; |
927 gtRope: begin |
927 gtRope: begin |
928 if Gear^.X < CurAmmoGear^.X then |
928 if Gear^.X < CurAmmoGear^.X then |
929 begin |
929 begin |
930 dAngle:= 0; |
930 dAngle:= 0; |
931 hAngle:= 180; |
|
931 i:= 1 |
932 i:= 1 |
932 end else |
933 end else |
933 begin |
934 begin |
934 dAngle:= 180; |
935 dAngle:= 180; |
936 hAngle:= 0; |
|
935 i:= -1 |
937 i:= -1 |
936 end; |
938 end; |
937 sx:= hwRound(Gear^.X) + WorldDx; |
939 sx:= hwRound(Gear^.X) + WorldDx; |
938 sy:= hwRound(Gear^.Y) + WorldDy; |
940 sy:= hwRound(Gear^.Y) + WorldDy; |
939 DrawHedgehog(sx, sy, |
941 DrawHedgehog(sx, sy, |
940 i, |
942 i, |
941 1, |
943 1, |
942 0, |
944 0, |
943 DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + dAngle); |
945 DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + dAngle); |
946 with PHedgehog(Gear^.Hedgehog)^ do |
|
947 if (HatTex <> nil) then |
|
948 DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, sx, sy, 0, i, 32, |
|
949 i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle); |
|
944 defaultPos:= false |
950 defaultPos:= false |
945 end; |
951 end; |
946 gtBlowTorch: begin |
952 gtBlowTorch: begin |
947 DrawRotated(sprBlowTorch, hx, hy, hwSign(Gear^.dX), aangle); |
953 DrawRotated(sprBlowTorch, hx, hy, hwSign(Gear^.dX), aangle); |
948 DrawHedgehog(sx, sy, |
954 DrawHedgehog(sx, sy, |
1033 DrawHedgehog(sx, sy, |
1039 DrawHedgehog(sx, sy, |
1034 hwSign(Gear^.dX)*m, |
1040 hwSign(Gear^.dX)*m, |
1035 1, |
1041 1, |
1036 1, |
1042 1, |
1037 0); |
1043 0); |
1038 HatVisible:= true; |
|
1039 HatVisible:= true; |
1044 HatVisible:= true; |
1040 defaultPos:= false |
1045 defaultPos:= false |
1041 end else |
1046 end else |
1042 |
1047 |
1043 if (Gear^.Message and (gm_Left or gm_Right) <> 0) and (not isCursorVisible) then |
1048 if (Gear^.Message and (gm_Left or gm_Right) <> 0) and (not isCursorVisible) then |