fix Screen.DrawShapeFill not properly setting renderstyle

This commit is contained in:
Alison Watson 2022-09-05 20:35:12 -06:00 committed by Christoph Oelckers
commit fb32ff45dd
3 changed files with 70 additions and 71 deletions

View file

@ -179,7 +179,7 @@ void DrawChar(F2DDrawer *drawer, FFont* font, int normalcolor, double x, double
DrawParms parms;
Va_List tags;
va_start(tags.list, tag_first);
bool res = ParseDrawTextureTags(drawer, pic, x, y, tag_first, tags, &parms, false);
bool res = ParseDrawTextureTags(drawer, pic, x, y, tag_first, tags, &parms, DrawTexture_Normal);
va_end(tags.list);
if (!res)
{
@ -208,7 +208,7 @@ void DrawChar(F2DDrawer *drawer, FFont *font, int normalcolor, double x, double
{
DrawParms parms;
uint32_t tag = ListGetInt(args);
bool res = ParseDrawTextureTags(drawer, pic, x, y, tag, args, &parms, false);
bool res = ParseDrawTextureTags(drawer, pic, x, y, tag, args, &parms, DrawTexture_Normal);
if (!res) return;
bool palettetrans = (normalcolor == CR_NATIVEPAL && parms.TranslationId != 0);
PalEntry color = 0xffffffff;
@ -261,7 +261,7 @@ DEFINE_ACTION_FUNCTION(FCanvas, DrawChar)
//==========================================================================
// This is only needed as a dummy. The code using wide strings does not need color control.
EColorRange V_ParseFontColor(const char32_t *&color_value, int normalcolor, int boldcolor) { return CR_UNTRANSLATED; }
EColorRange V_ParseFontColor(const char32_t *&color_value, int normalcolor, int boldcolor) { return CR_UNTRANSLATED; }
template<class chartype>
void DrawTextCommon(F2DDrawer *drawer, FFont *font, int normalcolor, double x, double y, const chartype *string, DrawParms &parms)
@ -374,7 +374,7 @@ void DrawText(F2DDrawer *drawer, FFont* font, int normalcolor, double x, double
return;
va_start(tags.list, tag_first);
bool res = ParseDrawTextureTags(drawer, nullptr, 0, 0, tag_first, tags, &parms, true);
bool res = ParseDrawTextureTags(drawer, nullptr, 0, 0, tag_first, tags, &parms, DrawTexture_Text);
va_end(tags.list);
if (!res)
{
@ -393,7 +393,7 @@ void DrawText(F2DDrawer *drawer, FFont* font, int normalcolor, double x, double
return;
va_start(tags.list, tag_first);
bool res = ParseDrawTextureTags(drawer, nullptr, 0, 0, tag_first, tags, &parms, true);
bool res = ParseDrawTextureTags(drawer, nullptr, 0, 0, tag_first, tags, &parms, DrawTexture_Text);
va_end(tags.list);
if (!res)
{
@ -411,7 +411,7 @@ void DrawText(F2DDrawer *drawer, FFont *font, int normalcolor, double x, double
return;
uint32_t tag = ListGetInt(args);
bool res = ParseDrawTextureTags(drawer, nullptr, 0, 0, tag, args, &parms, true);
bool res = ParseDrawTextureTags(drawer, nullptr, 0, 0, tag, args, &parms, DrawTexture_Text);
if (!res)
{
return;
@ -455,4 +455,3 @@ DEFINE_ACTION_FUNCTION(FCanvas, DrawText)
self->Tex->NeedUpdate();
return 0;
}