XBOX was eXecuted

This commit is contained in:
Monster Iestyn 2017-09-29 19:27:17 +01:00
parent 330399ea9b
commit 5a16c39af0
32 changed files with 64 additions and 415 deletions

View File

@ -525,10 +525,6 @@ ifdef DJGPPDOS
all: pre-build $(BIN)/$(EXENAME)
endif
ifdef XBOX
all: pre-build $(BIN)/$(BINNAME)
endif
ifdef PS3N
all: pre-build $(BIN)/$(PKGNAME)
endif
@ -547,7 +543,6 @@ endif
ifndef PSP
ifndef XBOX
ifdef MINGW
ifndef SDL
all: pre-build $(BIN)/$(EXENAME) dll
@ -558,7 +553,6 @@ endif
ifdef SDL
all: pre-build $(BIN)/$(EXENAME)
endif
endif
ifdef NDS
all: $(BIN)/$(EXENAME:.elf=.nds)
@ -782,14 +776,6 @@ $(OBJDIR)/%.o: %.s
$(OBJDIR)/SRB2.res: win32/Srb2win.rc win32/afxres.h win32/resource.h
$(WINDRES) -i $< -O rc $(WINDRESFLAGS) --include-dir=win32 -o $@ -O coff
ifdef XBOX
$(OBJDIR)/xboxhelp.o: $(INTERFACE)/SRB2XBOX/xboxhelp.c
$(CC) $(CFLAGS) $(WFLAGS) -c $< -o $@
$(BIN)/$(BINNAME): $(BIN)/$(EXENAME)
$(CXBE) -OUT:"$@" -DUMPINFO:"$(BIN)/SRB2XBOX.cxbe" -TITLE:"Sonic Robo Blast 2" $<
endif
ifdef NDS
$(BIN)/$(EXENAME:.elf=.nds): $(BIN)/$(EXENAME:.elf=.arm9)
$(NDSTOOL) -c $@ -9 $(BIN)/$(EXENAME:.elf=.arm9)

View File

@ -148,15 +148,11 @@ endif
ifdef GCC40
WFLAGS+=-Wold-style-definition
endif
ifndef XBOX
WFLAGS+=-Wmissing-prototypes -Wmissing-declarations
endif
ifdef GCC40
WFLAGS+=-Wmissing-field-initializers
endif
ifndef XBOX
WFLAGS+=-Wmissing-noreturn
endif
#WFLAGS+=-Wmissing-format-attribute
#WFLAGS+=-Wno-multichar
#WFLAGS+=-Wno-deprecated-declarations
@ -215,7 +211,6 @@ endif
#indicate platform and what interface use with
ifndef WINCE
ifndef XBOX
ifndef PSP
ifndef WII
ifndef PS3N
@ -238,7 +233,6 @@ endif
endif
endif
endif
endif
#determine the interface directory (where you put all i_*.c)
i_cdmus_o=$(OBJDIR)/i_cdmus.o
@ -358,15 +352,6 @@ ifdef MINGW
OBJDIR:=$(OBJDIR)/Mingw
BIN:=$(BIN)/Mingw
else
ifdef XBOX
INTERFACE=sdl12
NASMFORMAT=win32
PREFIX?=/usr/local/openxdk/bin/i386-pc-xbox
SDL=1
SDL12=1
OBJDIR:=$(OBJDIR)/XBOX
BIN:=$(BIN)/XBOX
else
ifdef PSP
INTERFACE=sdl12
NONX86=1
@ -403,7 +388,6 @@ endif
endif
endif
endif
endif
ifdef GP2X
ifdef SDL

View File

