From 12266e0f85c8573995c320be31813e9decd885c0 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Fri, 9 Jun 2017 23:15:41 +0100 Subject: [PATCH 01/38] Set ack and ackreturn to 0 for local packets always This won't really have any in-game effect, this is just so the debugfile doesn't display the ack values of the PREVIOUS sent/got packet --- src/d_net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/d_net.c b/src/d_net.c index 50b6c8cf6..4b14e1751 100644 --- a/src/d_net.c +++ b/src/d_net.c @@ -1028,6 +1028,7 @@ boolean HSendPacket(INT32 node, boolean reliable, UINT8 acknum, size_t packetlen #endif return false; } + netbuffer->ack = netbuffer->ackreturn = 0; // don't hold over values from last packet sent/received M_Memcpy(&reboundstore[rebound_head], netbuffer, doomcom->datalength); reboundsize[rebound_head] = doomcom->datalength; From b9828f78e8688ac416ba40f008f74d37cb1515a5 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Fri, 9 Jun 2017 23:22:27 +0100 Subject: [PATCH 02/38] Fix stupid lack of newline with this message --- src/d_clisrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 312a308a1..acaca1f62 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -4077,7 +4077,7 @@ static INT16 Consistancy(void) mobj_t *mo; #endif - DEBFILE(va("TIC %u ", gametic)); + DEBFILE(va("TIC %u\n", gametic)); for (i = 0; i < MAXPLAYERS; i++) { From bae55a3af463f5ce6ecdc9af42aa4762eba25f4c Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sat, 10 Jun 2017 16:36:52 +0100 Subject: [PATCH 03/38] Don't display "x set to y" messages twice in the debugfile for consvars with CV_SHOWMODIFONETIME/CV_SHOWMODIF (can't think offhand when those flags are actually used, but oh well) --- src/command.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/command.c b/src/command.c index a15471c83..f77fb5a4d 100644 --- a/src/command.c +++ b/src/command.c @@ -1180,7 +1180,10 @@ finish: CONS_Printf(M_GetText("%s set to %s\n"), var->name, var->string); var->flags &= ~CV_SHOWMODIFONETIME; } - DEBFILE(va("%s set to %s\n", var->name, var->string)); + else // display message in debug file only + { + DEBFILE(va("%s set to %s\n", var->name, var->string)); + } var->flags |= CV_MODIFIED; // raise 'on change' code #ifdef HAVE_BLUA From 02c098574cc768cbb564c6a239289edaffea35e1 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sat, 10 Jun 2017 17:09:08 +0100 Subject: [PATCH 04/38] ah, turns out the TIC n debugfile print is a remnant of when Doom Legacy printed the consistancy return value... which we'll do here now too, in that case --- src/d_clisrv.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index acaca1f62..706312623 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -4077,7 +4077,7 @@ static INT16 Consistancy(void) mobj_t *mo; #endif - DEBFILE(va("TIC %u\n", gametic)); + DEBFILE(va("TIC %u ", gametic)); for (i = 0; i < MAXPLAYERS; i++) { @@ -4099,7 +4099,10 @@ static INT16 Consistancy(void) #ifdef MOBJCONSISTANCY if (!thinkercap.next) + { + DEBFILE(va("Consistancy = %u\n", ret)); return ret; + } for (th = thinkercap.next; th != &thinkercap; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) @@ -4168,6 +4171,8 @@ static INT16 Consistancy(void) } #endif + DEBFILE(va("Consistancy = %u\n", (ret & 0xFFFF))); + return (INT16)(ret & 0xFFFF); } From 318d5656b51a527309695caf6930726adb94b594 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Mon, 12 Jun 2017 17:55:15 +0100 Subject: [PATCH 05/38] Keeping a total of thinkers saved/loaded and print the total in netplay devmode Not a fix for anything, probably just useful for debugging --- src/p_saveg.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/p_saveg.c b/src/p_saveg.c index 75f7b3e51..d1ec8e5ab 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -1653,12 +1653,18 @@ static inline void SaveWhatThinker(const thinker_t *th, const UINT8 type) static void P_NetArchiveThinkers(void) { const thinker_t *th; + UINT32 numsaved = 0; WRITEUINT32(save_p, ARCHIVEBLOCK_THINKERS); // save off the current thinkers for (th = thinkercap.next; th != &thinkercap; th = th->next) { + if (!(th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed + || th->function.acp1 == (actionf_p1)P_RainThinker + || th->function.acp1 == (actionf_p1)P_SnowThinker)) + numsaved++; + if (th->function.acp1 == (actionf_p1)P_MobjThinker) { SaveMobjThinker(th, tc_mobj); @@ -1846,6 +1852,8 @@ static void P_NetArchiveThinkers(void) #endif } + CONS_Debug(DBG_NETPLAY, "%u thinkers saved\n", numsaved); + WRITEUINT8(save_p, tc_end); } @@ -2610,6 +2618,7 @@ static void P_NetUnArchiveThinkers(void) UINT8 tclass; UINT8 restoreNum = false; UINT32 i; + UINT32 numloaded = 0; if (READUINT32(save_p) != ARCHIVEBLOCK_THINKERS) I_Error("Bad $$$.sav at archive block Thinkers"); @@ -2643,6 +2652,7 @@ static void P_NetUnArchiveThinkers(void) if (tclass == tc_end) break; // leave the saved thinker reading loop + numloaded++; switch (tclass) { @@ -2794,6 +2804,8 @@ static void P_NetUnArchiveThinkers(void) } } + CONS_Debug(DBG_NETPLAY, "%u thinkers loaded\n", numloaded); + if (restoreNum) { executor_t *delay = NULL; From 8514251ad5c8dda928ca0924a7553429fc183c4f Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sat, 9 Sep 2017 21:19:07 +0100 Subject: [PATCH 06/38] fix savegamename not prepending srb2home to itself for custom mods using their own gamedata files --- src/dehacked.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dehacked.c b/src/dehacked.c index f03dd73b4..b7e874b16 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -11,6 +11,7 @@ /// \brief Load dehacked file and change tables and text #include "doomdef.h" +#include "d_main.h" // for srb2home #include "g_game.h" #include "sounds.h" #include "info.h" @@ -3070,6 +3071,8 @@ static void readmaincfg(MYFILE *f) strncpy(savegamename, timeattackfolder, sizeof (timeattackfolder)); strlcat(savegamename, "%u.ssg", sizeof(savegamename)); + // can't use sprintf since there is %u in savegamename + strcatbf(savegamename, srb2home, PATHSEP); gamedataadded = true; } From c330907dba4f4196a30a0481485deea6e6a9f6ef Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Thu, 14 Sep 2017 21:03:20 +0100 Subject: [PATCH 07/38] Added a SDL12=1 flag to all ports whose interface code still lives in the sdl12 folder (and is unsupported by SDL 2.0 officially anyway) This basically causes the makefile to use the sdl12 folder instead of the main sdl folder --- src/Makefile | 8 +++++++- src/Makefile.cfg | 24 ++++++++++++++++++------ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/Makefile b/src/Makefile index 426dc2289..57bd0644e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -209,7 +209,13 @@ LIBS+=-lm endif ifdef SDL -include sdl/Makefile.cfg +#SDL 2.0 +ifndef SDL12 + include sdl/Makefile.cfg +#SDL 1.2 +else + include sdl12/Makefile.cfg +endif #ifndef SDL12 endif #ifdef SDL ifdef DISTCC diff --git a/src/Makefile.cfg b/src/Makefile.cfg index 5bf7f247d..3f6197732 100644 --- a/src/Makefile.cfg +++ b/src/Makefile.cfg @@ -322,22 +322,24 @@ ifdef MINGW64 BIN:=$(BIN)/Mingw64 else ifdef WII - INTERFACE=sdl + INTERFACE=sdl12 NONX86=1 STATIC=1 PREFIX?=powerpc-eabi SDL=1 + SDL12=1 SDLMAIN=1 OBJDIR:=$(OBJDIR)/Wii BIN:=$(BIN)/Wii NOUPX=1 else ifdef PS3N - INTERFACE=sdl + INTERFACE=sdl12 NONX86=1 STATIC=1 PREFIX?=ppu SDL=1 + SDL12=1 # unsure? #SDLMAIN=1 # can't compile SDL_mixer for ps3... @@ -352,34 +354,38 @@ ifdef MINGW BIN:=$(BIN)/Mingw else ifdef XBOX - INTERFACE=sdl + 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=sdl + INTERFACE=sdl12 NONX86=1 SDL=1 + SDL12=1 OBJDIR:=$(OBJDIR)/PSP BIN:=$(BIN)/PSP NOUPX=1 else ifdef DC - INTERFACE=sdl + INTERFACE=sdl12 NONX86=1 SDL=1 + SDL12=1 OBJDIR:=$(OBJDIR)/DC BIN:=$(BIN)/DC NOUPX=1 else ifdef WINCE - INTERFACE=sdl + INTERFACE=sdl12 NONX86=1 PREFIX?=arm-wince-pe SDL=1 + SDL12=1 OBJDIR:=$(OBJDIR)/WinCE BIN:=$(BIN)/WinCE else @@ -437,7 +443,13 @@ OBJDUMP_OPTS?=--wide --source --line-numbers LD=$(CC) ifdef SDL +# SDL 2.0 +ifndef SDL12 INTERFACE=sdl +# SDL 1.2 +else + INTERFACE=sdl12 +endif OBJDIR:=$(OBJDIR)/SDL endif From 5076861e0fd2fd75969897fb5fe311222c2dd8e2 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Thu, 14 Sep 2017 21:09:35 +0100 Subject: [PATCH 08/38] Fixed sdl12/Makefile.cfg and sdl12/(port)/Makefile.cfg and related to refer to sdl12/ subfolders, not sdl/ subfolders --- src/sdl12/MakeCYG.cfg | 2 +- src/sdl12/MakeNIX.cfg | 2 +- src/sdl12/Makefile.cfg | 20 ++++++++++---------- src/sdl12/SRB2PS3/Makefile.cfg | 4 ++-- src/sdl12/SRB2PSP/Makefile.cfg | 10 +++++----- src/sdl12/SRB2Pandora/Makefile.cfg | 4 ++-- src/sdl12/SRB2WII/Makefile.cfg | 4 ++-- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/sdl12/MakeCYG.cfg b/src/sdl12/MakeCYG.cfg index 5907579c1..b55d9dc50 100644 --- a/src/sdl12/MakeCYG.cfg +++ b/src/sdl12/MakeCYG.cfg @@ -1,5 +1,5 @@ # -# sdl/makeCYG.cfg for SRB2/Cygwin +# sdl12/makeCYG.cfg for SRB2/Cygwin # # diff --git a/src/sdl12/MakeNIX.cfg b/src/sdl12/MakeNIX.cfg index 457f52301..1278aaf06 100644 --- a/src/sdl12/MakeNIX.cfg +++ b/src/sdl12/MakeNIX.cfg @@ -1,5 +1,5 @@ # -# sdl/makeNIX.cfg for SRB2/?nix +# sdl12/makeNIX.cfg for SRB2/?nix # #Valgrind support diff --git a/src/sdl12/Makefile.cfg b/src/sdl12/Makefile.cfg index 1d404c4c9..8d9ebc35c 100644 --- a/src/sdl12/Makefile.cfg +++ b/src/sdl12/Makefile.cfg @@ -1,5 +1,5 @@ # -# sdl/makefile.cfg for SRB2/SDL +# sdl12/makefile.cfg for SRB2/SDL # # @@ -7,35 +7,35 @@ # ifdef UNIXCOMMON -include sdl/MakeNIX.cfg +include sdl12/MakeNIX.cfg endif ifdef PANDORA -include sdl/SRB2Pandora/Makefile.cfg +include sdl12/SRB2Pandora/Makefile.cfg endif #ifdef PANDORA ifdef DC -include sdl/SRB2DC/Makefile.cfg +include sdl12/SRB2DC/Makefile.cfg endif #ifdef DC ifdef PS3N -include sdl/SRB2PS3/Makefile.cfg +include sdl12/SRB2PS3/Makefile.cfg endif #ifdef PS3N ifdef PSP -include sdl/SRB2PSP/Makefile.cfg +include sdl12/SRB2PSP/Makefile.cfg endif #ifdef PSP ifdef XBOX -include sdl/SRB2XBOX/Makefile.cfg +include sdl12/SRB2XBOX/Makefile.cfg endif #ifdef XBOX ifdef WINCE -include sdl/SRB2CE/Makefile.cfg +include sdl12/SRB2CE/Makefile.cfg endif #ifef WINCE ifdef CYGWIN32 -include sdl/MakeCYG.cfg +include sdl12/MakeCYG.cfg endif #ifdef CYGWIN32 ifdef SDL_PKGCONFIG @@ -151,7 +151,7 @@ endif # FIXME: DevkitPPC and ready-compiled SDL Wii require these things to be in a silly order ifdef WII -include sdl/SRB2WII/Makefile.cfg +include sdl12/SRB2WII/Makefile.cfg endif #ifdef WII CFLAGS+=$(SDL_CFLAGS) diff --git a/src/sdl12/SRB2PS3/Makefile.cfg b/src/sdl12/SRB2PS3/Makefile.cfg index a4a01714a..80f8db7bc 100644 --- a/src/sdl12/SRB2PS3/Makefile.cfg +++ b/src/sdl12/SRB2PS3/Makefile.cfg @@ -27,10 +27,10 @@ PKGNAME?=SRB2PS3.pkg endif DGBNAME?=$(EXENAME).debug -SRB2PS3DIR=sdl/SRB2PS3 +SRB2PS3DIR=sdl12/SRB2PS3 ICON0?=$(SRB2PS3DIR)/ICON0.png SFOXML?=sfo.xml -SRB2TTF?=sdl/srb2.ttf +SRB2TTF?=sdl12/srb2.ttf TITLE=Sonic Robo Blast 2 v2.0.6 APPID=SRB2-PS3 diff --git a/src/sdl12/SRB2PSP/Makefile.cfg b/src/sdl12/SRB2PSP/Makefile.cfg index f9ec6416b..5e4c0ba2f 100644 --- a/src/sdl12/SRB2PSP/Makefile.cfg +++ b/src/sdl12/SRB2PSP/Makefile.cfg @@ -36,14 +36,14 @@ endif PSP_EBOOT_TITLE=SRB2-PSP vME PSP_EBOOT_SFO=$(BIN)/PARAM.SFO - PSP_EBOOT_ICON=sdl/SRB2PSP/ICON0.png + PSP_EBOOT_ICON=sdl12/SRB2PSP/ICON0.png PSP_EBOOT_ICON1=NULL PSP_EBOOT_UNKPNG=NULL - PSP_EBOOT_PIC1=sdl/SRB2PSP/PIC1.png + PSP_EBOOT_PIC1=sdl12/SRB2PSP/PIC1.png PSP_EBOOT_SND0=NULL PSP_EBOOT_PSAR=NULL - SIGNER?=sdl/SRB2PSP/psp-prxsign/psp-prxsign + SIGNER?=sdl12/SRB2PSP/psp-prxsign/psp-prxsign SDL=1 PREFIX=psp @@ -100,8 +100,8 @@ kxploit: $(BIN)/$(EXENAME) $(PSP_EBOOT_SFO) $(PSP_EBOOT_ICON1) $(PSP_EBOOT_UNKPNG) $(PSP_EBOOT_PIC1) \ $(PSP_EBOOT_SND0) NULL $(PSP_EBOOT_PSAR) -sdl/SRB2PSP/psp-prxsign/psp-prxsign: - -$(MAKE) -C sdl/SRB2PSP/psp-prxsign CFLAGS=-pipe CC="$(HOSTCC)" +sdl12/SRB2PSP/psp-prxsign/psp-prxsign: + -$(MAKE) -C sdl12/SRB2PSP/psp-prxsign CFLAGS=-pipe CC="$(HOSTCC)" fix-up: $(BIN)/$(EXENAME) @echo Running psp-fixup-imports on $(EXENAME) diff --git a/src/sdl12/SRB2Pandora/Makefile.cfg b/src/sdl12/SRB2Pandora/Makefile.cfg index c7f0f8449..1f057a212 100644 --- a/src/sdl12/SRB2Pandora/Makefile.cfg +++ b/src/sdl12/SRB2Pandora/Makefile.cfg @@ -2,8 +2,8 @@ PNDNAME=SRB2.pnd PNDDIR=$(BIN)/pnd -ICON=sdl/SRB2Pandora/icon.png -PXML=sdl/SRB2Pandora/PXML.xml +ICON=sdl12/SRB2Pandora/icon.png +PXML=sdl12/SRB2Pandora/PXML.xml SED=sed CAT=cat diff --git a/src/sdl12/SRB2WII/Makefile.cfg b/src/sdl12/SRB2WII/Makefile.cfg index 1b1863042..778d2c3d6 100644 --- a/src/sdl12/SRB2WII/Makefile.cfg +++ b/src/sdl12/SRB2WII/Makefile.cfg @@ -16,8 +16,8 @@ EXENAME?=$(SRB2NAME).elf DBGNAME?=$(SRB2NAME).elf.debug DOLNAME?=$(SRB2NAME).dol -ICONPNG?=sdl/SRB2WII/icon.png -METAXML?=sdl/SRB2WII/meta.xml +ICONPNG?=sdl12/SRB2WII/icon.png +METAXML?=sdl12/SRB2WII/meta.xml APPDIR=apps/$(SRB2NAME) ZIPNAME=$(SRB2NAME).zip From 900bab9b13e23a8ec858b90da0d8648087ad920f Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Thu, 14 Sep 2017 21:15:38 +0100 Subject: [PATCH 09/38] Fix includes for SDL 1.2-only ports' files --- src/d_clisrv.c | 2 +- src/d_main.c | 2 +- src/filesrch.c | 2 +- src/i_tcp.c | 4 ++-- src/m_fixed.h | 2 +- src/mserv.c | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 7c21d79fc..1e51a79f0 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -51,7 +51,7 @@ #endif #ifdef _XBOX -#include "sdl/SRB2XBOX/xboxhelp.h" +#include "sdl12/SRB2XBOX/xboxhelp.h" #endif // diff --git a/src/d_main.c b/src/d_main.c index 4080087c1..063d28453 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -82,7 +82,7 @@ int snprintf(char *str, size_t n, const char *fmt, ...); #endif #ifdef _XBOX -#include "sdl/SRB2XBOX/xboxhelp.h" +#include "sdl12/SRB2XBOX/xboxhelp.h" #endif #ifdef HWRENDER diff --git a/src/filesrch.c b/src/filesrch.c index acc176d6a..2463e7178 100644 --- a/src/filesrch.c +++ b/src/filesrch.c @@ -22,7 +22,7 @@ #include #endif #ifdef _WIN32_WCE -#include "sdl/SRB2CE/cehelp.h" +#include "sdl12/SRB2CE/cehelp.h" #else #include #endif diff --git a/src/i_tcp.c b/src/i_tcp.c index c65a536a8..5681a9d44 100644 --- a/src/i_tcp.c +++ b/src/i_tcp.c @@ -97,7 +97,7 @@ #include #ifdef _arch_dreamcast -#include "sdl/SRB2DC/dchelp.h" +#include "sdl12/SRB2DC/dchelp.h" #endif #if (defined (__unix__) && !defined (MSDOS)) || defined(__APPLE__) || defined (UNIXCOMMON) @@ -192,7 +192,7 @@ static UINT8 UPNP_support = TRUE; #define close closesocket #ifdef _WIN32_WCE - #include "sdl/SRB2CE/cehelp.h" + #include "sdl12/SRB2CE/cehelp.h" #endif #endif diff --git a/src/m_fixed.h b/src/m_fixed.h index 1cf9abbae..0eb045c1d 100644 --- a/src/m_fixed.h +++ b/src/m_fixed.h @@ -21,7 +21,7 @@ #endif #ifdef _WIN32_WCE -#include "sdl/SRB2CE/cehelp.h" +#include "sdl12/SRB2CE/cehelp.h" #endif /*! diff --git a/src/mserv.c b/src/mserv.c index a8e43bbf8..76fba835b 100644 --- a/src/mserv.c +++ b/src/mserv.c @@ -65,7 +65,7 @@ #endif #ifdef _arch_dreamcast -#include "sdl/SRB2DC/dchelp.h" +#include "sdl12/SRB2DC/dchelp.h" #endif #include // timeval,... (TIMEOUT) @@ -92,7 +92,7 @@ #include "m_misc.h" // GetRevisionString() #ifdef _WIN32_WCE -#include "sdl/SRB2CE/cehelp.h" +#include "sdl12/SRB2CE/cehelp.h" #endif #include "i_addrinfo.h" From 9e6ed121ba574110cdb76dbe5001893fc7f1c854 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Thu, 14 Sep 2017 21:29:38 +0100 Subject: [PATCH 10/38] Comment out sdl12/SRB2CE/cehelp.h include in m_fixed.h I think it was originally included for defining the "USEASM" macro, but USEASM isn't used by m_fixed.h/c code anymore --- src/m_fixed.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/m_fixed.h b/src/m_fixed.h index 0eb045c1d..773823988 100644 --- a/src/m_fixed.h +++ b/src/m_fixed.h @@ -20,9 +20,10 @@ #include #endif -#ifdef _WIN32_WCE -#include "sdl12/SRB2CE/cehelp.h" -#endif +// Was this just for the #define USEASM? +//#ifdef _WIN32_WCE +//#include "sdl12/SRB2CE/cehelp.h" +//#endif /*! \brief bits of the fraction From d2a76ca269110036f61f488646318008c066ea01 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Fri, 15 Sep 2017 17:12:53 +0100 Subject: [PATCH 11/38] Removed references to console ports and WinCE in sdl/Makefile.cfg --- src/sdl/Makefile.cfg | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/src/sdl/Makefile.cfg b/src/sdl/Makefile.cfg index b54f7057c..58c4d0861 100644 --- a/src/sdl/Makefile.cfg +++ b/src/sdl/Makefile.cfg @@ -14,26 +14,6 @@ ifdef PANDORA include sdl/SRB2Pandora/Makefile.cfg endif #ifdef PANDORA -ifdef DC -include sdl/SRB2DC/Makefile.cfg -endif #ifdef DC - -ifdef PS3N -include sdl/SRB2PS3/Makefile.cfg -endif #ifdef PS3N - -ifdef PSP -include sdl/SRB2PSP/Makefile.cfg -endif #ifdef PSP - -ifdef XBOX -include sdl/SRB2XBOX/Makefile.cfg -endif #ifdef XBOX - -ifdef WINCE -include sdl/SRB2CE/Makefile.cfg -endif #ifef WINCE - ifdef CYGWIN32 include sdl/MakeCYG.cfg endif #ifdef CYGWIN32 @@ -150,15 +130,8 @@ endif endif endif -# FIXME: DevkitPPC and ready-compiled SDL Wii require these things to be in a silly order -ifdef WII -include sdl/SRB2WII/Makefile.cfg -endif #ifdef WII - CFLAGS+=$(SDL_CFLAGS) LIBS:=$(SDL_LDFLAGS) $(LIBS) -ifndef WII ifdef STATIC LIBS+=$(shell $(SDL_CONFIG) --static-libs) endif -endif From 5fb551dd758d676db63b9aafed058e588ecee131 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Fri, 15 Sep 2017 17:15:06 +0100 Subject: [PATCH 12/38] Removed 1.2.x version checks in these files, SDL 2.0.x should always have these files --- src/sdl/hwsym_sdl.c | 6 ++---- src/sdl/i_system.c | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/sdl/hwsym_sdl.c b/src/sdl/hwsym_sdl.c index 54f5da3a0..0085dfaf6 100644 --- a/src/sdl/hwsym_sdl.c +++ b/src/sdl/hwsym_sdl.c @@ -41,10 +41,8 @@ #define NOLOADSO #endif -#if SDL_VERSION_ATLEAST(1,2,6) && !defined (NOLOADSO) -#include "SDL_loadso.h" // 1.2.6+ -#elif !defined (NOLOADSO) -#define NOLOADSO +#ifndef NOLOADSO +#include "SDL_loadso.h" #endif #define _CREATE_DLL_ // necessary for Unix AND Windows diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index f72a9857d..41054a71e 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -88,8 +88,8 @@ void __set_fpscr(long); // in libgcc / kernel's startup.s? #pragma warning(default : 4214 4244) #endif -#if SDL_VERSION_ATLEAST(1,2,7) && !defined (DC) -#include "SDL_cpuinfo.h" // 1.2.7 or greater +#ifndef DC +#include "SDL_cpuinfo.h" #define HAVE_SDLCPUINFO #endif From dcb23e01c0d1fad922b7aeedc02d26b31c1d4b04 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Fri, 15 Sep 2017 21:22:28 +0100 Subject: [PATCH 13/38] SDL_INIT_NOPARACHUTE does nothing in SDL 2.0, so don't use it anymore --- src/sdl/i_system.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 41054a71e..e3e5d29d7 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -2252,9 +2252,9 @@ INT32 I_StartupSystem(void) I_OutputMsg("Linked with SDL version: %d.%d.%d\n", SDLlinked.major, SDLlinked.minor, SDLlinked.patch); #if 0 //#ifdef GP2X //start up everything - if (SDL_Init(SDL_INIT_NOPARACHUTE|SDL_INIT_EVERYTHING) < 0) + if (SDL_Init(SDL_INIT_EVERYTHING) < 0) #else - if (SDL_Init(SDL_INIT_NOPARACHUTE) < 0) + if (SDL_Init(0) < 0) #endif I_Error("SRB2: SDL System Error: %s", SDL_GetError()); //Alam: Oh no.... #ifndef NOMUMBLE From a33bb70a0cbfc8f717b9696b2055de71ba5fd4c4 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sat, 16 Sep 2017 20:26:04 +0100 Subject: [PATCH 14/38] Removed all support for Dreamcast, XBox, PSP, PS3, GP2X, Wii, and WinCE from files in the sdl/ folder. If you wanted these ports, use the SDL 1.2 code in sdl12 Also removed GP2X setup from sdl/MakeNIX.cfg, use sdl12 for that too --- src/sdl/MakeNIX.cfg | 31 ----- src/sdl/endtxt.c | 2 - src/sdl/hwsym_sdl.c | 4 - src/sdl/i_main.c | 91 +------------- src/sdl/i_system.c | 283 +++++------------------------------------- src/sdl/i_ttf.c | 12 +- src/sdl/i_ttf.h | 3 +- src/sdl/i_video.c | 2 +- src/sdl/mixer_sound.c | 2 - src/sdl/sdl_sound.c | 42 +------ 10 files changed, 40 insertions(+), 432 deletions(-) diff --git a/src/sdl/MakeNIX.cfg b/src/sdl/MakeNIX.cfg index 1a0b54210..47c944eb5 100644 --- a/src/sdl/MakeNIX.cfg +++ b/src/sdl/MakeNIX.cfg @@ -65,37 +65,6 @@ ifdef MACOSX LIBS+=-framework CoreFoundation endif -# -#here is GP2x (arm-gp2x-linux) -# -ifdef GP2X - PNG_CONFIG?=$(PREFIX)-libpng12-config -ifdef STATIC #need a better setting name - CFLAGS+=-I$(OPEN2X)/include -ifndef NOMIXER - LIBS+=-lvorbisidec -ifdef MIKMOD - LIBS+=-lmikmod -endif -ifdef SMPEGLIB - LIBS+=-lsmpeg - LD=$(CXX) -endif -endif - NONET=1 -endif -ifndef ARCHNAME -"error" -endif - NONX86=1 - NOHW=1 - NOHS=1 - NOMD5=1 - WFLAGS+=-O0 - OPTS+=-DGP2X -ffast-math -mcpu=arm920t - EXENAME?=SRB2GP2X.gpe -endif - ifndef NOHW OPTS+=-I/usr/X11R6/include LDFLAGS+=-L/usr/X11R6/lib diff --git a/src/sdl/endtxt.c b/src/sdl/endtxt.c index 1d7756b4d..1e72ca9a8 100644 --- a/src/sdl/endtxt.c +++ b/src/sdl/endtxt.c @@ -33,7 +33,6 @@ void ShowEndTxt(void) { -#if !(defined (_WIN32_WCE) || defined (_XBOX) || defined (_arch_dreamcast)) INT32 i; UINT16 j, att = 0; INT32 nlflag = 1; @@ -232,5 +231,4 @@ void ShowEndTxt(void) printf("\n"); Z_Free(data); -#endif } diff --git a/src/sdl/hwsym_sdl.c b/src/sdl/hwsym_sdl.c index 0085dfaf6..f4686d2bf 100644 --- a/src/sdl/hwsym_sdl.c +++ b/src/sdl/hwsym_sdl.c @@ -37,10 +37,6 @@ #pragma warning(default : 4214 4244) #endif -#if defined (_XBOX) || defined (_arch_dreamcast) || defined(GP2X) -#define NOLOADSO -#endif - #ifndef NOLOADSO #include "SDL_loadso.h" #endif diff --git a/src/sdl/i_main.c b/src/sdl/i_main.c index 25fccb9f9..df4e3cc99 100644 --- a/src/sdl/i_main.c +++ b/src/sdl/i_main.c @@ -26,28 +26,6 @@ #include #endif -#ifdef _WII -#include -#include -#include -#ifdef REMOTE_DEBUGGING -#include -#endif -static char wiicwd[PATH_MAX] = "sd:/"; -static char localip[16] = {0}; -static char gateway[16] = {0}; -static char netmask[16] = {0}; -#endif - -#ifdef _PSP -#include -#include -PSP_HEAP_SIZE_KB(24*1024); -PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER | PSP_THREAD_ATTR_VFPU); -PSP_MAIN_THREAD_NAME("SRB2"); -PSP_MAIN_THREAD_STACK_SIZE_KB(256); -#endif - #ifdef HAVE_SDL #ifdef HAVE_TTF @@ -79,23 +57,12 @@ FILE *logstream = NULL; #endif #endif -#if defined (_WIN32) && !defined (_XBOX) +#if defined (_WIN32) #include "../win32/win_dbg.h" typedef BOOL (WINAPI *p_IsDebuggerPresent)(VOID); #endif -#ifdef _arch_dreamcast -#include -KOS_INIT_FLAGS(INIT_DEFAULT -//| INIT_NET -//| INIT_MALLOCSTATS -//| INIT_QUIET -//| INIT_OCRAM -//| INIT_NO_DCLOAD -); -#endif - -#if defined (_WIN32) && !defined (_XBOX) && !defined (_WIN32_WCE) +#if defined (_WIN32) static inline VOID MakeCodeWritable(VOID) { #ifdef USEASM // Disable write-protection of code segment @@ -136,13 +103,6 @@ static inline VOID MakeCodeWritable(VOID) \return int */ -#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 @@ -152,56 +112,19 @@ 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 - // apparently there is a bug in SDL_PSL1GHT which needs this to be set to work around - SDL_setenv("SDL_VIDEODRIVER", "psl1ght", 1); - I_StartupTTF(FONTPOINTSIZE, SDL_INIT_VIDEO, SDL_SWSURFACE|SDL_DOUBLEBUF); -#elif defined(_WIN32) +#ifdef _WIN32 I_StartupTTF(FONTPOINTSIZE, SDL_INIT_VIDEO|SDL_INIT_AUDIO, SDL_SWSURFACE); #else I_StartupTTF(FONTPOINTSIZE, SDL_INIT_VIDEO, SDL_SWSURFACE); #endif #endif -#ifdef _PS3 - // initialise controllers. - //ioPadInit(7); -#endif - -// init Wii-specific stuff -#ifdef _WII - // Start network - if_config(localip, netmask, gateway, TRUE); - -#ifdef REMOTE_DEBUGGING -#if REMOTE_DEBUGGING == 0 - DEBUG_Init(GDBSTUB_DEVICE_TCP, GDBSTUB_DEF_TCPPORT); // Port 2828 -#elif REMOTE_DEBUGGING > 2 - DEBUG_Init(GDBSTUB_DEVICE_TCP, REMOTE_DEBUGGING); // Custom Port -#elif REMOTE_DEBUGGING < 0 - DEBUG_Init(GDBSTUB_DEVICE_USB, GDBSTUB_DEF_CHANNEL); // Slot 1 -#else - DEBUG_Init(GDBSTUB_DEVICE_USB, REMOTE_DEBUGGING-1); // Custom Slot -#endif -#endif - // Start FAT filesystem - fatInitDefault(); - - if (getcwd(wiicwd, PATH_MAX)) - I_PutEnv(va("HOME=%ssrb2wii", wiicwd)); -#endif - logdir = D_Home(); #ifdef LOGMESSAGES -#if defined(_WIN32_WCE) || defined(GP2X) - logstream = fopen(va("%s.log",argv[0]), "wt"); -#elif defined (_WII) - logstream = fopen(va("%s/log.txt",logdir), "wt"); -#elif defined (DEFAULTDIR) +#ifdef DEFAULTDIR if (logdir) logstream = fopen(va("%s/"DEFAULTDIR"/log.txt",logdir), "wt"); else @@ -211,8 +134,7 @@ int main(int argc, char **argv) //I_OutputMsg("I_StartupSystem() ...\n"); I_StartupSystem(); -#if defined (_WIN32) && !defined (_XBOX) -#ifndef _WIN32_WCE +#if defined (_WIN32) { #if 0 // just load the DLL p_IsDebuggerPresent pfnIsDebuggerPresent = (p_IsDebuggerPresent)GetProcAddress(GetModuleHandleA("kernel32.dll"), "IsDebuggerPresent"); @@ -221,16 +143,13 @@ int main(int argc, char **argv) && !InitBugTrap() #endif ) -#endif { LoadLibraryA("exchndl.dll"); } } #endif prevExceptionFilter = SetUnhandledExceptionFilter(RecordExceptionInfo); -#ifndef _WIN32_WCE MakeCodeWritable(); -#endif #endif // startup SRB2 CONS_Printf("Setting up SRB2...\n"); diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index e3e5d29d7..3ad57559d 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -26,19 +26,12 @@ #include "../config.h.in" #endif -#ifndef _WIN32_WCE #include -#endif -#ifdef _XBOX -#include "SRB2XBOX/xboxhelp.h" -#endif - -#if defined (_WIN32) && !defined (_XBOX) +#ifdef _WIN32 #define RPC_NO_WINDOWS_H #include #include "../doomtype.h" -#ifndef _WIN32_WCE typedef BOOL (WINAPI *p_GetDiskFreeSpaceExA)(LPCSTR, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER); typedef BOOL (WINAPI *p_IsProcessorFeaturePresent) (DWORD); typedef DWORD (WINAPI *p_timeGetTime) (void); @@ -46,7 +39,6 @@ typedef UINT (WINAPI *p_timeEndPeriod) (UINT); typedef HANDLE (WINAPI *p_OpenFileMappingA) (DWORD, BOOL, LPCSTR); typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T); #endif -#endif #include #include #include @@ -59,18 +51,10 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T); #include #endif -#ifdef _arch_dreamcast -#include -#include -#include -#include -void __set_fpscr(long); // in libgcc / kernel's startup.s? -#else #include -#if defined (_WIN32) && !defined (_WIN32_WCE) && !defined (_XBOX) +#ifdef _WIN32 #include #endif -#endif #ifdef _MSC_VER #pragma warning(disable : 4214 4244) @@ -88,15 +72,10 @@ void __set_fpscr(long); // in libgcc / kernel's startup.s? #pragma warning(default : 4214 4244) #endif -#ifndef DC #include "SDL_cpuinfo.h" #define HAVE_SDLCPUINFO -#endif -#ifdef _PSP -//#include -#elif !defined(_PS3) -#if defined (__unix__) || defined(__APPLE__) || (defined (UNIXCOMMON) && !defined (_arch_dreamcast) && !defined (__HAIKU__) && !defined (_WII)) +#if defined (__unix__) || defined(__APPLE__) || (defined (UNIXCOMMON) && !defined (__HAIKU__)) #if defined (__linux__) #include #else @@ -111,20 +90,17 @@ void __set_fpscr(long); // in libgcc / kernel's startup.s? #include #endif #endif -#endif -#ifndef _PS3 -#if defined (__linux__) || (defined (UNIXCOMMON) && !defined (_arch_dreamcast) && !defined (_PSP) && !defined (__HAIKU__) && !defined (_WII)) +#if defined (__linux__) || (defined (UNIXCOMMON) && !defined (__HAIKU__)) #ifndef NOTERMIOS #include #include // ioctl #define HAVE_TERMIOS #endif #endif -#endif #ifndef NOMUMBLE -#if defined (__linux__) && !defined(_PS3) // need -lrt +#ifdef __linux__ // need -lrt #include #ifdef MAP_FAILED #define HAVE_SHM @@ -132,7 +108,7 @@ void __set_fpscr(long); // in libgcc / kernel's startup.s? #include #endif -#if defined (_WIN32) && !defined (_WIN32_WCE) && !defined (_XBOX) +#ifdef _WIN32 #define HAVE_MUMBLE #define WINMUMBLE #elif defined (HAVE_SHM) @@ -140,10 +116,6 @@ void __set_fpscr(long); // in libgcc / kernel's startup.s? #endif #endif // NOMUMBLE -#ifdef _WIN32_WCE -#include "SRB2CE/cehelp.h" -#endif - #ifndef O_BINARY #define O_BINARY 0 #endif @@ -153,44 +125,7 @@ void __set_fpscr(long); // in libgcc / kernel's startup.s? #endif // Locations for searching the srb2.srb -#ifdef _arch_dreamcast -#define DEFAULTWADLOCATION1 "/cd" -#define DEFAULTWADLOCATION2 "/pc" -#define DEFAULTWADLOCATION3 "/pc/home/alam/srb2code/data" -#define DEFAULTSEARCHPATH1 "/cd" -#define DEFAULTSEARCHPATH2 "/pc" -//#define DEFAULTSEARCHPATH3 "/pc/home/alam/srb2code/data" -#elif defined (GP2X) -#define DEFAULTWADLOCATION1 "/mnt/sd" -#define DEFAULTWADLOCATION2 "/mnt/sd/SRB2" -#define DEFAULTWADLOCATION3 "/tmp/mnt/sd" -#define DEFAULTWADLOCATION4 "/tmp/mnt/sd/SRB2" -#define DEFAULTSEARCHPATH1 "/mnt/sd" -#define DEFAULTSEARCHPATH2 "/tmp/mnt/sd" -#elif defined (_WII) -#define NOCWD -#define NOHOME -#define NEED_SDL_GETENV -#define DEFAULTWADLOCATION1 "sd:/srb2wii" -#define DEFAULTWADLOCATION2 "usb:/srb2wii" -#define DEFAULTSEARCHPATH1 "sd:/srb2wii" -#define DEFAULTSEARCHPATH2 "usb:/srb2wii" -// PS3: TODO: this will need modification most likely -#elif defined (_PS3) -#define NOCWD -#define NOHOME -#define DEFAULTWADLOCATION1 "/dev_hdd0/game/SRB2-PS3_/USRDIR/etc" -#define DEFAULTWADLOCATION2 "/dev_usb/SRB2PS3" -#define DEFAULTSEARCHPATH1 "/dev_hdd0/game/SRB2-PS3_/USRDIR/etc" -#define DEFAULTSEARCHPATH2 "/dev_usb/SRB2PS3" -#elif defined (_PSP) -#define NOCWD -#define NOHOME -#define DEFAULTWADLOCATION1 "host0:/bin/Resources" -#define DEFAULTWADLOCATION2 "ms0:/PSP/GAME/SRB2PSP" -#define DEFAULTSEARCHPATH1 "host0:/" -#define DEFAULTSEARCHPATH2 "ms0:/PSP/GAME/SRB2PSP" -#elif defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) +#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) #define DEFAULTWADLOCATION1 "/usr/local/share/games/SRB2" #define DEFAULTWADLOCATION2 "/usr/local/games/SRB2" #define DEFAULTWADLOCATION3 "/usr/share/games/SRB2" @@ -198,23 +133,6 @@ void __set_fpscr(long); // in libgcc / kernel's startup.s? #define DEFAULTSEARCHPATH1 "/usr/local/games" #define DEFAULTSEARCHPATH2 "/usr/games" #define DEFAULTSEARCHPATH3 "/usr/local" -#elif defined (_XBOX) -#define NOCWD -#ifdef __GNUC__ -#include -#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 -#define DEFAULTWADLOCATION1 "\\Storage Card\\SRB2DEMO" -#define DEFAULTSEARCHPATH1 "\\Storage Card" #elif defined (_WIN32) #define DEFAULTWADLOCATION1 "c:\\games\\srb2" #define DEFAULTWADLOCATION2 "\\games\\srb2" @@ -270,9 +188,6 @@ static void JoyReset(SDLJoyInfo_t *JoySet) { if (JoySet->dev) { -#ifdef GP2X //GP2X's SDL does an illegal free on the 1st joystick... - if (SDL_JoystickIndex(JoySet->dev) != 0) -#endif SDL_JoystickClose(JoySet->dev); } JoySet->dev = NULL; @@ -308,7 +223,6 @@ SDL_bool framebuffer = SDL_FALSE; UINT8 keyboard_started = false; -#if !defined (DC) FUNCNORETURN static ATTRNORETURN void signal_handler(INT32 num) { //static char msg[] = "oh no! back to reality!\r\n"; @@ -362,7 +276,6 @@ FUNCNORETURN static ATTRNORETURN void quit_handler(int num) raise(num); I_Quit(); } -#endif #ifdef HAVE_TERMIOS // TERMIOS console code from Quake3: thank you! @@ -487,9 +400,7 @@ static void I_StartupConsole(void) signal(SIGTTIN, SIG_IGN); signal(SIGTTOU, SIG_IGN); -#if !defined(GP2X) //read is bad on GP2X consolevent = !M_CheckParm("-noconsole"); -#endif framebuffer = M_CheckParm("-framebuffer"); if (framebuffer) @@ -577,7 +488,7 @@ void I_GetConsoleEvents(void) (void)d; } -#elif defined (_WIN32) && !(defined (_XBOX) || defined (_WIN32_WCE)) +#elif defined (_WIN32) static BOOL I_ReadyConsole(HANDLE ci) { DWORD gotinput; @@ -716,17 +627,6 @@ static inline void I_ShutdownConsole(void){} void I_GetConsoleEvents(void){} static inline void I_StartupConsole(void) { -#ifdef _arch_dreamcast - char title[] = "SRB2 for Dreamcast!\n"; - __set_fpscr(0x00040000); /* ignore FPU underflow */ - //printf("\nHello world!\n\n"); - pvr_init_defaults(); - conio_init(CONIO_TTY_PVR, CONIO_INPUT_LINE); - conio_set_theme(CONIO_THEME_MATRIX); - conio_clear(); - conio_putstr(title); - //printf("\nHello world!\n\n"); -#endif #ifdef _DEBUG consolevent = !M_CheckParm("-noconsole"); #else @@ -746,7 +646,6 @@ static inline void I_ShutdownConsole(void){} // void I_StartupKeyboard (void) { -#if !defined (DC) #ifdef SIGINT signal(SIGINT , quit_handler); #endif @@ -763,7 +662,6 @@ void I_StartupKeyboard (void) signal(SIGSEGV , signal_handler); signal(SIGABRT , signal_handler); signal(SIGFPE , signal_handler); -#endif } // @@ -775,10 +673,6 @@ void I_OutputMsg(const char *fmt, ...) XBOXSTATIC char txt[8192]; va_list argptr; -#ifdef _arch_dreamcast - if (!keyboard_started) conio_printf(fmt); -#endif - va_start(argptr,fmt); vsprintf(txt, fmt, argptr); va_end(argptr); @@ -788,7 +682,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 @@ -803,7 +697,7 @@ void I_OutputMsg(const char *fmt, ...) } #endif -#if defined (_WIN32) && !defined (_XBOX) && !defined(_WIN32_WCE) +#if defined (_WIN32) #ifdef DEBUGFILE if (debugfile != stderr) #endif @@ -917,22 +811,12 @@ INT32 I_GetKey (void) // void I_JoyScale(void) { -#ifdef GP2X - if (JoyInfo.dev && SDL_JoystickIndex(JoyInfo.dev) == 0) - Joystick.bGamepadStyle = true; - else -#endif Joystick.bGamepadStyle = cv_joyscale.value==0; JoyInfo.scale = Joystick.bGamepadStyle?1:cv_joyscale.value; } void I_JoyScale2(void) { -#ifdef GP2X - if (JoyInfo2.dev && SDL_JoystickIndex(JoyInfo2.dev) == 0) - Joystick.bGamepadStyle = true; - else -#endif Joystick2.bGamepadStyle = cv_joyscale2.value==0; JoyInfo2.scale = Joystick2.bGamepadStyle?1:cv_joyscale2.value; } @@ -1035,11 +919,6 @@ void I_GetJoystickEvents(void) event.type = ev_keydown; else event.type = ev_keyup; -#ifdef _PSP - if (i == 12) - event.data1 = KEY_ESCAPE; - else -#endif event.data1 = KEY_JOY1 + i; D_PostEvent(&event); } @@ -1090,13 +969,11 @@ void I_GetJoystickEvents(void) axisy = SDL_JoystickGetAxis(JoyInfo.dev, i*2 + 1); else axisy = 0; -#ifdef _arch_dreamcast // -128 to 127 - axisx = axisx*8; - axisy = axisy*8; -#else // -32768 to 32767 + + // -32768 to 32767 axisx = axisx/32; axisy = axisy/32; -#endif + if (Joystick.bGamepadStyle) { @@ -1214,15 +1091,11 @@ static int joy_open(const char *fname) if (JoyInfo.buttons > JOYBUTTONS) JoyInfo.buttons = JOYBUTTONS; -#ifdef DC - JoyInfo.hats = 0; -#else JoyInfo.hats = SDL_JoystickNumHats(JoyInfo.dev); if (JoyInfo.hats > JOYHATS) JoyInfo.hats = JOYHATS; JoyInfo.balls = SDL_JoystickNumBalls(JoyInfo.dev); -#endif //Joystick.bGamepadStyle = !stricmp(SDL_JoystickName(JoyInfo.dev), "pad"); @@ -1379,13 +1252,9 @@ void I_GetJoystick2Events(void) axisy = SDL_JoystickGetAxis(JoyInfo2.dev, i*2 + 1); else axisy = 0; -#ifdef _arch_dreamcast // -128 to 127 - axisx = axisx*8; - axisy = axisy*8; -#else // -32768 to 32767 + // -32768 to 32767 axisx = axisx/32; axisy = axisy/32; -#endif if (Joystick2.bGamepadStyle) { @@ -1504,15 +1373,11 @@ static int joy_open2(const char *fname) if (JoyInfo2.buttons > JOYBUTTONS) JoyInfo2.buttons = JOYBUTTONS; -#ifdef DC - JoyInfo2.hats = 0; -#else JoyInfo2.hats = SDL_JoystickNumHats(JoyInfo2.dev); if (JoyInfo2.hats > JOYHATS) JoyInfo2.hats = JOYHATS; JoyInfo2.balls = SDL_JoystickNumBalls(JoyInfo2.dev); -#endif //Joystick.bGamepadStyle = !stricmp(SDL_JoystickName(JoyInfo2.dev), "pad"); @@ -1796,7 +1661,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; @@ -1994,7 +1859,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) @@ -2089,7 +1954,7 @@ FUNCMATH ticcmd_t *I_BaseTiccmd2(void) return &emptycmd2; } -#if (defined (_WIN32) && !defined (_WIN32_WCE)) && !defined (_XBOX) +#if defined (_WIN32) static HMODULE winmm = NULL; static DWORD starttickcount = 0; // hack for win2k time bug static p_timeGetTime pfntimeGetTime = NULL; @@ -2159,13 +2024,8 @@ static void I_ShutdownTimer(void) // tic_t I_GetTime (void) { -#ifdef _arch_dreamcast - static Uint64 basetime = 0; - Uint64 ticks = timer_ms_gettime64(); //using timer_ms_gettime64 instand of SDL_GetTicks for the Dreamcast -#else static Uint32 basetime = 0; Uint32 ticks = SDL_GetTicks(); -#endif if (!basetime) basetime = ticks; @@ -2174,11 +2034,7 @@ tic_t I_GetTime (void) ticks = (ticks*TICRATE); -#if 0 //#ifdef _WIN32_WCE - ticks = (ticks/10); -#else ticks = (ticks/1000); -#endif return (tic_t)ticks; } @@ -2189,7 +2045,7 @@ tic_t I_GetTime (void) // FUNCMATH void I_StartupTimer(void) { -#if (defined (_WIN32) && !defined (_WIN32_WCE)) && !defined (_XBOX) +#ifdef _WIN32 // for win2k time bug if (M_CheckParm("-gettickcount")) { @@ -2205,9 +2061,6 @@ FUNCMATH void I_StartupTimer(void) pfntimeGetTime = (p_timeGetTime)GetProcAddress(winmm, "timeGetTime"); } I_AddExitFunc(I_ShutdownTimer); -#elif 0 //#elif !defined (_arch_dreamcast) && !defined(GP2X) // the DC have it own timer and GP2X have broken pthreads? - if (SDL_InitSubSystem(SDL_INIT_TIMER) < 0) - I_Error("SRB2: Needs SDL_Timer, Error: %s", SDL_GetError()); #endif } @@ -2215,35 +2068,14 @@ FUNCMATH void I_StartupTimer(void) void I_Sleep(void) { -#if !(defined (_arch_dreamcast) || defined (_XBOX)) if (cv_sleep.value != -1) SDL_Delay(cv_sleep.value); -#endif } INT32 I_StartupSystem(void) { SDL_version SDLcompiled; 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 -#ifdef _arch_dreamcast -#ifdef _DEBUG - //gdb_init(); -#endif - printf(__FILE__":%i\n",__LINE__); -#ifdef _DEBUG - //gdb_breakpoint(); -#endif -#endif SDL_VERSION(&SDLcompiled) SDL_GetVersion(&SDLlinked); I_StartupConsole(); @@ -2251,11 +2083,7 @@ INT32 I_StartupSystem(void) SDLcompiled.major, SDLcompiled.minor, SDLcompiled.patch); I_OutputMsg("Linked with SDL version: %d.%d.%d\n", SDLlinked.major, SDLlinked.minor, SDLlinked.patch); -#if 0 //#ifdef GP2X //start up everything - if (SDL_Init(SDL_INIT_EVERYTHING) < 0) -#else if (SDL_Init(0) < 0) -#endif I_Error("SRB2: SDL System Error: %s", SDL_GetError()); //Alam: Oh no.... #ifndef NOMUMBLE I_SetupMumble(); @@ -2297,9 +2125,7 @@ void I_Quit(void) I_ShutdownGraphics(); I_ShutdownInput(); I_ShutdownSystem(); -#ifndef _arch_dreamcast SDL_Quit(); -#endif /* if option -noendtxt is set, don't print the text */ if (!M_CheckParm("-noendtxt") && W_CheckNumForName("ENDOOM") != LUMPERROR) { @@ -2308,10 +2134,6 @@ void I_Quit(void) } death: W_Shutdown(); -#ifdef GP2X - chdir("/usr/gp2x"); - execl("/usr/gp2x/gp2xmenu", "/usr/gp2x/gp2xmenu", NULL); -#endif exit(0); } @@ -2364,10 +2186,8 @@ void I_Error(const char *error, ...) I_ShutdownInput(); if (errorcount == 7) I_ShutdownSystem(); -#ifndef _arch_dreamcast if (errorcount == 8) SDL_Quit(); -#endif if (errorcount == 9) { M_SaveConfig(NULL); @@ -2386,12 +2206,6 @@ void I_Error(const char *error, ...) buffer, NULL); W_Shutdown(); - -#ifdef GP2X - chdir("/usr/gp2x"); - execl("/usr/gp2x/gp2xmenu", "/usr/gp2x/gp2xmenu", NULL); -#endif - exit(-1); // recursive errors detected } } @@ -2427,9 +2241,7 @@ void I_Error(const char *error, ...) I_ShutdownGraphics(); I_ShutdownInput(); I_ShutdownSystem(); -#ifndef _arch_dreamcast SDL_Quit(); -#endif // Implement message box with SDL_ShowSimpleMessageBox, // which should fail gracefully if it can't put a message box up @@ -2449,11 +2261,6 @@ void I_Error(const char *error, ...) *(INT32 *)2 = 4; //Alam: Debug! #endif -#ifdef GP2X - chdir("/usr/gp2x"); - execl("/usr/gp2x/gp2xmenu", "/usr/gp2x/gp2xmenu", NULL); -#endif - exit(-1); } @@ -2516,7 +2323,7 @@ void I_ShutdownSystem(void) for (c = MAX_QUIT_FUNCS-1; c >= 0; c--) if (quit_funcs[c]) (*quit_funcs[c])(); -#ifdef LOGMESSAGES +#ifdef LOGMESSAGES if (logstream) { I_OutputMsg("I_ShutdownSystem(): end of logstream.\n"); @@ -2529,10 +2336,8 @@ void I_ShutdownSystem(void) void I_GetDiskFreeSpace(INT64 *freespace) { -#if defined (_arch_dreamcast) || defined (_PSP) - *freespace = 0; -#elif defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) -#if defined (SOLARIS) || defined (__HAIKU__) || defined (_WII) || defined (_PS3) +#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) +#if defined (SOLARIS) || defined (__HAIKU__) *freespace = INT32_MAX; return; #else // Both Linux and BSD have this, apparently. @@ -2544,7 +2349,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) static p_GetDiskFreeSpaceExA pfnGetDiskFreeSpaceEx = NULL; static boolean testwin95 = false; ULARGE_INTEGER usedbytes, lfreespace; @@ -2575,13 +2380,6 @@ void I_GetDiskFreeSpace(INT64 *freespace) char *I_GetUserName(void) { -#ifdef GP2X - static char username[MAXPLAYERNAME] = "GP2XUSER"; - return username; -#elif defined (PSP) - static char username[MAXPLAYERNAME] = "PSPUSER"; - return username; -#elif !(defined (_WIN32_WCE) || defined (_XBOX)) static char username[MAXPLAYERNAME]; char *p; #ifdef _WIN32 @@ -2613,7 +2411,6 @@ char *I_GetUserName(void) if (strcmp(username, "") != 0) return username; -#endif return NULL; // dummy for platform independent version } @@ -2622,7 +2419,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) UNREFERENCED_PARAMETER(unixright); /// \todo should implement ntright under nt... return CreateDirectoryA(dirname, NULL); #else @@ -2636,9 +2433,6 @@ char *I_GetEnv(const char *name) { #ifdef NEED_SDL_GETENV return SDL_getenv(name); -#elif defined(_WIN32_WCE) - (void)name; - return NULL; #else return getenv(name); #endif @@ -2648,8 +2442,6 @@ INT32 I_PutEnv(char *variable) { #ifdef NEED_SDL_GETENV return SDL_putenv(variable); -#elif defined(_WIN32_WCE) - return ((variable)?-1:0); #else return putenv(variable); #endif @@ -2789,15 +2581,6 @@ static const char *locateWad(void) if (((envstr = I_GetEnv("SRB2WADDIR")) != NULL) && isWadPathOk(envstr)) return envstr; -#if defined(_WIN32_WCE) || defined(_PS3) || defined(_PSP) - // examine argv[0] - strcpy(returnWadPath, myargv[0]); - pathonly(returnWadPath); - I_PutEnv(va("HOME=%s",returnWadPath)); - if (isWadPathOk(returnWadPath)) - return returnWadPath; -#endif - #ifndef NOCWD I_OutputMsg(",."); // examine current dir @@ -2916,9 +2699,9 @@ 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) SetCurrentDirectoryA(waddir); -#elif !defined (_WIN32_WCE) && !defined (_PS3) +#else if (chdir(waddir) == -1) I_OutputMsg("Couldn't change working directory\n"); #endif @@ -2935,17 +2718,7 @@ const char *I_LocateWad(void) // quick fix for compil UINT32 I_GetFreeMem(UINT32 *total) { -#if defined (_arch_dreamcast) - //Dreamcast! - if (total) - *total = 16<<20; - return 8<<20; -#elif defined (_PSP) - // PSP - if (total) - *total = 32<<20; - return 16<<20; -#elif defined (FREEBSD) +#ifdef FREEBSD struct vmmeter sum; kvm_t *kd; struct nlist namelist[] = @@ -2982,7 +2755,7 @@ UINT32 I_GetFreeMem(UINT32 *total) if (total) *total = 32 << 20; return 32 << 20; -#elif (defined (_WIN32) || (defined (_WIN32_WCE) && !defined (__GNUC__))) && !defined (_XBOX) +#elif defined (_WIN32) MEMORYSTATUS info; info.dwLength = sizeof (MEMORYSTATUS); @@ -3054,7 +2827,7 @@ UINT32 I_GetFreeMem(UINT32 *total) const CPUInfoFlags *I_CPUInfo(void) { -#if (defined (_WIN32) && !defined (_WIN32_WCE)) && !defined (_XBOX) +#if defined (_WIN32) static CPUInfoFlags WIN_CPUInfo; SYSTEM_INFO SI; p_IsProcessorFeaturePresent pfnCPUID = (p_IsProcessorFeaturePresent)GetProcAddress(GetModuleHandleA("kernel32.dll"), "IsProcessorFeaturePresent"); diff --git a/src/sdl/i_ttf.c b/src/sdl/i_ttf.c index 4a41f120e..f2cd497ee 100644 --- a/src/sdl/i_ttf.c +++ b/src/sdl/i_ttf.c @@ -26,10 +26,7 @@ #include "i_ttf.h" // Search directories to find aforementioned TTF file. -#ifdef _PS3 -#include -#define FONTSEARCHPATH1 "/dev_hdd0/game/SRB2-PS3_/USRDIR/etc" -#elif defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) +#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) #define FONTSEARCHPATH1 "/usr/share/fonts" #define FONTSEARCHPATH2 "/usr/local/share/fonts" #define FONTSEARCHPATH3 "/usr/games/SRB2" @@ -233,16 +230,9 @@ void I_StartupTTF(UINT32 fontpointsize, Uint32 initflags, Uint32 vidmodeflags) { char *fontpath = NULL; INT32 fontstatus = -1; -#ifdef _PS3 - videoState state; - videoGetState(0, 0, &state); - videoGetResolution(state.displayMode.resolution, &res); - bitsperpixel = 24; -#else res.width = 320; res.height = 200; bitsperpixel = 8; -#endif // what's the point of trying to display an error? // SDL_ttf is not started, can't display anything to screen (presumably)... diff --git a/src/sdl/i_ttf.h b/src/sdl/i_ttf.h index 929c8021c..5fae9ed16 100644 --- a/src/sdl/i_ttf.h +++ b/src/sdl/i_ttf.h @@ -57,13 +57,12 @@ int currentfonthinting; int currentfontoutline; #endif -#ifndef _PS3 typedef struct { UINT16 width; UINT16 height; } VideoResolution; -#endif + UINT8 bitsperpixel; typedef enum diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 9cebe4945..4dcaf0c5d 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -47,7 +47,7 @@ #include "../doomdef.h" -#if defined (_WIN32) +#ifdef _WIN32 #include "SDL_syswm.h" #endif diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c index 88bbadd20..718324591 100644 --- a/src/sdl/mixer_sound.c +++ b/src/sdl/mixer_sound.c @@ -43,12 +43,10 @@ #define HAVE_ZLIB #ifndef _MSC_VER -#ifndef _WII #ifndef _LARGEFILE64_SOURCE #define _LARGEFILE64_SOURCE #endif #endif -#endif #ifndef _LFS64_LARGEFILE #define _LFS64_LARGEFILE diff --git a/src/sdl/sdl_sound.c b/src/sdl/sdl_sound.c index 0face92e2..1a2cabd23 100644 --- a/src/sdl/sdl_sound.c +++ b/src/sdl/sdl_sound.c @@ -49,7 +49,7 @@ #define MIX_CHANNELS 8 #endif -#if defined (_WIN32) && !defined (_WIN32_WCE) && !defined (_XBOX) +#ifdef _WIN32 #include #elif defined (__GNUC__) #include @@ -85,21 +85,11 @@ // mixing buffer, and the samplerate of the raw data. // Needed for calling the actual sound output. -#if defined (_WIN32_WCE) || defined (DC) || defined (PSP) || defined(GP2X) -#define NUM_CHANNELS MIX_CHANNELS -#else #define NUM_CHANNELS MIX_CHANNELS*4 -#endif #define INDEXOFSFX(x) ((sfxinfo_t *)x - S_sfx) -#if defined (_WIN32_WCE) || defined (DC) || defined (PSP) -static Uint16 samplecount = 512; //Alam: .5KB samplecount at 11025hz is 46.439909297052154195011337868481ms of buffer -#elif defined(GP2X) -static Uint16 samplecount = 128; -#else static Uint16 samplecount = 1024; //Alam: 1KB samplecount at 22050hz is 46.439909297052154195011337868481ms of buffer -#endif typedef struct chan_struct { @@ -151,17 +141,10 @@ static SDL_bool musicStarted = SDL_FALSE; #ifdef HAVE_MIXER static SDL_mutex *Msc_Mutex = NULL; /* FIXME: Make this file instance-specific */ -#ifdef _arch_dreamcast -#define MIDI_PATH "/ram" -#elif defined(GP2X) -#define MIDI_PATH "/mnt/sd/srb2" -#define MIDI_PATH2 "/tmp/mnt/sd/srb2" -#else #define MIDI_PATH srb2home #if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) #define MIDI_PATH2 "/tmp" #endif -#endif #define MIDI_TMPFILE "srb2music" #define MIDI_TMPFILE2 "srb2wav" static INT32 musicvol = 62; @@ -176,7 +159,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 (DC) || defined (_WIN32_WCE) || defined (_XBOX) //|| defined(_WIN32) || defined(GP2X) +#if 0 // defined(_WIN32) #undef USE_RWOPS #endif #endif @@ -1188,13 +1171,6 @@ void I_StartupSound(void) #endif #ifndef HAVE_MIXER nomidimusic = nodigimusic = true; -#endif -#ifdef DC - //nosound = true; -#ifdef HAVE_MIXER - nomidimusic = true; - nodigimusic = true; -#endif #endif memset(channels, 0, sizeof (channels)); //Alam: Clean it @@ -1243,13 +1219,7 @@ void I_StartupSound(void) audio.samples /= 2; } -#if defined (_PSP) && defined (HAVE_MIXER) // Bug in PSP's SDL_OpenAudio, can not open twice - I_SetChannels(); - sound_started = true; - Snd_Mutex = SDL_CreateMutex(); -#else if (nosound) -#endif return; #ifdef HW3SOUND @@ -1302,7 +1272,7 @@ void I_StartupSound(void) snddev.bps = 16; snddev.sample_rate = audio.freq; snddev.numsfxs = NUMSFX; -#if defined (_WIN32) && !defined (_XBOX) +#if defined (_WIN32) snddev.cooplevel = 0x00000002; snddev.hWnd = vid.WndParent; #endif @@ -1520,9 +1490,7 @@ void I_InitMusic(void) I_OutputMsg("Compiled for SDL_mixer version: %d.%d.%d\n", MIXcompiled.major, MIXcompiled.minor, MIXcompiled.patch); #ifdef MIXER_POS -#ifndef _WII if (MIXlinked->major == 1 && MIXlinked->minor == 2 && MIXlinked->patch < 7) -#endif canlooping = SDL_FALSE; #endif #ifdef USE_RWOPS @@ -1531,13 +1499,11 @@ void I_InitMusic(void) #endif I_OutputMsg("Linked with SDL_mixer version: %d.%d.%d\n", MIXlinked->major, MIXlinked->minor, MIXlinked->patch); -#if !(defined (DC) || defined (PSP) || defined(GP2X) || defined (WII)) if (audio.freq < 44100 && !M_CheckParm ("-freq")) //I want atleast 44Khz { audio.samples = (Uint16)(audio.samples*(INT32)(44100/audio.freq)); audio.freq = 44100; //Alam: to keep it around the same XX ms } -#endif if (sound_started #ifdef HW3SOUND @@ -1929,7 +1895,7 @@ boolean I_StartDigSong(const char *musicname, boolean looping) if (loopstart > 0) { loopstartDig = (double)((44.1l+loopstart) / 44100.0l); //8 PCM chucks off and PCM to secs -//#ifdef GP2X//#ifdef PARANOIA +//#ifdef PARANOIA //I_OutputMsg("I_StartDigSong: setting looping point to %ul PCMs(%f seconds)\n", loopstart, loopstartDig); //#endif } From b040113246f1178794ce8140a7f466d86cfbe58c Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sat, 16 Sep 2017 20:59:35 +0100 Subject: [PATCH 15/38] Removed the wrong endif by mistake --- src/sdl/i_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sdl/i_main.c b/src/sdl/i_main.c index df4e3cc99..f1cecad4d 100644 --- a/src/sdl/i_main.c +++ b/src/sdl/i_main.c @@ -143,11 +143,11 @@ int main(int argc, char **argv) && !InitBugTrap() #endif ) +#endif { LoadLibraryA("exchndl.dll"); } } -#endif prevExceptionFilter = SetUnhandledExceptionFilter(RecordExceptionInfo); MakeCodeWritable(); #endif From 2c73c1657fc8bb1442d9d33a933592995cc8300b Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sun, 17 Sep 2017 17:20:51 +0100 Subject: [PATCH 16/38] Restored all missing objs/bin subfolders from the move to Git, held in place by .gitignores --- bin/DC/.gitignore | 2 ++ bin/Dos/Debug/.gitignore | 2 ++ bin/Dos/Release/.gitignore | 2 ++ bin/FreeBSD/Debug/.gitignore | 2 ++ bin/FreeBSD/Release/.gitignore | 2 ++ bin/SDL/Debug/.gitignore | 2 ++ bin/SDL/Release/.gitignore | 2 ++ bin/WinCE/ARMV4Dbg/.gitignore | 2 ++ bin/WinCE/ARMV4IDbg/.gitignore | 2 ++ bin/WinCE/ARMV4IRel/.gitignore | 2 ++ bin/WinCE/ARMV4Rel/.gitignore | 2 ++ bin/WinCE/ARMV4TDbg/.gitignore | 2 ++ bin/WinCE/ARMV4TRel/.gitignore | 2 ++ bin/WinCE/MIPS16Dbg/.gitignore | 2 ++ bin/WinCE/MIPS16Rel/.gitignore | 2 ++ bin/WinCE/MIPSIIDbg/.gitignore | 2 ++ bin/WinCE/MIPSIIRel/.gitignore | 2 ++ bin/WinCE/MIPSII_FPDbg/.gitignore | 2 ++ bin/WinCE/MIPSII_FPRel/.gitignore | 2 ++ bin/WinCE/MIPSIVDbg/.gitignore | 2 ++ bin/WinCE/MIPSIVRel/.gitignore | 2 ++ bin/WinCE/MIPSIV_FPDbg/.gitignore | 2 ++ bin/WinCE/MIPSIV_FPRel/.gitignore | 2 ++ bin/WinCE/Release/.gitignore | 2 ++ bin/WinCE/SH3Dbg/.gitignore | 2 ++ bin/WinCE/SH3Rel/.gitignore | 2 ++ bin/WinCE/SH4Dbg/.gitignore | 2 ++ bin/WinCE/SH4Rel/.gitignore | 2 ++ bin/WinCE/X86Dbg/.gitignore | 2 ++ bin/WinCE/X86Rel/.gitignore | 2 ++ bin/WinCE/emulatorDbg/.gitignore | 2 ++ bin/WinCE/emulatorRel/.gitignore | 2 ++ bin/dummy/.gitignore | 2 ++ objs/FreeBSD/SDL/Debug/.gitignore | 2 ++ objs/FreeBSD/SDL/Release/.gitignore | 2 ++ objs/MasterClient/.gitignore | 2 ++ objs/MasterServer/.gitignore | 2 ++ objs/XBOX/SDL/Debug/.gitignore | 2 ++ objs/XBOX/SDL/Release/.gitignore | 2 ++ objs/cygwin/Debug/.gitignore | 2 ++ objs/cygwin/Release/.gitignore | 2 ++ objs/dummy/.gitignore | 2 ++ 42 files changed, 84 insertions(+) create mode 100644 bin/DC/.gitignore create mode 100644 bin/Dos/Debug/.gitignore create mode 100644 bin/Dos/Release/.gitignore create mode 100644 bin/FreeBSD/Debug/.gitignore create mode 100644 bin/FreeBSD/Release/.gitignore create mode 100644 bin/SDL/Debug/.gitignore create mode 100644 bin/SDL/Release/.gitignore create mode 100644 bin/WinCE/ARMV4Dbg/.gitignore create mode 100644 bin/WinCE/ARMV4IDbg/.gitignore create mode 100644 bin/WinCE/ARMV4IRel/.gitignore create mode 100644 bin/WinCE/ARMV4Rel/.gitignore create mode 100644 bin/WinCE/ARMV4TDbg/.gitignore create mode 100644 bin/WinCE/ARMV4TRel/.gitignore create mode 100644 bin/WinCE/MIPS16Dbg/.gitignore create mode 100644 bin/WinCE/MIPS16Rel/.gitignore create mode 100644 bin/WinCE/MIPSIIDbg/.gitignore create mode 100644 bin/WinCE/MIPSIIRel/.gitignore create mode 100644 bin/WinCE/MIPSII_FPDbg/.gitignore create mode 100644 bin/WinCE/MIPSII_FPRel/.gitignore create mode 100644 bin/WinCE/MIPSIVDbg/.gitignore create mode 100644 bin/WinCE/MIPSIVRel/.gitignore create mode 100644 bin/WinCE/MIPSIV_FPDbg/.gitignore create mode 100644 bin/WinCE/MIPSIV_FPRel/.gitignore create mode 100644 bin/WinCE/Release/.gitignore create mode 100644 bin/WinCE/SH3Dbg/.gitignore create mode 100644 bin/WinCE/SH3Rel/.gitignore create mode 100644 bin/WinCE/SH4Dbg/.gitignore create mode 100644 bin/WinCE/SH4Rel/.gitignore create mode 100644 bin/WinCE/X86Dbg/.gitignore create mode 100644 bin/WinCE/X86Rel/.gitignore create mode 100644 bin/WinCE/emulatorDbg/.gitignore create mode 100644 bin/WinCE/emulatorRel/.gitignore create mode 100644 bin/dummy/.gitignore create mode 100644 objs/FreeBSD/SDL/Debug/.gitignore create mode 100644 objs/FreeBSD/SDL/Release/.gitignore create mode 100644 objs/MasterClient/.gitignore create mode 100644 objs/MasterServer/.gitignore create mode 100644 objs/XBOX/SDL/Debug/.gitignore create mode 100644 objs/XBOX/SDL/Release/.gitignore create mode 100644 objs/cygwin/Debug/.gitignore create mode 100644 objs/cygwin/Release/.gitignore create mode 100644 objs/dummy/.gitignore diff --git a/bin/DC/.gitignore b/bin/DC/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/DC/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/Dos/Debug/.gitignore b/bin/Dos/Debug/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/Dos/Debug/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/Dos/Release/.gitignore b/bin/Dos/Release/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/Dos/Release/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/FreeBSD/Debug/.gitignore b/bin/FreeBSD/Debug/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/FreeBSD/Debug/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/FreeBSD/Release/.gitignore b/bin/FreeBSD/Release/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/FreeBSD/Release/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/SDL/Debug/.gitignore b/bin/SDL/Debug/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/SDL/Debug/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/SDL/Release/.gitignore b/bin/SDL/Release/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/SDL/Release/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/ARMV4Dbg/.gitignore b/bin/WinCE/ARMV4Dbg/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/ARMV4Dbg/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/ARMV4IDbg/.gitignore b/bin/WinCE/ARMV4IDbg/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/ARMV4IDbg/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/ARMV4IRel/.gitignore b/bin/WinCE/ARMV4IRel/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/ARMV4IRel/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/ARMV4Rel/.gitignore b/bin/WinCE/ARMV4Rel/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/ARMV4Rel/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/ARMV4TDbg/.gitignore b/bin/WinCE/ARMV4TDbg/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/ARMV4TDbg/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/ARMV4TRel/.gitignore b/bin/WinCE/ARMV4TRel/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/ARMV4TRel/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/MIPS16Dbg/.gitignore b/bin/WinCE/MIPS16Dbg/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/MIPS16Dbg/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/MIPS16Rel/.gitignore b/bin/WinCE/MIPS16Rel/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/MIPS16Rel/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/MIPSIIDbg/.gitignore b/bin/WinCE/MIPSIIDbg/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/MIPSIIDbg/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/MIPSIIRel/.gitignore b/bin/WinCE/MIPSIIRel/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/MIPSIIRel/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/MIPSII_FPDbg/.gitignore b/bin/WinCE/MIPSII_FPDbg/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/MIPSII_FPDbg/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/MIPSII_FPRel/.gitignore b/bin/WinCE/MIPSII_FPRel/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/MIPSII_FPRel/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/MIPSIVDbg/.gitignore b/bin/WinCE/MIPSIVDbg/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/MIPSIVDbg/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/MIPSIVRel/.gitignore b/bin/WinCE/MIPSIVRel/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/MIPSIVRel/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/MIPSIV_FPDbg/.gitignore b/bin/WinCE/MIPSIV_FPDbg/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/MIPSIV_FPDbg/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/MIPSIV_FPRel/.gitignore b/bin/WinCE/MIPSIV_FPRel/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/MIPSIV_FPRel/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/Release/.gitignore b/bin/WinCE/Release/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/Release/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/SH3Dbg/.gitignore b/bin/WinCE/SH3Dbg/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/SH3Dbg/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/SH3Rel/.gitignore b/bin/WinCE/SH3Rel/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/SH3Rel/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/SH4Dbg/.gitignore b/bin/WinCE/SH4Dbg/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/SH4Dbg/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/SH4Rel/.gitignore b/bin/WinCE/SH4Rel/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/SH4Rel/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/X86Dbg/.gitignore b/bin/WinCE/X86Dbg/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/X86Dbg/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/X86Rel/.gitignore b/bin/WinCE/X86Rel/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/X86Rel/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/emulatorDbg/.gitignore b/bin/WinCE/emulatorDbg/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/emulatorDbg/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/WinCE/emulatorRel/.gitignore b/bin/WinCE/emulatorRel/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/WinCE/emulatorRel/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/bin/dummy/.gitignore b/bin/dummy/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/bin/dummy/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/objs/FreeBSD/SDL/Debug/.gitignore b/objs/FreeBSD/SDL/Debug/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/objs/FreeBSD/SDL/Debug/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/objs/FreeBSD/SDL/Release/.gitignore b/objs/FreeBSD/SDL/Release/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/objs/FreeBSD/SDL/Release/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/objs/MasterClient/.gitignore b/objs/MasterClient/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/objs/MasterClient/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/objs/MasterServer/.gitignore b/objs/MasterServer/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/objs/MasterServer/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/objs/XBOX/SDL/Debug/.gitignore b/objs/XBOX/SDL/Debug/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/objs/XBOX/SDL/Debug/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/objs/XBOX/SDL/Release/.gitignore b/objs/XBOX/SDL/Release/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/objs/XBOX/SDL/Release/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/objs/cygwin/Debug/.gitignore b/objs/cygwin/Debug/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/objs/cygwin/Debug/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/objs/cygwin/Release/.gitignore b/objs/cygwin/Release/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/objs/cygwin/Release/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing diff --git a/objs/dummy/.gitignore b/objs/dummy/.gitignore new file mode 100644 index 000000000..42c6dc2c6 --- /dev/null +++ b/objs/dummy/.gitignore @@ -0,0 +1,2 @@ +# DON'T REMOVE +# This keeps the folder from disappearing From 7f875131ee17cc78880c89ea24fad816ef845590 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Mon, 18 Sep 2017 18:14:05 +0100 Subject: [PATCH 17/38] If compiling for GP2X with SDL, make it use SDL 1.2 interface like the others Doing this way because I have no idea if the GP2X port was SUPPOSED to use SDL or not in the first place --- src/Makefile.cfg | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Makefile.cfg b/src/Makefile.cfg index 3f6197732..663d2387a 100644 --- a/src/Makefile.cfg +++ b/src/Makefile.cfg @@ -410,6 +410,12 @@ endif endif endif +ifdef GP2X +ifdef SDL + SDL12=1 +endif +endif + ifdef ARCHNAME OBJDIR:=$(OBJDIR)/$(ARCHNAME) BIN:=$(BIN)/$(ARCHNAME) From 7e23014d5fab80bd4ee2509aa09e14efed25db1c Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 28 Sep 2017 09:04:36 -0400 Subject: [PATCH 18/38] Makefile: support GCC 6.4 --- src/Makefile.cfg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Makefile.cfg b/src/Makefile.cfg index 5bf7f247d..50cc32dd5 100644 --- a/src/Makefile.cfg +++ b/src/Makefile.cfg @@ -8,6 +8,10 @@ # +ifdef GCC64 +GCC64=1 +endif + ifdef GCC63 GCC62=1 endif From bdba212b2a9653734afe6b3b6b4c08fa104980c5 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 28 Sep 2017 09:13:01 -0400 Subject: [PATCH 19/38] Makefile: add support for GCC 7.1 and 7.2 --- .travis.yml | 15 +++++++++++++++ src/Makefile.cfg | 7 +++++++ 2 files changed, 22 insertions(+) diff --git a/.travis.yml b/.travis.yml index e5dbb58e4..285eebd52 100644 --- a/.travis.yml +++ b/.travis.yml @@ -100,6 +100,21 @@ matrix: compiler: gcc-6 env: WFLAGS="-Wno-tautological-compare" #gcc-6 (Ubuntu 6.1.1-3ubuntu11~14.04.1) 6.1.1 20160511 + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - libsdl2-mixer-dev + - libpng-dev + - libgl1-mesa-dev + - libgme-dev + - p7zip-full + - gcc-7 + compiler: gcc-7 + env: WFLAGS="-Wno-tautological-compare" + #gcc-7 (Ubuntu 7.2.0-1ubuntu1~14.04) 7.2.0 20170802 - os: linux compiler: clang #clang version 3.5.0 (tags/RELEASE_350/final) diff --git a/src/Makefile.cfg b/src/Makefile.cfg index 50cc32dd5..7620a3d68 100644 --- a/src/Makefile.cfg +++ b/src/Makefile.cfg @@ -7,6 +7,13 @@ # and other things # +ifdef GCC72 +GCC71=1 +endif + +ifdef GCC71 +GCC64=1 +endif ifdef GCC64 GCC64=1 From 55f377ba3df6497b7ade878e4c58879c23e50717 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 28 Sep 2017 09:13:46 -0400 Subject: [PATCH 20/38] Build: kill GCC 7's format-overflow warnings --- src/d_net.c | 2 +- src/f_wipe.c | 2 +- src/g_game.c | 2 +- src/sounds.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/d_net.c b/src/d_net.c index 50b6c8cf6..c335d21ca 100644 --- a/src/d_net.c +++ b/src/d_net.c @@ -1363,7 +1363,7 @@ boolean D_CheckNetGame(void) #else if (M_CheckParm("-debugfile")) { - char filename[20]; + char filename[21]; INT32 k = doomcom->consoleplayer - 1; if (M_IsNextParm()) k = atoi(M_GetNextParm()) - 1; diff --git a/src/f_wipe.c b/src/f_wipe.c index a0b685a32..e45f2e85b 100644 --- a/src/f_wipe.c +++ b/src/f_wipe.c @@ -94,7 +94,7 @@ static fixed_t paldiv; * \return fademask_t for lump */ static fademask_t *F_GetFadeMask(UINT8 masknum, UINT8 scrnnum) { - static char lumpname[9] = "FADEmmss"; + static char lumpname[10] = "FADEmmss"; static fademask_t fm = {NULL,0,0,0,0,0}; lumpnum_t lumpnum; UINT8 *lump, *mask; diff --git a/src/g_game.c b/src/g_game.c index 7499fe7a0..f1b176f2a 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -726,7 +726,7 @@ void G_SetGameModified(boolean silent) */ const char *G_BuildMapName(INT32 map) { - static char mapname[9] = "MAPXX"; // internal map name (wad resource name) + static char mapname[10] = "MAPXX"; // internal map name (wad resource name) I_Assert(map > 0); I_Assert(map <= NUMMAPS); diff --git a/src/sounds.c b/src/sounds.c index 8ad42ac9f..53e3b6187 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -477,7 +477,7 @@ void S_InitRuntimeSounds (void) { sfxenum_t i; INT32 value; - char soundname[7]; + char soundname[10]; for (i = sfx_freeslot0; i <= sfx_lastskinsoundslot; i++) { From 2ccd397d11e8ec97ad46f99c1373ce88d21350c6 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 28 Sep 2017 09:39:47 -0400 Subject: [PATCH 21/38] Build: kill GCC 7's implicit-fallthrough warning --- src/blua/ldebug.c | 2 +- src/blua/llex.c | 25 +++++++++++++++---------- src/blua/ltable.c | 1 + src/d_clisrv.c | 3 +++ src/d_netcmd.c | 2 +- src/m_menu.c | 5 +++++ src/p_ceilng.c | 5 ++++- src/p_enemy.c | 2 +- src/p_floor.c | 2 ++ src/p_inter.c | 4 +++- src/p_mobj.c | 3 ++- src/p_spec.c | 10 +++++++++- src/sdl/i_video.c | 1 + src/v_video.c | 8 ++++++++ src/y_inter.c | 2 ++ 15 files changed, 58 insertions(+), 17 deletions(-) diff --git a/src/blua/ldebug.c b/src/blua/ldebug.c index 497d54980..542e209a1 100644 --- a/src/blua/ldebug.c +++ b/src/blua/ldebug.c @@ -412,7 +412,7 @@ static Instruction symbexec (const Proto *pt, int lastpc, int reg) { case OP_FORLOOP: case OP_FORPREP: checkreg(pt, a+3); - /* go through */ + /* FALLTHRU */ case OP_JMP: { int dest = pc+1+b; /* not full check and jump is forward and do not skip `lastpc'? */ diff --git a/src/blua/llex.c b/src/blua/llex.c index 0b328dcad..9e3dc2929 100644 --- a/src/blua/llex.c +++ b/src/blua/llex.c @@ -306,11 +306,12 @@ static void read_string (LexState *ls, int del, SemInfo *seminfo) { save_and_next(ls); /* skip $ */ seminfo->ts = luaX_newstring(ls, luaZ_buffer(ls->buff) + 1, luaZ_bufflen(ls->buff) - 2); - ls->refstr++; /* expect '\' anytime soon */ + ls->refstr++; /* expect '\' anytime soon */ lua_assert(ls->lookahead.token == TK_EOS); - ls->lookahead.token = TK_CONCAT; - return; - } + ls->lookahead.token = TK_CONCAT; + return; + } + /* FALLTHRU */ default: { if (!isdigit(ls->current)) save_and_next(ls); /* handles \\, \", \', and \? */ @@ -340,7 +341,8 @@ static void read_string (LexState *ls, int del, SemInfo *seminfo) { }; switch (i) { - case 4: save( ls, (c>>8) & 0xff ); // pass-through.. + case 4: save( ls, (c>>8) & 0xff ); + /* FALLTHRU */ case 2: save( ls, c&0xff ); break; case 5: @@ -350,7 +352,7 @@ static void read_string (LexState *ls, int del, SemInfo *seminfo) { } continue; - // "\u0000".."\x10FFFF": UTF-8 encoded Unicode + // "\u0000".."\x10FFFF": UTF-8 encoded Unicode // // Note that although codes are entered like this (must have min. four digit, // just to tease you!) the actual outcome in the string will vary between @@ -482,20 +484,22 @@ static int llex (LexState *ls, SemInfo *seminfo) { else if (sep == -1) return '['; else luaX_lexerror(ls, "invalid long string delimiter", TK_STRING); } + /* FALLTHRU */ case '=': { next(ls); if (ls->current != '=') return '='; else { next(ls); return TK_EQ; } } + /* FALLTHRU */ case '<': { next(ls); - if (ls->current == '<') { next(ls); return TK_SHL; } + if (ls->current == '<') { next(ls); return TK_SHL; } if (ls->current != '=') return '<'; else { next(ls); return TK_LE; } } case '>': { next(ls); - if (ls->current == '>') { next(ls); return TK_SHR; } + if (ls->current == '>') { next(ls); return TK_SHR; } if (ls->current != '=') return '>'; else { next(ls); return TK_GE; } } @@ -547,9 +551,10 @@ static int llex (LexState *ls, SemInfo *seminfo) { } case '\\': if (ls->refstr) { ls->refstr--; - ls->current = '"'; /* whacky! */ - return TK_CONCAT; + ls->current = '"'; /* whacky! */ + return TK_CONCAT; } + /* FALLTHRU */ default: { if (isspace(ls->current)) { lua_assert(!currIsNewline(ls)); diff --git a/src/blua/ltable.c b/src/blua/ltable.c index 9f4d91ff2..0ddd9ef4f 100644 --- a/src/blua/ltable.c +++ b/src/blua/ltable.c @@ -478,6 +478,7 @@ static TValue *newkey (lua_State *L, Table *t, const TValue *key) { return luaH_getnum(t, k); /* use specialized version */ /* else go through */ } + /* FALLTHRU */ default: { Node *n = mainposition(t, key); do { /* check whether `key' is somewhere in the chain */ diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 7c21d79fc..c1f2f8ed4 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -1883,6 +1883,7 @@ static boolean CL_ServerConnectionTicker(boolean viams, const char *tmpsave, tic break; // exit the case cl_mode = CL_ASKJOIN; // don't break case continue to cljoin request now + /* FALLTHRU */ case CL_ASKJOIN: CL_LoadServerFiles(); @@ -3605,6 +3606,7 @@ static void HandlePacketFromAwayNode(SINT8 node) // Do not remove my own server (we have just get a out of order packet) if (node == servernode) break; + /* FALLTHRU */ default: DEBFILE(va("unknown packet received (%d) from unknown host\n",netbuffer->packettype)); @@ -3761,6 +3763,7 @@ FILESTAMP break; case PT_TEXTCMD2: // splitscreen special netconsole = nodetoplayer2[node]; + /* FALLTHRU */ case PT_TEXTCMD: if (client) break; diff --git a/src/d_netcmd.c b/src/d_netcmd.c index b5563f4e8..83bbc7aad 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -2453,7 +2453,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum) error = true; break; } - //fall down + /* FALLTHRU */ case GT_TAG: switch (NetPacket.packet.newteam) { diff --git a/src/m_menu.c b/src/m_menu.c index 45b3d7e57..5b699dcb4 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -3022,6 +3022,7 @@ static void M_DrawGenericMenu(void) W_CachePatchName(currentMenu->menuitems[i].patch, PU_CACHE)); } } + /* FALLTHRU */ case IT_NOTHING: case IT_DYBIGSPACE: y += LINEHEIGHT; @@ -3073,6 +3074,7 @@ static void M_DrawGenericMenu(void) break; case IT_STRING2: V_DrawString(x, y, 0, currentMenu->menuitems[i].text); + /* FALLTHRU */ case IT_DYLITLSPACE: y += SMALLLINEHEIGHT; break; @@ -3085,6 +3087,7 @@ static void M_DrawGenericMenu(void) case IT_TRANSTEXT: if (currentMenu->menuitems[i].alphaKey) y = currentMenu->y+currentMenu->menuitems[i].alphaKey; + /* FALLTHRU */ case IT_TRANSTEXT2: V_DrawString(x, y, V_TRANSLUCENT, currentMenu->menuitems[i].text); y += SMALLLINEHEIGHT; @@ -3297,6 +3300,7 @@ static void M_DrawCenteredMenu(void) W_CachePatchName(currentMenu->menuitems[i].patch, PU_CACHE)); } } + /* FALLTHRU */ case IT_NOTHING: case IT_DYBIGSPACE: y += LINEHEIGHT; @@ -3347,6 +3351,7 @@ static void M_DrawCenteredMenu(void) break; case IT_STRING2: V_DrawCenteredString(x, y, 0, currentMenu->menuitems[i].text); + /* FALLTHRU */ case IT_DYLITLSPACE: y += SMALLLINEHEIGHT; break; diff --git a/src/p_ceilng.c b/src/p_ceilng.c index db30b5cac..27d739414 100644 --- a/src/p_ceilng.c +++ b/src/p_ceilng.c @@ -79,7 +79,7 @@ void T_MoveCeiling(ceiling_t *ceiling) P_LinedefExecute((INT16)(ceiling->texture + INT16_MAX + 2), NULL, NULL); if (ceiling->texture > -1) // flat changing ceiling->sector->ceilingpic = ceiling->texture; - // don't break + /* FALLTHRU */ case raiseToHighest: // case raiseCeilingByLine: case moveCeilingByFrontTexture: @@ -182,6 +182,7 @@ void T_MoveCeiling(ceiling_t *ceiling) // except generalized ones, reset speed, start back up case crushAndRaise: ceiling->speed = CEILSPEED; + /* FALLTHRU */ case fastCrushAndRaise: ceiling->direction = 1; break; @@ -200,6 +201,7 @@ void T_MoveCeiling(ceiling_t *ceiling) if (ceiling->texture > -1) // flat changing ceiling->sector->ceilingpic = ceiling->texture; // don't break + /* FALLTHRU */ // in all other cases, just remove the active ceiling case lowerAndCrush: @@ -427,6 +429,7 @@ INT32 EV_DoCeiling(line_t *line, ceiling_e type) case crushAndRaise: ceiling->crush = true; ceiling->topheight = sec->ceilingheight; + /* FALLTHRU */ case lowerAndCrush: ceiling->bottomheight = sec->floorheight; ceiling->bottomheight += 4*FRACUNIT; diff --git a/src/p_enemy.c b/src/p_enemy.c index 649c78838..9de735edc 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -6169,7 +6169,7 @@ void A_Boss7Chase(mobj_t *actor) break; } actor->threshold++; - // fall into... + /* FALLTHRU */ case 1: // Chaingun Goop A_FaceTarget(actor); P_SetMobjState(actor, S_BLACKEGG_SHOOT1); diff --git a/src/p_floor.c b/src/p_floor.c index 911213014..8438050fa 100644 --- a/src/p_floor.c +++ b/src/p_floor.c @@ -312,6 +312,7 @@ void T_MoveFloor(floormove_t *movefloor) case moveFloorByFrontSector: if (movefloor->texture < -1) // chained linedef executing P_LinedefExecute((INT16)(movefloor->texture + INT16_MAX + 2), NULL, NULL); + /* FALLTHRU */ case instantMoveFloorByFrontSector: if (movefloor->texture > -1) // flat changing movefloor->sector->floorpic = movefloor->texture; @@ -360,6 +361,7 @@ void T_MoveFloor(floormove_t *movefloor) case moveFloorByFrontSector: if (movefloor->texture < -1) // chained linedef executing P_LinedefExecute((INT16)(movefloor->texture + INT16_MAX + 2), NULL, NULL); + /* FALLTHRU */ case instantMoveFloorByFrontSector: if (movefloor->texture > -1) // flat changing movefloor->sector->floorpic = movefloor->texture; diff --git a/src/p_inter.c b/src/p_inter.c index 4892d9775..407e091fa 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -383,9 +383,11 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) case MT_REDTEAMRING: if (player->ctfteam != 1) return; + /* FALLTHRU */ case MT_BLUETEAMRING: // Yes, I'm lazy. Oh well, deal with it. if (special->type == MT_BLUETEAMRING && player->ctfteam != 2) return; + /* FALLTHRU */ case MT_RING: case MT_FLINGRING: if (!(P_CanPickupItem(player, false))) @@ -3127,7 +3129,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da P_SetMobjState(target, target->info->meleestate); // go to pinch pain state break; } - // fallthrough + /* FALLTHRU */ default: P_SetMobjState(target, target->info->painstate); break; diff --git a/src/p_mobj.c b/src/p_mobj.c index 9fdbc37fb..f52011517 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -7138,7 +7138,7 @@ void P_MobjThinker(mobj_t *mobj) mobj->z = mobj->ceilingz - mobj->height; else mobj->z = mobj->floorz; - // THERE IS NO BREAK HERE ON PURPOSE + /* FALLTHRU */ default: // check mobj against possible water content, before movement code P_MobjCheckWater(mobj); @@ -8185,6 +8185,7 @@ void P_PrecipitationEffects(void) { case PRECIP_RAIN: // no lightning or thunder whatsoever sounds_thunder = false; + /* FALLTHRU */ case PRECIP_STORM_NOSTRIKES: // no lightning strikes specifically effects_lightning = false; break; diff --git a/src/p_spec.c b/src/p_spec.c index 48c0f58b3..ad8d7337b 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -3625,6 +3625,7 @@ void P_ProcessSpecialSector(player_t *player, sector_t *sector, sector_t *rovers goto DoneSection2; } } + /* FALLTHRU */ case 4: // Linedef executor that doesn't require touching floor case 5: // Linedef executor case 6: // Linedef executor (7 Emeralds) @@ -4632,6 +4633,8 @@ static void P_RunSpecialSectorCheck(player_t *player, sector_t *sector) // requires touching floor. break; } + /* FALLTHRU */ + case 1: // Starpost activator case 5: // Fan sector case 6: // Super Sonic Transform @@ -5711,6 +5714,8 @@ void P_SpawnSpecials(INT32 fromnetsave) EV_DoFloor(&lines[i], bounceFloor); if (lines[i].special == 54) break; + /* FALLTHRU */ + case 55: // New super cool and awesome moving ceiling type if (lines[i].backsector) EV_DoCeiling(&lines[i], bounceCeiling); @@ -5722,7 +5727,8 @@ void P_SpawnSpecials(INT32 fromnetsave) EV_DoFloor(&lines[i], bounceFloorCrush); if (lines[i].special == 57) - break; //only move the floor + break; //only move the floor + /* FALLTHRU */ case 58: // New super cool and awesome moving ceiling crush type if (lines[i].backsector) @@ -6828,6 +6834,7 @@ static void P_SpawnScrollers(void) Add_Scroller(sc_ceiling, -dx, dy, control, s, accel, l->flags & ML_NOCLIMB); if (special != 533) break; + /* FALLTHRU */ case 523: // carry objects on ceiling dx = FixedMul(dx, CARRYFACTOR); @@ -6842,6 +6849,7 @@ static void P_SpawnScrollers(void) Add_Scroller(sc_floor, -dx, dy, control, s, accel, l->flags & ML_NOCLIMB); if (special != 530) break; + /* FALLTHRU */ case 520: // carry objects on floor dx = FixedMul(dx, CARRYFACTOR); diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 9cebe4945..707c66dd6 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -941,6 +941,7 @@ static inline boolean I_SkipFrame(void) case GS_LEVEL: if (!paused) return false; + /* FALLTHRU */ case GS_TIMEATTACK: case GS_WAITINGPLAYERS: return skip; // Skip odd frames diff --git a/src/v_video.c b/src/v_video.c index 64bb3214e..cc81cedbc 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -1083,6 +1083,7 @@ char *V_WordWrap(INT32 x, INT32 w, INT32 option, const char *string) { case V_MONOSPACE: spacewidth = 8; + /* FALLTHRU */ case V_OLDSPACING: charwidth = 8; break; @@ -1160,6 +1161,7 @@ void V_DrawString(INT32 x, INT32 y, INT32 option, const char *string) { case V_MONOSPACE: spacewidth = 8; + /* FALLTHRU */ case V_OLDSPACING: charwidth = 8; break; @@ -1269,6 +1271,7 @@ void V_DrawSmallString(INT32 x, INT32 y, INT32 option, const char *string) { case V_MONOSPACE: spacewidth = 4; + /* FALLTHRU */ case V_OLDSPACING: charwidth = 4; break; @@ -1370,6 +1373,7 @@ void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string) { case V_MONOSPACE: spacewidth = 5; + /* FALLTHRU */ case V_OLDSPACING: charwidth = 5; break; @@ -1463,6 +1467,7 @@ void V_DrawStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string) { case V_MONOSPACE: spacewidth = 8; + /* FALLTHRU */ case V_OLDSPACING: charwidth = 8; break; @@ -1747,6 +1752,7 @@ INT32 V_StringWidth(const char *string, INT32 option) { case V_MONOSPACE: spacewidth = 8; + /* FALLTHRU */ case V_OLDSPACING: charwidth = 8; break; @@ -1785,6 +1791,7 @@ INT32 V_SmallStringWidth(const char *string, INT32 option) { case V_MONOSPACE: spacewidth = 4; + /* FALLTHRU */ case V_OLDSPACING: charwidth = 4; break; @@ -1823,6 +1830,7 @@ INT32 V_ThinStringWidth(const char *string, INT32 option) { case V_MONOSPACE: spacewidth = 5; + /* FALLTHRU */ case V_OLDSPACING: charwidth = 5; break; diff --git a/src/y_inter.c b/src/y_inter.c index 42f1e2235..cfdc2a080 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -1004,6 +1004,7 @@ void Y_StartIntermission(void) // fall back into the coop intermission for now intertype = int_coop; + /* FALLTHRU */ case int_coop: // coop or single player, normal level { // award time and ring bonuses @@ -1117,6 +1118,7 @@ void Y_StartIntermission(void) // fall back into the special stage intermission for now intertype = int_spec; + /* FALLTHRU */ case int_spec: // coop or single player, special stage { // Update visitation flags? From 7f98c5c8044611b036d94e723375a3c142f1260e Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 28 Sep 2017 10:02:08 -0400 Subject: [PATCH 22/38] Build: do not error on fallthrough --- .travis.yml | 2 +- src/m_misc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 285eebd52..9c82909bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -113,7 +113,7 @@ matrix: - p7zip-full - gcc-7 compiler: gcc-7 - env: WFLAGS="-Wno-tautological-compare" + env: WFLAGS="-Wno-error=implicit-fallthrough" #gcc-7 (Ubuntu 7.2.0-1ubuntu1~14.04) 7.2.0 20170802 - os: linux compiler: clang diff --git a/src/m_misc.c b/src/m_misc.c index d88643ec4..8193571e8 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -1079,7 +1079,7 @@ void M_StartMovie(void) moviemode = M_StartMovieGIF(pathname); break; } - // fall thru + /* FALLTHRU */ case MM_APNG: moviemode = M_StartMovieAPNG(pathname); break; From 1ffdd2e945321ca235892100be3b51b532d6e91c Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 28 Sep 2017 10:15:10 -0400 Subject: [PATCH 23/38] Travis: still need to keep -Wno-tautological-compare for GCC 7 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9c82909bc..afb04758b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -113,7 +113,7 @@ matrix: - p7zip-full - gcc-7 compiler: gcc-7 - env: WFLAGS="-Wno-error=implicit-fallthrough" + env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough" #gcc-7 (Ubuntu 7.2.0-1ubuntu1~14.04) 7.2.0 20170802 - os: linux compiler: clang From 5986720789d9dd421b8b934f1e6f2e3b4cef439c Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 28 Sep 2017 11:01:52 -0400 Subject: [PATCH 24/38] Build: fixups --- src/hardware/hw_md2.c | 2 +- src/lua_infolib.c | 12 ++++++++---- src/m_menu.c | 1 + src/p_mobj.c | 6 ++++-- src/p_user.c | 1 + 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index b34ddfc01..70a257c92 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -428,7 +428,7 @@ static md2_model_t *md2_readModel(const char *filename) spr2 |= FF_SPR2SUPER; if (model->spr2frames[spr2*2 + 1]++ == 0) // numspr2frames model->spr2frames[spr2*2] = i; // starting frame - CONS_Debug(DBG_RENDER, "frame %s, sprite2 %s - starting frame %d, number of frames %d\n", frame->name, spr2names[spr2 & ~FF_SPR2SUPER], model->spr2frames[spr2*2], model->spr2frames[spr2*2 + 1]); + CONS_Debug(DBG_RENDER, "frame %s, sprite2 %s - starting frame %s, number of frames %s\n", frame->name, spr2names[spr2 & ~FF_SPR2SUPER], sizeu1(model->spr2frames[spr2*2]), sizeu2(model->spr2frames[spr2*2 + 1])); } } } diff --git a/src/lua_infolib.c b/src/lua_infolib.c index c3803f7e2..48ac57c32 100644 --- a/src/lua_infolib.c +++ b/src/lua_infolib.c @@ -165,10 +165,12 @@ static int lib_setSpr2default(lua_State *L) { const char *name = lua_tostring(L, 1); for (i = 0; i < free_spr2; i++) + { if (fastcmp(name, spr2names[i])) break; - if (i == free_spr2) - return luaL_error(L, "spr2defaults[] invalid index"); + } + if (i == free_spr2) + return luaL_error(L, "spr2defaults[] invalid index"); } else return luaL_error(L, "spr2defaults[] invalid index"); @@ -182,10 +184,12 @@ static int lib_setSpr2default(lua_State *L) { const char *name = lua_tostring(L, 2); for (j = 0; j < free_spr2; j++) + { if (fastcmp(name, spr2names[j])) break; - if (j == free_spr2) - return luaL_error(L, "spr2defaults[] invalid index"); + } + if (j == free_spr2) + return luaL_error(L, "spr2defaults[] invalid index"); } if (j >= free_spr2) diff --git a/src/m_menu.c b/src/m_menu.c index 5bc5a0b0b..8afee97f7 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -8719,6 +8719,7 @@ static void M_HandleSetupMultiPlayer(INT32 choice) COM_BufAddText (va("%s %s\n",setupm_cvdefaultname->name,setupm_name)); break; } + /* FALLTHRU */ case KEY_RIGHTARROW: if (itemOn == 1) //player skin { diff --git a/src/p_mobj.c b/src/p_mobj.c index ac47ba686..10bdee2bc 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -6781,6 +6781,7 @@ void P_MobjThinker(mobj_t *mobj) whoosh->momz = mobj->target->momz; // Stay reasonably centered for a few frames mobj->target->player->pflags &= ~PF_SHIELDABILITY; // prevent eternal whoosh } + /* FALLTHRU */ case MT_FLAMEAURA_ORB: if (!(mobj->flags2 & MF2_SHIELD)) return; @@ -7268,7 +7269,7 @@ void P_MobjThinker(mobj_t *mobj) break; case MT_AQUABUZZ: P_MobjCheckWater(mobj); // solely for MFE_UNDERWATER for A_FlickySpawn - // no break here on purpose + /* FALLTHRU */ case MT_BIGAIRMINE: { if (mobj->tracer && mobj->tracer->player && mobj->tracer->health > 0 @@ -7752,6 +7753,7 @@ void P_MobjThinker(mobj_t *mobj) else mobj->z = mobj->floorz; } + /* FALLTHRU */ default: // check mobj against possible water content, before movement code P_MobjCheckWater(mobj); @@ -11311,4 +11313,4 @@ mobj_t *P_SpawnMobjFromMobj(mobj_t *mobj, fixed_t xofs, fixed_t yofs, fixed_t zo newmobj->destscale = mobj->destscale; P_SetScale(newmobj, mobj->scale); return newmobj; -} \ No newline at end of file +} diff --git a/src/p_user.c b/src/p_user.c index 60d4cd5b7..5de9aa17b 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -9773,6 +9773,7 @@ void P_PlayerThink(player_t *player) player->drawangle = R_PointToAngle2(0, 0, player->mo->momx, player->mo->momy); break; } + /* FALLTHRU */ default: player->drawangle = player->mo->angle; break; From 9adf5f811bf1f9fe03f7110d1c74bc0be9638f23 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 28 Sep 2017 11:06:57 -0400 Subject: [PATCH 25/38] CircleCI: remove blank lines --- .circleci/config.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b5c43d017..ca9105685 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -58,6 +58,3 @@ jobs: key: v1-SRB2-{{ .Branch }}-{{ checksum "objs/Linux/SDL/Release/depend.dep" }} paths: - /root/.ccache - - - From 1be137f4610f88635b08877d015eac9c2c4521bf Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 28 Sep 2017 11:10:24 -0400 Subject: [PATCH 26/38] cleanup --- src/dehacked.c | 2 +- src/lua_baselib.c | 2 +- src/lua_blockmaplib.c | 2 +- src/m_cond.c | 10 +++++----- src/m_menu.c | 6 +++--- src/p_enemy.c | 2 +- src/p_setup.c | 4 ++-- src/p_user.c | 2 +- src/y_inter.c | 6 +++--- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/dehacked.c b/src/dehacked.c index 383a32bf3..cddbd1a0e 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -7074,7 +7074,7 @@ struct { {"ME_ALLEMERALDS",ME_ALLEMERALDS}, {"ME_ULTIMATE",ME_ULTIMATE}, {"ME_PERFECT",ME_PERFECT}, - + #ifdef HAVE_BLUA // p_local.h constants {"FLOATSPEED",FLOATSPEED}, diff --git a/src/lua_baselib.c b/src/lua_baselib.c index b88a9712e..4d845df52 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -135,7 +135,7 @@ static const struct { }; // goes through the above list and returns the utype string for the userdata type -// returns "unknown" instead if we couldn't find the right userdata type +// returns "unknown" instead if we couldn't find the right userdata type static const char *GetUserdataUType(lua_State *L) { UINT8 i; diff --git a/src/lua_blockmaplib.c b/src/lua_blockmaplib.c index ccd90f993..ebfd6a2df 100644 --- a/src/lua_blockmaplib.c +++ b/src/lua_blockmaplib.c @@ -254,7 +254,7 @@ static int lib_searchBlockmap(lua_State *L) if (P_MobjWasRemoved(mobj)){ // ...unless the original object was removed lua_pushboolean(L, false); // in which case we have to stop now regardless return 1; - } + } } lua_pushboolean(L, retval); return 1; diff --git a/src/m_cond.c b/src/m_cond.c index 9339c4989..e9d655694 100644 --- a/src/m_cond.c +++ b/src/m_cond.c @@ -980,18 +980,18 @@ UINT8 M_CompletionEmblems(void) // Bah! Duplication sucks, but it's for a separa levelnum = emblemlocations[i].level; embtype = emblemlocations[i].var; flags = MV_BEATEN; - + if (embtype & ME_ALLEMERALDS) flags |= MV_ALLEMERALDS; - + if (embtype & ME_ULTIMATE) flags |= MV_ULTIMATE; - + if (embtype & ME_PERFECT) flags |= MV_PERFECT; - + res = ((mapvisited[levelnum - 1] & flags) == flags); - + emblemlocations[i].collected = res; if (res) ++somethingUnlocked; diff --git a/src/m_menu.c b/src/m_menu.c index 8afee97f7..34af84e53 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -6117,7 +6117,7 @@ static void M_DrawLoadGameData(void) V_DrawFill(x+6, y+64, 72, 50, col); } } - + V_DrawSmallScaledPatch(x, y, 0, savselp[0]); x += 2; y += 1; @@ -6149,7 +6149,7 @@ static void M_DrawLoadGameData(void) else patch = savselp[5]; } - + V_DrawSmallScaledPatch(x, y, flags, patch); y += 41; @@ -9166,7 +9166,7 @@ static void M_DrawControl(void) y += SMALLLINEHEIGHT; } - + V_DrawScaledPatch(currentMenu->x - 20, cursory, 0, W_CachePatchName("M_CURSOR", PU_CACHE)); } diff --git a/src/p_enemy.c b/src/p_enemy.c index df1371cab..0689f27ff 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -10187,7 +10187,7 @@ void A_FlickyAim(mobj_t *actor) { angle_t posvar; fixed_t chasevar, chasex, chasey; - + if (flickyhitwall) actor->movedir *= -1; diff --git a/src/p_setup.c b/src/p_setup.c index e82099244..60f456ce3 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -2549,7 +2549,7 @@ static boolean CanSaveLevel(INT32 mapnum) if (G_IsSpecialStage(mapnum) // don't save in special stages || mapnum == lastmaploaded) // don't save if the last map loaded was this one return false; - + // Any levels that have the savegame flag can save normally. // If the game is complete for this save slot, then any level can save! // On the other side of the spectrum, if lastmaploaded is 0, then the save file has only just been created and needs to save ASAP! @@ -2942,7 +2942,7 @@ boolean P_SetupLevel(boolean skipprecip) camera.angle = FixedAngle((fixed_t)thing->angle << FRACBITS); } } - + // Salt: CV_ClearChangedFlags() messes with your settings :( /*if (!cv_cam_height.changed) CV_Set(&cv_cam_height, cv_cam_height.defaultvalue); diff --git a/src/p_user.c b/src/p_user.c index 5de9aa17b..cfe9b334b 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -8819,7 +8819,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall // x1.2 dist for analog if (P_AnalogMove(player)) dist = FixedMul(dist, 6*FRACUNIT/5); - + if (player->climbing || player->exiting || player->playerstate == PST_DEAD || (player->powers[pw_carry] == CR_ROPEHANG || player->powers[pw_carry] == CR_GENERIC || player->powers[pw_carry] == CR_MACESPIN)) dist <<= 1; } diff --git a/src/y_inter.c b/src/y_inter.c index 761348480..8f647ad7e 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -972,7 +972,7 @@ void Y_StartIntermission(void) { INT32 i; UINT8 completionEmblems = M_CompletionEmblems(); - + intertic = -1; #ifdef PARANOIA @@ -1069,7 +1069,7 @@ void Y_StartIntermission(void) if (modeattacking == ATTACKING_RECORD) Y_UpdateRecordReplays(); - + if (completionEmblems) CONS_Printf(M_GetText("\x82" "Earned %hu emblem%s for level completion.\n"), (UINT16)completionEmblems, completionEmblems > 1 ? "s" : ""); } @@ -1172,7 +1172,7 @@ void Y_StartIntermission(void) { if (!stagefailed) mapvisited[gamemap-1] |= MV_BEATEN; - + // all emeralds/ultimate/perfect emblems won't be possible in ss, oh well? if (completionEmblems) CONS_Printf(M_GetText("\x82" "Earned %hu emblem%s for level completion.\n"), (UINT16)completionEmblems, completionEmblems > 1 ? "s" : ""); From 0eafaafca1dc3f10dcef62e0b19d8c9aa1eedad9 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 28 Sep 2017 13:49:57 -0400 Subject: [PATCH 27/38] Travis: drop sdl2_mixer from MacPorts and use SDL 2.0.6 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index afb04758b..5365d445c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -234,9 +234,9 @@ before_script: before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sdl2_mixer game-music-emu p7zip; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install game-music-emu p7zip; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install cmake||true; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -O -L https://www.libsdl.org/release/SDL2-2.0.4.dmg; hdiutil attach SDL2-2.0.4.dmg; sudo cp -a /Volumes/SDL2/SDL2.framework /Library/Frameworks/; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -O -L https://www.libsdl.org/release/SDL2-2.0.6.dmg; hdiutil attach SDL2-2.0.6.dmg; sudo cp -a /Volumes/SDL2/SDL2.framework /Library/Frameworks/; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -O -L https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.1.dmg; hdiutil attach SDL2_mixer-2.0.1.dmg; sudo cp -a /Volumes/SDL2_mixer/SDL2_mixer.framework /Library/Frameworks/; fi - mkdir -p $HOME/srb2_cache From a356beac2c704510539bb506b99f003d7f692144 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 28 Sep 2017 15:31:34 -0400 Subject: [PATCH 28/38] Travis: install SDL2 2.0.6 and SDL2_Mixer 2.0.1 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5365d445c..3f7554114 100644 --- a/.travis.yml +++ b/.travis.yml @@ -234,7 +234,7 @@ before_script: before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install game-music-emu p7zip; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sdl2@2.0.6 sdl2_mixer@2.0.1 game-music-emu p7zip; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install cmake||true; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -O -L https://www.libsdl.org/release/SDL2-2.0.6.dmg; hdiutil attach SDL2-2.0.6.dmg; sudo cp -a /Volumes/SDL2/SDL2.framework /Library/Frameworks/; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -O -L https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.1.dmg; hdiutil attach SDL2_mixer-2.0.1.dmg; sudo cp -a /Volumes/SDL2_mixer/SDL2_mixer.framework /Library/Frameworks/; fi From 92aa0e000efe98aec86ec99ba0f8e93ee80e304c Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 28 Sep 2017 16:24:22 -0400 Subject: [PATCH 29/38] Travis: can not use set version with sdl2 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3f7554114..ee440503b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -234,7 +234,7 @@ before_script: before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sdl2@2.0.6 sdl2_mixer@2.0.1 game-music-emu p7zip; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sdl2 sdl2_mixer game-music-emu p7zip; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install cmake||true; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -O -L https://www.libsdl.org/release/SDL2-2.0.6.dmg; hdiutil attach SDL2-2.0.6.dmg; sudo cp -a /Volumes/SDL2/SDL2.framework /Library/Frameworks/; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -O -L https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.1.dmg; hdiutil attach SDL2_mixer-2.0.1.dmg; sudo cp -a /Volumes/SDL2_mixer/SDL2_mixer.framework /Library/Frameworks/; fi From 01602fa1f12eab8eae00550dcc85d6bb3ba37462 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 28 Sep 2017 16:54:26 -0400 Subject: [PATCH 30/38] Build: fixup warnings in Debug builds --- src/m_menu.c | 2 +- src/m_menu.h | 2 +- src/p_enemy.c | 2 ++ src/y_inter.c | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index 5b699dcb4..ea93d1e2d 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -4625,7 +4625,7 @@ static void M_ReadSavegameInfo(UINT32 slot) savegameinfo[slot].botskin = 0; if (savegameinfo[slot].botskin) - snprintf(savegameinfo[slot].playername, 32, "%s & %s", + snprintf(savegameinfo[slot].playername, 36, "%s & %s", skins[savegameinfo[slot].skinnum].realname, skins[savegameinfo[slot].botskin-1].realname); else diff --git a/src/m_menu.h b/src/m_menu.h index 2ff1cea90..4d6e2fac5 100644 --- a/src/m_menu.h +++ b/src/m_menu.h @@ -190,7 +190,7 @@ typedef struct // savegame struct for save game menu typedef struct { - char playername[32]; + char playername[37]; char levelname[32]; UINT8 actnum; UINT8 skincolor; diff --git a/src/p_enemy.c b/src/p_enemy.c index 9de735edc..f2e54a583 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -4812,9 +4812,11 @@ void A_UnidusBall(mobj_t *actor) case 0: // at least one frame where not dashing if (!skull) ++actor->extravalue2; else break; + /* FALLTHRU */ case 1: // at least one frame where ARE dashing if (skull) ++actor->extravalue2; else break; + /* FALLTHRU */ case 2: // not dashing again? if (skull) break; // launch. diff --git a/src/y_inter.c b/src/y_inter.c index cfdc2a080..e7df165bf 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -57,7 +57,7 @@ typedef union { struct { - char passed1[14]; // KNUCKLES GOT / CRAWLA HONCHO + char passed1[21]; // KNUCKLES GOT / CRAWLA HONCHO char passed2[16]; // THROUGH THE ACT / PASSED THE ACT INT32 passedx1; INT32 passedx2; @@ -77,7 +77,7 @@ typedef union struct { - char passed1[SKINNAMESIZE+1]; // KNUCKLES GOT / CRAWLA HONCHO + char passed1[29]; // KNUCKLES GOT / CRAWLA HONCHO char passed2[17]; // A CHAOS EMERALD / GOT THEM ALL! char passed3[15]; // CAN NOW BECOME char passed4[SKINNAMESIZE+7]; // SUPER CRAWLA HONCHO From 3e26e2a443e778d6edd36216c95911ca9808252c Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 28 Sep 2017 17:38:14 -0400 Subject: [PATCH 31/38] Menu: Compile M_DrawAddons without any optimizes --- src/m_menu.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/m_menu.c b/src/m_menu.c index 34af84e53..6a7315e25 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -4884,6 +4884,11 @@ static boolean M_AddonsRefresh(void) #define offs 1 +#ifdef __GNUC__ +#pragma GCC optimize ("0") +#pragma GCC push_options +#endif + static void M_DrawAddons(void) { INT32 x, y; @@ -5005,6 +5010,10 @@ static void M_DrawAddons(void) #undef CANSAVE } +#ifdef __GNUC__ +#pragma GCC pop_options +#endif + #undef offs static void M_AddonExec(INT32 ch) From f0eee4737f7f1738dfe539ebd2155b8dd1324e2c Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 28 Sep 2017 17:45:27 -0400 Subject: [PATCH 32/38] Menu: no more pop/push options --- src/m_menu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index 6a7315e25..748c78ad1 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -4886,7 +4886,6 @@ static boolean M_AddonsRefresh(void) #ifdef __GNUC__ #pragma GCC optimize ("0") -#pragma GCC push_options #endif static void M_DrawAddons(void) @@ -5011,7 +5010,7 @@ static void M_DrawAddons(void) } #ifdef __GNUC__ -#pragma GCC pop_options +#pragma GCC reset_options #endif #undef offs From 03ba14640fa6d103cbc39c9bbf9116cdafac3b33 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 29 Sep 2017 17:43:20 -0400 Subject: [PATCH 33/38] Travis: test building with clang 3.9, 4.0 and 5.0 --- .travis.yml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/.travis.yml b/.travis.yml index ee440503b..8ead5f1f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -177,6 +177,51 @@ matrix: - clang-3.8 compiler: clang-3.8 #clang version 3.8.1-svn271127-1~exp1 (branches/release_38) + - os: linux + addons: + apt: + sources: + - llvm-toolchain-precise-3.9 + - ubuntu-toolchain-r-test + packages: + - libsdl2-mixer-dev + - libpng-dev + - libgl1-mesa-dev + - libgme-dev + - p7zip-full + - clang-3.9 + compiler: clang-3.9 + #clang version 3.9.X + - os: linux + addons: + apt: + sources: + - llvm-toolchain-precise-4.0 + - ubuntu-toolchain-r-test + packages: + - libsdl2-mixer-dev + - libpng-dev + - libgl1-mesa-dev + - libgme-dev + - p7zip-full + - clang-4.0 + compiler: clang-4.0 + #clang version 4.0.X + - os: linux + addons: + apt: + sources: + - llvm-toolchain-precise-5.0 + - ubuntu-toolchain-r-test + packages: + - libsdl2-mixer-dev + - libpng-dev + - libgl1-mesa-dev + - libgme-dev + - p7zip-full + - clang-5.0 + compiler: clang-5.0 + #clang version 5.0.X # - os: osx # osx_image: beta-xcode6.1 # #Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn) @@ -207,6 +252,9 @@ matrix: - compiler: clang-3.6 - compiler: clang-3.7 - compiler: clang-3.8 + - compiler: clang-3.9 + - compiler: clang-4.0 + - complier: clang-5.0 cache: apt: true From 472c74907e09e86e420d6fb6e933b99214d5eb40 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 29 Sep 2017 17:52:12 -0400 Subject: [PATCH 34/38] Travis: fix misspelling --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8ead5f1f7..22fce17fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -113,7 +113,7 @@ matrix: - p7zip-full - gcc-7 compiler: gcc-7 - env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough" + env: WFLAGS="-Wno-tautological-compare -Wno-error=implicit-fallthrough -Wimplicit-fallthrough=3" #gcc-7 (Ubuntu 7.2.0-1ubuntu1~14.04) 7.2.0 20170802 - os: linux compiler: clang @@ -254,7 +254,7 @@ matrix: - compiler: clang-3.8 - compiler: clang-3.9 - compiler: clang-4.0 - - complier: clang-5.0 + - compiler: clang-5.0 cache: apt: true From 075c4e09565f5adf828e9a1f28f0d8077b6923d7 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 29 Sep 2017 17:57:03 -0400 Subject: [PATCH 35/38] Travis: clang 4.0 and 5.0 is not up for trusy --- .travis.yml | 60 ++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/.travis.yml b/.travis.yml index 22fce17fe..4648ae567 100644 --- a/.travis.yml +++ b/.travis.yml @@ -192,36 +192,36 @@ matrix: - clang-3.9 compiler: clang-3.9 #clang version 3.9.X - - os: linux - addons: - apt: - sources: - - llvm-toolchain-precise-4.0 - - ubuntu-toolchain-r-test - packages: - - libsdl2-mixer-dev - - libpng-dev - - libgl1-mesa-dev - - libgme-dev - - p7zip-full - - clang-4.0 - compiler: clang-4.0 - #clang version 4.0.X - - os: linux - addons: - apt: - sources: - - llvm-toolchain-precise-5.0 - - ubuntu-toolchain-r-test - packages: - - libsdl2-mixer-dev - - libpng-dev - - libgl1-mesa-dev - - libgme-dev - - p7zip-full - - clang-5.0 - compiler: clang-5.0 - #clang version 5.0.X +# - os: linux +# addons: +# apt: +# sources: +# - llvm-toolchain-precise-4.0 +# - ubuntu-toolchain-r-test +# packages: +# - libsdl2-mixer-dev +# - libpng-dev +# - libgl1-mesa-dev +# - libgme-dev +# - p7zip-full +# - clang-4.0 +# compiler: clang-4.0 +# #clang version 4.0.X +# - os: linux +# addons: +# apt: +# sources: +# - llvm-toolchain-precise-5.0 +# - ubuntu-toolchain-r-test +# packages: +# - libsdl2-mixer-dev +# - libpng-dev +# - libgl1-mesa-dev +# - libgme-dev +# - p7zip-full +# - clang-5.0 +# compiler: clang-5.0 +# #clang version 5.0.X # - os: osx # osx_image: beta-xcode6.1 # #Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn) From 6fbdf37b18106c07612e3fcb20d50966df75a601 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 30 Sep 2017 08:54:17 -0400 Subject: [PATCH 36/38] Build: support building with clang 5.0 --- src/hardware/hw_data.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hardware/hw_data.h b/src/hardware/hw_data.h index a6525a2f5..d76fcc1c8 100644 --- a/src/hardware/hw_data.h +++ b/src/hardware/hw_data.h @@ -64,7 +64,7 @@ typedef struct GLMipmap_s GLMipmap_t; // struct GLTexture_s { - GLMipmap_t mipmap; + GLMipmap_t mipmap; float scaleX; //used for scaling textures on walls float scaleY; }; @@ -88,7 +88,7 @@ struct GLPatch_s UINT16 wadnum; // the software patch lump num for when the hardware patch UINT16 lumpnum; // was flushed, and we need to re-create it GLMipmap_t mipmap; -} ATTRPACK; +}; typedef struct GLPatch_s GLPatch_t; #endif //_HWR_DATA_ From 1b576bacf3e1ffa3bbc1ec5b5e610f5bfd456389 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 30 Sep 2017 23:07:47 -0400 Subject: [PATCH 37/38] Build: support GCC 8 --- src/Makefile.cfg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Makefile.cfg b/src/Makefile.cfg index 1b323ca0b..317218397 100644 --- a/src/Makefile.cfg +++ b/src/Makefile.cfg @@ -7,6 +7,10 @@ # and other things # +ifdef GCC80 +GCC72=1 +endif + ifdef GCC72 GCC71=1 endif From 66201620dd3477459e76e123060e10ba363f501e Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 7 Oct 2017 13:21:12 -0400 Subject: [PATCH 38/38] cleanup a few compiler warnings --- src/hardware/hw_clip.c | 2 +- src/m_cheat.c | 2 +- src/p_mobj.c | 4 ++-- src/st_stuff.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hardware/hw_clip.c b/src/hardware/hw_clip.c index 8b01cabd5..fd6ba13f3 100644 --- a/src/hardware/hw_clip.c +++ b/src/hardware/hw_clip.c @@ -338,7 +338,7 @@ angle_t gld_FrustumAngle(void) } // If the pitch is larger than this you can look all around at a FOV of 90 - if (abs(aimingangle) > 46 * ANG1) + if (aimingangle > (ANGLE_45+ANG1) && (ANGLE_315-ANG1) > aimingangle) return 0xffffffff; // ok, this is a gross hack that barely works... diff --git a/src/m_cheat.c b/src/m_cheat.c index 3308f721c..76733a82f 100644 --- a/src/m_cheat.c +++ b/src/m_cheat.c @@ -1255,7 +1255,7 @@ void Command_ObjectPlace_f(void) { objectplacing = true; - if ((players[0].powers[pw_carry] == CR_NIGHTSMODE)) + if (players[0].powers[pw_carry] == CR_NIGHTSMODE) return; if (!COM_CheckParm("-silent")) diff --git a/src/p_mobj.c b/src/p_mobj.c index 10bdee2bc..c22b81795 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -6890,9 +6890,9 @@ void P_MobjThinker(mobj_t *mobj) P_SetScale(mobj, mobj->target->scale); if (!(mobj->eflags & MFE_VERTICALFLIP)) - mobj->z = mobj->target->z + mobj->target->height + FixedMul((16 + abs((leveltime % TICRATE) - TICRATE/2))*FRACUNIT, mobj->target->scale); + mobj->z = mobj->target->z + mobj->target->height + FixedMul((16 + abs((signed)(leveltime % TICRATE) - TICRATE/2))*FRACUNIT, mobj->target->scale); else - mobj->z = mobj->target->z - FixedMul((16 + abs((leveltime % TICRATE) - TICRATE/2))*FRACUNIT, mobj->target->scale) - mobj->height; + mobj->z = mobj->target->z - FixedMul((16 + abs((signed)(leveltime % TICRATE) - TICRATE/2))*FRACUNIT, mobj->target->scale) - mobj->height; break; case MT_DROWNNUMBERS: if (!mobj->target) diff --git a/src/st_stuff.c b/src/st_stuff.c index ceef586a4..ebd0034dd 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -2066,7 +2066,7 @@ static void ST_overlayDrawer(void) V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132)-(splitscreen ? 12 : 0), V_HUDTRANSHALF, M_GetText("You'll steal a life on respawn.")); } } - else if (!gametype == GT_COOP) + else if (gametype != GT_COOP) V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), V_HUDTRANSHALF, M_GetText("Press Fire to enter the game.")); if (!splitscreen) {