- wrap the va_list that gets passed around by the Draw functions into a struct so that the templates can use reliable, identical semantics for both this and the VM's arg list.
This commit is contained in:
parent
a4dbbf6969
commit
d90f2ba1fa
3 changed files with 25 additions and 20 deletions
|
|
@ -129,12 +129,12 @@ static int PalFromRGB(uint32 rgb)
|
|||
|
||||
void DCanvas::DrawTexture (FTexture *img, double x, double y, int tags_first, ...)
|
||||
{
|
||||
va_list tags;
|
||||
va_start(tags, tags_first);
|
||||
Va_List tags;
|
||||
va_start(tags.list, tags_first);
|
||||
DrawParms parms;
|
||||
|
||||
bool res = ParseDrawTextureTags(img, x, y, tags_first, tags, &parms, false);
|
||||
va_end(tags);
|
||||
va_end(tags.list);
|
||||
if (!res)
|
||||
{
|
||||
return;
|
||||
|
|
@ -457,30 +457,30 @@ bool DCanvas::SetTextureParms(DrawParms *parms, FTexture *img, double xx, double
|
|||
return false;
|
||||
}
|
||||
|
||||
static void ListEnd(va_list &tags)
|
||||
static void ListEnd(Va_List &tags)
|
||||
{
|
||||
va_end(tags);
|
||||
va_end(tags.list);
|
||||
}
|
||||
|
||||
static int ListGetInt(va_list &tags)
|
||||
static int ListGetInt(Va_List &tags)
|
||||
{
|
||||
return va_arg(tags, int);
|
||||
return va_arg(tags.list, int);
|
||||
}
|
||||
|
||||
static inline double ListGetDouble(va_list &tags)
|
||||
static inline double ListGetDouble(Va_List &tags)
|
||||
{
|
||||
return va_arg(tags, double);
|
||||
return va_arg(tags.list, double);
|
||||
}
|
||||
|
||||
// These two options are only being used by the D3D version of the HUD weapon drawer, they serve no purpose anywhere else.
|
||||
static inline FSpecialColormap * ListGetSpecialColormap(va_list &tags)
|
||||
static inline FSpecialColormap * ListGetSpecialColormap(Va_List &tags)
|
||||
{
|
||||
return va_arg(tags, FSpecialColormap *);
|
||||
return va_arg(tags.list, FSpecialColormap *);
|
||||
}
|
||||
|
||||
static inline FColormapStyle * ListGetColormapStyle(va_list &tags)
|
||||
static inline FColormapStyle * ListGetColormapStyle(Va_List &tags)
|
||||
{
|
||||
return va_arg(tags, FColormapStyle *);
|
||||
return va_arg(tags.list, FColormapStyle *);
|
||||
}
|
||||
|
||||
static void ListEnd(VMVa_List &tags)
|
||||
|
|
@ -946,7 +946,7 @@ bool DCanvas::ParseDrawTextureTags(FTexture *img, double x, double y, DWORD tag,
|
|||
}
|
||||
// explicitly instantiate both versions for v_text.cpp.
|
||||
|
||||
template bool DCanvas::ParseDrawTextureTags<va_list>(FTexture *img, double x, double y, DWORD tag, va_list& tags, DrawParms *parms, bool fortext) const;
|
||||
template bool DCanvas::ParseDrawTextureTags<Va_List>(FTexture *img, double x, double y, DWORD tag, Va_List& tags, DrawParms *parms, bool fortext) const;
|
||||
template bool DCanvas::ParseDrawTextureTags<VMVa_List>(FTexture *img, double x, double y, DWORD tag, VMVa_List& tags, DrawParms *parms, bool fortext) const;
|
||||
|
||||
void DCanvas::VirtualToRealCoords(double &x, double &y, double &w, double &h,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue