diff -r cb0b750bd8a3 -r 8c5fa1d15bd5 hedgewars/uLocale.pas --- a/hedgewars/uLocale.pas Tue Feb 04 15:23:37 2014 +0100 +++ b/hedgewars/uLocale.pas Tue Feb 04 16:35:31 2014 +0100 @@ -25,6 +25,7 @@ const MAX_EVENT_STRINGS = 100; procedure LoadLocale(FileName: shortstring); +function FormatPChar(fmt: PChar; arg: PChar): PChar; function Format(fmt: shortstring; var arg: shortstring): shortstring; function FormatA(fmt: PChar; arg: ansistring): ansistring; function GetEventString(e: TEventId): PChar; @@ -109,6 +110,14 @@ GetEventString:= trevt[e][GetRandom(trevt_n[e])]; // Pick a random message and return it end; +function FormatPChar(fmt: PChar; arg: PChar): PChar; +var + s: shortstring; +begin + s:= arg; + FormatPChar:= Str2PChar(FormatA(fmt, s)); +end; + function Format(fmt: shortstring; var arg: shortstring): shortstring; var i: LongInt; begin