hedgewars/uLocale.pas
changeset 2863 9eb53b1f1842
parent 2747 7889a3a9724f
child 2903 e28356fe532a
equal deleted inserted replaced
2862:1d15ca7b7f64 2863:9eb53b1f1842
    36 
    36 
    37 	TEventId = (eidDied, eidDrowned, eidRoundStart, eidRoundWin, eidRoundDraw,
    37 	TEventId = (eidDied, eidDrowned, eidRoundStart, eidRoundWin, eidRoundDraw,
    38 			eidNewHealthPack, eidNewAmmoPack, eidNewUtilityPack, eidTurnSkipped, eidHurtSelf,
    38 			eidNewHealthPack, eidNewAmmoPack, eidNewUtilityPack, eidTurnSkipped, eidHurtSelf,
    39 			eidHomerun, eidFrozen);
    39 			eidHomerun, eidFrozen);
    40 
    40 
       
    41 	TGoalStrId = (gidCaption, gidSubCaption, gidForts, gidLowGravity, gidInvulnerable, gidVampiric, gidKarma, gidKing, gidPlaceHog, gidArtillery, gidSolidLand);
       
    42 
    41 const MAX_EVENT_STRINGS = 100;
    43 const MAX_EVENT_STRINGS = 100;
    42 var trammo: array[TAmmoStrId] of string;
    44 var trammo: array[TAmmoStrId] of string;
    43     trammoc: array[TAmmoStrId] of string;
    45     trammoc: array[TAmmoStrId] of string;
    44     trammod: array[TAmmoStrId] of string;
    46     trammod: array[TAmmoStrId] of string;
    45     trmsg: array[TMsgStrId] of string;
    47     trmsg: array[TMsgStrId] of string;
       
    48     trgoal: array[TGoalStrId] of string;
    46 
    49 
    47 procedure LoadLocale(FileName: string);
    50 procedure LoadLocale(FileName: string);
    48 function Format(fmt: shortstring; var arg: shortstring): shortstring;
    51 function Format(fmt: shortstring; var arg: shortstring): shortstring;
    49 
    52 
    50 function GetEventString(e: TEventId): string;
    53 function GetEventString(e: TEventId): string;
   101                trevt[TEventId(b)][trevt_n[TEventId(b)]]:= s;
   104                trevt[TEventId(b)][trevt_n[TEventId(b)]]:= s;
   102                inc(trevt_n[TEventId(b)]);
   105                inc(trevt_n[TEventId(b)]);
   103                end;
   106                end;
   104            3: if (b >=0) and (b <= ord(High(TAmmoStrId))) then trammoc[TAmmoStrId(b+1)]:= s;
   107            3: if (b >=0) and (b <= ord(High(TAmmoStrId))) then trammoc[TAmmoStrId(b+1)]:= s;
   105            4: if (b >=0) and (b <= ord(High(TAmmoStrId))) then trammod[TAmmoStrId(b+1)]:= s;
   108            4: if (b >=0) and (b <= ord(High(TAmmoStrId))) then trammod[TAmmoStrId(b+1)]:= s;
       
   109            5: if (b >=0) and (b <= ord(High(TGoalStrId))) then trgoal[TGoalStrId(b)]:= s;
   106            end;
   110            end;
   107        end;
   111        end;
   108    Close(f)
   112    Close(f)
   109    end;
   113    end;
   110 {$I+}
   114 {$I+}