diff --git a/neo/d3xp/menus/MenuHandler_HUD.cpp b/neo/d3xp/menus/MenuHandler_HUD.cpp index 5b9e2796..08a7f4ad 100644 --- a/neo/d3xp/menus/MenuHandler_HUD.cpp +++ b/neo/d3xp/menus/MenuHandler_HUD.cpp @@ -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(); diff --git a/neo/d3xp/script/Script_Program.cpp b/neo/d3xp/script/Script_Program.cpp index 2a6ff0b6..50ad3d69 100644 --- a/neo/d3xp/script/Script_Program.cpp +++ b/neo/d3xp/script/Script_Program.cpp @@ -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; } diff --git a/neo/framework/CmdSystem.cpp b/neo/framework/CmdSystem.cpp index 63981178..7cac39ee 100644 --- a/neo/framework/CmdSystem.cpp +++ b/neo/framework/CmdSystem.cpp @@ -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; diff --git a/neo/framework/CmdSystem.h b/neo/framework/CmdSystem.h index 9050db41..ac3b05bc 100644 --- a/neo/framework/CmdSystem.h +++ b/neo/framework/CmdSystem.h @@ -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; diff --git a/neo/idlib/Lib.cpp b/neo/idlib/Lib.cpp index c990fb7c..453ff9dd 100644 --- a/neo/idlib/Lib.cpp +++ b/neo/idlib/Lib.cpp @@ -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 } /* diff --git a/neo/renderer/Image_load.cpp b/neo/renderer/Image_load.cpp index ae97612a..c92f04c2 100644 --- a/neo/renderer/Image_load.cpp +++ b/neo/renderer/Image_load.cpp @@ -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" ) { diff --git a/neo/renderer/OpenGL/Image_GL.cpp b/neo/renderer/OpenGL/Image_GL.cpp index 2c7d60eb..80a8dad4 100644 --- a/neo/renderer/OpenGL/Image_GL.cpp +++ b/neo/renderer/OpenGL/Image_GL.cpp @@ -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 diff --git a/neo/renderer/RenderProgs_GLSL.cpp b/neo/renderer/RenderProgs_GLSL.cpp index a09fcf3e..a89a78a7 100644 --- a/neo/renderer/RenderProgs_GLSL.cpp +++ b/neo/renderer/RenderProgs_GLSL.cpp @@ -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"; } diff --git a/neo/renderer/RenderSystem_init.cpp b/neo/renderer/RenderSystem_init.cpp index 5dc05952..0ee37996 100644 --- a/neo/renderer/RenderSystem_init.cpp +++ b/neo/renderer/RenderSystem_init.cpp @@ -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, "" ); diff --git a/neo/sys/sdl/sdl_vkimp.cpp b/neo/sys/sdl/sdl_vkimp.cpp index b3eb2373..9a59eb19 100644 --- a/neo/sys/sdl/sdl_vkimp.cpp +++ b/neo/sys/sdl/sdl_vkimp.cpp @@ -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