mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-12-01 16:11:37 +00:00
# Conflicts: # src/r_bsp.cpp # src/r_main.cpp # src/r_segs.cpp # src/r_things.cpp # wadsrc/static/language.enu # wadsrc/static/menudef.txt
This commit is contained in:
commit
d27a152d9b
8 changed files with 35 additions and 4 deletions
|
@ -101,6 +101,7 @@ EXTERN_CVAR (Float, sv_gravity)
|
||||||
EXTERN_CVAR (Float, sv_aircontrol)
|
EXTERN_CVAR (Float, sv_aircontrol)
|
||||||
EXTERN_CVAR (Int, disableautosave)
|
EXTERN_CVAR (Int, disableautosave)
|
||||||
EXTERN_CVAR (String, playerclass)
|
EXTERN_CVAR (String, playerclass)
|
||||||
|
EXTERN_CVAR(Int, r_preservesectorcolor)
|
||||||
|
|
||||||
#define SNAP_ID MAKE_ID('s','n','A','p')
|
#define SNAP_ID MAKE_ID('s','n','A','p')
|
||||||
#define DSNP_ID MAKE_ID('d','s','N','p')
|
#define DSNP_ID MAKE_ID('d','s','N','p')
|
||||||
|
@ -1488,6 +1489,20 @@ bool FLevelLocals::IsFreelookAllowed() const
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
|
bool FLevelLocals::PreserveSectorColor() const
|
||||||
|
{
|
||||||
|
if (r_preservesectorcolor == 0)
|
||||||
|
return false;
|
||||||
|
if (r_preservesectorcolor == 1)
|
||||||
|
return true;
|
||||||
|
return !!(level.flags3 & LEVEL3_PRESERVESECTORCOLOR);
|
||||||
|
}
|
||||||
|
|
||||||
|
//==========================================================================
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//==========================================================================
|
||||||
|
|
||||||
FString CalcMapName (int episode, int level)
|
FString CalcMapName (int episode, int level)
|
||||||
{
|
{
|
||||||
FString lumpname;
|
FString lumpname;
|
||||||
|
|
|
@ -223,6 +223,7 @@ enum ELevelFlags : unsigned int
|
||||||
|
|
||||||
// More flags!
|
// More flags!
|
||||||
LEVEL3_FORCEFAKECONTRAST = 0x00000001, // forces fake contrast even with fog enabled
|
LEVEL3_FORCEFAKECONTRAST = 0x00000001, // forces fake contrast even with fog enabled
|
||||||
|
LEVEL3_PRESERVESECTORCOLOR = 0x00000002,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -79,6 +79,7 @@ struct FLevelLocals
|
||||||
bool IsJumpingAllowed() const;
|
bool IsJumpingAllowed() const;
|
||||||
bool IsCrouchingAllowed() const;
|
bool IsCrouchingAllowed() const;
|
||||||
bool IsFreelookAllowed() const;
|
bool IsFreelookAllowed() const;
|
||||||
|
bool PreserveSectorColor() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern FLevelLocals level;
|
extern FLevelLocals level;
|
||||||
|
|
|
@ -1282,6 +1282,8 @@ MapFlagHandlers[] =
|
||||||
{ "unfreezesingleplayerconversations",MITYPE_SETFLAG2, LEVEL2_CONV_SINGLE_UNFREEZE, 0 },
|
{ "unfreezesingleplayerconversations",MITYPE_SETFLAG2, LEVEL2_CONV_SINGLE_UNFREEZE, 0 },
|
||||||
{ "spawnwithweaponraised", MITYPE_SETFLAG2, LEVEL2_PRERAISEWEAPON, 0 },
|
{ "spawnwithweaponraised", MITYPE_SETFLAG2, LEVEL2_PRERAISEWEAPON, 0 },
|
||||||
{ "forcefakecontrast", MITYPE_SETFLAG3, LEVEL3_FORCEFAKECONTRAST, 0 },
|
{ "forcefakecontrast", MITYPE_SETFLAG3, LEVEL3_FORCEFAKECONTRAST, 0 },
|
||||||
|
{ "preservesectorcolor", MITYPE_SETFLAG3, LEVEL3_PRESERVESECTORCOLOR, 0 },
|
||||||
|
{ "nopreservesectorcolor", MITYPE_CLRFLAG3, LEVEL3_PRESERVESECTORCOLOR, 0 },
|
||||||
{ "nobotnodes", MITYPE_IGNORE, 0, 0 }, // Skulltag option: nobotnodes
|
{ "nobotnodes", MITYPE_IGNORE, 0, 0 }, // Skulltag option: nobotnodes
|
||||||
{ "compat_shorttex", MITYPE_COMPATFLAG, COMPATF_SHORTTEX, 0 },
|
{ "compat_shorttex", MITYPE_COMPATFLAG, COMPATF_SHORTTEX, 0 },
|
||||||
{ "compat_stairs", MITYPE_COMPATFLAG, COMPATF_STAIRINDEX, 0 },
|
{ "compat_stairs", MITYPE_COMPATFLAG, COMPATF_STAIRINDEX, 0 },
|
||||||
|
|
|
@ -141,9 +141,10 @@ bool FRenderState::ApplyShader()
|
||||||
fogset = -gl_fogmode;
|
fogset = -gl_fogmode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
glVertexAttrib4fv(VATTR_NORMAL, mNormal.vec);
|
||||||
|
|
||||||
glVertexAttrib4fv(VATTR_COLOR, mColor.vec);
|
glVertexAttrib4fv(VATTR_COLOR, mColor.vec);
|
||||||
glVertexAttrib4fv(VATTR_NORMAL, mNormal.vec);
|
activeShader->muObjectColor.Set(mObjectColor);
|
||||||
|
|
||||||
activeShader->muDesaturation.Set(mDesaturation / 255.f);
|
activeShader->muDesaturation.Set(mDesaturation / 255.f);
|
||||||
activeShader->muFogEnabled.Set(fogset);
|
activeShader->muFogEnabled.Set(fogset);
|
||||||
|
@ -152,7 +153,6 @@ bool FRenderState::ApplyShader()
|
||||||
activeShader->muCameraPos.Set(mCameraPos.vec);
|
activeShader->muCameraPos.Set(mCameraPos.vec);
|
||||||
activeShader->muLightParms.Set(mLightParms);
|
activeShader->muLightParms.Set(mLightParms);
|
||||||
activeShader->muFogColor.Set(mFogColor);
|
activeShader->muFogColor.Set(mFogColor);
|
||||||
activeShader->muObjectColor.Set(mObjectColor);
|
|
||||||
activeShader->muDynLightColor.Set(mDynColor.vec);
|
activeShader->muDynLightColor.Set(mDynColor.vec);
|
||||||
activeShader->muInterpolationFactor.Set(mInterpolationFactor);
|
activeShader->muInterpolationFactor.Set(mInterpolationFactor);
|
||||||
activeShader->muClipHeight.Set(mClipHeight);
|
activeShader->muClipHeight.Set(mClipHeight);
|
||||||
|
|
|
@ -91,6 +91,11 @@ static TArray<DVector3a> InterpolationPath;
|
||||||
|
|
||||||
// PUBLIC DATA DEFINITIONS -------------------------------------------------
|
// PUBLIC DATA DEFINITIONS -------------------------------------------------
|
||||||
|
|
||||||
|
CUSTOM_CVAR(Int, r_preservesectorcolor, -1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
{
|
||||||
|
if (self < -1 || self > 1) self = -1;
|
||||||
|
}
|
||||||
|
|
||||||
CVAR (Bool, r_deathcamera, false, CVAR_ARCHIVE)
|
CVAR (Bool, r_deathcamera, false, CVAR_ARCHIVE)
|
||||||
CVAR (Int, r_clearbuffer, 0, 0)
|
CVAR (Int, r_clearbuffer, 0, 0)
|
||||||
CVAR (Bool, r_drawvoxels, true, 0)
|
CVAR (Bool, r_drawvoxels, true, 0)
|
||||||
|
|
|
@ -1792,7 +1792,7 @@ DSPLYMNU_PALLETEHACK = "DirectDraw palette hack"; // Not used
|
||||||
DSPLYMNU_ATTACHEDSURFACES = "Use attached surfaces"; // Not used
|
DSPLYMNU_ATTACHEDSURFACES = "Use attached surfaces"; // Not used
|
||||||
DSPLYMNU_SKYMODE = "Sky render mode";
|
DSPLYMNU_SKYMODE = "Sky render mode";
|
||||||
DSPLYMNU_LINEARSKY = "Linear skies";
|
DSPLYMNU_LINEARSKY = "Linear skies";
|
||||||
DSPLYMNU_GZDFULLBRIGHT = "Fullbright overrides sector color";
|
DSPLYMNU_GZDFULLBRIGHT = "Fullbright preserves sector color";
|
||||||
DSPLYMNU_DRAWFUZZ = "Use fuzz effect";
|
DSPLYMNU_DRAWFUZZ = "Use fuzz effect";
|
||||||
DSPLYMNU_TRANSSOUL = "Lost Soul translucency";
|
DSPLYMNU_TRANSSOUL = "Lost Soul translucency";
|
||||||
DSPLYMNU_FAKECONTRAST = "Use fake contrast";
|
DSPLYMNU_FAKECONTRAST = "Use fake contrast";
|
||||||
|
|
|
@ -664,6 +664,13 @@ OptionValue Fuzziness
|
||||||
2.0, "$OPTVAL_SHADOW"
|
2.0, "$OPTVAL_SHADOW"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OptionValue SectorColor
|
||||||
|
{
|
||||||
|
-1.0, "$OPTVAL_MAPSETTING"
|
||||||
|
0.0, "$OPTVAL_OFF"
|
||||||
|
1.0, "$OPTVAL_ON"
|
||||||
|
}
|
||||||
|
|
||||||
OptionMenu "OpenGLOptions"
|
OptionMenu "OpenGLOptions"
|
||||||
{
|
{
|
||||||
Title "$GLMNU_TITLE"
|
Title "$GLMNU_TITLE"
|
||||||
|
@ -717,7 +724,7 @@ OptionMenu "VideoOptions"
|
||||||
|
|
||||||
Option "$DSPLYMNU_SKYMODE", "r_skymode", "SkyModes"
|
Option "$DSPLYMNU_SKYMODE", "r_skymode", "SkyModes"
|
||||||
Option "$DSPLYMNU_LINEARSKY", "r_linearsky", "OnOff"
|
Option "$DSPLYMNU_LINEARSKY", "r_linearsky", "OnOff"
|
||||||
Option "$DSPLYMNU_GZDFULLBRIGHT", "r_fullbrightignoresectorcolor", "OnOff"
|
Option "$DSPLYMNU_GZDFULLBRIGHT", "r_preservesectorcolor", "SectorColor"
|
||||||
Option "$DSPLYMNU_DRAWFUZZ", "r_drawfuzz", "Fuzziness"
|
Option "$DSPLYMNU_DRAWFUZZ", "r_drawfuzz", "Fuzziness"
|
||||||
Slider "$DSPLYMNU_TRANSSOUL", "transsouls", 0.25, 1.0, 0.05, 2
|
Slider "$DSPLYMNU_TRANSSOUL", "transsouls", 0.25, 1.0, 0.05, 2
|
||||||
Option "$DSPLYMNU_FAKECONTRAST", "r_fakecontrast", "Contrast"
|
Option "$DSPLYMNU_FAKECONTRAST", "r_fakecontrast", "Contrast"
|
||||||
|
|
Loading…
Reference in a new issue