From fc4b03f3565ef1b1fc41aeafbd9eca0bb5153adc Mon Sep 17 00:00:00 2001 From: Nico de Poel Date: Thu, 22 Jul 2021 11:23:13 +0200 Subject: [PATCH] Updated engine project with build target for Game Core Xbox One, with a few code changes to make it compile. Still awaiting the FMOD native libraries for Xbox One. --- engine/Quake/arch_def.h | 6 + engine/Quake/console.c | 6 + engine/Quake/net_sys.h | 2 +- engine/Windows/VisualStudio/uniquake.sln | 10 ++ engine/Windows/VisualStudio/uniquake.vcxproj | 134 +++++++++++++++++- .../VisualStudio/uniquake.vcxproj.filters | 3 + 6 files changed, 159 insertions(+), 2 deletions(-) diff --git a/engine/Quake/arch_def.h b/engine/Quake/arch_def.h index 4fc332a..56c9ae4 100644 --- a/engine/Quake/arch_def.h +++ b/engine/Quake/arch_def.h @@ -40,6 +40,12 @@ # define PLATFORM_OS2 1 # endif +#elif defined(_GAMING_XBOX) + +# if !defined(PLATFORM_XBOX) +# define PLATFORM_XBOX 1 +# endif + #elif defined(_WIN32) || defined(__WIN32__) || defined(_WIN64) || defined(__NT__) || defined(_Windows) # if !defined(PLATFORM_WINDOWS) diff --git a/engine/Quake/console.c b/engine/Quake/console.c index 5884704..68a3aaa 100644 --- a/engine/Quake/console.c +++ b/engine/Quake/console.c @@ -32,6 +32,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #endif #include "quakedef.h" +#ifdef _GAMING_XBOX +#define open _open +#define close _close +#define write _write +#endif + int con_linewidth; float con_cursorspeed = 4; diff --git a/engine/Quake/net_sys.h b/engine/Quake/net_sys.h index 581e0d5..536d86e 100644 --- a/engine/Quake/net_sys.h +++ b/engine/Quake/net_sys.h @@ -175,7 +175,7 @@ COMPILE_TIME_ASSERT(sockaddr, offsetof(struct sockaddr, sa_family) == SA_FAM_OFF #endif /* end of windows stuff */ -#if defined(PLATFORM_ORBIS) || defined(PLATFORM_PROSPERO) +#if defined(PLATFORM_ORBIS) || defined(PLATFORM_PROSPERO) || defined(PLATFORM_XBOX) typedef int sys_socket_t; #define INVALID_SOCKET (-1) diff --git a/engine/Windows/VisualStudio/uniquake.sln b/engine/Windows/VisualStudio/uniquake.sln index 24f4615..b14c283 100644 --- a/engine/Windows/VisualStudio/uniquake.sln +++ b/engine/Windows/VisualStudio/uniquake.sln @@ -7,20 +7,25 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "uniquake", "uniquake.vcxpro EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug Portable|Gaming.Xbox.XboxOne.x64 = Debug Portable|Gaming.Xbox.XboxOne.x64 Debug Portable|ORBIS = Debug Portable|ORBIS Debug Portable|Prospero = Debug Portable|Prospero Debug Portable|x64 = Debug Portable|x64 Debug Portable|x86 = Debug Portable|x86 + Debug|Gaming.Xbox.XboxOne.x64 = Debug|Gaming.Xbox.XboxOne.x64 Debug|ORBIS = Debug|ORBIS Debug|Prospero = Debug|Prospero Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 + Release|Gaming.Xbox.XboxOne.x64 = Release|Gaming.Xbox.XboxOne.x64 Release|ORBIS = Release|ORBIS Release|Prospero = Release|Prospero Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AE77266F-0A23-4F08-A491-369DE664B273}.Debug Portable|Gaming.Xbox.XboxOne.x64.ActiveCfg = Debug Portable|Gaming.Xbox.XboxOne.x64 + {AE77266F-0A23-4F08-A491-369DE664B273}.Debug Portable|Gaming.Xbox.XboxOne.x64.Build.0 = Debug Portable|Gaming.Xbox.XboxOne.x64 {AE77266F-0A23-4F08-A491-369DE664B273}.Debug Portable|ORBIS.ActiveCfg = Debug Portable|ORBIS {AE77266F-0A23-4F08-A491-369DE664B273}.Debug Portable|ORBIS.Build.0 = Debug Portable|ORBIS {AE77266F-0A23-4F08-A491-369DE664B273}.Debug Portable|Prospero.ActiveCfg = Debug Portable|Prospero @@ -29,6 +34,8 @@ Global {AE77266F-0A23-4F08-A491-369DE664B273}.Debug Portable|x64.Build.0 = Debug Portable|x64 {AE77266F-0A23-4F08-A491-369DE664B273}.Debug Portable|x86.ActiveCfg = Debug Portable|Win32 {AE77266F-0A23-4F08-A491-369DE664B273}.Debug Portable|x86.Build.0 = Debug Portable|Win32 + {AE77266F-0A23-4F08-A491-369DE664B273}.Debug|Gaming.Xbox.XboxOne.x64.ActiveCfg = Debug|Gaming.Xbox.XboxOne.x64 + {AE77266F-0A23-4F08-A491-369DE664B273}.Debug|Gaming.Xbox.XboxOne.x64.Build.0 = Debug|Gaming.Xbox.XboxOne.x64 {AE77266F-0A23-4F08-A491-369DE664B273}.Debug|ORBIS.ActiveCfg = Debug|ORBIS {AE77266F-0A23-4F08-A491-369DE664B273}.Debug|ORBIS.Build.0 = Debug|ORBIS {AE77266F-0A23-4F08-A491-369DE664B273}.Debug|Prospero.ActiveCfg = Debug|Prospero @@ -37,6 +44,9 @@ Global {AE77266F-0A23-4F08-A491-369DE664B273}.Debug|x64.Build.0 = Debug|x64 {AE77266F-0A23-4F08-A491-369DE664B273}.Debug|x86.ActiveCfg = Debug|Win32 {AE77266F-0A23-4F08-A491-369DE664B273}.Debug|x86.Build.0 = Debug|Win32 + {AE77266F-0A23-4F08-A491-369DE664B273}.Release|Gaming.Xbox.XboxOne.x64.ActiveCfg = Release|Gaming.Xbox.XboxOne.x64 + {AE77266F-0A23-4F08-A491-369DE664B273}.Release|Gaming.Xbox.XboxOne.x64.Build.0 = Release|Gaming.Xbox.XboxOne.x64 + {AE77266F-0A23-4F08-A491-369DE664B273}.Release|Gaming.Xbox.XboxOne.x64.Deploy.0 = Release|Gaming.Xbox.XboxOne.x64 {AE77266F-0A23-4F08-A491-369DE664B273}.Release|ORBIS.ActiveCfg = Release|ORBIS {AE77266F-0A23-4F08-A491-369DE664B273}.Release|ORBIS.Build.0 = Release|ORBIS {AE77266F-0A23-4F08-A491-369DE664B273}.Release|Prospero.ActiveCfg = Release|Prospero diff --git a/engine/Windows/VisualStudio/uniquake.vcxproj b/engine/Windows/VisualStudio/uniquake.vcxproj index 4426539..ed669d3 100644 --- a/engine/Windows/VisualStudio/uniquake.vcxproj +++ b/engine/Windows/VisualStudio/uniquake.vcxproj @@ -1,6 +1,10 @@ + + Debug Portable + Gaming.Xbox.XboxOne.x64 + Debug Portable ORBIS @@ -17,6 +21,10 @@ Debug Portable x64 + + Debug + Gaming.Xbox.XboxOne.x64 + Debug ORBIS @@ -33,6 +41,10 @@ Debug x64 + + Release + Gaming.Xbox.XboxOne.x64 + Release ORBIS @@ -54,7 +66,6 @@ {AE77266F-0A23-4F08-A491-369DE664B273} quakespasm-sdl2 Win32Proj - 8.1 @@ -79,6 +90,12 @@ NotSet true + + Application + v141 + NotSet + true + Application v141 @@ -96,6 +113,11 @@ v141 NotSet + + DynamicLibrary + v141 + NotSet + DynamicLibrary v141 @@ -111,6 +133,11 @@ v141 NotSet + + DynamicLibrary + v141 + NotSet + DynamicLibrary v141 @@ -136,6 +163,9 @@ + + + @@ -145,6 +175,9 @@ + + + @@ -154,6 +187,9 @@ + + + @@ -184,6 +220,11 @@ Build-$(ProjectName)\$(Platform)\$(Configuration)\ true + + $(SolutionDir)Build-$(ProjectName)\$(Platform)\$(Configuration)\ + Build-$(ProjectName)\$(Platform)\$(Configuration)\ + true + $(SolutionDir)Build-$(ProjectName)\$(Platform)\$(Configuration)\ Build-$(ProjectName)\$(Platform)\$(Configuration)\ @@ -199,6 +240,11 @@ Build-$(ProjectName)\$(Platform)\$(Configuration)\ true + + $(SolutionDir)Build-$(ProjectName)\$(Platform)\$(Configuration)\ + Build-$(ProjectName)\$(Platform)\$(Configuration)\ + true + $(SolutionDir)Build-$(ProjectName)\$(Platform)\$(Configuration)\ Build-$(ProjectName)\$(Platform)\$(Configuration)\ @@ -214,6 +260,11 @@ Build-$(ProjectName)\$(Platform)\$(Configuration)\ false + + $(SolutionDir)Build-$(ProjectName)\$(Platform)\$(Configuration)\ + Build-$(ProjectName)\$(Platform)\$(Configuration)\ + false + $(SolutionDir)Build-$(ProjectName)\$(Platform)\$(Configuration)\ Build-$(ProjectName)\$(Platform)\$(Configuration)\ @@ -330,6 +381,32 @@ copy "$(SolutionDir)\..\SDL2\lib\*.dll" "$(TargetDir)" copy $(TargetDir)$(TargetName).dll $(SolutionDir)..\..\..\Assets\Plugins\windows\x86_64\uniquake.dll + + + + Disabled + ..\SDL2\include;..\..\FMOD\inc;..\..\Quake;%(AdditionalIncludeDirectories) + UNIQUAKE_EXPORTS;USE_LIBSDL;USE_OPENGL;WIN32;_DEBUG;_WINDOWS;_USE_WINSOCK2;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_SDL2;USE_FMOD;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + CompileAsC + + + ws2_32.lib;opengl32.lib;winmm.lib;SDL2.lib;SDL2main.lib;fmodL_vc.lib;%(AdditionalDependencies) + ..\..\FMOD\lib\x64;..\SDL2\lib64;%(AdditionalLibraryDirectories) + msvcrt.lib;%(IgnoreSpecificDefaultLibraries) + true + Windows + + + copy $(TargetDir)$(TargetName).dll $(SolutionDir)..\..\..\Assets\Plugins\windows\x86_64\uniquake.dll + + @@ -411,6 +488,32 @@ copy "$(SolutionDir)\..\SDL2\lib\*.dll" "$(TargetDir)" copy "$(TargetDir)$(TargetName).dll" $(SolutionDir)..\..\..\Assets\Plugins\windows\x86_64\uniquake.dll + + + + Disabled + ..\..\UniQuake\stub;..\..\FMOD\inc;..\..\Quake;%(AdditionalIncludeDirectories) + UNIQUAKE_EXPORTS;_DEBUG;USE_FMOD;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + CompileAsC + + + fmodL_vc.lib;%(AdditionalDependencies) + ..\..\FMOD\lib\gamecore\xboxone;%(AdditionalLibraryDirectories) + msvcrt.lib;%(IgnoreSpecificDefaultLibraries) + true + Windows + + + copy "$(TargetDir)$(TargetName).dll" $(SolutionDir)..\..\..\Assets\Plugins\gamecore\xboxone\uniquake.dll + + @@ -492,6 +595,34 @@ copy "$(SolutionDir)\..\SDL2\lib\*.dll" "$(TargetDir)" copy "$(SolutionDir)\..\codecs\x64\*.dll" "$(TargetDir)" +copy "$(SolutionDir)\..\SDL2\lib64\*.dll" "$(TargetDir)" + + + + + + MaxSpeed + true + ..\SDL2\include;..\codecs\include;..\misc\include;..\..\Quake;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USE_WINSOCK2;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_SDL2;USE_CODEC_MP3;USE_CODEC_VORBIS;USE_CODEC_WAVE;USE_CODEC_FLAC;USE_CODEC_OPUS;USE_CODEC_MIKMOD;USE_CODEC_UMX;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + CompileAsC + + + libvorbisfile.lib;libvorbis.lib;libopusfile.lib;libopus.lib;libFLAC.lib;libogg.lib;libmad.lib;libmikmod.lib;ws2_32.lib;opengl32.lib;winmm.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies) + ..\codecs\x64;..\SDL2\lib64;%(AdditionalLibraryDirectories) + true + Windows + true + true + + + copy "$(SolutionDir)\..\codecs\x64\*.dll" "$(TargetDir)" copy "$(SolutionDir)\..\SDL2\lib64\*.dll" "$(TargetDir)" @@ -704,6 +835,7 @@ copy "$(SolutionDir)\..\SDL2\lib64\*.dll" "$(TargetDir)" + diff --git a/engine/Windows/VisualStudio/uniquake.vcxproj.filters b/engine/Windows/VisualStudio/uniquake.vcxproj.filters index a989e19..8d0476f 100644 --- a/engine/Windows/VisualStudio/uniquake.vcxproj.filters +++ b/engine/Windows/VisualStudio/uniquake.vcxproj.filters @@ -456,6 +456,9 @@ obsolete + + stub +