hedgewars/uLocale.pas
changeset 2144 c76a2f7bd452
parent 2143 ad05f6b2d1c0
child 2177 c045698e044f
equal deleted inserted replaced
2143:ad05f6b2d1c0 2144:c76a2f7bd452
    52 procedure LoadLocale(FileName: string);
    52 procedure LoadLocale(FileName: string);
    53 var s: shortstring;
    53 var s: shortstring;
    54     f: textfile;
    54     f: textfile;
    55     a, b, c: LongInt;
    55     a, b, c: LongInt;
    56 	first: array[TEventId] of boolean;
    56 	first: array[TEventId] of boolean;
       
    57 	e: TEventId;
    57 begin
    58 begin
    58 
    59 
    59 // clear event locales
    60 for e:= Low(TEventId) to High(TEventId) do first[e]:= true;
    60 //for a:= 0 to ord(High(TEventId)) do trevt_n[TEventId(a)]:= 0;
       
    61 
       
    62 for a:= ord(Low(TEventId)) to ord(High(TEventId)) do first[TEventId(a)]:= true;
       
    63 
    61 
    64 {$I-}
    62 {$I-}
    65 Assign(f, FileName);
    63 Assign(f, FileName);
    66 reset(f);
    64 reset(f);
    67 TryDo(IOResult = 0, 'Cannot load locale "' + FileName + '"', true);
    65 TryDo(IOResult = 0, 'Cannot load locale "' + FileName + '"', true);