pass ScriptPosition down to color parser functions

This commit is contained in:
vidaritos 2020-09-18 17:53:45 +02:00 committed by drfrag
parent 240a0d16f5
commit a12073feaf
2 changed files with 5 additions and 5 deletions

View file

@ -328,7 +328,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

@ -779,7 +779,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);
}
@ -789,7 +789,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.
@ -1621,7 +1621,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;