mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 04:22:34 +00:00
- fixed the reginfo checks for the Draw... functions.
They need to be offset by the same amount as the arguments so that the values are properly matched.
This commit is contained in:
parent
8bc2d50ad2
commit
108874f379
2 changed files with 4 additions and 4 deletions
|
@ -176,7 +176,7 @@ DEFINE_ACTION_FUNCTION(_Screen, DrawTexture)
|
|||
if (!screen->HasBegun2D()) ThrowAbortException(X_OTHER, "Attempt to draw to screen outside a draw function");
|
||||
|
||||
FTexture *tex = animate ? TexMan(FSetTextureID(texid)) : TexMan[FSetTextureID(texid)];
|
||||
VMVa_List args = { param + 4, 0, numparam - 5, va_reginfo };
|
||||
VMVa_List args = { param + 4, 0, numparam - 5, va_reginfo + 4 };
|
||||
screen->DrawTexture(tex, x, y, args);
|
||||
return 0;
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ DEFINE_ACTION_FUNCTION(_Screen, DrawShape)
|
|||
if (!screen->HasBegun2D()) ThrowAbortException(X_OTHER, "Attempt to draw to screen outside a draw function");
|
||||
|
||||
FTexture *tex = animate ? TexMan(FSetTextureID(texid)) : TexMan[FSetTextureID(texid)];
|
||||
VMVa_List args = { param + 3, 0, numparam - 4, va_reginfo };
|
||||
VMVa_List args = { param + 3, 0, numparam - 4, va_reginfo + 3 };
|
||||
|
||||
screen->DrawShape(tex, shape, args);
|
||||
return 0;
|
||||
|
|
|
@ -194,7 +194,7 @@ DEFINE_ACTION_FUNCTION(_Screen, DrawChar)
|
|||
PARAM_VA_POINTER(va_reginfo) // Get the hidden type information array
|
||||
|
||||
if (!screen->HasBegun2D()) ThrowAbortException(X_OTHER, "Attempt to draw to screen outside a draw function");
|
||||
VMVa_List args = { param + 5, 0, numparam - 6, va_reginfo };
|
||||
VMVa_List args = { param + 5, 0, numparam - 6, va_reginfo + 5 };
|
||||
screen->DrawChar(font, cr, x, y, chr, args);
|
||||
return 0;
|
||||
}
|
||||
|
@ -326,7 +326,7 @@ DEFINE_ACTION_FUNCTION(_Screen, DrawText)
|
|||
PARAM_VA_POINTER(va_reginfo) // Get the hidden type information array
|
||||
|
||||
if (!screen->HasBegun2D()) ThrowAbortException(X_OTHER, "Attempt to draw to screen outside a draw function");
|
||||
VMVa_List args = { param + 5, 0, numparam - 6, va_reginfo };
|
||||
VMVa_List args = { param + 5, 0, numparam - 6, va_reginfo + 5 };
|
||||
const char *txt = chr[0] == '$' ? GStrings(&chr[1]) : chr.GetChars();
|
||||
screen->DrawText(font, cr, x, y, txt, args);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue