diff --git a/src/common/2d/v_draw.cpp b/src/common/2d/v_draw.cpp index 836bc228423..3d56829bac3 100644 --- a/src/common/2d/v_draw.cpp +++ b/src/common/2d/v_draw.cpp @@ -306,7 +306,7 @@ void DrawShape(F2DDrawer *drawer, FGameTexture *img, DShape2D *shape, VMVa_List drawer->AddShape(img, shape, parms); } -void DrawShapeFill(F2DDrawer *drawer, int color, double amount, DShape2D *shape, VMVa_List &args) +void DrawShapeFill(F2DDrawer *drawer, PalEntry color, double amount, DShape2D *shape, VMVa_List &args) { DrawParms parms; uint32_t tag = ListGetInt(args); @@ -827,7 +827,7 @@ static inline FSpecialColormap * ListGetSpecialColormap(VMVa_List &tags) //========================================================================== template -bool ParseDrawTextureTags(F2DDrawer *drawer, FGameTexture *img, double x, double y, uint32_t tag, T& tags, DrawParms *parms, int type, int fill, double fillalpha) +bool ParseDrawTextureTags(F2DDrawer *drawer, FGameTexture *img, double x, double y, uint32_t tag, T& tags, DrawParms *parms, int type, PalEntry fill, double fillalpha) { INTBOOL boolval; int intval; @@ -861,7 +861,7 @@ bool ParseDrawTextureTags(F2DDrawer *drawer, FGameTexture *img, double x, double parms->destwidth = INT_MAX; parms->destheight = INT_MAX; parms->Alpha = type == DrawTexture_Fill ? fillalpha : 1.f; - parms->fillcolor = type == DrawTexture_Fill ? fill : -1; + parms->fillcolor = type == DrawTexture_Fill ? fill : PalEntry(~0u); parms->TranslationId = -1; parms->colorOverlay = 0; parms->alphaChannel = false; @@ -1430,8 +1430,8 @@ bool ParseDrawTextureTags(F2DDrawer *drawer, FGameTexture *img, double x, double } // explicitly instantiate both versions for v_text.cpp. -template bool ParseDrawTextureTags(F2DDrawer* drawer, FGameTexture *img, double x, double y, uint32_t tag, Va_List& tags, DrawParms *parms, int type, int fill, double fillalpha); -template bool ParseDrawTextureTags(F2DDrawer* drawer, FGameTexture *img, double x, double y, uint32_t tag, VMVa_List& tags, DrawParms *parms, int type, int fill, double fillalpha); +template bool ParseDrawTextureTags(F2DDrawer* drawer, FGameTexture *img, double x, double y, uint32_t tag, Va_List& tags, DrawParms *parms, int type, PalEntry fill, double fillalpha); +template bool ParseDrawTextureTags(F2DDrawer* drawer, FGameTexture *img, double x, double y, uint32_t tag, VMVa_List& tags, DrawParms *parms, int type, PalEntry fill, double fillalpha); //========================================================================== // diff --git a/src/common/2d/v_draw.h b/src/common/2d/v_draw.h index 8626c1e4a51..686e5dc46db 100644 --- a/src/common/2d/v_draw.h +++ b/src/common/2d/v_draw.h @@ -266,7 +266,7 @@ enum }; template -bool ParseDrawTextureTags(F2DDrawer *drawer, FGameTexture* img, double x, double y, uint32_t tag, T& tags, DrawParms* parms, int type, int fill = -1, double fillalpha = 0.0); +bool ParseDrawTextureTags(F2DDrawer *drawer, FGameTexture* img, double x, double y, uint32_t tag, T& tags, DrawParms* parms, int type, PalEntry fill = ~0u, double fillalpha = 0.0); template void DrawTextCommon(F2DDrawer *drawer, FFont* font, int normalcolor, double x, double y, const T* string, DrawParms& parms);