hedgewars/uLocale.pas
branchwebgl
changeset 8444 75db7bb8dce8
parent 8330 aaefa587e277
parent 8370 0c79946e96f8
child 8850 ae8a957c69fd
equal deleted inserted replaced
8340:46a9fde631f4 8444:75db7bb8dce8
    38 
    38 
    39 var trevt: array[TEventId] of array [0..Pred(MAX_EVENT_STRINGS)] of ansistring;
    39 var trevt: array[TEventId] of array [0..Pred(MAX_EVENT_STRINGS)] of ansistring;
    40     trevt_n: array[TEventId] of integer;
    40     trevt_n: array[TEventId] of integer;
    41 
    41 
    42 procedure LoadLocale(FileName: shortstring);
    42 procedure LoadLocale(FileName: shortstring);
    43 var s: ansistring;
    43 var s: ansistring = '';
    44     f: pfsFile;
    44     f: pfsFile;
    45     a, b, c: LongInt;
    45     a, b, c: LongInt;
    46     first: array[TEventId] of boolean;
    46     first: array[TEventId] of boolean;
    47     e: TEventId;
    47     e: TEventId;
    48     loaded: boolean;
       
    49 begin
    48 begin
    50 loaded:= false;
       
    51 for e:= Low(TEventId) to High(TEventId) do
    49 for e:= Low(TEventId) to High(TEventId) do
    52     first[e]:= true;
    50     first[e]:= true;
    53 
    51 
    54 f:= pfsOpenRead(FileName);
    52 f:= pfsOpenRead(FileName);
    55 TryDo(f <> nil, 'Cannot load locale "' + FileName + '"', false);
    53 TryDo(f <> nil, 'Cannot load locale "' + FileName + '"', false);