diff --git a/stepmania/src/LightsManager.cpp b/stepmania/src/LightsManager.cpp index c32bd4a5fc..65a38e5782 100644 --- a/stepmania/src/LightsManager.cpp +++ b/stepmania/src/LightsManager.cpp @@ -9,6 +9,7 @@ #include "Game.h" #include "PrefsManager.h" +#include "arch/arch.h" static const CString CabinetLightNames[NUM_CABINET_LIGHTS] = { "MarqueeUpLeft", diff --git a/stepmania/src/MemoryCardManager.cpp b/stepmania/src/MemoryCardManager.cpp index 859a7f76c2..994ddcd280 100644 --- a/stepmania/src/MemoryCardManager.cpp +++ b/stepmania/src/MemoryCardManager.cpp @@ -13,6 +13,8 @@ #include "Foreach.h" #include "RageUtil_WorkerThread.h" +#include "arch/arch.h" + MemoryCardManager* MEMCARDMAN = NULL; // global and accessable from anywhere in our program const CString MEM_CARD_MOUNT_POINT[NUM_PLAYERS] = diff --git a/stepmania/src/RageDisplay_OGL.cpp b/stepmania/src/RageDisplay_OGL.cpp index 72540ff532..6a71b28e17 100644 --- a/stepmania/src/RageDisplay_OGL.cpp +++ b/stepmania/src/RageDisplay_OGL.cpp @@ -56,6 +56,8 @@ #include "arch/LowLevelWindow/LowLevelWindow.h" +#include "arch/arch.h" + #ifdef WIN32 #pragma comment(lib, "opengl32.lib") #pragma comment(lib, "glu32.lib") diff --git a/stepmania/src/RageInput.cpp b/stepmania/src/RageInput.cpp index 3970b3482a..2dea417e8e 100644 --- a/stepmania/src/RageInput.cpp +++ b/stepmania/src/RageInput.cpp @@ -4,6 +4,8 @@ #include "RageException.h" #include "arch/InputHandler/InputHandler.h" +#include "arch/arch.h" + RageInput* INPUTMAN = NULL; // globally accessable input device RageInput::RageInput( CString drivers ) diff --git a/stepmania/src/RageSoundManager.cpp b/stepmania/src/RageSoundManager.cpp index 8232a11deb..4229244f2a 100644 --- a/stepmania/src/RageSoundManager.cpp +++ b/stepmania/src/RageSoundManager.cpp @@ -11,6 +11,8 @@ #include "arch/Sound/RageSoundDriver.h" +#include "arch/arch.h" + /* * The lock ordering requirements are: * RageSound::Lock before g_SoundManMutex diff --git a/stepmania/src/RageTextureManager.cpp b/stepmania/src/RageTextureManager.cpp index 1b0f19ca53..07934e7f88 100644 --- a/stepmania/src/RageTextureManager.cpp +++ b/stepmania/src/RageTextureManager.cpp @@ -40,6 +40,8 @@ #include "RageException.h" #include "RageDisplay.h" +#include "arch/arch.h" + RageTextureManager* TEXTUREMAN = NULL; RageTextureManager::RageTextureManager() diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index 590850affb..830709b3ab 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -34,7 +34,7 @@ #include "RageSurface.h" #include "RageSurface_Load.h" -#include "arch/arch_platform.h" +#include "arch/arch.h" // // StepMania global classes diff --git a/stepmania/src/arch/ArchHooks/ArchHooks.cpp b/stepmania/src/arch/ArchHooks/ArchHooks.cpp index 83cf95a1ca..45c8fcca52 100644 --- a/stepmania/src/arch/ArchHooks/ArchHooks.cpp +++ b/stepmania/src/arch/ArchHooks/ArchHooks.cpp @@ -3,9 +3,6 @@ ArchHooks *HOOKS = NULL; -#include "Selector_ArchHooks.h" -ArchHooks *MakeArchHooks() { return new ARCH_HOOKS; } - /* * This is a helper for GetMicrosecondsSinceStart on systems with a system * timer that may loop or move backwards. diff --git a/stepmania/src/arch/ArchHooks/ArchHooks.h b/stepmania/src/arch/ArchHooks/ArchHooks.h index 68b9844372..48916c9ff2 100644 --- a/stepmania/src/arch/ArchHooks/ArchHooks.h +++ b/stepmania/src/arch/ArchHooks/ArchHooks.h @@ -59,8 +59,6 @@ private: static uint64_t FixupTimeIfBackwards( uint64_t usecs ); }; -ArchHooks *MakeArchHooks(); - #endif extern ArchHooks *HOOKS; // global and accessable from anywhere in our program diff --git a/stepmania/src/arch/Dialog/Dialog.cpp b/stepmania/src/arch/Dialog/Dialog.cpp index 6bb5d287ed..f709e507db 100644 --- a/stepmania/src/arch/Dialog/Dialog.cpp +++ b/stepmania/src/arch/Dialog/Dialog.cpp @@ -5,7 +5,7 @@ #include "RageUtil.h" #include "RageLog.h" -#include "Selector_Dialog.h" +#include "arch/arch.h" static DialogDriver *g_pImpl = NULL; static DialogDriver_Null g_NullDriver; @@ -17,37 +17,7 @@ void Dialog::Init() if( g_pImpl != NULL ) return; - CString drivers = "win32,cocoa,null"; - CStringArray DriversToTry; - split(drivers, ",", DriversToTry, true); - - ASSERT( DriversToTry.size() != 0 ); - - CString Driver; - for( unsigned i = 0; g_pImpl == NULL && i < DriversToTry.size(); ++i ) - { - Driver = DriversToTry[i]; - -#if defined(USE_DIALOG_DRIVER_WIN32) - if( !DriversToTry[i].CompareNoCase("Win32") ) g_pImpl = new DialogDriver_Win32; -#endif -#if defined(USE_DIALOG_DRIVER_COCOA) - if( !DriversToTry[i].CompareNoCase("Cocoa") ) g_pImpl = new DialogDriver_Cocoa; -#endif -#if defined(USE_DIALOG_DRIVER_NULL) - if( !DriversToTry[i].CompareNoCase("Null") ) g_pImpl = new DialogDriver_Null; -#endif - - if( g_pImpl == NULL ) - continue; - CString sError = g_pImpl->Init(); - if( sError != "" ) - { - if( LOG ) - LOG->Info( "Couldn't load driver %s: %s", DriversToTry[i].c_str(), sError.c_str() ); - SAFE_DELETE( g_pImpl ); - } - } + g_pImpl = MakeDialogDriver(); /* DialogDriver_Null should have worked, at least. */ ASSERT( g_pImpl != NULL ); diff --git a/stepmania/src/arch/InputHandler/InputHandler.cpp b/stepmania/src/arch/InputHandler/InputHandler.cpp index 464ce4ac53..1797272110 100644 --- a/stepmania/src/arch/InputHandler/InputHandler.cpp +++ b/stepmania/src/arch/InputHandler/InputHandler.cpp @@ -3,49 +3,6 @@ #include "RageUtil.h" #include "InputHandler.h" -#include "Selector_InputHandler.h" - -void MakeInputHandlers(CString drivers, vector &Add) -{ - CStringArray DriversToTry; - split(drivers, ",", DriversToTry, true); - - ASSERT( DriversToTry.size() != 0 ); - - CString Driver; - - for(unsigned i = 0; i < DriversToTry.size(); ++i) - { -#ifdef USE_INPUT_HANDLER_DIRECTINPUT - if(!DriversToTry[i].CompareNoCase("DirectInput") ) Add.push_back(new InputHandler_DInput); -#endif -#ifdef USE_INPUT_HANDLER_LINUX_JOYSTICK - if(!DriversToTry[i].CompareNoCase("Linux_Joystick") ) Add.push_back(new InputHandler_Linux_Joystick); -#endif -#ifdef USE_INPUT_HANDLER_LINUX_TTY - if(!DriversToTry[i].CompareNoCase("Linux_tty") ) Add.push_back(new InputHandler_Linux_tty); -#endif -#ifdef USE_INPUT_HANDLER_MONKEY_KEYBOARD - if(!DriversToTry[i].CompareNoCase("MonkeyKeyboard") ) Add.push_back(new InputHandler_MonkeyKeyboard); -#endif -#ifdef USE_INPUT_HANDLER_SDL - if(!DriversToTry[i].CompareNoCase("SDL") ) Add.push_back(new InputHandler_SDL); -#endif -#ifdef USE_INPUT_HANDLER_WIN32_PARA - if(!DriversToTry[i].CompareNoCase("Para") ) Add.push_back(new InputHandler_Win32_Para); -#endif -#ifdef USE_INPUT_HANDLER_WIN32_PUMP - if(!DriversToTry[i].CompareNoCase("Pump") ) Add.push_back(new InputHandler_Win32_Pump); -#endif -#ifdef USE_INPUT_HANDLER_X11 - if(!DriversToTry[i].CompareNoCase("X11") ) Add.push_back(new InputHandler_X11); -#endif -#ifdef USE_INPUT_HANDLER_XBOX - if(!DriversToTry[i].CompareNoCase("Xbox") ) Add.push_back(new InputHandler_Xbox); -#endif - } -} - void InputHandler::UpdateTimer() { m_LastUpdate.Touch(); diff --git a/stepmania/src/arch/InputHandler/InputHandler.h b/stepmania/src/arch/InputHandler/InputHandler.h index 3d291d35b6..3fc61a8d08 100644 --- a/stepmania/src/arch/InputHandler/InputHandler.h +++ b/stepmania/src/arch/InputHandler/InputHandler.h @@ -55,8 +55,6 @@ protected: void UpdateTimer(); }; -void MakeInputHandlers(CString drivers, vector &Add); - #endif /* diff --git a/stepmania/src/arch/Lights/LightsDriver.cpp b/stepmania/src/arch/Lights/LightsDriver.cpp deleted file mode 100644 index e70ce0b149..0000000000 --- a/stepmania/src/arch/Lights/LightsDriver.cpp +++ /dev/null @@ -1,58 +0,0 @@ -#include "global.h" -#include "LightsDriver.h" -#include "RageLog.h" - -#include "Selector_LightsDriver.h" - -LightsDriver *MakeLightsDriver(CString driver) -{ - LOG->Trace( "Initializing lights driver: %s", driver.c_str() ); - - LightsDriver *ret = NULL; - -#ifdef USE_LIGHTS_DRIVER_LINUX_PARALLEL - if( !driver.CompareNoCase("LinuxParallel") ) ret = new LightsDriver_LinuxParallel; -#endif -#ifdef USE_LIGHTS_DRIVER_LINUX_WEEDTECH - if( !driver.CompareNoCase("WeedTech") ) ret = new LightsDriver_LinuxWeedTech; -#endif -#ifdef USE_LIGHTS_DRIVER_NULL - if( !driver.CompareNoCase("Null") ) ret = new LightsDriver_Null; -#endif -#ifdef USE_LIGHTS_DRIVER_SYSTEM_MESSAGE - if( !driver.CompareNoCase("SystemMessage") ) ret = new LightsDriver_SystemMessage; -#endif -#ifdef USE_LIGHTS_DRIVER_WIN32_PARALLEL - if( !driver.CompareNoCase("Parallel") ) ret = new LightsDriver_Win32Parallel; -#endif - - if( ret == NULL ) - LOG->Warn( "Unknown lights driver name: %s", driver.c_str() ); - - return ret; -} - -/* - * (c) 2002-2004 Glenn Maynard - * All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, and/or sell copies of the Software, and to permit persons to - * whom the Software is furnished to do so, provided that the above - * copyright notice(s) and this permission notice appear in all copies of - * the Software and that both the above copyright notice(s) and this - * permission notice appear in supporting documentation. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS - * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT - * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS - * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ diff --git a/stepmania/src/arch/Lights/LightsDriver.h b/stepmania/src/arch/Lights/LightsDriver.h index b691b2f0fc..be7ce79da1 100644 --- a/stepmania/src/arch/Lights/LightsDriver.h +++ b/stepmania/src/arch/Lights/LightsDriver.h @@ -16,8 +16,6 @@ public: virtual void Set( const LightsState *ls ) = 0; }; -LightsDriver *MakeLightsDriver( CString driver ); - #endif /* diff --git a/stepmania/src/arch/LoadingWindow/LoadingWindow.cpp b/stepmania/src/arch/LoadingWindow/LoadingWindow.cpp deleted file mode 100644 index 74887fa7b8..0000000000 --- a/stepmania/src/arch/LoadingWindow/LoadingWindow.cpp +++ /dev/null @@ -1,89 +0,0 @@ -#include "LoadingWindow.h" - -#include "global.h" -#include "RageLog.h" -#include "PrefsManager.h" - -#include "Selector_LoadingWindow.h" - -LoadingWindow *MakeLoadingWindow() -{ - if( !PREFSMAN->m_bShowLoadingWindow ) - return new LoadingWindow_Null; - - /* Don't load NULL by default. On most systems, if we can't load the SDL - * loading window, we won't be able to init OpenGL, either, so don't bother. */ - CString drivers = "xbox,win32,cocoa,gtk,sdl"; - CStringArray DriversToTry; - split(drivers, ",", DriversToTry, true); - - ASSERT( DriversToTry.size() != 0 ); - - CString Driver; - LoadingWindow *ret = NULL; - - for(unsigned i = 0; ret == NULL && i < DriversToTry.size(); ++i) - { - Driver = DriversToTry[i]; - -#ifdef USE_LOADING_WINDOW_COCOA - if(!DriversToTry[i].CompareNoCase("Cocoa") ) ret = new LoadingWindow_Cocoa; -#endif -#ifdef USE_LOADING_WINDOW_GTK - if(!DriversToTry[i].CompareNoCase("Gtk") ) ret = new LoadingWindow_Gtk; -#endif -#ifdef USE_LOADING_WINDOW_NULL - if(!DriversToTry[i].CompareNoCase("Null") ) ret = new LoadingWindow_Null; -#endif -#ifdef USE_LOADING_WINDOW_SDL - if(!DriversToTry[i].CompareNoCase("SDL") ) ret = new LoadingWindow_SDL; -#endif -#ifdef USE_LOADING_WINDOW_WIN32 - if(!DriversToTry[i].CompareNoCase("Win32") ) ret = new LoadingWindow_Win32; -#endif -#ifdef USE_LOADING_WINDOW_XBOX - if(!DriversToTry[i].CompareNoCase("Xbox") ) ret = new LoadingWindow_Xbox; -#endif - - - if( ret == NULL ) - continue; - - CString sError = ret->Init(); - if( sError != "" ) - { - LOG->Info("Couldn't load driver %s: %s", DriversToTry[i].c_str(), sError.c_str()); - SAFE_DELETE( ret ); - } - } - - if(ret) - LOG->Info("Loading window: %s", Driver.c_str()); - - return ret; -} - -/* - * (c) 2002-2004 Glenn Maynard - * All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, and/or sell copies of the Software, and to permit persons to - * whom the Software is furnished to do so, provided that the above - * copyright notice(s) and this permission notice appear in all copies of - * the Software and that both the above copyright notice(s) and this - * permission notice appear in supporting documentation. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS - * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT - * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS - * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ diff --git a/stepmania/src/arch/LoadingWindow/LoadingWindow.h b/stepmania/src/arch/LoadingWindow/LoadingWindow.h index bb7504234a..2d9a0bdd70 100644 --- a/stepmania/src/arch/LoadingWindow/LoadingWindow.h +++ b/stepmania/src/arch/LoadingWindow/LoadingWindow.h @@ -17,8 +17,6 @@ public: virtual void SetIcon( const RageSurface *pIcon ) { } }; -LoadingWindow *MakeLoadingWindow(); - #endif /* diff --git a/stepmania/src/arch/LowLevelWindow/LowLevelWindow.cpp b/stepmania/src/arch/LowLevelWindow/LowLevelWindow.cpp deleted file mode 100644 index 698769e3bf..0000000000 --- a/stepmania/src/arch/LowLevelWindow/LowLevelWindow.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "LowLevelWindow.h" - -#include "Selector_LowLevelWindow.h" - -LowLevelWindow *MakeLowLevelWindow() { return new ARCH_LOW_LEVEL_WINDOW; } - -/* - * (c) 2002-2004 Glenn Maynard - * All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, and/or sell copies of the Software, and to permit persons to - * whom the Software is furnished to do so, provided that the above - * copyright notice(s) and this permission notice appear in all copies of - * the Software and that both the above copyright notice(s) and this - * permission notice appear in supporting documentation. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS - * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT - * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS - * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ diff --git a/stepmania/src/arch/LowLevelWindow/LowLevelWindow.h b/stepmania/src/arch/LowLevelWindow/LowLevelWindow.h index 4122d5e791..ff9e39d30d 100644 --- a/stepmania/src/arch/LowLevelWindow/LowLevelWindow.h +++ b/stepmania/src/arch/LowLevelWindow/LowLevelWindow.h @@ -26,8 +26,6 @@ public: virtual RageDisplay::VideoModeParams GetVideoModeParams() const = 0; }; -LowLevelWindow *MakeLowLevelWindow(); - #endif /* diff --git a/stepmania/src/arch/LowLevelWindow/LowLevelWindow_X11.h b/stepmania/src/arch/LowLevelWindow/LowLevelWindow_X11.h index 6748ee5e9f..adf3a77aae 100644 --- a/stepmania/src/arch/LowLevelWindow/LowLevelWindow_X11.h +++ b/stepmania/src/arch/LowLevelWindow/LowLevelWindow_X11.h @@ -4,8 +4,6 @@ /* A nice, simple OpenGL window direct to X11 through Xlib. */ #include "LowLevelWindow.h" -#include // XVisualInfo - class LowLevelWindow_X11 : public LowLevelWindow { private: diff --git a/stepmania/src/arch/MemoryCard/MemoryCardDriver.cpp b/stepmania/src/arch/MemoryCard/MemoryCardDriver.cpp index d9b9118e7f..cb2ca8883f 100644 --- a/stepmania/src/arch/MemoryCard/MemoryCardDriver.cpp +++ b/stepmania/src/arch/MemoryCard/MemoryCardDriver.cpp @@ -25,23 +25,6 @@ void UsbStorageDevice::SetOsMountDir( const CString &s ) FixSlashesInPlace( sOsMountDir ); } -MemoryCardDriver *MakeMemoryCardDriver() -{ - if( !PREFSMAN->m_bMemoryCards ) - return new MemoryCardDriver_Null; - - MemoryCardDriver *ret = NULL; - -#ifdef ARCH_MEMORY_CARD_DRIVER - ret = new ARCH_MEMORY_CARD_DRIVER; -#endif - - if( !ret ) - ret = new MemoryCardDriver_Null; - - return ret; -} - /* * (c) 2002-2004 Glenn Maynard * All rights reserved. diff --git a/stepmania/src/arch/MemoryCard/MemoryCardDriver.h b/stepmania/src/arch/MemoryCard/MemoryCardDriver.h index e4c6d632a8..52f54c32d8 100644 --- a/stepmania/src/arch/MemoryCard/MemoryCardDriver.h +++ b/stepmania/src/arch/MemoryCard/MemoryCardDriver.h @@ -78,8 +78,6 @@ public: virtual bool DoOneUpdate( bool bMount, vector& vStorageDevicesOut ) = 0; }; -MemoryCardDriver *MakeMemoryCardDriver(); - #endif /* diff --git a/stepmania/src/arch/MovieTexture/MovieTexture.cpp b/stepmania/src/arch/MovieTexture/MovieTexture.cpp index 9e0af75e3d..651bd8aa0e 100644 --- a/stepmania/src/arch/MovieTexture/MovieTexture.cpp +++ b/stepmania/src/arch/MovieTexture/MovieTexture.cpp @@ -6,8 +6,6 @@ #include "PrefsManager.h" #include "RageFile.h" -#include "Selector_MovieTexture.h" - void ForceToAscii( CString &str ) { for( unsigned i=0; iTrace("Movie %s has handler '%s', type '%s'", fn.c_str(), handler.c_str(), type.c_str()); -} - -/* Try drivers in order of preference until we find one that works. */ -RageMovieTexture *MakeRageMovieTexture(RageTextureID ID) -{ - DumpAVIDebugInfo( ID.filename ); - - CStringArray DriversToTry; - split(PREFSMAN->m_sMovieDrivers, ",", DriversToTry, true); - ASSERT(DriversToTry.size() != 0); - - CString Driver; - RageMovieTexture *ret = NULL; - - for( unsigned i=0; ret==NULL && iTrace("Initializing driver: %s", Driver.c_str()); -#ifdef USE_MOVIE_TEXTURE_DSHOW - if( !Driver.CompareNoCase("DShow") ) ret = new MovieTexture_DShow(ID); -#endif -#ifdef USE_MOVIE_TEXTURE_FFMPEG - if( !Driver.CompareNoCase("FFMpeg") ) ret = new MovieTexture_FFMpeg(ID); -#endif -#ifdef USE_MOVIE_TEXTURE_NULL - if( !Driver.CompareNoCase("Null") ) ret = new MovieTexture_Null(ID); -#endif - if( ret == NULL ) - { - LOG->Warn( "Unknown movie driver name: %s", Driver.c_str() ); - continue; - } - - CString sError = ret->Init(); - if( sError != "" ) - { - LOG->Info( "Couldn't load driver %s: %s", Driver.c_str(), sError.c_str() ); - SAFE_DELETE( ret ); - } - } - if (!ret) - RageException::Throw("Couldn't create a movie texture"); - - LOG->Trace("Created movie texture \"%s\" with driver \"%s\"", - ID.filename.c_str(), Driver.c_str() ); - return ret; -} - /* * (c) 2003-2004 Glenn Maynard * All rights reserved. diff --git a/stepmania/src/arch/MovieTexture/MovieTexture.h b/stepmania/src/arch/MovieTexture/MovieTexture.h index 86b13fe5d9..870e459134 100644 --- a/stepmania/src/arch/MovieTexture/MovieTexture.h +++ b/stepmania/src/arch/MovieTexture/MovieTexture.h @@ -22,8 +22,6 @@ public: static bool GetFourCC( CString fn, CString &handler, CString &type ); }; -RageMovieTexture *MakeRageMovieTexture(RageTextureID ID); - #endif /* diff --git a/stepmania/src/arch/Sound/RageSoundDriver.cpp b/stepmania/src/arch/Sound/RageSoundDriver.cpp deleted file mode 100644 index d71ca37585..0000000000 --- a/stepmania/src/arch/Sound/RageSoundDriver.cpp +++ /dev/null @@ -1,95 +0,0 @@ -#include "RageSoundDriver.h" - -#include "global.h" -#include "RageUtil.h" -#include "RageLog.h" - -#include "Selector_RageSoundDriver.h" - -RageSoundDriver *MakeRageSoundDriver(CString drivers) -{ - CStringArray DriversToTry; - split(drivers, ",", DriversToTry, true); - - ASSERT( DriversToTry.size() != 0 ); - - CString Driver; - RageSoundDriver *ret = NULL; - - for(unsigned i = 0; ret == NULL && i < DriversToTry.size(); ++i) - { - Driver = DriversToTry[i]; - LOG->Trace("Initializing driver: %s", DriversToTry[i].c_str()); - -#ifdef USE_RAGE_SOUND_ALSA9 - if(!DriversToTry[i].CompareNoCase("ALSA")) ret = new RageSound_ALSA9; -#endif -#ifdef USE_RAGE_SOUND_ALSA9_SOFTWARE - if(!DriversToTry[i].CompareNoCase("ALSA-sw")) ret = new RageSound_ALSA9_Software; -#endif -#ifdef USE_RAGE_SOUND_CA - if(!DriversToTry[i].CompareNoCase("CoreAudio")) ret = new RageSound_CA; -#endif -#ifdef USE_RAGE_SOUND_DSOUND - if(!DriversToTry[i].CompareNoCase("DirectSound")) ret = new RageSound_DSound; -#endif -#ifdef USE_RAGE_SOUND_DSOUND_SOFTWARE - if(!DriversToTry[i].CompareNoCase("DirectSound-sw")) ret = new RageSound_DSound_Software; -#endif -#ifdef USE_RAGE_SOUND_NULL - if(!DriversToTry[i].CompareNoCase("Null")) ret = new RageSound_Null; -#endif -#ifdef USE_RAGE_SOUND_OSS - if(!DriversToTry[i].CompareNoCase("OSS")) ret = new RageSound_OSS; -#endif -#ifdef USE_RAGE_SOUND_QT1 - if(!DriversToTry[i].CompareNoCase("QT1")) ret = new RageSound_QT1; -#endif -#ifdef USE_RAGE_SOUND_WAVE_OUT - if(!DriversToTry[i].CompareNoCase("WaveOut")) ret = new RageSound_WaveOut; -#endif - - if( ret == NULL ) - { - LOG->Warn( "Unknown sound driver name: %s", DriversToTry[i].c_str() ); - continue; - } - - CString sError = ret->Init(); - if( sError != "" ) - { - LOG->Info( "Couldn't load driver %s: %s", DriversToTry[i].c_str(), sError.c_str() ); - SAFE_DELETE( ret ); - } - } - - if(ret) - LOG->Info("Sound driver: %s", Driver.c_str()); - - return ret; -} - -/* - * (c) 2002-2004 Glenn Maynard - * All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, and/or sell copies of the Software, and to permit persons to - * whom the Software is furnished to do so, provided that the above - * copyright notice(s) and this permission notice appear in all copies of - * the Software and that both the above copyright notice(s) and this - * permission notice appear in supporting documentation. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF - * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS - * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT - * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS - * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ diff --git a/stepmania/src/arch/Sound/RageSoundDriver.h b/stepmania/src/arch/Sound/RageSoundDriver.h index fe230e9049..e3296ac5e7 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver.h +++ b/stepmania/src/arch/Sound/RageSoundDriver.h @@ -50,8 +50,6 @@ public: virtual ~RageSoundDriver() { } }; -RageSoundDriver *MakeRageSoundDriver(CString drivers); - /* * (c) 2002-2004 Glenn Maynard * All rights reserved. diff --git a/stepmania/src/arch/arch_platform.h b/stepmania/src/arch/arch_platform.h index 379cc2ac24..a1443db033 100644 --- a/stepmania/src/arch/arch_platform.h +++ b/stepmania/src/arch/arch_platform.h @@ -4,7 +4,7 @@ // In here, you define which APIs are guaranteed to be available on which OSes. // Don't ever actually #include anything here -- that's for */Selector_*.h. #if defined(UNIX) || !defined(DARWIN) // Darwin isn't POSIX enough for us. -#define HAVE_POSIX +#define HAVE_POSIX // (is Darwin POSIX at all?) #endif #if defined(DARWIN) #define HAVE_DARWIN @@ -25,17 +25,6 @@ #define HAVE_LINUXKERNEL #endif -/* I'm also putting the renderer master switch in here, since there's really no - * better place to put it. */ -#if defined(_WINDOWS) -#define SUPPORT_OPENGL -#define SUPPORT_D3D -#elif defined(_XBOX) -#define SUPPORT_D3D -#else -#define SUPPORT_OPENGL -#endif - #endif /*