@ -12,9 +12,6 @@
#ifdef __GNUC__
#include <unistd.h>
#ifdef _XBOX
#include <openxdk/debug.h>
#endif
#endif
#include "doomdef.h"
@ -1211,9 +1208,6 @@ void CONS_Printf(const char *fmt, ...)
if (!con_started)
{
#if defined (_XBOX) && defined (__GNUC__)
if (!keyboard_started) debugPrint(txt);
#endif
#ifdef PC_DOS
CON_LogMessage(txt);
free(txt);

View File

@ -50,10 +50,6 @@
#include "f_finale.h"
#endif
#ifdef _XBOX
#include "sdl12/SRB2XBOX/xboxhelp.h"
#endif
//
// NETWORKING
//

View File

@ -30,15 +30,13 @@ int snprintf(char *str, size_t n, const char *fmt, ...);
//int vsnprintf(char *str, size_t n, const char *fmt, va_list ap);
#endif
#if (defined (_WIN32) && !defined (_WIN32_WCE)) && !defined (_XBOX)
#if defined (_WIN32) && !defined (_WIN32_WCE)
#include <direct.h>
#include <malloc.h>
#endif
#if !defined (UNDER_CE)
#include <time.h>
#elif defined (_XBOX)
#define NO_TIME
#endif
#include "doomdef.h"
@ -82,10 +80,6 @@ int snprintf(char *str, size_t n, const char *fmt, ...);
#include "config.h.in"
#endif
#ifdef _XBOX
#include "sdl12/SRB2XBOX/xboxhelp.h"
#endif
#ifdef HWRENDER
#include "hardware/hw_main.h" // 3D View Rendering
#endif
@ -120,13 +114,8 @@ INT32 postimgparam;
postimg_t postimgtype2 = postimg_none;
INT32 postimgparam2;
#ifdef _XBOX
boolean nomidimusic = true, nosound = true;
boolean nodigimusic = true;
#else
boolean nomidimusic = false, nosound = false;
boolean nodigimusic = false; // No fmod-based music
#endif
// These variables are only true if
// the respective sound system is initialized

View File

@ -244,7 +244,7 @@ INT32 cv_debug;
consvar_t cv_usemouse = {"use_mouse", "On", CV_SAVE|CV_CALL,usemouse_cons_t, I_StartupMouse, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_usemouse2 = {"use_mouse2", "Off", CV_SAVE|CV_CALL,usemouse_cons_t, I_StartupMouse2, 0, NULL, NULL, 0, 0, NULL};
#if defined (_XBOX) || defined (WMINPUT) || defined (_WII) //joystick 1 and 2
#if defined (WMINPUT) || defined (_WII) //joystick 1 and 2
consvar_t cv_usejoystick = {"use_joystick", "1", CV_SAVE|CV_CALL, usejoystick_cons_t,
I_InitJoystick, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_usejoystick2 = {"use_joystick2", "2", CV_SAVE|CV_CALL, usejoystick_cons_t,

View File

@ -22,10 +22,10 @@
#include <time.h>
#endif
#if ((defined (_WIN32) && !defined (_WIN32_WCE)) || defined (__DJGPP__)) && !defined (_XBOX)
#if ((defined (_WIN32) && !defined (_WIN32_WCE)) || defined (__DJGPP__))
#include <io.h>
#include <direct.h>
#elif !defined (_WIN32_WCE) && !(defined (_XBOX) && !defined (__GNUC__))
#elif !defined (_WIN32_WCE)
#include <sys/types.h>
#include <dirent.h>
#include <utime.h>

View File

@ -28,7 +28,7 @@
// Use Mixer interface?
#ifdef HAVE_MIXER
//#if !defined(_WIN32_WCE) && !defined(_XBOX) && !defined(GP2X)
//#if !defined(_WIN32_WCE) && !defined(GP2X)
#define SOUND SOUND_MIXER
#define NOHS // No HW3SOUND
#ifdef HW3SOUND
@ -116,7 +116,7 @@
#endif
#include <ctype.h>
#if ((defined (_WIN32) && !defined (_WIN32_WCE)) || defined (__DJGPP__)) && !defined (_XBOX)
#if (defined (_WIN32) && !defined (_WIN32_WCE)) || defined (__DJGPP__)
#include <io.h>
#endif

View File

@ -17,7 +17,7 @@
#ifndef __DOOMTYPE__
#define __DOOMTYPE__
#if (defined (_WIN32) && !defined (_XBOX)) || (defined (_WIN32_WCE) && !defined (__GNUC__))
#if defined (_WIN32) || (defined (_WIN32_WCE) && !defined (__GNUC__))
//#define WIN32_LEAN_AND_MEAN
#define RPC_NO_WINDOWS_H
#include <windows.h>
@ -173,7 +173,7 @@ size_t strlcpy(char *dst, const char *src, size_t siz);
//faB: clean that up !!
#if defined( _MSC_VER) && (_MSC_VER >= 1800) // MSVC 2013 and forward
#include "stdbool.h"
#elif (defined (_WIN32) || (defined (_WIN32_WCE) && !defined (__GNUC__))) && !defined (_XBOX)
#elif defined (_WIN32) || (defined (_WIN32_WCE) && !defined (__GNUC__))
#define false FALSE // use windows types
#define true TRUE
#define boolean BOOL
@ -304,10 +304,6 @@ typedef UINT32 tic_t;
#define ATTRPACK __attribute__((packed))
#endif
#define ATTRUNUSED __attribute__((unused))
#ifdef _XBOX
#define FILESTAMP I_OutputMsg("%s:%d\n",__FILE__,__LINE__);
#define XBOXSTATIC static
#endif
#elif defined (_MSC_VER)
#define ATTRNORETURN __declspec(noreturn)
#define ATTRINLINE __forceinline

View File

@ -16,7 +16,7 @@
#ifdef __GNUC__
#include <dirent.h>
#endif
#if defined (_WIN32) && !defined (_XBOX)
#ifdef _WIN32
//#define WIN32_LEAN_AND_MEAN
#define RPC_NO_WINDOWS_H
#include <windows.h>
@ -34,7 +34,7 @@
#include "z_zone.h"
#include "m_menu.h" // Addons_option_Onchange
#if (defined (_WIN32) && !defined (_WIN32_WCE)) && defined (_MSC_VER) && !defined (_XBOX)
#if (defined (_WIN32) && !defined (_WIN32_WCE)) && defined (_MSC_VER)
#include <errno.h>
#include <io.h>
@ -338,25 +338,7 @@ UINT8 refreshdirmenu = 0;
size_t packetsizetally = 0;
size_t mainwadstally = 0;
#if defined (_XBOX) && defined (_MSC_VER)
filestatus_t filesearch(char *filename, const char *startpath, const UINT8 *wantedmd5sum,
boolean completepath, int maxsearchdepth)
{
//NONE?
startpath = filename = NULL;
wantedmd5sum = NULL;
maxsearchdepth = 0;
completepath = false;
return FS_NOTFOUND;
}
boolean preparefilemenu(boolean samedepth)
{
(void)samedepth;
return false;
}
#elif defined (_WIN32_WCE)
#ifdef _WIN32_WCE
filestatus_t filesearch(char *filename, const char *startpath, const UINT8 *wantedmd5sum,
boolean completepath, int maxsearchdepth)
{

View File

@ -332,9 +332,6 @@ static CV_PossibleValue_t joyaxis_cons_t[] = {{0, "None"},
#endif
#else
{1, "X-Axis"}, {2, "Y-Axis"}, {-1, "X-Axis-"}, {-2, "Y-Axis-"},
#ifdef _XBOX
{3, "Alt X-Axis"}, {4, "Alt Y-Axis"}, {-3, "Alt X-Axis-"}, {-4, "Alt Y-Axis-"},
#else
#if JOYAXISSET > 1
{3, "Z-Axis"}, {4, "X-Rudder"}, {-3, "Z-Axis-"}, {-4, "X-Rudder-"},
#endif
@ -344,7 +341,6 @@ static CV_PossibleValue_t joyaxis_cons_t[] = {{0, "None"},
#if JOYAXISSET > 3
{7, "U-Axis"}, {8, "V-Axis"}, {-7, "U-Axis-"}, {-8, "V-Axis-"},
#endif
#endif
#endif
{0, NULL}};
#ifdef _WII
@ -404,21 +400,16 @@ consvar_t cv_moveaxis = {"joyaxis_move", "None", CV_SAVE, joyaxis_cons_t, NULL,
#else
consvar_t cv_moveaxis = {"joyaxis_move", "Y-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
#endif
#ifdef _XBOX
consvar_t cv_sideaxis = {"joyaxis_side", "Alt X-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_lookaxis = {"joyaxis_look", "Alt Y-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
#elif defined (PSP)
#ifdef PSP
consvar_t cv_sideaxis = {"joyaxis_side", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
#else
consvar_t cv_sideaxis = {"joyaxis_side", "Z-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
#endif
#ifndef _XBOX
#ifdef PSP
consvar_t cv_lookaxis = {"joyaxis_look", "Y-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
#else
consvar_t cv_lookaxis = {"joyaxis_look", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
#endif
#endif
consvar_t cv_fireaxis = {"joyaxis_fire", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_firenaxis = {"joyaxis_firenormal", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
#endif
@ -433,17 +424,12 @@ consvar_t cv_firenaxis2 = {"joyaxis2_firenormal", "RAnalog", CV_SAVE, joyaxis_co
#else
consvar_t cv_turnaxis2 = {"joyaxis2_turn", "X-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_moveaxis2 = {"joyaxis2_move", "Y-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
#ifdef _XBOX
consvar_t cv_sideaxis2 = {"joyaxis2_side", "Alt X-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_lookaxis2 = {"joyaxis2_look", "Alt Y-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
#elif defined (_PSP)
#ifdef _PSP
consvar_t cv_sideaxis2 = {"joyaxis2_side", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
#else
consvar_t cv_sideaxis2 = {"joyaxis2_side", "Z-Axis", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
#endif
#ifndef _XBOX
consvar_t cv_lookaxis2 = {"joyaxis2_look", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
#endif
consvar_t cv_fireaxis2 = {"joyaxis2_fire", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_firenaxis2 = {"joyaxis2_firenormal", "None", CV_SAVE, joyaxis_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
#endif

View File

@ -268,7 +268,7 @@ static keyname_t keynames[] =
{KEY_MOUSE1+0,"MOUSE1"},
{KEY_MOUSE1+1,"MOUSE2"},
{KEY_MOUSE1+2,"MOUSE3"},
#if !defined (_XBOX) && !defined (_PSP) && !defined (_WII)
#if !defined (_PSP) && !defined (_WII)
{KEY_MOUSE1+3,"MOUSE4"},
{KEY_MOUSE1+4,"MOUSE5"},
{KEY_MOUSE1+5,"MOUSE6"},
@ -278,7 +278,7 @@ static keyname_t keynames[] =
{KEY_2MOUSE1+0,"SEC_MOUSE2"}, // BP: sorry my mouse handler swap button 1 and 2
{KEY_2MOUSE1+1,"SEC_MOUSE1"},
{KEY_2MOUSE1+2,"SEC_MOUSE3"},
#if !defined (_XBOX) && !defined (_PSP) && !defined (_WII)
#if !defined (_PSP) && !defined (_WII)
{KEY_2MOUSE1+3,"SEC_MOUSE4"},
{KEY_2MOUSE1+4,"SEC_MOUSE5"},
{KEY_2MOUSE1+5,"SEC_MOUSE6"},
@ -290,21 +290,7 @@ static keyname_t keynames[] =
{KEY_2MOUSEWHEELUP, "Wheel 2 UP"},
{KEY_2MOUSEWHEELDOWN, "Wheel 2 Down"},
#ifdef _XBOX
{KEY_JOY1+0, "JOYA"},
{KEY_JOY1+1, "JOYB"},
{KEY_JOY1+2, "JOYX"},
{KEY_JOY1+3, "JOYY"},
{KEY_JOY1+4, "JOYG"},
{KEY_JOY1+5, "JOYW"},
{KEY_JOY1+6, "JOYL"},
{KEY_JOY1+7, "JOYR"},
{KEY_JOY1+8, "JOYS"},
{KEY_JOY1+9, "JOYN"},
{KEY_JOY1+10,"JOYW"},
{KEY_JOY1+11,"JOYE"},
#define NOMOREJOYBTN_1S
#elif defined (_PSP)
#ifdef _PSP
{KEY_JOY1+0, "TRIANGLE"},
{KEY_JOY1+1, "CIRCLE" },
{KEY_JOY1+2, "CROSS" },
@ -434,7 +420,7 @@ static keyname_t keynames[] =
{KEY_HAT1+1, "HATDOWN"},
{KEY_HAT1+2, "HATLEFT"},
{KEY_HAT1+3, "HATRIGHT"},
#if !defined (_XBOX) && !defined (_PSP) && !defined (_WII)
#if !defined (_PSP) && !defined (_WII)
{KEY_HAT1+4, "HATUP2"},
{KEY_HAT1+5, "HATDOWN2"},
{KEY_HAT1+6, "HATLEFT2"},
@ -452,7 +438,7 @@ static keyname_t keynames[] =
{KEY_DBLMOUSE1+0, "DBLMOUSE1"},
{KEY_DBLMOUSE1+1, "DBLMOUSE2"},
{KEY_DBLMOUSE1+2, "DBLMOUSE3"},
#if !defined (_XBOX) && !defined (_PSP) && !defined (_WII)
#if !defined (_PSP) && !defined (_WII)
{KEY_DBLMOUSE1+3, "DBLMOUSE4"},
{KEY_DBLMOUSE1+4, "DBLMOUSE5"},
{KEY_DBLMOUSE1+5, "DBLMOUSE6"},
@ -462,7 +448,7 @@ static keyname_t keynames[] =
{KEY_DBL2MOUSE1+0, "DBLSEC_MOUSE2"}, // BP: sorry my mouse handler swap button 1 and 2
{KEY_DBL2MOUSE1+1, "DBLSEC_MOUSE1"},
{KEY_DBL2MOUSE1+2, "DBLSEC_MOUSE3"},
#if !defined (_XBOX) && !defined (_PSP) && !defined (_WII)
#if !defined (_PSP) && !defined (_WII)
{KEY_DBL2MOUSE1+3, "DBLSEC_MOUSE4"},
{KEY_DBL2MOUSE1+4, "DBLSEC_MOUSE5"},
{KEY_DBL2MOUSE1+5, "DBLSEC_MOUSE6"},
@ -470,21 +456,7 @@ static keyname_t keynames[] =
{KEY_DBL2MOUSE1+7, "DBLSEC_MOUSE8"},
#endif
#ifdef _XBOX
{KEY_DBLJOY1+0, "DBLJOYA"},
{KEY_DBLJOY1+1, "DBLJOYB"},
{KEY_DBLJOY1+2, "DBLJOYX"},
{KEY_DBLJOY1+3, "DBLJOYY"},
{KEY_DBLJOY1+4, "DBLJOYG"},
{KEY_DBLJOY1+5, "DBLJOYW"},
{KEY_DBLJOY1+6, "DBLJOYL"},
{KEY_DBLJOY1+7, "DBLJOYR"},
{KEY_DBLJOY1+8, "DBLJOYS"},
{KEY_DBLJOY1+9, "DBLJOYN"},
{KEY_DBLJOY1+10,"DBLJOYW"},
{KEY_DBLJOY1+11,"DBLJOYE"},
#define NOMOREJOYBTN_1DBL
#elif defined (_PSP)
#ifdef _PSP
{KEY_DBLJOY1+0, "DBLTRIANGLE"},
{KEY_DBLJOY1+1, "DBLCIRCLE" },
{KEY_DBLJOY1+2, "DBLCROSS" },
@ -612,7 +584,7 @@ static keyname_t keynames[] =
{KEY_DBLHAT1+1, "DBLHATDOWN"},
{KEY_DBLHAT1+2, "DBLHATLEFT"},
{KEY_DBLHAT1+3, "DBLHATRIGHT"},
#if !defined (_XBOX) && !defined (_PSP) && !defined (_WII)
#if !defined (_PSP) && !defined (_WII)
{KEY_DBLHAT1+4, "DBLHATUP2"},
{KEY_DBLHAT1+5, "DBLHATDOWN2"},
{KEY_DBLHAT1+6, "DBLHATLEFT2"},
@ -627,21 +599,7 @@ static keyname_t keynames[] =
{KEY_DBLHAT1+15, "DBLHATRIGHT4"},
#endif
#ifdef _XBOX
{KEY_2JOY1+0, "SEC_JOYA"},
{KEY_2JOY1+1, "SEC_JOYB"},
{KEY_2JOY1+2, "SEC_JOYX"},
{KEY_2JOY1+3, "SEC_JOYY"},
{KEY_2JOY1+4, "SEC_JOYG"},
{KEY_2JOY1+5, "SEC_JOYW"},
{KEY_2JOY1+6, "SEC_JOYL"},
{KEY_2JOY1+7, "SEC_JOYR"},
{KEY_2JOY1+8, "SEC_JOYS"},
{KEY_2JOY1+9, "SEC_JOYN"},
{KEY_2JOY1+10,"SEC_JOYW"},
{KEY_2JOY1+11,"SEC_JOYE"},
#define NOMOREJOYBTN_2S
#elif defined (_PSP)
#ifdef _PSP
{KEY_2JOY1+0, "SEC_TRIANGLE"},
{KEY_2JOY1+1, "SEC_CIRCLE" },
{KEY_2JOY1+2, "SEC_CROSS" },
@ -751,7 +709,7 @@ static keyname_t keynames[] =
{KEY_2HAT1+1, "SEC_HATDOWN"},
{KEY_2HAT1+2, "SEC_HATLEFT"},
{KEY_2HAT1+3, "SEC_HATRIGHT"},
#if !defined (_XBOX) && !defined (_PSP) && !defined (_WII)
#if !defined (_PSP) && !defined (_WII)
{KEY_2HAT1+4, "SEC_HATUP2"},
{KEY_2HAT1+5, "SEC_HATDOWN2"},
{KEY_2HAT1+6, "SEC_HATLEFT2"},
@ -766,21 +724,7 @@ static keyname_t keynames[] =
{KEY_2HAT1+15, "SEC_HATRIGHT4"},
#endif
#ifdef _XBOX
{KEY_DBL2JOY1+0, "DBLSEC_JOYA"},
{KEY_DBL2JOY1+1, "DBLSEC_JOYB"},
{KEY_DBL2JOY1+2, "DBLSEC_JOYX"},
{KEY_DBL2JOY1+3, "DBLSEC_JOYY"},
{KEY_DBL2JOY1+4, "DBLSEC_JOYG"},
{KEY_DBL2JOY1+5, "DBLSEC_JOYW"},
{KEY_DBL2JOY1+6, "DBLSEC_JOYL"},
{KEY_DBL2JOY1+7, "DBLSEC_JOYR"},
{KEY_DBL2JOY1+8, "DBLSEC_JOYS"},
{KEY_DBL2JOY1+9, "DBLSEC_JOYN"},
{KEY_DBL2JOY1+10,"DBLSEC_JOYW"},
{KEY_DBL2JOY1+11,"DBLSEC_JOYE"},
#define NOMOREJOYBTN_2DBL
#elif defined (_PSP)
#ifdef _PSP
{KEY_DBL2JOY1+0, "DBLSEC_TRIANGLE"},
{KEY_DBL2JOY1+1, "DBLSEC_CIRCLE" },
{KEY_DBL2JOY1+2, "DBLSEC_CROSS" },
@ -888,7 +832,7 @@ static keyname_t keynames[] =
{KEY_DBL2HAT1+1, "DBLSEC_HATDOWN"},
{KEY_DBL2HAT1+2, "DBLSEC_HATLEFT"},
{KEY_DBL2HAT1+3, "DBLSEC_HATRIGHT"},
#if !defined (_XBOX) && !defined (_PSP) && !defined (_WII)
#if !defined (_PSP) && !defined (_WII)
{KEY_DBL2HAT1+4, "DBLSEC_HATUP2"},
{KEY_DBL2HAT1+5, "DBLSEC_HATDOWN2"},
{KEY_DBL2HAT1+6, "DBLSEC_HATLEFT2"},

View File

@ -23,12 +23,7 @@
#define NUMKEYS 256
#ifdef _XBOX
#define MOUSEBUTTONS 5
#define JOYBUTTONS 12 // 12 buttons
#define JOYHATS 1 // 1 hat
#define JOYAXISSET 2 // 2 Sets of 2 axises
#elif defined (_PSP)
#ifdef _PSP
#define MOUSEBUTTONS 3
#define JOYBUTTONS 14 // 10 buttons
#define JOYHATS 1 // 1 hat

View File

@ -20,7 +20,7 @@
#ifndef _HWR_DATA_
#define _HWR_DATA_
#if defined (_WIN32) && !defined (__CYGWIN__) && !defined (_XBOX)
#if defined (_WIN32) && !defined (__CYGWIN__)
//#define WIN32_LEAN_AND_MEAN
#define RPC_NO_WINDOWS_H
#include <windows.h>

View File

@ -40,14 +40,14 @@
#define EXPORT
#endif
#endif
#if defined (_WIN32) && !defined (_XBOX)
#ifdef _WIN32
#define HWRAPI(fn) WINAPI fn
#else
#define HWRAPI(fn) fn
#endif
#else // _CREATE_DLL_
#define EXPORT typedef
#if defined (_WIN32) && !defined (_XBOX)
#ifdef _WIN32
#define HWRAPI(fn) (WINAPI *fn)
#else
#define HWRAPI(fn) (*fn)

View File

@ -114,7 +114,7 @@ typedef struct snddev_s
size_t numsfxs;
// Windows specific data
#if defined (_WIN32) && !defined (_XBOX)
#ifdef _WIN32
UINT32 cooplevel;
HWND hWnd;
#endif

View File

@ -40,12 +40,6 @@
#endif
#endif //WIN32 OS
#ifdef _XBOX // XBox have on WinSock API?
#undef USE_WINSOCK
#undef USE_WINSOCK1
#undef USE_WINSOCK2
#endif
#ifdef USE_WINSOCK2
#include <ws2tcpip.h>
#endif

View File

@ -124,7 +124,7 @@ void M_PushSpecialParameters(void)
/// \brief max args
#if defined (_XBOX) || defined (_WII)
#ifdef _WII
#define MAXARGVS 1
#else
#define MAXARGVS 256

View File

@ -191,7 +191,7 @@ INT32 M_MapNumber(char first, char second)
// ==========================================================================
// some libcs has no access function, make our own
#if defined (_WIN32_WCE) || defined (_XBOX) || defined (_WII) || defined (_PS3)
#if defined (_WIN32_WCE) || defined (_WII) || defined (_PS3)
int access(const char *path, int amode)
{
int accesshandle = -1;

View File

@ -30,7 +30,7 @@
#define HAVE_IPV6
#endif
#if (defined (_WIN32) || defined (_WIN32_WCE)) && !defined (_XBOX)
#if defined (_WIN32) || defined (_WIN32_WCE)
#define RPC_NO_WINDOWS_H
#ifdef HAVE_IPV6
#include <ws2tcpip.h>

View File

@ -15,7 +15,7 @@
#include "command.h"
#if (defined (_WIN32) || defined (_WIN32_WCE)) && !defined (__CYGWIN__) && !defined (_XBOX)
#if (defined (_WIN32) || defined (_WIN32_WCE)) && !defined (__CYGWIN__)
#if defined (_WIN32_WCE) && defined (__GNUC__)
#include <sys/wcetypes.h>
#else
@ -110,7 +110,7 @@ typedef struct vmode_s
INT32 windowed; // if true this is a windowed mode
INT32 numpages;
vesa_extra_t *pextradata; // vesa mode extra data
#if defined (_WIN32) && !defined (_XBOX)
#ifdef _WIN32
INT32 (WINAPI *setmode)(viddef_t *lvid, struct vmode_s *pcurrentmode);
#else
INT32 (*setmode)(viddef_t *lvid, struct vmode_s *pcurrentmode);

View File

@ -22,10 +22,6 @@ ifdef PSP
include sdl12/SRB2PSP/Makefile.cfg
endif #ifdef PSP
ifdef XBOX
include sdl12/SRB2XBOX/Makefile.cfg
endif #ifdef XBOX
ifdef WINCE
include sdl12/SRB2CE/Makefile.cfg
endif #ifef WINCE

View File

@ -1,44 +0,0 @@
#
# Makefile.cfg for SRB2/XBOX
#
#
#hmmm, the XBOX
#
NOHW=1 #No working OpenGL right now
NOHS=1 #No HWSound right now
NOASM=1 #No Fast code
NONET=1 #No network code
NOMD5=1 #No Slow MD5
NOPNG=1 #No Screenshot
#SDLMAIN=1 #SDLMain!
ifndef OPENXDK
OPENXDK=/usr/local/openxdk
endif
CXBE=$(OPENXDK)/bin/cxbe
ifdef ECHO
CXBE:=@$(CXBE)
endif
ifndef NOHW
OPTS+=-DMINI_GL_COMPATIBILITY
endif
BUILTLM=-fno-builtin
CFLAGS+=-D_XBOX -std=gnu99 -ffreestanding $(BUILTLM) -fno-exceptions
CFLAGS+=-I$(OPENXDK)/i386-pc-xbox/include -I$(OPENXDK)/include
OPTS+=-nostdlib -mno-cygwin -march=i386
LDFLAGS+=-nostdlib -Wl,--file-alignment,0x20 -Wl,--section-alignment,0x20 -shared -Wl,--entry,_WinMainCRTStartup -Wl,--strip-all -L$(OPENXDK)/i386-pc-xbox/lib -L$(OPENXDK)/lib
LIBS=-lg -lc -lm
SDL_CFLAGS?=-I$(OPENXDK)/include/SDL
SDL_LDFLAGS?=-lSDL -lopenxdk -lhal -lc -lhal -lusb -lhal -lc -lxboxkrnl
i_system_o+=$(OBJDIR)/xboxhelp.o
# name of the exefile
EXENAME?=SRB2XBOX.EXE
BINNAME?=default.xbe

View File

@ -1,91 +0,0 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// Copyright (C) 2004 by Sonic Team Jr.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// DESCRIPTION:
// stub and replacement "ANSI" C functions for use under OpenXDK
//
//-----------------------------------------------------------------------------
#include "../../doomdef.h"
#include "xboxhelp.h"
#ifdef __GNUC__
#include <unistd.h>
#else
#include <stdlib.h>
#endif
char *getcwd(char *_buf, size_t _size )
{
(void)_buf;
(void)_size;
return _buf;
}
#ifdef _MSC_VER
int mkdir(const char *path)
{
(void)path;
return 0;
}
#elif 0 //__GNUC__?
int mkdir(const char *path, mode_t _mode)
{
(void)path;
(void)_mode;
return 0;
}
#endif
int chdir (const char *__path )
{
(void)__path;
return 0;
}
time_t time(time_t *T)
{
long returntime = 0;
(void)T;
/*
SYSTEMTIME st;
FILETIME stft;
INT64 ftli;
if (!T) return returntime;
GetSystemTime(&st);
SystemTimeToFileTime(&st,&stft);
CopyMemory(&ftli,&stft,sizeof (LARGE_INTEGER));
returntime = (long)ftli;
*T = returntime;
*/
return returntime;
}
#ifdef _MSC_VER
#include <RtcApi.h>
void __cdecl _RTC_Initialize(void)
{
}
char *getenv(const char *__env)
{
__env = NULL;
return NULL;
}
int putenv(const char *__env)
{
__env = NULL;
return 0;
}
#endif

View File

@ -1,6 +0,0 @@
#if defined (_MSC_VER)
int access(const char *path, int amode);
char *getcwd(char *_buf, size_t _size );
int mkdir(const char *path);
int chdir (const char *__path );
#endif

View File

@ -33,7 +33,7 @@
void ShowEndTxt(void)
{
#if !(defined (_WIN32_WCE) || defined (_XBOX))
#ifndef _WIN32_WCE
INT32 i;
UINT16 j, att = 0;
INT32 nlflag = 1;

View File

@ -37,7 +37,7 @@
#pragma warning(default : 4214 4244)
#endif
#if defined (_XBOX) || defined(GP2X)
#ifdef GP2X
#define NOLOADSO
#endif

View File

@ -46,18 +46,6 @@
#define MAX_CD_TRACKS 256
#ifdef _XBOX
INT32 SDL_SYS_CDInit(void)
{
return(0);
}
void SDL_SYS_CDQuit(void)
{
return;
}
#endif
UINT8 cdaudio_started = 0; // for system startup/shutdown
consvar_t cd_volume = {"cd_volume","31",CV_SAVE,soundvolume_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};

View File

@ -75,12 +75,12 @@ FILE *logstream = NULL;
#endif
#endif
#if defined (_WIN32) && !defined (_XBOX)
#ifdef _WIN32
#include "../win32/win_dbg.h"
typedef BOOL (WINAPI *p_IsDebuggerPresent)(VOID);
#endif
#if defined (_WIN32) && !defined (_XBOX) && !defined (_WIN32_WCE)
#if defined (_WIN32) && !defined (_WIN32_WCE)
static inline VOID MakeCodeWritable(VOID)
{
#ifdef USEASM // Disable write-protection of code segment
@ -122,13 +122,6 @@ static inline VOID MakeCodeWritable(VOID)
\return int
*/
FUNCNORETURN
#if defined (_XBOX) && defined (__GNUC__)
void XBoxStartup()
{
const char *logdir = NULL;
myargc = -1;
myargv = NULL;
#else
#ifdef FORCESDLMAIN
int SDL_main(int argc, char **argv)
#else
@ -138,7 +131,6 @@ int main(int argc, char **argv)
const char *logdir = NULL;
myargc = argc;
myargv = argv; /// \todo pull out path to exe from this string
#endif
#ifdef HAVE_TTF
#ifdef _PS3
@ -197,7 +189,7 @@ int main(int argc, char **argv)
//I_OutputMsg("I_StartupSystem() ...\n");
I_StartupSystem();
#if defined (_WIN32) && !defined (_XBOX)
#ifdef _WIN32
#ifndef _WIN32_WCE
{
p_IsDebuggerPresent pfnIsDebuggerPresent = (p_IsDebuggerPresent)GetProcAddress(GetModuleHandleA("kernel32.dll"), "IsDebuggerPresent");

View File

@ -24,11 +24,7 @@
#include <signal.h>
#endif
#ifdef _XBOX
#include "SRB2XBOX/xboxhelp.h"
#endif
#if defined (_WIN32) && !defined (_XBOX)
#ifdef _WIN32
#define RPC_NO_WINDOWS_H
#include <windows.h>
#include "../doomtype.h"
@ -57,7 +53,7 @@ typedef BOOL (WINAPI *p_SetProcessAffinityMask) (HANDLE, DWORD_PTR);
#endif
#include <stdio.h>
#if defined (_WIN32) && !defined (_WIN32_WCE) && !defined (_XBOX)
#if defined (_WIN32) && !defined (_WIN32_WCE)
#include <conio.h>
#endif
@ -121,7 +117,7 @@ typedef BOOL (WINAPI *p_SetProcessAffinityMask) (HANDLE, DWORD_PTR);
#include <wchar.h>
#endif
#if defined (_WIN32) && !defined (_WIN32_WCE) && !defined (_XBOX)
#if defined (_WIN32) && !defined (_WIN32_WCE)
#define HAVE_MUMBLE
#define WINMUMBLE
#elif defined (HAVE_SHM)
@ -176,18 +172,6 @@ typedef BOOL (WINAPI *p_SetProcessAffinityMask) (HANDLE, DWORD_PTR);
#define DEFAULTSEARCHPATH1 "/usr/local/games"
#define DEFAULTSEARCHPATH2 "/usr/games"
#define DEFAULTSEARCHPATH3 "/usr/local"
#elif defined (_XBOX)
#define NOCWD
#ifdef __GNUC__
#include <openxdk/debug.h>
#endif
#define DEFAULTWADLOCATION1 "c:\\srb2"
#define DEFAULTWADLOCATION2 "d:\\srb2"
#define DEFAULTWADLOCATION3 "e:\\srb2"
#define DEFAULTWADLOCATION4 "f:\\srb2"
#define DEFAULTWADLOCATION5 "g:\\srb2"
#define DEFAULTWADLOCATION6 "h:\\srb2"
#define DEFAULTWADLOCATION7 "i:\\srb2"
#elif defined (_WIN32_WCE)
#define NOCWD
#define NOHOME
@ -552,7 +536,7 @@ void I_GetConsoleEvents(void)
(void)d;
}
#elif defined (_WIN32) && !(defined (_XBOX) || defined (_WIN32_WCE))
#elif defined (_WIN32) && !defined (_WIN32_WCE)
static BOOL I_ReadyConsole(HANDLE ci)
{
DWORD gotinput;
@ -751,7 +735,7 @@ void I_OutputMsg(const char *fmt, ...)
DEFAULTFONTBGR, DEFAULTFONTBGG, DEFAULTFONTBGB, DEFAULTFONTBGA, txt);
#endif
#if defined (_WIN32) && !defined (_XBOX) && defined (_MSC_VER)
#if defined (_WIN32) && defined (_MSC_VER)
OutputDebugStringA(txt);
#endif
@ -766,7 +750,7 @@ void I_OutputMsg(const char *fmt, ...)
}
#endif
#if defined (_WIN32) && !defined (_XBOX) && !defined(_WIN32_WCE)
#if defined (_WIN32) && !defined(_WIN32_WCE)
#ifdef DEBUGFILE
if (debugfile != stderr)
#endif
@ -1745,7 +1729,7 @@ static void I_ShutdownMouse2(void)
if (fdmouse2 != -1) close(fdmouse2);
mouse2_started = 0;
}
#elif defined (_WIN32) && !defined (_XBOX)
#elif defined (_WIN32)
static HANDLE mouse2filehandle = INVALID_HANDLE_VALUE;
@ -1943,7 +1927,7 @@ void I_StartupMouse2(void)
}
mouse2_started = 1;
I_AddExitFunc(I_ShutdownMouse2);
#elif defined (_WIN32) && !defined (_XBOX)
#elif defined (_WIN32)
DCB dcb;
if (mouse2filehandle != INVALID_HANDLE_VALUE)
@ -2038,7 +2022,7 @@ ticcmd_t *I_BaseTiccmd2(void)
return &emptycmd2;
}
#if (defined (_WIN32) && !defined (_WIN32_WCE)) && !defined (_XBOX)
#if defined (_WIN32) && !defined (_WIN32_WCE)
static HMODULE winmm = NULL;
static DWORD starttickcount = 0; // hack for win2k time bug
static p_timeGetTime pfntimeGetTime = NULL;
@ -2133,7 +2117,7 @@ tic_t I_GetTime (void)
//
void I_StartupTimer(void)
{
#if (defined (_WIN32) && !defined (_WIN32_WCE)) && !defined (_XBOX)
#if defined (_WIN32) && !defined (_WIN32_WCE)
// for win2k time bug
if (M_CheckParm("-gettickcount"))
{
@ -2159,26 +2143,14 @@ void I_StartupTimer(void)
void I_Sleep(void)
{
#if !(defined (_XBOX))
if (cv_sleep.value != -1)
SDL_Delay(cv_sleep.value);
#endif
}
INT32 I_StartupSystem(void)
{
SDL_version SDLcompiled;
const SDL_version *SDLlinked;
#ifdef _XBOX
#ifdef __GNUC__
char DP[] =" Sonic Robo Blast 2!\n";
debugPrint(DP);
#endif
unlink("e:/Games/SRB2/stdout.txt");
freopen("e:/Games/SRB2/stdout.txt", "w+", stdout);
unlink("e:/Games/SRB2/stderr.txt");
freopen("e:/Games/SRB2/stderr.txt", "w+", stderr);
#endif
SDL_VERSION(&SDLcompiled)
SDLlinked = SDL_Linked_Version();
I_StartupConsole();
@ -2276,7 +2248,7 @@ static boolean shutdowning = false;
void I_Error(const char *error, ...)
{
va_list argptr;
#if (defined (MAC_ALERT) || defined (_WIN32) || (defined (_WIN32_WCE) && !defined (__GNUC__))) && !defined (_XBOX)
#if defined (MAC_ALERT) || defined (_WIN32) || (defined (_WIN32_WCE) && !defined (__GNUC__))
char buffer[8192];
#endif
@ -2314,7 +2286,7 @@ void I_Error(const char *error, ...)
va_end(argptr);
// 2004-03-03 AJR Since the Mac user is most likely double clicking to run the game, give them a panel.
MacShowAlert("Recursive Error", buffer, "Quit", NULL, NULL);
#elif (defined (_WIN32) || (defined (_WIN32_WCE)) && !defined (__GNUC__)) && !defined (_XBOX)
#elif defined (_WIN32) || (defined (_WIN32_WCE)) && !defined (__GNUC__)
va_start(argptr,error);
vsprintf(buffer, error, argptr);
va_end(argptr);
@ -2489,7 +2461,7 @@ void I_GetDiskFreeSpace(INT64 *freespace)
}
*freespace = stfs.f_bavail * stfs.f_bsize;
#endif
#elif (defined (_WIN32) && !defined (_WIN32_WCE)) && !defined (_XBOX)
#elif defined (_WIN32) && !defined (_WIN32_WCE)
static p_GetDiskFreeSpaceExA pfnGetDiskFreeSpaceEx = NULL;
static boolean testwin95 = false;
ULARGE_INTEGER usedbytes, lfreespace;
@ -2526,7 +2498,7 @@ char *I_GetUserName(void)
#elif defined (PSP)
static char username[MAXPLAYERNAME] = "PSPUSER";
return username;
#elif !(defined (_WIN32_WCE) || defined (_XBOX))
#elif !defined (_WIN32_WCE)
static char username[MAXPLAYERNAME];
char *p;
#ifdef _WIN32
@ -2567,7 +2539,7 @@ INT32 I_mkdir(const char *dirname, INT32 unixright)
//[segabor]
#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) || defined (__CYGWIN__) || defined (__OS2__)
return mkdir(dirname, unixright);
#elif (defined (_WIN32) || (defined (_WIN32_WCE) && !defined (__GNUC__))) && !defined (_XBOX)
#elif defined (_WIN32) || (defined (_WIN32_WCE) && !defined (__GNUC__))
UNREFERENCED_PARAMETER(unixright); /// \todo should implement ntright under nt...
return CreateDirectoryA(dirname, NULL);
#else
@ -2811,7 +2783,7 @@ const char *I_LocateWad(void)
if (waddir)
{
// change to the directory where we found srb2.srb
#if (defined (_WIN32) && !defined (_WIN32_WCE)) && !defined (_XBOX)
#if defined (_WIN32) && !defined (_WIN32_WCE)
SetCurrentDirectoryA(waddir);
#elif !defined (_WIN32_WCE) && !defined (_PS3)
if (chdir(waddir) == -1)
@ -2916,7 +2888,7 @@ UINT32 I_GetFreeMem(UINT32 *total)
if (total)
*total = totalKBytes << 10;
return freeKBytes << 10;
#elif (defined (_WIN32) || (defined (_WIN32_WCE) && !defined (__GNUC__))) && !defined (_XBOX)
#elif defined (_WIN32) || (defined (_WIN32_WCE) && !defined (__GNUC__))
MEMORYSTATUS info;
info.dwLength = sizeof (MEMORYSTATUS);
@ -2944,7 +2916,7 @@ UINT32 I_GetFreeMem(UINT32 *total)
const CPUInfoFlags *I_CPUInfo(void)
{
#if (defined (_WIN32) && !defined (_WIN32_WCE)) && !defined (_XBOX)
#if defined (_WIN32) && !defined (_WIN32_WCE)
static CPUInfoFlags WIN_CPUInfo;
SYSTEM_INFO SI;
p_IsProcessorFeaturePresent pfnCPUID = (p_IsProcessorFeaturePresent)GetProcAddress(GetModuleHandleA("kernel32.dll"), "IsProcessorFeaturePresent");
@ -3005,7 +2977,7 @@ const CPUInfoFlags *I_CPUInfo(void)
#endif
}
#if (defined (_WIN32) && !defined (_WIN32_WCE)) && !defined (_XBOX)
#if defined (_WIN32) && !defined (_WIN32_WCE)
static void CPUAffinity_OnChange(void);
static consvar_t cv_cpuaffinity = {"cpuaffinity", "-1", CV_SAVE | CV_CALL, NULL, CPUAffinity_OnChange, 0, NULL, NULL, 0, 0, NULL};
@ -3048,7 +3020,7 @@ static void CPUAffinity_OnChange(void)
void I_RegisterSysCommands(void)
{
#if (defined (_WIN32) && !defined (_WIN32_WCE)) && !defined (_XBOX)
#if defined (_WIN32) && !defined (_WIN32_WCE)
GetAffinityFuncs();
CV_RegisterVar(&cv_cpuaffinity);
#endif

View File

@ -66,14 +66,10 @@
#include "../doomdef.h"
#if defined (_WIN32) && !defined (_XBOX)
#ifdef _WIN32
#include "SDL_syswm.h"
#endif
#if defined (_XBOX) && defined (__GNUC__)
#include <openxdk/debug.h>
#endif
#include "../doomstat.h"
#include "../i_system.h"
#include "../v_video.h"

View File

@ -49,7 +49,7 @@
#define MIX_CHANNELS 8
#endif
#if defined (_WIN32) && !defined (_WIN32_WCE) && !defined (_XBOX)
#if defined (_WIN32) && !defined (_WIN32_WCE)
#include <direct.h>
#elif defined (__GNUC__)
#include <unistd.h>
@ -174,7 +174,7 @@ static SDL_bool canlooping = SDL_TRUE;
#if SDL_MIXER_VERSION_ATLEAST(1,2,7)
#define USE_RWOPS // ok, USE_RWOPS is in here
#if defined (_WIN32_WCE) || defined (_XBOX) //|| defined(_WIN32) || defined(GP2X)
#if defined (_WIN32_WCE) //|| defined(_WIN32) || defined(GP2X)
#undef USE_RWOPS
#endif
#endif
@ -1284,7 +1284,7 @@ void I_StartupSound(void)
snddev.bps = 16;
snddev.sample_rate = audio.freq;
snddev.numsfxs = NUMSFX;
#if defined (_WIN32) && !defined (_XBOX)
#ifdef _WIN32
snddev.cooplevel = 0x00000002;
snddev.hWnd = vid.WndParent;
#endif