hedgewars/uLocale.pas
branchqmlfrontend
changeset 11403 b894922d58cc
parent 11200 08c6ccc28007
child 11544 b69f5f22a3ba
equal deleted inserted replaced
11076:fcbdee9cdd74 11403:b894922d58cc
    28 function  Format(fmt: shortstring; var arg: shortstring): shortstring;
    28 function  Format(fmt: shortstring; var arg: shortstring): shortstring;
    29 function  FormatA(fmt: ansistring; var arg: ansistring): ansistring;
    29 function  FormatA(fmt: ansistring; var arg: ansistring): ansistring;
    30 function  GetEventString(e: TEventId): ansistring;
    30 function  GetEventString(e: TEventId): ansistring;
    31 
    31 
    32 {$IFDEF HWLIBRARY}
    32 {$IFDEF HWLIBRARY}
    33 procedure LoadLocaleWrapper(str: pchar); cdecl; export;
    33 procedure LoadLocaleWrapper(path: pchar; filename: pchar); cdecl; export;
    34 {$ENDIF}
    34 {$ENDIF}
    35 
    35 
    36 implementation
    36 implementation
    37 uses uRandom, uUtils, uVariables, uDebug, uPhysFSLayer;
    37 uses uRandom, uUtils, uVariables, uDebug, uPhysFSLayer;
    38 
    38 
   131 else
   131 else
   132     FormatA:= copy(fmt, 1, i - 1) + arg + FormatA(copy(fmt, i + 2, Length(fmt) - i - 1), arg)
   132     FormatA:= copy(fmt, 1, i - 1) + arg + FormatA(copy(fmt, i + 2, Length(fmt) - i - 1), arg)
   133 end;
   133 end;
   134 
   134 
   135 {$IFDEF HWLIBRARY}
   135 {$IFDEF HWLIBRARY}
   136 procedure LoadLocaleWrapper(str: pchar); cdecl; export;
   136 procedure LoadLocaleWrapper(path: pchar; filename: pchar); cdecl; export;
   137 begin
   137 begin
   138     LoadLocale(Strpas(str));
   138 // FIXME
       
   139 {    PathPrefix := Strpas(path);
       
   140  
       
   141     uUtils.initModule(false);
       
   142     uVariables.initModule;
       
   143     uPhysFSLayer.initModule;
       
   144 } 
       
   145     LoadLocale(Strpas(filename));
       
   146 { 
       
   147     uPhysFSLayer.freeModule;
       
   148     uVariables.freeModule;
       
   149     uUtils.freeModule;}
   139 end;
   150 end;
   140 {$ENDIF}
   151 {$ENDIF}
   141 
   152 
   142 end.
   153 end.