- scaled down the texture colorization feature for easier usability.
It makes little sense exposing every minute detail of this through UDMF. Setting it up that way is far too complicated. Using virtual textures that map to a real texture plus a colorization record should be far easier to use by mappers. This also doesn't piggyback on the Doom64 color feature anymore and is completely separate, despite some redundancies. This is still missing the texture definition part, though.
This commit is contained in:
parent
fd15af0b50
commit
bb8db9422f
19 changed files with 203 additions and 542 deletions
|
|
@ -618,12 +618,11 @@ DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetFade, SetFade)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void SetSpecialColor(sector_t *self, int num, int color, double factor)
|
||||
static void SetSpecialColor(sector_t *self, int num, int color)
|
||||
{
|
||||
if (num >= 0 && num < 5)
|
||||
{
|
||||
self->SetSpecialColor(num, color);
|
||||
self->SetColorScaleFactor(num, factor);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -632,8 +631,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetSpecialColor, SetSpecialColor)
|
|||
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
||||
PARAM_INT(num);
|
||||
PARAM_COLOR(color);
|
||||
PARAM_FLOAT(factor)
|
||||
SetSpecialColor(self, num, color, factor);
|
||||
SetSpecialColor(self, num, color);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -654,45 +652,6 @@ DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetAdditiveColor, SetAdditiveColor)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void SetBlendColor(sector_t* self, int pos, int color, int mode)
|
||||
{
|
||||
if (pos >= 0 && pos < 3)
|
||||
{
|
||||
self->SetBlendColor(pos, color);
|
||||
self->SetBlendMode(pos, mode);
|
||||
}
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetBlendColor, SetBlendColor)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
||||
PARAM_INT(pos);
|
||||
PARAM_COLOR(color);
|
||||
PARAM_INT(mode);
|
||||
SetBlendColor(self, pos, color, mode);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void SetTextureDesaturation(sector_t* self, int pos, double factor, int invert)
|
||||
{
|
||||
if (pos >= 0 && pos < 3)
|
||||
{
|
||||
self->SetDesaturationFactor(pos, factor);
|
||||
self->SetInvertMode(pos, !!invert);
|
||||
}
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetTextureDesaturation, SetTextureDesaturation)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
||||
PARAM_INT(pos);
|
||||
PARAM_FLOAT(factor);
|
||||
PARAM_BOOL(invert);
|
||||
SetTextureDesaturation(self, pos, factor, invert);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void SetFogDensity(sector_t *self, int dens)
|
||||
{
|
||||
self->Colormap.FogDensity = dens;
|
||||
|
|
@ -1721,12 +1680,11 @@ DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetXOffset, SetXOffset)
|
|||
ACTION_RETURN_POINTER(self->V2());
|
||||
}
|
||||
|
||||
static void SetSideSpecialColor(side_t *self, int tier, int position, int color, double factor)
|
||||
static void SetSideSpecialColor(side_t *self, int tier, int position, int color)
|
||||
{
|
||||
if (tier >= 0 && tier < 3 && position >= 0 && position < 2)
|
||||
{
|
||||
self->SetSpecialColor(tier, position, color);
|
||||
if (position == 0) self->SetColorScaleFactor(tier, factor);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1736,8 +1694,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetXOffset, SetXOffset)
|
|||
PARAM_INT(tier);
|
||||
PARAM_INT(position);
|
||||
PARAM_COLOR(color);
|
||||
PARAM_FLOAT(factor)
|
||||
SetSideSpecialColor(self, tier, position, color, factor);
|
||||
SetSideSpecialColor(self, tier, position, color);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1775,45 +1732,6 @@ DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetXOffset, SetXOffset)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void SetSideBlendColor(side_t* self, int tier, int color, int mode)
|
||||
{
|
||||
if (tier >= 0 && tier < 3)
|
||||
{
|
||||
self->SetBlendColor(tier, color);
|
||||
self->SetBlendMode(tier, mode);
|
||||
}
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_Side, SetBlendColor, SetSideBlendColor)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(side_t);
|
||||
PARAM_INT(tier);
|
||||
PARAM_COLOR(color);
|
||||
PARAM_INT(mode);
|
||||
SetSideBlendColor(self, tier, color, mode);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void SetSideTextureDesaturation(side_t* self, int tier, double factor, int invert)
|
||||
{
|
||||
if (tier >= 0 && tier < 3)
|
||||
{
|
||||
self->SetDesaturationFactor(tier, factor);
|
||||
self->SetInvertMode(tier, !!invert);
|
||||
}
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_Side, SetTextureDesaturation, SetSideTextureDesaturation)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(side_t);
|
||||
PARAM_INT(tier);
|
||||
PARAM_FLOAT(factor);
|
||||
PARAM_BOOL(invert);
|
||||
SetSideTextureDesaturation(self, tier, factor, invert);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void EnableSideAdditiveColor(side_t *self, int tier, bool enable)
|
||||
{
|
||||
if (tier >= 0 && tier < 3)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue