From 6d8e3b01a940f913e19f3eab6deb5be7d313dbaa Mon Sep 17 00:00:00 2001 From: Spoike Date: Wed, 11 Aug 2010 23:55:35 +0000 Subject: [PATCH] Can jump through hexen2 windows now, changing h2 classes no longer kills the server. Provided Sys_EnumerateFiles for win32+unix targets, other targets will now spam warnings, as its kinda needed for fs_cache (which is default). git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3578 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/client.h | 1 + engine/client/in_sdl.c | 11 +- engine/client/in_win.c | 1 - engine/client/input.h | 3 + engine/client/sys_sdl.c | 152 +++++++- engine/common/fs.c | 2 +- engine/ftequake/ftequake.dsp | 698 +++++++++++++++++++++++++++++++++-- engine/gl/gl_vidnt.c | 2 + engine/gl/gl_vidsdl.c | 12 +- engine/server/pr_cmds.c | 5 + engine/server/server.h | 4 +- engine/server/sv_phys.c | 6 +- engine/server/sv_user.c | 39 +- engine/server/svhl_phys.c | 4 +- 14 files changed, 867 insertions(+), 73 deletions(-) diff --git a/engine/client/client.h b/engine/client/client.h index 101ebd487..f3debcd32 100644 --- a/engine/client/client.h +++ b/engine/client/client.h @@ -1028,6 +1028,7 @@ void CSQC_WorldLoaded(void); qboolean CSQC_ParseTempEntity(unsigned char firstbyte); qboolean CSQC_ConsoleCommand(char *cmd); qboolean CSQC_KeyPress(int key, int unicode, qboolean down); +qboolean CSQC_MouseMove(float xdelta, float ydelta); int CSQC_StartSound(int entnum, int channel, char *soundname, vec3_t pos, float vol, float attenuation); void CSQC_ParseEntities(void); qboolean CSQC_SettingListener(void); diff --git a/engine/client/in_sdl.c b/engine/client/in_sdl.c index 6445f885a..73661c882 100644 --- a/engine/client/in_sdl.c +++ b/engine/client/in_sdl.c @@ -228,11 +228,6 @@ int mouse_x, mouse_y; void ResetFrameBuffers(void); #endif -#ifdef RGLQUAKE -extern int glwidth; -extern int glheight; -#endif - void Sys_SendKeyEvents(void) { SDL_Event event; @@ -251,10 +246,10 @@ void Sys_SendKeyEvents(void) case SDL_VIDEORESIZE: switch(qrenderer) { -#ifdef RGLQUAKE +#ifdef GLQUAKE case QR_OPENGL: - glwidth = event.resize.w; - glheight = event.resize.h; + vid.pixelwidth = event.resize.w; + vid.pixelheight = event.resize.h; break; #endif #ifdef SWQUAKE diff --git a/engine/client/in_win.c b/engine/client/in_win.c index db2014429..a3d9c48cf 100644 --- a/engine/client/in_win.c +++ b/engine/client/in_win.c @@ -63,7 +63,6 @@ cvar_t m_threshold_noforce = SCVAR("m_threshold_noforce", "0"); cvar_t cl_keypad = SCVAR("cl_keypad", "0"); -qboolean CSQC_MouseMove(float xdelta, float ydelta); qboolean Key_MouseShouldBeFree(void); typedef struct { diff --git a/engine/client/input.h b/engine/client/input.h index 29ee743ea..c39eac3b3 100644 --- a/engine/client/input.h +++ b/engine/client/input.h @@ -40,3 +40,6 @@ void IN_Accumulate (void); extern cvar_t in_xflip; #endif +/*semi-common, so lets prototype on all*/ +void IN_ActivateMouse(void); +void IN_DeactivateMouse(void); \ No newline at end of file diff --git a/engine/client/sys_sdl.c b/engine/client/sys_sdl.c index a2afe009e..ad6b07233 100644 --- a/engine/client/sys_sdl.c +++ b/engine/client/sys_sdl.c @@ -10,6 +10,8 @@ #ifndef WIN32 #include +#else +#include #endif #ifndef isDedicated @@ -126,10 +128,154 @@ void Sys_Quit (void) //enumerate the files in a directory (of both gpath and match - match may not contain ..) //calls the callback for each one until the callback returns 0 //SDL provides no file enumeration facilities. +#if defined(_WIN32) +#include int Sys_EnumerateFiles (const char *gpath, const char *match, int (*func)(const char *, int, void *), void *parm) { - return 1; + HANDLE r; + WIN32_FIND_DATA fd; + char apath[MAX_OSPATH]; + char apath2[MAX_OSPATH]; + char file[MAX_OSPATH]; + char *s; + int go; + if (!gpath) + return 0; +// strcpy(apath, match); + Q_snprintfz(apath, sizeof(apath), "%s/%s", gpath, match); + for (s = apath+strlen(apath)-1; s> apath; s--) + { + if (*s == '/') + break; + } + *s = '\0'; + + //this is what we ask windows for. + Q_snprintfz(file, sizeof(file), "%s/*.*", apath); + + //we need to make apath contain the path in match but not gpath + Q_strncpyz(apath2, match, sizeof(apath)); + match = s+1; + for (s = apath2+strlen(apath2)-1; s> apath2; s--) + { + if (*s == '/') + break; + } + *s = '\0'; + if (s != apath2) + strcat(apath2, "/"); + + r = FindFirstFile(file, &fd); + if (r==(HANDLE)-1) + return 1; + go = true; + do + { + if (*fd.cFileName == '.'); //don't ever find files with a name starting with '.' + else if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) //is a directory + { + if (wildcmp(match, fd.cFileName)) + { + Q_snprintfz(file, sizeof(file), "%s%s/", apath2, fd.cFileName); + go = func(file, fd.nFileSizeLow, parm); + } + } + else + { + if (wildcmp(match, fd.cFileName)) + { + Q_snprintfz(file, sizeof(file), "%s%s", apath2, fd.cFileName); + go = func(file, fd.nFileSizeLow, parm); + } + } + } + while(FindNextFile(r, &fd) && go); + FindClose(r); + + return go; } +#elif defined(linux) || defined(__unix__) +#include +int Sys_EnumerateFiles (const char *gpath, const char *match, int (*func)(const char *, int, void *), void *parm) +{ + DIR *dir; + char apath[MAX_OSPATH]; + char file[MAX_OSPATH]; + char truepath[MAX_OSPATH]; + char *s; + struct dirent *ent; + struct stat st; + +//printf("path = %s\n", gpath); +//printf("match = %s\n", match); + + if (!gpath) + gpath = ""; + *apath = '\0'; + + Q_strncpyz(apath, match, sizeof(apath)); + for (s = apath+strlen(apath)-1; s >= apath; s--) + { + if (*s == '/') + { + s[1] = '\0'; + match += s - apath+1; + break; + } + } + if (s < apath) //didn't find a '/' + *apath = '\0'; + + Q_snprintfz(truepath, sizeof(truepath), "%s/%s", gpath, apath); + + +//printf("truepath = %s\n", truepath); +//printf("gamepath = %s\n", gpath); +//printf("apppath = %s\n", apath); +//printf("match = %s\n", match); + dir = opendir(truepath); + if (!dir) + { + Con_DPrintf("Failed to open dir %s\n", truepath); + return true; + } + do + { + ent = readdir(dir); + if (!ent) + break; + if (*ent->d_name != '.') + { + if (wildcmp(match, ent->d_name)) + { + Q_snprintfz(file, sizeof(file), "%s/%s", truepath, ent->d_name); + + if (stat(file, &st) == 0) + { + Q_snprintfz(file, sizeof(file), "%s%s%s", apath, ent->d_name, S_ISDIR(st.st_mode)?"/":""); + + if (!func(file, st.st_size, parm)) + { + closedir(dir); + return false; + } + } + else + printf("Stat failed for \"%s\"\n", file); + } + } + } while(1); + closedir(dir); + + return true; +} +#else +int Sys_EnumerateFiles (const char *gpath, const char *match, int (*func)(const char *, int, void *), void *parm) +{ + Con_Printf("Warning: Sys_EnumerateFiles not implemented\n"); + return false; +} +#endif //blink window if possible (it's not) void Sys_ServerActivity(void) @@ -177,7 +323,7 @@ void *Sys_GetGameAPI (void *parms) void *(*GetGameAPI)(void *); dllfunction_t funcs[] = { - {(void**)GetGameAPI, "GetGameAPI"}, + {(void**)&GetGameAPI, "GetGameAPI"}, {NULL,NULL} }; @@ -249,7 +395,7 @@ int VARGS Sys_DebugLog(char *file, char *fmt, ...) static char data[1024]; va_start(argptr, fmt); - _vsnprintf(data, sizeof(data)-1, fmt, argptr); + vsnprintf(data, sizeof(data)-1, fmt, argptr); va_end(argptr); #if defined(CRAZYDEBUGGING) && CRAZYDEBUGGING > 1 diff --git a/engine/common/fs.c b/engine/common/fs.c index 9ef2794e9..7a35d8bf9 100644 --- a/engine/common/fs.c +++ b/engine/common/fs.c @@ -2196,11 +2196,11 @@ qboolean Sys_FindGameData(const char *poshname, const char *gamename, char *base SDL_SysWMinfo wmInfo; SDL_GetWMInfo(&wmInfo); HWND sys_parentwindow = wmInfo.window; - #endif if (sys_parentwindow) bi.hwndOwner = sys_parentwindow; //note that this is usually still null else + #endif bi.hwndOwner = mainwindow; //note that this is usually still null bi.pidlRoot = NULL; bi.pszDisplayName = resultpath; diff --git a/engine/ftequake/ftequake.dsp b/engine/ftequake/ftequake.dsp index 7ae5fb403..d6a9c08ab 100644 --- a/engine/ftequake/ftequake.dsp +++ b/engine/ftequake/ftequake.dsp @@ -4,7 +4,7 @@ # TARGTYPE "Win32 (x86) Application" 0x0101 -CFG=ftequake - Win32 D3DDebug +CFG=ftequake - Win32 GLSDLDebug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE @@ -13,7 +13,7 @@ CFG=ftequake - Win32 D3DDebug !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE -!MESSAGE NMAKE /f "ftequake.mak" CFG="ftequake - Win32 D3DDebug" +!MESSAGE NMAKE /f "ftequake.mak" CFG="ftequake - Win32 GLSDLDebug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE @@ -31,6 +31,7 @@ CFG=ftequake - Win32 D3DDebug !MESSAGE "ftequake - Win32 GLDebugQ3" (based on "Win32 (x86) Application") !MESSAGE "ftequake - Win32 Debug Dedicated ServerQ3" (based on "Win32 (x86) Application") !MESSAGE "ftequake - Win32 D3DDebug" (based on "Win32 (x86) Application") +!MESSAGE "ftequake - Win32 GLSDLDebug" (based on "Win32 (x86) Application") !MESSAGE # Begin Project @@ -434,6 +435,37 @@ LINK32=link.exe # ADD LINK32 comctl32.lib wsock32.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /map /debug /machine:I386 /nodefaultlib:"msvcrt.lib" /out:"../../fted3dqw_dbg.exe" /libpath:"../libs/dxsdk7/lib" # SUBTRACT LINK32 /pdb:none +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "ftequake___Win32_GLSDLDebug" +# PROP BASE Intermediate_Dir "ftequake___Win32_GLSDLDebug" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "ftequake___Win32_GLSDLDebug" +# PROP Intermediate_Dir "ftequake___Win32_GLSDLDebug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G5 /MT /W3 /GX /ZI /Od /I "..\client" /I "../libs/freetype2/include" /I "../common" /I "../server" /I "../gl" /I "../sw" /I "../qclib" /I "../libs" /I "../libs/dxsdk7/include" /D "_DEBUG" /D "GLQUAKE" /D "WIN32" /D "_WINDOWS" /FR".\GLDebug/" /Fp".\GLDebug/qwcl.pch" /Yu"quakedef.h" /Fo".\GLDebug/" /Fd".\GLDebug/" /FD /c +# SUBTRACT BASE CPP /X +# ADD CPP /nologo /G5 /MD /W3 /GX /ZI /Od /I "..\client" /I "../libs/freetype2/include" /I "../common" /I "../server" /I "../gl" /I "../sw" /I "../qclib" /I "../libs" /I "../libs/dxsdk7/include" /D "_DEBUG" /D "GLQUAKE" /D "WIN32" /D "_WINDOWS" /D "_SDL" /FR".\GLDebug/" /Fp".\GLDebug/qwcl.pch" /Yu"quakedef.h" /Fo".\GLDebug/" /Fd".\GLDebug/" /FD /c +# SUBTRACT CPP /X +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 comctl32.lib wsock32.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /map /debug /machine:I386 /nodefaultlib:"msvcrt.lib" /out:"../../fteglqwvc6.exe" /libpath:"../libs/dxsdk7/lib" +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 comctl32.lib wsock32.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib sdl.lib sdlmain.lib /nologo /subsystem:windows /map /debug /machine:I386 /nodefaultlib:"libcmt" /out:"../../fteglqw_sdl.exe" /libpath:"../libs/dxsdk7/lib" +# SUBTRACT LINK32 /pdb:none + !ENDIF # Begin Target @@ -452,6 +484,7 @@ LINK32=link.exe # Name "ftequake - Win32 GLDebugQ3" # Name "ftequake - Win32 Debug Dedicated ServerQ3" # Name "ftequake - Win32 D3DDebug" +# Name "ftequake - Win32 GLSDLDebug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" @@ -637,6 +670,11 @@ SOURCE=..\server\svq3_game.c # ADD CPP /Yu"qwsvdef.h" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# ADD BASE CPP /Yu"qwsvdef.h" +# ADD CPP /Yu"qwsvdef.h" + !ENDIF # End Source File @@ -684,6 +722,8 @@ SOURCE=..\client\cd_win.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -727,6 +767,8 @@ SOURCE=..\client\cl_cam.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -776,6 +818,8 @@ SOURCE=..\client\cl_cg.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -819,6 +863,8 @@ SOURCE=..\client\cl_demo.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -862,6 +908,8 @@ SOURCE=..\client\cl_ents.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -901,6 +949,8 @@ SOURCE=..\client\cl_ignore.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -944,6 +994,8 @@ SOURCE=..\client\cl_input.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -987,6 +1039,8 @@ SOURCE=..\client\cl_main.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -1030,6 +1084,8 @@ SOURCE=..\client\cl_parse.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -1073,6 +1129,8 @@ SOURCE=..\client\cl_pred.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -1116,6 +1174,8 @@ SOURCE=..\client\cl_screen.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -1159,6 +1219,8 @@ SOURCE=..\client\cl_tent.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -1202,6 +1264,8 @@ SOURCE=..\client\cl_ui.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -1241,6 +1305,8 @@ SOURCE=..\client\clhl_game.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -1286,6 +1352,8 @@ SOURCE=..\client\clq2_cin.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -1331,6 +1399,8 @@ SOURCE=..\client\clq2_ents.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -1380,6 +1450,8 @@ SOURCE=..\client\clq3_parse.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -1423,6 +1495,8 @@ SOURCE=..\client\console.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -1466,6 +1540,8 @@ SOURCE=..\client\fragstats.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -1509,11 +1585,17 @@ SOURCE=..\client\image.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File # Begin Source File +SOURCE=..\client\in_sdl.c +# End Source File +# Begin Source File + SOURCE=..\client\in_win.c !IF "$(CFG)" == "ftequake - Win32 Release" @@ -1552,6 +1634,8 @@ SOURCE=..\client\in_win.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -1595,6 +1679,8 @@ SOURCE=..\client\keys.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -1637,6 +1723,8 @@ SOURCE=..\client\m_download.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -1680,6 +1768,8 @@ SOURCE=..\client\m_items.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -1725,6 +1815,8 @@ SOURCE=..\client\m_master.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -1768,6 +1860,8 @@ SOURCE=..\client\m_mp3.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -1811,6 +1905,8 @@ SOURCE=..\client\m_multi.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -1854,6 +1950,8 @@ SOURCE=..\client\m_options.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -1897,6 +1995,8 @@ SOURCE=..\client\m_script.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -1940,6 +2040,8 @@ SOURCE=..\client\m_single.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -1983,6 +2085,8 @@ SOURCE=..\client\menu.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -2028,6 +2132,8 @@ SOURCE=..\client\net_master.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -2069,6 +2175,8 @@ SOURCE=..\client\p_classic.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -2110,6 +2218,8 @@ SOURCE=..\client\p_null.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -2149,6 +2259,8 @@ SOURCE=..\client\p_qmb.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -2190,6 +2302,8 @@ SOURCE=..\client\p_script.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -2234,6 +2348,8 @@ SOURCE=..\client\pr_csqc.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -2281,6 +2397,8 @@ SOURCE=..\client\pr_menu.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -2324,6 +2442,8 @@ SOURCE=..\client\r_bulleten.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -2367,6 +2487,8 @@ SOURCE=..\client\r_part.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -2437,6 +2559,11 @@ SOURCE=..\client\r_partset.c # SUBTRACT BASE CPP /YX /Yc /Yu # SUBTRACT CPP /YX /Yc /Yu +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + !ENDIF # End Source File @@ -2480,6 +2607,8 @@ SOURCE=..\client\renderer.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -2523,6 +2652,8 @@ SOURCE=..\client\renderque.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -2568,6 +2699,8 @@ SOURCE=..\client\roq_read.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -2611,6 +2744,8 @@ SOURCE=..\client\sbar.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -2654,6 +2789,8 @@ SOURCE=..\client\skin.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -2696,6 +2833,8 @@ SOURCE=..\client\snd_directx.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -2739,6 +2878,8 @@ SOURCE=..\client\snd_dma.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -2782,6 +2923,8 @@ SOURCE=..\client\snd_mem.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -2825,6 +2968,8 @@ SOURCE=..\client\snd_mix.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -2868,11 +3013,17 @@ SOURCE=..\client\snd_ov.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File # Begin Source File +SOURCE=..\client\snd_sdl.c +# End Source File +# Begin Source File + SOURCE=..\client\snd_win.c !IF "$(CFG)" == "ftequake - Win32 Release" @@ -2911,23 +3062,213 @@ SOURCE=..\client\snd_win.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File # Begin Source File SOURCE=..\client\sys_linux.c + +!IF "$(CFG)" == "ftequake - Win32 Release" + # PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated ServerQ3" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File # Begin Source File SOURCE=..\client\sys_morphos.c + +!IF "$(CFG)" == "ftequake - Win32 Release" + # PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated ServerQ3" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File # Begin Source File SOURCE=..\client\sys_sdl.c + +!IF "$(CFG)" == "ftequake - Win32 Release" + # PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated ServerQ3" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 + +!ENDIF + # End Source File # Begin Source File @@ -2969,6 +3310,10 @@ SOURCE=..\client\sys_win.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -3012,6 +3357,8 @@ SOURCE=..\client\teamplay.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -3055,6 +3402,8 @@ SOURCE=..\client\textedit.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -3098,6 +3447,8 @@ SOURCE=..\client\valid.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -3141,6 +3492,8 @@ SOURCE=..\client\view.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -3184,6 +3537,8 @@ SOURCE=..\client\wad.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -3229,6 +3584,8 @@ SOURCE=..\client\zqtp.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -3298,6 +3655,11 @@ SOURCE=..\gl\doomclip.c # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -3344,6 +3706,8 @@ SOURCE=..\gl\gl_alias.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -3390,6 +3754,8 @@ SOURCE=..\gl\gl_backend.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -3429,6 +3795,8 @@ SOURCE=..\gl\gl_bloom.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -3475,6 +3843,8 @@ SOURCE=..\gl\gl_draw.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -3547,6 +3917,11 @@ SOURCE=..\gl\gltod3d\gl_fakegl.cpp # SUBTRACT BASE CPP /YX /Yc /Yu # SUBTRACT CPP /YX /Yc /Yu +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + !ENDIF # End Source File @@ -3557,37 +3932,6 @@ SOURCE=..\gl\gl_font.c # Begin Source File SOURCE=..\gl\gl_glsl.c - -!IF "$(CFG)" == "ftequake - Win32 Release" - -!ELSEIF "$(CFG)" == "ftequake - Win32 Debug" - -!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug" - -!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease" - -!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug" - -!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease" - -!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug" - -!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease" - -!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server" - -!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server" - -!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW" - -!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3" - -!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated ServerQ3" - -!ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" - -!ENDIF - # End Source File # Begin Source File @@ -3623,6 +3967,8 @@ SOURCE=..\gl\gl_heightmap.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -3671,6 +4017,8 @@ SOURCE=..\gl\gl_hlmdl.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -3717,6 +4065,8 @@ SOURCE=..\gl\gl_model.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -3763,6 +4113,8 @@ SOURCE=..\gl\gl_ngraph.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -3800,6 +4152,8 @@ SOURCE=..\common\gl_q2bsp.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -3846,6 +4200,8 @@ SOURCE=..\gl\gl_rlight.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -3892,6 +4248,8 @@ SOURCE=..\gl\gl_rmain.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -3938,6 +4296,8 @@ SOURCE=..\gl\gl_rmisc.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -3984,6 +4344,8 @@ SOURCE=..\gl\gl_rsurf.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -4030,6 +4392,8 @@ SOURCE=..\gl\gl_screen.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -4067,6 +4431,8 @@ SOURCE=..\gl\gl_shader.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -4117,6 +4483,8 @@ SOURCE=..\gl\gl_vidcommon.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -4163,11 +4531,19 @@ SOURCE=..\gl\gl_vidnt.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP Exclude_From_Build 1 + !ENDIF # End Source File # Begin Source File +SOURCE=..\gl\gl_vidsdl.c +# End Source File +# Begin Source File + SOURCE=..\gl\gl_warp.c !IF "$(CFG)" == "ftequake - Win32 Release" @@ -4209,6 +4585,8 @@ SOURCE=..\gl\gl_warp.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -4257,6 +4635,8 @@ SOURCE=..\gl\glmod_doom.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -4305,6 +4685,8 @@ SOURCE=..\gl\LTFACE.C !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -4368,6 +4750,41 @@ SOURCE=..\common\fs_stdio.c # Begin Source File SOURCE=..\common\fs_win32.c + +!IF "$(CFG)" == "ftequake - Win32 Release" + +!ELSEIF "$(CFG)" == "ftequake - Win32 Debug" + +!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug" + +!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease" + +!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug" + +!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease" + +!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug" + +!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease" + +!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server" + +!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server" + +!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW" + +!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3" + +!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated ServerQ3" + +!ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" + +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File # Begin Source File @@ -4458,6 +4875,8 @@ SOURCE=..\common\q3common.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -4789,6 +5208,28 @@ BuildCmds= \ copy "$(InputPath)" "$(InputDir)\execloop32d.h" \ +"$(InputDir)\execloop16d.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + +"$(InputDir)\execloop32.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + +"$(InputDir)\execloop32d.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) +# End Custom Build + +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# Begin Custom Build +InputDir=\Games\Quake\wip\engine\qclib +InputPath=..\qclib\execloop.h + +BuildCmds= \ + copy "$(InputPath)" "$(InputDir)\execloop16d.h" \ + copy "$(InputPath)" "$(InputDir)\execloop32.h" \ + copy "$(InputPath)" "$(InputDir)\execloop32d.h" \ + + "$(InputDir)\execloop16d.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" $(BuildCmds) @@ -4905,6 +5346,11 @@ SOURCE=..\QCLIB\qcc_pr_comp.c # SUBTRACT BASE CPP /YX /Yc /Yu # SUBTRACT CPP /YX /Yc /Yu +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + !ENDIF # End Source File @@ -4971,6 +5417,11 @@ SOURCE=..\QCLIB\qcc_pr_lex.c # SUBTRACT BASE CPP /YX /Yc /Yu # SUBTRACT CPP /YX /Yc /Yu +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + !ENDIF # End Source File @@ -5037,6 +5488,11 @@ SOURCE=..\QCLIB\QccMain.c # SUBTRACT BASE CPP /YX /Yc /Yu # SUBTRACT CPP /YX /Yc /Yu +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + !ENDIF # End Source File @@ -5108,6 +5564,11 @@ SOURCE=..\QCLIB\qcdecomp.c # SUBTRACT BASE CPP /YX /Yc /Yu # SUBTRACT CPP /YX /Yc /Yu +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + !ENDIF # End Source File @@ -5330,6 +5791,21 @@ InputName=math # End Custom Build +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# Begin Custom Build +OutDir=.\ftequake___Win32_GLSDLDebug +InputPath=..\common\math.s +InputName=math + +"$(OUTDIR)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + cl /EP /I ..\common $(InputPath) > $(OUTDIR)\$(InputName).spp + ..\gas2masm\debug\gas2masm < $(OUTDIR)\$(InputName).spp > $(OUTDIR)\$(InputName).asm + ml /c /Cp /coff /Fo$(OUTDIR)\$(InputName).obj /Zm /Zi $(OUTDIR)\$(InputName).asm + del $(OUTDIR)\$(InputName).spp + +# End Custom Build + !ENDIF # End Source File @@ -5517,6 +5993,21 @@ InputName=snd_mixa # End Custom Build +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# Begin Custom Build +OutDir=.\ftequake___Win32_GLSDLDebug +InputPath=..\client\snd_mixa.s +InputName=snd_mixa + +"$(OUTDIR)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + cl /EP /I ..\common > $(OUTDIR)\$(InputName).spp $(InputPath) + ..\gas2masm\debug\gas2masm < $(OUTDIR)\$(InputName).spp > $(OUTDIR)\$(InputName).asm + ml /c /Cp /coff /Fo$(OUTDIR)\$(InputName).obj /Zm /Zi $(OUTDIR)\$(InputName).asm + del $(OUTDIR)\$(InputName).spp + +# End Custom Build + !ENDIF # End Source File @@ -5704,6 +6195,10 @@ InputName=sys_wina # End Custom Build +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -5922,6 +6417,21 @@ InputName=worlda # End Custom Build +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# Begin Custom Build +OutDir=.\ftequake___Win32_GLSDLDebug +InputPath=..\server\worlda.s +InputName=worlda + +"$(OUTDIR)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + cl /EP /I ..\common $(InputPath) > $(OUTDIR)\$(InputName).spp + ..\gas2masm\debug\gas2masm < $(OUTDIR)\$(InputName).spp > $(OUTDIR)\$(InputName).asm + ml /c /Cp /coff /Fo$(OUTDIR)\$(InputName).obj /Zm /Zi $(OUTDIR)\$(InputName).asm + del $(OUTDIR)\$(InputName).spp + +# End Custom Build + !ENDIF # End Source File @@ -5963,6 +6473,8 @@ SOURCE=..\http\ftpclient.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -6000,6 +6512,8 @@ SOURCE=..\http\ftpserver.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -6037,6 +6551,8 @@ SOURCE=..\http\httpclient.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -6074,6 +6590,8 @@ SOURCE=..\http\httpserver.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -6120,6 +6638,8 @@ SOURCE=..\http\webgen.c !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -6189,6 +6709,11 @@ SOURCE=..\sndcodec\g711.c # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -6254,6 +6779,11 @@ SOURCE=..\sndcodec\g721.c # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -6319,6 +6849,11 @@ SOURCE=..\sndcodec\g723_24.c # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -6384,6 +6919,11 @@ SOURCE=..\sndcodec\g723_40.c # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -6449,6 +6989,11 @@ SOURCE=..\sndcodec\g72x.c # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -6514,6 +7059,11 @@ SOURCE=..\sndcodec\snd_vc.c # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -6579,6 +7129,11 @@ SOURCE=..\sndcodec\snd_voicecodecs.c # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -6644,6 +7199,11 @@ SOURCE=..\sndcodec\voicechat.h # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -6715,6 +7275,11 @@ SOURCE=..\server\sv_sys_win.c # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -6782,6 +7347,11 @@ SOURCE=..\server\svmodel.c # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -6826,6 +7396,8 @@ SOURCE=..\client\winquake.rc !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + !ENDIF # End Source File @@ -6963,6 +7535,11 @@ SOURCE=..\..\mp3\libmad\bit.c # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -7036,6 +7613,11 @@ SOURCE=..\..\mp3\libmad\decoder.c # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -7109,6 +7691,11 @@ SOURCE=..\..\mp3\libmad\fixed.c # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -7182,6 +7769,11 @@ SOURCE=..\..\mp3\libmad\frame.c # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -7255,6 +7847,11 @@ SOURCE=..\..\mp3\libmad\huffman.c # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -7328,6 +7925,11 @@ SOURCE=..\..\mp3\libmad\layer12.c # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -7401,6 +8003,11 @@ SOURCE=..\..\mp3\libmad\layer3.c # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -7474,6 +8081,11 @@ SOURCE=..\client\mymad.c # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -7547,6 +8159,11 @@ SOURCE=..\..\mp3\libmad\stream.c # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -7620,6 +8237,11 @@ SOURCE=..\..\mp3\libmad\synth.c # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -7693,6 +8315,11 @@ SOURCE=..\..\mp3\libmad\timer.c # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + !ENDIF # End Source File @@ -7766,6 +8393,11 @@ SOURCE=..\..\mp3\libmad\version.c # PROP BASE Exclude_From_Build 1 # PROP Exclude_From_Build 1 +!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + !ENDIF # End Source File diff --git a/engine/gl/gl_vidnt.c b/engine/gl/gl_vidnt.c index a3f1f865f..c36fc5f62 100644 --- a/engine/gl/gl_vidnt.c +++ b/engine/gl/gl_vidnt.c @@ -352,6 +352,7 @@ qboolean VID_SetWindowedMode (rendererstate_t *info) WindowRect.bottom = info->height; +#ifndef _SDL if (sys_parentwindow) { SetWindowLong(sys_parentwindow, GWL_STYLE, GetWindowLong(sys_parentwindow, GWL_STYLE)|WS_OVERLAPPED); @@ -373,6 +374,7 @@ qboolean VID_SetWindowedMode (rendererstate_t *info) WindowRect.bottom += WindowRect.top; } else +#endif { WindowStyle = WS_OVERLAPPED | WS_BORDER | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX; diff --git a/engine/gl/gl_vidsdl.c b/engine/gl/gl_vidsdl.c index 66091e4b2..deda54650 100644 --- a/engine/gl/gl_vidsdl.c +++ b/engine/gl/gl_vidsdl.c @@ -9,9 +9,6 @@ extern cvar_t vid_hardwaregamma; extern cvar_t gl_lateswap; extern int gammaworks; -int glwidth; -int glheight; - #ifdef _WIN32 //half the rest of the code uses windows apis to focus windows. Should be fixed, but it's not too important. HWND mainwindow; #endif @@ -67,10 +64,10 @@ Con_Printf("Getting gamma\n"); flags = SDL_RESIZABLE; vid_isfullscreen = false; } - sdlsurf = SDL_SetVideoMode(glwidth=info->width, glheight=info->height, info->bpp, flags | SDL_OPENGL); + sdlsurf = SDL_SetVideoMode(vid.pixelwidth=info->width, vid.pixelheight=info->height, info->bpp, flags | SDL_OPENGL); if (!sdlsurf) { - Con_Printf(stderr, "Couldn't set GL mode: %s\n", SDL_GetError()); + Con_Printf("Couldn't set GL mode: %s\n", SDL_GetError()); return false; } @@ -81,7 +78,7 @@ Con_Printf("Getting gamma\n"); GLVID_SetPalette (palette); GL_Init(SDL_GL_GetProcAddress); - qglViewport (0, 0, glwidth, glheight); + qglViewport (0, 0, vid.pixelwidth, vid.pixelheight); mouseactive = false; if (vid_isfullscreen) @@ -104,9 +101,6 @@ void GLVID_DeInit (void) void GL_BeginRendering (void) { - vid.pixelwidth = glwidth; - vid.pixelheight = glheight; - // if (!wglMakeCurrent( maindc, baseRC )) // Sys_Error ("wglMakeCurrent failed"); diff --git a/engine/server/pr_cmds.c b/engine/server/pr_cmds.c index ad35283b9..d8ec0f040 100644 --- a/engine/server/pr_cmds.c +++ b/engine/server/pr_cmds.c @@ -6909,6 +6909,11 @@ void PRH2_SetPlayerClass(client_t *cl, int classnum, qboolean fromqc) return; //reject it (it would crash the (standard hexen2) mod) if (classnum > 5) return; + + /*ignore it if they already have a class, this fixes some h2mp crashes*/ + if (cl->playerclass) + return; + if (cl->playerclass != classnum) { cl->edict->xv->playerclass = classnum; diff --git a/engine/server/server.h b/engine/server/server.h index 37d73c0e4..dffedaeac 100644 --- a/engine/server/server.h +++ b/engine/server/server.h @@ -787,8 +787,8 @@ typedef struct #define MOVETYPE_BOUNCE 10 #define MOVETYPE_BOUNCEMISSILE 11 // bounce w/o gravity #define MOVETYPE_FOLLOW 12 // track movement of aiment -#define MOVETYPE_PUSHPULL 13 // pushable/pullable object -#define MOVETYPE_SWIM 14 // should keep the object in water +#define MOVETYPE_H2PUSHPULL 13 // pushable/pullable object +#define MOVETYPE_H2SWIM 14 // should keep the object in water #define MOVETYPE_PHYSICS 32 // edict->solid values diff --git a/engine/server/sv_phys.c b/engine/server/sv_phys.c index 683377c2e..37bc869bd 100644 --- a/engine/server/sv_phys.c +++ b/engine/server/sv_phys.c @@ -1103,7 +1103,7 @@ static void SV_Physics_Toss (edict_t *ent) if (ent->v->movetype != MOVETYPE_FLY && ent->v->movetype != MOVETYPE_FLYMISSILE && ent->v->movetype != MOVETYPE_BOUNCEMISSILE - && ent->v->movetype != MOVETYPE_SWIM) + && ent->v->movetype != MOVETYPE_H2SWIM) SV_AddGravity (ent, 1.0); // move angles @@ -1852,7 +1852,7 @@ void SV_RunEntity (edict_t *ent) SV_Physics_Noclip (ent); break; case MOVETYPE_STEP: - case MOVETYPE_PUSHPULL: + case MOVETYPE_H2PUSHPULL: SV_Physics_Step (ent); break; case MOVETYPE_FOLLOW: @@ -1863,7 +1863,7 @@ void SV_RunEntity (edict_t *ent) case MOVETYPE_BOUNCEMISSILE: case MOVETYPE_FLY: case MOVETYPE_FLYMISSILE: - case MOVETYPE_SWIM: + case MOVETYPE_H2SWIM: SV_Physics_Toss (ent); break; case MOVETYPE_WALK: diff --git a/engine/server/sv_user.c b/engine/server/sv_user.c index b264701a9..0b3f95bab 100644 --- a/engine/server/sv_user.c +++ b/engine/server/sv_user.c @@ -1604,8 +1604,8 @@ void SV_Begin_Core(client_t *split) } oh = host_client; - host_client = split; - sv_player = host_client->edict; + host_client = split; + sv_player = host_client->edict; SV_PreRunCmd(); { usercmd_t cmd; @@ -1619,7 +1619,7 @@ void SV_Begin_Core(client_t *split) } SV_PostRunCmd(); host_client = oh; - sv_player = host_client->edict; + sv_player = host_client->edict; } } } @@ -5295,19 +5295,36 @@ if (sv_player->v->health > 0 && before && !after ) continue; n = pmove.physents[pmove.touchindex[i]].info; ent = EDICT_NUM(svprogfuncs, n); - if (!ent->v->touch || (playertouch[n/8]&(1<<(n%8)))) + if (playertouch[n/8]&(1<<(n%8))) continue; - pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, ent); - pr_global_struct->other = EDICT_TO_PROG(svprogfuncs, sv_player); - pr_global_struct->time = sv.time; + if (ent->v->touch) + { + pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, ent); + pr_global_struct->other = EDICT_TO_PROG(svprogfuncs, sv_player); + pr_global_struct->time = sv.time; #ifdef VM_Q1 - if (svs.gametype == GT_Q1QVM) - Q1QVM_Touch(); - else + if (svs.gametype == GT_Q1QVM) + Q1QVM_Touch(); + else #endif - PR_ExecuteProgram (svprogfuncs, ent->v->touch); + PR_ExecuteProgram (svprogfuncs, ent->v->touch); + } playertouch[n/8] |= 1 << (n%8); + + if (sv_player->v->touch && !ent->isfree) + { + pr_global_struct->other = EDICT_TO_PROG(svprogfuncs, ent); + pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, sv_player); + pr_global_struct->time = sv.time; +#ifdef VM_Q1 + if (svs.gametype == GT_Q1QVM) + Q1QVM_Touch(); + else +#endif + PR_ExecuteProgram (svprogfuncs, sv_player->v->touch); + } + } } diff --git a/engine/server/svhl_phys.c b/engine/server/svhl_phys.c index 4f4a324c4..3f97fcc31 100644 --- a/engine/server/svhl_phys.c +++ b/engine/server/svhl_phys.c @@ -1696,7 +1696,7 @@ void SVHL_RunEntity (hledict_t *ent) SVHL_Physics_Noclip (ent); break; case MOVETYPE_STEP: - case MOVETYPE_PUSHPULL: + case MOVETYPE_H2PUSHPULL: SVHL_Physics_Step (ent); break; case MOVETYPE_FOLLOW: @@ -1707,7 +1707,7 @@ void SVHL_RunEntity (hledict_t *ent) case MOVETYPE_BOUNCEMISSILE: case MOVETYPE_FLY: case MOVETYPE_FLYMISSILE: - case MOVETYPE_SWIM: + case MOVETYPE_H2SWIM: SVHL_Physics_Toss (ent); break; case MOVETYPE_WALK: