hedgewars/uMisc.pas
changeset 3169 c8c6ac44f51b
parent 3165 3ec07a7d8456
child 3295 ced0ee8280ad
equal deleted inserted replaced
3168:c542c8e3cf77 3169:c8c6ac44f51b
    96     bBetweenTurns   : boolean;
    96     bBetweenTurns   : boolean;
    97     cHealthDecrease : LongWord;
    97     cHealthDecrease : LongWord;
    98     bWaterRising    : Boolean;
    98     bWaterRising    : Boolean;
    99 
    99 
   100     ShowCrosshair   : boolean;
   100     ShowCrosshair   : boolean;
   101     CursorMovementX : Integer;
   101     CursorMovementX : LongInt;
   102     CursorMovementY : Integer;
   102     CursorMovementY : LongInt;
   103     cDrownSpeed : hwFloat;
   103     cDrownSpeed : hwFloat;
   104     cMaxWindSpeed   : hwFloat;
   104     cMaxWindSpeed   : hwFloat;
   105     cWindSpeed  : hwFloat;
   105     cWindSpeed  : hwFloat;
   106     cGravity    : hwFloat;
   106     cGravity    : hwFloat;
   107     cDamageModifier : hwFloat;
   107     cDamageModifier : hwFloat;
   131 
   131 
   132 procedure initModule;
   132 procedure initModule;
   133 procedure freeModule;
   133 procedure freeModule;
   134 procedure SplitBySpace(var a, b: shortstring);
   134 procedure SplitBySpace(var a, b: shortstring);
   135 procedure SplitByChar(var a, b: ansistring; c: char);
   135 procedure SplitByChar(var a, b: ansistring; c: char);
   136 procedure movecursor(dx, dy: Integer);
   136 procedure movecursor(dx, dy: LongInt);
   137 function  hwSign(r: hwFloat): LongInt;
   137 function  hwSign(r: hwFloat): LongInt;
   138 function  Min(a, b: LongInt): LongInt;
   138 function  Min(a, b: LongInt): LongInt;
   139 function  Max(a, b: LongInt): LongInt;
   139 function  Max(a, b: LongInt): LongInt;
   140 procedure OutError(Msg: shortstring; isFatalError: boolean);
   140 procedure OutError(Msg: shortstring; isFatalError: boolean);
   141 procedure TryDo(Assert: boolean; Msg: shortstring; isFatal: boolean);
   141 procedure TryDo(Assert: boolean; Msg: shortstring; isFatal: boolean);
   197     b:= copy(a, i + 1, Length(a) - i);
   197     b:= copy(a, i + 1, Length(a) - i);
   198     setlength(a, Pred(i));
   198     setlength(a, Pred(i));
   199     end else b:= '';
   199     end else b:= '';
   200 end;
   200 end;
   201 
   201 
   202 procedure movecursor(dx, dy: Integer);
   202 procedure movecursor(dx, dy: LongInt);
   203 var x, y: LongInt;
   203 var x, y: LongInt;
   204 begin
   204 begin
   205 if (dx = 0) and (dy = 0) then exit;
   205 if (dx = 0) and (dy = 0) then exit;
   206 
   206 
   207 SDL_GetMouseState(@x, @y);
   207 SDL_GetMouseState(@x, @y);