Pull request cleanup

This commit is contained in:
Robert Beckebans 2021-04-29 16:32:15 +02:00
parent 0964c02bcf
commit dbbcea94c5
10 changed files with 27 additions and 19 deletions

View file

@ -184,7 +184,8 @@ idMenuHandler_HUD::ShowTip
*/
void idMenuHandler_HUD::ShowTip( const char* title, const char* tip, bool autoHide )
{
autoHideTip = autoHide; // SRS - Changed to assign autoHide to autoHideTip vs. assign autoHideTip to itself
// SRS - Changed to assign autoHide to autoHideTip vs. assign autoHideTip to itself
autoHideTip = autoHide;
tipStartTime = gameLocal.time;
hiding = false;
idMenuScreen_HUD* screen = GetHud();

View file

@ -764,7 +764,8 @@ idVarDef::SetObject
void idVarDef::SetObject( idScriptObject* object )
{
assert( typeDef );
initialized = initializedConstant; // SRS - Set initialized to initializedConstant vs self-assignment
// SRS - Set initialized to initializedConstant vs self-assignment
initialized = initializedConstant;
assert( typeDef->Inherits( &type_object ) );
*value.objectPtrPtr = object;
}

View file

@ -77,7 +77,6 @@ public:
virtual void ExecuteCommandBuffer();
virtual void ArgCompletion_FolderExtension( const idCmdArgs& args, void( *callback )( const char* s ), const char* folder, int stripFolder, ... );
// SRS - Changed stripFolder type from bool to int for compatibility with va_start()
virtual void ArgCompletion_DeclName( const idCmdArgs& args, void( *callback )( const char* s ), int type );
virtual void BufferCommandArgs( cmdExecution_t exec, const idCmdArgs& args );
@ -797,8 +796,8 @@ void idCmdSystemLocal::ExecuteCommandBuffer()
idCmdSystemLocal::ArgCompletion_FolderExtension
============
*/
void idCmdSystemLocal::ArgCompletion_FolderExtension( const idCmdArgs& args, void( *callback )( const char* s ), const char* folder, int stripFolder, ... )
// SRS - Changed stripFolder type from bool to int for compatibility with va_start()
void idCmdSystemLocal::ArgCompletion_FolderExtension( const idCmdArgs& args, void( *callback )( const char* s ), const char* folder, int stripFolder, ... )
{
int i;
idStr string;

View file

@ -171,7 +171,6 @@ public:
// Base for path/file auto-completion.
virtual void ArgCompletion_FolderExtension( const idCmdArgs& args, void( *callback )( const char* s ), const char* folder, int stripFolder, ... ) = 0;
// SRS - Changed stripFolder type from bool to int for compatibility with va_start()
// Base for decl name auto-completion.
virtual void ArgCompletion_DeclName( const idCmdArgs& args, void( *callback )( const char* s ), int type ) = 0;

View file

@ -198,7 +198,10 @@ void idLib::FatalError( const char* fmt, ... )
common->FatalError( "%s", text );
exit( EXIT_FAILURE ); // SRS - Added exit to silence build warning since FatalError has attribute noreturn
#if !defined(_WIN32)
// SRS - Added exit to silence build warning since FatalError has attribute noreturn
exit( EXIT_FAILURE );
#endif
}
/*
@ -217,7 +220,10 @@ void idLib::Error( const char* fmt, ... )
common->Error( "%s", text );
exit( EXIT_FAILURE ); // SRS - Added exit to silence build warning since Error has attribute noreturn
#if !defined(_WIN32)
// SRS - Added exit to silence build warning since FatalError has attribute noreturn
exit( EXIT_FAILURE );
#endif
}
/*

View file

@ -807,7 +807,9 @@ void idImage::GenerateImage( const byte* pic, int width, int height, textureFilt
{
AllocImage();
#if defined(USE_VULKAN)
// RB: shouldn't be needed as the Vulkan backend is not feature complete yet
// I just make sure r_useSSAO is 0
#if 0 //defined(USE_VULKAN)
// SRS - update layout of Ambient Occlusion image otherwise get Vulkan validation layer errors with SSAO enabled
if( imgName == "_ao0" || imgName == "_ao1" )
{

View file

@ -551,13 +551,13 @@ void idImage::SetTexParameters()
}
// RB: disabled use of unreliable extension that can make the game look worse
// SRS - Try with feature turned back on using r_lodBias CVAR vs. hardcoded value
/*
if( glConfig.textureLODBiasAvailable && ( usage != TD_FONT ) )
{
// use a blurring LOD bias in combination with high anisotropy to fix our aliasing grate textures...
glTexParameterf( target, GL_TEXTURE_LOD_BIAS_EXT, /*0.5*/ r_lodBias.GetFloat() );
glTexParameterf( target, GL_TEXTURE_LOD_BIAS_EXT, 0.5 ); //r_lodBias.GetFloat() );
}
*/
// RB end
// set the wrap/clamp modes

