hedgewars/uMisc.pas
changeset 316 57d50189ad86
parent 308 806c3b55500d
child 337 a46abb65eb0c
equal deleted inserted replaced
315:73003488240b 316:57d50189ad86
    88 function Min(a, b: integer): integer;
    88 function Min(a, b: integer): integer;
    89 function Max(a, b: integer): integer;
    89 function Max(a, b: integer): integer;
    90 procedure OutError(Msg: String; const isFatalError: boolean=false);
    90 procedure OutError(Msg: String; const isFatalError: boolean=false);
    91 procedure TryDo(Assert: boolean; Msg: string; isFatal: boolean);
    91 procedure TryDo(Assert: boolean; Msg: string; isFatal: boolean);
    92 procedure SDLTry(Assert: boolean; isFatal: boolean);
    92 procedure SDLTry(Assert: boolean; isFatal: boolean);
    93 function IntToStr(n: integer): shortstring;
    93 function IntToStr(n: LongInt): shortstring;
    94 function FloatToStr(n: Double): shortstring;
    94 function FloatToStr(n: Double): shortstring;
    95 function DxDy2Angle32(const _dY, _dX: Extended): integer;
    95 function DxDy2Angle32(const _dY, _dX: Extended): integer;
    96 function DxDy2AttackAngle(const _dY, _dX: Extended): integer;
    96 function DxDy2AttackAngle(const _dY, _dX: Extended): integer;
    97 procedure AdjustColor(var Color: Longword);
    97 procedure AdjustColor(var Color: Longword);
    98 {$IFDEF DEBUGFILE}
    98 {$IFDEF DEBUGFILE}
   154 procedure AdjustColor(var Color: Longword);
   154 procedure AdjustColor(var Color: Longword);
   155 begin
   155 begin
   156 Color:= SDL_MapRGB(PixelFormat, (Color shr 16) and $FF, (Color shr 8) and $FF, Color and $FF)
   156 Color:= SDL_MapRGB(PixelFormat, (Color shr 16) and $FF, (Color shr 8) and $FF, Color and $FF)
   157 end;
   157 end;
   158 
   158 
   159 function IntToStr(n: integer): shortstring;
   159 function IntToStr(n: LongInt): shortstring;
   160 begin
   160 begin
   161 str(n, Result)
   161 str(n, Result)
   162 end;
   162 end;
   163 
   163 
   164 function FloatToStr(n: Double): shortstring;
   164 function FloatToStr(n: Double): shortstring;