mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-15 08:41:46 +00:00
Fix variable arg bindings
Always clear the drawer
This commit is contained in:
parent
0049fea8d6
commit
aa083604e1
4 changed files with 7 additions and 5 deletions
|
@ -272,7 +272,7 @@ DEFINE_ACTION_FUNCTION(FCanvas, DrawTexture)
|
||||||
PARAM_VA_POINTER(va_reginfo) // Get the hidden type information array
|
PARAM_VA_POINTER(va_reginfo) // Get the hidden type information array
|
||||||
|
|
||||||
auto tex = TexMan.GameByIndex(texid, animate);
|
auto tex = TexMan.GameByIndex(texid, animate);
|
||||||
VMVa_List args = { param + 4, 0, numparam - 5, va_reginfo + 4 };
|
VMVa_List args = { param + 5, 0, numparam - 6, va_reginfo + 5 };
|
||||||
DoDrawTexture(self->Drawer.get(), tex, x, y, args);
|
DoDrawTexture(self->Drawer.get(), tex, x, y, args);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -346,7 +346,7 @@ DEFINE_ACTION_FUNCTION(FCanvas, DrawShape)
|
||||||
PARAM_VA_POINTER(va_reginfo) // Get the hidden type information array
|
PARAM_VA_POINTER(va_reginfo) // Get the hidden type information array
|
||||||
|
|
||||||
auto tex = TexMan.GameByIndex(texid, animate);
|
auto tex = TexMan.GameByIndex(texid, animate);
|
||||||
VMVa_List args = { param + 3, 0, numparam - 4, va_reginfo + 3 };
|
VMVa_List args = { param + 4, 0, numparam - 5, va_reginfo + 4 };
|
||||||
|
|
||||||
DrawShape(self->Drawer.get(), tex, shape, args);
|
DrawShape(self->Drawer.get(), tex, shape, args);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -380,7 +380,7 @@ DEFINE_ACTION_FUNCTION(FCanvas, DrawShapeFill)
|
||||||
|
|
||||||
PARAM_VA_POINTER(va_reginfo) // Get the hidden type information array
|
PARAM_VA_POINTER(va_reginfo) // Get the hidden type information array
|
||||||
|
|
||||||
VMVa_List args = { param + 3, 0, numparam - 4, va_reginfo + 3 };
|
VMVa_List args = { param + 4, 0, numparam - 5, va_reginfo + 4 };
|
||||||
|
|
||||||
color.a = int(amount * 255.0f);
|
color.a = int(amount * 255.0f);
|
||||||
|
|
||||||
|
|
|
@ -246,7 +246,7 @@ DEFINE_ACTION_FUNCTION(FCanvas, DrawChar)
|
||||||
|
|
||||||
PARAM_VA_POINTER(va_reginfo) // Get the hidden type information array
|
PARAM_VA_POINTER(va_reginfo) // Get the hidden type information array
|
||||||
|
|
||||||
VMVa_List args = { param + 5, 0, numparam - 6, va_reginfo + 5 };
|
VMVa_List args = { param + 6, 0, numparam - 7, va_reginfo + 6 };
|
||||||
DrawChar(self->Drawer.get(), font, cr, x, y, chr, args);
|
DrawChar(self->Drawer.get(), font, cr, x, y, chr, args);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -448,7 +448,7 @@ DEFINE_ACTION_FUNCTION(FCanvas, DrawText)
|
||||||
|
|
||||||
PARAM_VA_POINTER(va_reginfo) // Get the hidden type information array
|
PARAM_VA_POINTER(va_reginfo) // Get the hidden type information array
|
||||||
|
|
||||||
VMVa_List args = { param + 5, 0, numparam - 6, va_reginfo + 5 };
|
VMVa_List args = { param + 6, 0, numparam - 7, va_reginfo + 6 };
|
||||||
const char *txt = chr[0] == '$' ? GStrings(&chr[1]) : chr.GetChars();
|
const char *txt = chr[0] == '$' ? GStrings(&chr[1]) : chr.GetChars();
|
||||||
DrawText(self->Drawer.get(), font, cr, x, y, txt, args);
|
DrawText(self->Drawer.get(), font, cr, x, y, txt, args);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -233,6 +233,7 @@ void OpenGLFrameBuffer::RenderTextureView(FCanvasTexture* tex, std::function<voi
|
||||||
if (tex->Drawer)
|
if (tex->Drawer)
|
||||||
{
|
{
|
||||||
::Draw2D(tex->Drawer.get(), gl_RenderState);
|
::Draw2D(tex->Drawer.get(), gl_RenderState);
|
||||||
|
tex->Drawer->Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
GLRenderer->EndOffscreen();
|
GLRenderer->EndOffscreen();
|
||||||
|
|
|
@ -218,6 +218,7 @@ void VulkanFrameBuffer::RenderTextureView(FCanvasTexture* tex, std::function<voi
|
||||||
if (tex->Drawer)
|
if (tex->Drawer)
|
||||||
{
|
{
|
||||||
::Draw2D(tex->Drawer.get(), *mRenderState);
|
::Draw2D(tex->Drawer.get(), *mRenderState);
|
||||||
|
tex->Drawer->Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
mRenderState->EndRenderPass();
|
mRenderState->EndRenderPass();
|
||||||
|
|
Loading…
Reference in a new issue