- fixed compile from last commit

- refactored the zscript hookup a bit, made it actually work
This commit is contained in:
Rachael Alexanderson 2017-07-29 13:59:36 -04:00
parent 712d21e26a
commit 91ff447a90
7 changed files with 21 additions and 26 deletions

View file

@ -1045,9 +1045,10 @@ public:
uint32_t fillcolor; // Color to draw when STYLE_Shaded
uint32_t Translation;
uint32_t RenderRequired; // current renderer must have this feature set
uint32_t RenderHidden; // current renderer must *not* have any of these features
ActorRenderFlags renderflags; // Different rendering flags
ActorRenderFeatureFlags renderrequired; // current renderer must have this feature set
ActorRenderFeatureFlags renderhidden; // current renderer must *not* have any of these features
ActorFlags flags;
ActorFlags2 flags2; // Heretic flags
ActorFlags3 flags3; // [RH] Hexen/Heretic actor-dependant behavior made flaggable

View file

@ -681,8 +681,8 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal)
// check renderrequired vs ~r_rendercaps, if anything matches we don't support that feature,
// check renderhidden vs r_rendercaps, if anything matches we do support that feature and should hide it.
if ((!!((uint32_t)(thing->renderrequired) & ~r_renderercaps)) ||
(!!((uint32_t)(thing->renderhidden) & r_renderercaps)))
if ((!!(thing->RenderRequired & ~r_renderercaps)) ||
(!!(thing->RenderHidden & r_renderercaps)))
return;
int spritenum = thing->sprite;

View file

@ -352,6 +352,8 @@ DEFINE_FIELD(AActor, StealthAlpha)
DEFINE_FIELD(AActor, WoundHealth)
DEFINE_FIELD(AActor, BloodColor)
DEFINE_FIELD(AActor, BloodTranslation)
DEFINE_FIELD(AActor, RenderHidden)
DEFINE_FIELD(AActor, RenderRequired)
//==========================================================================
//
@ -526,8 +528,9 @@ void AActor::Serialize(FSerializer &arc)
A("woundhealth", WoundHealth)
A("rdfactor", RadiusDamageFactor)
A("selfdamagefactor", SelfDamageFactor)
A("stealthalpha", StealthAlpha);
A("stealthalpha", StealthAlpha)
A("renderhidden", RenderHidden)
A("renderrequired", RenderRequired);
}
#undef A

View file

@ -179,8 +179,8 @@ bool RenderPolySprite::IsThingCulled(AActor *thing)
// check renderrequired vs ~r_rendercaps, if anything matches we don't support that feature,
// check renderhidden vs r_rendercaps, if anything matches we do support that feature and should hide it.
if ((!!((uint32_t)(thing->renderrequired) & ~r_renderercaps)) ||
(!!((uint32_t)(thing->renderhidden) & r_renderercaps)))
if ((!!(thing->RenderRequired & ~r_renderercaps)) ||
(!!(thing->RenderHidden & r_renderercaps)))
return true;
return false;

View file

@ -1090,6 +1090,7 @@ DEFINE_PROPERTY(distancecheck, S, Actor)
}
}
//==========================================================================
//
// Special inventory properties
@ -1836,19 +1837,3 @@ DEFINE_SCRIPTED_PROPERTY(unmorphflash, S, PowerMorph)
defaults->PointerVar<PClassActor>(NAME_UnMorphFlash) = FindClassTentative(str, RUNTIME_CLASS(AActor), bag.fromDecorate);
}
//==========================================================================
// actor render feature filters - stop rendering if the renderer does/does not support certain features
//==========================================================================
DEFINE_SCRIPTED_PROPERTY(renderrequired, I, Actor)
{
PROP_INT_PARM(f, 0);
defaults->renderrequired = f;
}
DEFINE_SCRIPTED_PROPERTY(renderhidden, I, Actor)
{
PROP_INT_PARM(f, 0);
defaults->renderhidden = f;
}

View file

@ -971,8 +971,8 @@ namespace swrenderer
// check renderrequired vs ~r_rendercaps, if anything matches we don't support that feature,
// check renderhidden vs r_rendercaps, if anything matches we do support that feature and should hide it.
if ((!!((uint32_t)(thing->renderrequired) & ~r_renderercaps)) ||
(!!((uint32_t)(thing->renderhidden) & r_renderercaps)))
if ((!!(thing->RenderRequired & ~r_renderercaps)) ||
(!!(thing->RenderHidden & r_renderercaps)))
return false;
// [ZZ] Or less definitely not visible (hue)

View file

@ -199,6 +199,8 @@ class Actor : Thinker native
native int WoundHealth; // Health needed to enter wound state
native readonly color BloodColor;
native readonly int BloodTranslation;
native int RenderHidden;
native int RenderRequired;
meta String Obituary; // Player was killed by this actor
meta String HitObituary; // Player was killed by this actor in melee
@ -285,6 +287,8 @@ class Actor : Thinker native
property Ripperlevel: RipperLevel;
property RipLevelMin: RipLevelMin;
property RipLevelMax: RipLevelMax;
property RenderHidden: RenderHidden;
property RenderRequired: RenderRequired;
// need some definition work first
//FRenderStyle RenderStyle;
@ -362,6 +366,8 @@ class Actor : Thinker native
GibHealth int.min;
DeathHeight -1;
BurnHeight -1;
RenderHidden 0;
RenderRequired 0;
}
// Functions