From 08964e340bfbd3a45b00596b7b99bc5519ceda10 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Thu, 9 Dec 2004 04:20:09 +0000 Subject: [PATCH] remove ScreenGameOver code, replace with ScreenAttract --- stepmania/Themes/default/metrics.ini | 1 + stepmania/src/Makefile.am | 2 +- stepmania/src/ScreenGameOver.cpp | 82 ---------------------------- stepmania/src/ScreenGameOver.h | 50 ----------------- stepmania/src/StepMania.dsp | 14 +---- stepmania/src/StepMania.vcproj | 6 -- 6 files changed, 5 insertions(+), 150 deletions(-) delete mode 100644 stepmania/src/ScreenGameOver.cpp delete mode 100644 stepmania/src/ScreenGameOver.h diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 2c39a2ea7f..ec13f5d136 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -3610,6 +3610,7 @@ TextsZoom=0.5 NextScreen=ScreenRanking [ScreenGameOver] +Class=ScreenAttract NextScreen=ScreenCompany [ScreenSelectCharacter] diff --git a/stepmania/src/Makefile.am b/stepmania/src/Makefile.am index d049279522..55f80ebe43 100644 --- a/stepmania/src/Makefile.am +++ b/stepmania/src/Makefile.am @@ -30,7 +30,7 @@ ScreenEditCoursesMenu.cpp ScreenEditCoursesMenu.h EditCoursesSongMenu.cpp EditCo ScreenEditMenu.cpp ScreenEditMenu.h ScreenEnding.cpp ScreenEnding.h \ ScreenEndlessBreak.cpp ScreenEndlessBreak.h ScreenEvaluation.cpp ScreenEvaluation.h ScreenExit.cpp ScreenExit.h ScreenNetEvaluation.cpp ScreenNetEvaluation.h \ ScreenNetSelectMusic.cpp ScreenNetSelectMusic.h ScreenNetSelectBase.cpp ScreenNetSelectBase.h ScreenNetRoom.cpp ScreenNetRoom.h ScreenEz2SelectMusic.cpp ScreenEz2SelectMusic.h ScreenEz2SelectPlayer.cpp ScreenEz2SelectPlayer.h \ -ScreenGameOver.cpp ScreenGameOver.h ScreenGameplay.cpp ScreenGameplay.h ScreenHowToPlay.cpp ScreenHowToPlay.h \ +ScreenGameplay.cpp ScreenGameplay.h ScreenHowToPlay.cpp ScreenHowToPlay.h \ ScreenInstructions.cpp ScreenInstructions.h \ ScreenJukebox.cpp ScreenJukebox.h \ ScreenJukeboxMenu.cpp ScreenJukeboxMenu.h ScreenLogo.cpp ScreenLogo.h ScreenMapControllers.cpp ScreenMapControllers.h \ diff --git a/stepmania/src/ScreenGameOver.cpp b/stepmania/src/ScreenGameOver.cpp deleted file mode 100644 index 16d58b819d..0000000000 --- a/stepmania/src/ScreenGameOver.cpp +++ /dev/null @@ -1,82 +0,0 @@ -#include "global.h" -#include "ScreenGameOver.h" -#include "ScreenManager.h" -#include "AnnouncerManager.h" -#include "GameSoundManager.h" -#include "ThemeManager.h" - -const ScreenMessage SM_StartFadingOut = ScreenMessage(SM_User + 1); -const ScreenMessage SM_PlayAnnouncer = ScreenMessage(SM_User + 3); - - -#define NEXT_SCREEN THEME->GetMetric("ScreenGameOver","NextScreen") - - -REGISTER_SCREEN_CLASS( ScreenGameOver ); -ScreenGameOver::ScreenGameOver( CString sName ) : Screen( sName ) -{ - m_Background.LoadFromAniDir( THEME->GetPathToB("ScreenGameOver background") ); - this->AddChild( &m_Background ); - - m_In.Load( THEME->GetPathToB("ScreenGameOver in") ); - this->AddChild( &m_In ); - - m_Out.Load( THEME->GetPathToB("ScreenGameOver out") ); - this->AddChild( &m_Out ); - - SOUND->PlayMusic( THEME->GetPathToS("ScreenGameOver music") ); - - m_In.StartTransitioning( SM_PlayAnnouncer ); - this->PostScreenMessage( SM_StartFadingOut, m_Background.GetLengthSeconds() ); -} - - -void ScreenGameOver::HandleScreenMessage( const ScreenMessage SM ) -{ - switch( SM ) - { - case SM_PlayAnnouncer: - SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("game over") ); - break; - case SM_StartFadingOut: - m_Out.StartTransitioning( SM_GoToNextScreen ); - break; - case SM_GoToNextScreen: - SCREENMAN->SetNewScreen( NEXT_SCREEN ); - break; - } -} - -void ScreenGameOver::MenuStart( PlayerNumber pn ) -{ - if( m_In.IsTransitioning() || m_Out.IsTransitioning() ) - return; - - this->ClearMessageQueue(); - this->PostScreenMessage( SM_StartFadingOut, 0 ); -} - -/* - * (c) 2002-2003 Chris Danford - * 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/ScreenGameOver.h b/stepmania/src/ScreenGameOver.h deleted file mode 100644 index 1daeed1328..0000000000 --- a/stepmania/src/ScreenGameOver.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef SCREEN_GAME_OVER_H -#define SCREEN_GAME_OVER_H - -#include "Screen.h" -#include "BGAnimation.h" -#include "Transition.h" - - -class ScreenGameOver : public Screen -{ -public: - ScreenGameOver( CString sName ); - - virtual void HandleScreenMessage( const ScreenMessage SM ); - - virtual void MenuStart( PlayerNumber pn ); - -private: - - Transition m_In; - Transition m_Out; - BGAnimation m_Background; -}; - -#endif - -/* - * (c) 2002-2003 Chris Danford - * 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/StepMania.dsp b/stepmania/src/StepMania.dsp index 2bae530aa1..e2364c9c4b 100644 --- a/stepmania/src/StepMania.dsp +++ b/stepmania/src/StepMania.dsp @@ -1,5 +1,5 @@ # Microsoft Developer Studio Project File - Name="StepMania" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 60000 +# Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Application" 0x0101 @@ -62,7 +62,7 @@ IntDir=.\../Debug6 TargetDir=\stepmania\stepmania\Program TargetName=StepMania-debug SOURCE="$(InputPath)" -PreLink_Cmds=archutils\Win32\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ +PreLink_Cmds=archutils\Win32\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PostBuild_Cmds=archutils\Win32\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi # End Special Build Tool @@ -99,7 +99,7 @@ IntDir=.\../Release6 TargetDir=\stepmania\stepmania\Program TargetName=StepMania SOURCE="$(InputPath)" -PreLink_Cmds=archutils\Win32\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ +PreLink_Cmds=archutils\Win32\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PostBuild_Cmds=archutils\Win32\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi # End Special Build Tool @@ -2484,14 +2484,6 @@ SOURCE=.\ScreenEz2SelectPlayer.h # End Source File # Begin Source File -SOURCE=.\ScreenGameOver.cpp -# End Source File -# Begin Source File - -SOURCE=.\ScreenGameOver.h -# End Source File -# Begin Source File - SOURCE=.\ScreenGameplay.cpp # End Source File # Begin Source File diff --git a/stepmania/src/StepMania.vcproj b/stepmania/src/StepMania.vcproj index 5092ac82c2..9e8c29951f 100644 --- a/stepmania/src/StepMania.vcproj +++ b/stepmania/src/StepMania.vcproj @@ -262,12 +262,6 @@ cl /Zl /nologo /c verstub.cpp /Fo"$(IntDir)"\ - - - -