View file

@ -1512,7 +1512,7 @@ idStr idRenderProgManager::ConvertCG2GLSL( const idStr& in, const char* name, rp
idStr filenameHint = "// filename " + idStr( name ) + "\n";
// RB: changed to allow multiple versions of GLSL
if( stage == SHADER_STAGE_VERTEX ) // SRS - Remove extra parens
if( stage == SHADER_STAGE_VERTEX )
{
switch( glConfig.driverType )
{
@ -1561,7 +1561,7 @@ idStr idRenderProgManager::ConvertCG2GLSL( const idStr& in, const char* name, rp
if( vkGLSL )
{
out += "\n";
if( stage == SHADER_STAGE_VERTEX ) // SRS - Remove extra parens
if( stage == SHADER_STAGE_VERTEX )
{
out += "layout( binding = 0 ) uniform UBOV {\n";
}

View file

@ -301,7 +301,11 @@ idCVar r_useSSGI( "r_useSSGI", "0", CVAR_RENDERER | CVAR_ARCHIVE | CVAR_BOOL, "u
idCVar r_ssgiDebug( "r_ssgiDebug", "0", CVAR_RENDERER | CVAR_INTEGER, "" );
idCVar r_ssgiFiltering( "r_ssgiFiltering", "1", CVAR_RENDERER | CVAR_BOOL, "" );
idCVar r_useSSAO( "r_useSSAO", "1", CVAR_RENDERER | CVAR_ARCHIVE | CVAR_BOOL, "use screen space ambient occlusion to darken corners" );
#if defined( USE_VULKAN )
idCVar r_useSSAO( "r_useSSAO", "0", CVAR_RENDERER | CVAR_ROM | CVAR_STATIC | CVAR_BOOL, "use screen space ambient occlusion to darken corners" );
#else
idCVar r_useSSAO( "r_useSSAO", "1", CVAR_RENDERER | CVAR_ARCHIVE | CVAR_BOOL, "use screen space ambient occlusion to darken corners" );
#endif
idCVar r_ssaoDebug( "r_ssaoDebug", "0", CVAR_RENDERER | CVAR_INTEGER, "" );
idCVar r_ssaoFiltering( "r_ssaoFiltering", "0", CVAR_RENDERER | CVAR_BOOL, "" );
idCVar r_useHierarchicalDepthBuffer( "r_useHierarchicalDepthBuffer", "1", CVAR_RENDERER | CVAR_BOOL, "" );

View file

@ -317,11 +317,7 @@ bool VKimp_Init( glimpParms_t parms )
common->Printf( "No usable VK mode found: %s", SDL_GetError() );
return false;
}
/* SRS - This must be leftover code from OpenGL, disable it
#ifdef __APPLE__
glewExperimental = GL_TRUE;
#endif
*/
// DG: disable cursor, we have two cursors in menu (because mouse isn't grabbed in menu)
SDL_ShowCursor( SDL_DISABLE );
// DG end