pass ScriptPosition down to color parser functions

This commit is contained in:
vidaritos 2020-09-18 17:53:45 +02:00 committed by Christoph Oelckers
parent e74b9f1955
commit 0adbb8d631
2 changed files with 5 additions and 5 deletions

View file

@ -324,7 +324,7 @@ int MatchString (const char *in, const char **strings);
#define PROP_DOUBLE_PARM(var, no) \
double var = params[(no)+1].d;
#define PROP_COLOR_PARM(var, no) \
int var = params[(no)+1].i== 0? params[(no)+2].i : V_GetColor(NULL, params[(no)+2].s);
#define PROP_COLOR_PARM(var, no, scriptpos) \
int var = params[(no)+1].i== 0? params[(no)+2].i : V_GetColor(NULL, params[(no)+2].s, scriptpos);
#endif

View file

@ -766,7 +766,7 @@ DEFINE_PROPERTY(translation, L, Actor)
//==========================================================================
DEFINE_PROPERTY(stencilcolor, C, Actor)
{
PROP_COLOR_PARM(color, 0);
PROP_COLOR_PARM(color, 0, &bag.ScriptPosition);
defaults->fillcolor = color | (ColorMatcher.Pick (RPART(color), GPART(color), BPART(color)) << 24);
}
@ -776,7 +776,7 @@ DEFINE_PROPERTY(stencilcolor, C, Actor)
//==========================================================================
DEFINE_PROPERTY(bloodcolor, C, Actor)
{
PROP_COLOR_PARM(color, 0);
PROP_COLOR_PARM(color, 0, &bag.ScriptPosition);
defaults->BloodColor = color;
defaults->BloodColor.a = 255; // a should not be 0.
@ -1608,7 +1608,7 @@ DEFINE_CLASS_PROPERTY_PREFIX(player, crouchsprite, S, PlayerPawn)
//==========================================================================
DEFINE_CLASS_PROPERTY_PREFIX(player, damagescreencolor, Cfs, PlayerPawn)
{
PROP_COLOR_PARM(c, 0);
PROP_COLOR_PARM(c, 0, &bag.ScriptPosition);
PalEntry color = c;