From 2ebb67f35824535fa64f74cc3ac0bca5d4e0a411 Mon Sep 17 00:00:00 2001 From: Andrew Livy Date: Sat, 8 Feb 2003 17:07:18 +0000 Subject: [PATCH] Pump - Style Splash Screens implemented, Evaluation endscreen metricable (i.e. Pump doesn't have a scoreboard, so we can now bypass it) --- stepmania/TODO.andy | 31 ++++++--- stepmania/Themes/default/metrics.ini | 4 ++ stepmania/src/ScreenEvaluation.cpp | 4 +- stepmania/src/ScreenManager.cpp | 2 + stepmania/src/ScreenNameEntry.cpp | 2 +- stepmania/src/ScreenStyleSplash.cpp | 100 +++++++++++++++++++++++++++ stepmania/src/ScreenStyleSplash.h | 39 +++++++++++ stepmania/src/StepMania.dsp | 16 +++-- 8 files changed, 182 insertions(+), 16 deletions(-) create mode 100644 stepmania/src/ScreenStyleSplash.cpp create mode 100644 stepmania/src/ScreenStyleSplash.h diff --git a/stepmania/TODO.andy b/stepmania/TODO.andy index b027e0cf44..0e9751f7c9 100644 --- a/stepmania/TODO.andy +++ b/stepmania/TODO.andy @@ -3,19 +3,30 @@ X denotes task complete or no longer required to do. - denotes task to do, but also being worked upon by other dev. H denotes task on hold. +TODO As of: 16:57 03/02/08 +* Object Oriented Design 2 Assignment +* Operating Systems 2 Assignment +* Systems Programming 2 Assignment +* Para-Style EndScreens +* Para-Style Scoreboard +* Ez2-Style Scoreboard +H Pump Battle Mode +H Pump Random Speed +H Pump Random Vanish + TODO As of: 06:36:PM 10/12/02 -* Optimize The Music Banner Wheel +X Optimize The Music Banner Wheel TODO As of: 04:46:PM 27/11/02 X Systems Programming Assignment -* Integrating Assignment 2 -* Add Scoreboard Initials Entry Frontend +X Integrating Assignment 2 +X Add Scoreboard Initials Entry Frontend TODO As of: 01:30:PM 13/11/02 * Work on 3DDX Support -* Software Engineering Assignment +X Software Engineering Assignment X Operating Systems Assignment -* Object Oriented Design Assignment +X Object Oriented Design Assignment TODO As of: 07:30:PM 28/10/02 @@ -23,7 +34,7 @@ X Networking Assignment X Integrating Assignment 1 X Update Menu Graphics for Para H Update Menu Graphics for Ez2 -H Finish The PUMP Graphics +* Finish The PUMP Graphics - Work on Beatmania Support TODO As of: 07:47:PM 12/09/02 @@ -36,7 +47,7 @@ X Add Ez2dancer Style Select Background Animation TODO As of: 11:42:PM 05/09/02 -* Fix the Bug on ScreenStage that reports the current stage number for final stage as being 00 in Ez2 +X Fix the Bug on ScreenStage that reports the current stage number for final stage as being 00 in Ez2 TODO As of: 01:29:AM 04/09/02 @@ -45,14 +56,14 @@ X Try to fix ez2dancer select style. H Create Ez2dancer style Gameover by making some Gameover Metrics. H Create Ez2dancer style End Scroll, possibly new class, possibly just metric changes. * Create Ez2dancer style song select. -H Add Scoreboard System (longterm project) +- Add Scoreboard System (longterm project) H Create some kind of metrics so that Ez2dancer may have extra stage the way it should X Fix Ez2dancer type stage screens -- Create Ez2dancer type "extra stage" stage screen. +H Create Ez2dancer type "extra stage" stage screen. H Modify Gameplay Screen Metrics so that Ez2dancer style screen is more arcade-accurate H Modify DEMO Play Screen so that Ez2dancer shows each style (double, real, e.t.c.) in the way it should. H Create Ez2dancer HowToPlay screens. -- Modify Pump Style Select So it is more arcade accurate. +X Modify Pump Style Select So it is more arcade accurate. - Update the rather tacky graphics. * Keep my sanity. \ No newline at end of file diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index b515d8cb77..3e9c9095ef 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -103,6 +103,9 @@ SelectionSpecificBGAnimations=0 BounceJoinMessage=1 FoldOnJoin=1 +[ScreenStyleSplash] +NextScreen=ScreenSelectGroup + [ScreenSelectDifficulty] MorePage1X=580 MorePage1Y=90 @@ -362,6 +365,7 @@ TickEarlySeconds=0.05 [ScreenEvaluation] SongSelectScreen=ScreenSelectMusic +EndGameScreen=ScreenNameEntry BannerX=320 BannerY=100 StageX=320 diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index b4dbf01aca..810d533e8d 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -27,6 +27,7 @@ #define SONGSEL_SCREEN THEME->GetMetric("ScreenEvaluation","SongSelectScreen") +#define ENDGAME_SCREEN THEME->GetMetric("ScreenEvaluation","EndGameScreen") #define BANNER_X THEME->GetMetricF("ScreenEvaluation","BannerX") #define BANNER_Y THEME->GetMetricF("ScreenEvaluation","BannerY") #define STAGE_X THEME->GetMetricF("ScreenEvaluation","StageX") @@ -747,7 +748,8 @@ void ScreenEvaluation::HandleScreenMessage( const ScreenMessage SM ) SCREENMAN->SetNewScreen( "ScreenSelectCourse" ); break; case SM_GoToGameFinished: - SCREENMAN->SetNewScreen( "ScreenNameEntry" ); + // SCREENMAN->SetNewScreen( "ScreenNameEntry" ); + SCREENMAN->SetNewScreen( ENDGAME_SCREEN ); break; case SM_GoToFinalEvaluation: SCREENMAN->SetNewScreen( "ScreenFinalEvaluation" ); diff --git a/stepmania/src/ScreenManager.cpp b/stepmania/src/ScreenManager.cpp index 4c33ee275f..137a2e0149 100644 --- a/stepmania/src/ScreenManager.cpp +++ b/stepmania/src/ScreenManager.cpp @@ -204,6 +204,7 @@ void ScreenManager::Input( const DeviceInput& DeviceI, const InputEventType type #include "ScreenJukebox.h" #include "ScreenOptionsMenu.h" #include "ScreenGameplayOptions.h" +#include "ScreenStyleSplash.h" #include "ScreenPrompt.h" #include "ScreenTextEntry.h" @@ -258,6 +259,7 @@ Screen* ScreenManager::MakeNewScreen( CString sClassName ) else if( 0==stricmp(sClassName, "ScreenJukebox") ) ret = new ScreenJukebox; else if( 0==stricmp(sClassName, "ScreenOptionsMenu") ) ret = new ScreenOptionsMenu; else if( 0==stricmp(sClassName, "ScreenGameplayOptions") ) ret = new ScreenGameplayOptions; + else if( 0==stricmp(sClassName, "ScreenStyleSplash") ) ret = new ScreenStyleSplash; else RageException::Throw( "Invalid Screen class name '%s'", sClassName.GetString() ); diff --git a/stepmania/src/ScreenNameEntry.cpp b/stepmania/src/ScreenNameEntry.cpp index 59d61e1459..82c3eb7a0a 100644 --- a/stepmania/src/ScreenNameEntry.cpp +++ b/stepmania/src/ScreenNameEntry.cpp @@ -186,7 +186,7 @@ ScreenNameEntry::ScreenNameEntry() m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations","name entry") ); this->AddChild( &m_Background ); - for( int p=0; pm_iLastRankingIndex[p] != -1; m_bStillEnteringName[p] = bNewHighScore; // false if they made a new high score diff --git a/stepmania/src/ScreenStyleSplash.cpp b/stepmania/src/ScreenStyleSplash.cpp new file mode 100644 index 0000000000..ceb366f461 --- /dev/null +++ b/stepmania/src/ScreenStyleSplash.cpp @@ -0,0 +1,100 @@ +#include "stdafx.h" +/* +----------------------------------------------------------------------------- + Class: ScreenCaution + + Desc: Screen that displays while resources are being loaded. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + +#include "ScreenStyleSplash.h" +#include "GameConstantsAndTypes.h" +#include "PrefsManager.h" +#include "AnnouncerManager.h" +#include "GameState.h" +#include "RageSoundManager.h" +#include "ThemeManager.h" +#include "GameState.h" +#include "GameManager.h" + +#define NEXT_SCREEN THEME->GetMetric("ScreenStyleSplash","NextScreen") + + +const ScreenMessage SM_DoneOpening = ScreenMessage(SM_User-7); +const ScreenMessage SM_StartClosing = ScreenMessage(SM_User-8); + + +ScreenStyleSplash::ScreenStyleSplash() +{ + GAMESTATE->m_bPlayersCanJoin = false; + SOUNDMAN->StopMusic(); + + if(!PREFSMAN->m_bShowDontDie) + { + this->SendScreenMessage( SM_GoToNextScreen, 0.f ); + return; + } + + CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName; + CString sStyleName = GAMESTATE->GetCurrentStyleDef()->m_szName; + int iDifficulty = GAMESTATE->m_PreferredDifficulty[0]; + + m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations",ssprintf("ScreenStyleSplash-%s-%s-%d",sGameName.GetString(),sStyleName.GetString(),iDifficulty) ) ); + this->AddChild( &m_Background ); + + m_Wipe.OpenWipingRight( SM_DoneOpening ); + this->AddChild( &m_Wipe ); + +// m_FadeWipe.SetOpened(); +// this->AddChild( &m_FadeWipe ); + + this->SendScreenMessage( SM_StartClosing, 2 ); +} + + +void ScreenStyleSplash::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ) +{ + if( m_Wipe.IsClosing() ) + return; + + Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); +} + + +void ScreenStyleSplash::HandleScreenMessage( const ScreenMessage SM ) +{ + switch( SM ) + { + case SM_StartClosing: + if( !m_Wipe.IsClosing() ) + m_Wipe.CloseWipingRight( SM_GoToNextScreen ); + break; + case SM_DoneOpening: + + break; + case SM_GoToPrevScreen: + SCREENMAN->SetNewScreen( "ScreenTitleMenu" ); + break; + case SM_GoToNextScreen: + SCREENMAN->SetNewScreen( NEXT_SCREEN ); + break; + } +} + +void ScreenStyleSplash::MenuStart( PlayerNumber pn ) +{ + m_Wipe.CloseWipingRight( SM_GoToNextScreen ); +} + +void ScreenStyleSplash::MenuBack( PlayerNumber pn ) +{ + if(m_FadeWipe.IsClosing()) + return; + this->ClearMessageQueue(); + m_FadeWipe.CloseWipingLeft( SM_GoToPrevScreen ); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","menu back") ); +} + diff --git a/stepmania/src/ScreenStyleSplash.h b/stepmania/src/ScreenStyleSplash.h new file mode 100644 index 0000000000..810760f1b7 --- /dev/null +++ b/stepmania/src/ScreenStyleSplash.h @@ -0,0 +1,39 @@ +#ifndef SCREENSTYELESPLASH_H +#define SCREENSTYLESPLASH_H + +/* +----------------------------------------------------------------------------- + Class: ScreenStyleSplash + + Desc: Screen that displays the style the player selected for a short period of time. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + + +#include "Screen.h" +#include "TransitionFade.h" +#include "TransitionFadeWipe.h" +#include "RandomSample.h" +#include "BGAnimation.h" + + +class ScreenStyleSplash : public Screen +{ +public: + ScreenStyleSplash(); + + virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); + virtual void HandleScreenMessage( const ScreenMessage SM ); + +protected: + void MenuStart( PlayerNumber pn ); + void MenuBack( PlayerNumber pn ); + BGAnimation m_Background; + TransitionFade m_Wipe; + TransitionFadeWipe m_FadeWipe; +}; + +#endif diff --git a/stepmania/src/StepMania.dsp b/stepmania/src/StepMania.dsp index f1dc413843..cca9f45fbc 100644 --- a/stepmania/src/StepMania.dsp +++ b/stepmania/src/StepMania.dsp @@ -57,10 +57,10 @@ LINK32=link.exe # SUBTRACT LINK32 /verbose /pdb:none # Begin Special Build Tool IntDir=.\../Release6 -TargetDir=\stepmania\stepmania +TargetDir=\Stepmania\stepmania TargetName=StepMania SOURCE="$(InputPath)" -PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ +PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi # End Special Build Tool @@ -92,10 +92,10 @@ LINK32=link.exe # SUBTRACT LINK32 /verbose /profile /pdb:none /incremental:no /nodefaultlib # Begin Special Build Tool IntDir=.\../Debug6 -TargetDir=\stepmania\stepmania +TargetDir=\Stepmania\stepmania TargetName=StepMania-debug SOURCE="$(InputPath)" -PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ +PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi # End Special Build Tool @@ -1693,6 +1693,14 @@ SOURCE=.\ScreenStage.h # End Source File # Begin Source File +SOURCE=.\ScreenStyleSplash.cpp +# End Source File +# Begin Source File + +SOURCE=.\ScreenStyleSplash.h +# End Source File +# Begin Source File + SOURCE=.\ScreenTest.cpp # End Source File # Begin Source File