hedgewars/uUtils.pas
branchhedgeroid
changeset 5286 22c1f4833a86
parent 5239 f34f391a223b
child 5299 ab899b056f77
equal deleted inserted replaced
5284:34abd278344e 5286:22c1f4833a86
    19 {$INCLUDE "options.inc"}
    19 {$INCLUDE "options.inc"}
    20 
    20 
    21 unit uUtils;
    21 unit uUtils;
    22 
    22 
    23 interface
    23 interface
    24 uses uTypes, uFloat, GLunit;
    24 uses uTypes, uFloat, GLunit, uConsole;
    25 
    25 
    26 procedure SplitBySpace(var a, b: shortstring);
    26 procedure SplitBySpace(var a, b: shortstring);
    27 procedure SplitByChar(var a, b: ansistring; c: char);
    27 procedure SplitByChar(var a, b: ansistring; c: char);
    28 
    28 
    29 function  EnumToStr(const en : TGearType) : shortstring; overload;
    29 function  EnumToStr(const en : TGearType) : shortstring; overload;
   259 
   259 
   260 
   260 
   261 procedure AddFileLog(s: shortstring);
   261 procedure AddFileLog(s: shortstring);
   262 begin
   262 begin
   263 s:= s;
   263 s:= s;
       
   264 WriteToConsole(s);
   264 {$IFDEF DEBUGFILE}
   265 {$IFDEF DEBUGFILE}
       
   266 {$IFDEF ANDROID}
       
   267  WriteToConsole(s);
       
   268 {$ELSE}
   265 writeln(f, GameTicks: 6, ': ', s);
   269 writeln(f, GameTicks: 6, ': ', s);
   266 flush(f)
   270 flush(f)
       
   271 {$ENDIF}
   267 {$ENDIF}
   272 {$ENDIF}
   268 end;
   273 end;
   269 
   274 
   270 
   275 
   271 function CheckCJKFont(s: ansistring; font: THWFont): THWFont;
   276 function CheckCJKFont(s: ansistring; font: THWFont): THWFont;