From 2aab765b36e3895a251ad11bae5d5f97bf3f31cc Mon Sep 17 00:00:00 2001 From: James R Date: Mon, 24 Aug 2020 17:51:01 -0700 Subject: [PATCH 1/3] Fix NOGME compiling (cherry picked from commit 0d57ba1d02c5bde2ab22a71d21a95849b21e9539) --- src/sdl/mixer_sound.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c index ef34b266d..25e7fde89 100644 --- a/src/sdl/mixer_sound.c +++ b/src/sdl/mixer_sound.c @@ -220,6 +220,7 @@ static void var_cleanup(void) internal_volume = 100; } +#if defined (HAVE_LIBGME) && defined (HAVE_ZLIB) static const char* get_zlib_error(int zErr) { switch (zErr) @@ -240,6 +241,7 @@ static const char* get_zlib_error(int zErr) return "unknown error"; } } +#endif /// ------------------------ /// Audio System From 6c2370f894ec00f6088f9cb070ad2d34cf4b3ac0 Mon Sep 17 00:00:00 2001 From: James R Date: Mon, 24 Aug 2020 17:58:39 -0700 Subject: [PATCH 2/3] Kill NOHS (cherry picked from commit 3437b0690a3f4278e3ecc657102a126a3e2f3d13) --- src/Makefile | 23 ----------------------- src/doomdef.h | 6 ------ src/sdl/Makefile.cfg | 22 ---------------------- 3 files changed, 51 deletions(-) diff --git a/src/Makefile b/src/Makefile index 3ce2dad13..91ce596a4 100644 --- a/src/Makefile +++ b/src/Makefile @@ -62,7 +62,6 @@ # Generate compiler errors for most compiler warnings, add 'ERRORMODE=1' # Compile without NASM's tmap.nas, add 'NOASM=1' # Compile without 3D hardware support, add 'NOHW=1' -# Compile without 3D sound support, add 'NOHS=1' # Compile with GDBstubs, add 'RDB=1' # Compile without PNG, add 'NOPNG=1' # Compile without zlib, add 'NOZLIB=1' @@ -174,7 +173,6 @@ NOPNG=1 NOZLIB=1 NONET=1 NOHW=1 -NOHS=1 NOASM=1 NOIPX=1 EXENAME?=srb2dummy @@ -196,7 +194,6 @@ endif ifdef PANDORA NONX86=1 NOHW=1 -NOHS=1 endif ifdef DJGPPDOS @@ -281,13 +278,6 @@ else $(OBJDIR)/hw_md2load.o $(OBJDIR)/hw_md3load.o $(OBJDIR)/hw_model.o $(OBJDIR)/u_list.o $(OBJDIR)/hw_batching.o endif -ifdef NOHS - OPTS+=-DNOHS -else - OPTS+=-DHW3SOUND - OBJS+=$(OBJDIR)/hw3sound.o -endif - OPTS += -DCOMPVERSION ifndef NONX86 @@ -802,19 +792,6 @@ $(OBJDIR)/ogl_win.o: hardware/r_opengl/ogl_win.c hardware/r_opengl/r_opengl.h \ $(CC) $(CFLAGS) $(WFLAGS) -D_WINDOWS -mwindows -c $< -o $@ endif -ifndef NOHS -$(OBJDIR)/s_ds3d.o: hardware/s_ds3d/s_ds3d.c hardware/hw3dsdrv.h \ - hardware/hw_dll.h - $(CC) $(ARCHOPTS) -Os -o $(OBJDIR)/s_ds3d.o $(WFLAGS) -D_WINDOWS -mwindows -c hardware/s_ds3d/s_ds3d.c - -$(OBJDIR)/s_fmod.o: hardware/s_openal/s_openal.c hardware/hw3dsdrv.h \ - hardware/hw_dll.h - $(CC) $(ARCHOPTS) -Os -o $(OBJDIR)/s_fmod.o $(WFLAGS) -D_WINDOWS -mwindows -c hardware/s_fmod/s_fmod.c - -$(OBJDIR)/s_openal.o: hardware/s_openal/s_openal.c hardware/hw3dsdrv.h \ - hardware/hw_dll.h - $(CC) $(ARCHOPTS) -Os -o $(OBJDIR)/s_openal.o $(WFLAGS) -D_WINDOWS -mwindows -c hardware/s_openal/s_openal.c -endif endif endif diff --git a/src/doomdef.h b/src/doomdef.h index 249bd5128..6cfaba8a1 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -29,7 +29,6 @@ // Use Mixer interface? #ifdef HAVE_MIXER #define SOUND SOUND_MIXER - #define NOHS // No HW3SOUND #ifdef HW3SOUND #undef HW3SOUND #endif @@ -45,7 +44,6 @@ // Use FMOD? #ifdef HAVE_FMOD #define SOUND SOUND_FMOD - #define NOHS // No HW3SOUND #ifdef HW3SOUND #undef HW3SOUND #endif @@ -62,10 +60,6 @@ #if !defined (HWRENDER) && !defined (NOHW) #define HWRENDER #endif -// judgecutor: 3D sound support -#if !defined(HW3SOUND) && !defined (NOHS) -#define HW3SOUND -#endif #endif #ifdef _WIN32 diff --git a/src/sdl/Makefile.cfg b/src/sdl/Makefile.cfg index 05b60f7a3..f1383a04f 100644 --- a/src/sdl/Makefile.cfg +++ b/src/sdl/Makefile.cfg @@ -53,28 +53,6 @@ ifndef NOHW OBJS+=$(OBJDIR)/r_opengl.o $(OBJDIR)/ogl_sdl.o endif -ifndef NOHS -ifdef OPENAL - OBJS+=$(OBJDIR)/s_openal.o - OPTS+=-DSTATIC3DS - STATICHS=1 -else -ifdef FMOD - OBJS+=$(OBJDIR)/s_fmod.o - OPTS+=-DSTATIC3DS - STATICHS=1 -else -ifdef MINGW -ifdef DS3D - OBJS+=$(OBJDIR)/s_ds3d.o - OPTS+=-DSTATIC3DS - STATICHS=1 -endif -endif -endif -endif -endif - ifdef NOMIXER i_sound_o=$(OBJDIR)/sdl_sound.o else From e593610862b2f22e72083c0b92c555b6b87ef3dc Mon Sep 17 00:00:00 2001 From: James R Date: Mon, 31 Aug 2020 16:09:41 -0700 Subject: [PATCH 3/3] Fix NOHW compiling --- src/d_main.c | 2 ++ src/sdl/i_video.c | 1 + 2 files changed, 3 insertions(+) diff --git a/src/d_main.c b/src/d_main.c index 96167ac0b..21b10de0a 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -629,6 +629,7 @@ static void D_Display(void) V_DrawThinString(80, 40, V_MONOSPACE | V_BLUEMAP, s); if (rendermode == render_opengl) // OpenGL specific stats { +#ifdef HWRENDER snprintf(s, sizeof s - 1, "nsrt %d", rs_hw_nodesorttime / divisor); V_DrawThinString(30, 40, V_MONOSPACE | V_YELLOWMAP, s); snprintf(s, sizeof s - 1, "ndrw %d", rs_hw_nodedrawtime / divisor); @@ -661,6 +662,7 @@ static void D_Display(void) snprintf(s, sizeof s - 1, "ncol %d", rs_hw_numcolors); V_DrawThinString(185, 30, V_MONOSPACE | V_PURPLEMAP, s); } +#endif } else // software specific stats { diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 01194a02f..5c5b6119c 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -1478,6 +1478,7 @@ static SDL_bool Impl_CreateContext(void) void VID_CheckGLLoaded(rendermode_t oldrender) { + (void)oldrender; #ifdef HWRENDER if (vid_opengl_state == -1) // Well, it didn't work the first time anyway. {