Scriptified scoreboard drawing

This commit is contained in:
Ricardo Luís Vaz Silva 2025-05-19 02:52:17 -03:00
commit 706d1b6978
16 changed files with 617 additions and 415 deletions

View file

@ -564,6 +564,52 @@ DEFINE_ACTION_FUNCTION_NATIVE(FStringStruct, Substitute, StringSubst)
return 0;
}
static int StringCompare(FString *self, const FString &other)
{
return self->Compare(other);
}
DEFINE_ACTION_FUNCTION_NATIVE(FStringStruct, Compare, StringCompare)
{
PARAM_SELF_STRUCT_PROLOGUE(FString);
PARAM_STRING(other);
ACTION_RETURN_INT(StringCompare(self, other));
}
static int StringCompareNoCase(FString *self, const FString &other)
{
return self->CompareNoCase(other);
}
DEFINE_ACTION_FUNCTION_NATIVE(FStringStruct, CompareNoCase, StringCompareNoCase)
{
PARAM_SELF_STRUCT_PROLOGUE(FString);
PARAM_STRING(other);
ACTION_RETURN_INT(StringCompareNoCase(self, other));
}
static int StringIsEmpty(FString *self)
{
return self->IsEmpty();
}
DEFINE_ACTION_FUNCTION_NATIVE(FStringStruct, IsEmpty, StringIsEmpty)
{
PARAM_SELF_STRUCT_PROLOGUE(FString);
ACTION_RETURN_INT(StringIsEmpty(self));
}
static int StringIsNotEmpty(FString *self)
{
return self->IsNotEmpty();
}
DEFINE_ACTION_FUNCTION_NATIVE(FStringStruct, IsNotEmpty, StringIsNotEmpty)
{
PARAM_SELF_STRUCT_PROLOGUE(FString);
ACTION_RETURN_INT(StringIsNotEmpty(self));
}
static void StringStripRight(FString* self, const FString& junk)
{
if (junk.IsNotEmpty()) self->StripRight(junk);