From f86bc2e24e2e8057b2ce57a0e140678a7e64c519 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Tue, 8 May 2007 18:37:13 +0000 Subject: [PATCH] Revert. --- stepmania/src/Makefile.am | 3 +- .../src/arch/LoadingWindow/LoadingWindow.cpp | 6 +-- .../src/arch/LoadingWindow/LoadingWindow.h | 2 +- .../arch/LoadingWindow/LoadingWindow_Null.h | 39 +++++++++++++++++++ stepmania/src/arch/arch_default.h | 1 + 5 files changed, 46 insertions(+), 5 deletions(-) create mode 100644 stepmania/src/arch/LoadingWindow/LoadingWindow_Null.h diff --git a/stepmania/src/Makefile.am b/stepmania/src/Makefile.am index 6b695cb5ad..d87ad1eafc 100644 --- a/stepmania/src/Makefile.am +++ b/stepmania/src/Makefile.am @@ -166,7 +166,8 @@ SpecialFiles.cpp SpecialFiles.h \ ProductInfo.h LoadingWindow = arch/LoadingWindow/LoadingWindow.cpp \ - arch/LoadingWindow/LoadingWindow.h + arch/LoadingWindow/LoadingWindow.h \ + arch/LoadingWindow/LoadingWindow_Null.h if HAVE_GTK LoadingWindow += arch/LoadingWindow/LoadingWindow_Gtk.cpp arch/LoadingWindow/LoadingWindow_Gtk.h \ diff --git a/stepmania/src/arch/LoadingWindow/LoadingWindow.cpp b/stepmania/src/arch/LoadingWindow/LoadingWindow.cpp index 2122c141f5..57e2f719e6 100644 --- a/stepmania/src/arch/LoadingWindow/LoadingWindow.cpp +++ b/stepmania/src/arch/LoadingWindow/LoadingWindow.cpp @@ -7,9 +7,9 @@ LoadingWindow *LoadingWindow::Create() { if( !PREFSMAN->m_bShowLoadingWindow ) - return new LoadingWindow; + return new LoadingWindow_Null; #if defined(UNIX) && !defined(HAVE_GTK) - return new LoadingWindow; + return new LoadingWindow_Null; #endif /* Don't load NULL by default. */ const RString drivers = "xbox,win32,cocoa,gtk"; @@ -37,7 +37,7 @@ LoadingWindow *LoadingWindow::Create() #ifdef USE_LOADING_WINDOW_XBOX if( !DriversToTry[i].CompareNoCase("Xbox") ) ret = new LoadingWindow_Xbox; #endif - if( !DriversToTry[i].CompareNoCase("Null") ) ret = new LoadingWindow; + if( !DriversToTry[i].CompareNoCase("Null") ) ret = new LoadingWindow_Null; if( ret == NULL ) diff --git a/stepmania/src/arch/LoadingWindow/LoadingWindow.h b/stepmania/src/arch/LoadingWindow/LoadingWindow.h index c850ac3702..2a5c46e671 100644 --- a/stepmania/src/arch/LoadingWindow/LoadingWindow.h +++ b/stepmania/src/arch/LoadingWindow/LoadingWindow.h @@ -13,7 +13,7 @@ public: virtual ~LoadingWindow() { } virtual void Paint() { } - virtual void SetText( RString str ) { } + virtual void SetText( RString str ) = 0; virtual void SetIcon( const RageSurface *pIcon ) { } }; diff --git a/stepmania/src/arch/LoadingWindow/LoadingWindow_Null.h b/stepmania/src/arch/LoadingWindow/LoadingWindow_Null.h new file mode 100644 index 0000000000..1ca5d89341 --- /dev/null +++ b/stepmania/src/arch/LoadingWindow/LoadingWindow_Null.h @@ -0,0 +1,39 @@ +#ifndef LOADING_WINDOW_NULL_H +#define LOADING_WINDOW_NULL_H + +#include "LoadingWindow.h" + +class LoadingWindow_Null: public LoadingWindow +{ +public: + void SetText( RString str ) { } +}; +#define USE_LOADING_WINDOW_NULL + +#endif + +/* + * (c) 2003-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/arch_default.h b/stepmania/src/arch/arch_default.h index 5c4e7cd5e1..815898d4d4 100644 --- a/stepmania/src/arch/arch_default.h +++ b/stepmania/src/arch/arch_default.h @@ -55,6 +55,7 @@ #endif /* All use these. */ +#include "LoadingWindow/LoadingWindow_Null.h" #include "MemoryCard/MemoryCardDriver_Null.h" #endif