mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-29 07:22:07 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
dbefac81d8
13 changed files with 210 additions and 12 deletions
|
@ -117,6 +117,8 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
|||
locknumber = <int>; // Line special is locked
|
||||
arg0str = <string>; // Alternate string-based version of arg0
|
||||
|
||||
transparent = <bool>; // true = line is a Strife transparent line (alpha 0.25)
|
||||
|
||||
* Note about arg0str
|
||||
|
||||
For lines with ACS specials (80-86 and 226), if arg0str is present and non-null, it
|
||||
|
@ -207,6 +209,21 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
|||
arg0str = <string>; // Alternate string-based version of arg0
|
||||
gravity = <float>; // Set per-actor gravity. Positive values are multiplied with the class's property,
|
||||
// negative values are used as their absolute. Default = 1.0.
|
||||
|
||||
health = <int>; // Set per-actor health. Positive values are multiplied with the class's property,
|
||||
// negative values are used as their absolute. Default = 1.
|
||||
|
||||
renderstyle = <string>; // Set per-actor render style, overriding the class default. Possible values can be "normal",
|
||||
// "none", "add" or "additive", "subtract" or "subtractive", "stencil", "translucentstencil",
|
||||
// "translucent", "fuzzy", "optfuzzy", "soultrans". Default is an empty string for no change.
|
||||
fillcolor = <integer>; // Fill color used by the "stencil" and "translucentstencil" rendestyles, as RRGGBB value, default = 0x000000.
|
||||
alpha = <float>; // Translucency of this actor (if applicable to renderstyle), default is 1.0.
|
||||
score = <int>; // Score value of this actor, overriding the class default if not null. Default = 0.
|
||||
pitch = <integer>; // Pitch of thing in degrees. Default = 0 (horizontal).
|
||||
roll = <integer>; // Pitch of thing in degrees. Default = 0 (horizontal).
|
||||
scalex = <float>; // Vertical scaling on thing. Default = 0 (ignored).
|
||||
scaley = <float>; // Horizontal scaling on thing. Default = 0 (ignored).
|
||||
scale = <float>; // Vertical and horizontal scaling on thing. Default = 0 (ignored).
|
||||
|
||||
* Note about arg0str
|
||||
|
||||
|
@ -335,6 +352,9 @@ Added arg0str thing property.
|
|||
1.21 09.08.2013
|
||||
Added waterzone sector property.
|
||||
|
||||
1.22 12.04.2014
|
||||
Added transparent line property (to be folded back to core UDMF standard), and health, score, renderstyle, fillcolor, alpha, scale, scalex, scaley, pitch and roll thing properties.
|
||||
|
||||
===============================================================================
|
||||
EOF
|
||||
===============================================================================
|
||||
|
|
|
@ -873,6 +873,7 @@ public:
|
|||
TObjPtr<AActor> LastLookActor; // Actor last looked for (if TIDtoHate != 0)
|
||||
fixed_t SpawnPoint[3]; // For nightmare respawn
|
||||
WORD SpawnAngle;
|
||||
int StartHealth;
|
||||
BYTE WeaveIndexXY; // Separated from special2 because it's used by globally accessible functions.
|
||||
BYTE WeaveIndexZ;
|
||||
int skillrespawncount;
|
||||
|
|
|
@ -192,9 +192,10 @@ enum EMapLineFlags // These are flags that use different values internally
|
|||
ML_RESERVED_ETERNITY = 0x0800,
|
||||
|
||||
// [RH] Extra flags for Strife
|
||||
ML_TRANSLUCENT_STRIFE = 0x1000,
|
||||
ML_RAILING_STRIFE = 0x0200,
|
||||
ML_BLOCK_FLOATERS_STRIFE = 0x0400,
|
||||
ML_TRANSPARENT_STRIFE = 0x0800,
|
||||
ML_TRANSLUCENT_STRIFE = 0x1000,
|
||||
};
|
||||
|
||||
|
||||
|
@ -344,6 +345,15 @@ struct FMapThing
|
|||
int args[5];
|
||||
int Conversation;
|
||||
fixed_t gravity;
|
||||
fixed_t alpha;
|
||||
DWORD fillcolor;
|
||||
fixed_t scaleX;
|
||||
fixed_t scaleY;
|
||||
int health;
|
||||
int score;
|
||||
short pitch;
|
||||
short roll;
|
||||
DWORD RenderStyle;
|
||||
|
||||
void Serialize (FArchive &);
|
||||
};
|
||||
|
@ -385,6 +395,7 @@ enum EMapThingFlags
|
|||
|
||||
MTF_SECRET = 0x080000, // Secret pickup
|
||||
MTF_NOINFIGHTING = 0x100000,
|
||||
|
||||
// BOOM and DOOM compatible versions of some of the above
|
||||
|
||||
BTF_NOTSINGLE = 0x0010, // (TF_COOPERATIVE|TF_DEATHMATCH)
|
||||
|
|
|
@ -76,6 +76,7 @@ struct FState
|
|||
BYTE SameFrame:1; // Ignore Frame (except when spawning actor)
|
||||
BYTE Fast:1;
|
||||
BYTE NoDelay:1; // Spawn states executes its action normally
|
||||
BYTE CanRaise:1; // Allows a monster to be resurrected without waiting for an infinate frame
|
||||
int ParameterIndex;
|
||||
|
||||
inline int GetFrame() const
|
||||
|
@ -114,6 +115,10 @@ struct FState
|
|||
{
|
||||
return NoDelay;
|
||||
}
|
||||
inline bool GetCanRaise() const
|
||||
{
|
||||
return CanRaise;
|
||||
}
|
||||
inline void SetFrame(BYTE frame)
|
||||
{
|
||||
Frame = frame - 'A';
|
||||
|
|
|
@ -31,6 +31,18 @@ xx(Fuzzy)
|
|||
xx(Opaque)
|
||||
xx(Stencil)
|
||||
|
||||
// Render styles
|
||||
xx(Normal)
|
||||
xx(SoulTrans)
|
||||
xx(OptFuzzy)
|
||||
xx(Add)
|
||||
xx(Shaded)
|
||||
xx(TranslucentStencil)
|
||||
xx(Shadow)
|
||||
xx(Subtract)
|
||||
xx(Subtractive)
|
||||
xx(FillColor)
|
||||
|
||||
// Healingradius types
|
||||
xx(Mana)
|
||||
xx(Armor)
|
||||
|
@ -373,6 +385,11 @@ xx(Friend)
|
|||
xx(Strifeally)
|
||||
xx(Standing)
|
||||
xx(Countsecret)
|
||||
xx(Score)
|
||||
xx(Roll)
|
||||
xx(Scale)
|
||||
xx(ScaleX)
|
||||
xx(ScaleY)
|
||||
|
||||
xx(Blocking)
|
||||
xx(Blockmonsters)
|
||||
|
|
|
@ -2527,8 +2527,9 @@ static bool P_CheckForResurrection(AActor *self, bool usevilestates)
|
|||
if (!(corpsehit->flags & MF_CORPSE) )
|
||||
continue; // not a monster
|
||||
|
||||
if (corpsehit->tics != -1)
|
||||
continue; // not lying still yet
|
||||
if (corpsehit->tics != -1 && // not lying still yet
|
||||
!corpsehit->state->GetCanRaise()) // or not ready to be raised yet
|
||||
continue;
|
||||
|
||||
raisestate = corpsehit->FindState(NAME_Raise);
|
||||
if (raisestate == NULL)
|
||||
|
@ -2648,7 +2649,7 @@ static bool P_CheckForResurrection(AActor *self, bool usevilestates)
|
|||
corpsehit->flags5 = info->flags5;
|
||||
corpsehit->flags6 = info->flags6;
|
||||
corpsehit->flags7 = info->flags7;
|
||||
corpsehit->health = info->health;
|
||||
corpsehit->health = corpsehit->SpawnHealth();
|
||||
corpsehit->target = NULL;
|
||||
corpsehit->lastenemy = NULL;
|
||||
|
||||
|
|
|
@ -219,8 +219,12 @@ void AActor::Serialize (FArchive &arc)
|
|||
<< threshold
|
||||
<< player
|
||||
<< SpawnPoint[0] << SpawnPoint[1] << SpawnPoint[2]
|
||||
<< SpawnAngle
|
||||
<< skillrespawncount
|
||||
<< SpawnAngle;
|
||||
if (SaveVersion >= 4506)
|
||||
{
|
||||
arc << StartHealth;
|
||||
}
|
||||
arc << skillrespawncount
|
||||
<< tracer
|
||||
<< floorclip
|
||||
<< tid
|
||||
|
@ -4789,11 +4793,42 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
|
|||
}
|
||||
}
|
||||
|
||||
// Set various UDMF options
|
||||
if (mthing->alpha != -1)
|
||||
{
|
||||
DPrintf("Setting alpha to %f", FIXED2FLOAT(mthing->alpha));
|
||||
mobj->alpha = mthing->alpha;
|
||||
}
|
||||
if (mthing->RenderStyle != STYLE_Count)
|
||||
mobj->RenderStyle = (ERenderStyle)mthing->RenderStyle;
|
||||
if (mthing->scaleX)
|
||||
mobj->scaleX = FixedMul(mthing->scaleX, mobj->scaleX);
|
||||
if (mthing->scaleY)
|
||||
mobj->scaleY = FixedMul(mthing->scaleY, mobj->scaleY);
|
||||
if (mthing->pitch)
|
||||
mobj->pitch = ANGLE_1 * mthing->pitch;
|
||||
if (mthing->roll)
|
||||
mobj->roll = ANGLE_1 * mthing->roll;
|
||||
if (mthing->score)
|
||||
mobj->Score = mthing->score;
|
||||
if (mthing->fillcolor)
|
||||
mobj->fillcolor = mthing->fillcolor;
|
||||
|
||||
mobj->BeginPlay ();
|
||||
if (!(mobj->ObjectFlags & OF_EuthanizeMe))
|
||||
{
|
||||
mobj->LevelSpawned ();
|
||||
}
|
||||
|
||||
if (mthing->health > 0)
|
||||
mobj->health *= mthing->health;
|
||||
else
|
||||
mobj->health = -mthing->health;
|
||||
if (mthing->health == 0)
|
||||
mobj->Die(NULL, NULL);
|
||||
else if (mthing->health != 1)
|
||||
mobj->StartHealth = mobj->health;
|
||||
|
||||
return mobj;
|
||||
}
|
||||
|
||||
|
@ -6016,18 +6051,19 @@ void AActor::SetIdle()
|
|||
|
||||
int AActor::SpawnHealth()
|
||||
{
|
||||
if (!(flags3 & MF3_ISMONSTER) || GetDefault()->health == 0)
|
||||
int defhealth = StartHealth ? StartHealth : GetDefault()->health;
|
||||
if (!(flags3 & MF3_ISMONSTER) || defhealth == 0)
|
||||
{
|
||||
return GetDefault()->health;
|
||||
return defhealth;
|
||||
}
|
||||
else if (flags & MF_FRIENDLY)
|
||||
{
|
||||
int adj = FixedMul(GetDefault()->health, G_SkillProperty(SKILLP_FriendlyHealth));
|
||||
int adj = FixedMul(defhealth, G_SkillProperty(SKILLP_FriendlyHealth));
|
||||
return (adj <= 0) ? 1 : adj;
|
||||
}
|
||||
else
|
||||
{
|
||||
int adj = FixedMul(GetDefault()->health, G_SkillProperty(SKILLP_MonsterHealth));
|
||||
int adj = FixedMul(defhealth, G_SkillProperty(SKILLP_MonsterHealth));
|
||||
return (adj <= 0) ? 1 : adj;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -476,6 +476,9 @@ public:
|
|||
|
||||
memset(th, 0, sizeof(*th));
|
||||
th->gravity = FRACUNIT;
|
||||
th->RenderStyle = STYLE_Count;
|
||||
th->alpha = -1;
|
||||
th->health = 1;
|
||||
sc.MustGetToken('{');
|
||||
while (!sc.CheckToken('}'))
|
||||
{
|
||||
|
@ -632,6 +635,90 @@ public:
|
|||
Flag(th->flags, MTF_SECRET, key);
|
||||
break;
|
||||
|
||||
case NAME_Renderstyle:
|
||||
{
|
||||
FName style = CheckString(key);
|
||||
switch (style)
|
||||
{
|
||||
case NAME_None:
|
||||
th->RenderStyle = STYLE_None;
|
||||
break;
|
||||
case NAME_Normal:
|
||||
th->RenderStyle = STYLE_Normal;
|
||||
break;
|
||||
case NAME_Fuzzy:
|
||||
th->RenderStyle = STYLE_Fuzzy;
|
||||
break;
|
||||
case NAME_SoulTrans:
|
||||
th->RenderStyle = STYLE_SoulTrans;
|
||||
break;
|
||||
case NAME_OptFuzzy:
|
||||
th->RenderStyle = STYLE_OptFuzzy;
|
||||
break;
|
||||
case NAME_Stencil:
|
||||
th->RenderStyle = STYLE_Stencil;
|
||||
break;
|
||||
case NAME_Translucent:
|
||||
th->RenderStyle = STYLE_Translucent;
|
||||
break;
|
||||
case NAME_Add:
|
||||
case NAME_Additive:
|
||||
th->RenderStyle = STYLE_Add;
|
||||
break;
|
||||
case NAME_Shaded:
|
||||
th->RenderStyle = STYLE_Shaded;
|
||||
break;
|
||||
case NAME_TranslucentStencil:
|
||||
th->RenderStyle = STYLE_TranslucentStencil;
|
||||
break;
|
||||
case NAME_Shadow:
|
||||
th->RenderStyle = STYLE_Shadow;
|
||||
break;
|
||||
case NAME_Subtract:
|
||||
case NAME_Subtractive:
|
||||
th->RenderStyle = STYLE_Subtract;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case NAME_Alpha:
|
||||
th->alpha = CheckFixed(key);
|
||||
break;
|
||||
|
||||
case NAME_FillColor:
|
||||
th->fillcolor = CheckInt(key);
|
||||
|
||||
case NAME_Health:
|
||||
th->health = CheckInt(key);
|
||||
break;
|
||||
|
||||
case NAME_Score:
|
||||
th->score = CheckInt(key);
|
||||
break;
|
||||
|
||||
case NAME_Pitch:
|
||||
th->pitch = (short)CheckInt(key);
|
||||
break;
|
||||
|
||||
case NAME_Roll:
|
||||
th->roll = (short)CheckInt(key);
|
||||
break;
|
||||
|
||||
case NAME_ScaleX:
|
||||
th->scaleX = CheckFixed(key);
|
||||
break;
|
||||
|
||||
case NAME_ScaleY:
|
||||
th->scaleY = CheckFixed(key);
|
||||
break;
|
||||
|
||||
case NAME_Scale:
|
||||
th->scaleX = th->scaleY = CheckFixed(key);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (0 == strnicmp("user_", key.GetChars(), 5))
|
||||
{ // Custom user key - Sets an actor's user variable directly
|
||||
|
@ -686,6 +773,7 @@ public:
|
|||
{
|
||||
bool passuse = false;
|
||||
bool strifetrans = false;
|
||||
bool strifetrans2 = false;
|
||||
FString arg0str, arg1str;
|
||||
|
||||
memset(ld, 0, sizeof(*ld));
|
||||
|
@ -803,6 +891,11 @@ public:
|
|||
strifetrans = CheckBool(key);
|
||||
continue;
|
||||
|
||||
case NAME_Transparent:
|
||||
CHECK_N(St | Zd | Zdt | Va)
|
||||
strifetrans2 = CheckBool(key);
|
||||
continue;
|
||||
|
||||
case NAME_Passuse:
|
||||
CHECK_N(Dm | Zd | Zdt | Va)
|
||||
passuse = CheckBool(key);
|
||||
|
@ -965,6 +1058,10 @@ public:
|
|||
{
|
||||
ld->Alpha = FRACUNIT * 3/4;
|
||||
}
|
||||
if (strifetrans2 && ld->Alpha == FRACUNIT)
|
||||
{
|
||||
ld->Alpha = FRACUNIT * 1/4;
|
||||
}
|
||||
if (ld->sidedef[0] == NULL)
|
||||
{
|
||||
ld->sidedef[0] = (side_t*)(intptr_t)(1);
|
||||
|
|
|
@ -89,6 +89,9 @@ void P_TranslateLineDef (line_t *ld, maplinedef_t *mld)
|
|||
case -2:
|
||||
ld->Alpha = FRACUNIT*3/4;
|
||||
break;
|
||||
case -3:
|
||||
ld->Alpha = FRACUNIT / 4;
|
||||
break;
|
||||
default:
|
||||
newflags |= LineFlagTranslations[i].newvalue;
|
||||
break;
|
||||
|
|
|
@ -313,6 +313,11 @@ do_stop:
|
|||
sc.MustGetStringName(")");
|
||||
continue;
|
||||
}
|
||||
if (sc.Compare("CANRAISE"))
|
||||
{
|
||||
state.CanRaise = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Make the action name lowercase
|
||||
strlwr (sc.String);
|
||||
|
|
|
@ -76,7 +76,7 @@ const char *GetVersionString();
|
|||
|
||||
// Use 4500 as the base git save version, since it's higher than the
|
||||
// SVN revision ever got.
|
||||
#define SAVEVER 4505
|
||||
#define SAVEVER 4506
|
||||
|
||||
#define SAVEVERSTRINGIFY2(x) #x
|
||||
#define SAVEVERSTRINGIFY(x) SAVEVERSTRINGIFY2(x)
|
||||
|
|
|
@ -239,5 +239,6 @@ enum
|
|||
|
||||
//
|
||||
ML_PASSTHROUGH = -1,
|
||||
ML_TRANSLUCENT = -2
|
||||
ML_TRANSLUCENT = -2,
|
||||
ML_TRANSPARENT = -3,
|
||||
}
|
|
@ -363,5 +363,6 @@ lineflag 7 = ML_DONTDRAW;
|
|||
lineflag 8 = ML_MAPPED;
|
||||
lineflag 9 = ML_RAILING;
|
||||
lineflag 10 = ML_BLOCK_FLOATERS;
|
||||
lineflag 11 = ML_TRANSPARENT;
|
||||
lineflag 12 = ML_TRANSLUCENT;
|
||||
|
||||
|
|
Loading…
Reference in a new issue