This commit is contained in:
Christoph Oelckers 2013-12-05 15:28:37 +01:00
commit 79ef119ae2
3 changed files with 7 additions and 4 deletions

View file

@ -57,7 +57,8 @@ FRenderStyle LegacyRenderStyles[STYLE_Count] =
/* STYLE_Add */ {{ STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_One, 0 }}, /* STYLE_Add */ {{ STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_One, 0 }},
/* STYLE_Shaded */ {{ STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_InvSrc, STYLEF_RedIsAlpha | STYLEF_ColorIsFixed }}, /* STYLE_Shaded */ {{ STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_InvSrc, STYLEF_RedIsAlpha | STYLEF_ColorIsFixed }},
/* STYLE_TranslucentStencil */{{ STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_InvSrc, STYLEF_ColorIsFixed }}, /* STYLE_TranslucentStencil */{{ STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_InvSrc, STYLEF_ColorIsFixed }},
/* STYLE_Shadow */{{ STYLEOP_Shadow, 0, 0, 0 }}, /* STYLE_Shadow */ {{ STYLEOP_Shadow, 0, 0, 0 }},
/* STYLE_Subtract*/ {{ STYLEOP_RevSub, STYLEALPHA_One, STYLEALPHA_One, 0 }},
}; };
#else #else
FRenderStyle LegacyRenderStyles[STYLE_Count]; FRenderStyle LegacyRenderStyles[STYLE_Count];
@ -74,7 +75,8 @@ static const BYTE Styles[STYLE_Count * 4] =
STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_One, 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_RedIsAlpha | STYLEF_ColorIsFixed,
STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_InvSrc, STYLEF_ColorIsFixed, STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_InvSrc, STYLEF_ColorIsFixed,
STYLEOP_Shadow, 0, 0, 0 STYLEOP_Shadow, 0, 0, 0,
STYLEOP_RevSub, STYLEALPHA_One, STYLEALPHA_One, 0,
}; };
static struct LegacyInit static struct LegacyInit

View file

@ -49,6 +49,7 @@ enum ERenderStyle
STYLE_Shaded, // Treat patch data as alpha values for alphacolor STYLE_Shaded, // Treat patch data as alpha values for alphacolor
STYLE_TranslucentStencil, STYLE_TranslucentStencil,
STYLE_Shadow, STYLE_Shadow,
STYLE_Subtract, // Actually this is 'reverse subtract' but this is what normal people would expect by 'subtract'.
STYLE_Count STYLE_Count
}; };

View file

@ -796,11 +796,11 @@ DEFINE_PROPERTY(renderstyle, S, Actor)
{ {
PROP_STRING_PARM(str, 0); PROP_STRING_PARM(str, 0);
static const char * renderstyles[]={ static const char * renderstyles[]={
"NONE","NORMAL","FUZZY","SOULTRANS","OPTFUZZY","STENCIL","TRANSLUCENT", "ADD","SHADED", NULL}; "NONE", "NORMAL", "FUZZY", "SOULTRANS", "OPTFUZZY", "STENCIL", "TRANSLUCENT", "ADD", "SHADED", "SUBTRACT", NULL };
static const int renderstyle_values[]={ static const int renderstyle_values[]={
STYLE_None, STYLE_Normal, STYLE_Fuzzy, STYLE_SoulTrans, STYLE_OptFuzzy, STYLE_None, STYLE_Normal, STYLE_Fuzzy, STYLE_SoulTrans, STYLE_OptFuzzy,
STYLE_TranslucentStencil, STYLE_Translucent, STYLE_Add, STYLE_Shaded}; STYLE_TranslucentStencil, STYLE_Translucent, STYLE_Add, STYLE_Shaded, STYLE_Subtract};
// make this work for old style decorations, too. // make this work for old style decorations, too.
if (!strnicmp(str, "style_", 6)) str+=6; if (!strnicmp(str, "style_", 6)) str+=6;