mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 15:02:01 +00:00
Removed special initialization of legacy render styles
Workaround for Apple's GCC 4.0.1 is now completely pointless
This commit is contained in:
parent
5187acd44f
commit
bb9cd1b159
1 changed files with 0 additions and 39 deletions
|
@ -42,9 +42,6 @@ CVAR (Int, r_drawfuzz, 1, CVAR_ARCHIVE)
|
||||||
|
|
||||||
// Convert legacy render styles to flexible render styles.
|
// Convert legacy render styles to flexible render styles.
|
||||||
|
|
||||||
// Apple's GCC 4.0.1 apparently wants to initialize the AsDWORD member of FRenderStyle
|
|
||||||
// rather than the struct before it, which goes against the standard.
|
|
||||||
#ifndef __APPLE__
|
|
||||||
FRenderStyle LegacyRenderStyles[STYLE_Count] =
|
FRenderStyle LegacyRenderStyles[STYLE_Count] =
|
||||||
{
|
{
|
||||||
{ { STYLEOP_None, STYLEALPHA_Zero, STYLEALPHA_Zero, 0 } }, /* STYLE_None */
|
{ { STYLEOP_None, STYLEALPHA_Zero, STYLEALPHA_Zero, 0 } }, /* STYLE_None */
|
||||||
|
@ -62,42 +59,6 @@ FRenderStyle LegacyRenderStyles[STYLE_Count] =
|
||||||
{ { STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_One, STYLEF_ColorIsFixed } }, /* STYLE_AddStencil */
|
{ { STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_One, STYLEF_ColorIsFixed } }, /* STYLE_AddStencil */
|
||||||
{ { STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_One, STYLEF_RedIsAlpha | STYLEF_ColorIsFixed } }, /* STYLE_AddShaded */
|
{ { STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_One, STYLEF_RedIsAlpha | STYLEF_ColorIsFixed } }, /* STYLE_AddShaded */
|
||||||
};
|
};
|
||||||
#else
|
|
||||||
FRenderStyle LegacyRenderStyles[STYLE_Count];
|
|
||||||
|
|
||||||
static const uint8_t Styles[STYLE_Count * 4] =
|
|
||||||
{
|
|
||||||
STYLEOP_None, STYLEALPHA_Zero, STYLEALPHA_Zero, 0,
|
|
||||||
STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_InvSrc, STYLEF_Alpha1,
|
|
||||||
STYLEOP_Fuzz, STYLEALPHA_Src, STYLEALPHA_InvSrc, 0,
|
|
||||||
STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_InvSrc, STYLEF_TransSoulsAlpha,
|
|
||||||
STYLEOP_FuzzOrAdd, STYLEALPHA_Src, STYLEALPHA_InvSrc, 0,
|
|
||||||
STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_InvSrc, STYLEF_Alpha1 | STYLEF_ColorIsFixed,
|
|
||||||
STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_InvSrc, 0,
|
|
||||||
STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_One, 0,
|
|
||||||
STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_InvSrc, STYLEF_RedIsAlpha | STYLEF_ColorIsFixed,
|
|
||||||
STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_InvSrc, STYLEF_ColorIsFixed,
|
|
||||||
STYLEOP_Shadow, 0, 0, 0,
|
|
||||||
STYLEOP_RevSub, STYLEALPHA_Src, STYLEALPHA_One, 0,
|
|
||||||
STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_One, STYLEF_Alpha1 | STYLEF_ColorIsFixed,
|
|
||||||
STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_One, STYLEF_RedIsAlpha | STYLEF_ColorIsFixed,
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct LegacyInit
|
|
||||||
{
|
|
||||||
LegacyInit()
|
|
||||||
{
|
|
||||||
for (int i = 0; i < STYLE_Count; ++i)
|
|
||||||
{
|
|
||||||
LegacyRenderStyles[i].BlendOp = Styles[i*4];
|
|
||||||
LegacyRenderStyles[i].SrcAlpha = Styles[i*4+1];
|
|
||||||
LegacyRenderStyles[i].DestAlpha = Styles[i*4+2];
|
|
||||||
LegacyRenderStyles[i].Flags = Styles[i*4+3];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} DoLegacyInit;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
double GetAlpha(int type, double alpha)
|
double GetAlpha(int type, double alpha)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue