hedgewars/uGearsHedgehog.pas
changeset 10116 dd27562b6f21
parent 10108 c68cf030eded
child 10123 64e72781d344
--- a/hedgewars/uGearsHedgehog.pas	Fri Feb 07 00:47:51 2014 +0400
+++ b/hedgewars/uGearsHedgehog.pas	Thu Feb 06 22:03:53 2014 +0100
@@ -185,23 +185,23 @@
         color:= Gear^.Hedgehog^.Team^.Clan^.Color;
         case Gear^.MsgParam of
             1: begin
-               AddCaption(FormatPChar(trmsg[sidBounce], trmsg[sidBounce1]), color, capgrpAmmostate);
+               AddCaption(FormatA(trmsg[sidBounce], trmsg[sidBounce1]), color, capgrpAmmostate);
                CurWeapon^.Bounciness:= 350;
                end;
             2: begin
-               AddCaption(FormatPChar(trmsg[sidBounce], trmsg[sidBounce2]), color, capgrpAmmostate);
+               AddCaption(FormatA(trmsg[sidBounce], trmsg[sidBounce2]), color, capgrpAmmostate);
                CurWeapon^.Bounciness:= 700;
                end;
             3: begin
-               AddCaption(FormatPChar(trmsg[sidBounce], trmsg[sidBounce3]), color, capgrpAmmostate);
+               AddCaption(FormatA(trmsg[sidBounce], trmsg[sidBounce3]), color, capgrpAmmostate);
                CurWeapon^.Bounciness:= 1000;
                end;
             4: begin
-               AddCaption(FormatPChar(trmsg[sidBounce], trmsg[sidBounce4]), color, capgrpAmmostate);
+               AddCaption(FormatA(trmsg[sidBounce], trmsg[sidBounce4]), color, capgrpAmmostate);
                CurWeapon^.Bounciness:= 2000;
                end;
             5: begin
-               AddCaption(FormatPChar(trmsg[sidBounce], trmsg[sidBounce5]), color, capgrpAmmostate);
+               AddCaption(FormatA(trmsg[sidBounce], trmsg[sidBounce5]), color, capgrpAmmostate);
                CurWeapon^.Bounciness:= 4000;
                end
             end
@@ -533,7 +533,7 @@
         if (Ammoz[a].Ammo.NumPerTurn >= MultiShootAttacks) then
             begin
             s:= inttostr(Ammoz[a].Ammo.NumPerTurn - MultiShootAttacks + 1);
-            AddCaption(formatPChar(trmsg[sidRemaining], Str2Pchar(s)), cWhiteColor, capgrpAmmostate);
+            AddCaption(format(trmsg[sidRemaining], s), cWhiteColor, capgrpAmmostate);
             end;
 
         if (Ammoz[a].Ammo.NumPerTurn >= MultiShootAttacks)
@@ -651,7 +651,7 @@
             s:= trammo[Ammoz[ammo].NameId] + ' (+' + IntToStr(cnt) + ')'
         else
             s:= trammo[Ammoz[ammo].NameId] + ' (+' + IntToStr(Ammoz[ammo].NumberInCase) + ')';
-        AddCaption(Str2PChar(s), HH.Team^.Clan^.Color, capgrpAmmoinfo);
+        AddCaption(s, HH.Team^.Clan^.Color, capgrpAmmoinfo);
 
         // show ammo icon
         vga:= AddVisualGear(X, Y, vgtAmmo);
@@ -714,7 +714,7 @@
                     HH^.Hedgehog^.Effects[hePoisoned] := 0;
                     str(Gear^.Health, s);
                     s:= '+' + s;
-                    AddCaption(Str2PChar(s), HH^.Hedgehog^.Team^.Clan^.Color, capgrpAmmoinfo);
+                    AddCaption(s, HH^.Hedgehog^.Team^.Clan^.Color, capgrpAmmoinfo);
                     RenderHealth(HH^.Hedgehog^);
                     RecountTeamHealth(HH^.Hedgehog^.Team);
 
@@ -1268,7 +1268,7 @@
                 Gear^.State:= (Gear^.State or gstHHDeath) and (not gstAnimation);
                 Gear^.doStep:= @doStepHedgehogDead;
                 // Death message
-                AddCaption(FormatPChar(GetEventString(eidDied), Str2PChar(Gear^.Hedgehog^.Name)), cWhiteColor, capgrpMessage);
+                AddCaption(Format(GetEventString(eidDied), Gear^.Hedgehog^.Name), cWhiteColor, capgrpMessage);
                 end;
             end
         else
@@ -1277,7 +1277,7 @@
             Gear^.doStep:= @doStepHedgehogGone;
 
             // Gone message
-            AddCaption(FormatPChar(GetEventString(eidGone), Str2PChar(Gear^.Hedgehog^.Name)), cWhiteColor, capgrpMessage);
+            AddCaption(Format(GetEventString(eidGone), Gear^.Hedgehog^.Name), cWhiteColor, capgrpMessage);
             end
         end;
     exit