make explicit for pas2c some string casts that fpc was probably doing automatically
authornemo
Tue, 09 Oct 2018 09:02:39 -0400
changeset 13881 aa321e51da14
parent 13880 f81fad2f0e70
child 13882 8c702a4839ec
make explicit for pas2c some string casts that fpc was probably doing automatically
hedgewars/uGears.pas
hedgewars/uGearsHedgehog.pas
hedgewars/uInputHandler.pas
hedgewars/uScript.pas
hedgewars/uStore.pas
--- a/hedgewars/uGears.pas	Sun Oct 07 18:37:30 2018 +0200
+++ b/hedgewars/uGears.pas	Tue Oct 09 09:02:39 2018 -0400
@@ -1221,7 +1221,7 @@
                 Gear^.Text:= text;
                 Gear^.FrameTicks:= x
                 end;
-            AddChatString(#9+Format(trmsg[sidChatHog], HH^.Name, text));
+            AddChatString(#9+Format(shortstring(trmsg[sidChatHog]), HH^.Name, text));
             end
         end
     else if (x >= 4) then
--- a/hedgewars/uGearsHedgehog.pas	Sun Oct 07 18:37:30 2018 +0200
+++ b/hedgewars/uGearsHedgehog.pas	Tue Oct 09 09:02:39 2018 -0400
@@ -51,7 +51,7 @@
     t:= 0;
     while (TeamsArray[t] <> CurrentTeam) do inc(t);
 
-    AddChatString(#2 + Format(trmsg[sidAutoSkip], CurrentTeam^.TeamName));
+    AddChatString(#2 + Format(shortstring(trmsg[sidAutoSkip]), CurrentTeam^.TeamName));
 
     ParseCommand('/skip', true)
 end;
@@ -584,7 +584,7 @@
                     speech^.Text:= SpeechText;
                     speech^.Hedgehog:= Gear^.Hedgehog;
                     speech^.FrameTicks:= SpeechType;
-                    AddChatString(#9+Format(trmsg[sidChatHog], Gear^.Hedgehog^.Name, SpeechText));
+                    AddChatString(#9+Format(shortstring(trmsg[sidChatHog]), Gear^.Hedgehog^.Name, SpeechText));
                     end;
                 SpeechText:= ''
                 end;
--- a/hedgewars/uInputHandler.pas	Sun Oct 07 18:37:30 2018 +0200
+++ b/hedgewars/uInputHandler.pas	Tue Oct 09 09:02:39 2018 -0400
@@ -357,7 +357,7 @@
     RegisterBind(DefaultBinds, _S'`', 'history');
     RegisterBind(DefaultBinds, 'delete', 'rotmask');
     RegisterBind(DefaultBinds, 'home', 'rottags');
-    RegisterBind(DefaultBinds, 'm', '+mission');
+    RegisterBind(DefaultBinds, _S'm', '+mission');
 
     //numpad
     //DefaultBinds[265]:= '+volup';
@@ -382,7 +382,7 @@
 
     for i:= 1 to 10 do RegisterBind(DefaultBinds, 'f'+IntToStr(i), 'slot '+char(48+i));
     for i:= 1 to 5  do RegisterBind(DefaultBinds, IntToStr(i), 'timer '+IntToStr(i));
-    RegisterBind(DefaultBinds, 'n', 'timer_u');
+    RegisterBind(DefaultBinds, _S'n', 'timer_u');
 
     RegisterBind(DefaultBinds, 'mousel', '/put');
     RegisterBind(DefaultBinds, 'mouser', 'ammomenu');
--- a/hedgewars/uScript.pas	Sun Oct 07 18:37:30 2018 +0200
+++ b/hedgewars/uScript.pas	Tue Oct 09 09:02:39 2018 -0400
@@ -1651,7 +1651,7 @@
                vgear^.Text:= lua_tostring(L, 2);
                if Gear^.Kind = gtHedgehog then
                    begin
-                   AddChatString(#9+Format(trmsg[sidChatHog], gear^.Hedgehog^.Name, vgear^.text));
+                   AddChatString(#9+Format(shortstring(trmsg[sidChatHog]), gear^.Hedgehog^.Name, vgear^.text));
                    vgear^.Hedgehog:= gear^.Hedgehog
                    end
                else vgear^.Frame:= gear^.uid;
--- a/hedgewars/uStore.pas	Sun Oct 07 18:37:30 2018 +0200
+++ b/hedgewars/uStore.pas	Tue Oct 09 09:02:39 2018 -0400
@@ -511,7 +511,7 @@
     AFKTexture:= RenderStringTex(trmsg[sidAFK], cCentralMessageColor, fntBig);
     keyConfirm:= KeyBindToName('confirm');
     keyQuit:= KeyBindToName('quit');
-    ConfirmTexture:= RenderStringTex(Format(trmsg[sidConfirm], keyConfirm, keyQuit), cCentralMessageColor, fntBig);
+    ConfirmTexture:= RenderStringTex(FormatA(trmsg[sidConfirm], ansistring(keyConfirm), ansistring(keyQuit)), cCentralMessageColor, fntBig);
     SyncTexture:= RenderStringTex(trmsg[sidSync], cCentralMessageColor, fntBig);
 
     if not reload then
@@ -533,7 +533,7 @@
     // number of weapons in ammo menu
     for i:= Low(CountTexz) to High(CountTexz) do
         begin
-        tmpsurf:= TTF_RenderUTF8_Blended(Fontz[fnt16].Handle, Str2PChar(Format(trmsg[sidAmmoCount], IntToStr(i))), cWhiteColorChannels);
+        tmpsurf:= TTF_RenderUTF8_Blended(Fontz[fnt16].Handle, Str2PChar(Format(shortstring(trmsg[sidAmmoCount]), IntToStr(i))), cWhiteColorChannels);
         tmpsurf:= doSurfaceConversion(tmpsurf);
         FreeAndNilTexture(CountTexz[i]);
         CountTexz[i]:= Surface2Tex(tmpsurf, false);