diff --git a/engine/client/r_2d.c b/engine/client/r_2d.c index 8e2a76830..d341157aa 100644 --- a/engine/client/r_2d.c +++ b/engine/client/r_2d.c @@ -251,6 +251,10 @@ void R2D_Init(void) Cvar_ForceCallback(&crosshair); Cvar_ForceCallback(&crosshaircolor); + +#ifdef PLUGINS + Plug_DrawReloadImages(); +#endif } mpic_t *R2D_SafeCachePic (char *path) diff --git a/engine/client/snd_sdl.c b/engine/client/snd_sdl.c index e8364c024..1c5edb121 100644 --- a/engine/client/snd_sdl.c +++ b/engine/client/snd_sdl.c @@ -70,7 +70,7 @@ static void SSDL_SetUnderWater(soundcardinfo_t *sc, qboolean uw) } -static void SSDL_Submit(soundcardinfo_t *sc) +static void SSDL_Submit(soundcardinfo_t *sc, int start, int end) { //SDL will call SSDL_Paint to paint when it's time, and the sound buffer is always there... } diff --git a/engine/common/fs.c b/engine/common/fs.c index d998d6b7a..642f61712 100644 --- a/engine/common/fs.c +++ b/engine/common/fs.c @@ -2274,7 +2274,8 @@ void COM_InitFilesystem (void) //use the game based on an exe name over the filesystem one (could easily have multiple fs path matches). for (i = 0; gamemode_info[i].argname; i++) { - if (strstr(com_argv[0], gamemode_info[i].exename)) + ev = strstr(com_argv[0], gamemode_info[i].exename); + if (ev && (!strchr(ev, '\\') && !strchr(ev, '/'))) gamenum = i; } //use the game based on an parameter over all else. diff --git a/engine/d3d/d3d_shader.c b/engine/d3d/d3d_shader.c index d58cd5217..cf2978d9a 100644 --- a/engine/d3d/d3d_shader.c +++ b/engine/d3d/d3d_shader.c @@ -2,6 +2,11 @@ #ifdef D3DQUAKE #include "shader.h" +#include "shader.h" +#if !defined(HMONITOR_DECLARED) && (WINVER < 0x0500) + #define HMONITOR_DECLARED + DECLARE_HANDLE(HMONITOR); +#endif #include extern LPDIRECT3DDEVICE9 pD3DDev9; diff --git a/engine/d3d/vid_d3d.c b/engine/d3d/vid_d3d.c index 0dc71a2cb..d45a4e619 100644 --- a/engine/d3d/vid_d3d.c +++ b/engine/d3d/vid_d3d.c @@ -1087,9 +1087,6 @@ static void (D3D9_Draw_Init) (void) } static void (D3D9_Draw_ReInit) (void) { -#ifdef PLUGINS - Plug_DrawReloadImages(); -#endif } static void (D3D9_R_Init) (void) diff --git a/engine/ftequake/ftequake.dsp b/engine/ftequake/ftequake.dsp index cc99ad4cc..dfb2c5b5a 100644 --- a/engine/ftequake/ftequake.dsp +++ b/engine/ftequake/ftequake.dsp @@ -166,7 +166,7 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /G5 /ML /W3 /GX /ZI /Od /I "..\client\gltod3d\sdk7\include" /I "..\client\gltod3d\D3DFrame" /I "..\dxsdk\sdk\inc" /I "..\scitech\include" /I "..\client" /D "NQPROT" /D "_DEBUG" /D "GLQUAKE" /D "SERVERDLL" /D "WIN32" /D "_WINDOWS" /FR".\GLDebug/" /Fp".\GLDebug/qwcl.pch" /YX /Fo".\GLDebug/" /Fd".\GLDebug/" /FD /c -# ADD CPP /nologo /G5 /W3 /Gi /GX /ZI /Od /I "..\client" /I "../libs/dxsdk9/include" /I "../d3d" /I "../d3d9" /I "../common" /I "../server" /I "../gl" /I "../sw" /I "../qclib" /I "../libs/vc6-libs" /I "../libs" /I "../libs/speex" /I "../libs/dxsdk7/include" /I "../libs/freetype2/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "GLQUAKE" /D "SWQUAKE" /D "USE_D3D" /D "D3DQUAKE" /Fr /Fp".\MDebug/qwcl.pch" /Yu"quakedef.h" /FD /c +# ADD CPP /nologo /G5 /MT /W3 /Gi /GX /ZI /Od /I "..\client" /I "../libs/dxsdk9/include" /I "../d3d" /I "../d3d9" /I "../common" /I "../server" /I "../gl" /I "../sw" /I "../qclib" /I "../libs/vc6-libs" /I "../libs" /I "../libs/speex" /I "../libs/dxsdk7/include" /I "../libs/freetype2/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "GLQUAKE" /D "SWQUAKE" /D "USE_D3D" /D "D3DQUAKE" /Fr /Fp".\MDebug/qwcl.pch" /Yu"quakedef.h" /FD /c # SUBTRACT CPP /WX # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 @@ -449,9 +449,9 @@ LINK32=link.exe # 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/sdl/include" /I "../libs/freetype2/include" /I "../common" /I "../server" /I "../gl" /I "../sw" /I "../qclib" /I "../libs/vc6-libs" /I "../libs" /I "../libs/speex" /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 +# ADD BASE CPP /nologo /G5 /MT /W3 /GX /ZI /Od /I "..\client" /I "../libs/sdl/include" /I "../libs/freetype2/include" /I "../common" /I "../server" /I "../gl" /I "../sw" /I "../qclib" /I "../libs/vc6-libs" /I "../libs" /I "../libs/speex" /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/sdl/include" /I "../libs/freetype2/include" /I "../common" /I "../server" /I "../gl" /I "../sw" /I "../qclib" /I "../libs/vc6-libs" /I "../libs" /I "../libs/speex" /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 +# ADD CPP /nologo /G5 /MD /W3 /GX /ZI /Od /I "..\client" /I "../libs/sdl/include" /I "../libs/freetype2/include" /I "../common" /I "../server" /I "../gl" /I "../sw" /I "../qclib" /I "../libs/vc6-libs" /I "../libs" /I "../libs/speex" /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 @@ -463,7 +463,7 @@ BSC32=bscmake.exe 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,../libs/vc6-libs" +# 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" /libpath:"../libs/vc6-libs" # SUBTRACT LINK32 /pdb:none !ENDIF @@ -2426,48 +2426,7 @@ SOURCE=..\client\pr_menu.c # End Source File # Begin Source File -SOURCE=..\client\r_bulleten.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" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server" - -# PROP BASE Exclude_From_Build 1 -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW" - -!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3" - -!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated ServerQ3" - -# PROP BASE Exclude_From_Build 1 -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" - -!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" - -!ENDIF - +SOURCE=..\client\r_d3.c # End Source File # Begin Source File @@ -2818,7 +2777,7 @@ SOURCE=..\client\skin.c # End Source File # Begin Source File -SOURCE=..\client\snd_directx.c +SOURCE=..\client\snd_al.c !IF "$(CFG)" == "ftequake - Win32 Release" @@ -2857,12 +2816,12 @@ SOURCE=..\client\snd_directx.c !ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" -!ENDIF +!ENDIF # End Source File # Begin Source File -SOURCE=..\client\snd_al.c +SOURCE=..\client\snd_directx.c !IF "$(CFG)" == "ftequake - Win32 Release" @@ -3963,83 +3922,6 @@ SOURCE=..\gl\gl_draw.c # End Source File # Begin Source File -SOURCE=..\gl\gltod3d\gl_fakegl.cpp - -!IF "$(CFG)" == "ftequake - Win32 Release" - -# SUBTRACT CPP /YX /Yc /Yu - -!ELSEIF "$(CFG)" == "ftequake - Win32 Debug" - -# SUBTRACT CPP /YX /Yc /Yu - -!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug" - -# SUBTRACT CPP /YX /Yc /Yu - -!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease" - -# SUBTRACT CPP /YX /Yc /Yu - -!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug" - -# SUBTRACT CPP /YX /Yc /Yu - -!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease" - -# SUBTRACT CPP /YX /Yc /Yu - -!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug" - -# SUBTRACT CPP /YX /Yc /Yu - -!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease" - -# SUBTRACT CPP /YX /Yc /Yu - -!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server" - -# PROP Exclude_From_Build 1 -# SUBTRACT CPP /YX /Yc /Yu - -!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server" - -# PROP BASE Exclude_From_Build 1 -# PROP Exclude_From_Build 1 -# SUBTRACT CPP /YX /Yc /Yu - -!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW" - -# PROP BASE Exclude_From_Build 1 -# PROP Exclude_From_Build 1 -# SUBTRACT CPP /YX /Yc /Yu - -!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3" - -# SUBTRACT CPP /YX /Yc /Yu - -!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated ServerQ3" - -# PROP BASE Exclude_From_Build 1 -# PROP Exclude_From_Build 1 -# SUBTRACT BASE CPP /YX /Yc /Yu -# SUBTRACT CPP /YX /Yc /Yu - -!ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" - -# 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 -# Begin Source File - SOURCE=..\gl\gl_font.c # End Source File # Begin Source File @@ -5083,7 +4965,7 @@ SOURCE=..\qclib\execloop.h !IF "$(CFG)" == "ftequake - Win32 Release" # Begin Custom Build -InputDir=\Games\Quake\wip\engine\qclib +InputDir=\ftetgcvs\wip\engine\qclib InputPath=..\qclib\execloop.h BuildCmds= \ @@ -5105,7 +4987,7 @@ BuildCmds= \ !ELSEIF "$(CFG)" == "ftequake - Win32 Debug" # Begin Custom Build -InputDir=\Games\Quake\wip\engine\qclib +InputDir=\ftetgcvs\wip\engine\qclib InputPath=..\qclib\execloop.h BuildCmds= \ @@ -5127,7 +5009,7 @@ BuildCmds= \ !ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug" # Begin Custom Build -InputDir=\Games\Quake\wip\engine\qclib +InputDir=\ftetgcvs\wip\engine\qclib InputPath=..\qclib\execloop.h BuildCmds= \ @@ -5149,7 +5031,7 @@ BuildCmds= \ !ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease" # Begin Custom Build -InputDir=\Games\Quake\wip\engine\qclib +InputDir=\ftetgcvs\wip\engine\qclib InputPath=..\qclib\execloop.h BuildCmds= \ @@ -5171,7 +5053,7 @@ BuildCmds= \ !ELSEIF "$(CFG)" == "ftequake - Win32 MDebug" # Begin Custom Build -InputDir=\Games\Quake\wip\engine\qclib +InputDir=\ftetgcvs\wip\engine\qclib InputPath=..\qclib\execloop.h BuildCmds= \ @@ -5193,7 +5075,7 @@ BuildCmds= \ !ELSEIF "$(CFG)" == "ftequake - Win32 MRelease" # Begin Custom Build -InputDir=\Games\Quake\wip\engine\qclib +InputDir=\ftetgcvs\wip\engine\qclib InputPath=..\qclib\execloop.h BuildCmds= \ @@ -5215,7 +5097,7 @@ BuildCmds= \ !ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug" # Begin Custom Build -InputDir=\Games\Quake\wip\engine\qclib +InputDir=\ftetgcvs\wip\engine\qclib InputPath=..\qclib\execloop.h BuildCmds= \ @@ -5237,7 +5119,7 @@ BuildCmds= \ !ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease" # Begin Custom Build -InputDir=\Games\Quake\wip\engine\qclib +InputDir=\ftetgcvs\wip\engine\qclib InputPath=..\qclib\execloop.h BuildCmds= \ @@ -5259,7 +5141,7 @@ BuildCmds= \ !ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server" # Begin Custom Build -InputDir=\Games\Quake\wip\engine\qclib +InputDir=\ftetgcvs\wip\engine\qclib InputPath=..\qclib\execloop.h BuildCmds= \ @@ -5281,7 +5163,7 @@ BuildCmds= \ !ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server" # Begin Custom Build -InputDir=\Games\Quake\wip\engine\qclib +InputDir=\ftetgcvs\wip\engine\qclib InputPath=..\qclib\execloop.h BuildCmds= \ @@ -5303,7 +5185,7 @@ BuildCmds= \ !ELSEIF "$(CFG)" == "ftequake - Win32 MinSW" # Begin Custom Build -InputDir=\Games\Quake\wip\engine\qclib +InputDir=\ftetgcvs\wip\engine\qclib InputPath=..\qclib\execloop.h BuildCmds= \ @@ -5325,7 +5207,7 @@ BuildCmds= \ !ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3" # Begin Custom Build -InputDir=\Games\Quake\wip\engine\qclib +InputDir=\ftetgcvs\wip\engine\qclib InputPath=..\qclib\execloop.h BuildCmds= \ @@ -5347,7 +5229,7 @@ BuildCmds= \ !ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated ServerQ3" # Begin Custom Build -InputDir=\Games\Quake\wip\engine\qclib +InputDir=\ftetgcvs\wip\engine\qclib InputPath=..\qclib\execloop.h BuildCmds= \ @@ -5369,7 +5251,7 @@ BuildCmds= \ !ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" # Begin Custom Build -InputDir=\Games\Quake\wip\engine\qclib +InputDir=\ftetgcvs\wip\engine\qclib InputPath=..\qclib\execloop.h BuildCmds= \ @@ -5391,7 +5273,7 @@ BuildCmds= \ !ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" # Begin Custom Build -InputDir=\Games\Quake\wip\engine\qclib +InputDir=\ftetgcvs\wip\engine\qclib InputPath=..\qclib\execloop.h BuildCmds= \ @@ -5746,865 +5628,6 @@ SOURCE=..\QCLIB\qcdecomp.c # Begin Group "asm" # PROP Default_Filter "" -# Begin Source File - -SOURCE=..\common\math.s - -!IF "$(CFG)" == "ftequake - Win32 Release" - -# Begin Custom Build -OutDir=.\Release -InputPath=..\common\math.s -InputName=math - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 Debug" - -# Begin Custom Build -OutDir=.\Debug -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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug" - -# Begin Custom Build -OutDir=.\GLDebug -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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease" - -# Begin Custom Build -OutDir=.\ftequake___Win32_GLRelease -InputPath=..\common\math.s -InputName=math - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug" - -# PROP Intermediate_Dir ".\MDebug" -# Begin Custom Build -OutDir=.\MDebug -InputPath=..\common\math.s -InputName=math - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease" - -# Begin Custom Build -OutDir=.\MRelease -InputPath=..\common\math.s -InputName=math - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug" - -# Begin Custom Build -OutDir=.\MinGLDebug -InputPath=..\common\math.s -InputName=math - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease" - -# Begin Custom Build -OutDir=.\ftequake___Win32_MinGLRelease -InputPath=..\common\math.s -InputName=math - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server" - -# Begin Custom Build -OutDir=.\DebugServer -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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server" - -# Begin Custom Build -OutDir=.\ftequake___Win32_Release_Dedicated_Server -InputPath=..\common\math.s -InputName=math - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW" - -# Begin Custom Build -OutDir=.\ftequake___Win32_MinSW -InputPath=..\common\math.s -InputName=math - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3" - -# Begin Custom Build -OutDir=.\ftequake___Win32_GLDebugQ3 -InputPath=..\common\math.s -InputName=math - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated ServerQ3" - -# Begin Custom Build -OutDir=.\ftequake___Win32_Debug_Dedicated_ServerQ3 -InputPath=..\common\math.s -InputName=math - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" - -# Begin Custom Build -OutDir=.\D3DDebug -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 - -!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 -# Begin Source File - -SOURCE=..\client\snd_mixa.s - -!IF "$(CFG)" == "ftequake - Win32 Release" - -# Begin Custom Build -OutDir=.\Release -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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 Debug" - -# Begin Custom Build -OutDir=.\Debug -InputPath=..\client\snd_mixa.s -InputName=snd_mixa - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug" - -# Begin Custom Build -OutDir=.\GLDebug -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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease" - -# Begin Custom Build -OutDir=.\ftequake___Win32_GLRelease -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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug" - -# PROP Intermediate_Dir ".\MDebug" -# Begin Custom Build -OutDir=.\MDebug -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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease" - -# Begin Custom Build -OutDir=.\MRelease -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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug" - -# Begin Custom Build -OutDir=.\MinGLDebug -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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease" - -# Begin Custom Build -OutDir=.\ftequake___Win32_MinGLRelease -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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server" - -# PROP BASE Exclude_From_Build 1 -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW" - -# Begin Custom Build -OutDir=.\ftequake___Win32_MinSW -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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3" - -# Begin Custom Build -OutDir=.\ftequake___Win32_GLDebugQ3 -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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated ServerQ3" - -# PROP BASE Exclude_From_Build 1 -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" - -# Begin Custom Build -OutDir=.\D3DDebug -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 - -!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 -# Begin Source File - -SOURCE=..\client\sys_wina.s - -!IF "$(CFG)" == "ftequake - Win32 Release" - -# Begin Custom Build -OutDir=.\Release -InputPath=..\client\sys_wina.s -InputName=sys_wina - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 Debug" - -# Begin Custom Build -OutDir=.\Debug -InputPath=..\client\sys_wina.s -InputName=sys_wina - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug" - -# Begin Custom Build -OutDir=.\GLDebug -InputPath=..\client\sys_wina.s -InputName=sys_wina - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease" - -# Begin Custom Build -OutDir=.\ftequake___Win32_GLRelease -InputPath=..\client\sys_wina.s -InputName=sys_wina - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug" - -# PROP Intermediate_Dir ".\MDebug" -# Begin Custom Build -OutDir=.\MDebug -InputPath=..\client\sys_wina.s -InputName=sys_wina - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease" - -# Begin Custom Build -OutDir=.\MRelease -InputPath=..\client\sys_wina.s -InputName=sys_wina - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug" - -# Begin Custom Build -OutDir=.\MinGLDebug -InputPath=..\client\sys_wina.s -InputName=sys_wina - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease" - -# Begin Custom Build -OutDir=.\ftequake___Win32_MinGLRelease -InputPath=..\client\sys_wina.s -InputName=sys_wina - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server" - -# PROP BASE Exclude_From_Build 1 -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW" - -# Begin Custom Build -OutDir=.\ftequake___Win32_MinSW -InputPath=..\client\sys_wina.s -InputName=sys_wina - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3" - -# Begin Custom Build -OutDir=.\ftequake___Win32_GLDebugQ3 -InputPath=..\client\sys_wina.s -InputName=sys_wina - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated ServerQ3" - -# PROP BASE Exclude_From_Build 1 -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" - -# Begin Custom Build -OutDir=.\D3DDebug -InputPath=..\client\sys_wina.s -InputName=sys_wina - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 GLSDLDebug" - -# PROP Exclude_From_Build 1 - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\server\worlda.s - -!IF "$(CFG)" == "ftequake - Win32 Release" - -# Begin Custom Build -OutDir=.\Release -InputPath=..\server\worlda.s -InputName=worlda - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 Debug" - -# Begin Custom Build -OutDir=.\Debug -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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebug" - -# Begin Custom Build -OutDir=.\GLDebug -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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 GLRelease" - -# Begin Custom Build -OutDir=.\ftequake___Win32_GLRelease -InputPath=..\server\worlda.s -InputName=worlda - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 MDebug" - -# PROP Intermediate_Dir ".\MDebug" -# Begin Custom Build -OutDir=.\MDebug -InputPath=..\server\worlda.s -InputName=worlda - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 MRelease" - -# Begin Custom Build -OutDir=.\MRelease -InputPath=..\server\worlda.s -InputName=worlda - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLDebug" - -# Begin Custom Build -OutDir=.\MinGLDebug -InputPath=..\server\worlda.s -InputName=worlda - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 MinGLRelease" - -# Begin Custom Build -OutDir=.\ftequake___Win32_MinGLRelease -InputPath=..\server\worlda.s -InputName=worlda - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated Server" - -# Begin Custom Build -OutDir=.\DebugServer -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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 Release Dedicated Server" - -# Begin Custom Build -OutDir=.\ftequake___Win32_Release_Dedicated_Server -InputPath=..\server\worlda.s -InputName=worlda - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 MinSW" - -# Begin Custom Build -OutDir=.\ftequake___Win32_MinSW -InputPath=..\server\worlda.s -InputName=worlda - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 GLDebugQ3" - -# Begin Custom Build -OutDir=.\ftequake___Win32_GLDebugQ3 -InputPath=..\server\worlda.s -InputName=worlda - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 Debug Dedicated ServerQ3" - -# Begin Custom Build -OutDir=.\ftequake___Win32_Debug_Dedicated_ServerQ3 -InputPath=..\server\worlda.s -InputName=worlda - -"$(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 - -!ELSEIF "$(CFG)" == "ftequake - Win32 D3DDebug" - -# Begin Custom Build -OutDir=.\D3DDebug -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 - -!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 # End Group # Begin Group "http" @@ -7524,6 +6547,26 @@ SOURCE=..\server\svmodel.c !ENDIF +# End Source File +# End Group +# Begin Group "d3d" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\d3d\d3d_backend.c +# End Source File +# Begin Source File + +SOURCE=..\d3d\d3d_image.c +# End Source File +# Begin Source File + +SOURCE=..\d3d\d3d_shader.c +# End Source File +# Begin Source File + +SOURCE=..\d3d\vid_d3d.c # End Source File # End Group # Begin Source File diff --git a/engine/gl/gl_backend.c b/engine/gl/gl_backend.c index f07bcd2e7..8d06038d3 100644 --- a/engine/gl/gl_backend.c +++ b/engine/gl/gl_backend.c @@ -435,10 +435,14 @@ void GL_TexEnv(GLenum mode) static void BE_SetPassBlendMode(int tmu, int pbm) { +#ifndef FORCESTATE if (shaderstate.blendmode[tmu] != pbm) +#endif { shaderstate.blendmode[tmu] = pbm; +#ifndef FORCESTATE if (shaderstate.currenttmu != tmu) +#endif GL_SelectTexture(tmu); switch (pbm) @@ -487,7 +491,9 @@ static void BE_SetPassBlendMode(int tmu, int pbm) /*OpenGL requires glDepthMask(GL_TRUE) or glClear(GL_DEPTH_BUFFER_BIT) will fail*/ void GL_ForceDepthWritable(void) { +#ifndef FORCESTATE if (!(shaderstate.shaderbits & SBITS_MISC_DEPTHWRITE)) +#endif { shaderstate.shaderbits |= SBITS_MISC_DEPTHWRITE; qglDepthMask(GL_TRUE); @@ -632,16 +638,27 @@ void GL_LazyBind(int tmu, int target, texid_t texnum, qboolean arrays) static void BE_EnableShaderAttributes(unsigned int newm) { unsigned int i; + + i = 0; + if (newm & (1u<numMergedPasses; i++) { Shader_BindTextureForPass(i, pass+i, false); @@ -2558,6 +2579,8 @@ static void BE_RenderMeshProgram(const shader_t *shader, const shaderpass_t *pas } else { + BE_EnableShaderAttributes(attr); + qglEnableClientState(GL_VERTEX_ARRAY); GenerateColourMods(pass); for (i = 0; i < pass->numMergedPasses; i++) { @@ -2571,11 +2594,7 @@ static void BE_RenderMeshProgram(const shader_t *shader, const shaderpass_t *pas shaderstate.lastpasstmus = pass->numMergedPasses; GL_ApplyVertexPointer(); } - - BE_EnableShaderAttributes(attr); BE_SubmitMeshChain(); - - qglEnableClientState(GL_VERTEX_ARRAY); } qboolean GLBE_LightCullModel(vec3_t org, model_t *model) @@ -3329,18 +3348,18 @@ void GLBE_DrawWorld (qbyte *vis) BE_SelectMode(BEM_DEPTHDARK); else BE_SelectMode(BEM_STANDARD); - checkglerror(); + RSpeedRemark(); GLBE_SubmitMeshes(true, batches); RSpeedEnd(RSPEED_WORLD); - checkglerror(); + #ifdef RTLIGHTS RSpeedRemark(); BE_SelectEntity(&r_worldentity); Sh_DrawLights(vis); RSpeedEnd(RSPEED_STENCILSHADOWS); #endif - checkglerror(); + if (r_refdef.gfog_alpha) { BE_SelectMode(BEM_FOG); diff --git a/engine/gl/gl_draw.c b/engine/gl/gl_draw.c index 0662e4a79..7e84211ff 100644 --- a/engine/gl/gl_draw.c +++ b/engine/gl/gl_draw.c @@ -383,10 +383,6 @@ TRACE(("dbg: GLDraw_ReInit: Allocating upload buffers\n")); TRACE(("dbg: GLDraw_ReInit: PPL_LoadSpecularFragmentProgram\n")); GL_InitSceneProcessingShaders(); - -#ifdef PLUGINS - Plug_DrawReloadImages(); -#endif } void GLDraw_Init (void) diff --git a/engine/gl/gl_rmain.c b/engine/gl/gl_rmain.c index 2fd3184ba..75dc7911b 100644 --- a/engine/gl/gl_rmain.c +++ b/engine/gl/gl_rmain.c @@ -247,7 +247,7 @@ void GL_InitFisheyeFov(void) gl_FragColor = textureCube(source, tc);\ }"; - scenepp_fisheye_program = GLSlang_CreateProgram(NULL, vshader, fisheyefshader); + scenepp_fisheye_program = GLSlang_CreateProgram("#version 110\n", NULL, vshader, fisheyefshader); if (scenepp_fisheye_program) { GLSlang_UseProgram(scenepp_fisheye_program); @@ -256,7 +256,7 @@ void GL_InitFisheyeFov(void) GLSlang_UseProgram(0); } - scenepp_panorama_program = GLSlang_CreateProgram(NULL, vshader, panoramafshader); + scenepp_panorama_program = GLSlang_CreateProgram("#version 110\n", NULL, vshader, panoramafshader); if (scenepp_panorama_program) { GLSlang_UseProgram(scenepp_panorama_program); diff --git a/engine/gl/gl_shader.c b/engine/gl/gl_shader.c index c92af57c2..96e86941f 100644 --- a/engine/gl/gl_shader.c +++ b/engine/gl/gl_shader.c @@ -744,7 +744,7 @@ static void Shader_EntityMergable ( shader_t *shader, shaderpass_t *pass, char * static void Shader_ProgAutoFields(program_t *prog, char **cvarfnames); /*program text is already loaded, this function parses the 'header' of it to see which permutations it provides, and how many times we need to recompile it*/ -static void Shader_LoadPermutations(program_t *prog, char *script, int qrtype) +static void Shader_LoadPermutations(program_t *prog, char *script, int qrtype, int ver) { static char *permutationname[] = { @@ -760,6 +760,7 @@ static void Shader_LoadPermutations(program_t *prog, char *script, int qrtype) unsigned int nopermutation = ~0u; int p, n, pn; char *end; + char *vers; char *cvarfnames[64]; int cvarfcount = 0; @@ -798,10 +799,25 @@ static void Shader_LoadPermutations(program_t *prog, char *script, int qrtype) } script = end; } + else if (!strncmp(script, "!!ver", 5)) + { + script += 5; + while (*script == ' ' || *script == '\t') + script++; + end = script; + while ((*end >= 'A' && *end <= 'Z') || (*end >= 'a' && *end <= 'z') || (*end >= '0' && *end <= '9') || *end == '_') + end++; + ver = strtol(script, NULL, 0); + script = end; + } else break; }; + if (ver) + vers = va("#version %u\n", ver); + else + vers = NULL; memset(prog->handle, 0, sizeof(*prog->handle)*PERMUTATIONS); for (p = 0; p < PERMUTATIONS; p++) { @@ -822,7 +838,7 @@ static void Shader_LoadPermutations(program_t *prog, char *script, int qrtype) permutationdefines[pn++] = permutationname[n]; } permutationdefines[pn++] = NULL; - prog->handle[p].glsl = GLSlang_CreateProgram(permutationdefines, script, script); + prog->handle[p].glsl = GLSlang_CreateProgram(vers, permutationdefines, script, script); } #endif #ifdef D3DQUAKE @@ -871,8 +887,6 @@ struct sbuiltin_s /*glsl es shaders require precisions to be defined for fragment shader variables more precision for shaders would be a good candidate for a cvar */ {QR_OPENGL/*ES*/, 100, "default2d", - //SGX requires #version to come before defines - //"#version 100\n" "#ifdef VERTEX_SHADER\n" "uniform mat4 m_view;\n" "uniform mat4 m_projection;\n" @@ -902,7 +916,6 @@ struct sbuiltin_s "#endif\n" }, {QR_OPENGL, 110, "default2d", - "#version 110\n" "#ifdef VERTEX_SHADER\n" "uniform mat4 m_view;\n" "uniform mat4 m_projection;\n" @@ -933,7 +946,6 @@ struct sbuiltin_s }, {QR_OPENGL, 110, "defaultwall", "!!cvarf gl_overbright\n" - "#version 110\n" "#ifdef VERTEX_SHADER\n" "uniform mat4 m_modelview, m_projection;\n" "attribute vec3 v_position;\n" @@ -967,7 +979,6 @@ struct sbuiltin_s /*FIXME: this doesn't match the gl3 version*/ {QR_OPENGL/*ES*/, 100, "defaultwall", "!!permu FULLBRIGHT\n" - //"#version 100\n" "#ifdef VERTEX_SHADER\n" "uniform mat4 m_modelview;\n" "uniform mat4 m_projection;\n" @@ -1005,7 +1016,6 @@ struct sbuiltin_s }, {QR_OPENGL/*ES*/, 100, "defaultwarp", "!!cvarf r_wateralpha\n" - //"#version 100\n" "varying mediump vec2 tc;\n" "#ifdef VERTEX_SHADER\n" "uniform mat4 m_modelview;\n" @@ -1037,7 +1047,6 @@ struct sbuiltin_s }, {QR_OPENGL, 110, "defaultwarp", "!!cvarf r_wateralpha\n" - "#version 110\n" "varying vec2 tc;\n" "#ifdef VERTEX_SHADER\n" "uniform mat4 m_modelview;\n" @@ -1068,7 +1077,6 @@ struct sbuiltin_s "#endif\n" }, {QR_OPENGL/*ES*/, 100, "defaultsky", - //"#version 100\n" "#ifdef VERTEX_SHADER\n" "uniform mat4 m_modelview;\n" "uniform mat4 m_projection;\n" @@ -1111,7 +1119,6 @@ struct sbuiltin_s "#endif\n" }, {QR_OPENGL, 110, "defaultsky", - "#version 110\n" "#ifdef VERTEX_SHADER\n" "uniform mat4 m_modelview;\n" "uniform mat4 m_projection;\n" @@ -1156,7 +1163,6 @@ struct sbuiltin_s "!!permu FULLBRIGHT\n" "!!permu LOWER\n" "!!permu UPPER\n" - //"#version 100\n" "#ifdef VERTEX_SHADER\n" "uniform mat4 m_modelview;\n" "uniform mat4 m_projection;\n" @@ -1220,7 +1226,6 @@ struct sbuiltin_s "!!permu FULLBRIGHT\n" "!!permu LOWER\n" "!!permu UPPER\n" - //"#version 110\n" "#ifdef VERTEX_SHADER\n" "uniform mat4 m_modelview;\n" "uniform mat4 m_projection;\n" @@ -1374,7 +1379,7 @@ static program_t *Shader_LoadGeneric(char *name, int qrtype) FS_LoadFile(name, &file); if (file) { - Shader_LoadPermutations(&g->prog, file, qrtype); + Shader_LoadPermutations(&g->prog, file, qrtype, 0); FS_FreeFile(file); g->prog.refs++; @@ -1398,7 +1403,7 @@ static program_t *Shader_LoadGeneric(char *name, int qrtype) continue; } #endif - Shader_LoadPermutations(&g->prog, sbuiltins[i].body, sbuiltins[i].qrtype); + Shader_LoadPermutations(&g->prog, sbuiltins[i].body, sbuiltins[i].qrtype, sbuiltins[i].apiver); g->prog.refs++; return &g->prog; @@ -1571,7 +1576,7 @@ static void Shader_SLProgramName (shader_t *shader, shaderpass_t *pass, char **p shader->prog = malloc(sizeof(*shader->prog)); memset(shader->prog, 0, sizeof(*shader->prog)); shader->prog->refs = 1; - Shader_LoadPermutations(shader->prog, programbody, qrtype); + Shader_LoadPermutations(shader->prog, programbody, qrtype, 0); BZ_Free(programbody); } diff --git a/engine/gl/gl_vidcommon.c b/engine/gl/gl_vidcommon.c index dfbfa8da1..8ea2f076c 100644 --- a/engine/gl/gl_vidcommon.c +++ b/engine/gl/gl_vidcommon.c @@ -151,6 +151,7 @@ FTEPFNGLLINKPROGRAMARBPROC qglLinkProgramARB; FTEPFNGLBINDATTRIBLOCATIONARBPROC qglBindAttribLocationARB; FTEPFNGLGETATTRIBLOCATIONARBPROC qglGetAttribLocationARB; FTEPFNGLVERTEXATTRIBPOINTER qglVertexAttribPointer; +FTEPFNGLGETVERTEXATTRIBIV qglGetVertexAttribiv; FTEPFNGLENABLEVERTEXATTRIBARRAY qglEnableVertexAttribArray; FTEPFNGLDISABLEVERTEXATTRIBARRAY qglDisableVertexAttribArray; FTEPFNGLGETUNIFORMLOCATIONARBPROC qglGetUniformLocationARB; @@ -572,6 +573,7 @@ void GL_CheckExtensions (void *(*getglfunction) (char *name), float ver) qglBindAttribLocationARB = (void *)getglext("glBindAttribLocationARB"); qglGetAttribLocationARB = (void *)getglext("glGetAttribLocationARB"); qglVertexAttribPointer = (void *)getglext("glVertexAttribPointerARB"); + qglGetVertexAttribiv = (void *)getglext("glGetVertexAttribivARB"); qglEnableVertexAttribArray = (void *)getglext("glEnableVertexAttribArrayARB"); qglDisableVertexAttribArray = (void *)getglext("glDisableVertexAttribArrayARB"); qglGetUniformLocationARB = (void *)getglext("glGetUniformLocationARB"); @@ -605,6 +607,7 @@ void GL_CheckExtensions (void *(*getglfunction) (char *name), float ver) qglBindAttribLocationARB = (void *)getglext("glBindAttribLocation"); qglGetAttribLocationARB = (void *)getglext("glGetAttribLocation"); qglVertexAttribPointer = (void *)getglext("glVertexAttribPointer"); + qglGetVertexAttribiv = (void *)getglext("glGetVertexAttribiv"); qglEnableVertexAttribArray = (void *)getglext("glEnableVertexAttribArray"); qglDisableVertexAttribArray = (void *)getglext("glDisableVertexAttribArray"); qglGetUniformLocationARB = (void *)getglext("glGetUniformLocation"); @@ -651,15 +654,18 @@ void GL_CheckExtensions (void *(*getglfunction) (char *name), float ver) // glslang helper api function definitions // type should be GL_FRAGMENT_SHADER_ARB or GL_VERTEX_SHADER_ARB -GLhandleARB GLSlang_CreateShader (char **precompilerconstants, char *shadersource, GLenum shadertype) +GLhandleARB GLSlang_CreateShader (char *versionline, char **precompilerconstants, char *shadersource, GLenum shadertype) { GLhandleARB shader; GLint compiled; char str[1024]; int loglen, i; - char *prstrings[3+16]; + char *prstrings[4+16]; int strings = 0; + if (versionline) + prstrings[strings++] = versionline; + prstrings[strings++] = "#define ENGINE_"DISTRIBUTION"\n"; switch (shadertype) { @@ -768,7 +774,7 @@ bucket_t *compiledshadersbuckets[64]; static hashtable_t compiledshaderstable; #endif -GLhandleARB GLSlang_CreateProgram(char **precompilerconstants, char *vert, char *frag) +GLhandleARB GLSlang_CreateProgram(char *versionline, char **precompilerconstants, char *vert, char *frag) { GLhandleARB handle; GLhandleARB vs; @@ -802,8 +808,8 @@ GLhandleARB GLSlang_CreateProgram(char **precompilerconstants, char *vert, char } #endif - vs = GLSlang_CreateShader(precompilerconstants, vert, GL_VERTEX_SHADER_ARB); - fs = GLSlang_CreateShader(precompilerconstants, frag, GL_FRAGMENT_SHADER_ARB); + vs = GLSlang_CreateShader(versionline, precompilerconstants, vert, GL_VERTEX_SHADER_ARB); + fs = GLSlang_CreateShader(versionline, precompilerconstants, frag, GL_FRAGMENT_SHADER_ARB); if (!vs || !fs) handle = 0; diff --git a/engine/gl/glquake.h b/engine/gl/glquake.h index 8f6f02351..c696be3ca 100644 --- a/engine/gl/glquake.h +++ b/engine/gl/glquake.h @@ -94,6 +94,7 @@ typedef void (APIENTRYP FTEPFNGLVERTEXATTRIBPOINTER) (GLuint index, GLint siz typedef void (APIENTRYP FTEPFNGLENABLEVERTEXATTRIBARRAY) (GLuint index); typedef void (APIENTRYP FTEPFNGLDISABLEVERTEXATTRIBARRAY) (GLuint index); typedef GLint (APIENTRYP FTEPFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); +typedef void (APIENTRYP FTEPFNGLGETVERTEXATTRIBIV) (GLuint index, GLenum pname, GLint *params); typedef void (APIENTRYP FTEPFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); typedef void (APIENTRYP FTEPFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, GLfloat *value); typedef void (APIENTRYP FTEPFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, GLfloat *value); @@ -774,6 +775,7 @@ extern FTEPFNGLLINKPROGRAMARBPROC qglLinkProgramARB; extern FTEPFNGLBINDATTRIBLOCATIONARBPROC qglBindAttribLocationARB; extern FTEPFNGLGETATTRIBLOCATIONARBPROC qglGetAttribLocationARB; extern FTEPFNGLVERTEXATTRIBPOINTER qglVertexAttribPointer; +extern FTEPFNGLGETVERTEXATTRIBIV qglGetVertexAttribiv; extern FTEPFNGLENABLEVERTEXATTRIBARRAY qglEnableVertexAttribArray; extern FTEPFNGLDISABLEVERTEXATTRIBARRAY qglDisableVertexAttribArray; extern FTEPFNGLGETUNIFORMLOCATIONARBPROC qglGetUniformLocationARB; @@ -786,7 +788,7 @@ extern FTEPFNGLUNIFORM1IARBPROC qglUniform1iARB; extern FTEPFNGLUNIFORM1FARBPROC qglUniform1fARB; //glslang helper api -GLhandleARB GLSlang_CreateProgram (char **precompilerconstants, char *vert, char *frag); +GLhandleARB GLSlang_CreateProgram(char *versionline, char **precompilerconstants, char *vert, char *frag); GLint GLSlang_GetUniformLocation (int prog, char *name); void GL_SelectProgram(int program); #define GLSlang_UseProgram(prog) GL_SelectProgram(prog)