From f03e591f6464539f2e34c8bcc9951629c22a2f39 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 25 Jul 2014 19:10:24 -0400 Subject: [PATCH] change SDL into HAVE_SDL --- SRB2.cbp | 16 ++++++++-------- Srb2.dev | 8 ++++---- src/Makefile | 2 +- src/console.c | 2 +- src/d_main.c | 10 +++++----- src/d_netcmd.c | 2 +- src/doomdef.h | 2 +- src/hardware/hw3dsdrv.h | 2 +- src/hardware/hw_data.h | 2 +- src/hardware/hw_drv.h | 6 +++--- src/hardware/r_opengl/r_opengl.c | 2 +- src/hardware/r_opengl/r_opengl.h | 6 +++--- src/hardware/s_ds3d/s_ds3d.c | 2 +- src/hardware/s_fmod/s_fmod.c | 4 ++-- src/hardware/s_openal/s_openal.c | 4 ++-- src/m_menu.c | 4 ++-- src/m_misc.c | 8 ++++---- src/s_sound.c | 8 ++++---- src/s_sound.h | 2 +- src/sdl/Makefile.cfg | 2 +- src/sdl/Srb2SDL-vc10.vcxproj | 10 +++++----- src/sdl/Srb2SDL-vc9.vcproj | 8 ++++---- src/sdl/Srb2SDL.dsp | 4 ++-- src/sdl/hwsym_sdl.c | 2 +- src/sdl/i_cdmus.c | 2 +- src/sdl/i_main.c | 2 +- src/sdl/i_net.c | 2 +- src/sdl/i_system.c | 2 +- src/sdl/i_video.c | 2 +- src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj | 4 ++-- src/sdl/mixer_sound.c | 2 +- src/sdl/ogl_sdl.c | 2 +- src/sdl/sdl_sound.c | 4 ++-- src/sdl2/Srb2SDL-vc10.vcxproj | 10 +++++----- src/sdl2/Srb2SDL-vc9.vcproj | 8 ++++---- src/sdl2/Srb2SDL.dsp | 4 ++-- src/sdl2/hwsym_sdl.c | 2 +- src/sdl2/i_main.c | 2 +- src/sdl2/i_net.c | 2 +- src/sdl2/i_system.c | 2 +- src/sdl2/i_ttf.c | 2 +- src/sdl2/i_video.c | 2 +- .../macosx/Srb2mac.xcodeproj/project.pbxproj | 4 ++-- src/sdl2/mixer_sound.c | 2 +- src/sdl2/ogl_sdl.c | 2 +- src/sdl2/sdl_sound.c | 4 ++-- src/v_video.c | 4 ++-- 47 files changed, 95 insertions(+), 95 deletions(-) diff --git a/SRB2.cbp b/SRB2.cbp index 628e7da3..4834563e 100644 --- a/SRB2.cbp +++ b/SRB2.cbp @@ -33,7 +33,7 @@ HW3SOUND for 3D hardware sound support - + @@ -56,7 +56,7 @@ HW3SOUND for 3D hardware sound support - + @@ -77,7 +77,7 @@ HW3SOUND for 3D hardware sound support - + @@ -107,7 +107,7 @@ HW3SOUND for 3D hardware sound support - + @@ -138,7 +138,7 @@ HW3SOUND for 3D hardware sound support - + @@ -185,7 +185,7 @@ HW3SOUND for 3D hardware sound support - + @@ -551,7 +551,7 @@ HW3SOUND for 3D hardware sound support - + @@ -592,7 +592,7 @@ HW3SOUND for 3D hardware sound support - + diff --git a/Srb2.dev b/Srb2.dev index 00b7811e..21683e7c 100644 --- a/Srb2.dev +++ b/Srb2.dev @@ -2228,7 +2228,7 @@ Includes=libs/libpng-src;libs/zlib;libs Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw32 ResourceIncludes=src/win32 MakeIncludes=comptime.mk;cpdebug.mk -Compiler=-DNDEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-Os_@@_-g_@@_-gdwarf-2_@@_-DUSE_WGL_SWAP_@@_-DDIRECTFULLSCREEN_@@_-DSDL_@@_-DHWRENDER_@@_-DHW3SOUND_@@_-DHAVE_MIXER_@@_-DHAVE_PNG_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_ +Compiler=-DNDEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-Os_@@_-g_@@_-gdwarf-2_@@_-DUSE_WGL_SWAP_@@_-DDIRECTFULLSCREEN_@@_-DHAVE_SDL_@@_-DHWRENDER_@@_-DHW3SOUND_@@_-DHAVE_MIXER_@@_-DHAVE_PNG_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_ CppCompiler=-Os_@@_-g_@@_-gdwarf-2_@@_ Linker=-lSDL_@@_-lSDL_Mixer_@@_-lpng32_@@_-lz32_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mconsole_@@_ PreprocDefines=NORMALSRB2_@@_ @@ -2305,7 +2305,7 @@ Includes=libs/libpng-src;libs/zlib;libs Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw32 ResourceIncludes=src/win32 MakeIncludes=comptime.mk;cpdebug.mk -Compiler=-D_DEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-O0_@@_-g_@@_-gdwarf-2_@@_-DUSE_WGL_SWAP_@@_-DDIRECTFULLSCREEN_@@_-DSDL_@@_-DHWRENDER_@@_-DHW3SOUND_@@_-DHAVE_MIXER_@@_-DHAVE_PNG_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_ +Compiler=-D_DEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-O0_@@_-g_@@_-gdwarf-2_@@_-DUSE_WGL_SWAP_@@_-DDIRECTFULLSCREEN_@@_-DHAVE_SDL_@@_-DHWRENDER_@@_-DHW3SOUND_@@_-DHAVE_MIXER_@@_-DHAVE_PNG_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_ CppCompiler=-O0_@@_-g_@@_-gdwarf-2_@@_ Linker=-lSDL_@@_-lSDL_Mixer_@@_-lpng32_@@_-lz32_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mconsole_@@_ PreprocDefines=NORMALSRB2_@@_ @@ -2386,7 +2386,7 @@ Includes=libs/libpng-src;libs/zlib;libs Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw64 ResourceIncludes=src/win32 MakeIncludes=comptime.mk;cpdebug.mk -Compiler=-DNDEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-Os_@@_-g_@@_-DUSE_WGL_SWAP_@@_-DDIRECTFULLSCREEN_@@_-DSDL_@@_-DHWRENDER_@@_-DHW3SOUND_@@_-DHAVE_MIXER_@@_-DHAVE_PNG_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_ +Compiler=-DNDEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-Os_@@_-g_@@_-DUSE_WGL_SWAP_@@_-DDIRECTFULLSCREEN_@@_-DHAVE_SDL_@@_-DHWRENDER_@@_-DHW3SOUND_@@_-DHAVE_MIXER_@@_-DHAVE_PNG_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_ CppCompiler=-Os_@@_-g_@@_ Linker=-lSDL_@@_-lSDL_Mixer_@@_-lpng64_@@_-lz64_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mconsole_@@_ PreprocDefines=NORMALSRB2_@@_ @@ -2413,7 +2413,7 @@ Includes=libs/libpng-src;libs/zlib;libs Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw64 ResourceIncludes=src/win32 MakeIncludes=comptime.mk;cpdebug.mk -Compiler=-D_DEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-O0_@@_-g_@@_-DUSE_WGL_SWAP_@@_-DDIRECTFULLSCREEN_@@_-DSDL_@@_-DHWRENDER_@@_-DHW3SOUND_@@_-DHAVE_MIXER_@@_-DHAVE_PNG_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_ +Compiler=-D_DEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-O0_@@_-g_@@_-DUSE_WGL_SWAP_@@_-DDIRECTFULLSCREEN_@@_-DHAVE_SDL_@@_-DHWRENDER_@@_-DHW3SOUND_@@_-DHAVE_MIXER_@@_-DHAVE_PNG_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_ CppCompiler=-O0_@@_-g_@@_ Linker=-lSDL_@@_-lSDL_Mixer_@@_-lpng64_@@_-lz64_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mconsole_@@_ PreprocDefines=NORMALSRB2_@@_ diff --git a/src/Makefile b/src/Makefile index 2e3f5406..983f62a7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -10,7 +10,7 @@ # -DPC_DOS -> use DOS specific code (eg:textmode stuff)... # -DLINUX -> use for the GNU/Linux specific # -D_WINDOWS -> use for the Win32/DirectX specific -# -DSDL -> use for the SDL interface +# -DHAVE_SDL -> use for the SDL interface # # Sets: # Compile the DGJPP/DOS version with 'make WATTCP=1' diff --git a/src/console.c b/src/console.c index f8d31a69..5f8dd2bb 100644 --- a/src/console.c +++ b/src/console.c @@ -1139,7 +1139,7 @@ void CONS_Printf(const char *fmt, ...) // if not in display loop, force screen update if (con_startup) { -#if (defined (_WINDOWS)) || (defined (__OS2__) && !defined (SDL)) +#if (defined (_WINDOWS)) || (defined (__OS2__) && !defined (HAVE_SDL)) static lumpnum_t con_backpic_lumpnum = UINT32_MAX; patch_t *con_backpic; diff --git a/src/d_main.c b/src/d_main.c index 2f3dd8b6..b0d248ef 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -731,7 +731,7 @@ static void IdentifyVersion(void) char *srb2wad1, *srb2wad2; const char *srb2waddir = NULL; -#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (SDL) +#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL) // change to the directory where 'srb2.srb' is found srb2waddir = I_LocateWad(); #endif @@ -757,7 +757,7 @@ static void IdentifyVersion(void) } } -#if defined (macintosh) && !defined (SDL) +#if defined (macintosh) && !defined (HAVE_SDL) // cwd is always "/" when app is dbl-clicked if (!stricmp(srb2waddir, "/")) srb2waddir = I_GetWadDir(); @@ -804,7 +804,7 @@ static void IdentifyVersion(void) // Add our crappy patches to fix our bugs D_AddFile(va(pandf,srb2waddir,"patch.dta")); -#if !defined (SDL) || defined (HAVE_MIXER) +#if !defined (HAVE_SDL) || defined (HAVE_MIXER) { #if defined (DC) && 0 const char *musicfile = "music_dc.dta"; @@ -929,7 +929,7 @@ void D_SRB2Main(void) D_Titlebar(srb2, title); #endif -#if defined (__OS2__) && !defined (SDL) +#if defined (__OS2__) && !defined (HAVE_SDL) // set PM window title snprintf(pmData->title, sizeof (pmData->title), "Sonic Robo Blast 2" VERSIONSTRING ": %s", @@ -1136,7 +1136,7 @@ void D_SRB2Main(void) G_LoadGameData(); -#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (SDL) +#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL) VID_PrepareModeList(); // Regenerate Modelist according to cv_fullscreen #endif diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 1a1777a4..62531598 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -258,7 +258,7 @@ consvar_t cv_usejoystick = {"use_joystick", "0", CV_SAVE|CV_CALL, usejoystick_co consvar_t cv_usejoystick2 = {"use_joystick2", "0", CV_SAVE|CV_CALL, usejoystick_cons_t, I_InitJoystick2, 0, NULL, NULL, 0, 0, NULL}; #endif -#if (defined (LJOYSTICK) || defined (SDL)) +#if (defined (LJOYSTICK) || defined (HAVE_SDL)) #ifdef LJOYSTICK consvar_t cv_joyport = {"joyport", "/dev/js0", CV_SAVE, joyport_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_joyport2 = {"joyport2", "/dev/js0", CV_SAVE, joyport_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; //Alam: for later diff --git a/src/doomdef.h b/src/doomdef.h index 3ce330af..df61c499 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -24,7 +24,7 @@ #define SOUND_FMOD 3 #ifndef SOUND -#ifdef SDL +#ifdef HAVE_SDL // Use Mixer interface? #ifdef HAVE_MIXER diff --git a/src/hardware/hw3dsdrv.h b/src/hardware/hw3dsdrv.h index 4938f876..8811d454 100644 --- a/src/hardware/hw3dsdrv.h +++ b/src/hardware/hw3dsdrv.h @@ -24,7 +24,7 @@ #include "hw_dll.h" #include "hws_data.h" -#if defined (SDL) || !defined (HWD) +#if defined (HAVE_SDL) || !defined (HWD) EXPORT void HWRAPI(Shutdown) (void); #endif diff --git a/src/hardware/hw_data.h b/src/hardware/hw_data.h index 77db1080..a6525a2f 100644 --- a/src/hardware/hw_data.h +++ b/src/hardware/hw_data.h @@ -26,7 +26,7 @@ #include #endif -#if defined (VID_X11) && !defined (SDL) +#if defined (VID_X11) && !defined (HAVE_SDL) #include #endif diff --git a/src/hardware/hw_drv.h b/src/hardware/hw_drv.h index 854e7aaa..76fce5e4 100644 --- a/src/hardware/hw_drv.h +++ b/src/hardware/hw_drv.h @@ -32,12 +32,12 @@ // STANDARD DLL EXPORTS // ========================================================================== -#ifdef SDL +#ifdef HAVE_SDL #undef VID_X11 #endif EXPORT boolean HWRAPI(Init) (I_Error_t ErrorFunction); -#ifndef SDL +#ifndef HAVE_SDL EXPORT void HWRAPI(Shutdown) (void); #endif #ifdef _WINDOWS @@ -116,7 +116,7 @@ struct hwdriver_s HookXwin pfnHookXwin; GetRenderer pfnGetRenderer; #endif -#ifndef SDL +#ifndef HAVE_SDL Shutdown pfnShutdown; #endif #ifdef SHUFFLE diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index 2e57ae6e..b853f084 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -163,7 +163,7 @@ static I_Error_t I_Error_GL = NULL; // : else do nothing // Returns : // -----------------+ -#if !(defined (SDL) && defined (STATIC3DS)) +#if !(defined (HAVE_SDL) && defined (STATIC3DS)) FUNCPRINTF void DBG_Printf(const char *lpFmt, ...) { #ifdef DEBUG_TO_FILE diff --git a/src/hardware/r_opengl/r_opengl.h b/src/hardware/r_opengl/r_opengl.h index 875ac6fb..fd018f4b 100644 --- a/src/hardware/r_opengl/r_opengl.h +++ b/src/hardware/r_opengl/r_opengl.h @@ -20,7 +20,7 @@ #ifndef _R_OPENGL_H_ #define _R_OPENGL_H_ -#ifdef SDL +#ifdef HAVE_SDL #ifdef _MSC_VER #pragma warning(disable : 4214 4244) @@ -50,7 +50,7 @@ #undef DEBUG_TO_FILE // maybe defined in previous *.h #define DEBUG_TO_FILE // output debugging msgs to ogllog.txt -#if defined ( SDL ) && !defined ( LOGMESSAGES ) +#if defined ( HAVE_SDL ) && !defined ( LOGMESSAGES ) #undef DEBUG_TO_FILE #endif @@ -109,7 +109,7 @@ extern PFNglGetString pglGetString; extern const GLubyte *gl_extensions; extern RGBA_t myPaletteData[]; -#ifndef SDL +#ifndef HAVE_SDL extern FILE *logstream; #endif extern GLint screen_width; diff --git a/src/hardware/s_ds3d/s_ds3d.c b/src/hardware/s_ds3d/s_ds3d.c index 2cbf9559..5299c179 100644 --- a/src/hardware/s_ds3d/s_ds3d.c +++ b/src/hardware/s_ds3d/s_ds3d.c @@ -48,7 +48,7 @@ #undef DEBUG_TO_FILE #define DEBUG_TO_FILE -#if defined ( SDL ) && !defined ( LOGMESSAGES ) +#if defined ( HAVE_SDL ) && !defined ( LOGMESSAGES ) #undef DEBUG_TO_FILE #endif diff --git a/src/hardware/s_fmod/s_fmod.c b/src/hardware/s_fmod/s_fmod.c index 849fd44f..120d6354 100644 --- a/src/hardware/s_fmod/s_fmod.c +++ b/src/hardware/s_fmod/s_fmod.c @@ -55,7 +55,7 @@ FILE *logstream = NULL; #define MAXCHANNEL 1024 #undef DEBUG_TO_FILE -#if defined ( SDL ) && !defined ( LOGMESSAGES ) +#if defined ( HAVE_SDL ) && !defined ( LOGMESSAGES ) #define DEBUG_TO_FILE #endif @@ -1187,7 +1187,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, // handle to DLL module } return TRUE; // Successful DLL_PROCESS_ATTACH. } -#elif !defined (SDL) +#elif !defined (HAVE_SDL) // ************************************************************************** // FUNCTIONS diff --git a/src/hardware/s_openal/s_openal.c b/src/hardware/s_openal/s_openal.c index ad842bde..7f91ccf2 100644 --- a/src/hardware/s_openal/s_openal.c +++ b/src/hardware/s_openal/s_openal.c @@ -31,7 +31,7 @@ FILE* logstream = NULL; #include #include #include -#ifndef SDL // let not make a logstream here is we are inline the HW3D in the SDL binary +#ifndef HAVE_SDL // let not make a logstream here is we are inline the HW3D in the SDL binary FILE* logstream = NULL; #endif #endif @@ -49,7 +49,7 @@ FILE* logstream = NULL; #include "../hw3dsdrv.h" //#undef DEBUG_TO_FILE -//#if defined ( SDL ) && !defined ( LOGMESSAGES ) +//#if defined ( HAVE_SDL ) && !defined ( LOGMESSAGES ) #define DEBUG_TO_FILE //#endif diff --git a/src/m_menu.c b/src/m_menu.c index 887ac5fc..653576f4 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1110,7 +1110,7 @@ static menuitem_t OP_VideoOptionsMenu[] = {IT_SUBMENU|IT_STRING, NULL, "3D Card Options...", &OP_OpenGLOptionsDef, 20}, #endif -#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (SDL) +#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL) {IT_STRING|IT_CVAR, NULL, "Fullscreen", &cv_fullscreen, 30}, #endif @@ -6827,7 +6827,7 @@ static void M_VideoModeMenu(INT32 choice) memset(modedescs, 0, sizeof(modedescs)); -#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (SDL) +#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL) VID_PrepareModeList(); // FIXME: hack #endif vidm_nummodes = 0; diff --git a/src/m_misc.c b/src/m_misc.c index 5b16b872..73d17c00 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -47,7 +47,7 @@ #include "hardware/hw_main.h" #endif -#ifdef SDL +#ifdef HAVE_SDL #include "sdl/hwsym_sdl.h" #ifdef __linux__ typedef off_t off64_t; @@ -654,7 +654,7 @@ static void M_PNGText(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png char Movietxt[] = "SRB2 Movie"; size_t i; char interfacetxt[] = -#ifdef SDL +#ifdef HAVE_SDL "SDL"; #elif defined (_WINDOWS) "DirectX"; @@ -809,7 +809,7 @@ static inline boolean M_PNGLib(void) pnglib = GetModuleHandleA("libpng12.dll"); if (!pnglib) pnglib = GetModuleHandleA("libpng13.dll"); -#elif defined (SDL) +#elif defined (HAVE_SDL) #ifdef __APPLE__ pnglib = hwOpen("libpng.dylib"); #else @@ -818,7 +818,7 @@ static inline boolean M_PNGLib(void) #endif if (!pnglib) return false; -#ifdef SDL +#ifdef HAVE_SDL apng_set_acTL = hwSym("png_set_acTL", pnglib); apng_write_frame_head = hwSym("png_write_frame_head", pnglib); apng_write_frame_tail = hwSym("png_write_frame_tail", pnglib); diff --git a/src/s_sound.c b/src/s_sound.c index 6e6c492a..b48b60a0 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -253,7 +253,7 @@ void S_RegisterSoundStuff(void) CV_RegisterVar(&surround); CV_RegisterVar(&cv_samplerate); -#if defined (macintosh) && !defined (SDL) // mp3 playlist stuff +#if defined (macintosh) && !defined (HAVE_SDL) // mp3 playlist stuff { INT32 i; for (i = 0; i < PLAYLIST_LENGTH; i++) @@ -761,7 +761,7 @@ void S_PauseSound(void) } // pause cd music -#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (SDL) +#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL) I_PauseCD(); #else I_StopCD(); @@ -1050,7 +1050,7 @@ static boolean S_MIDIMusic(musicinfo_t *music, boolean looping) // load & register it music->data = W_CacheLumpNum(music->lumpnum, PU_MUSIC); -#if defined (macintosh) && !defined (SDL) +#if defined (macintosh) && !defined (HAVE_SDL) music->handle = I_RegisterSong(music_num); #else music->handle = I_RegisterSong(music->data, W_LumpLength(music->lumpnum)); @@ -1154,7 +1154,7 @@ void S_StopMusic(void) I_StopSong(mus_playing->handle); I_UnRegisterSong(mus_playing->handle); -#ifndef SDL //SDL uses RWOPS +#ifndef HAVE_SDL //SDL uses RWOPS Z_ChangeTag(mus_playing->data, PU_CACHE); #endif diff --git a/src/s_sound.h b/src/s_sound.h index 200b5bb3..6589ca59 100644 --- a/src/s_sound.h +++ b/src/s_sound.h @@ -37,7 +37,7 @@ extern CV_PossibleValue_t soundvolume_cons_t[]; //part of i_cdmus.c extern consvar_t cd_volume, cdUpdate; -#if defined (macintosh) && !defined (SDL) +#if defined (macintosh) && !defined (HAVE_SDL) typedef enum { music_normal, diff --git a/src/sdl/Makefile.cfg b/src/sdl/Makefile.cfg index 1f9c7204..1d404c4c 100644 --- a/src/sdl/Makefile.cfg +++ b/src/sdl/Makefile.cfg @@ -67,7 +67,7 @@ endif OBJS+=$(OBJDIR)/i_video.o $(OBJDIR)/dosstr.o $(OBJDIR)/endtxt.o $(OBJDIR)/hwsym_sdl.o - OPTS+=-DDIRECTFULLSCREEN -DSDL + OPTS+=-DDIRECTFULLSCREEN -DHAVE_SDL ifndef NOHW OBJS+=$(OBJDIR)/r_opengl.o $(OBJDIR)/ogl_sdl.o diff --git a/src/sdl/Srb2SDL-vc10.vcxproj b/src/sdl/Srb2SDL-vc10.vcxproj index 192f1915..958cd7d0 100644 --- a/src/sdl/Srb2SDL-vc10.vcxproj +++ b/src/sdl/Srb2SDL-vc10.vcxproj @@ -96,7 +96,7 @@ Disabled $(ProjectDir)..\..\libs\libpng-src;$(ProjectDir)..\..\libs\zlib;%(AdditionalIncludeDirectories) - _DEBUG;USE_WGL_SWAP;DIRECTFULLSCREEN;SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;USEASM;HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + _DEBUG;USE_WGL_SWAP;DIRECTFULLSCREEN;HAVE_SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;USEASM;HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebug @@ -145,7 +145,7 @@ Disabled $(ProjectDir)..\..\libs\libpng-src;$(ProjectDir)..\..\libs\zlib;%(AdditionalIncludeDirectories) - _DEBUG;USE_WGL_SWAP;DIRECTFULLSCREEN;SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + _DEBUG;USE_WGL_SWAP;DIRECTFULLSCREEN;HAVE_SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebug @@ -202,7 +202,7 @@ Speed true $(ProjectDir)..\..\libs\libpng-src;$(ProjectDir)..\..\libs\zlib;%(AdditionalIncludeDirectories) - NDEBUG;SDLMAIN;NO_STDIO_REDIRECT;USE_WGL_SWAP;DIRECTFULLSCREEN;SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;USEASM;HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + NDEBUG;SDLMAIN;NO_STDIO_REDIRECT;USE_WGL_SWAP;DIRECTFULLSCREEN;HAVE_SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;USEASM;HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) true MultiThreaded .\..\..\objs\VC10\$(Platform)\$(Configuration)\SDL\Srb2SDL-vc9.pch @@ -258,7 +258,7 @@ Speed true $(ProjectDir)..\..\libs\libpng-src;$(ProjectDir)..\..\libs\zlib;%(AdditionalIncludeDirectories) - NDEBUG;SDLMAIN;NO_STDIO_REDIRECT;USE_WGL_SWAP;DIRECTFULLSCREEN;SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + NDEBUG;SDLMAIN;NO_STDIO_REDIRECT;USE_WGL_SWAP;DIRECTFULLSCREEN;HAVE_SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) true MultiThreaded .\..\..\objs\VC10\$(Platform)\$(Configuration)\SDL\Srb2SDL-vc9.pch @@ -1461,4 +1461,4 @@ - \ No newline at end of file + diff --git a/src/sdl/Srb2SDL-vc9.vcproj b/src/sdl/Srb2SDL-vc9.vcproj index 620202bd..d2a268f8 100644 --- a/src/sdl/Srb2SDL-vc9.vcproj +++ b/src/sdl/Srb2SDL-vc9.vcproj @@ -50,7 +50,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories=""$(ProjectDir)..\..\libs\libpng-src";"$(ProjectDir)..\..\libs\zlib"" - PreprocessorDefinitions="_DEBUG;USE_WGL_SWAP;DIRECTFULLSCREEN;SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;USEASM;HAVE_PNG;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" + PreprocessorDefinitions="_DEBUG;USE_WGL_SWAP;DIRECTFULLSCREEN;HAVE_SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;USEASM;HAVE_PNG;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -145,7 +145,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories=""$(ProjectDir)..\..\libs\libpng-src";"$(ProjectDir)..\..\libs\zlib"" - PreprocessorDefinitions="_DEBUG;USE_WGL_SWAP;DIRECTFULLSCREEN;SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;HAVE_PNG;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" + PreprocessorDefinitions="_DEBUG;USE_WGL_SWAP;DIRECTFULLSCREEN;HAVE_SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;HAVE_PNG;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -248,7 +248,7 @@ FavorSizeOrSpeed="1" OmitFramePointers="true" AdditionalIncludeDirectories=""$(ProjectDir)..\..\libs\libpng-src";"$(ProjectDir)..\..\libs\zlib"" - PreprocessorDefinitions="NDEBUG;SDLMAIN;NO_STDIO_REDIRECT;USE_WGL_SWAP;DIRECTFULLSCREEN;SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;USEASM;HAVE_PNG;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" + PreprocessorDefinitions="NDEBUG;SDLMAIN;NO_STDIO_REDIRECT;USE_WGL_SWAP;DIRECTFULLSCREEN;HAVE_SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;USEASM;HAVE_PNG;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" StringPooling="true" RuntimeLibrary="0" PrecompiledHeaderFile=".\..\..\objs\VC9\$(Platform)\$(Configuration)\SDL\Srb2SDL-vc9.pch" @@ -350,7 +350,7 @@ FavorSizeOrSpeed="1" OmitFramePointers="true" AdditionalIncludeDirectories=""$(ProjectDir)..\..\libs\libpng-src";"$(ProjectDir)..\..\libs\zlib"" - PreprocessorDefinitions="NDEBUG;SDLMAIN;NO_STDIO_REDIRECT;USE_WGL_SWAP;DIRECTFULLSCREEN;SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;HAVE_PNG;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" + PreprocessorDefinitions="NDEBUG;SDLMAIN;NO_STDIO_REDIRECT;USE_WGL_SWAP;DIRECTFULLSCREEN;HAVE_SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;HAVE_PNG;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" StringPooling="true" RuntimeLibrary="0" PrecompiledHeaderFile=".\..\..\objs\VC9\$(Platform)\$(Configuration)\SDL\Srb2SDL-vc9.pch" diff --git a/src/sdl/Srb2SDL.dsp b/src/sdl/Srb2SDL.dsp index 02c3b270..879113ca 100644 --- a/src/sdl/Srb2SDL.dsp +++ b/src/sdl/Srb2SDL.dsp @@ -45,7 +45,7 @@ MTL=midl.exe # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /G5 /W3 /GX /Zi /Ot /Og /Oi /Op /Oy /Ob1 /I "..\..\libs\libpng-src" /I "..\..\libs\zlib" /D "NDEBUG" /D "SDLMAIN" /D "NO_STDIO_REDIRECT" /D "USE_WGL_SWAP" /D "DIRECTFULLSCREEN" /D "SDL" /D "HWRENDER" /D "HW3SOUND" /D "HAVE_FILTER" /D "HAVE_MIXER" /D "USEASM" /D "HAVE_PNG" /FR /FD /GF /c +# ADD CPP /nologo /G5 /W3 /GX /Zi /Ot /Og /Oi /Op /Oy /Ob1 /I "..\..\libs\libpng-src" /I "..\..\libs\zlib" /D "NDEBUG" /D "SDLMAIN" /D "NO_STDIO_REDIRECT" /D "USE_WGL_SWAP" /D "DIRECTFULLSCREEN" /D "HAVE_SDL" /D "HWRENDER" /D "HW3SOUND" /D "HAVE_FILTER" /D "HAVE_MIXER" /D "USEASM" /D "HAVE_PNG" /FR /FD /GF /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" # SUBTRACT RSC /x @@ -72,7 +72,7 @@ LINK32=link.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /G6 /W4 /WX /Gm /GX /ZI /Od /Op /I "..\..\libs\libpng-src" /I "..\..\libs\zlib" /D "_DEBUG" /D "USE_WGL_SWAP" /D "DIRECTFULLSCREEN" /D "SDL" /D "HWRENDER" /D "HW3SOUND" /D "HAVE_FILTER" /D "HAVE_MIXER" /D "USEASM" /D "HAVE_PNG" /FR /FD /GZ /c +# ADD CPP /nologo /G6 /W4 /WX /Gm /GX /ZI /Od /Op /I "..\..\libs\libpng-src" /I "..\..\libs\zlib" /D "_DEBUG" /D "USE_WGL_SWAP" /D "DIRECTFULLSCREEN" /D "HAVE_SDL" /D "HWRENDER" /D "HW3SOUND" /D "HAVE_FILTER" /D "HAVE_MIXER" /D "USEASM" /D "HAVE_PNG" /FR /FD /GZ /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" diff --git a/src/sdl/hwsym_sdl.c b/src/sdl/hwsym_sdl.c index 43c71f7b..44ddf830 100644 --- a/src/sdl/hwsym_sdl.c +++ b/src/sdl/hwsym_sdl.c @@ -29,7 +29,7 @@ #pragma warning(disable : 4214 4244) #endif -#ifdef SDL +#ifdef HAVE_SDL #include "SDL.h" diff --git a/src/sdl/i_cdmus.c b/src/sdl/i_cdmus.c index adab39c9..1eeac370 100644 --- a/src/sdl/i_cdmus.c +++ b/src/sdl/i_cdmus.c @@ -17,7 +17,7 @@ /// \brief cd music interface /// -#ifdef SDL +#ifdef HAVE_SDL #if defined (DC) || defined (_WIN32_WCE) || defined(GP2X) || defined(_PS3) #define NOSDLCD diff --git a/src/sdl/i_main.c b/src/sdl/i_main.c index 85abb704..1c438e08 100644 --- a/src/sdl/i_main.c +++ b/src/sdl/i_main.c @@ -48,7 +48,7 @@ PSP_MAIN_THREAD_NAME("SRB2"); PSP_MAIN_THREAD_STACK_SIZE_KB(256); #endif -#ifdef SDL +#ifdef HAVE_SDL #ifdef HAVE_TTF #include "SDL.h" diff --git a/src/sdl/i_net.c b/src/sdl/i_net.c index c31935ac..ee4a34c1 100644 --- a/src/sdl/i_net.c +++ b/src/sdl/i_net.c @@ -32,7 +32,7 @@ #include "../i_tcp.h" -#ifdef SDL +#ifdef HAVE_SDL #ifdef HAVE_SDLNET diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 1e03edd8..888a6a50 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -73,7 +73,7 @@ void __set_fpscr(long); // in libgcc / kernel's startup.s? #pragma warning(disable : 4214 4244) #endif -#ifdef SDL +#ifdef HAVE_SDL #include "SDL.h" diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 1a2305fe..197924ed 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -27,7 +27,7 @@ #pragma warning(disable : 4214 4244) #endif -#ifdef SDL +#ifdef HAVE_SDL #include "SDL.h" diff --git a/src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj b/src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj index 1b1a9fdf..5c34c55c 100644 --- a/src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj +++ b/src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj @@ -1264,7 +1264,7 @@ GCC_PREPROCESSOR_DEFINITIONS = ( MAC_ALERT, SDLMAIN, - SDL, + HAVE_SDL, HAVE_MIXER, HAVE_PNG, HAVE_BLUA, @@ -1386,7 +1386,7 @@ GCC_PREPROCESSOR_DEFINITIONS = ( MAC_ALERT, SDLMAIN, - SDL, + HAVE_SDL, HAVE_MIXER, HAVE_PNG, HAVE_BLUA, diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c index 98159b47..15166875 100644 --- a/src/sdl/mixer_sound.c +++ b/src/sdl/mixer_sound.c @@ -3,7 +3,7 @@ #include "../doomdef.h" -#if defined(SDL) && defined(HAVE_MIXER) && SOUND==SOUND_MIXER +#if defined(HAVE_SDL) && defined(HAVE_MIXER) && SOUND==SOUND_MIXER #include "../sounds.h" #include "../s_sound.h" diff --git a/src/sdl/ogl_sdl.c b/src/sdl/ogl_sdl.c index 9427d331..e726bf07 100644 --- a/src/sdl/ogl_sdl.c +++ b/src/sdl/ogl_sdl.c @@ -21,7 +21,7 @@ #pragma warning(disable : 4214 4244) #endif -#ifdef SDL +#ifdef HAVE_SDL #include "SDL.h" diff --git a/src/sdl/sdl_sound.c b/src/sdl/sdl_sound.c index 3750e677..6ba83104 100644 --- a/src/sdl/sdl_sound.c +++ b/src/sdl/sdl_sound.c @@ -23,7 +23,7 @@ #pragma warning(disable : 4214 4244) #endif -#if defined(SDL) && SOUND==SOUND_SDL +#if defined(HAVE_SDL) && SOUND==SOUND_SDL #include "SDL.h" @@ -2027,4 +2027,4 @@ static void SDLCALL I_FinishMusic(void) if (Msc_Mutex) SDL_UnlockMutex(Msc_Mutex); } #endif -#endif //SDL +#endif //HAVE_SDL diff --git a/src/sdl2/Srb2SDL-vc10.vcxproj b/src/sdl2/Srb2SDL-vc10.vcxproj index 192f1915..958cd7d0 100644 --- a/src/sdl2/Srb2SDL-vc10.vcxproj +++ b/src/sdl2/Srb2SDL-vc10.vcxproj @@ -96,7 +96,7 @@ Disabled $(ProjectDir)..\..\libs\libpng-src;$(ProjectDir)..\..\libs\zlib;%(AdditionalIncludeDirectories) - _DEBUG;USE_WGL_SWAP;DIRECTFULLSCREEN;SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;USEASM;HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + _DEBUG;USE_WGL_SWAP;DIRECTFULLSCREEN;HAVE_SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;USEASM;HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebug @@ -145,7 +145,7 @@ Disabled $(ProjectDir)..\..\libs\libpng-src;$(ProjectDir)..\..\libs\zlib;%(AdditionalIncludeDirectories) - _DEBUG;USE_WGL_SWAP;DIRECTFULLSCREEN;SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + _DEBUG;USE_WGL_SWAP;DIRECTFULLSCREEN;HAVE_SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebug @@ -202,7 +202,7 @@ Speed true $(ProjectDir)..\..\libs\libpng-src;$(ProjectDir)..\..\libs\zlib;%(AdditionalIncludeDirectories) - NDEBUG;SDLMAIN;NO_STDIO_REDIRECT;USE_WGL_SWAP;DIRECTFULLSCREEN;SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;USEASM;HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + NDEBUG;SDLMAIN;NO_STDIO_REDIRECT;USE_WGL_SWAP;DIRECTFULLSCREEN;HAVE_SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;USEASM;HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) true MultiThreaded .\..\..\objs\VC10\$(Platform)\$(Configuration)\SDL\Srb2SDL-vc9.pch @@ -258,7 +258,7 @@ Speed true $(ProjectDir)..\..\libs\libpng-src;$(ProjectDir)..\..\libs\zlib;%(AdditionalIncludeDirectories) - NDEBUG;SDLMAIN;NO_STDIO_REDIRECT;USE_WGL_SWAP;DIRECTFULLSCREEN;SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + NDEBUG;SDLMAIN;NO_STDIO_REDIRECT;USE_WGL_SWAP;DIRECTFULLSCREEN;HAVE_SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) true MultiThreaded .\..\..\objs\VC10\$(Platform)\$(Configuration)\SDL\Srb2SDL-vc9.pch @@ -1461,4 +1461,4 @@ - \ No newline at end of file + diff --git a/src/sdl2/Srb2SDL-vc9.vcproj b/src/sdl2/Srb2SDL-vc9.vcproj index 620202bd..d2a268f8 100644 --- a/src/sdl2/Srb2SDL-vc9.vcproj +++ b/src/sdl2/Srb2SDL-vc9.vcproj @@ -50,7 +50,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories=""$(ProjectDir)..\..\libs\libpng-src";"$(ProjectDir)..\..\libs\zlib"" - PreprocessorDefinitions="_DEBUG;USE_WGL_SWAP;DIRECTFULLSCREEN;SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;USEASM;HAVE_PNG;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" + PreprocessorDefinitions="_DEBUG;USE_WGL_SWAP;DIRECTFULLSCREEN;HAVE_SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;USEASM;HAVE_PNG;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -145,7 +145,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories=""$(ProjectDir)..\..\libs\libpng-src";"$(ProjectDir)..\..\libs\zlib"" - PreprocessorDefinitions="_DEBUG;USE_WGL_SWAP;DIRECTFULLSCREEN;SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;HAVE_PNG;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" + PreprocessorDefinitions="_DEBUG;USE_WGL_SWAP;DIRECTFULLSCREEN;HAVE_SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;HAVE_PNG;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -248,7 +248,7 @@ FavorSizeOrSpeed="1" OmitFramePointers="true" AdditionalIncludeDirectories=""$(ProjectDir)..\..\libs\libpng-src";"$(ProjectDir)..\..\libs\zlib"" - PreprocessorDefinitions="NDEBUG;SDLMAIN;NO_STDIO_REDIRECT;USE_WGL_SWAP;DIRECTFULLSCREEN;SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;USEASM;HAVE_PNG;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" + PreprocessorDefinitions="NDEBUG;SDLMAIN;NO_STDIO_REDIRECT;USE_WGL_SWAP;DIRECTFULLSCREEN;HAVE_SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;USEASM;HAVE_PNG;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" StringPooling="true" RuntimeLibrary="0" PrecompiledHeaderFile=".\..\..\objs\VC9\$(Platform)\$(Configuration)\SDL\Srb2SDL-vc9.pch" @@ -350,7 +350,7 @@ FavorSizeOrSpeed="1" OmitFramePointers="true" AdditionalIncludeDirectories=""$(ProjectDir)..\..\libs\libpng-src";"$(ProjectDir)..\..\libs\zlib"" - PreprocessorDefinitions="NDEBUG;SDLMAIN;NO_STDIO_REDIRECT;USE_WGL_SWAP;DIRECTFULLSCREEN;SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;HAVE_PNG;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" + PreprocessorDefinitions="NDEBUG;SDLMAIN;NO_STDIO_REDIRECT;USE_WGL_SWAP;DIRECTFULLSCREEN;HAVE_SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;HAVE_PNG;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" StringPooling="true" RuntimeLibrary="0" PrecompiledHeaderFile=".\..\..\objs\VC9\$(Platform)\$(Configuration)\SDL\Srb2SDL-vc9.pch" diff --git a/src/sdl2/Srb2SDL.dsp b/src/sdl2/Srb2SDL.dsp index 02c3b270..879113ca 100644 --- a/src/sdl2/Srb2SDL.dsp +++ b/src/sdl2/Srb2SDL.dsp @@ -45,7 +45,7 @@ MTL=midl.exe # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /G5 /W3 /GX /Zi /Ot /Og /Oi /Op /Oy /Ob1 /I "..\..\libs\libpng-src" /I "..\..\libs\zlib" /D "NDEBUG" /D "SDLMAIN" /D "NO_STDIO_REDIRECT" /D "USE_WGL_SWAP" /D "DIRECTFULLSCREEN" /D "SDL" /D "HWRENDER" /D "HW3SOUND" /D "HAVE_FILTER" /D "HAVE_MIXER" /D "USEASM" /D "HAVE_PNG" /FR /FD /GF /c +# ADD CPP /nologo /G5 /W3 /GX /Zi /Ot /Og /Oi /Op /Oy /Ob1 /I "..\..\libs\libpng-src" /I "..\..\libs\zlib" /D "NDEBUG" /D "SDLMAIN" /D "NO_STDIO_REDIRECT" /D "USE_WGL_SWAP" /D "DIRECTFULLSCREEN" /D "HAVE_SDL" /D "HWRENDER" /D "HW3SOUND" /D "HAVE_FILTER" /D "HAVE_MIXER" /D "USEASM" /D "HAVE_PNG" /FR /FD /GF /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" # SUBTRACT RSC /x @@ -72,7 +72,7 @@ LINK32=link.exe # PROP Target_Dir "" MTL=midl.exe # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /G6 /W4 /WX /Gm /GX /ZI /Od /Op /I "..\..\libs\libpng-src" /I "..\..\libs\zlib" /D "_DEBUG" /D "USE_WGL_SWAP" /D "DIRECTFULLSCREEN" /D "SDL" /D "HWRENDER" /D "HW3SOUND" /D "HAVE_FILTER" /D "HAVE_MIXER" /D "USEASM" /D "HAVE_PNG" /FR /FD /GZ /c +# ADD CPP /nologo /G6 /W4 /WX /Gm /GX /ZI /Od /Op /I "..\..\libs\libpng-src" /I "..\..\libs\zlib" /D "_DEBUG" /D "USE_WGL_SWAP" /D "DIRECTFULLSCREEN" /D "HAVE_SDL" /D "HWRENDER" /D "HW3SOUND" /D "HAVE_FILTER" /D "HAVE_MIXER" /D "USEASM" /D "HAVE_PNG" /FR /FD /GZ /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" diff --git a/src/sdl2/hwsym_sdl.c b/src/sdl2/hwsym_sdl.c index 43c71f7b..44ddf830 100644 --- a/src/sdl2/hwsym_sdl.c +++ b/src/sdl2/hwsym_sdl.c @@ -29,7 +29,7 @@ #pragma warning(disable : 4214 4244) #endif -#ifdef SDL +#ifdef HAVE_SDL #include "SDL.h" diff --git a/src/sdl2/i_main.c b/src/sdl2/i_main.c index 85abb704..1c438e08 100644 --- a/src/sdl2/i_main.c +++ b/src/sdl2/i_main.c @@ -48,7 +48,7 @@ PSP_MAIN_THREAD_NAME("SRB2"); PSP_MAIN_THREAD_STACK_SIZE_KB(256); #endif -#ifdef SDL +#ifdef HAVE_SDL #ifdef HAVE_TTF #include "SDL.h" diff --git a/src/sdl2/i_net.c b/src/sdl2/i_net.c index c31935ac..ee4a34c1 100644 --- a/src/sdl2/i_net.c +++ b/src/sdl2/i_net.c @@ -32,7 +32,7 @@ #include "../i_tcp.h" -#ifdef SDL +#ifdef HAVE_SDL #ifdef HAVE_SDLNET diff --git a/src/sdl2/i_system.c b/src/sdl2/i_system.c index 231d06b8..cfc2e210 100644 --- a/src/sdl2/i_system.c +++ b/src/sdl2/i_system.c @@ -73,7 +73,7 @@ void __set_fpscr(long); // in libgcc / kernel's startup.s? #pragma warning(disable : 4214 4244) #endif -#ifdef SDL +#ifdef HAVE_SDL #include "SDL.h" diff --git a/src/sdl2/i_ttf.c b/src/sdl2/i_ttf.c index 770a81d9..4a41f120 100644 --- a/src/sdl2/i_ttf.c +++ b/src/sdl2/i_ttf.c @@ -16,7 +16,7 @@ /// \file /// \brief SDL_ttf interface code. Necessary for platforms with no framebuffer console systems. -#if defined(SDL) && defined(HAVE_TTF) +#if defined(HAVE_SDL) && defined(HAVE_TTF) #include "SDL.h" #include "SDL_ttf.h" #include "../doomdef.h" diff --git a/src/sdl2/i_video.c b/src/sdl2/i_video.c index 03b6d8fa..f7b0ff07 100644 --- a/src/sdl2/i_video.c +++ b/src/sdl2/i_video.c @@ -25,7 +25,7 @@ #pragma warning(disable : 4214 4244) #endif -#ifdef SDL +#ifdef HAVE_SDL #include "SDL.h" diff --git a/src/sdl2/macosx/Srb2mac.xcodeproj/project.pbxproj b/src/sdl2/macosx/Srb2mac.xcodeproj/project.pbxproj index 1b1a9fdf..5c34c55c 100644 --- a/src/sdl2/macosx/Srb2mac.xcodeproj/project.pbxproj +++ b/src/sdl2/macosx/Srb2mac.xcodeproj/project.pbxproj @@ -1264,7 +1264,7 @@ GCC_PREPROCESSOR_DEFINITIONS = ( MAC_ALERT, SDLMAIN, - SDL, + HAVE_SDL, HAVE_MIXER, HAVE_PNG, HAVE_BLUA, @@ -1386,7 +1386,7 @@ GCC_PREPROCESSOR_DEFINITIONS = ( MAC_ALERT, SDLMAIN, - SDL, + HAVE_SDL, HAVE_MIXER, HAVE_PNG, HAVE_BLUA, diff --git a/src/sdl2/mixer_sound.c b/src/sdl2/mixer_sound.c index e8c62d70..8c90557f 100644 --- a/src/sdl2/mixer_sound.c +++ b/src/sdl2/mixer_sound.c @@ -3,7 +3,7 @@ #include "../doomdef.h" -#if defined(SDL) && defined(HAVE_MIXER) && SOUND==SOUND_MIXER +#if defined(HAVE_SDL) && defined(HAVE_MIXER) && SOUND==SOUND_MIXER #include "../sounds.h" #include "../s_sound.h" diff --git a/src/sdl2/ogl_sdl.c b/src/sdl2/ogl_sdl.c index b03d8e20..62055e10 100644 --- a/src/sdl2/ogl_sdl.c +++ b/src/sdl2/ogl_sdl.c @@ -21,7 +21,7 @@ #pragma warning(disable : 4214 4244) #endif -#ifdef SDL +#ifdef HAVE_SDL #include "SDL.h" diff --git a/src/sdl2/sdl_sound.c b/src/sdl2/sdl_sound.c index cc369637..5d6c007b 100644 --- a/src/sdl2/sdl_sound.c +++ b/src/sdl2/sdl_sound.c @@ -23,7 +23,7 @@ #pragma warning(disable : 4214 4244) #endif -#if defined(SDL) && SOUND==SOUND_SDL +#if defined(HAVE_SDL) && SOUND==SOUND_SDL #include "SDL.h" @@ -2028,4 +2028,4 @@ static void SDLCALL I_FinishMusic(void) if (Msc_Mutex) SDL_UnlockMutex(Msc_Mutex); } #endif -#endif //SDL +#endif //HAVE_SDL diff --git a/src/v_video.c b/src/v_video.c index 9daead78..d6ab2eef 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -222,7 +222,7 @@ void V_SetPalette(INT32 palettenum) #ifdef HWRENDER if (rendermode != render_soft && rendermode != render_none) HWR_SetPalette(&pLocalPalette[palettenum*256]); -#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (SDL) +#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL) else #endif #endif @@ -236,7 +236,7 @@ void V_SetPaletteLump(const char *pal) #ifdef HWRENDER if (rendermode != render_soft && rendermode != render_none) HWR_SetPalette(pLocalPalette); -#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (SDL) +#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL) else #endif #endif