mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
More editing flags
PSX-inspired flags to change the render styles of monsters (and other things).
This commit is contained in:
parent
bbb41e869c
commit
580094a792
7 changed files with 79 additions and 2 deletions
|
@ -192,9 +192,10 @@ enum EMapLineFlags // These are flags that use different values internally
|
||||||
ML_RESERVED_ETERNITY = 0x0800,
|
ML_RESERVED_ETERNITY = 0x0800,
|
||||||
|
|
||||||
// [RH] Extra flags for Strife
|
// [RH] Extra flags for Strife
|
||||||
ML_TRANSLUCENT_STRIFE = 0x1000,
|
|
||||||
ML_RAILING_STRIFE = 0x0200,
|
ML_RAILING_STRIFE = 0x0200,
|
||||||
ML_BLOCK_FLOATERS_STRIFE = 0x0400,
|
ML_BLOCK_FLOATERS_STRIFE = 0x0400,
|
||||||
|
ML_TRANSPARENT_STRIFE = 0x0800,
|
||||||
|
ML_TRANSLUCENT_STRIFE = 0x1000,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -385,6 +386,15 @@ enum EMapThingFlags
|
||||||
|
|
||||||
MTF_SECRET = 0x080000, // Secret pickup
|
MTF_SECRET = 0x080000, // Secret pickup
|
||||||
MTF_NOINFIGHTING = 0x100000,
|
MTF_NOINFIGHTING = 0x100000,
|
||||||
|
|
||||||
|
// PSX Doom and Doom 64 effects
|
||||||
|
|
||||||
|
MTF_TRANS = 0x200000, // 50% alpha
|
||||||
|
MTF_ADD = 0x400000, // 100% additive
|
||||||
|
MTF_SUBTRACT = 0x800000, // 100% subtractive
|
||||||
|
MTF_SPECTRE = 0x1000000, // 25% additive
|
||||||
|
MTF_DOUBLEHEALTH = 0x2000000, // Double hit points
|
||||||
|
|
||||||
// BOOM and DOOM compatible versions of some of the above
|
// BOOM and DOOM compatible versions of some of the above
|
||||||
|
|
||||||
BTF_NOTSINGLE = 0x0010, // (TF_COOPERATIVE|TF_DEATHMATCH)
|
BTF_NOTSINGLE = 0x0010, // (TF_COOPERATIVE|TF_DEATHMATCH)
|
||||||
|
|
|
@ -373,6 +373,11 @@ xx(Friend)
|
||||||
xx(Strifeally)
|
xx(Strifeally)
|
||||||
xx(Standing)
|
xx(Standing)
|
||||||
xx(Countsecret)
|
xx(Countsecret)
|
||||||
|
//xx(Transparent) defined below for linedefs
|
||||||
|
//xx(Additive) already defined for invisibility types
|
||||||
|
xx(Subtractive)
|
||||||
|
xx(Spectre)
|
||||||
|
xx(Doublehealth)
|
||||||
|
|
||||||
xx(Blocking)
|
xx(Blocking)
|
||||||
xx(Blockmonsters)
|
xx(Blockmonsters)
|
||||||
|
|
|
@ -4022,6 +4022,24 @@ void AActor::HandleSpawnFlags ()
|
||||||
RenderStyle = STYLE_Translucent;
|
RenderStyle = STYLE_Translucent;
|
||||||
alpha = TRANSLUC25;
|
alpha = TRANSLUC25;
|
||||||
}
|
}
|
||||||
|
else if (SpawnFlags & MTF_TRANS)
|
||||||
|
{
|
||||||
|
RenderStyle = STYLE_Translucent;
|
||||||
|
alpha = TRANSLUC50;
|
||||||
|
}
|
||||||
|
else if (SpawnFlags & MTF_ADD)
|
||||||
|
{
|
||||||
|
RenderStyle = STYLE_Add;
|
||||||
|
}
|
||||||
|
else if (SpawnFlags & MTF_SUBTRACT)
|
||||||
|
{
|
||||||
|
RenderStyle = STYLE_Subtract;
|
||||||
|
}
|
||||||
|
else if (SpawnFlags & MTF_SPECTRE)
|
||||||
|
{
|
||||||
|
RenderStyle = STYLE_Add;
|
||||||
|
alpha = TRANSLUC25;
|
||||||
|
}
|
||||||
else if (SpawnFlags & MTF_ALTSHADOW)
|
else if (SpawnFlags & MTF_ALTSHADOW)
|
||||||
{
|
{
|
||||||
RenderStyle = STYLE_None;
|
RenderStyle = STYLE_None;
|
||||||
|
@ -4035,6 +4053,10 @@ void AActor::HandleSpawnFlags ()
|
||||||
level.total_secrets++;
|
level.total_secrets++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (SpawnFlags & MTF_DOUBLEHEALTH)
|
||||||
|
{
|
||||||
|
health *= 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AActor::BeginPlay ()
|
void AActor::BeginPlay ()
|
||||||
|
|
|
@ -632,6 +632,31 @@ public:
|
||||||
Flag(th->flags, MTF_SECRET, key);
|
Flag(th->flags, MTF_SECRET, key);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NAME_Transparent:
|
||||||
|
CHECK_N(Zd | Zdt)
|
||||||
|
Flag(th->flags, MTF_TRANS, key);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case NAME_Additive:
|
||||||
|
CHECK_N(Zd | Zdt)
|
||||||
|
Flag(th->flags, MTF_ADD, key);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case NAME_Subtractive:
|
||||||
|
CHECK_N(Zd | Zdt)
|
||||||
|
Flag(th->flags, MTF_SUBTRACT, key);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case NAME_Spectre:
|
||||||
|
CHECK_N(Zd | Zdt)
|
||||||
|
Flag(th->flags, MTF_SPECTRE, key);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case NAME_Doublehealth:
|
||||||
|
CHECK_N(Zd | Zdt)
|
||||||
|
Flag(th->flags, MTF_DOUBLEHEALTH, key);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (0 == strnicmp("user_", key.GetChars(), 5))
|
if (0 == strnicmp("user_", key.GetChars(), 5))
|
||||||
{ // Custom user key - Sets an actor's user variable directly
|
{ // Custom user key - Sets an actor's user variable directly
|
||||||
|
@ -686,6 +711,7 @@ public:
|
||||||
{
|
{
|
||||||
bool passuse = false;
|
bool passuse = false;
|
||||||
bool strifetrans = false;
|
bool strifetrans = false;
|
||||||
|
bool strifetrans2 = false;
|
||||||
FString arg0str, arg1str;
|
FString arg0str, arg1str;
|
||||||
|
|
||||||
memset(ld, 0, sizeof(*ld));
|
memset(ld, 0, sizeof(*ld));
|
||||||
|
@ -803,6 +829,11 @@ public:
|
||||||
strifetrans = CheckBool(key);
|
strifetrans = CheckBool(key);
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
case NAME_Transparent:
|
||||||
|
CHECK_N(St | Zd | Zdt | Va)
|
||||||
|
strifetrans2 = CheckBool(key);
|
||||||
|
continue;
|
||||||
|
|
||||||
case NAME_Passuse:
|
case NAME_Passuse:
|
||||||
CHECK_N(Dm | Zd | Zdt | Va)
|
CHECK_N(Dm | Zd | Zdt | Va)
|
||||||
passuse = CheckBool(key);
|
passuse = CheckBool(key);
|
||||||
|
@ -965,6 +996,10 @@ public:
|
||||||
{
|
{
|
||||||
ld->Alpha = FRACUNIT * 3/4;
|
ld->Alpha = FRACUNIT * 3/4;
|
||||||
}
|
}
|
||||||
|
if (strifetrans2 && ld->Alpha == FRACUNIT)
|
||||||
|
{
|
||||||
|
ld->Alpha = FRACUNIT * 1/4;
|
||||||
|
}
|
||||||
if (ld->sidedef[0] == NULL)
|
if (ld->sidedef[0] == NULL)
|
||||||
{
|
{
|
||||||
ld->sidedef[0] = (side_t*)(intptr_t)(1);
|
ld->sidedef[0] = (side_t*)(intptr_t)(1);
|
||||||
|
|
|
@ -89,6 +89,9 @@ void P_TranslateLineDef (line_t *ld, maplinedef_t *mld)
|
||||||
case -2:
|
case -2:
|
||||||
ld->Alpha = FRACUNIT*3/4;
|
ld->Alpha = FRACUNIT*3/4;
|
||||||
break;
|
break;
|
||||||
|
case -3:
|
||||||
|
ld->Alpha = FRACUNIT / 4;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
newflags |= LineFlagTranslations[i].newvalue;
|
newflags |= LineFlagTranslations[i].newvalue;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -239,5 +239,6 @@ enum
|
||||||
|
|
||||||
//
|
//
|
||||||
ML_PASSTHROUGH = -1,
|
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 8 = ML_MAPPED;
|
||||||
lineflag 9 = ML_RAILING;
|
lineflag 9 = ML_RAILING;
|
||||||
lineflag 10 = ML_BLOCK_FLOATERS;
|
lineflag 10 = ML_BLOCK_FLOATERS;
|
||||||
|
lineflag 11 = ML_TRANSPARENT;
|
||||||
lineflag 12 = ML_TRANSLUCENT;
|
lineflag 12 = ML_TRANSLUCENT;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue