- backend update from Raze.
This commit is contained in:
parent
97b8c0ccfb
commit
8a4fa8b65f
12 changed files with 100 additions and 19 deletions
|
|
@ -1006,6 +1006,22 @@ DEFINE_ACTION_FUNCTION_NATIVE(FDynArray_String, Push, ArrayPush<FDynArray_String
|
|||
ACTION_RETURN_INT(self->Push(val));
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(FDynArray_String, PushV)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(FDynArray_String);
|
||||
PARAM_VA_POINTER(va_reginfo); // Get the hidden type information array
|
||||
VMVa_List args = { param + 1, 0, numparam - 2, va_reginfo + 1 };
|
||||
while (args.curindex < args.numargs)
|
||||
{
|
||||
if (args.reginfo[args.curindex] == REGT_STRING)
|
||||
{
|
||||
self->Push(args.args[args.curindex++].s());
|
||||
}
|
||||
else ThrowAbortException(X_OTHER, "Invalid parameter in pushv, string expected");
|
||||
}
|
||||
ACTION_RETURN_INT(self->Size() - 1);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(FDynArray_String, Pop, ArrayPop<FDynArray_String>)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(FDynArray_String);
|
||||
|
|
|
|||
|
|
@ -81,10 +81,10 @@ DEFINE_ACTION_FUNCTION_NATIVE(DStatusBarCore, StatusbarToRealCoords, StatusbarTo
|
|||
return MIN(4, numret);
|
||||
}
|
||||
|
||||
void SBar_DrawTexture(DStatusBarCore* self, int texid, double x, double y, int flags, double alpha, double w, double h, double scaleX, double scaleY, int style)
|
||||
void SBar_DrawTexture(DStatusBarCore* self, int texid, double x, double y, int flags, double alpha, double w, double h, double scaleX, double scaleY, int style, int color, int translation, double clipwidth)
|
||||
{
|
||||
if (!twod->HasBegun2D()) ThrowAbortException(X_OTHER, "Attempt to draw to screen outside a draw function");
|
||||
self->DrawGraphic(FSetTextureID(texid), x, y, flags, alpha, w, h, scaleX, scaleY, ERenderStyle(style));
|
||||
self->DrawGraphic(FSetTextureID(texid), x, y, flags, alpha, w, h, scaleX, scaleY, ERenderStyle(style), color, translation, clipwidth);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(DStatusBarCore, DrawTexture, SBar_DrawTexture)
|
||||
|
|
@ -100,14 +100,17 @@ DEFINE_ACTION_FUNCTION_NATIVE(DStatusBarCore, DrawTexture, SBar_DrawTexture)
|
|||
PARAM_FLOAT(scaleX);
|
||||
PARAM_FLOAT(scaleY);
|
||||
PARAM_INT(style);
|
||||
SBar_DrawTexture(self, texid, x, y, flags, alpha, w, h, scaleX, scaleY, style);
|
||||
PARAM_INT(col);
|
||||
PARAM_INT(trans);
|
||||
PARAM_FLOAT(clipwidth);
|
||||
SBar_DrawTexture(self, texid, x, y, flags, alpha, w, h, scaleX, scaleY, style, col, trans, clipwidth);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SBar_DrawImage(DStatusBarCore* self, const FString& texid, double x, double y, int flags, double alpha, double w, double h, double scaleX, double scaleY, int style)
|
||||
void SBar_DrawImage(DStatusBarCore* self, const FString& texid, double x, double y, int flags, double alpha, double w, double h, double scaleX, double scaleY, int style, int color, int translation, double clipwidth)
|
||||
{
|
||||
if (!twod->HasBegun2D()) ThrowAbortException(X_OTHER, "Attempt to draw to screen outside a draw function");
|
||||
self->DrawGraphic(TexMan.CheckForTexture(texid, ETextureType::Any), x, y, flags, alpha, w, h, scaleX, scaleY, ERenderStyle(style));
|
||||
self->DrawGraphic(TexMan.CheckForTexture(texid, ETextureType::Any), x, y, flags, alpha, w, h, scaleX, scaleY, ERenderStyle(style), color, translation, clipwidth);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(DStatusBarCore, DrawImage, SBar_DrawImage)
|
||||
|
|
@ -123,10 +126,62 @@ DEFINE_ACTION_FUNCTION_NATIVE(DStatusBarCore, DrawImage, SBar_DrawImage)
|
|||
PARAM_FLOAT(scaleX);
|
||||
PARAM_FLOAT(scaleY);
|
||||
PARAM_INT(style);
|
||||
SBar_DrawImage(self, texid, x, y, flags, alpha, w, h, scaleX, scaleY, style);
|
||||
PARAM_INT(col);
|
||||
PARAM_INT(trans);
|
||||
PARAM_FLOAT(clipwidth);
|
||||
SBar_DrawImage(self, texid, x, y, flags, alpha, w, h, scaleX, scaleY, style, col, trans, clipwidth);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SBar_DrawImageRotated(DStatusBarCore* self, const FString& texid, double x, double y, int flags, double angle, double alpha, double scaleX, double scaleY, int style, int color, int translation)
|
||||
{
|
||||
if (!twod->HasBegun2D()) ThrowAbortException(X_OTHER, "Attempt to draw to screen outside a draw function");
|
||||
self->DrawRotated(TexMan.CheckForTexture(texid, ETextureType::Any), x, y, flags, angle, alpha, scaleX, scaleY, color, translation, (ERenderStyle)style);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(DStatusBarCore, DrawImageRotated, SBar_DrawImageRotated)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(DStatusBarCore);
|
||||
PARAM_STRING(texid);
|
||||
PARAM_FLOAT(x);
|
||||
PARAM_FLOAT(y);
|
||||
PARAM_INT(flags);
|
||||
PARAM_FLOAT(angle);
|
||||
PARAM_FLOAT(alpha);
|
||||
PARAM_FLOAT(scaleX);
|
||||
PARAM_FLOAT(scaleY);
|
||||
PARAM_INT(style);
|
||||
PARAM_INT(col);
|
||||
PARAM_INT(trans);
|
||||
SBar_DrawImageRotated(self, texid, x, y, flags, angle, alpha, scaleX, scaleY, style, col, trans);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SBar_DrawTextureRotated(DStatusBarCore* self, int texid, double x, double y, int flags, double angle, double alpha, double scaleX, double scaleY, int style, int color, int translation)
|
||||
{
|
||||
if (!twod->HasBegun2D()) ThrowAbortException(X_OTHER, "Attempt to draw to screen outside a draw function");
|
||||
self->DrawRotated(FSetTextureID(texid), x, y, flags, alpha, scaleX, scaleY, color, translation, style);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(DStatusBarCore, DrawTextureRotated, SBar_DrawTextureRotated)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(DStatusBarCore);
|
||||
PARAM_INT(texid);
|
||||
PARAM_FLOAT(x);
|
||||
PARAM_FLOAT(y);
|
||||
PARAM_INT(flags);
|
||||
PARAM_FLOAT(angle);
|
||||
PARAM_FLOAT(alpha);
|
||||
PARAM_FLOAT(scaleX);
|
||||
PARAM_FLOAT(scaleY);
|
||||
PARAM_INT(style);
|
||||
PARAM_INT(col);
|
||||
PARAM_INT(trans);
|
||||
SBar_DrawTextureRotated(self, texid, x, y, flags, angle, alpha, scaleX, scaleY, style, col, trans);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void SBar_DrawString(DStatusBarCore* self, DHUDFont* font, const FString& string, double x, double y, int flags, int trans, double alpha, int wrapwidth, int linespacing, double scaleX, double scaleY, int translation, int style);
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(DStatusBarCore, DrawString, SBar_DrawString)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue