# Conflicts:
#	src/gl/scene/gl_sprite.cpp
#	src/polyrenderer/scene/poly_sprite.cpp
#	src/r_data/r_vanillatrans.cpp
#	src/r_data/r_vanillatrans.h
#	src/swrenderer/things/r_sprite.cpp
This commit is contained in:
Rachael Alexanderson 2017-06-04 07:24:35 -04:00
commit c340a6f794
6 changed files with 9 additions and 8 deletions

View file

@ -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;

View file

@ -76,7 +76,6 @@ CUSTOM_CVAR(Int, gl_fuzztype, 0, CVAR_ARCHIVE)
}
EXTERN_CVAR (Float, transsouls)
EXTERN_CVAR (Bool, r_vanillatrans)
extern TArray<spritedef_t> sprites;
extern TArray<spriteframe_t> SpriteFrames;
@ -994,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.

View file

@ -32,7 +32,6 @@
EXTERN_CVAR(Float, transsouls)
EXTERN_CVAR(Int, r_drawfuzz)
EXTERN_CVAR (Bool, r_vanillatrans)
bool RenderPolySprite::GetLine(AActor *thing, DVector2 &left, DVector2 &right)
{
@ -147,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);

View file

@ -32,7 +32,8 @@
#include "c_dispatch.h"
#endif
CVAR (Int, r_vanillatrans, 2, CVAR_ARCHIVE)
bool r_UseVanillaTransparency;
CVAR (Int, r_vanillatrans, 0, CVAR_ARCHIVE)
namespace
{

View file

@ -22,4 +22,5 @@
void UpdateVanillaTransparency();
bool UseVanillaTransparency();
bool UseVanillaTransparency();
extern bool r_UseVanillaTransparency;

View file

@ -69,7 +69,6 @@
EXTERN_CVAR(Bool, r_fullbrightignoresectorcolor)
EXTERN_CVAR(Bool, gl_light_sprites)
EXTERN_CVAR (Bool, r_vanillatrans)
namespace swrenderer
{
@ -214,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];