hedgewars/uLocale.pas
changeset 8370 0c79946e96f8
parent 8107 ee21b816394f
child 8444 75db7bb8dce8
child 9080 9b42757d7e71
equal deleted inserted replaced
8369:31033e521653 8370:0c79946e96f8
    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);