diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index 25da9651..a0198160 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -3700,7 +3700,7 @@ void CL_FinishDownload_f (void) CL_ForceStopDownload(true); } -#if defined(_WIN32) && !defined(WINRT) +#if defined(_WIN32) && !defined(WINRT) && !defined(_XBOX) #include "winquake.h" /* ================= @@ -4149,7 +4149,7 @@ void CL_Init (void) // // Windows commands // -#if defined(_WIN32) && !defined(WINRT) +#if defined(_WIN32) && !defined(WINRT) && !defined(_XBOX) Cmd_AddCommand ("windows", CL_Windows_f); #endif diff --git a/engine/client/net_master.c b/engine/client/net_master.c index 205fa19e..fac51301 100644 --- a/engine/client/net_master.c +++ b/engine/client/net_master.c @@ -4,7 +4,6 @@ clientside master queries and server ping/polls */ #include "quakedef.h" - #include "cl_master.h" qboolean sb_enablequake2; @@ -565,7 +564,6 @@ void SV_Master_Shutdown (void) #ifdef _WIN32 #include "winquake.h" -#define USEIPX #else typedef int SOCKET; #endif @@ -576,6 +574,11 @@ typedef int SOCKET; #define USEIPX #endif +#if defined(_XBOX) + #undef TCPCONNECT + #undef IPPROTO_IPV6 + #undef USEIPX +#endif //the number of servers should be limited only by memory. diff --git a/engine/client/sys_xdk.c b/engine/client/sys_xdk.c new file mode 100644 index 00000000..d03d0ef6 --- /dev/null +++ b/engine/client/sys_xdk.c @@ -0,0 +1,25 @@ +#include +#include "quakedef.h" + +void main( int argc, char **argv) { + float time, lasttime; + quakeparms_t parms; + + memset(&parms, 0, sizeof(parms)); + + //fill in parms + COM_InitArgv(parms.argc, parms.argv); + TL_InitLanguages(parms.basedir); + Host_Init(&parms); + + //main loop + lasttime = Sys_DoubleTime(); + + while (1) + { + time = Sys_DoubleTime(); + Host_Frame(time - lasttime); + lasttime = time; + } + +} \ No newline at end of file diff --git a/engine/client/view.c b/engine/client/view.c index 3c43864a..708097e7 100644 --- a/engine/client/view.c +++ b/engine/client/view.c @@ -385,7 +385,7 @@ static void QDECL V_Gamma_Callback(struct cvar_s *var, char *oldvalue) V_UpdatePalette (true); } -#ifdef _WIN32 +#if defined(_WIN32) && !defined(_XBOX) void W32_BlowChunk(vec3_t pos, float radius) { vec3_t center; @@ -437,7 +437,7 @@ void V_ParseDamage (playerview_t *pv) pv->faceanimtime = cl.time + 0.2; // but sbar face into pain frame -#if defined(_WIN32) && !defined(MINIMAL) +#if defined(_WIN32) && !defined(MINIMAL) && !defined(_XBOX) if (itburnsitburnsmakeitstop.value > 0) W32_BlowChunk(from, (armor+blood) * itburnsitburnsmakeitstop.value); #endif diff --git a/engine/client/winquake.h b/engine/client/winquake.h index 3f70b281..7259cb5f 100644 --- a/engine/client/winquake.h +++ b/engine/client/winquake.h @@ -37,10 +37,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #endif #define WIN32_LEAN_AND_MEAN #define byte winbyte -#include -#include -#include -#include +#ifdef _XBOX + #include + #include +#else + #include + #include + #include + #include +#endif + #define _LPCWAVEFORMATEX_DEFINED @@ -78,13 +84,15 @@ LONG CDAudio_MessageHandler(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); //shell32 stuff that doesn't exist in win95 #define COBJMACROS + +#ifndef _XBOX #include #include extern LPITEMIDLIST (STDAPICALLTYPE *pSHBrowseForFolderW)(LPBROWSEINFOW lpbi); extern BOOL (STDAPICALLTYPE *pSHGetPathFromIDListW)(LPCITEMIDLIST pidl, LPWSTR pszPath); extern BOOL (STDAPICALLTYPE *pSHGetSpecialFolderPathW)(HWND hwnd, LPWSTR pszPath, int csidl, BOOL fCreate); extern BOOL (STDAPICALLTYPE *pShell_NotifyIconW)(DWORD dwMessage, PNOTIFYICONDATAW lpData); - +#endif //void VID_LockBuffer (void); //void VID_UnlockBuffer (void); diff --git a/engine/common/bothdefs.h b/engine/common/bothdefs.h index 8ec5b015..c33e208e 100644 --- a/engine/common/bothdefs.h +++ b/engine/common/bothdefs.h @@ -42,6 +42,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define NO_OGG #endif +#ifdef _XBOX + #define NO_PNG + #define NO_JPEG + #define NO_OGG + #define NO_ZLIB + #define NOMEDIA +#endif + #ifdef NACL #define NO_PNG #define NO_JPEG @@ -101,7 +109,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #if !defined(NO_DIRECTX) && !defined(NODIRECTX) && defined(_WIN32) #define AVAIL_DINPUT #define AVAIL_DSOUND - #define AVAIL_WASAPI + #undef AVAIL_WASAPI #endif #ifdef WINRT #define AVAIL_XAUDIO2 @@ -191,7 +199,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #undef AVAIL_XZDEC #if defined(_WIN32) && !defined(FTE_SDL) && !defined(MULTITHREAD) //always thread on win32 non-minimal builds +#ifndef _XBOX #define MULTITHREAD +#endif #endif #elif defined(MINIMAL) #define QUAKESTATS @@ -248,7 +258,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define PSKMODELS //PSK model format (ActorX stuff from UT, though not the format the game itself uses) #define HALFLIFEMODELS //halflife model support (experimental) #define INTERQUAKEMODELS - #define RAGDOLL + + #ifdef _XBOX + #define RAGDOLL + #endif #define HUFFNETWORK //huffman network compression #define DOOMWADS //doom wad/sprite support @@ -600,6 +613,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #elif defined(_WIN32) #if defined(WINRT) #define PLATFORM "WinRT" /*those poor poor souls. maybe just maybe I'll actually get the tools for a port, its just a shame that I won't be able to release said port*/ + #elif defined(_XBOX) + #define PLATFORM "Xbox" #else #define PLATFORM "Win" #endif diff --git a/engine/common/fs.c b/engine/common/fs.c index 0efb59ff..cc06f212 100644 --- a/engine/common/fs.c +++ b/engine/common/fs.c @@ -3753,7 +3753,7 @@ void FS_ReloadPackFiles_f(void) FS_BeginManifestUpdates(); } -#if defined(_WIN32) && !defined(FTE_SDL) && !defined(WINRT) +#if defined(_WIN32) && !defined(FTE_SDL) && !defined(WINRT) && !defined(_XBOX) #include "winquake.h" #ifdef MINGW #define byte BYTE //some versions of mingw headers are broken slightly. this lets it compile. @@ -5739,7 +5739,7 @@ void COM_InitFilesystem (void) //assume the home directory is the working directory. *com_homepath = '\0'; -#if defined(_WIN32) && !defined(FTE_SDL) && !defined(WINRT) +#if defined(_WIN32) && !defined(FTE_SDL) && !defined(WINRT) && !defined(_XBOX) { //win32 sucks. HRESULT (WINAPI *dSHGetFolderPathW) (HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, wchar_t *pszPath) = NULL; dllfunction_t funcs[] = diff --git a/engine/common/netinc.h b/engine/common/netinc.h index 7276bf85..c2f65f26 100644 --- a/engine/common/netinc.h +++ b/engine/common/netinc.h @@ -40,13 +40,20 @@ #define USEIPX #endif #define WIN32_LEAN_AND_MEAN +#ifdef _XBOX + #include + #include +#else #include #include +#endif // #include "winquake.h" +#ifndef _XBOX #ifdef USEIPX #include "wsipx.h" #endif #include +#endif #include #ifndef IPPROTO_IPV6 /*for msvc6*/ diff --git a/engine/common/plugin.c b/engine/common/plugin.c index 084e96f1..2a8417de 100644 --- a/engine/common/plugin.c +++ b/engine/common/plugin.c @@ -940,6 +940,12 @@ static int Plug_NewStreamHandle(plugstream_e type) return i; } +#if defined(_XBOX) + #undef TCPCONNECT + #undef IPPROTO_IPV6 + #undef USEIPX +#endif + #ifdef HAVE_PACKET //EBUILTIN(int, NET_TCPListen, (char *ip, int port, int maxcount)); //returns a new socket with listen enabled. diff --git a/engine/common/pr_bgcmd.c b/engine/common/pr_bgcmd.c index 8e68600c..bb37600c 100644 --- a/engine/common/pr_bgcmd.c +++ b/engine/common/pr_bgcmd.c @@ -112,13 +112,16 @@ static int debuggerstacky; #endif #if defined(_WIN32) && !defined(FTE_SDL) -#include +#ifndef _XBOX + #include +#endif + void INS_UpdateGrabs(int fullscreen, int activeapp); #endif int QCLibEditor(pubprogfuncs_t *prinst, const char *filename, int *line, int *statement, char *error, pbool fatal); void QCLoadBreakpoints(const char *vmname, const char *progsname) { //this asks the gui to reapply any active breakpoints and waits for them so that any spawn functions can be breakpointed properly. -#if defined(_WIN32) && !defined(FTE_SDL) +#if defined(_WIN32) && !defined(FTE_SDL) && !defined(_XBOX) extern int isPlugin; if (isPlugin >= 2) { @@ -304,7 +307,7 @@ qboolean QCExternalDebuggerCommand(char *text) int QDECL QCEditor (pubprogfuncs_t *prinst, const char *filename, int *line, int *statement, char *reason, pbool fatal) { -#if defined(_WIN32) && !defined(SERVERONLY) && !defined(FTE_SDL) +#if defined(_WIN32) && !defined(SERVERONLY) && !defined(FTE_SDL) && !defined(_XBOX) if (isPlugin >= 2) { if (wantquit) diff --git a/engine/gl/glquake.h b/engine/gl/glquake.h index 79c17a64..7cab0fe0 100644 --- a/engine/gl/glquake.h +++ b/engine/gl/glquake.h @@ -32,7 +32,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef WIN32_BLOATED #define WIN32_LEAN_AND_MEAN #endif -#include + +#ifndef _XBOX + #include +#endif #if defined(WINAPI_FAMILY) && !defined(WINRT) #if WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP diff --git a/engine/qclib/progsint.h b/engine/qclib/progsint.h index 640f0267..f0b22f89 100644 --- a/engine/qclib/progsint.h +++ b/engine/qclib/progsint.h @@ -17,8 +17,11 @@ //#define AVAIL_ZLIB #endif #endif - +#ifndef _XBOX #include +#else + #include +#endif #else #include #include diff --git a/engine/xdk/FTEQW_XDK.sln b/engine/xdk/FTEQW_XDK.sln new file mode 100644 index 00000000..a14d24c0 --- /dev/null +++ b/engine/xdk/FTEQW_XDK.sln @@ -0,0 +1,30 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FTEQW_XDK", "FTEQW_XDK.vcproj", "{BF8776BA-CCAB-4B5F-AE88-784B2215C589}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Profile = Profile + Profile_FastCap = Profile_FastCap + Release = Release + Release_LTCG = Release_LTCG + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {BF8776BA-CCAB-4B5F-AE88-784B2215C589}.Debug.ActiveCfg = Debug|Xbox + {BF8776BA-CCAB-4B5F-AE88-784B2215C589}.Debug.Build.0 = Debug|Xbox + {BF8776BA-CCAB-4B5F-AE88-784B2215C589}.Profile.ActiveCfg = Profile|Xbox + {BF8776BA-CCAB-4B5F-AE88-784B2215C589}.Profile.Build.0 = Profile|Xbox + {BF8776BA-CCAB-4B5F-AE88-784B2215C589}.Profile_FastCap.ActiveCfg = Profile_FastCap|Xbox + {BF8776BA-CCAB-4B5F-AE88-784B2215C589}.Profile_FastCap.Build.0 = Profile_FastCap|Xbox + {BF8776BA-CCAB-4B5F-AE88-784B2215C589}.Release.ActiveCfg = Release|Xbox + {BF8776BA-CCAB-4B5F-AE88-784B2215C589}.Release.Build.0 = Release|Xbox + {BF8776BA-CCAB-4B5F-AE88-784B2215C589}.Release_LTCG.ActiveCfg = Release_LTCG|Xbox + {BF8776BA-CCAB-4B5F-AE88-784B2215C589}.Release_LTCG.Build.0 = Release_LTCG|Xbox + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/engine/xdk/FTEQW_XDK.suo b/engine/xdk/FTEQW_XDK.suo new file mode 100644 index 00000000..b434171a Binary files /dev/null and b/engine/xdk/FTEQW_XDK.suo differ diff --git a/engine/xdk/FTEQW_XDK.vcproj b/engine/xdk/FTEQW_XDK.vcproj new file mode 100644 index 00000000..b7f5f3e7 --- /dev/null +++ b/engine/xdk/FTEQW_XDK.vcproj @@ -0,0 +1,670 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +