From 99c91d4bb3a0a4bb93d168e15e19c56f9004ac27 Mon Sep 17 00:00:00 2001 From: Arthur Date: Wed, 14 Feb 2024 16:36:36 -0500 Subject: [PATCH 1/3] Visual Studio compiles again --- .gitignore | 3 +- src/console.c | 2 +- src/m_menu.c | 2 +- src/r_picformats.c | 2 +- src/r_textures.c | 2 +- src/sdl/Srb2SDL-vc10.vcxproj | 66 ++++++++++++++++++++++++++-- src/sdl/Srb2SDL-vc10.vcxproj.filters | 38 +++++++--------- 7 files changed, 85 insertions(+), 30 deletions(-) diff --git a/.gitignore b/.gitignore index 1dd1c19d5..4ba05f7ca 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,5 @@ Win32_LIB_ASM_Release /build /build/* /CMakeUserPresets.json -/out \ No newline at end of file +/out +/objs/VC10 diff --git a/src/console.c b/src/console.c index e4bdec0ce..4143e5e06 100644 --- a/src/console.c +++ b/src/console.c @@ -220,7 +220,7 @@ static char *bindtable[NUMINPUTS]; static void CONS_Bind_f(void) { size_t na; - char *newcmd; + char *newcmd = NULL; //size_t newlen = 0; unsigned int i; INT32 key; diff --git a/src/m_menu.c b/src/m_menu.c index de23acbfb..edbbdf2c1 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -10535,7 +10535,7 @@ static void M_StartTimeAttackReplay(INT32 choice) // Player has selected the "REPLAY" from the time attack screen static void M_ReplayTimeAttack(INT32 choice) { - const char *which; + const char *which = NULL; UINT8 error = DFILE_ERROR_NONE; if (currentMenu == &SP_ReplayDef) diff --git a/src/r_picformats.c b/src/r_picformats.c index 7d7f1198d..e4a59f211 100644 --- a/src/r_picformats.c +++ b/src/r_picformats.c @@ -376,7 +376,7 @@ void *Picture_PatchConvert( // Write columns for (INT32 x = 0; x < inwidth; x++) { - post_t *post; + post_t *post = NULL; size_t post_data_offset = 0; boolean was_opaque = false; diff --git a/src/r_textures.c b/src/r_textures.c index 1bc0534ec..0175a080e 100644 --- a/src/r_textures.c +++ b/src/r_textures.c @@ -472,7 +472,7 @@ UINT8 *R_GenerateTexture(size_t texnum) for (x = 0; x < texture->width; x++) { - post_t *post; + post_t *post = NULL; boolean was_opaque = false; column_t *column = &temp_columns[x]; diff --git a/src/sdl/Srb2SDL-vc10.vcxproj b/src/sdl/Srb2SDL-vc10.vcxproj index 462170078..e81b996a1 100644 --- a/src/sdl/Srb2SDL-vc10.vcxproj +++ b/src/sdl/Srb2SDL-vc10.vcxproj @@ -165,7 +165,22 @@ true false stdcpp17 + HAVE_CURL;%(PreprocessorDefinitions) + D:\Code\SRB2-VSFix\libs\curl\include;%(AdditionalIncludeDirectories) + + + + + + + + + + + libcurl.dll.a;libz32.a;%(AdditionalDependencies) + D:\Code\SRB2-VSFix\libs\zlib\win32;D:\Code\SRB2-VSFix\libs\curl\lib32;%(AdditionalLibraryDirectories) + @@ -175,7 +190,50 @@ 4244;4267;4146;4003 + HAVE_CURL;%(PreprocessorDefinitions) + D:\Code\SRB2-VSFix\libs\curl\include;%(AdditionalIncludeDirectories) + + + + + + + + + + + libcurl.dll.a;libz32.a;%(AdditionalDependencies) + D:\Code\SRB2-VSFix\libs\zlib\win32;D:\Code\SRB2-VSFix\libs\curl\lib32;%(AdditionalLibraryDirectories) + + + + + false + + + + + true + false + 4244;4267;4146 + HAVE_CURL;%(PreprocessorDefinitions) + D:\Code\SRB2-VSFix\src\win32\curl\include;%(AdditionalIncludeDirectories) + D:\Code\SRB2-VSFix\src\win32\curl\lib;%(AdditionalModuleDependencies) + + + libcurl.a;%(AdditionalDependencies) + D:\Code\SRB2-VSFix\src\win32\curl\lib;%(AdditionalLibraryDirectories) + + + + + HAVE_CURL;%(PreprocessorDefinitions) + + + libcurl.a;%(AdditionalDependencies) + D:\Code\SRB2-VSFix\src\win32\curl\lib;%(AdditionalLibraryDirectories) + @@ -314,7 +372,6 @@ - @@ -400,6 +457,7 @@ + @@ -438,6 +496,8 @@ + + @@ -495,7 +555,6 @@ - @@ -567,7 +626,6 @@ true - @@ -584,4 +642,4 @@ - + \ No newline at end of file diff --git a/src/sdl/Srb2SDL-vc10.vcxproj.filters b/src/sdl/Srb2SDL-vc10.vcxproj.filters index 59bb76b52..183843018 100644 --- a/src/sdl/Srb2SDL-vc10.vcxproj.filters +++ b/src/sdl/Srb2SDL-vc10.vcxproj.filters @@ -255,9 +255,6 @@ Hw_Hardware - - Hw_Hardware - I_Interface @@ -378,9 +375,6 @@ D_Doom - - I_Interface - I_Interface @@ -558,12 +552,16 @@ R_Rend - - P_Play - M_Misc + + + + + + + @@ -753,15 +751,9 @@ Hw_Hardware - - Hw_Hardware - I_Interface - - I_Interface - LUA @@ -1105,21 +1097,25 @@ LUA - - SDLApp - I_Interface R_Rend - - P_Play - M_Misc + + + BLUA + + + LUA + + + R_Rend + From 0cb4a1397d8d46c4e952e790d0ddc797767b7ea9 Mon Sep 17 00:00:00 2001 From: Arthur Date: Wed, 14 Feb 2024 18:04:58 -0500 Subject: [PATCH 2/3] Remove absolute paths --- src/sdl/Srb2SDL-vc10.vcxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sdl/Srb2SDL-vc10.vcxproj b/src/sdl/Srb2SDL-vc10.vcxproj index e81b996a1..d8c243010 100644 --- a/src/sdl/Srb2SDL-vc10.vcxproj +++ b/src/sdl/Srb2SDL-vc10.vcxproj @@ -166,7 +166,7 @@ false stdcpp17 HAVE_CURL;%(PreprocessorDefinitions) - D:\Code\SRB2-VSFix\libs\curl\include;%(AdditionalIncludeDirectories) + ..\..\libs\curl\include;%(AdditionalIncludeDirectories) @@ -179,7 +179,7 @@ libcurl.dll.a;libz32.a;%(AdditionalDependencies) - D:\Code\SRB2-VSFix\libs\zlib\win32;D:\Code\SRB2-VSFix\libs\curl\lib32;%(AdditionalLibraryDirectories) + ..\..\libs\zlib\win32;..\..\libs\curl\lib32;%(AdditionalLibraryDirectories) @@ -191,7 +191,7 @@ 4244;4267;4146;4003 HAVE_CURL;%(PreprocessorDefinitions) - D:\Code\SRB2-VSFix\libs\curl\include;%(AdditionalIncludeDirectories) + ..\libs\curl\include;%(AdditionalIncludeDirectories) @@ -204,7 +204,7 @@ libcurl.dll.a;libz32.a;%(AdditionalDependencies) - D:\Code\SRB2-VSFix\libs\zlib\win32;D:\Code\SRB2-VSFix\libs\curl\lib32;%(AdditionalLibraryDirectories) + ..\libs\zlib\win32;..\libs\curl\lib32;%(AdditionalLibraryDirectories) From 5a16fd138f944a42faaf9b72acc8cfb0d98f4625 Mon Sep 17 00:00:00 2001 From: Logan Aerl Arias Date: Wed, 14 Feb 2024 23:53:13 +0000 Subject: [PATCH 3/3] fix path to x64 curl in VS project file (edited by hand via WebIDE) --- src/sdl/Srb2SDL-vc10.vcxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sdl/Srb2SDL-vc10.vcxproj b/src/sdl/Srb2SDL-vc10.vcxproj index d8c243010..0f0355c6f 100644 --- a/src/sdl/Srb2SDL-vc10.vcxproj +++ b/src/sdl/Srb2SDL-vc10.vcxproj @@ -218,12 +218,12 @@ false 4244;4267;4146 HAVE_CURL;%(PreprocessorDefinitions) - D:\Code\SRB2-VSFix\src\win32\curl\include;%(AdditionalIncludeDirectories) - D:\Code\SRB2-VSFix\src\win32\curl\lib;%(AdditionalModuleDependencies) + ..\libs\curl\include;%(AdditionalIncludeDirectories) + ..\libs\curl\lib64;%(AdditionalModuleDependencies) libcurl.a;%(AdditionalDependencies) - D:\Code\SRB2-VSFix\src\win32\curl\lib;%(AdditionalLibraryDirectories) + ..\libs\curl\lib64;%(AdditionalLibraryDirectories) @@ -232,7 +232,7 @@ libcurl.a;%(AdditionalDependencies) - D:\Code\SRB2-VSFix\src\win32\curl\lib;%(AdditionalLibraryDirectories) + ..\libs\curl\lib64;%(AdditionalLibraryDirectories)