Expand UDMF and ZScript API for side's own additive colors
Add 'useowncoloradd_{top,mid,bottom}' sidedef properties to the UDMF
spec
Only use side's additive colors if 'useowncoloradd_(top|mid|bottom)' is
set.
Rename UseOwnColors flag to UseOwnSpecialColors
Add UseOwnAdditiveColor flag to side_t::part
Add EnableAdditiveColor to side_t
Add Side.EnableAdditiveColor to ZScript API
This commit is contained in:
parent
286886e161
commit
e04fc026ff
6 changed files with 65 additions and 18 deletions
|
|
@ -1558,11 +1558,11 @@ DEFINE_ACTION_FUNCTION_NATIVE(_Sector, RemoveForceField, RemoveForceField)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void SetSideAdditiveColor(side_t *self, int tier, int color, bool use)
|
||||
static void SetSideAdditiveColor(side_t *self, int tier, int color)
|
||||
{
|
||||
if (tier >= 0 && tier < 3)
|
||||
{
|
||||
self->SetAdditiveColor(tier, color, use);
|
||||
self->SetAdditiveColor(tier, color);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1571,8 +1571,24 @@ DEFINE_ACTION_FUNCTION_NATIVE(_Sector, RemoveForceField, RemoveForceField)
|
|||
PARAM_SELF_STRUCT_PROLOGUE(side_t);
|
||||
PARAM_INT(tier);
|
||||
PARAM_COLOR(color);
|
||||
PARAM_BOOL(use);
|
||||
SetSideAdditiveColor(self, tier, color, use);
|
||||
SetSideAdditiveColor(self, tier, color);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void EnableSideAdditiveColor(side_t *self, int tier, bool enable)
|
||||
{
|
||||
if (tier >= 0 && tier < 3)
|
||||
{
|
||||
self->EnableAdditiveColor(tier, enable);
|
||||
}
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_Side, EnableAdditiveColor, EnableSideAdditiveColor)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(side_t);
|
||||
PARAM_INT(tier);
|
||||
PARAM_BOOL(enable);
|
||||
EnableSideAdditiveColor(self, tier, enable);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue