rename PrintString to PrintfEx and make it a vararg function

This commit is contained in:
Ricardo Luís Vaz Silva 2022-07-11 13:10:06 -03:00 committed by Christoph Oelckers
parent 03c8da8a44
commit 365131e1e3
2 changed files with 6 additions and 4 deletions

View file

@ -1009,13 +1009,15 @@ DEFINE_ACTION_FUNCTION(_Console, Printf)
return 0;
}
DEFINE_ACTION_FUNCTION(_Console, PrintString)
DEFINE_ACTION_FUNCTION(_Console, PrintfEx)
{
PARAM_PROLOGUE;
PARAM_INT(printlevel);
PARAM_STRING(str);
PARAM_VA_POINTER(va_reginfo) // Get the hidden type information array
Printf(printlevel,"%s\n", str.GetChars());
FString s = FStringFormat(VM_ARGS_NAMES,1);
Printf(printlevel,"%s\n", s.GetChars());
return 0;
}

View file

@ -615,7 +615,7 @@ struct Console native
PRINT_NOTIFY = 4096, // Flag - add to game-native notify display - messages without this only go to the generic notification buffer.
};
native static void PrintString(int printlevel, string str);
native static vararg void PrintfEx(int printlevel, string fmt, ...);
}
struct CVar native