mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 06:32:00 +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)
|
||||
{
|
||||
char *match;
|
||||
|
@ -986,7 +986,7 @@ void R2D_Font_Changed(void)
|
|||
if (qrenderer == QR_NONE)
|
||||
return;
|
||||
|
||||
#if defined(_WIN32) && !defined(FTE_SDL) && !defined(WINRT)
|
||||
#if defined(_WIN32) && !defined(FTE_SDL) && !defined(WINRT) && !defined(_XBOX)
|
||||
if (!strcmp(gl_font.string, "?"))
|
||||
{
|
||||
BOOL (APIENTRY *pChooseFontW)(LPCHOOSEFONTW) = NULL;
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#include "quakedef.h"
|
||||
#include <xtl.h>
|
||||
|
||||
#define MAXPRINTMSG 1024 // Yes
|
||||
qboolean isDedicated = false;
|
||||
|
||||
/*Timers, supposedly xbox supports QueryPerformanceCounter stuff*/
|
||||
double Sys_DoubleTime (void)
|
||||
|
@ -69,7 +71,7 @@ void VARGS Sys_Printf (char *fmt, ...)
|
|||
char msg[MAXPRINTMSG];
|
||||
|
||||
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.
|
||||
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.
|
||||
}
|
||||
|
||||
void Sys_RecentServer(char *command, char *target, char *title, char *desc) {
|
||||
|
||||
}
|
||||
|
||||
/*check any system message queues here*/
|
||||
void Sys_SendKeyEvents(void)
|
||||
{
|
||||
|
@ -195,9 +201,6 @@ void main( int argc, char **argv)
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*input stubs
|
||||
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);
|
||||
|
@ -237,4 +240,11 @@ void INS_EnumerateDevices(void *ctx, void(*callback)(void *ctx, const char *type
|
|||
#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_ZLIB
|
||||
#define NOMEDIA
|
||||
#define NO_FREETYPE
|
||||
#define HAVE_PACKET
|
||||
#endif
|
||||
|
||||
#ifdef NACL
|
||||
|
@ -400,6 +402,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#endif
|
||||
|
||||
#if defined(_XBOX)
|
||||
#define D3DQUAKE
|
||||
#define D3D8QUAKE
|
||||
#undef HAVE_TCP //FIXME
|
||||
#undef HAVE_PACKET //FIXME
|
||||
#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 RAGDOLL //needs a proper physics engine
|
||||
#undef AVAIL_MP3_ACM //api not supported
|
||||
#undef AVAIL_OPENAL
|
||||
#undef HAVE_SPEECHTOTEXT //api not supported
|
||||
#undef MULTITHREAD //no CreateThread stuff.
|
||||
#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
|
||||
|
||||
#ifdef FTE_TARGET_WEB
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
//#define D3D9QUAKE
|
||||
//#define GLQUAKE
|
||||
#undef D3D11QUAKE
|
||||
#define D3D8QUAKE
|
||||
#undef VKQUAKE
|
||||
#undef HEADLESSQUAKE
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#define Z_Free free
|
||||
#define Z_Malloc malloc
|
||||
#else
|
||||
#if !defined(_WIN32) || defined(FTE_SDL) || defined(WINRT)
|
||||
#if !defined(_WIN32) || defined(FTE_SDL) || defined(WINRT) || defined(_XBOX)
|
||||
#define FSSTDIO_OpenPath VFSOS_OpenPath
|
||||
#endif
|
||||
#define FSSTDIO_OpenTemp FS_OpenTemp
|
||||
|
@ -196,7 +196,7 @@ vfsfile_t *VFSSTDIO_Open(const char *osname, const char *mode, qboolean *needsfl
|
|||
}
|
||||
|
||||
#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 *f;
|
||||
|
|
|
@ -23,6 +23,19 @@ struct sockaddr;
|
|||
#include "quakedef.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)
|
||||
#define USE_GETHOSTNAME_LOCALLISTING
|
||||
#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;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define MAX_LOOPBACK 64
|
||||
typedef struct
|
||||
{
|
||||
|
@ -6617,4 +6625,3 @@ vfsfile_t *FS_OpenTCP(const char *name, int defaultport)
|
|||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -4,10 +4,17 @@
|
|||
|
||||
#ifndef HAVE_PACKET
|
||||
|
||||
#ifndef _XBOX
|
||||
struct sockaddr
|
||||
{
|
||||
short sa_family;
|
||||
};
|
||||
|
||||
#define ntohs BigShort
|
||||
#define htons BigShort
|
||||
#define htonl BigLong
|
||||
#define ntohl BigLong
|
||||
#endif
|
||||
/* struct sockaddr_in
|
||||
{
|
||||
short sin_family;
|
||||
|
@ -27,10 +34,7 @@
|
|||
char url[64];
|
||||
};
|
||||
|
||||
#define ntohs BigShort
|
||||
#define htons BigShort
|
||||
#define htonl BigLong
|
||||
#define ntohl BigLong
|
||||
|
||||
|
||||
#elif defined(_WIN32)
|
||||
#ifdef _XBOX
|
||||
|
|
|
@ -8,6 +8,12 @@
|
|||
#define HMONITOR_DECLARED
|
||||
DECLARE_HANDLE(HMONITOR);
|
||||
#endif
|
||||
|
||||
#ifdef _XBOX
|
||||
#include <xtl.h>
|
||||
#define D3DLOCK_DISCARD 0
|
||||
#endif
|
||||
|
||||
#include <d3d8.h>
|
||||
|
||||
/*
|
||||
|
@ -3200,12 +3206,16 @@ static void R_DrawPortal(batch_t *batch, batch_t **blist)
|
|||
glplane[1] = plane.normal[1];
|
||||
glplane[2] = plane.normal[2];
|
||||
glplane[3] = -plane.dist;
|
||||
#ifndef _XBOX
|
||||
IDirect3DDevice8_SetClipPlane(pD3DDev8, 0, glplane);
|
||||
IDirect3DDevice8_SetRenderState(pD3DDev8, D3DRS_CLIPPLANEENABLE, D3DCLIPPLANE0);
|
||||
#endif
|
||||
Surf_SetupFrame();
|
||||
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 (batch = blist[sort]; batch; batch = batch->next)
|
||||
{
|
||||
|
|
|
@ -5,6 +5,13 @@
|
|||
#define HMONITOR_DECLARED
|
||||
DECLARE_HANDLE(HMONITOR);
|
||||
#endif
|
||||
|
||||
#ifdef _XBOX
|
||||
#include <xtl.h>
|
||||
#define D3DLOCK_NOSYSLOCK 0
|
||||
#define D3DLOCK_DISCARD 0
|
||||
#endif
|
||||
|
||||
#include <d3d8.h>
|
||||
extern LPDIRECT3DDEVICE8 pD3DDev8;
|
||||
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
//#define FIXME
|
||||
#include "winquake.h"
|
||||
|
||||
#ifdef _XBOX
|
||||
#include <xtl.h>
|
||||
#endif
|
||||
|
||||
#if !defined(HMONITOR_DECLARED) && (WINVER < 0x0500)
|
||||
#define HMONITOR_DECLARED
|
||||
DECLARE_HANDLE(HMONITOR);
|
||||
|
@ -154,6 +158,7 @@ static modestate_t modestate;
|
|||
|
||||
static void D3DVID_UpdateWindowStatus (HWND hWnd)
|
||||
{
|
||||
#ifndef _XBOX
|
||||
POINT p;
|
||||
RECT nr;
|
||||
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;
|
||||
|
||||
INS_UpdateClipCursor ();
|
||||
#endif
|
||||
}
|
||||
|
||||
static qboolean D3D8AppActivate(BOOL fActive, BOOL minimize)
|
||||
|
@ -231,10 +237,7 @@ static qboolean D3D8AppActivate(BOOL fActive, BOOL minimize)
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef _XBOX
|
||||
static LRESULT WINAPI D3D8_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
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 lRet;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void D3D8_VID_SwapBuffers(void)
|
||||
{
|
||||
|
@ -580,7 +584,9 @@ static qboolean initD3D8Device(HWND hWnd, rendererstate_t *info, unsigned int de
|
|||
break;
|
||||
}
|
||||
|
||||
#ifndef _XBOX
|
||||
cflags = D3DCREATE_FPU_PRESERVE;
|
||||
#endif
|
||||
if ((caps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT) && (caps.DevCaps & D3DDEVCAPS_PUREDEVICE))
|
||||
cflags |= D3DCREATE_HARDWARE_VERTEXPROCESSING;
|
||||
else
|
||||
|
@ -599,6 +605,7 @@ static qboolean initD3D8Device(HWND hWnd, rendererstate_t *info, unsigned int de
|
|||
|
||||
if (pD3DDev8)
|
||||
{
|
||||
#ifndef _XBOX
|
||||
HMONITOR hm;
|
||||
MONITORINFO mi;
|
||||
char *s;
|
||||
|
@ -632,6 +639,7 @@ static qboolean initD3D8Device(HWND hWnd, rendererstate_t *info, unsigned int de
|
|||
AdjustWindowRectEx(&rect, WS_OVERLAPPEDWINDOW, FALSE, 0);
|
||||
MoveWindow(d3dpp.hDeviceWindow, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, false);
|
||||
}
|
||||
#endif
|
||||
D3D8Shader_Init();
|
||||
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)
|
||||
{
|
||||
#ifdef _XBOX
|
||||
LPDIRECT3D8 pDirect3DCreate8 = NULL;
|
||||
pDirect3DCreate8 = Direct3DCreate8( D3D_SDK_VERSION );
|
||||
#else
|
||||
int i;
|
||||
int numadaptors;
|
||||
D3DADAPTER_IDENTIFIER8 inf;
|
||||
|
@ -660,6 +672,7 @@ static void initD3D8(HWND hWnd, rendererstate_t *info)
|
|||
static HMODULE d3d8dll;
|
||||
LPDIRECT3D8 (WINAPI *pDirect3DCreate8) (int version);
|
||||
|
||||
|
||||
if (!d3d8dll)
|
||||
d3d8dll = LoadLibrary("d3d8.dll");
|
||||
if (!d3d8dll)
|
||||
|
@ -702,10 +715,22 @@ static void initD3D8(HWND hWnd, rendererstate_t *info)
|
|||
if (initD3D8Device(hWnd, info, i, D3DDEVTYPE_REF))
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
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 height = info->height;
|
||||
//DWORD bpp = info->bpp;
|
||||
|
@ -808,10 +833,12 @@ static qboolean D3D8_VID_Init(rendererstate_t *info, unsigned char *palette)
|
|||
rf->VID_SetCursor = WIN_SetCursor;
|
||||
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void (D3D8_VID_DeInit) (void)
|
||||
{
|
||||
#ifndef _XBOX
|
||||
Image_Shutdown();
|
||||
|
||||
/*final shutdown, kill the video stuff*/
|
||||
|
@ -840,6 +867,7 @@ static void (D3D8_VID_DeInit) (void)
|
|||
// Cvar_Unhook(&v_gamma);
|
||||
// Cvar_Unhook(&v_contrast);
|
||||
// Cvar_Unhook(&v_brightness);
|
||||
#endif
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
#ifndef _XBOX
|
||||
SetWindowText(mainwindow, msg);
|
||||
#endif
|
||||
}
|
||||
|
||||
void D3D8_Set2D (void)
|
||||
|
@ -997,6 +1027,7 @@ static qboolean (D3D8_SCR_UpdateScreen) (void)
|
|||
Cvar_ForceCallback(&vid_conwidth);
|
||||
}
|
||||
|
||||
#ifndef _XBOX
|
||||
switch (IDirect3DDevice8_TestCooperativeLevel(pD3DDev8))
|
||||
{
|
||||
case D3DERR_DEVICELOST:
|
||||
|
@ -1018,6 +1049,7 @@ static qboolean (D3D8_SCR_UpdateScreen) (void)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
D3D8BE_Reset(false);
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.7 KiB |
|
@ -5,7 +5,11 @@
|
|||
#include "gl_draw.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#ifdef _XBOX
|
||||
#include <xtl.h>
|
||||
#else
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
|
||||
|
|
|
@ -494,7 +494,7 @@ int QCC_CopyString (char *str)
|
|||
|
||||
old = strofs;
|
||||
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");
|
||||
memcpy (strings+strofs, str, len);
|
||||
strofs += len;
|
||||
|
@ -511,7 +511,7 @@ int QCC_CopyStringLength (char *str, size_t length)
|
|||
return !flag_nullemptystr;
|
||||
|
||||
old = strofs;
|
||||
if (strofs + length > MAX_STRINGS)
|
||||
if ( (strofs + length) > MAX_STRINGS)
|
||||
QCC_Error(ERR_INTERNAL, "QCC_CopyString: stringtable size limit exceeded\n");
|
||||
memcpy (strings+strofs, str, length);
|
||||
strofs += length;
|
||||
|
@ -530,7 +530,7 @@ int QCC_CopyDupBackString (char *str)
|
|||
|
||||
old = strofs;
|
||||
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");
|
||||
strcpy (strings+strofs, str);
|
||||
strofs += length;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "progsint.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
|
||||
#endif
|
||||
|
||||
|
|
Binary file not shown.
|
@ -316,9 +316,15 @@
|
|||
<File
|
||||
RelativePath="..\client\fragstats.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\http\httpclient.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\client\image.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\client\in_generic.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\client\keys.c">
|
||||
</File>
|
||||
|
@ -397,6 +403,9 @@
|
|||
<File
|
||||
RelativePath="..\client\skin.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\client\snd_dma.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\client\snd_mem.c">
|
||||
</File>
|
||||
|
@ -559,6 +568,9 @@
|
|||
<File
|
||||
RelativePath="..\qclib\qccmain.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\qclib\qcd_main.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\qclib\qcdecomp.c">
|
||||
</File>
|
||||
|
|
Loading…
Reference in a new issue