mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-04-07 02:22:58 +00:00
New "Translatable" property in DECALDEF which is just an alias for "OpaqueBlood" to reflect its general use, and also to support the new translation parameter of A_SprayDecal. "OpaqueBlood" should be considered deprecated. Note that specifying a translation directly in the DECALDEF will be added in future, in another commit.
This commit is contained in:
parent
864fe1f66f
commit
5bcbe1718b
3 changed files with 10 additions and 7 deletions
|
@ -175,7 +175,8 @@ static const char *DecalKeywords[] =
|
|||
"colors",
|
||||
"animator",
|
||||
"lowerdecal",
|
||||
"opaqueblood",
|
||||
"opaqueblood", // Deprecated - use translatable instead!
|
||||
"translatable",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -198,6 +199,7 @@ enum
|
|||
DECAL_ANIMATOR,
|
||||
DECAL_LOWERDECAL,
|
||||
DECAL_OPAQUEBLOOD,
|
||||
DECAL_TRANSLATABLE,
|
||||
};
|
||||
|
||||
const FDecalTemplate *FDecalBase::GetDecal () const
|
||||
|
@ -483,8 +485,9 @@ void FDecalLib::ParseDecal (FScanner &sc)
|
|||
break;
|
||||
|
||||
case DECAL_OPAQUEBLOOD:
|
||||
case DECAL_TRANSLATABLE:
|
||||
newdecal.RenderStyle = STYLE_Normal;
|
||||
newdecal.opaqueBlood = true;
|
||||
newdecal.translatable = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ public:
|
|||
FRenderStyle RenderStyle;
|
||||
FTextureID PicNum;
|
||||
uint16_t RenderFlags;
|
||||
bool opaqueBlood;
|
||||
bool translatable;
|
||||
double Alpha; // same as actor->alpha
|
||||
const FDecalAnimator *Animator;
|
||||
const FDecalBase *LowerDecal;
|
||||
|
|
|
@ -754,8 +754,8 @@ DBaseDecal* DImpactDecal::StaticCreate (FLevelLocals *Level, const FDecalTemplat
|
|||
decal->SetShade (color.r, color.g, color.b);
|
||||
}
|
||||
|
||||
// [Nash] opaque blood
|
||||
if (translation != NO_TRANSLATION && tpl->ShadeColor == 0 && tpl->opaqueBlood)
|
||||
// [Nash] Translatable opaque decal. Note that the decal must be unshaded for this to work.
|
||||
if (translation != NO_TRANSLATION && tpl->ShadeColor == 0 && tpl->translatable)
|
||||
{
|
||||
decal->SetTranslation(translation);
|
||||
decal->RenderStyle = STYLE_Normal;
|
||||
|
@ -794,8 +794,8 @@ DBaseDecal *DImpactDecal::CloneSelf (const FDecalTemplate *tpl, double ix, doubl
|
|||
tpl->ApplyToDecal (decal, wall);
|
||||
decal->AlphaColor = AlphaColor;
|
||||
|
||||
// [Nash] opaque blood
|
||||
if (tpl->ShadeColor == 0 && tpl->opaqueBlood)
|
||||
// [Nash] Translatable opaque decal
|
||||
if (tpl->ShadeColor == 0 && tpl->translatable)
|
||||
{
|
||||
decal->SetTranslation(Translation);
|
||||
decal->RenderStyle = STYLE_Normal;
|
||||
|
|
Loading…
Reference in a new issue