- moved the code in gl_data.cpp to better fitting places

* the MAPINFO options now get handled in g_mapinfo.cpp and g_level.cpp, just like the rest of them as members of level_info_t and FLevelLocals.
* RecalcVertexHeights has been made a member of vertex_t and been moved to p_sectors.cpp.
* the dumpgeometry CCMD has been moved to p_setup.cpp
This commit is contained in:
Christoph Oelckers 2018-04-01 18:45:27 +02:00
commit 65e7b6dfaa
22 changed files with 249 additions and 390 deletions

View file

@ -117,6 +117,31 @@ EXTERN_CVAR (String, playerclass)
void G_VerifySkill();
CUSTOM_CVAR(Bool, gl_brightfog, false, CVAR_ARCHIVE | CVAR_NOINITCALL)
{
if (level.info->brightfog == -1) level.brightfog = self;
}
CUSTOM_CVAR(Bool, gl_lightadditivesurfaces, false, CVAR_ARCHIVE | CVAR_NOINITCALL)
{
if (level.info->lightadditivesurfaces == -1) level.lightadditivesurfaces = self;
}
CUSTOM_CVAR(Bool, gl_notexturefill, false, CVAR_NOINITCALL)
{
if (level.info->notexturefill == -1) level.notexturefill = self;
}
CUSTOM_CVAR(Int, gl_lightmode, 3, CVAR_ARCHIVE | CVAR_NOINITCALL)
{
int newself = self;
if (newself > 4) newself = 8; // use 8 for software lighting to avoid conflicts with the bit mask
if (newself < 0) newself = 0;
if (self != newself) self = newself;
else if (level.info->lightmode == -1) level.lightmode = self;
}
static FRandom pr_classchoice ("RandomPlayerClassChoice");
@ -1491,6 +1516,12 @@ void G_InitLevelLocals ()
compatflags2.Callback();
level.DefaultEnvironment = info->DefaultEnvironment;
level.lightmode = info->lightmode < 0? gl_lightmode : info->lightmode;
level.brightfog = info->brightfog < 0? gl_brightfog : !!info->brightfog;
level.lightadditivesurfaces = info->lightadditivesurfaces < 0 ? gl_lightadditivesurfaces : !!info->lightadditivesurfaces;
level.notexturefill = info->notexturefill < 0 ? gl_notexturefill : !!info->notexturefill;
}
//==========================================================================