From 01f88cfb16eb151e72fa6ab40da57c3585831971 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Thu, 1 Jun 2017 10:41:52 -0400 Subject: [PATCH 01/13] - Added 'canonical transparency' cvar r_canontrans - this simply turns off transparency for Doom objects that were marked as transparent sometime in ZDoom's development cycle --- src/actor.h | 1 + src/gl/scene/gl_sprite.cpp | 8 ++++++++ src/polyrenderer/scene/poly_sprite.cpp | 6 +++++- src/r_data/renderstyle.cpp | 1 + src/scripting/thingdef_data.cpp | 1 + src/swrenderer/things/r_sprite.cpp | 3 +++ wadsrc/static/zscript/doom/arachnotron.txt | 1 + wadsrc/static/zscript/doom/archvile.txt | 2 +- wadsrc/static/zscript/doom/bossbrain.txt | 1 + wadsrc/static/zscript/doom/bruiser.txt | 1 + wadsrc/static/zscript/doom/cacodemon.txt | 1 + wadsrc/static/zscript/doom/doomartifacts.txt | 1 + wadsrc/static/zscript/doom/doomimp.txt | 1 + wadsrc/static/zscript/doom/doommisc.txt | 1 + wadsrc/static/zscript/doom/fatso.txt | 1 + wadsrc/static/zscript/doom/lostsoul.txt | 2 +- wadsrc/static/zscript/doom/revenant.txt | 2 ++ wadsrc/static/zscript/doom/weaponbfg.txt | 1 + wadsrc/static/zscript/doom/weaponplasma.txt | 1 + 19 files changed, 33 insertions(+), 3 deletions(-) diff --git a/src/actor.h b/src/actor.h index b1cf58676..e219f6385 100644 --- a/src/actor.h +++ b/src/actor.h @@ -402,6 +402,7 @@ enum ActorFlag8 { MF8_FRIGHTENING = 0x00000001, // for those moments when halloween just won't do MF8_INSCROLLSEC = 0x00000002, // actor is partially inside a scrolling sector + MF8_ZDOOMTRANS = 0x00000004, // is not normally transparent in Vanilla Doom }; // --- mobj.renderflags --- diff --git a/src/gl/scene/gl_sprite.cpp b/src/gl/scene/gl_sprite.cpp index c491bb33e..fa5b40dec 100644 --- a/src/gl/scene/gl_sprite.cpp +++ b/src/gl/scene/gl_sprite.cpp @@ -75,6 +75,7 @@ CUSTOM_CVAR(Int, gl_fuzztype, 0, CVAR_ARCHIVE) } EXTERN_CVAR (Float, transsouls) +EXTERN_CVAR (Bool, r_canontrans) extern TArray sprites; extern TArray SpriteFrames; @@ -992,6 +993,13 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal) { trans = 1.f; } + if ((thing->flags8 & MF8_ZDOOMTRANS) && r_canontrans) + { // [SP] "canonical transparency" - with the flip of a CVar, disable transparency for Doom objects + trans = 1.f; + RenderStyle.BlendOp = STYLEOP_Add; + RenderStyle.SrcAlpha = STYLEALPHA_One; + RenderStyle.DestAlpha = STYLEALPHA_Zero; + } if (trans >= 1.f - FLT_EPSILON && RenderStyle.BlendOp != STYLEOP_Shadow && ( (RenderStyle.SrcAlpha == STYLEALPHA_One && RenderStyle.DestAlpha == STYLEALPHA_Zero) || diff --git a/src/polyrenderer/scene/poly_sprite.cpp b/src/polyrenderer/scene/poly_sprite.cpp index 2ddf46df3..fb2c4ea28 100644 --- a/src/polyrenderer/scene/poly_sprite.cpp +++ b/src/polyrenderer/scene/poly_sprite.cpp @@ -31,6 +31,7 @@ EXTERN_CVAR(Float, transsouls) EXTERN_CVAR(Int, r_drawfuzz) +EXTERN_CVAR (Bool, r_canontrans) bool RenderPolySprite::GetLine(AActor *thing, DVector2 &left, DVector2 &right) { @@ -145,7 +146,10 @@ void RenderPolySprite::Render(const TriMatrix &worldToClip, const PolyClipPlane args.SetStencilTestValue(stencilValue); args.SetWriteStencil(true, stencilValue); args.SetClipPlane(clipPlane); - args.SetStyle(thing->RenderStyle, thing->Alpha, thing->fillcolor, thing->Translation, tex, fullbrightSprite); + if ((thing->flags8 & MF8_ZDOOMTRANS) && r_canontrans) + args.SetStyle(LegacyRenderStyles[STYLE_Normal], 1.0f, thing->fillcolor, thing->Translation, tex, fullbrightSprite); + else + args.SetStyle(thing->RenderStyle, thing->Alpha, thing->fillcolor, thing->Translation, tex, fullbrightSprite); args.SetSubsectorDepthTest(true); args.SetWriteSubsectorDepth(false); args.SetWriteStencil(false); diff --git a/src/r_data/renderstyle.cpp b/src/r_data/renderstyle.cpp index 987de82b9..11943f46d 100644 --- a/src/r_data/renderstyle.cpp +++ b/src/r_data/renderstyle.cpp @@ -38,6 +38,7 @@ #include "serializer.h" CVAR (Bool, r_drawtrans, true, 0) +CVAR (Bool, r_canontrans, false, CVAR_ARCHIVE) CVAR (Int, r_drawfuzz, 1, CVAR_ARCHIVE) // Convert legacy render styles to flexible render styles. diff --git a/src/scripting/thingdef_data.cpp b/src/scripting/thingdef_data.cpp index f62ba0c88..d978136b8 100644 --- a/src/scripting/thingdef_data.cpp +++ b/src/scripting/thingdef_data.cpp @@ -325,6 +325,7 @@ static FFlagDef ActorFlagDefs[]= DEFINE_FLAG(MF7, SPRITEFLIP, AActor, flags7), DEFINE_FLAG(MF8, FRIGHTENING, AActor, flags8), + DEFINE_FLAG(MF8, ZDOOMTRANS, AActor, flags8), // Effect flags DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects), diff --git a/src/swrenderer/things/r_sprite.cpp b/src/swrenderer/things/r_sprite.cpp index 889430004..c7c2898ba 100644 --- a/src/swrenderer/things/r_sprite.cpp +++ b/src/swrenderer/things/r_sprite.cpp @@ -68,6 +68,7 @@ EXTERN_CVAR(Bool, r_fullbrightignoresectorcolor) EXTERN_CVAR(Bool, gl_light_sprites) +EXTERN_CVAR (Bool, r_canontrans) namespace swrenderer { @@ -212,6 +213,8 @@ namespace swrenderer if (thing->flags5 & MF5_BRIGHT) vis->renderflags |= RF_FULLBRIGHT; // kg3D vis->RenderStyle = thing->RenderStyle; + if ((thing->flags8 & MF8_ZDOOMTRANS) && r_canontrans) + vis->RenderStyle = LegacyRenderStyles[STYLE_Normal]; vis->FillColor = thing->fillcolor; vis->Translation = thing->Translation; // [RH] thing translation table vis->FakeFlatStat = fakeside; diff --git a/wadsrc/static/zscript/doom/arachnotron.txt b/wadsrc/static/zscript/doom/arachnotron.txt index c7e11ab14..36bb2b38e 100644 --- a/wadsrc/static/zscript/doom/arachnotron.txt +++ b/wadsrc/static/zscript/doom/arachnotron.txt @@ -72,6 +72,7 @@ class ArachnotronPlasma : Actor Damage 5; Projectile; +RANDOMIZE + +ZDOOMTRANS RenderStyle "Add"; Alpha 0.75; SeeSound "baby/attack"; diff --git a/wadsrc/static/zscript/doom/archvile.txt b/wadsrc/static/zscript/doom/archvile.txt index 2ea153be1..8e0a98dcb 100644 --- a/wadsrc/static/zscript/doom/archvile.txt +++ b/wadsrc/static/zscript/doom/archvile.txt @@ -70,7 +70,7 @@ class ArchvileFire : Actor { Default { - +NOBLOCKMAP +NOGRAVITY + +NOBLOCKMAP +NOGRAVITY +ZDOOMTRANS RenderStyle "Add"; Alpha 1; } diff --git a/wadsrc/static/zscript/doom/bossbrain.txt b/wadsrc/static/zscript/doom/bossbrain.txt index 07f0cc946..5b87182c9 100644 --- a/wadsrc/static/zscript/doom/bossbrain.txt +++ b/wadsrc/static/zscript/doom/bossbrain.txt @@ -120,6 +120,7 @@ class SpawnFire : Actor Height 78; +NOBLOCKMAP +NOGRAVITY + +ZDOOMTRANS RenderStyle "Add"; } States diff --git a/wadsrc/static/zscript/doom/bruiser.txt b/wadsrc/static/zscript/doom/bruiser.txt index c1faa23c1..81f12db54 100644 --- a/wadsrc/static/zscript/doom/bruiser.txt +++ b/wadsrc/static/zscript/doom/bruiser.txt @@ -121,6 +121,7 @@ class BaronBall : Actor Damage 8; Projectile ; +RANDOMIZE + +ZDOOMTRANS RenderStyle "Add"; Alpha 1; SeeSound "baron/attack"; diff --git a/wadsrc/static/zscript/doom/cacodemon.txt b/wadsrc/static/zscript/doom/cacodemon.txt index b21acacd2..8cd3a5089 100644 --- a/wadsrc/static/zscript/doom/cacodemon.txt +++ b/wadsrc/static/zscript/doom/cacodemon.txt @@ -71,6 +71,7 @@ class CacodemonBall : Actor Damage 5; Projectile; +RANDOMIZE + +ZDOOMTRANS RenderStyle "Add"; Alpha 1; SeeSound "caco/attack"; diff --git a/wadsrc/static/zscript/doom/doomartifacts.txt b/wadsrc/static/zscript/doom/doomartifacts.txt index a6996cb88..bb04da93c 100644 --- a/wadsrc/static/zscript/doom/doomartifacts.txt +++ b/wadsrc/static/zscript/doom/doomartifacts.txt @@ -97,6 +97,7 @@ class BlurSphere : PowerupGiver { +COUNTITEM +VISIBILITYPULSE + +ZDOOMTRANS +INVENTORY.AUTOACTIVATE +INVENTORY.ALWAYSPICKUP +INVENTORY.BIGPOWERUP diff --git a/wadsrc/static/zscript/doom/doomimp.txt b/wadsrc/static/zscript/doom/doomimp.txt index d2b93acdd..c3a187b38 100644 --- a/wadsrc/static/zscript/doom/doomimp.txt +++ b/wadsrc/static/zscript/doom/doomimp.txt @@ -77,6 +77,7 @@ class DoomImpBall : Actor Damage 3; Projectile; +RANDOMIZE + +ZDOOMTRANS RenderStyle "Add"; Alpha 1; SeeSound "imp/attack"; diff --git a/wadsrc/static/zscript/doom/doommisc.txt b/wadsrc/static/zscript/doom/doommisc.txt index 7d4c9dec4..c6d8af717 100644 --- a/wadsrc/static/zscript/doom/doommisc.txt +++ b/wadsrc/static/zscript/doom/doommisc.txt @@ -61,6 +61,7 @@ class BulletPuff : Actor +NOGRAVITY +ALLOWPARTICLES +RANDOMIZE + +ZDOOMTRANS RenderStyle "Translucent"; Alpha 0.5; VSpeed 1; diff --git a/wadsrc/static/zscript/doom/fatso.txt b/wadsrc/static/zscript/doom/fatso.txt index e70c97924..2e6321650 100644 --- a/wadsrc/static/zscript/doom/fatso.txt +++ b/wadsrc/static/zscript/doom/fatso.txt @@ -74,6 +74,7 @@ class FatShot : Actor Damage 8; Projectile; +RANDOMIZE + +ZDOOMTRANS RenderStyle "Add"; Alpha 1; SeeSound "fatso/attack"; diff --git a/wadsrc/static/zscript/doom/lostsoul.txt b/wadsrc/static/zscript/doom/lostsoul.txt index 7d918aa10..ce7f07f51 100644 --- a/wadsrc/static/zscript/doom/lostsoul.txt +++ b/wadsrc/static/zscript/doom/lostsoul.txt @@ -15,7 +15,7 @@ class LostSoul : Actor Damage 3; PainChance 256; Monster; - +FLOAT +NOGRAVITY +MISSILEMORE +DONTFALL +NOICEDEATH; + +FLOAT +NOGRAVITY +MISSILEMORE +DONTFALL +NOICEDEATH +ZDOOMTRANS; AttackSound "skull/melee"; PainSound "skull/pain"; DeathSound "skull/death"; diff --git a/wadsrc/static/zscript/doom/revenant.txt b/wadsrc/static/zscript/doom/revenant.txt index 82d563934..c3a7c218d 100644 --- a/wadsrc/static/zscript/doom/revenant.txt +++ b/wadsrc/static/zscript/doom/revenant.txt @@ -80,6 +80,7 @@ class RevenantTracer : Actor Projectile; +SEEKERMISSILE +RANDOMIZE + +ZDOOMTRANS SeeSound "skeleton/attack"; DeathSound "skeleton/tracex"; RenderStyle "Add"; @@ -110,6 +111,7 @@ class RevenantTracerSmoke : Actor +NOBLOCKMAP +NOGRAVITY +NOTELEPORT + +ZDOOMTRANS RenderStyle "Translucent"; Alpha 0.5; } diff --git a/wadsrc/static/zscript/doom/weaponbfg.txt b/wadsrc/static/zscript/doom/weaponbfg.txt index 9bf0084b3..9da326313 100644 --- a/wadsrc/static/zscript/doom/weaponbfg.txt +++ b/wadsrc/static/zscript/doom/weaponbfg.txt @@ -142,6 +142,7 @@ class BFGBall : Actor Damage 100; Projectile; +RANDOMIZE + +ZDOOMTRANS RenderStyle "Add"; Alpha 0.75; DeathSound "weapons/bfgx"; diff --git a/wadsrc/static/zscript/doom/weaponplasma.txt b/wadsrc/static/zscript/doom/weaponplasma.txt index 945339a35..b66092b82 100644 --- a/wadsrc/static/zscript/doom/weaponplasma.txt +++ b/wadsrc/static/zscript/doom/weaponplasma.txt @@ -51,6 +51,7 @@ class PlasmaBall : Actor Damage 5; Projectile; +RANDOMIZE + +ZDOOMTRANS RenderStyle "Add"; Alpha 0.75; SeeSound "weapons/plasmaf"; From c252b5d753e5d3fa5ab8012987007cf6ee826e46 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Thu, 1 Jun 2017 12:05:43 -0400 Subject: [PATCH 02/13] - fixed: forgot to assign +ZDOOMTRANS to rockets --- wadsrc/static/zscript/doom/weaponrlaunch.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/wadsrc/static/zscript/doom/weaponrlaunch.txt b/wadsrc/static/zscript/doom/weaponrlaunch.txt index 906db3823..042b96823 100644 --- a/wadsrc/static/zscript/doom/weaponrlaunch.txt +++ b/wadsrc/static/zscript/doom/weaponrlaunch.txt @@ -55,6 +55,7 @@ class Rocket : Actor +RANDOMIZE +DEHEXPLOSION +ROCKETTRAIL + +ZDOOMTRANS SeeSound "weapons/rocklf"; DeathSound "weapons/rocklx"; Obituary "$OB_MPROCKET"; From 89b372cb0151fbcdca76bad604ef29c78c8d700f Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Thu, 1 Jun 2017 13:13:30 -0400 Subject: [PATCH 03/13] - Changed MF7_SPRITEFLIP, MF8_ZDOOMTRANS to RenderFlags - Added RF_ZDOOMADD - renamed r_canontrans to r_vanillatrans - this developer's insanity level has increased by 231%. --- src/actor.h | 6 +++-- src/gl/scene/gl_sprite.cpp | 33 ++++++++++++++++--------- src/polyrenderer/scene/poly_sprite.cpp | 6 +++-- src/r_data/renderstyle.cpp | 2 +- src/scripting/thingdef_data.cpp | 5 ++-- src/swrenderer/scene/r_opaque_pass.cpp | 2 +- src/swrenderer/things/r_sprite.cpp | 13 +++++++--- wadsrc/static/zscript/heretic/beast.txt | 2 ++ 8 files changed, 46 insertions(+), 23 deletions(-) diff --git a/src/actor.h b/src/actor.h index e219f6385..57a9687d0 100644 --- a/src/actor.h +++ b/src/actor.h @@ -396,13 +396,11 @@ enum ActorFlag7 MF7_FORCEZERORADIUSDMG = 0x10000000, // passes zero radius damage on to P_DamageMobj, this is necessary in some cases where DoSpecialDamage gets overrideen. MF7_NOINFIGHTSPECIES = 0x20000000, // don't start infights with one's own species. MF7_FORCEINFIGHTING = 0x40000000, // overrides a map setting of 'no infighting'. - MF7_SPRITEFLIP = 0x80000000, // sprite flipped on x-axis }; enum ActorFlag8 { MF8_FRIGHTENING = 0x00000001, // for those moments when halloween just won't do MF8_INSCROLLSEC = 0x00000002, // actor is partially inside a scrolling sector - MF8_ZDOOMTRANS = 0x00000004, // is not normally transparent in Vanilla Doom }; // --- mobj.renderflags --- @@ -444,6 +442,10 @@ enum ActorRenderFlag RF_INTERPOLATEANGLES = 0x01000000, // [MC] Allow interpolation of the actor's angle, pitch and roll. RF_MAYBEINVISIBLE = 0x02000000, RF_DONTINTERPOLATE = 0x04000000, // no render interpolation ever! + + RF_SPRITEFLIP = 0x08000000, // sprite flipped on x-axis + RF_ZDOOMTRANS = 0x10000000, // is not normally transparent in Vanilla Doom + RF_ZDOOMADD = 0x20000000, // is not normally additive in Vanilla Hexen/Heretic/Strife }; // This translucency value produces the closest match to Heretic's TINTTAB. diff --git a/src/gl/scene/gl_sprite.cpp b/src/gl/scene/gl_sprite.cpp index fa5b40dec..f6fecf0b1 100644 --- a/src/gl/scene/gl_sprite.cpp +++ b/src/gl/scene/gl_sprite.cpp @@ -75,7 +75,7 @@ CUSTOM_CVAR(Int, gl_fuzztype, 0, CVAR_ARCHIVE) } EXTERN_CVAR (Float, transsouls) -EXTERN_CVAR (Bool, r_canontrans) +EXTERN_CVAR (Bool, r_vanillatrans) extern TArray sprites; extern TArray SpriteFrames; @@ -801,7 +801,7 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal) sprangle = 0.; rot = 0; } - patch = sprites[spritenum].GetSpriteFrame(thing->frame, rot, sprangle, &mirror, !!(thing->flags7 & MF7_SPRITEFLIP)); + patch = sprites[spritenum].GetSpriteFrame(thing->frame, rot, sprangle, &mirror, !!(thing->renderflags & RF_SPRITEFLIP)); } if (!patch.isValid()) return; @@ -817,7 +817,7 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal) gltexture->GetSpriteRect(&r); // [SP] SpriteFlip - if (thing->flags7 & MF7_SPRITEFLIP) + if (thing->renderflags & RF_SPRITEFLIP) thing->renderflags ^= RF_XFLIP; if (mirror ^ !!(thing->renderflags & RF_XFLIP)) @@ -832,7 +832,7 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal) ur = gltexture->GetSpriteUL(); } - if (thing->flags7 & MF7_SPRITEFLIP) // [SP] Flip back + if (thing->renderflags & RF_SPRITEFLIP) // [SP] Flip back thing->renderflags ^= RF_XFLIP; r.Scale(sprscale.X, sprscale.Y); @@ -993,14 +993,25 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal) { trans = 1.f; } - if ((thing->flags8 & MF8_ZDOOMTRANS) && r_canontrans) - { // [SP] "canonical transparency" - with the flip of a CVar, disable transparency for Doom objects - trans = 1.f; - RenderStyle.BlendOp = STYLEOP_Add; - RenderStyle.SrcAlpha = STYLEALPHA_One; - RenderStyle.DestAlpha = STYLEALPHA_Zero; - } + if (r_vanillatrans) + { + // [SP] "canonical transparency" - with the flip of a CVar, disable transparency for Doom objects, + // and disable 'additive' translucency for certain objects from other games. + if (thing->renderflags & RF_ZDOOMTRANS) + { + trans = 1.f; + RenderStyle.BlendOp = STYLEOP_Add; + RenderStyle.SrcAlpha = STYLEALPHA_One; + RenderStyle.DestAlpha = STYLEALPHA_Zero; + } + if (thing->renderflags & RF_ZDOOMADD) + { + RenderStyle.BlendOp = STYLEOP_Add; + RenderStyle.SrcAlpha = STYLEALPHA_Src; + RenderStyle.DestAlpha = STYLEALPHA_InvSrc; + } + } if (trans >= 1.f - FLT_EPSILON && RenderStyle.BlendOp != STYLEOP_Shadow && ( (RenderStyle.SrcAlpha == STYLEALPHA_One && RenderStyle.DestAlpha == STYLEALPHA_Zero) || (RenderStyle.SrcAlpha == STYLEALPHA_Src && RenderStyle.DestAlpha == STYLEALPHA_InvSrc) diff --git a/src/polyrenderer/scene/poly_sprite.cpp b/src/polyrenderer/scene/poly_sprite.cpp index fb2c4ea28..398f37e7b 100644 --- a/src/polyrenderer/scene/poly_sprite.cpp +++ b/src/polyrenderer/scene/poly_sprite.cpp @@ -31,7 +31,7 @@ EXTERN_CVAR(Float, transsouls) EXTERN_CVAR(Int, r_drawfuzz) -EXTERN_CVAR (Bool, r_canontrans) +EXTERN_CVAR (Bool, r_vanillatrans) bool RenderPolySprite::GetLine(AActor *thing, DVector2 &left, DVector2 &right) { @@ -146,8 +146,10 @@ void RenderPolySprite::Render(const TriMatrix &worldToClip, const PolyClipPlane args.SetStencilTestValue(stencilValue); args.SetWriteStencil(true, stencilValue); args.SetClipPlane(clipPlane); - if ((thing->flags8 & MF8_ZDOOMTRANS) && r_canontrans) + if ((thing->renderflags & RF_ZDOOMTRANS) && r_vanillatrans) args.SetStyle(LegacyRenderStyles[STYLE_Normal], 1.0f, thing->fillcolor, thing->Translation, tex, fullbrightSprite); + else if ((thing->renderflags & RF_ZDOOMADD) && r_vanillatrans) + args.SetStyle(LegacyRenderStyles[STYLE_Translucent], thing->Alpha, thing->fillcolor, thing->Translation, tex, fullbrightSprite); else args.SetStyle(thing->RenderStyle, thing->Alpha, thing->fillcolor, thing->Translation, tex, fullbrightSprite); args.SetSubsectorDepthTest(true); diff --git a/src/r_data/renderstyle.cpp b/src/r_data/renderstyle.cpp index 11943f46d..fc1905f91 100644 --- a/src/r_data/renderstyle.cpp +++ b/src/r_data/renderstyle.cpp @@ -38,7 +38,7 @@ #include "serializer.h" CVAR (Bool, r_drawtrans, true, 0) -CVAR (Bool, r_canontrans, false, CVAR_ARCHIVE) +CVAR (Bool, r_vanillatrans, false, CVAR_ARCHIVE) CVAR (Int, r_drawfuzz, 1, CVAR_ARCHIVE) // Convert legacy render styles to flexible render styles. diff --git a/src/scripting/thingdef_data.cpp b/src/scripting/thingdef_data.cpp index d978136b8..e53a7d48a 100644 --- a/src/scripting/thingdef_data.cpp +++ b/src/scripting/thingdef_data.cpp @@ -322,10 +322,8 @@ static FFlagDef ActorFlagDefs[]= DEFINE_FLAG(MF7, FORCEZERORADIUSDMG, AActor, flags7), DEFINE_FLAG(MF7, NOINFIGHTSPECIES, AActor, flags7), DEFINE_FLAG(MF7, FORCEINFIGHTING, AActor, flags7), - DEFINE_FLAG(MF7, SPRITEFLIP, AActor, flags7), DEFINE_FLAG(MF8, FRIGHTENING, AActor, flags8), - DEFINE_FLAG(MF8, ZDOOMTRANS, AActor, flags8), // Effect flags DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects), @@ -347,6 +345,9 @@ static FFlagDef ActorFlagDefs[]= DEFINE_FLAG(RF, YFLIP, AActor, renderflags), DEFINE_FLAG(RF, INTERPOLATEANGLES, AActor, renderflags), DEFINE_FLAG(RF, DONTINTERPOLATE, AActor, renderflags), + DEFINE_FLAG(RF, SPRITEFLIP, AActor, renderflags), + DEFINE_FLAG(RF, ZDOOMTRANS, AActor, renderflags), + DEFINE_FLAG(RF, ZDOOMADD, AActor, renderflags), // Bounce flags DEFINE_FLAG2(BOUNCE_Walls, BOUNCEONWALLS, AActor, BounceFlags), diff --git a/src/swrenderer/scene/r_opaque_pass.cpp b/src/swrenderer/scene/r_opaque_pass.cpp index 1838122d0..bb8081a27 100644 --- a/src/swrenderer/scene/r_opaque_pass.cpp +++ b/src/swrenderer/scene/r_opaque_pass.cpp @@ -1007,7 +1007,7 @@ namespace swrenderer DAngle sprangle = thing->GetSpriteAngle((sprite.pos - viewpoint.Pos).Angle(), viewpoint.TicFrac); bool flipX; - FTextureID tex = sprdef->GetSpriteFrame(thing->frame, -1, sprangle, &flipX, !!(thing->flags7 & MF7_SPRITEFLIP)); + FTextureID tex = sprdef->GetSpriteFrame(thing->frame, -1, sprangle, &flipX, !!(thing->renderflags & RF_SPRITEFLIP)); if (tex.isValid()) { if (flipX) diff --git a/src/swrenderer/things/r_sprite.cpp b/src/swrenderer/things/r_sprite.cpp index c7c2898ba..7dcab13ec 100644 --- a/src/swrenderer/things/r_sprite.cpp +++ b/src/swrenderer/things/r_sprite.cpp @@ -68,7 +68,7 @@ EXTERN_CVAR(Bool, r_fullbrightignoresectorcolor) EXTERN_CVAR(Bool, gl_light_sprites) -EXTERN_CVAR (Bool, r_canontrans) +EXTERN_CVAR (Bool, r_vanillatrans) namespace swrenderer { @@ -147,7 +147,7 @@ namespace swrenderer renderflags ^= renderportal->MirrorFlags & RF_XFLIP; // [SP] SpriteFlip - if (thing->flags7 & MF7_SPRITEFLIP) + if (thing->renderflags & RF_SPRITEFLIP) renderflags ^= RF_XFLIP; // calculate edges of the shape @@ -213,8 +213,13 @@ namespace swrenderer if (thing->flags5 & MF5_BRIGHT) vis->renderflags |= RF_FULLBRIGHT; // kg3D vis->RenderStyle = thing->RenderStyle; - if ((thing->flags8 & MF8_ZDOOMTRANS) && r_canontrans) - vis->RenderStyle = LegacyRenderStyles[STYLE_Normal]; + if (r_vanillatrans) + { + if (thing->renderflags & RF_ZDOOMTRANS) + vis->RenderStyle = LegacyRenderStyles[STYLE_Normal]; + if (thing->renderflags & RF_ZDOOMADD) + vis->RenderStyle = LegacyRenderStyles[STYLE_Translucent]; + } vis->FillColor = thing->fillcolor; vis->Translation = thing->Translation; // [RH] thing translation table vis->FakeFlatStat = fakeside; diff --git a/wadsrc/static/zscript/heretic/beast.txt b/wadsrc/static/zscript/heretic/beast.txt index 209b2da56..9e004f5c1 100644 --- a/wadsrc/static/zscript/heretic/beast.txt +++ b/wadsrc/static/zscript/heretic/beast.txt @@ -75,6 +75,7 @@ class BeastBall : Actor -NOBLOCKMAP +WINDTHRUST +SPAWNSOUNDSOURCE + +ZDOOMADD RenderStyle "Add"; SeeSound "beast/attack"; } @@ -104,6 +105,7 @@ class Puffy : Actor +MISSILE +NOTELEPORT +DONTSPLASH + +ZDOOMADD RenderStyle "Add"; } States From a937f709aab0d9c16e4d0b47606022c4bfe0c963 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Thu, 1 Jun 2017 13:41:05 -0400 Subject: [PATCH 04/13] - Added +ZDOOMADD to all Heretic, Hexen, and Strife actors that needed it (that I know of...) - this developer's insanity level increased another 21% --- wadsrc/static/zscript/heretic/dsparil.txt | 4 ++++ wadsrc/static/zscript/heretic/hereticimp.txt | 1 + wadsrc/static/zscript/heretic/hereticmisc.txt | 2 +- wadsrc/static/zscript/heretic/ironlich.txt | 3 +++ wadsrc/static/zscript/heretic/mummy.txt | 1 + wadsrc/static/zscript/heretic/snake.txt | 1 + wadsrc/static/zscript/heretic/weaponblaster.txt | 1 + wadsrc/static/zscript/heretic/weaponcrossbow.txt | 1 + wadsrc/static/zscript/heretic/weaponphoenix.txt | 1 + wadsrc/static/zscript/heretic/weaponskullrod.txt | 3 +++ wadsrc/static/zscript/heretic/weaponstaff.txt | 1 + wadsrc/static/zscript/heretic/weaponwand.txt | 1 + wadsrc/static/zscript/heretic/wizard.txt | 1 + wadsrc/static/zscript/hexen/bishop.txt | 2 +- wadsrc/static/zscript/hexen/centaur.txt | 1 + wadsrc/static/zscript/hexen/clericflame.txt | 8 +++++--- wadsrc/static/zscript/hexen/demons.txt | 2 ++ wadsrc/static/zscript/hexen/dragon.txt | 2 ++ wadsrc/static/zscript/hexen/fighteraxe.txt | 1 + wadsrc/static/zscript/hexen/fighterquietus.txt | 1 + wadsrc/static/zscript/hexen/firedemon.txt | 1 + wadsrc/static/zscript/hexen/flame.txt | 4 ++++ wadsrc/static/zscript/hexen/heresiarch.txt | 1 + wadsrc/static/zscript/hexen/magelightning.txt | 3 +++ wadsrc/static/zscript/hexen/scriptprojectiles.txt | 1 + wadsrc/static/zscript/hexen/serpent.txt | 1 + wadsrc/static/zscript/raven/minotaur.txt | 1 + wadsrc/static/zscript/strife/sentinel.txt | 1 + wadsrc/static/zscript/strife/spectral.txt | 2 ++ wadsrc/static/zscript/strife/strifestuff.txt | 1 + wadsrc/static/zscript/strife/strifeweapons.txt | 1 + wadsrc/static/zscript/strife/thingstoblowup.txt | 1 + wadsrc/static/zscript/strife/weaponflamer.txt | 1 + wadsrc/static/zscript/strife/weapongrenade.txt | 1 + wadsrc/static/zscript/strife/weaponmauler.txt | 3 +++ 35 files changed, 56 insertions(+), 5 deletions(-) diff --git a/wadsrc/static/zscript/heretic/dsparil.txt b/wadsrc/static/zscript/heretic/dsparil.txt index 579f47492..bc2054f70 100644 --- a/wadsrc/static/zscript/heretic/dsparil.txt +++ b/wadsrc/static/zscript/heretic/dsparil.txt @@ -192,6 +192,7 @@ class SorcererFX1 : Actor Projectile; -ACTIVATEIMPACT -ACTIVATEPCROSS + +ZDOOMADD RenderStyle "Add"; } @@ -410,6 +411,7 @@ class Sorcerer2FX1 : Actor Projectile; -ACTIVATEIMPACT -ACTIVATEPCROSS + +ZDOOMADD RenderStyle "Add"; } @@ -457,6 +459,7 @@ class Sorcerer2FXSpark : Actor +NOGRAVITY +NOTELEPORT +CANNOTPUSH + +ZDOOMADD RenderStyle "Add"; } @@ -481,6 +484,7 @@ class Sorcerer2FX2 : Actor Projectile; -ACTIVATEIMPACT -ACTIVATEPCROSS + +ZDOOMADD RenderStyle "Add"; } diff --git a/wadsrc/static/zscript/heretic/hereticimp.txt b/wadsrc/static/zscript/heretic/hereticimp.txt index e6915c7f6..be3e2e7df 100644 --- a/wadsrc/static/zscript/heretic/hereticimp.txt +++ b/wadsrc/static/zscript/heretic/hereticimp.txt @@ -228,6 +228,7 @@ class HereticImpBall : Actor +SPAWNSOUNDSOURCE -ACTIVATEPCROSS -ACTIVATEIMPACT + +ZDOOMADD RenderStyle "Add"; } States diff --git a/wadsrc/static/zscript/heretic/hereticmisc.txt b/wadsrc/static/zscript/heretic/hereticmisc.txt index b66217352..895c04ed2 100644 --- a/wadsrc/static/zscript/heretic/hereticmisc.txt +++ b/wadsrc/static/zscript/heretic/hereticmisc.txt @@ -205,7 +205,7 @@ class TeleGlitter1 : Actor { Default { - +NOBLOCKMAP +NOGRAVITY +MISSILE + +NOBLOCKMAP +NOGRAVITY +MISSILE +ZDOOMADD RenderStyle "Add"; Damage 0; } diff --git a/wadsrc/static/zscript/heretic/ironlich.txt b/wadsrc/static/zscript/heretic/ironlich.txt index 65e510932..52fddc6f7 100644 --- a/wadsrc/static/zscript/heretic/ironlich.txt +++ b/wadsrc/static/zscript/heretic/ironlich.txt @@ -144,6 +144,7 @@ class HeadFX1 : Actor -ACTIVATEIMPACT -ACTIVATEPCROSS +THRUGHOST + +ZDOOMADD RenderStyle "Add"; } @@ -195,6 +196,7 @@ class HeadFX2 : Actor Projectile; -ACTIVATEIMPACT -ACTIVATEPCROSS + +ZDOOMADD RenderStyle "Add"; } @@ -223,6 +225,7 @@ class HeadFX3 : Actor Damage 5; Projectile; +WINDTHRUST + +ZDOOMADD -ACTIVATEIMPACT -ACTIVATEPCROSS -NOBLOCKMAP diff --git a/wadsrc/static/zscript/heretic/mummy.txt b/wadsrc/static/zscript/heretic/mummy.txt index 6d01fcea4..453c6e83c 100644 --- a/wadsrc/static/zscript/heretic/mummy.txt +++ b/wadsrc/static/zscript/heretic/mummy.txt @@ -135,6 +135,7 @@ class MummyFX1 : Actor -ACTIVATEPCROSS -ACTIVATEIMPACT +SEEKERMISSILE + +ZDOOMADD } States { diff --git a/wadsrc/static/zscript/heretic/snake.txt b/wadsrc/static/zscript/heretic/snake.txt index 15ae342aa..bc0d8344a 100644 --- a/wadsrc/static/zscript/heretic/snake.txt +++ b/wadsrc/static/zscript/heretic/snake.txt @@ -64,6 +64,7 @@ class SnakeProjA : Actor -ACTIVATEPCROSS +WINDTHRUST +SPAWNSOUNDSOURCE + +ZDOOMADD RenderStyle "Add"; SeeSound "snake/attack"; } diff --git a/wadsrc/static/zscript/heretic/weaponblaster.txt b/wadsrc/static/zscript/heretic/weaponblaster.txt index e7e1e92b5..38c30ee14 100644 --- a/wadsrc/static/zscript/heretic/weaponblaster.txt +++ b/wadsrc/static/zscript/heretic/weaponblaster.txt @@ -244,6 +244,7 @@ class BlasterPuff : Actor +NOBLOCKMAP +NOGRAVITY +PUFFONACTORS + +ZDOOMADD RenderStyle "Add"; SeeSound "weapons/blasterhit"; } diff --git a/wadsrc/static/zscript/heretic/weaponcrossbow.txt b/wadsrc/static/zscript/heretic/weaponcrossbow.txt index bd5e9517a..69fd108be 100644 --- a/wadsrc/static/zscript/heretic/weaponcrossbow.txt +++ b/wadsrc/static/zscript/heretic/weaponcrossbow.txt @@ -129,6 +129,7 @@ class CrossbowFX1 : Actor SeeSound "weapons/bowshoot"; DeathSound "weapons/bowhit"; Obituary "$OB_MPCROSSBOW"; + +ZDOOMADD } States diff --git a/wadsrc/static/zscript/heretic/weaponphoenix.txt b/wadsrc/static/zscript/heretic/weaponphoenix.txt index 558a257cd..a44bb4c13 100644 --- a/wadsrc/static/zscript/heretic/weaponphoenix.txt +++ b/wadsrc/static/zscript/heretic/weaponphoenix.txt @@ -292,6 +292,7 @@ class PhoenixFX2 : Actor DamageType "Fire"; Projectile; RenderStyle "Add"; + +ZDOOMADD Obituary "$OB_MPPPHOENIXROD"; } diff --git a/wadsrc/static/zscript/heretic/weaponskullrod.txt b/wadsrc/static/zscript/heretic/weaponskullrod.txt index da959f7ae..0e651807e 100644 --- a/wadsrc/static/zscript/heretic/weaponskullrod.txt +++ b/wadsrc/static/zscript/heretic/weaponskullrod.txt @@ -143,6 +143,7 @@ class HornRodFX1 : Actor Damage 3; Projectile; +WINDTHRUST + +ZDOOMADD -NOBLOCKMAP RenderStyle "Add"; SeeSound "weapons/hornrodshoot"; @@ -177,6 +178,7 @@ class HornRodFX2 : Actor Health 140; Projectile; RenderStyle "Add"; + +ZDOOMADD SeeSound "weapons/hornrodpowshoot"; DeathSound "weapons/hornrodpowhit"; Obituary "$OB_MPPSKULLROD"; @@ -364,6 +366,7 @@ class RainPillar : Actor Projectile; -ACTIVATEPCROSS -ACTIVATEIMPACT + +ZDOOMADD RenderStyle "Add"; Obituary "$OB_MPPSKULLROD"; } diff --git a/wadsrc/static/zscript/heretic/weaponstaff.txt b/wadsrc/static/zscript/heretic/weaponstaff.txt index 85126f503..1e1237780 100644 --- a/wadsrc/static/zscript/heretic/weaponstaff.txt +++ b/wadsrc/static/zscript/heretic/weaponstaff.txt @@ -132,6 +132,7 @@ class StaffPuff2 : Actor +NOBLOCKMAP +NOGRAVITY +PUFFONACTORS + +ZDOOMADD AttackSound "weapons/staffpowerhit"; } diff --git a/wadsrc/static/zscript/heretic/weaponwand.txt b/wadsrc/static/zscript/heretic/weaponwand.txt index 9516aa76c..38cd9e2de 100644 --- a/wadsrc/static/zscript/heretic/weaponwand.txt +++ b/wadsrc/static/zscript/heretic/weaponwand.txt @@ -142,6 +142,7 @@ class GoldWandFX1 : Actor Damage 2; Projectile; RenderStyle "Add"; + +ZDOOMADD DeathSound "weapons/wandhit"; Obituary "$OB_MPPGOLDWAND"; } diff --git a/wadsrc/static/zscript/heretic/wizard.txt b/wadsrc/static/zscript/heretic/wizard.txt index d146ae220..a3772573c 100644 --- a/wadsrc/static/zscript/heretic/wizard.txt +++ b/wadsrc/static/zscript/heretic/wizard.txt @@ -145,6 +145,7 @@ class WizardFX1 : Actor Projectile; -ACTIVATEIMPACT -ACTIVATEPCROSS + +ZDOOMADD RenderStyle "Add"; } diff --git a/wadsrc/static/zscript/hexen/bishop.txt b/wadsrc/static/zscript/hexen/bishop.txt index 32f0f3e63..8f4b2bd22 100644 --- a/wadsrc/static/zscript/hexen/bishop.txt +++ b/wadsrc/static/zscript/hexen/bishop.txt @@ -290,7 +290,7 @@ class BishopFX : Actor Projectile; +SEEKERMISSILE -ACTIVATEIMPACT -ACTIVATEPCROSS - +STRIFEDAMAGE + +STRIFEDAMAGE +ZDOOMADD RenderStyle "Add"; DeathSound "BishopMissileExplode"; } diff --git a/wadsrc/static/zscript/hexen/centaur.txt b/wadsrc/static/zscript/hexen/centaur.txt index abf2f19d2..960e79557 100644 --- a/wadsrc/static/zscript/hexen/centaur.txt +++ b/wadsrc/static/zscript/hexen/centaur.txt @@ -154,6 +154,7 @@ class CentaurFX : Actor Damage 4; Projectile; +SPAWNSOUNDSOURCE + +ZDOOMADD RenderStyle "Add"; SeeSound "CentaurLeaderAttack"; DeathSound "CentaurMissileExplode"; diff --git a/wadsrc/static/zscript/hexen/clericflame.txt b/wadsrc/static/zscript/hexen/clericflame.txt index 1978f43f1..a61891452 100644 --- a/wadsrc/static/zscript/hexen/clericflame.txt +++ b/wadsrc/static/zscript/hexen/clericflame.txt @@ -72,7 +72,7 @@ class CFlameFloor : Actor { Default { - +NOBLOCKMAP +NOGRAVITY + +NOBLOCKMAP +NOGRAVITY +ZDOOMADD RenderStyle "Add"; } States @@ -93,8 +93,8 @@ class FlamePuff : Actor { Radius 1; Height 1; - +NOBLOCKMAP +NOGRAVITY - RenderStyle "Add";; + +NOBLOCKMAP +NOGRAVITY +ZDOOMADD + RenderStyle "Add"; SeeSound "ClericFlameExplode"; AttackSound "ClericFlameExplode"; } @@ -159,6 +159,7 @@ class CircleFlame : Actor Projectile; -ACTIVATEIMPACT -ACTIVATEPCROSS + +ZDOOMADD RenderStyle "Add"; DeathSound "ClericFlameCircle"; Obituary "$OB_MPCWEAPFLAME"; @@ -216,6 +217,7 @@ class CFlameMissile : FastProjectile Damage 8; DamageType "Fire"; +INVISIBLE + +ZDOOMADD RenderStyle "Add"; Obituary "$OB_MPCWEAPFLAME"; } diff --git a/wadsrc/static/zscript/hexen/demons.txt b/wadsrc/static/zscript/hexen/demons.txt index ef4c96d8d..6bdbbe9f1 100644 --- a/wadsrc/static/zscript/hexen/demons.txt +++ b/wadsrc/static/zscript/hexen/demons.txt @@ -205,6 +205,7 @@ class Demon1FX1 : Actor DamageType "Fire"; Projectile; +SPAWNSOUNDSOURCE + +ZDOOMADD RenderStyle "Add"; SeeSound "DemonMissileFire"; DeathSound "DemonMissileExplode"; @@ -392,6 +393,7 @@ class Demon2FX1 : Actor DamageType "Fire"; Projectile; +SPAWNSOUNDSOURCE + +ZDOOMADD RenderStyle "Add"; SeeSound "DemonMissileFire"; DeathSound "DemonMissileExplode"; diff --git a/wadsrc/static/zscript/hexen/dragon.txt b/wadsrc/static/zscript/hexen/dragon.txt index 6082d1c61..231055186 100644 --- a/wadsrc/static/zscript/hexen/dragon.txt +++ b/wadsrc/static/zscript/hexen/dragon.txt @@ -311,6 +311,7 @@ class DragonFireball : Actor DamageType "Fire"; Projectile; -ACTIVATEIMPACT -ACTIVATEPCROSS + +ZDOOMADD RenderStyle "Add"; DeathSound "DragonFireballExplode"; } @@ -364,6 +365,7 @@ class DragonExplosion : Actor +NOBLOCKMAP +NOTELEPORT +INVISIBLE + +ZDOOMADD RenderStyle "Add"; DeathSound "DragonFireballExplode"; } diff --git a/wadsrc/static/zscript/hexen/fighteraxe.txt b/wadsrc/static/zscript/hexen/fighteraxe.txt index ccf8b5294..d20a5fc35 100644 --- a/wadsrc/static/zscript/hexen/fighteraxe.txt +++ b/wadsrc/static/zscript/hexen/fighteraxe.txt @@ -307,6 +307,7 @@ class AxePuffGlow : AxePuff Default { +PUFFONACTORS + +ZDOOMADD RenderStyle "Add"; Alpha 1; } diff --git a/wadsrc/static/zscript/hexen/fighterquietus.txt b/wadsrc/static/zscript/hexen/fighterquietus.txt index 53388eece..c3e5f9b2d 100644 --- a/wadsrc/static/zscript/hexen/fighterquietus.txt +++ b/wadsrc/static/zscript/hexen/fighterquietus.txt @@ -168,6 +168,7 @@ class FSwordMissile : Actor Damage 8; Projectile; +EXTREMEDEATH + +ZDOOMADD RenderStyle "Add"; DeathSound "FighterSwordExplode"; Obituary "$OB_MPFWEAPQUIETUS"; diff --git a/wadsrc/static/zscript/hexen/firedemon.txt b/wadsrc/static/zscript/hexen/firedemon.txt index 9ca12529f..65dff9544 100644 --- a/wadsrc/static/zscript/hexen/firedemon.txt +++ b/wadsrc/static/zscript/hexen/firedemon.txt @@ -436,6 +436,7 @@ class FireDemonMissile : Actor Projectile; RenderStyle "Add"; DeathSound "FireDemonMissileHit"; + +ZDOOMADD } States { diff --git a/wadsrc/static/zscript/hexen/flame.txt b/wadsrc/static/zscript/hexen/flame.txt index 4eab6c6d3..b4574031b 100644 --- a/wadsrc/static/zscript/hexen/flame.txt +++ b/wadsrc/static/zscript/hexen/flame.txt @@ -5,6 +5,7 @@ class FlameSmallTemp : Actor Default { +NOTELEPORT + +ZDOOMADD RenderStyle "Add"; } @@ -28,6 +29,7 @@ class FlameLargeTemp : Actor Default { +NOTELEPORT + +ZDOOMADD RenderStyle "Add"; } @@ -62,6 +64,7 @@ class FlameSmall : SwitchableDecoration { +NOTELEPORT +INVISIBLE + +ZDOOMADD Radius 15; RenderStyle "Add"; } @@ -95,6 +98,7 @@ class FlameLarge : SwitchableDecoration { +NOTELEPORT +INVISIBLE + +ZDOOMADD Radius 15; RenderStyle "Add"; } diff --git a/wadsrc/static/zscript/hexen/heresiarch.txt b/wadsrc/static/zscript/hexen/heresiarch.txt index f89d2fb83..fd9176a61 100644 --- a/wadsrc/static/zscript/hexen/heresiarch.txt +++ b/wadsrc/static/zscript/hexen/heresiarch.txt @@ -1125,6 +1125,7 @@ class SorcSpark1 : Actor +NOBLOCKMAP +DROPOFF +NOTELEPORT + +ZDOOMADD RenderStyle "Add"; } States diff --git a/wadsrc/static/zscript/hexen/magelightning.txt b/wadsrc/static/zscript/hexen/magelightning.txt index d45162d49..a70eeb8e1 100644 --- a/wadsrc/static/zscript/hexen/magelightning.txt +++ b/wadsrc/static/zscript/hexen/magelightning.txt @@ -165,6 +165,7 @@ class LightningCeiling : Lightning Damage 8; Projectile; +CEILINGHUGGER + +ZDOOMADD RenderStyle "Add"; } @@ -319,6 +320,7 @@ class LightningFloor : LightningCeiling { -CEILINGHUGGER +FLOORHUGGER + +ZDOOMADD RenderStyle "Add"; } @@ -374,6 +376,7 @@ class LightningZap : Actor Projectile; -ACTIVATEIMPACT -ACTIVATEPCROSS + +ZDOOMADD RenderStyle "Add"; Obituary "$OB_MPMWEAPLIGHTNING"; } diff --git a/wadsrc/static/zscript/hexen/scriptprojectiles.txt b/wadsrc/static/zscript/hexen/scriptprojectiles.txt index 5bf3f254f..eebb89b54 100644 --- a/wadsrc/static/zscript/hexen/scriptprojectiles.txt +++ b/wadsrc/static/zscript/hexen/scriptprojectiles.txt @@ -11,6 +11,7 @@ class FireBall : Actor DamageType "Fire"; +NOBLOCKMAP +NOGRAVITY +DROPOFF +MISSILE +NOTELEPORT + +ZDOOMADD RenderStyle "Add"; DeathSound "Fireball"; } diff --git a/wadsrc/static/zscript/hexen/serpent.txt b/wadsrc/static/zscript/hexen/serpent.txt index 98ca6643f..11bb01fb9 100644 --- a/wadsrc/static/zscript/hexen/serpent.txt +++ b/wadsrc/static/zscript/hexen/serpent.txt @@ -317,6 +317,7 @@ class SerpentFX : Actor Damage 4; Projectile; -ACTIVATEIMPACT -ACTIVATEPCROSS + +ZDOOMADD RenderStyle "Add"; DeathSound "SerpentFXHit"; } diff --git a/wadsrc/static/zscript/raven/minotaur.txt b/wadsrc/static/zscript/raven/minotaur.txt index d45ce03f6..14d18a19a 100644 --- a/wadsrc/static/zscript/raven/minotaur.txt +++ b/wadsrc/static/zscript/raven/minotaur.txt @@ -655,6 +655,7 @@ class MinotaurFX1 : Actor Projectile; -ACTIVATEIMPACT -ACTIVATEPCROSS + +ZDOOMADD RenderStyle "Add"; } States diff --git a/wadsrc/static/zscript/strife/sentinel.txt b/wadsrc/static/zscript/strife/sentinel.txt index e9e6255d4..268cd47da 100644 --- a/wadsrc/static/zscript/strife/sentinel.txt +++ b/wadsrc/static/zscript/strife/sentinel.txt @@ -97,6 +97,7 @@ class SentinelFX1 : Actor DamageType "Disintegrate"; Projectile; +STRIFEDAMAGE + +ZDOOMADD MaxStepHeight 4; RenderStyle "Add"; } diff --git a/wadsrc/static/zscript/strife/spectral.txt b/wadsrc/static/zscript/strife/spectral.txt index a56d9e717..8fa4cc44a 100644 --- a/wadsrc/static/zscript/strife/spectral.txt +++ b/wadsrc/static/zscript/strife/spectral.txt @@ -112,6 +112,7 @@ class SpectralLightningBase : Actor +ACTIVATEIMPACT +ACTIVATEPCROSS +STRIFEDAMAGE + +ZDOOMADD MaxStepHeight 4; RenderStyle "Add"; SeeSound "weapons/sigil"; @@ -257,6 +258,7 @@ class SpectralLightningHTail : Actor +NOBLOCKMAP +NOGRAVITY +DROPOFF + +ZDOOMADD RenderStyle "Add"; } States diff --git a/wadsrc/static/zscript/strife/strifestuff.txt b/wadsrc/static/zscript/strife/strifestuff.txt index f08eaa6a5..04f364c75 100644 --- a/wadsrc/static/zscript/strife/strifestuff.txt +++ b/wadsrc/static/zscript/strife/strifestuff.txt @@ -632,6 +632,7 @@ class TeleportSwirl : Actor Default { +NOBLOCKMAP + +ZDOOMADD RenderStyle "Add"; Alpha 0.25; } diff --git a/wadsrc/static/zscript/strife/strifeweapons.txt b/wadsrc/static/zscript/strife/strifeweapons.txt index 5cb01342e..e0d5f8f13 100644 --- a/wadsrc/static/zscript/strife/strifeweapons.txt +++ b/wadsrc/static/zscript/strife/strifeweapons.txt @@ -40,6 +40,7 @@ class StrifeSpark : StrifePuff { Default { + +ZDOOMADD RenderStyle "Add"; } States diff --git a/wadsrc/static/zscript/strife/thingstoblowup.txt b/wadsrc/static/zscript/strife/thingstoblowup.txt index a2b515efb..abc032093 100644 --- a/wadsrc/static/zscript/strife/thingstoblowup.txt +++ b/wadsrc/static/zscript/strife/thingstoblowup.txt @@ -49,6 +49,7 @@ class Bang4Cloud : Actor { +NOBLOCKMAP +NOGRAVITY + +ZDOOMADD RenderStyle "Add"; VSpeed 1; } diff --git a/wadsrc/static/zscript/strife/weaponflamer.txt b/wadsrc/static/zscript/strife/weaponflamer.txt index 9a47bc242..521cbc0c5 100644 --- a/wadsrc/static/zscript/strife/weaponflamer.txt +++ b/wadsrc/static/zscript/strife/weaponflamer.txt @@ -85,6 +85,7 @@ class FlameMissile : Actor Projectile; -NOGRAVITY +STRIFEDAMAGE + +ZDOOMADD MaxStepHeight 4; RenderStyle "Add"; SeeSound "weapons/flamethrower"; diff --git a/wadsrc/static/zscript/strife/weapongrenade.txt b/wadsrc/static/zscript/strife/weapongrenade.txt index 21e568313..eebf028db 100644 --- a/wadsrc/static/zscript/strife/weapongrenade.txt +++ b/wadsrc/static/zscript/strife/weapongrenade.txt @@ -217,6 +217,7 @@ class PhosphorousFire : Actor +NOTELEPORT +NODAMAGETHRUST +DONTSPLASH + +ZDOOMADD RenderStyle "Add"; Obituary "$OB_MPPHOSPHOROUSGRENADE"; } diff --git a/wadsrc/static/zscript/strife/weaponmauler.txt b/wadsrc/static/zscript/strife/weaponmauler.txt index 80f3afcde..4ee9e1baf 100644 --- a/wadsrc/static/zscript/strife/weaponmauler.txt +++ b/wadsrc/static/zscript/strife/weaponmauler.txt @@ -181,6 +181,7 @@ class MaulerPuff : Actor +NOBLOCKMAP +NOGRAVITY +PUFFONACTORS + +ZDOOMADD RenderStyle "Add"; DamageType "Disintegrate"; } @@ -206,6 +207,7 @@ class MaulerTorpedo : Actor DamageType "Disintegrate"; Projectile; +STRIFEDAMAGE + +ZDOOMADD MaxStepHeight 4; RenderStyle "Add"; SeeSound "weapons/mauler2fire"; @@ -268,6 +270,7 @@ class MaulerTorpedoWave : Actor DamageType "Disintegrate"; Projectile; +STRIFEDAMAGE + +ZDOOMADD MaxStepHeight 4; RenderStyle "Add"; Obituary "$OB_MPMAULER"; From 2997f31f9f6616a6ee32763306a61c5e17a9f02e Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Thu, 1 Jun 2017 14:03:51 -0400 Subject: [PATCH 05/13] - removed ZDOOMADD and updated actors in question with ZDOOMTRANS --- src/actor.h | 1 - src/gl/scene/gl_sprite.cpp | 7 ------- src/polyrenderer/scene/poly_sprite.cpp | 2 -- src/scripting/thingdef_data.cpp | 1 - src/swrenderer/things/r_sprite.cpp | 2 -- wadsrc/static/zscript/heretic/beast.txt | 4 ++-- wadsrc/static/zscript/heretic/dsparil.txt | 8 ++++---- wadsrc/static/zscript/heretic/hereticimp.txt | 2 +- wadsrc/static/zscript/heretic/hereticmisc.txt | 2 +- wadsrc/static/zscript/heretic/ironlich.txt | 6 +++--- wadsrc/static/zscript/heretic/mummy.txt | 2 +- wadsrc/static/zscript/heretic/snake.txt | 2 +- wadsrc/static/zscript/heretic/weaponblaster.txt | 2 +- wadsrc/static/zscript/heretic/weaponcrossbow.txt | 2 +- wadsrc/static/zscript/heretic/weaponphoenix.txt | 2 +- wadsrc/static/zscript/heretic/weaponskullrod.txt | 6 +++--- wadsrc/static/zscript/heretic/weaponstaff.txt | 2 +- wadsrc/static/zscript/heretic/weaponwand.txt | 2 +- wadsrc/static/zscript/heretic/wizard.txt | 2 +- wadsrc/static/zscript/hexen/bishop.txt | 2 +- wadsrc/static/zscript/hexen/centaur.txt | 2 +- wadsrc/static/zscript/hexen/clericflame.txt | 8 ++++---- wadsrc/static/zscript/hexen/demons.txt | 4 ++-- wadsrc/static/zscript/hexen/dragon.txt | 4 ++-- wadsrc/static/zscript/hexen/fighteraxe.txt | 2 +- wadsrc/static/zscript/hexen/fighterquietus.txt | 2 +- wadsrc/static/zscript/hexen/firedemon.txt | 2 +- wadsrc/static/zscript/hexen/flame.txt | 8 ++++---- wadsrc/static/zscript/hexen/heresiarch.txt | 2 +- wadsrc/static/zscript/hexen/magelightning.txt | 6 +++--- wadsrc/static/zscript/hexen/scriptprojectiles.txt | 2 +- wadsrc/static/zscript/hexen/serpent.txt | 2 +- wadsrc/static/zscript/raven/minotaur.txt | 2 +- wadsrc/static/zscript/strife/sentinel.txt | 2 +- wadsrc/static/zscript/strife/spectral.txt | 4 ++-- wadsrc/static/zscript/strife/strifestuff.txt | 2 +- wadsrc/static/zscript/strife/strifeweapons.txt | 2 +- wadsrc/static/zscript/strife/thingstoblowup.txt | 2 +- wadsrc/static/zscript/strife/weaponflamer.txt | 2 +- wadsrc/static/zscript/strife/weapongrenade.txt | 2 +- wadsrc/static/zscript/strife/weaponmauler.txt | 6 +++--- 41 files changed, 57 insertions(+), 70 deletions(-) diff --git a/src/actor.h b/src/actor.h index 57a9687d0..2059b8309 100644 --- a/src/actor.h +++ b/src/actor.h @@ -445,7 +445,6 @@ enum ActorRenderFlag RF_SPRITEFLIP = 0x08000000, // sprite flipped on x-axis RF_ZDOOMTRANS = 0x10000000, // is not normally transparent in Vanilla Doom - RF_ZDOOMADD = 0x20000000, // is not normally additive in Vanilla Hexen/Heretic/Strife }; // This translucency value produces the closest match to Heretic's TINTTAB. diff --git a/src/gl/scene/gl_sprite.cpp b/src/gl/scene/gl_sprite.cpp index f6fecf0b1..8d053e81c 100644 --- a/src/gl/scene/gl_sprite.cpp +++ b/src/gl/scene/gl_sprite.cpp @@ -1004,13 +1004,6 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal) RenderStyle.SrcAlpha = STYLEALPHA_One; RenderStyle.DestAlpha = STYLEALPHA_Zero; } - if (thing->renderflags & RF_ZDOOMADD) - { - RenderStyle.BlendOp = STYLEOP_Add; - RenderStyle.SrcAlpha = STYLEALPHA_Src; - RenderStyle.DestAlpha = STYLEALPHA_InvSrc; - } - } if (trans >= 1.f - FLT_EPSILON && RenderStyle.BlendOp != STYLEOP_Shadow && ( (RenderStyle.SrcAlpha == STYLEALPHA_One && RenderStyle.DestAlpha == STYLEALPHA_Zero) || diff --git a/src/polyrenderer/scene/poly_sprite.cpp b/src/polyrenderer/scene/poly_sprite.cpp index 398f37e7b..ba91f005b 100644 --- a/src/polyrenderer/scene/poly_sprite.cpp +++ b/src/polyrenderer/scene/poly_sprite.cpp @@ -148,8 +148,6 @@ void RenderPolySprite::Render(const TriMatrix &worldToClip, const PolyClipPlane args.SetClipPlane(clipPlane); if ((thing->renderflags & RF_ZDOOMTRANS) && r_vanillatrans) args.SetStyle(LegacyRenderStyles[STYLE_Normal], 1.0f, thing->fillcolor, thing->Translation, tex, fullbrightSprite); - else if ((thing->renderflags & RF_ZDOOMADD) && r_vanillatrans) - args.SetStyle(LegacyRenderStyles[STYLE_Translucent], thing->Alpha, thing->fillcolor, thing->Translation, tex, fullbrightSprite); else args.SetStyle(thing->RenderStyle, thing->Alpha, thing->fillcolor, thing->Translation, tex, fullbrightSprite); args.SetSubsectorDepthTest(true); diff --git a/src/scripting/thingdef_data.cpp b/src/scripting/thingdef_data.cpp index e53a7d48a..b63fd4eca 100644 --- a/src/scripting/thingdef_data.cpp +++ b/src/scripting/thingdef_data.cpp @@ -347,7 +347,6 @@ static FFlagDef ActorFlagDefs[]= DEFINE_FLAG(RF, DONTINTERPOLATE, AActor, renderflags), DEFINE_FLAG(RF, SPRITEFLIP, AActor, renderflags), DEFINE_FLAG(RF, ZDOOMTRANS, AActor, renderflags), - DEFINE_FLAG(RF, ZDOOMADD, AActor, renderflags), // Bounce flags DEFINE_FLAG2(BOUNCE_Walls, BOUNCEONWALLS, AActor, BounceFlags), diff --git a/src/swrenderer/things/r_sprite.cpp b/src/swrenderer/things/r_sprite.cpp index 7dcab13ec..d067b9007 100644 --- a/src/swrenderer/things/r_sprite.cpp +++ b/src/swrenderer/things/r_sprite.cpp @@ -217,8 +217,6 @@ namespace swrenderer { if (thing->renderflags & RF_ZDOOMTRANS) vis->RenderStyle = LegacyRenderStyles[STYLE_Normal]; - if (thing->renderflags & RF_ZDOOMADD) - vis->RenderStyle = LegacyRenderStyles[STYLE_Translucent]; } vis->FillColor = thing->fillcolor; vis->Translation = thing->Translation; // [RH] thing translation table diff --git a/wadsrc/static/zscript/heretic/beast.txt b/wadsrc/static/zscript/heretic/beast.txt index 9e004f5c1..e5f30d25b 100644 --- a/wadsrc/static/zscript/heretic/beast.txt +++ b/wadsrc/static/zscript/heretic/beast.txt @@ -75,7 +75,7 @@ class BeastBall : Actor -NOBLOCKMAP +WINDTHRUST +SPAWNSOUNDSOURCE - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; SeeSound "beast/attack"; } @@ -105,7 +105,7 @@ class Puffy : Actor +MISSILE +NOTELEPORT +DONTSPLASH - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; } States diff --git a/wadsrc/static/zscript/heretic/dsparil.txt b/wadsrc/static/zscript/heretic/dsparil.txt index bc2054f70..70e3c33db 100644 --- a/wadsrc/static/zscript/heretic/dsparil.txt +++ b/wadsrc/static/zscript/heretic/dsparil.txt @@ -192,7 +192,7 @@ class SorcererFX1 : Actor Projectile; -ACTIVATEIMPACT -ACTIVATEPCROSS - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; } @@ -411,7 +411,7 @@ class Sorcerer2FX1 : Actor Projectile; -ACTIVATEIMPACT -ACTIVATEPCROSS - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; } @@ -459,7 +459,7 @@ class Sorcerer2FXSpark : Actor +NOGRAVITY +NOTELEPORT +CANNOTPUSH - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; } @@ -484,7 +484,7 @@ class Sorcerer2FX2 : Actor Projectile; -ACTIVATEIMPACT -ACTIVATEPCROSS - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; } diff --git a/wadsrc/static/zscript/heretic/hereticimp.txt b/wadsrc/static/zscript/heretic/hereticimp.txt index be3e2e7df..11430712a 100644 --- a/wadsrc/static/zscript/heretic/hereticimp.txt +++ b/wadsrc/static/zscript/heretic/hereticimp.txt @@ -228,7 +228,7 @@ class HereticImpBall : Actor +SPAWNSOUNDSOURCE -ACTIVATEPCROSS -ACTIVATEIMPACT - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; } States diff --git a/wadsrc/static/zscript/heretic/hereticmisc.txt b/wadsrc/static/zscript/heretic/hereticmisc.txt index 895c04ed2..fde9ec582 100644 --- a/wadsrc/static/zscript/heretic/hereticmisc.txt +++ b/wadsrc/static/zscript/heretic/hereticmisc.txt @@ -205,7 +205,7 @@ class TeleGlitter1 : Actor { Default { - +NOBLOCKMAP +NOGRAVITY +MISSILE +ZDOOMADD + +NOBLOCKMAP +NOGRAVITY +MISSILE +ZDOOMTRANS RenderStyle "Add"; Damage 0; } diff --git a/wadsrc/static/zscript/heretic/ironlich.txt b/wadsrc/static/zscript/heretic/ironlich.txt index 52fddc6f7..c3497a7e2 100644 --- a/wadsrc/static/zscript/heretic/ironlich.txt +++ b/wadsrc/static/zscript/heretic/ironlich.txt @@ -144,7 +144,7 @@ class HeadFX1 : Actor -ACTIVATEIMPACT -ACTIVATEPCROSS +THRUGHOST - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; } @@ -196,7 +196,7 @@ class HeadFX2 : Actor Projectile; -ACTIVATEIMPACT -ACTIVATEPCROSS - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; } @@ -225,7 +225,7 @@ class HeadFX3 : Actor Damage 5; Projectile; +WINDTHRUST - +ZDOOMADD + +ZDOOMTRANS -ACTIVATEIMPACT -ACTIVATEPCROSS -NOBLOCKMAP diff --git a/wadsrc/static/zscript/heretic/mummy.txt b/wadsrc/static/zscript/heretic/mummy.txt index 453c6e83c..5ccedc9e4 100644 --- a/wadsrc/static/zscript/heretic/mummy.txt +++ b/wadsrc/static/zscript/heretic/mummy.txt @@ -135,7 +135,7 @@ class MummyFX1 : Actor -ACTIVATEPCROSS -ACTIVATEIMPACT +SEEKERMISSILE - +ZDOOMADD + +ZDOOMTRANS } States { diff --git a/wadsrc/static/zscript/heretic/snake.txt b/wadsrc/static/zscript/heretic/snake.txt index bc0d8344a..e2f5b381f 100644 --- a/wadsrc/static/zscript/heretic/snake.txt +++ b/wadsrc/static/zscript/heretic/snake.txt @@ -64,7 +64,7 @@ class SnakeProjA : Actor -ACTIVATEPCROSS +WINDTHRUST +SPAWNSOUNDSOURCE - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; SeeSound "snake/attack"; } diff --git a/wadsrc/static/zscript/heretic/weaponblaster.txt b/wadsrc/static/zscript/heretic/weaponblaster.txt index 38c30ee14..7a5d60981 100644 --- a/wadsrc/static/zscript/heretic/weaponblaster.txt +++ b/wadsrc/static/zscript/heretic/weaponblaster.txt @@ -244,7 +244,7 @@ class BlasterPuff : Actor +NOBLOCKMAP +NOGRAVITY +PUFFONACTORS - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; SeeSound "weapons/blasterhit"; } diff --git a/wadsrc/static/zscript/heretic/weaponcrossbow.txt b/wadsrc/static/zscript/heretic/weaponcrossbow.txt index 69fd108be..011e57947 100644 --- a/wadsrc/static/zscript/heretic/weaponcrossbow.txt +++ b/wadsrc/static/zscript/heretic/weaponcrossbow.txt @@ -129,7 +129,7 @@ class CrossbowFX1 : Actor SeeSound "weapons/bowshoot"; DeathSound "weapons/bowhit"; Obituary "$OB_MPCROSSBOW"; - +ZDOOMADD + +ZDOOMTRANS } States diff --git a/wadsrc/static/zscript/heretic/weaponphoenix.txt b/wadsrc/static/zscript/heretic/weaponphoenix.txt index a44bb4c13..162184f6e 100644 --- a/wadsrc/static/zscript/heretic/weaponphoenix.txt +++ b/wadsrc/static/zscript/heretic/weaponphoenix.txt @@ -292,7 +292,7 @@ class PhoenixFX2 : Actor DamageType "Fire"; Projectile; RenderStyle "Add"; - +ZDOOMADD + +ZDOOMTRANS Obituary "$OB_MPPPHOENIXROD"; } diff --git a/wadsrc/static/zscript/heretic/weaponskullrod.txt b/wadsrc/static/zscript/heretic/weaponskullrod.txt index 0e651807e..edfda93ff 100644 --- a/wadsrc/static/zscript/heretic/weaponskullrod.txt +++ b/wadsrc/static/zscript/heretic/weaponskullrod.txt @@ -143,7 +143,7 @@ class HornRodFX1 : Actor Damage 3; Projectile; +WINDTHRUST - +ZDOOMADD + +ZDOOMTRANS -NOBLOCKMAP RenderStyle "Add"; SeeSound "weapons/hornrodshoot"; @@ -178,7 +178,7 @@ class HornRodFX2 : Actor Health 140; Projectile; RenderStyle "Add"; - +ZDOOMADD + +ZDOOMTRANS SeeSound "weapons/hornrodpowshoot"; DeathSound "weapons/hornrodpowhit"; Obituary "$OB_MPPSKULLROD"; @@ -366,7 +366,7 @@ class RainPillar : Actor Projectile; -ACTIVATEPCROSS -ACTIVATEIMPACT - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; Obituary "$OB_MPPSKULLROD"; } diff --git a/wadsrc/static/zscript/heretic/weaponstaff.txt b/wadsrc/static/zscript/heretic/weaponstaff.txt index 1e1237780..ff57db620 100644 --- a/wadsrc/static/zscript/heretic/weaponstaff.txt +++ b/wadsrc/static/zscript/heretic/weaponstaff.txt @@ -132,7 +132,7 @@ class StaffPuff2 : Actor +NOBLOCKMAP +NOGRAVITY +PUFFONACTORS - +ZDOOMADD + +ZDOOMTRANS AttackSound "weapons/staffpowerhit"; } diff --git a/wadsrc/static/zscript/heretic/weaponwand.txt b/wadsrc/static/zscript/heretic/weaponwand.txt index 38cd9e2de..62d46a240 100644 --- a/wadsrc/static/zscript/heretic/weaponwand.txt +++ b/wadsrc/static/zscript/heretic/weaponwand.txt @@ -142,7 +142,7 @@ class GoldWandFX1 : Actor Damage 2; Projectile; RenderStyle "Add"; - +ZDOOMADD + +ZDOOMTRANS DeathSound "weapons/wandhit"; Obituary "$OB_MPPGOLDWAND"; } diff --git a/wadsrc/static/zscript/heretic/wizard.txt b/wadsrc/static/zscript/heretic/wizard.txt index a3772573c..a1ce5a98b 100644 --- a/wadsrc/static/zscript/heretic/wizard.txt +++ b/wadsrc/static/zscript/heretic/wizard.txt @@ -145,7 +145,7 @@ class WizardFX1 : Actor Projectile; -ACTIVATEIMPACT -ACTIVATEPCROSS - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; } diff --git a/wadsrc/static/zscript/hexen/bishop.txt b/wadsrc/static/zscript/hexen/bishop.txt index 8f4b2bd22..352839e27 100644 --- a/wadsrc/static/zscript/hexen/bishop.txt +++ b/wadsrc/static/zscript/hexen/bishop.txt @@ -290,7 +290,7 @@ class BishopFX : Actor Projectile; +SEEKERMISSILE -ACTIVATEIMPACT -ACTIVATEPCROSS - +STRIFEDAMAGE +ZDOOMADD + +STRIFEDAMAGE +ZDOOMTRANS RenderStyle "Add"; DeathSound "BishopMissileExplode"; } diff --git a/wadsrc/static/zscript/hexen/centaur.txt b/wadsrc/static/zscript/hexen/centaur.txt index 960e79557..8cd5639a2 100644 --- a/wadsrc/static/zscript/hexen/centaur.txt +++ b/wadsrc/static/zscript/hexen/centaur.txt @@ -154,7 +154,7 @@ class CentaurFX : Actor Damage 4; Projectile; +SPAWNSOUNDSOURCE - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; SeeSound "CentaurLeaderAttack"; DeathSound "CentaurMissileExplode"; diff --git a/wadsrc/static/zscript/hexen/clericflame.txt b/wadsrc/static/zscript/hexen/clericflame.txt index a61891452..660abf538 100644 --- a/wadsrc/static/zscript/hexen/clericflame.txt +++ b/wadsrc/static/zscript/hexen/clericflame.txt @@ -72,7 +72,7 @@ class CFlameFloor : Actor { Default { - +NOBLOCKMAP +NOGRAVITY +ZDOOMADD + +NOBLOCKMAP +NOGRAVITY +ZDOOMTRANS RenderStyle "Add"; } States @@ -93,7 +93,7 @@ class FlamePuff : Actor { Radius 1; Height 1; - +NOBLOCKMAP +NOGRAVITY +ZDOOMADD + +NOBLOCKMAP +NOGRAVITY +ZDOOMTRANS RenderStyle "Add"; SeeSound "ClericFlameExplode"; AttackSound "ClericFlameExplode"; @@ -159,7 +159,7 @@ class CircleFlame : Actor Projectile; -ACTIVATEIMPACT -ACTIVATEPCROSS - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; DeathSound "ClericFlameCircle"; Obituary "$OB_MPCWEAPFLAME"; @@ -217,7 +217,7 @@ class CFlameMissile : FastProjectile Damage 8; DamageType "Fire"; +INVISIBLE - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; Obituary "$OB_MPCWEAPFLAME"; } diff --git a/wadsrc/static/zscript/hexen/demons.txt b/wadsrc/static/zscript/hexen/demons.txt index 6bdbbe9f1..778bb957e 100644 --- a/wadsrc/static/zscript/hexen/demons.txt +++ b/wadsrc/static/zscript/hexen/demons.txt @@ -205,7 +205,7 @@ class Demon1FX1 : Actor DamageType "Fire"; Projectile; +SPAWNSOUNDSOURCE - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; SeeSound "DemonMissileFire"; DeathSound "DemonMissileExplode"; @@ -393,7 +393,7 @@ class Demon2FX1 : Actor DamageType "Fire"; Projectile; +SPAWNSOUNDSOURCE - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; SeeSound "DemonMissileFire"; DeathSound "DemonMissileExplode"; diff --git a/wadsrc/static/zscript/hexen/dragon.txt b/wadsrc/static/zscript/hexen/dragon.txt index 231055186..dceedd55d 100644 --- a/wadsrc/static/zscript/hexen/dragon.txt +++ b/wadsrc/static/zscript/hexen/dragon.txt @@ -311,7 +311,7 @@ class DragonFireball : Actor DamageType "Fire"; Projectile; -ACTIVATEIMPACT -ACTIVATEPCROSS - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; DeathSound "DragonFireballExplode"; } @@ -365,7 +365,7 @@ class DragonExplosion : Actor +NOBLOCKMAP +NOTELEPORT +INVISIBLE - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; DeathSound "DragonFireballExplode"; } diff --git a/wadsrc/static/zscript/hexen/fighteraxe.txt b/wadsrc/static/zscript/hexen/fighteraxe.txt index d20a5fc35..61e509744 100644 --- a/wadsrc/static/zscript/hexen/fighteraxe.txt +++ b/wadsrc/static/zscript/hexen/fighteraxe.txt @@ -307,7 +307,7 @@ class AxePuffGlow : AxePuff Default { +PUFFONACTORS - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; Alpha 1; } diff --git a/wadsrc/static/zscript/hexen/fighterquietus.txt b/wadsrc/static/zscript/hexen/fighterquietus.txt index c3e5f9b2d..b935f8e11 100644 --- a/wadsrc/static/zscript/hexen/fighterquietus.txt +++ b/wadsrc/static/zscript/hexen/fighterquietus.txt @@ -168,7 +168,7 @@ class FSwordMissile : Actor Damage 8; Projectile; +EXTREMEDEATH - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; DeathSound "FighterSwordExplode"; Obituary "$OB_MPFWEAPQUIETUS"; diff --git a/wadsrc/static/zscript/hexen/firedemon.txt b/wadsrc/static/zscript/hexen/firedemon.txt index 65dff9544..e10156402 100644 --- a/wadsrc/static/zscript/hexen/firedemon.txt +++ b/wadsrc/static/zscript/hexen/firedemon.txt @@ -436,7 +436,7 @@ class FireDemonMissile : Actor Projectile; RenderStyle "Add"; DeathSound "FireDemonMissileHit"; - +ZDOOMADD + +ZDOOMTRANS } States { diff --git a/wadsrc/static/zscript/hexen/flame.txt b/wadsrc/static/zscript/hexen/flame.txt index b4574031b..b11e5c2d5 100644 --- a/wadsrc/static/zscript/hexen/flame.txt +++ b/wadsrc/static/zscript/hexen/flame.txt @@ -5,7 +5,7 @@ class FlameSmallTemp : Actor Default { +NOTELEPORT - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; } @@ -29,7 +29,7 @@ class FlameLargeTemp : Actor Default { +NOTELEPORT - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; } @@ -64,7 +64,7 @@ class FlameSmall : SwitchableDecoration { +NOTELEPORT +INVISIBLE - +ZDOOMADD + +ZDOOMTRANS Radius 15; RenderStyle "Add"; } @@ -98,7 +98,7 @@ class FlameLarge : SwitchableDecoration { +NOTELEPORT +INVISIBLE - +ZDOOMADD + +ZDOOMTRANS Radius 15; RenderStyle "Add"; } diff --git a/wadsrc/static/zscript/hexen/heresiarch.txt b/wadsrc/static/zscript/hexen/heresiarch.txt index fd9176a61..ffb26b136 100644 --- a/wadsrc/static/zscript/hexen/heresiarch.txt +++ b/wadsrc/static/zscript/hexen/heresiarch.txt @@ -1125,7 +1125,7 @@ class SorcSpark1 : Actor +NOBLOCKMAP +DROPOFF +NOTELEPORT - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; } States diff --git a/wadsrc/static/zscript/hexen/magelightning.txt b/wadsrc/static/zscript/hexen/magelightning.txt index a70eeb8e1..a4b23706b 100644 --- a/wadsrc/static/zscript/hexen/magelightning.txt +++ b/wadsrc/static/zscript/hexen/magelightning.txt @@ -165,7 +165,7 @@ class LightningCeiling : Lightning Damage 8; Projectile; +CEILINGHUGGER - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; } @@ -320,7 +320,7 @@ class LightningFloor : LightningCeiling { -CEILINGHUGGER +FLOORHUGGER - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; } @@ -376,7 +376,7 @@ class LightningZap : Actor Projectile; -ACTIVATEIMPACT -ACTIVATEPCROSS - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; Obituary "$OB_MPMWEAPLIGHTNING"; } diff --git a/wadsrc/static/zscript/hexen/scriptprojectiles.txt b/wadsrc/static/zscript/hexen/scriptprojectiles.txt index eebb89b54..819e38e26 100644 --- a/wadsrc/static/zscript/hexen/scriptprojectiles.txt +++ b/wadsrc/static/zscript/hexen/scriptprojectiles.txt @@ -11,7 +11,7 @@ class FireBall : Actor DamageType "Fire"; +NOBLOCKMAP +NOGRAVITY +DROPOFF +MISSILE +NOTELEPORT - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; DeathSound "Fireball"; } diff --git a/wadsrc/static/zscript/hexen/serpent.txt b/wadsrc/static/zscript/hexen/serpent.txt index 11bb01fb9..fa1b53d6c 100644 --- a/wadsrc/static/zscript/hexen/serpent.txt +++ b/wadsrc/static/zscript/hexen/serpent.txt @@ -317,7 +317,7 @@ class SerpentFX : Actor Damage 4; Projectile; -ACTIVATEIMPACT -ACTIVATEPCROSS - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; DeathSound "SerpentFXHit"; } diff --git a/wadsrc/static/zscript/raven/minotaur.txt b/wadsrc/static/zscript/raven/minotaur.txt index 14d18a19a..b44684cb6 100644 --- a/wadsrc/static/zscript/raven/minotaur.txt +++ b/wadsrc/static/zscript/raven/minotaur.txt @@ -655,7 +655,7 @@ class MinotaurFX1 : Actor Projectile; -ACTIVATEIMPACT -ACTIVATEPCROSS - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; } States diff --git a/wadsrc/static/zscript/strife/sentinel.txt b/wadsrc/static/zscript/strife/sentinel.txt index 268cd47da..190111be7 100644 --- a/wadsrc/static/zscript/strife/sentinel.txt +++ b/wadsrc/static/zscript/strife/sentinel.txt @@ -97,7 +97,7 @@ class SentinelFX1 : Actor DamageType "Disintegrate"; Projectile; +STRIFEDAMAGE - +ZDOOMADD + +ZDOOMTRANS MaxStepHeight 4; RenderStyle "Add"; } diff --git a/wadsrc/static/zscript/strife/spectral.txt b/wadsrc/static/zscript/strife/spectral.txt index 8fa4cc44a..bc7f11f3b 100644 --- a/wadsrc/static/zscript/strife/spectral.txt +++ b/wadsrc/static/zscript/strife/spectral.txt @@ -112,7 +112,7 @@ class SpectralLightningBase : Actor +ACTIVATEIMPACT +ACTIVATEPCROSS +STRIFEDAMAGE - +ZDOOMADD + +ZDOOMTRANS MaxStepHeight 4; RenderStyle "Add"; SeeSound "weapons/sigil"; @@ -258,7 +258,7 @@ class SpectralLightningHTail : Actor +NOBLOCKMAP +NOGRAVITY +DROPOFF - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; } States diff --git a/wadsrc/static/zscript/strife/strifestuff.txt b/wadsrc/static/zscript/strife/strifestuff.txt index 04f364c75..a26e5b697 100644 --- a/wadsrc/static/zscript/strife/strifestuff.txt +++ b/wadsrc/static/zscript/strife/strifestuff.txt @@ -632,7 +632,7 @@ class TeleportSwirl : Actor Default { +NOBLOCKMAP - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; Alpha 0.25; } diff --git a/wadsrc/static/zscript/strife/strifeweapons.txt b/wadsrc/static/zscript/strife/strifeweapons.txt index e0d5f8f13..15f5dea4a 100644 --- a/wadsrc/static/zscript/strife/strifeweapons.txt +++ b/wadsrc/static/zscript/strife/strifeweapons.txt @@ -40,7 +40,7 @@ class StrifeSpark : StrifePuff { Default { - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; } States diff --git a/wadsrc/static/zscript/strife/thingstoblowup.txt b/wadsrc/static/zscript/strife/thingstoblowup.txt index abc032093..f18e783f7 100644 --- a/wadsrc/static/zscript/strife/thingstoblowup.txt +++ b/wadsrc/static/zscript/strife/thingstoblowup.txt @@ -49,7 +49,7 @@ class Bang4Cloud : Actor { +NOBLOCKMAP +NOGRAVITY - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; VSpeed 1; } diff --git a/wadsrc/static/zscript/strife/weaponflamer.txt b/wadsrc/static/zscript/strife/weaponflamer.txt index 521cbc0c5..1c7a0873a 100644 --- a/wadsrc/static/zscript/strife/weaponflamer.txt +++ b/wadsrc/static/zscript/strife/weaponflamer.txt @@ -85,7 +85,7 @@ class FlameMissile : Actor Projectile; -NOGRAVITY +STRIFEDAMAGE - +ZDOOMADD + +ZDOOMTRANS MaxStepHeight 4; RenderStyle "Add"; SeeSound "weapons/flamethrower"; diff --git a/wadsrc/static/zscript/strife/weapongrenade.txt b/wadsrc/static/zscript/strife/weapongrenade.txt index eebf028db..8d6a12b2d 100644 --- a/wadsrc/static/zscript/strife/weapongrenade.txt +++ b/wadsrc/static/zscript/strife/weapongrenade.txt @@ -217,7 +217,7 @@ class PhosphorousFire : Actor +NOTELEPORT +NODAMAGETHRUST +DONTSPLASH - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; Obituary "$OB_MPPHOSPHOROUSGRENADE"; } diff --git a/wadsrc/static/zscript/strife/weaponmauler.txt b/wadsrc/static/zscript/strife/weaponmauler.txt index 4ee9e1baf..cc4e7c30c 100644 --- a/wadsrc/static/zscript/strife/weaponmauler.txt +++ b/wadsrc/static/zscript/strife/weaponmauler.txt @@ -181,7 +181,7 @@ class MaulerPuff : Actor +NOBLOCKMAP +NOGRAVITY +PUFFONACTORS - +ZDOOMADD + +ZDOOMTRANS RenderStyle "Add"; DamageType "Disintegrate"; } @@ -207,7 +207,7 @@ class MaulerTorpedo : Actor DamageType "Disintegrate"; Projectile; +STRIFEDAMAGE - +ZDOOMADD + +ZDOOMTRANS MaxStepHeight 4; RenderStyle "Add"; SeeSound "weapons/mauler2fire"; @@ -270,7 +270,7 @@ class MaulerTorpedoWave : Actor DamageType "Disintegrate"; Projectile; +STRIFEDAMAGE - +ZDOOMADD + +ZDOOMTRANS MaxStepHeight 4; RenderStyle "Add"; Obituary "$OB_MPMAULER"; From 10a9d087f1cc36794f97688962f0b68111dfc6e1 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Thu, 1 Jun 2017 14:17:49 -0400 Subject: [PATCH 06/13] - fixed: missed the golden wand puff for the +ZDOOMTRANS flag --- wadsrc/static/zscript/heretic/weaponwand.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/wadsrc/static/zscript/heretic/weaponwand.txt b/wadsrc/static/zscript/heretic/weaponwand.txt index 62d46a240..aa08f5c66 100644 --- a/wadsrc/static/zscript/heretic/weaponwand.txt +++ b/wadsrc/static/zscript/heretic/weaponwand.txt @@ -186,6 +186,7 @@ class GoldWandPuff1 : Actor +NOBLOCKMAP +NOGRAVITY +PUFFONACTORS + +ZDOOMTRANS RenderStyle "Add"; } From e1bb44a9ed16c2ea335db52c07ee07cb86c324f1 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Fri, 2 Jun 2017 12:36:29 -0400 Subject: [PATCH 07/13] - added menu option for r_vanillatrans --- wadsrc/static/language.enu | 2 ++ wadsrc/static/menudef.txt | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/wadsrc/static/language.enu b/wadsrc/static/language.enu index f12fab551..09bc6580f 100644 --- a/wadsrc/static/language.enu +++ b/wadsrc/static/language.enu @@ -1815,6 +1815,7 @@ DSPLYMNU_SKYMODE = "Sky render mode"; DSPLYMNU_LINEARSKY = "Linear skies"; DSPLYMNU_GZDFULLBRIGHT = "Fullbright overrides sector color"; DSPLYMNU_DRAWFUZZ = "Use fuzz effect"; +DSPLYMNU_OLDTRANS = "Classic Transparency"; DSPLYMNU_TRANSSOUL = "Lost Soul translucency"; DSPLYMNU_FAKECONTRAST = "Use fake contrast"; DSPLYMNU_ROCKETTRAILS = "Rocket Trails"; @@ -2367,6 +2368,7 @@ OPTVAL_HWPOLY = "OpenGL-Accelerated"; OPTVAL_SWDOOM = "Doom Software Renderer"; OPTVAL_DEDICATED = "High-Performance"; OPTVAL_INTEGRATED = "Power-Saving"; +OPTVAL_VANILLA = "Vanilla"; // Colors C_BRICK = "\cabrick"; diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index e27c98a29..b1a602665 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -690,6 +690,12 @@ OptionValue Fuzziness 2.0, "$OPTVAL_SHADOW" } +OptionValue VanillaTrans +{ + 0.0, "$OPTVAL_ZDOOM" + 1.0, "$OPTVAL_VANILLA" +} + OptionValue GPUSwitch { 0.0, "$OPTVAL_DEFAULT" @@ -750,6 +756,7 @@ OptionMenu "VideoOptions" } Option "$DSPLYMNU_DRAWFUZZ", "r_drawfuzz", "Fuzziness" + Option "$DSPLYMNU_OLDTRANS", "r_vanillatrans", "VanillaTrans" Slider "$DSPLYMNU_TRANSSOUL", "transsouls", 0.25, 1.0, 0.05, 2 Option "$DSPLYMNU_FAKECONTRAST", "r_fakecontrast", "Contrast" Option "$DSPLYMNU_ROCKETTRAILS", "cl_rockettrails", "RocketTrailTypes" From 11741846c6e9f333f44bb388019762f6a622c3bc Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Fri, 2 Jun 2017 12:41:03 -0400 Subject: [PATCH 08/13] - fixed: missed the teleport fog --- wadsrc/static/zscript/shared/teleport.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/wadsrc/static/zscript/shared/teleport.txt b/wadsrc/static/zscript/shared/teleport.txt index dd43bb1fa..f558b46a6 100644 --- a/wadsrc/static/zscript/shared/teleport.txt +++ b/wadsrc/static/zscript/shared/teleport.txt @@ -6,6 +6,7 @@ class TeleportFog : Actor +NOBLOCKMAP +NOTELEPORT +NOGRAVITY + +ZDOOMTRANS RenderStyle "Add"; } States From 68b6f922f7a825c742510e8366b86c83e1a94684 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Sat, 3 Jun 2017 20:00:53 -0400 Subject: [PATCH 09/13] - Added auto-detection scheme for r_vanillatrans It now works the following way: (0) - Force off (ZDoom defaults) (1) - Force on (Doom defaults) (2) - Auto off (Prefer ZDoom defaults - if DEHACKED is detected with no ZSCRIPT it will turn on) (default) (3) - Auto on (Prefer Doom defaults - if DECORATE is detected with no ZSCRIPT it will turn off) --- src/CMakeLists.txt | 1 + src/d_main.cpp | 4 ++ src/gl/scene/gl_sprite.cpp | 4 +- src/polyrenderer/scene/poly_sprite.cpp | 4 +- src/r_data/r_vanillatrans.cpp | 67 ++++++++++++++++++++++++++ src/r_data/r_vanillatrans.h | 3 ++ src/r_data/renderstyle.cpp | 1 - src/swrenderer/things/r_sprite.cpp | 4 +- wadsrc/static/language.enu | 4 ++ wadsrc/static/menudef.txt | 6 ++- 10 files changed, 89 insertions(+), 9 deletions(-) create mode 100644 src/r_data/r_vanillatrans.cpp create mode 100644 src/r_data/r_vanillatrans.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8a9b2aa87..10fe6e84d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1071,6 +1071,7 @@ set (PCH_SOURCES r_data/voxels.cpp r_data/renderstyle.cpp r_data/r_interpolate.cpp + r_data/r_vanillatrans.cpp scripting/symbols.cpp scripting/types.cpp scripting/thingdef.cpp diff --git a/src/d_main.cpp b/src/d_main.cpp index 650d99ae8..b4b6947a6 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -116,6 +116,7 @@ #include "r_utility.h" #include "vm.h" #include "types.h" +#include "r_data/r_vanillatrans.h" EXTERN_CVAR(Bool, hud_althud) void DrawHUD(); @@ -2606,6 +2607,9 @@ void D_DoomMain (void) D_CheckNetGame (); } + // [SP] Force vanilla transparency auto-detection to re-detect our game lumps now + UpdateVanillaTransparency(); + // [RH] Lock any cvars that should be locked now that we're // about to begin the game. FBaseCVar::EnableNoSet (); diff --git a/src/gl/scene/gl_sprite.cpp b/src/gl/scene/gl_sprite.cpp index 8d053e81c..d50c5722e 100644 --- a/src/gl/scene/gl_sprite.cpp +++ b/src/gl/scene/gl_sprite.cpp @@ -39,6 +39,7 @@ #include "g_levellocals.h" #include "events.h" #include "actorinlines.h" +#include "r_data/r_vanillatrans.h" #include "gl/system/gl_interface.h" #include "gl/system/gl_framebuffer.h" @@ -75,7 +76,6 @@ CUSTOM_CVAR(Int, gl_fuzztype, 0, CVAR_ARCHIVE) } EXTERN_CVAR (Float, transsouls) -EXTERN_CVAR (Bool, r_vanillatrans) extern TArray sprites; extern TArray SpriteFrames; @@ -993,7 +993,7 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal) { trans = 1.f; } - if (r_vanillatrans) + if (UseVanillaTransparency()) { // [SP] "canonical transparency" - with the flip of a CVar, disable transparency for Doom objects, // and disable 'additive' translucency for certain objects from other games. diff --git a/src/polyrenderer/scene/poly_sprite.cpp b/src/polyrenderer/scene/poly_sprite.cpp index ba91f005b..10d6772af 100644 --- a/src/polyrenderer/scene/poly_sprite.cpp +++ b/src/polyrenderer/scene/poly_sprite.cpp @@ -28,10 +28,10 @@ #include "poly_sprite.h" #include "polyrenderer/poly_renderer.h" #include "polyrenderer/scene/poly_light.h" +#include "r_data/r_vanillatrans.h" EXTERN_CVAR(Float, transsouls) EXTERN_CVAR(Int, r_drawfuzz) -EXTERN_CVAR (Bool, r_vanillatrans) bool RenderPolySprite::GetLine(AActor *thing, DVector2 &left, DVector2 &right) { @@ -146,7 +146,7 @@ void RenderPolySprite::Render(const TriMatrix &worldToClip, const PolyClipPlane args.SetStencilTestValue(stencilValue); args.SetWriteStencil(true, stencilValue); args.SetClipPlane(clipPlane); - if ((thing->renderflags & RF_ZDOOMTRANS) && r_vanillatrans) + if ((thing->renderflags & RF_ZDOOMTRANS) && UseVanillaTransparency()) args.SetStyle(LegacyRenderStyles[STYLE_Normal], 1.0f, thing->fillcolor, thing->Translation, tex, fullbrightSprite); else args.SetStyle(thing->RenderStyle, thing->Alpha, thing->fillcolor, thing->Translation, tex, fullbrightSprite); diff --git a/src/r_data/r_vanillatrans.cpp b/src/r_data/r_vanillatrans.cpp new file mode 100644 index 000000000..3c40e9dea --- /dev/null +++ b/src/r_data/r_vanillatrans.cpp @@ -0,0 +1,67 @@ + +#include "templates.h" +#include "c_cvars.h" +#include "w_wad.h" +#ifdef _DEBUG +#include "c_dispatch.h" +#endif + +CVAR (Int, r_vanillatrans, 2, CVAR_ARCHIVE) + +namespace +{ + bool firstTime = true; + bool foundDehacked = false; + bool foundDecorate = false; + bool foundZScript = false; +} +#ifdef _DEBUG +CCMD (debug_checklumps) +{ + Printf("firstTime: %d\n", firstTime); + Printf("foundDehacked: %d\n", foundDehacked); + Printf("foundDecorate: %d\n", foundDecorate); + Printf("foundZScript: %d\n", foundZScript); +} +#endif + +void UpdateVanillaTransparency() +{ + firstTime = true; +} + +bool UseVanillaTransparency() +{ + if (firstTime) + { + int lastlump = 0; + Wads.FindLump("ZSCRIPT", &lastlump); // ignore first ZScript + if (Wads.FindLump("ZSCRIPT", &lastlump) == -1) // no loaded ZScript + { + lastlump = 0; + foundDehacked = Wads.FindLump("DEHACKED", &lastlump) != -1; + lastlump = 0; + foundDecorate = Wads.FindLump("DECORATE", &lastlump) != -1; + foundZScript = false; + } + else + { + foundZScript = true; + foundDehacked = false; + foundDecorate = false; + } + firstTime = false; + } + + switch (r_vanillatrans) + { + case 0: return false; + case 1: return true; + default: + if (foundDehacked) + return true; + if (foundDecorate) + return false; + return r_vanillatrans == 3; + } +} diff --git a/src/r_data/r_vanillatrans.h b/src/r_data/r_vanillatrans.h new file mode 100644 index 000000000..61d988074 --- /dev/null +++ b/src/r_data/r_vanillatrans.h @@ -0,0 +1,3 @@ + +void UpdateVanillaTransparency(); +bool UseVanillaTransparency(); \ No newline at end of file diff --git a/src/r_data/renderstyle.cpp b/src/r_data/renderstyle.cpp index fc1905f91..987de82b9 100644 --- a/src/r_data/renderstyle.cpp +++ b/src/r_data/renderstyle.cpp @@ -38,7 +38,6 @@ #include "serializer.h" CVAR (Bool, r_drawtrans, true, 0) -CVAR (Bool, r_vanillatrans, false, CVAR_ARCHIVE) CVAR (Int, r_drawfuzz, 1, CVAR_ARCHIVE) // Convert legacy render styles to flexible render styles. diff --git a/src/swrenderer/things/r_sprite.cpp b/src/swrenderer/things/r_sprite.cpp index d067b9007..f28cff787 100644 --- a/src/swrenderer/things/r_sprite.cpp +++ b/src/swrenderer/things/r_sprite.cpp @@ -65,10 +65,10 @@ #include "swrenderer/r_memory.h" #include "swrenderer/r_renderthread.h" #include "a_dynlight.h" +#include "r_data/r_vanillatrans.h" EXTERN_CVAR(Bool, r_fullbrightignoresectorcolor) EXTERN_CVAR(Bool, gl_light_sprites) -EXTERN_CVAR (Bool, r_vanillatrans) namespace swrenderer { @@ -213,7 +213,7 @@ namespace swrenderer if (thing->flags5 & MF5_BRIGHT) vis->renderflags |= RF_FULLBRIGHT; // kg3D vis->RenderStyle = thing->RenderStyle; - if (r_vanillatrans) + if (UseVanillaTransparency()) { if (thing->renderflags & RF_ZDOOMTRANS) vis->RenderStyle = LegacyRenderStyles[STYLE_Normal]; diff --git a/wadsrc/static/language.enu b/wadsrc/static/language.enu index 09bc6580f..fd9ef8969 100644 --- a/wadsrc/static/language.enu +++ b/wadsrc/static/language.enu @@ -2369,6 +2369,10 @@ OPTVAL_SWDOOM = "Doom Software Renderer"; OPTVAL_DEDICATED = "High-Performance"; OPTVAL_INTEGRATED = "Power-Saving"; OPTVAL_VANILLA = "Vanilla"; +OPTVAL_VTFZDOOM = "ZDoom (Forced)"; +OPTVAL_VTFVANILLA = "Vanilla (Forced)"; +OPTVAL_VTAZDOOM = "Auto (Vanilla Preferred)"; +OPTVAL_VTAVANILLA = "Auto (ZDoom Preferred)"; // Colors C_BRICK = "\cabrick"; diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index b1a602665..68763a552 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -692,8 +692,10 @@ OptionValue Fuzziness OptionValue VanillaTrans { - 0.0, "$OPTVAL_ZDOOM" - 1.0, "$OPTVAL_VANILLA" + 0.0, "$OPTVAL_VTFZDOOM" + 1.0, "$OPTVAL_VTFVANILLA" + 0.0, "$OPTVAL_VTAZDOOM" + 1.0, "$OPTVAL_VTAVANILLA" } OptionValue GPUSwitch From 4686ba78a0b9142fd4ebdac2bb54bc92dfea17b1 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Sat, 3 Jun 2017 20:17:44 -0400 Subject: [PATCH 10/13] - Add licenses to r_vanillatrans files --- src/r_data/r_vanillatrans.cpp | 26 ++++++++++++++++++++++++++ src/r_data/r_vanillatrans.h | 22 ++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/src/r_data/r_vanillatrans.cpp b/src/r_data/r_vanillatrans.cpp index 3c40e9dea..01d996d49 100644 --- a/src/r_data/r_vanillatrans.cpp +++ b/src/r_data/r_vanillatrans.cpp @@ -1,3 +1,29 @@ +// +//--------------------------------------------------------------------------- +// +// Copyright(C) 2017 Rachael Alexanderson +// All rights reserved. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see http://www.gnu.org/licenses/ +// +//-------------------------------------------------------------------------- +// +/* +** r_vanillatrans.cpp +** Figures out whether to turn off transparency for certain native game objects +** +**/ #include "templates.h" #include "c_cvars.h" diff --git a/src/r_data/r_vanillatrans.h b/src/r_data/r_vanillatrans.h index 61d988074..5bf1892c7 100644 --- a/src/r_data/r_vanillatrans.h +++ b/src/r_data/r_vanillatrans.h @@ -1,3 +1,25 @@ +// +//--------------------------------------------------------------------------- +// +// Copyright(C) 2017 Rachael Alexanderson +// All rights reserved. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see http://www.gnu.org/licenses/ +// +//-------------------------------------------------------------------------- +// + void UpdateVanillaTransparency(); bool UseVanillaTransparency(); \ No newline at end of file From 5eaf085d5826a0e6174cab1ee360c56d2cc695b1 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Sun, 4 Jun 2017 04:56:16 -0400 Subject: [PATCH 11/13] - fixed minor menudef mistake --- wadsrc/static/menudef.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 68763a552..287430e5f 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -694,8 +694,8 @@ OptionValue VanillaTrans { 0.0, "$OPTVAL_VTFZDOOM" 1.0, "$OPTVAL_VTFVANILLA" - 0.0, "$OPTVAL_VTAZDOOM" - 1.0, "$OPTVAL_VTAVANILLA" + 2.0, "$OPTVAL_VTAZDOOM" + 3.0, "$OPTVAL_VTAVANILLA" } OptionValue GPUSwitch From c18134dbd3d032073ae973e1b2d4a4a89ec50971 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Sun, 4 Jun 2017 06:05:40 -0400 Subject: [PATCH 12/13] - r_vanillatrans: Cache the cache! Transform the function into a global variable and recheck at the start of D_Display --- src/d_main.cpp | 2 ++ src/gl/scene/gl_sprite.cpp | 2 +- src/polyrenderer/scene/poly_sprite.cpp | 2 +- src/r_data/r_vanillatrans.cpp | 1 + src/r_data/r_vanillatrans.h | 3 ++- src/swrenderer/things/r_sprite.cpp | 2 +- 6 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/d_main.cpp b/src/d_main.cpp index b4b6947a6..fbc47da4c 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -670,6 +670,8 @@ void D_Display () cycles.Reset(); cycles.Clock(); + r_UseVanillaTransparency = UseVanillaTransparency(); // [SP] Cache UseVanillaTransparency() call + if (players[consoleplayer].camera == NULL) { players[consoleplayer].camera = players[consoleplayer].mo; diff --git a/src/gl/scene/gl_sprite.cpp b/src/gl/scene/gl_sprite.cpp index d50c5722e..c49845688 100644 --- a/src/gl/scene/gl_sprite.cpp +++ b/src/gl/scene/gl_sprite.cpp @@ -993,7 +993,7 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal) { trans = 1.f; } - if (UseVanillaTransparency()) + if (r_UseVanillaTransparency) { // [SP] "canonical transparency" - with the flip of a CVar, disable transparency for Doom objects, // and disable 'additive' translucency for certain objects from other games. diff --git a/src/polyrenderer/scene/poly_sprite.cpp b/src/polyrenderer/scene/poly_sprite.cpp index 10d6772af..5b4927431 100644 --- a/src/polyrenderer/scene/poly_sprite.cpp +++ b/src/polyrenderer/scene/poly_sprite.cpp @@ -146,7 +146,7 @@ void RenderPolySprite::Render(const TriMatrix &worldToClip, const PolyClipPlane args.SetStencilTestValue(stencilValue); args.SetWriteStencil(true, stencilValue); args.SetClipPlane(clipPlane); - if ((thing->renderflags & RF_ZDOOMTRANS) && UseVanillaTransparency()) + if ((thing->renderflags & RF_ZDOOMTRANS) && r_UseVanillaTransparency) args.SetStyle(LegacyRenderStyles[STYLE_Normal], 1.0f, thing->fillcolor, thing->Translation, tex, fullbrightSprite); else args.SetStyle(thing->RenderStyle, thing->Alpha, thing->fillcolor, thing->Translation, tex, fullbrightSprite); diff --git a/src/r_data/r_vanillatrans.cpp b/src/r_data/r_vanillatrans.cpp index 01d996d49..73f785e4b 100644 --- a/src/r_data/r_vanillatrans.cpp +++ b/src/r_data/r_vanillatrans.cpp @@ -32,6 +32,7 @@ #include "c_dispatch.h" #endif +bool r_UseVanillaTransparency; CVAR (Int, r_vanillatrans, 2, CVAR_ARCHIVE) namespace diff --git a/src/r_data/r_vanillatrans.h b/src/r_data/r_vanillatrans.h index 5bf1892c7..8fc88b5d7 100644 --- a/src/r_data/r_vanillatrans.h +++ b/src/r_data/r_vanillatrans.h @@ -22,4 +22,5 @@ void UpdateVanillaTransparency(); -bool UseVanillaTransparency(); \ No newline at end of file +bool UseVanillaTransparency(); +extern bool r_UseVanillaTransparency; diff --git a/src/swrenderer/things/r_sprite.cpp b/src/swrenderer/things/r_sprite.cpp index f28cff787..25cfd58f3 100644 --- a/src/swrenderer/things/r_sprite.cpp +++ b/src/swrenderer/things/r_sprite.cpp @@ -213,7 +213,7 @@ namespace swrenderer if (thing->flags5 & MF5_BRIGHT) vis->renderflags |= RF_FULLBRIGHT; // kg3D vis->RenderStyle = thing->RenderStyle; - if (UseVanillaTransparency()) + if (r_UseVanillaTransparency) { if (thing->renderflags & RF_ZDOOMTRANS) vis->RenderStyle = LegacyRenderStyles[STYLE_Normal]; From 1cb3514b051ed2ff04d72d3ac60822f8a0e742d0 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 4 Jun 2017 12:39:39 +0200 Subject: [PATCH 13/13] - use 0 as the default for r_vanillatrans. As nice as the automatic is, this will trigger far too many cases where it will disable translucency for mods that only change some texts. Dehacked is very often only used for non-actor related modifications. If the automatic is supposed to be the default it needs to do a lot more thorough checks to avoid bug reports due to misunderstanding the feature. --- src/r_data/r_vanillatrans.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r_data/r_vanillatrans.cpp b/src/r_data/r_vanillatrans.cpp index 73f785e4b..6bf897951 100644 --- a/src/r_data/r_vanillatrans.cpp +++ b/src/r_data/r_vanillatrans.cpp @@ -33,7 +33,7 @@ #endif bool r_UseVanillaTransparency; -CVAR (Int, r_vanillatrans, 2, CVAR_ARCHIVE) +CVAR (Int, r_vanillatrans, 0, CVAR_ARCHIVE) namespace {