Implemented static methods in String struct. Implemented String.Format and String.AppendFormat. Implemented native vararg methods for the future.

This commit is contained in:
ZZYZX 2017-01-21 02:07:44 +02:00 committed by Christoph Oelckers
commit 6f5fff00a0
14 changed files with 213 additions and 312 deletions

View file

@ -50,7 +50,7 @@ extend class PlayerPawn
let player = self.player;
if (PlayerNumber() != consoleplayer)
A_Log(format ("%s is a cheater: give %s\n", player.GetUserName(), name));
A_Log(String.Format ("%s is a cheater: give %s\n", player.GetUserName(), name));
if (player.mo == NULL || player.health <= 0)
{
@ -254,7 +254,7 @@ extend class PlayerPawn
if (type == NULL)
{
if (PlayerNumber() == consoleplayer)
A_Log(format("Unknown item \"%s\"\n", name));
A_Log(String.Format("Unknown item \"%s\"\n", name));
}
else
{
@ -391,7 +391,7 @@ extend class PlayerPawn
if (type == NULL)
{
if (PlayerNumber() == consoleplayer)
A_Log(format("Unknown item \"%s\"\n", name));
A_Log(String.Format("Unknown item \"%s\"\n", name));
}
else
{

View file

@ -159,7 +159,7 @@ class CustomSprite : Actor
String name;
Super.BeginPlay ();
format(name, "BTIL%04d", args[0] & 0xffff);
//format(name, "BTIL%04d", args[0] & 0xffff); // note: this does NOTHING and did NOTHING. what?
picnum = TexMan.CheckForTexture (name, TexMan.TYPE_Build);
if (!picnum.Exists())
{

View file

@ -115,7 +115,7 @@ class SkyPicker : Actor
if (box == null && args[0] != 0)
{
A_Log(format("Can't find SkyViewpoint %d for sector %d\n", args[0], CurSector.Index()));
A_Log(String.Format("Can't find SkyViewpoint %d for sector %d\n", args[0], CurSector.Index()));
}
else
{