equal
deleted
inserted
replaced
83 InitStepsFlags: Longword = 0; |
83 InitStepsFlags: Longword = 0; |
84 |
84 |
85 AttackBar: LongInt = 0; // 0 - none, 1 - just bar at the right-down corner, 2 - like in WWP |
85 AttackBar: LongInt = 0; // 0 - none, 1 - just bar at the right-down corner, 2 - like in WWP |
86 |
86 |
87 function hwSign(r: hwFloat): LongInt; |
87 function hwSign(r: hwFloat): LongInt; |
88 function Min(a, b: LongInt): LongInt; |
88 function Min(a, b: LongInt): LongInt; |
89 function Max(a, b: LongInt): LongInt; |
89 function Max(a, b: LongInt): LongInt; |
90 function rndSign(num: hwFloat): hwFloat; |
90 function rndSign(num: hwFloat): hwFloat; |
91 procedure OutError(Msg: String; isFatalError: boolean); |
91 procedure OutError(Msg: String; isFatalError: boolean); |
92 procedure TryDo(Assert: boolean; Msg: string; isFatal: boolean); |
92 procedure TryDo(Assert: boolean; Msg: string; isFatal: boolean); |
93 procedure SDLTry(Assert: boolean; isFatal: boolean); |
93 procedure SDLTry(Assert: boolean; isFatal: boolean); |
102 {$ENDIF} |
102 {$ENDIF} |
103 procedure SetKB(n: Longword); |
103 procedure SetKB(n: Longword); |
104 procedure SendKB; |
104 procedure SendKB; |
105 procedure SetLittle(var r: hwFloat); |
105 procedure SetLittle(var r: hwFloat); |
106 procedure SendStat(sit: TStatInfoType; s: shortstring); |
106 procedure SendStat(sit: TStatInfoType; s: shortstring); |
107 function Str2PChar(var s: shortstring): PChar; |
107 function Str2PChar(const s: shortstring): PChar; |
108 |
108 |
109 var CursorPoint: TPoint; |
109 var CursorPoint: TPoint; |
110 TargetPoint: TPoint = (X: NoPointX; Y: 0); |
110 TargetPoint: TPoint = (X: NoPointX; Y: 0); |
111 |
111 |
112 implementation |
112 implementation |
220 begin |
220 begin |
221 num.isNegative:= getrandom(2) = 0; |
221 num.isNegative:= getrandom(2) = 0; |
222 rndSign:= num |
222 rndSign:= num |
223 end; |
223 end; |
224 |
224 |
225 function Str2PChar(var s: shortstring): PChar; |
225 function Str2PChar(const s: shortstring): PChar; |
226 const CharArray: array[byte] of Char = ''; |
226 const CharArray: array[byte] of Char = ''; |
227 begin |
227 begin |
228 CharArray:= s; |
228 CharArray:= s; |
229 CharArray[Length(s)]:= #0; |
229 CharArray[Length(s)]:= #0; |
230 Str2PChar:= @CharArray |
230 Str2PChar:= @CharArray |