95 |
95 |
96 InitStepsFlags: Longword = 0; |
96 InitStepsFlags: Longword = 0; |
97 |
97 |
98 AttackBar: integer = 0; // 0 - none, 1 - just bar at the right-down corner, 2 - like in WWP |
98 AttackBar: integer = 0; // 0 - none, 1 - just bar at the right-down corner, 2 - like in WWP |
99 |
99 |
100 function Sign(r: real): integer; |
100 function Sign(r: Double): integer; |
101 function Min(a, b: integer): integer; |
101 function Min(a, b: integer): integer; |
102 function Max(a, b: integer): integer; |
102 function Max(a, b: integer): integer; |
103 procedure OutError(Msg: String; const isFatalError: boolean=false); |
103 procedure OutError(Msg: String; const isFatalError: boolean=false); |
104 procedure TryDo(Assert: boolean; Msg: string; isFatal: boolean); |
104 procedure TryDo(Assert: boolean; Msg: string; isFatal: boolean); |
105 procedure SDLTry(Assert: boolean; isFatal: boolean); |
105 procedure SDLTry(Assert: boolean; isFatal: boolean); |
106 function IntToStr(n: integer): shortstring; |
106 function IntToStr(n: integer): shortstring; |
107 function FloatToStr(n: real): shortstring; |
107 function FloatToStr(n: Double): shortstring; |
108 function DxDy2Angle32(const _dY, _dX: Extended): integer; |
108 function DxDy2Angle32(const _dY, _dX: Extended): integer; |
109 function DxDy2AttackAngle(const _dY, _dX: Extended): integer; |
109 function DxDy2AttackAngle(const _dY, _dX: Extended): integer; |
110 procedure AdjustColor(var Color: Longword); |
110 procedure AdjustColor(var Color: Longword); |
111 {$IFDEF DEBUGFILE} |
111 {$IFDEF DEBUGFILE} |
112 procedure AddFileLog(s: shortstring); |
112 procedure AddFileLog(s: shortstring); |
113 function RectToStr(Rect: TSDL_Rect): shortstring; |
113 function RectToStr(Rect: TSDL_Rect): shortstring; |
114 {$ENDIF} |
114 {$ENDIF} |
115 {$IFNDEF FPC} |
115 {$IFNDEF FPC} |
116 function arctan2(const Y, X: real): real; |
116 function arctan2(const Y, X: Double): Double; |
117 {$ENDIF} |
117 {$ENDIF} |
118 |
118 |
119 var CursorPoint: TPoint; |
119 var CursorPoint: TPoint; |
120 TargetPoint: TPoint = (X: NoPointX; Y: 0); |
120 TargetPoint: TPoint = (X: NoPointX; Y: 0); |
121 |
121 |