mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 12:01:25 +00:00
Some more progress on the Xbox version. If you can call it that. Also changed the wastes.ico to be up to date.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5082 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
5e58832acf
commit
2abaa866a3
17 changed files with 141 additions and 28 deletions
|
@ -902,7 +902,7 @@ void QDECL R2D_Conback_Callback(struct cvar_s *var, char *oldvalue)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(FTE_SDL) && !defined(WINRT)
|
#if defined(_WIN32) && !defined(FTE_SDL) && !defined(WINRT) && !defined(_XBOX)
|
||||||
qboolean R2D_Font_WasAdded(char *buffer, char *fontfilename)
|
qboolean R2D_Font_WasAdded(char *buffer, char *fontfilename)
|
||||||
{
|
{
|
||||||
char *match;
|
char *match;
|
||||||
|
@ -986,7 +986,7 @@ void R2D_Font_Changed(void)
|
||||||
if (qrenderer == QR_NONE)
|
if (qrenderer == QR_NONE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(FTE_SDL) && !defined(WINRT)
|
#if defined(_WIN32) && !defined(FTE_SDL) && !defined(WINRT) && !defined(_XBOX)
|
||||||
if (!strcmp(gl_font.string, "?"))
|
if (!strcmp(gl_font.string, "?"))
|
||||||
{
|
{
|
||||||
BOOL (APIENTRY *pChooseFontW)(LPCHOOSEFONTW) = NULL;
|
BOOL (APIENTRY *pChooseFontW)(LPCHOOSEFONTW) = NULL;
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#include "quakedef.h"
|
#include "quakedef.h"
|
||||||
#include <xtl.h>
|
#include <xtl.h>
|
||||||
|
|
||||||
|
#define MAXPRINTMSG 1024 // Yes
|
||||||
|
qboolean isDedicated = false;
|
||||||
|
|
||||||
/*Timers, supposedly xbox supports QueryPerformanceCounter stuff*/
|
/*Timers, supposedly xbox supports QueryPerformanceCounter stuff*/
|
||||||
double Sys_DoubleTime (void)
|
double Sys_DoubleTime (void)
|
||||||
|
@ -69,7 +71,7 @@ void VARGS Sys_Printf (char *fmt, ...)
|
||||||
char msg[MAXPRINTMSG];
|
char msg[MAXPRINTMSG];
|
||||||
|
|
||||||
va_start (argptr,fmt);
|
va_start (argptr,fmt);
|
||||||
_vsnprintf (msg,sizeof(msg)-1, fmt,argptr);
|
Q_snprintfz (msg,sizeof(msg)-1, fmt,argptr);
|
||||||
msg[sizeof(msg)-1] = 0; //_vsnprintf sucks.
|
msg[sizeof(msg)-1] = 0; //_vsnprintf sucks.
|
||||||
va_end (argptr);
|
va_end (argptr);
|
||||||
|
|
||||||
|
@ -107,6 +109,10 @@ void Sys_ServerActivity(void)
|
||||||
{ //player joined the server or said something. would normally flash the app in the system tray.
|
{ //player joined the server or said something. would normally flash the app in the system tray.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Sys_RecentServer(char *command, char *target, char *title, char *desc) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/*check any system message queues here*/
|
/*check any system message queues here*/
|
||||||
void Sys_SendKeyEvents(void)
|
void Sys_SendKeyEvents(void)
|
||||||
{
|
{
|
||||||
|
@ -195,9 +201,6 @@ void main( int argc, char **argv)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*input stubs
|
/*input stubs
|
||||||
in_generic.c should make these kinda useless, but sometimes you need more than the following three functions:
|
in_generic.c should make these kinda useless, but sometimes you need more than the following three functions:
|
||||||
void IN_JoystickAxisEvent(unsigned int devid, int axis, float value);
|
void IN_JoystickAxisEvent(unsigned int devid, int axis, float value);
|
||||||
|
@ -237,4 +240,11 @@ void INS_EnumerateDevices(void *ctx, void(*callback)(void *ctx, const char *type
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void INS_SetupControllerAudioDevices (void) // Not used
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void INS_UpdateGrabs (void) // Not used
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 137 KiB |
|
@ -48,6 +48,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#define NO_OGG
|
#define NO_OGG
|
||||||
#define NO_ZLIB
|
#define NO_ZLIB
|
||||||
#define NOMEDIA
|
#define NOMEDIA
|
||||||
|
#define NO_FREETYPE
|
||||||
|
#define HAVE_PACKET
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NACL
|
#ifdef NACL
|
||||||
|
@ -400,6 +402,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_XBOX)
|
#if defined(_XBOX)
|
||||||
|
#define D3DQUAKE
|
||||||
|
#define D3D8QUAKE
|
||||||
#undef HAVE_TCP //FIXME
|
#undef HAVE_TCP //FIXME
|
||||||
#undef HAVE_PACKET //FIXME
|
#undef HAVE_PACKET //FIXME
|
||||||
#undef SUPPORT_ICE //screw that
|
#undef SUPPORT_ICE //screw that
|
||||||
|
@ -410,9 +414,31 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#undef TEXTEDITOR //its hard to edit text when you have just a controller (and no onscreen keyboard)
|
#undef TEXTEDITOR //its hard to edit text when you have just a controller (and no onscreen keyboard)
|
||||||
#undef RAGDOLL //needs a proper physics engine
|
#undef RAGDOLL //needs a proper physics engine
|
||||||
#undef AVAIL_MP3_ACM //api not supported
|
#undef AVAIL_MP3_ACM //api not supported
|
||||||
|
#undef AVAIL_OPENAL
|
||||||
#undef HAVE_SPEECHTOTEXT //api not supported
|
#undef HAVE_SPEECHTOTEXT //api not supported
|
||||||
#undef MULTITHREAD //no CreateThread stuff.
|
#undef MULTITHREAD //no CreateThread stuff.
|
||||||
#undef SUBSERVERS //single-process.
|
#undef SUBSERVERS //single-process.
|
||||||
|
#undef VOICECHAT
|
||||||
|
#undef TERRAIN
|
||||||
|
#undef Q2CLIENT
|
||||||
|
#undef Q2SERVER
|
||||||
|
#undef Q3CLIENT
|
||||||
|
#undef Q3SERVER
|
||||||
|
#undef HLCLIENT
|
||||||
|
#undef HLSERVER
|
||||||
|
#undef VM_Q1
|
||||||
|
#undef VM_LUA
|
||||||
|
#undef HALFLIFEMODELS
|
||||||
|
#undef RUNTIMELIGHTING
|
||||||
|
#undef HEXEN2
|
||||||
|
#undef DOOMWADS
|
||||||
|
#undef MAP_PROC
|
||||||
|
#undef Q1BSPS
|
||||||
|
#undef Q2BSPS
|
||||||
|
#undef Q3BSPS
|
||||||
|
#undef RFBSPS
|
||||||
|
#undef WEBSERVER //http/ftp servers
|
||||||
|
#undef WEBCLIENT //http/ftp clients.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef FTE_TARGET_WEB
|
#ifdef FTE_TARGET_WEB
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
//#define D3D9QUAKE
|
//#define D3D9QUAKE
|
||||||
//#define GLQUAKE
|
//#define GLQUAKE
|
||||||
#undef D3D11QUAKE
|
#undef D3D11QUAKE
|
||||||
|
#define D3D8QUAKE
|
||||||
#undef VKQUAKE
|
#undef VKQUAKE
|
||||||
#undef HEADLESSQUAKE
|
#undef HEADLESSQUAKE
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#define Z_Free free
|
#define Z_Free free
|
||||||
#define Z_Malloc malloc
|
#define Z_Malloc malloc
|
||||||
#else
|
#else
|
||||||
#if !defined(_WIN32) || defined(FTE_SDL) || defined(WINRT)
|
#if !defined(_WIN32) || defined(FTE_SDL) || defined(WINRT) || defined(_XBOX)
|
||||||
#define FSSTDIO_OpenPath VFSOS_OpenPath
|
#define FSSTDIO_OpenPath VFSOS_OpenPath
|
||||||
#endif
|
#endif
|
||||||
#define FSSTDIO_OpenTemp FS_OpenTemp
|
#define FSSTDIO_OpenTemp FS_OpenTemp
|
||||||
|
@ -196,7 +196,7 @@ vfsfile_t *VFSSTDIO_Open(const char *osname, const char *mode, qboolean *needsfl
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WEBSVONLY
|
#ifndef WEBSVONLY
|
||||||
#if !defined(_WIN32) || defined(FTE_SDL) || defined(WINRT)
|
#if !defined(_WIN32) || defined(FTE_SDL) || defined(WINRT) || defined(_XBOX)
|
||||||
vfsfile_t *VFSOS_Open(const char *osname, const char *mode)
|
vfsfile_t *VFSOS_Open(const char *osname, const char *mode)
|
||||||
{
|
{
|
||||||
vfsfile_t *f;
|
vfsfile_t *f;
|
||||||
|
|
|
@ -23,6 +23,19 @@ struct sockaddr;
|
||||||
#include "quakedef.h"
|
#include "quakedef.h"
|
||||||
#include "netinc.h"
|
#include "netinc.h"
|
||||||
|
|
||||||
|
// Eww, eww. This is hacky but so is netinc.h, so bite me
|
||||||
|
#ifdef _XBOX
|
||||||
|
struct sockaddr
|
||||||
|
{
|
||||||
|
short sa_family;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define ntohs BigShort
|
||||||
|
#define htons BigShort
|
||||||
|
#define htonl BigLong
|
||||||
|
#define ntohl BigLong
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(__linux__) && !defined(ANDROID)
|
#if defined(_WIN32) || defined(__linux__) && !defined(ANDROID)
|
||||||
#define USE_GETHOSTNAME_LOCALLISTING
|
#define USE_GETHOSTNAME_LOCALLISTING
|
||||||
#endif
|
#endif
|
||||||
|
@ -82,11 +95,6 @@ cvar_t net_enabled = CVARD("net_enabled", "1", "If 0, disables all network acce
|
||||||
|
|
||||||
extern cvar_t sv_public, sv_listen_qw, sv_listen_nq, sv_listen_dp, sv_listen_q3;
|
extern cvar_t sv_public, sv_listen_qw, sv_listen_nq, sv_listen_dp, sv_listen_q3;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define MAX_LOOPBACK 64
|
#define MAX_LOOPBACK 64
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -6617,4 +6625,3 @@ vfsfile_t *FS_OpenTCP(const char *name, int defaultport)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -4,10 +4,17 @@
|
||||||
|
|
||||||
#ifndef HAVE_PACKET
|
#ifndef HAVE_PACKET
|
||||||
|
|
||||||
|
#ifndef _XBOX
|
||||||
struct sockaddr
|
struct sockaddr
|
||||||
{
|
{
|
||||||
short sa_family;
|
short sa_family;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define ntohs BigShort
|
||||||
|
#define htons BigShort
|
||||||
|
#define htonl BigLong
|
||||||
|
#define ntohl BigLong
|
||||||
|
#endif
|
||||||
/* struct sockaddr_in
|
/* struct sockaddr_in
|
||||||
{
|
{
|
||||||
short sin_family;
|
short sin_family;
|
||||||
|
@ -27,10 +34,7 @@
|
||||||
char url[64];
|
char url[64];
|
||||||
};
|
};
|
||||||
|
|
||||||
#define ntohs BigShort
|
|
||||||
#define htons BigShort
|
|
||||||
#define htonl BigLong
|
|
||||||
#define ntohl BigLong
|
|
||||||
|
|
||||||
#elif defined(_WIN32)
|
#elif defined(_WIN32)
|
||||||
#ifdef _XBOX
|
#ifdef _XBOX
|
||||||
|
|
|
@ -8,6 +8,12 @@
|
||||||
#define HMONITOR_DECLARED
|
#define HMONITOR_DECLARED
|
||||||
DECLARE_HANDLE(HMONITOR);
|
DECLARE_HANDLE(HMONITOR);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _XBOX
|
||||||
|
#include <xtl.h>
|
||||||
|
#define D3DLOCK_DISCARD 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <d3d8.h>
|
#include <d3d8.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -3200,12 +3206,16 @@ static void R_DrawPortal(batch_t *batch, batch_t **blist)
|
||||||
glplane[1] = plane.normal[1];
|
glplane[1] = plane.normal[1];
|
||||||
glplane[2] = plane.normal[2];
|
glplane[2] = plane.normal[2];
|
||||||
glplane[3] = -plane.dist;
|
glplane[3] = -plane.dist;
|
||||||
|
#ifndef _XBOX
|
||||||
IDirect3DDevice8_SetClipPlane(pD3DDev8, 0, glplane);
|
IDirect3DDevice8_SetClipPlane(pD3DDev8, 0, glplane);
|
||||||
IDirect3DDevice8_SetRenderState(pD3DDev8, D3DRS_CLIPPLANEENABLE, D3DCLIPPLANE0);
|
IDirect3DDevice8_SetRenderState(pD3DDev8, D3DRS_CLIPPLANEENABLE, D3DCLIPPLANE0);
|
||||||
|
#endif
|
||||||
Surf_SetupFrame();
|
Surf_SetupFrame();
|
||||||
R_RenderScene();
|
R_RenderScene();
|
||||||
IDirect3DDevice8_SetRenderState(pD3DDev8, D3DRS_CLIPPLANEENABLE, 0);
|
|
||||||
|
|
||||||
|
#ifndef _XBOX
|
||||||
|
IDirect3DDevice8_SetRenderState(pD3DDev8, D3DRS_CLIPPLANEENABLE, 0);
|
||||||
|
#endif
|
||||||
for (sort = 0; sort < SHADER_SORT_COUNT; sort++)
|
for (sort = 0; sort < SHADER_SORT_COUNT; sort++)
|
||||||
for (batch = blist[sort]; batch; batch = batch->next)
|
for (batch = blist[sort]; batch; batch = batch->next)
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,6 +5,13 @@
|
||||||
#define HMONITOR_DECLARED
|
#define HMONITOR_DECLARED
|
||||||
DECLARE_HANDLE(HMONITOR);
|
DECLARE_HANDLE(HMONITOR);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _XBOX
|
||||||
|
#include <xtl.h>
|
||||||
|
#define D3DLOCK_NOSYSLOCK 0
|
||||||
|
#define D3DLOCK_DISCARD 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <d3d8.h>
|
#include <d3d8.h>
|
||||||
extern LPDIRECT3DDEVICE8 pD3DDev8;
|
extern LPDIRECT3DDEVICE8 pD3DDev8;
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,10 @@
|
||||||
//#define FIXME
|
//#define FIXME
|
||||||
#include "winquake.h"
|
#include "winquake.h"
|
||||||
|
|
||||||
|
#ifdef _XBOX
|
||||||
|
#include <xtl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(HMONITOR_DECLARED) && (WINVER < 0x0500)
|
#if !defined(HMONITOR_DECLARED) && (WINVER < 0x0500)
|
||||||
#define HMONITOR_DECLARED
|
#define HMONITOR_DECLARED
|
||||||
DECLARE_HANDLE(HMONITOR);
|
DECLARE_HANDLE(HMONITOR);
|
||||||
|
@ -154,6 +158,7 @@ static modestate_t modestate;
|
||||||
|
|
||||||
static void D3DVID_UpdateWindowStatus (HWND hWnd)
|
static void D3DVID_UpdateWindowStatus (HWND hWnd)
|
||||||
{
|
{
|
||||||
|
#ifndef _XBOX
|
||||||
POINT p;
|
POINT p;
|
||||||
RECT nr;
|
RECT nr;
|
||||||
int window_width, window_height;
|
int window_width, window_height;
|
||||||
|
@ -183,6 +188,7 @@ static void D3DVID_UpdateWindowStatus (HWND hWnd)
|
||||||
window_center_y = (window_rect.top + window_rect.bottom) / 2;
|
window_center_y = (window_rect.top + window_rect.bottom) / 2;
|
||||||
|
|
||||||
INS_UpdateClipCursor ();
|
INS_UpdateClipCursor ();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static qboolean D3D8AppActivate(BOOL fActive, BOOL minimize)
|
static qboolean D3D8AppActivate(BOOL fActive, BOOL minimize)
|
||||||
|
@ -231,10 +237,7 @@ static qboolean D3D8AppActivate(BOOL fActive, BOOL minimize)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef _XBOX
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static LRESULT WINAPI D3D8_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
static LRESULT WINAPI D3D8_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
LONG lRet = 1;
|
LONG lRet = 1;
|
||||||
|
@ -428,6 +431,7 @@ static LRESULT WINAPI D3D8_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
|
||||||
/* return 1 if handled message, 0 if not */
|
/* return 1 if handled message, 0 if not */
|
||||||
return lRet;
|
return lRet;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void D3D8_VID_SwapBuffers(void)
|
static void D3D8_VID_SwapBuffers(void)
|
||||||
{
|
{
|
||||||
|
@ -580,7 +584,9 @@ static qboolean initD3D8Device(HWND hWnd, rendererstate_t *info, unsigned int de
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef _XBOX
|
||||||
cflags = D3DCREATE_FPU_PRESERVE;
|
cflags = D3DCREATE_FPU_PRESERVE;
|
||||||
|
#endif
|
||||||
if ((caps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT) && (caps.DevCaps & D3DDEVCAPS_PUREDEVICE))
|
if ((caps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT) && (caps.DevCaps & D3DDEVCAPS_PUREDEVICE))
|
||||||
cflags |= D3DCREATE_HARDWARE_VERTEXPROCESSING;
|
cflags |= D3DCREATE_HARDWARE_VERTEXPROCESSING;
|
||||||
else
|
else
|
||||||
|
@ -599,6 +605,7 @@ static qboolean initD3D8Device(HWND hWnd, rendererstate_t *info, unsigned int de
|
||||||
|
|
||||||
if (pD3DDev8)
|
if (pD3DDev8)
|
||||||
{
|
{
|
||||||
|
#ifndef _XBOX
|
||||||
HMONITOR hm;
|
HMONITOR hm;
|
||||||
MONITORINFO mi;
|
MONITORINFO mi;
|
||||||
char *s;
|
char *s;
|
||||||
|
@ -632,6 +639,7 @@ static qboolean initD3D8Device(HWND hWnd, rendererstate_t *info, unsigned int de
|
||||||
AdjustWindowRectEx(&rect, WS_OVERLAPPEDWINDOW, FALSE, 0);
|
AdjustWindowRectEx(&rect, WS_OVERLAPPEDWINDOW, FALSE, 0);
|
||||||
MoveWindow(d3dpp.hDeviceWindow, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, false);
|
MoveWindow(d3dpp.hDeviceWindow, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, false);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
D3D8Shader_Init();
|
D3D8Shader_Init();
|
||||||
return true; //successful
|
return true; //successful
|
||||||
}
|
}
|
||||||
|
@ -653,6 +661,10 @@ static qboolean initD3D8Device(HWND hWnd, rendererstate_t *info, unsigned int de
|
||||||
|
|
||||||
static void initD3D8(HWND hWnd, rendererstate_t *info)
|
static void initD3D8(HWND hWnd, rendererstate_t *info)
|
||||||
{
|
{
|
||||||
|
#ifdef _XBOX
|
||||||
|
LPDIRECT3D8 pDirect3DCreate8 = NULL;
|
||||||
|
pDirect3DCreate8 = Direct3DCreate8( D3D_SDK_VERSION );
|
||||||
|
#else
|
||||||
int i;
|
int i;
|
||||||
int numadaptors;
|
int numadaptors;
|
||||||
D3DADAPTER_IDENTIFIER8 inf;
|
D3DADAPTER_IDENTIFIER8 inf;
|
||||||
|
@ -660,6 +672,7 @@ static void initD3D8(HWND hWnd, rendererstate_t *info)
|
||||||
static HMODULE d3d8dll;
|
static HMODULE d3d8dll;
|
||||||
LPDIRECT3D8 (WINAPI *pDirect3DCreate8) (int version);
|
LPDIRECT3D8 (WINAPI *pDirect3DCreate8) (int version);
|
||||||
|
|
||||||
|
|
||||||
if (!d3d8dll)
|
if (!d3d8dll)
|
||||||
d3d8dll = LoadLibrary("d3d8.dll");
|
d3d8dll = LoadLibrary("d3d8.dll");
|
||||||
if (!d3d8dll)
|
if (!d3d8dll)
|
||||||
|
@ -702,10 +715,22 @@ static void initD3D8(HWND hWnd, rendererstate_t *info)
|
||||||
if (initD3D8Device(hWnd, info, i, D3DDEVTYPE_REF))
|
if (initD3D8Device(hWnd, info, i, D3DDEVTYPE_REF))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static qboolean D3D8_VID_Init(rendererstate_t *info, unsigned char *palette)
|
static qboolean D3D8_VID_Init(rendererstate_t *info, unsigned char *palette)
|
||||||
{
|
{
|
||||||
|
#ifdef _XBOX
|
||||||
|
vid.pixelwidth = 640;
|
||||||
|
vid.pixelheight = 480;
|
||||||
|
|
||||||
|
vid.width = 640;
|
||||||
|
vid.height = 480;
|
||||||
|
|
||||||
|
vid_initializing = false;
|
||||||
|
|
||||||
|
IDirect3DDevice8_SetRenderState(pD3DDev8, D3DRS_LIGHTING, FALSE);
|
||||||
|
#else
|
||||||
DWORD width = info->width;
|
DWORD width = info->width;
|
||||||
DWORD height = info->height;
|
DWORD height = info->height;
|
||||||
//DWORD bpp = info->bpp;
|
//DWORD bpp = info->bpp;
|
||||||
|
@ -808,10 +833,12 @@ static qboolean D3D8_VID_Init(rendererstate_t *info, unsigned char *palette)
|
||||||
rf->VID_SetCursor = WIN_SetCursor;
|
rf->VID_SetCursor = WIN_SetCursor;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void (D3D8_VID_DeInit) (void)
|
static void (D3D8_VID_DeInit) (void)
|
||||||
{
|
{
|
||||||
|
#ifndef _XBOX
|
||||||
Image_Shutdown();
|
Image_Shutdown();
|
||||||
|
|
||||||
/*final shutdown, kill the video stuff*/
|
/*final shutdown, kill the video stuff*/
|
||||||
|
@ -840,6 +867,7 @@ static void (D3D8_VID_DeInit) (void)
|
||||||
// Cvar_Unhook(&v_gamma);
|
// Cvar_Unhook(&v_gamma);
|
||||||
// Cvar_Unhook(&v_contrast);
|
// Cvar_Unhook(&v_contrast);
|
||||||
// Cvar_Unhook(&v_brightness);
|
// Cvar_Unhook(&v_brightness);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
qboolean D3D8_VID_ApplyGammaRamps (unsigned int gammarampsize, unsigned short *ramps)
|
qboolean D3D8_VID_ApplyGammaRamps (unsigned int gammarampsize, unsigned short *ramps)
|
||||||
|
@ -915,7 +943,9 @@ static char *(D3D8_VID_GetRGBInfo) (int *truevidwidth, int *truevidheight, enu
|
||||||
}
|
}
|
||||||
static void (D3D8_VID_SetWindowCaption) (const char *msg)
|
static void (D3D8_VID_SetWindowCaption) (const char *msg)
|
||||||
{
|
{
|
||||||
|
#ifndef _XBOX
|
||||||
SetWindowText(mainwindow, msg);
|
SetWindowText(mainwindow, msg);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void D3D8_Set2D (void)
|
void D3D8_Set2D (void)
|
||||||
|
@ -997,6 +1027,7 @@ static qboolean (D3D8_SCR_UpdateScreen) (void)
|
||||||
Cvar_ForceCallback(&vid_conwidth);
|
Cvar_ForceCallback(&vid_conwidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef _XBOX
|
||||||
switch (IDirect3DDevice8_TestCooperativeLevel(pD3DDev8))
|
switch (IDirect3DDevice8_TestCooperativeLevel(pD3DDev8))
|
||||||
{
|
{
|
||||||
case D3DERR_DEVICELOST:
|
case D3DERR_DEVICELOST:
|
||||||
|
@ -1018,6 +1049,7 @@ static qboolean (D3D8_SCR_UpdateScreen) (void)
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
D3D8BE_Reset(false);
|
D3D8BE_Reset(false);
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.7 KiB |
|
@ -5,8 +5,12 @@
|
||||||
#include "gl_draw.h"
|
#include "gl_draw.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#ifdef _XBOX
|
||||||
|
#include <xtl.h>
|
||||||
|
#else
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
void Font_Init(void);
|
void Font_Init(void);
|
||||||
|
|
|
@ -494,7 +494,7 @@ int QCC_CopyString (char *str)
|
||||||
|
|
||||||
old = strofs;
|
old = strofs;
|
||||||
len = strlen(str)+1;
|
len = strlen(str)+1;
|
||||||
if (strofs + len > MAX_STRINGS)
|
if ( (strofs + len) > MAX_STRINGS)
|
||||||
QCC_Error(ERR_INTERNAL, "QCC_CopyString: stringtable size limit exceeded\n");
|
QCC_Error(ERR_INTERNAL, "QCC_CopyString: stringtable size limit exceeded\n");
|
||||||
memcpy (strings+strofs, str, len);
|
memcpy (strings+strofs, str, len);
|
||||||
strofs += len;
|
strofs += len;
|
||||||
|
@ -511,7 +511,7 @@ int QCC_CopyStringLength (char *str, size_t length)
|
||||||
return !flag_nullemptystr;
|
return !flag_nullemptystr;
|
||||||
|
|
||||||
old = strofs;
|
old = strofs;
|
||||||
if (strofs + length > MAX_STRINGS)
|
if ( (strofs + length) > MAX_STRINGS)
|
||||||
QCC_Error(ERR_INTERNAL, "QCC_CopyString: stringtable size limit exceeded\n");
|
QCC_Error(ERR_INTERNAL, "QCC_CopyString: stringtable size limit exceeded\n");
|
||||||
memcpy (strings+strofs, str, length);
|
memcpy (strings+strofs, str, length);
|
||||||
strofs += length;
|
strofs += length;
|
||||||
|
@ -530,7 +530,7 @@ int QCC_CopyDupBackString (char *str)
|
||||||
|
|
||||||
old = strofs;
|
old = strofs;
|
||||||
length = strlen(str)+1;
|
length = strlen(str)+1;
|
||||||
if (strofs + length > MAX_STRINGS)
|
if ( (strofs + length) > MAX_STRINGS)
|
||||||
QCC_Error(ERR_INTERNAL, "QCC_CopyString: stringtable size limit exceeded\n");
|
QCC_Error(ERR_INTERNAL, "QCC_CopyString: stringtable size limit exceeded\n");
|
||||||
strcpy (strings+strofs, str);
|
strcpy (strings+strofs, str);
|
||||||
strofs += length;
|
strofs += length;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "progsint.h"
|
#include "progsint.h"
|
||||||
#include "qcc.h"
|
#include "qcc.h"
|
||||||
|
|
||||||
#if !defined(NO_ZLIB) && !defined(FTE_TARGET_WEB) && !defined(NACL)
|
#if !defined(NO_ZLIB) && !defined(FTE_TARGET_WEB) && !defined(NACL) && !defined(_XBOX)
|
||||||
#define AVAIL_ZLIB
|
#define AVAIL_ZLIB
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -316,9 +316,15 @@
|
||||||
<File
|
<File
|
||||||
RelativePath="..\client\fragstats.c">
|
RelativePath="..\client\fragstats.c">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\http\httpclient.c">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\client\image.c">
|
RelativePath="..\client\image.c">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\client\in_generic.c">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\client\keys.c">
|
RelativePath="..\client\keys.c">
|
||||||
</File>
|
</File>
|
||||||
|
@ -397,6 +403,9 @@
|
||||||
<File
|
<File
|
||||||
RelativePath="..\client\skin.c">
|
RelativePath="..\client\skin.c">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\client\snd_dma.c">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\client\snd_mem.c">
|
RelativePath="..\client\snd_mem.c">
|
||||||
</File>
|
</File>
|
||||||
|
@ -559,6 +568,9 @@
|
||||||
<File
|
<File
|
||||||
RelativePath="..\qclib\qccmain.c">
|
RelativePath="..\qclib\qccmain.c">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\qclib\qcd_main.c">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\qclib\qcdecomp.c">
|
RelativePath="..\qclib\qcdecomp.c">
|
||||||
</File>
|
</File>
|
||||||
|
|
Loading…
Reference in a new issue