hedgewars/uLocale.pas
changeset 83 207c85fbef51
parent 82 2f4f3236cccc
child 108 08f1fe6f21f8
--- a/hedgewars/uLocale.pas	Sun Jul 23 21:22:44 2006 +0000
+++ b/hedgewars/uLocale.pas	Mon Jul 24 14:03:51 2006 +0000
@@ -35,12 +35,13 @@
 interface
 type TAmmoStrId = (sidGrenade, sidClusterBomb, sidBazooka, sidUFO, sidShotgun,
                    sidPickHammer, sidSkip, sidRope, sidMine, sidDEagle,
-                   sidDynamite, sidBaseballBat, sidFirePunch);
-     TMsgStrId = (sidStartFight, sidSeconds);
+                   sidDynamite, sidBaseballBat, sidFirePunch, sidSeconds);
+     TMsgStrId = (sidStartFight, sidDraw, sidWinner);
 var trammo: array[TAmmoStrId] of shortstring;
     trmsg: array[TMsgStrId] of shortstring;
 
 procedure LoadLocale(FileName: string);
+function Format(fmt: shortstring; var arg: shortstring): shortstring;
 
 implementation
 uses uMisc;
@@ -76,4 +77,12 @@
 {$I+}
 end;
 
+function Format(fmt: shortstring; var arg: shortstring): shortstring;
+var i: integer;
+begin
+i:= Pos('%1', fmt);
+if i = 0 then Result:= fmt
+         else Result:= copy(fmt, 1, i - 1) + arg + Format(copy(fmt, i + 2, Length(fmt) - i - 1), arg)
+end;
+
 end.