The different aspects of directx are now activated independently from each other, allowing greater custom build control.

Tweeked win64 options so as not to conflict with 32bit builds.
Win64 builds now with NO_LIBRARIES added. Yes, you need to provide 64bit libraries yourself if you want to use them (dinput/dsound should be part of the directx sdk and are, strictly speaking, not re-distributable). See bothdefs.h for how to activate individual 64bit libs.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3138 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2009-03-07 04:37:24 +00:00
parent dad710ee27
commit 75fb5f5398
9 changed files with 199 additions and 294 deletions

View file

@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "in_raw.h" #include "in_raw.h"
#endif #endif
#ifndef NODIRECTX #ifdef AVAIL_DINPUT
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma comment (lib, "dxguid.lib") #pragma comment (lib, "dxguid.lib")
@ -171,7 +171,7 @@ int joy_id;
DWORD joy_flags; DWORD joy_flags;
DWORD joy_numbuttons; DWORD joy_numbuttons;
#ifndef NODIRECTX #ifdef AVAIL_DINPUT
// devices // devices
LPDIRECTINPUT g_pdi; LPDIRECTINPUT g_pdi;
LPDIRECTINPUTDEVICE g_pMouse; LPDIRECTINPUTDEVICE g_pMouse;
@ -440,7 +440,7 @@ void IN_ActivateMouse (void)
if (mouseinitialized) if (mouseinitialized)
{ {
#ifndef NODIRECTX #ifdef AVAIL_DINPUT
#if (DIRECTINPUT_VERSION >= DINPUT_VERSION_DX7) #if (DIRECTINPUT_VERSION >= DINPUT_VERSION_DX7)
if (dinput >= DINPUT_VERSION_DX7) if (dinput >= DINPUT_VERSION_DX7)
{ {
@ -528,7 +528,7 @@ void IN_DeactivateMouse (void)
if (mouseinitialized) if (mouseinitialized)
{ {
#ifndef NODIRECTX #ifdef AVAIL_DINPUT
#if (DIRECTINPUT_VERSION >= DINPUT_VERSION_DX7) #if (DIRECTINPUT_VERSION >= DINPUT_VERSION_DX7)
if (dinput >= DINPUT_VERSION_DX7) if (dinput >= DINPUT_VERSION_DX7)
{ {
@ -599,7 +599,7 @@ void IN_RestoreOriginalMouseState (void)
ShowCursor (FALSE); ShowCursor (FALSE);
} }
#ifndef NODIRECTX #ifdef AVAIL_DINPUT
BOOL CALLBACK IN_EnumerateDevices(LPCDIDEVICEINSTANCE inst, LPVOID parm) BOOL CALLBACK IN_EnumerateDevices(LPCDIDEVICEINSTANCE inst, LPVOID parm)
{ {
Con_DPrintf("EnumerateDevices found: %s\n", inst->tszProductName); Con_DPrintf("EnumerateDevices found: %s\n", inst->tszProductName);
@ -1112,7 +1112,7 @@ void IN_StartupMouse (void)
mouseinitialized = true; mouseinitialized = true;
#ifndef NODIRECTX #ifdef AVAIL_DINPUT
if (in_dinput.value) if (in_dinput.value)
{ {
dinput = IN_InitDInput (); dinput = IN_InitDInput ();
@ -1297,7 +1297,7 @@ void IN_Shutdown (void)
mouseparmsvalid = false; mouseparmsvalid = false;
#ifndef NODIRECTX #ifdef AVAIL_DINPUT
IN_CloseDInput(); IN_CloseDInput();
#endif #endif
#ifdef USINGRAWINPUT #ifdef USINGRAWINPUT
@ -1536,7 +1536,7 @@ void IN_MouseMove (usercmd_t *cmd, int pnum)
return; return;
} }
#ifndef NODIRECTX #ifdef AVAIL_DINPUT
if (dinput) if (dinput)
{ {
DIDEVICEOBJECTDATA od; DIDEVICEOBJECTDATA od;

View file

@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define SND_LOADED 1 #define SND_LOADED 1
#define SND_NOMORE 2 //like error, but doesn't try the next card. #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 iDirectSoundCreate(a,b,c) pDirectSoundCreate(a,b,c)
#define iDirectSoundEnumerate(a,b,c) pDirectSoundEnumerate(a,b) #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__)

View file

@ -644,7 +644,7 @@ void S_Init (void)
void S_ShutdownCard(soundcardinfo_t *sc) void S_ShutdownCard(soundcardinfo_t *sc)
{ {
soundcardinfo_t *prev; soundcardinfo_t *prev;
#if defined(_WIN32) && !defined(NODIRECTX) #if defined(_WIN32) && defined(AVAIL_DSOUND)
extern int aimedforguid; extern int aimedforguid;
aimedforguid = 0; aimedforguid = 0;
#endif #endif
@ -666,7 +666,7 @@ void S_ShutdownCard(soundcardinfo_t *sc)
void S_Shutdown(void) void S_Shutdown(void)
{ {
soundcardinfo_t *sc, *next; soundcardinfo_t *sc, *next;
#if defined(_WIN32) && !defined(NODIRECTX) #if defined(_WIN32) && defined(AVAIL_DSOUND)
extern int aimedforguid; extern int aimedforguid;
aimedforguid = 0; aimedforguid = 0;
#endif #endif

View file

@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <io.h> #include <io.h>
#include <direct.h> #include <direct.h>
#ifdef NODIRECTX #ifndef AVAIL_DDRAW
#define DDActive 0 #define DDActive 0
#endif #endif
@ -160,7 +160,7 @@ void *Sys_GetGameAPI (void *parms)
const char *debugdir = "debug"; const char *debugdir = "debug";
#endif #endif
#elif defined __amd64__ #elif defined(__amd64__) || defined(__AMD64__) || defined(_AMD64_)
const char *gamename = "gameamd.dll"; const char *gamename = "gameamd.dll";
#ifdef NDEBUG #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) void Sys_HighFPPrecision (void)
{ {
} }

View file

@ -47,7 +47,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define WM_MWHOOK (WM_USER + 1) #define WM_MWHOOK (WM_USER + 1)
#ifndef SERVERONLY #ifndef SERVERONLY
#ifndef NODIRECTX #ifdef AVAIL_DDRAW
#include <ddraw.h> #include <ddraw.h>
#endif #endif
#ifdef SWQUAKE #ifdef SWQUAKE
@ -69,7 +69,7 @@ LONG CDAudio_MessageHandler(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
#endif #endif
#ifndef NODIRECTX #ifdef AVAIL_DDRAW
extern qboolean DDActive; extern qboolean DDActive;
extern LPDIRECTDRAW lpDD; extern LPDIRECTDRAW lpDD;
extern LPDIRECTDRAWSURFACE lpPrimary; extern LPDIRECTDRAWSURFACE lpPrimary;
@ -93,7 +93,7 @@ struct soundcardinfo_s {
unsigned int (*GetDMAPos) (soundcardinfo_t *sc); unsigned int (*GetDMAPos) (soundcardinfo_t *sc);
void (*SetWaterDistortion) (soundcardinfo_t *sc, qboolean underwater); void (*SetWaterDistortion) (soundcardinfo_t *sc, qboolean underwater);
#ifndef NODIRECTX #ifdef AVAIL_DSOUND
LPDIRECTSOUND pDS; LPDIRECTSOUND pDS;
LPDIRECTSOUNDBUFFER pDSBuf; LPDIRECTSOUNDBUFFER pDSBuf;
LPDIRECTSOUNDBUFFER pDSPBuf; LPDIRECTSOUNDBUFFER pDSPBuf;
@ -127,7 +127,7 @@ struct soundcardinfo_s {
channel_t channel[MAX_CHANNELS]; channel_t channel[MAX_CHANNELS];
int total_chans; int total_chans;
#ifndef NODIRECTX #ifdef AVAIL_DSOUND
#ifdef _IKsPropertySet_ #ifdef _IKsPropertySet_
LPKSPROPERTYSET EaxKsPropertiesSet; LPKSPROPERTYSET EaxKsPropertiesSet;
#endif #endif

View file

@ -36,6 +36,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "config.h" #include "config.h"
#else #else
#ifdef NO_LIBRARIES
#define NO_DIRECTX
#define NO_PNG
#define NO_JPEG
#define NO_ZLIB
#define NO_OGG
#endif
//#define AVAIL_OGGVORBIS //#define AVAIL_OGGVORBIS
#if !defined(__CYGWIN__) && !defined(MINGW) && !defined(MACOSX) #if !defined(__CYGWIN__) && !defined(MINGW) && !defined(MACOSX)
#define AVAIL_PNGLIB #define AVAIL_PNGLIB
@ -52,6 +60,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define AVAIL_JPEGLIB #define AVAIL_JPEGLIB
#endif #endif
#if !defined(NO_DIRECTX) && !defined(NODIRECTX)
#define AVAIL_DINPUT
#define AVAIL_DDRAW
#define AVAIL_DSOUND
#define AVAIL_D3D
#endif
#ifdef NO_PNG #ifdef NO_PNG
#undef AVAIL_PNGLIB #undef AVAIL_PNGLIB
@ -184,7 +198,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#endif #endif
#endif #endif
#if defined(NODIRECTX) || (!defined(GLQUAKE) && !defined(RGLQUAKE)) #if !defined(AVAIL_D3D) || (!defined(GLQUAKE) && !defined(RGLQUAKE))
#undef USE_D3D #undef USE_D3D
#endif #endif
@ -305,7 +319,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#endif #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 #define id386 1
#else #else
#define id386 0 #define id386 0

File diff suppressed because it is too large Load diff

View file

@ -493,7 +493,7 @@ char *EvaluateDebugString(progfuncs_t *progfuncs, char *key)
switch (type&~DEF_SAVEGLOBAL) switch (type&~DEF_SAVEGLOBAL)
{ {
case ev_string: case ev_string:
*(string_t *)val = ED_NewString (progfuncs, assignment, 0)-progfuncs->stringtable; *(string_t *)val = PR_StringToProgs(progfuncs, ED_NewString (progfuncs, assignment, 0));
break; break;
case ev_float: case ev_float:

View file

@ -2,7 +2,7 @@
#include "winquake.h" #include "winquake.h"
qboolean vid_palettized; qboolean vid_palettized;
#ifndef NODIRECTX #ifdef AVAIL_DDRAW
HMODULE hinstDDRAW; HMODULE hinstDDRAW;
LPDIRECTDRAW2 lpDirectDraw; LPDIRECTDRAW2 lpDirectDraw;