diff --git a/engine/client/in_win.c b/engine/client/in_win.c index ea466e6c0..b3a32b6b5 100644 --- a/engine/client/in_win.c +++ b/engine/client/in_win.c @@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "in_raw.h" #endif -#ifndef NODIRECTX +#ifdef AVAIL_DINPUT #ifdef _MSC_VER #pragma comment (lib, "dxguid.lib") @@ -171,7 +171,7 @@ int joy_id; DWORD joy_flags; DWORD joy_numbuttons; -#ifndef NODIRECTX +#ifdef AVAIL_DINPUT // devices LPDIRECTINPUT g_pdi; LPDIRECTINPUTDEVICE g_pMouse; @@ -440,7 +440,7 @@ void IN_ActivateMouse (void) if (mouseinitialized) { -#ifndef NODIRECTX +#ifdef AVAIL_DINPUT #if (DIRECTINPUT_VERSION >= DINPUT_VERSION_DX7) if (dinput >= DINPUT_VERSION_DX7) { @@ -528,7 +528,7 @@ void IN_DeactivateMouse (void) if (mouseinitialized) { -#ifndef NODIRECTX +#ifdef AVAIL_DINPUT #if (DIRECTINPUT_VERSION >= DINPUT_VERSION_DX7) if (dinput >= DINPUT_VERSION_DX7) { @@ -599,7 +599,7 @@ void IN_RestoreOriginalMouseState (void) ShowCursor (FALSE); } -#ifndef NODIRECTX +#ifdef AVAIL_DINPUT BOOL CALLBACK IN_EnumerateDevices(LPCDIDEVICEINSTANCE inst, LPVOID parm) { Con_DPrintf("EnumerateDevices found: %s\n", inst->tszProductName); @@ -1112,7 +1112,7 @@ void IN_StartupMouse (void) mouseinitialized = true; -#ifndef NODIRECTX +#ifdef AVAIL_DINPUT if (in_dinput.value) { dinput = IN_InitDInput (); @@ -1297,7 +1297,7 @@ void IN_Shutdown (void) mouseparmsvalid = false; -#ifndef NODIRECTX +#ifdef AVAIL_DINPUT IN_CloseDInput(); #endif #ifdef USINGRAWINPUT @@ -1536,7 +1536,7 @@ void IN_MouseMove (usercmd_t *cmd, int pnum) return; } -#ifndef NODIRECTX +#ifdef AVAIL_DINPUT if (dinput) { DIDEVICEOBJECTDATA od; diff --git a/engine/client/snd_directx.c b/engine/client/snd_directx.c index 68e1f6310..3d8ac9ca1 100644 --- a/engine/client/snd_directx.c +++ b/engine/client/snd_directx.c @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define SND_LOADED 1 #define SND_NOMORE 2 //like error, but doesn't try the next card. -#ifndef NODIRECTX +#ifdef AVAIL_DSOUND #define iDirectSoundCreate(a,b,c) pDirectSoundCreate(a,b,c) #define iDirectSoundEnumerate(a,b,c) pDirectSoundEnumerate(a,b) @@ -879,7 +879,7 @@ int (*pDSOUND_InitCard) (soundcardinfo_t *sc, int cardnum) = &DSOUND_InitCard; -#if defined(VOICECHAT) && !defined(NODIRECTX) && !defined(__MINGW32__) +#if defined(VOICECHAT) && defined(AVAIL_DSOUND) && !defined(__MINGW32__) diff --git a/engine/client/snd_dma.c b/engine/client/snd_dma.c index c0ec23412..677bfc4ed 100644 --- a/engine/client/snd_dma.c +++ b/engine/client/snd_dma.c @@ -644,7 +644,7 @@ void S_Init (void) void S_ShutdownCard(soundcardinfo_t *sc) { soundcardinfo_t *prev; -#if defined(_WIN32) && !defined(NODIRECTX) +#if defined(_WIN32) && defined(AVAIL_DSOUND) extern int aimedforguid; aimedforguid = 0; #endif @@ -666,7 +666,7 @@ void S_ShutdownCard(soundcardinfo_t *sc) void S_Shutdown(void) { soundcardinfo_t *sc, *next; -#if defined(_WIN32) && !defined(NODIRECTX) +#if defined(_WIN32) && defined(AVAIL_DSOUND) extern int aimedforguid; aimedforguid = 0; #endif diff --git a/engine/client/sys_win.c b/engine/client/sys_win.c index df983ad8d..93bea54fb 100644 --- a/engine/client/sys_win.c +++ b/engine/client/sys_win.c @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include -#ifdef NODIRECTX +#ifndef AVAIL_DDRAW #define DDActive 0 #endif @@ -160,7 +160,7 @@ void *Sys_GetGameAPI (void *parms) const char *debugdir = "debug"; #endif -#elif defined __amd64__ +#elif defined(__amd64__) || defined(__AMD64__) || defined(_AMD64_) const char *gamename = "gameamd.dll"; #ifdef NDEBUG @@ -1414,7 +1414,7 @@ qboolean Sys_GetDesktopParameters(int *width, int *height, int *bpp, int *refres } -#ifdef NOASM //these couldn't be found... (it is a masm thing, right?) +#if !id386 //these couldn't be found... (it is a masm thing, right?) void Sys_HighFPPrecision (void) { } diff --git a/engine/client/winquake.h b/engine/client/winquake.h index cc5f78ca1..2fd7b442a 100644 --- a/engine/client/winquake.h +++ b/engine/client/winquake.h @@ -47,7 +47,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define WM_MWHOOK (WM_USER + 1) #ifndef SERVERONLY -#ifndef NODIRECTX +#ifdef AVAIL_DDRAW #include #endif #ifdef SWQUAKE @@ -69,7 +69,7 @@ LONG CDAudio_MessageHandler(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); #endif -#ifndef NODIRECTX +#ifdef AVAIL_DDRAW extern qboolean DDActive; extern LPDIRECTDRAW lpDD; extern LPDIRECTDRAWSURFACE lpPrimary; @@ -93,7 +93,7 @@ struct soundcardinfo_s { unsigned int (*GetDMAPos) (soundcardinfo_t *sc); void (*SetWaterDistortion) (soundcardinfo_t *sc, qboolean underwater); -#ifndef NODIRECTX +#ifdef AVAIL_DSOUND LPDIRECTSOUND pDS; LPDIRECTSOUNDBUFFER pDSBuf; LPDIRECTSOUNDBUFFER pDSPBuf; @@ -127,7 +127,7 @@ struct soundcardinfo_s { channel_t channel[MAX_CHANNELS]; int total_chans; -#ifndef NODIRECTX +#ifdef AVAIL_DSOUND #ifdef _IKsPropertySet_ LPKSPROPERTYSET EaxKsPropertiesSet; #endif diff --git a/engine/common/bothdefs.h b/engine/common/bothdefs.h index 19ad1a290..9ee6e9147 100644 --- a/engine/common/bothdefs.h +++ b/engine/common/bothdefs.h @@ -36,6 +36,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "config.h" #else + #ifdef NO_LIBRARIES + #define NO_DIRECTX + #define NO_PNG + #define NO_JPEG + #define NO_ZLIB + #define NO_OGG + #endif + //#define AVAIL_OGGVORBIS #if !defined(__CYGWIN__) && !defined(MINGW) && !defined(MACOSX) #define AVAIL_PNGLIB @@ -52,6 +60,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define AVAIL_JPEGLIB #endif +#if !defined(NO_DIRECTX) && !defined(NODIRECTX) + #define AVAIL_DINPUT + #define AVAIL_DDRAW + #define AVAIL_DSOUND + #define AVAIL_D3D +#endif #ifdef NO_PNG #undef AVAIL_PNGLIB @@ -184,7 +198,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #endif #endif -#if defined(NODIRECTX) || (!defined(GLQUAKE) && !defined(RGLQUAKE)) +#if !defined(AVAIL_D3D) || (!defined(GLQUAKE) && !defined(RGLQUAKE)) #undef USE_D3D #endif @@ -305,7 +319,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #endif -#if (defined(_M_IX86) || defined(__i386__)) && !defined(id386) && !defined(__amd64__) +#if (defined(_M_IX86) || defined(__i386__)) && !defined(id386) && !defined(__amd64__) && !defined(_AMD64_) #define id386 1 #else #define id386 0 diff --git a/engine/dotnet2005/ftequake.vcproj b/engine/dotnet2005/ftequake.vcproj index 54abb6c7a..c33649aa8 100644 --- a/engine/dotnet2005/ftequake.vcproj +++ b/engine/dotnet2005/ftequake.vcproj @@ -19,8 +19,8 @@ @@ -120,7 +119,7 @@ @@ -733,7 +729,7 @@ @@ -939,7 +934,7 @@ @@ -1146,7 +1139,7 @@ @@ -1968,7 +1959,7 @@ @@ -2174,7 +2163,7 @@ @@ -2381,7 +2369,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - stringtable; + *(string_t *)val = PR_StringToProgs(progfuncs, ED_NewString (progfuncs, assignment, 0)); break; case ev_float: diff --git a/engine/sw/vid_ddraw.c b/engine/sw/vid_ddraw.c index 1c46c0e3f..261d3841c 100644 --- a/engine/sw/vid_ddraw.c +++ b/engine/sw/vid_ddraw.c @@ -2,7 +2,7 @@ #include "winquake.h" qboolean vid_palettized; -#ifndef NODIRECTX +#ifdef AVAIL_DDRAW HMODULE hinstDDRAW; LPDIRECTDRAW2 lpDirectDraw;