diff --git a/stepmania/Themes/default/BGAnimations/ScreenHowToPlay overlay/feet.png b/stepmania/Themes/default/BGAnimations/ScreenHowToPlay overlay/feet.png new file mode 100644 index 0000000000..d339e7c60a Binary files /dev/null and b/stepmania/Themes/default/BGAnimations/ScreenHowToPlay overlay/feet.png differ diff --git a/stepmania/Themes/default/BGAnimations/ScreenHowToPlay overlay/jumpmessage.png b/stepmania/Themes/default/BGAnimations/ScreenHowToPlay overlay/jumpmessage.png new file mode 100644 index 0000000000..b45ebbfe6d Binary files /dev/null and b/stepmania/Themes/default/BGAnimations/ScreenHowToPlay overlay/jumpmessage.png differ diff --git a/stepmania/Themes/default/BGAnimations/ScreenHowToPlay overlay/missmessage.png b/stepmania/Themes/default/BGAnimations/ScreenHowToPlay overlay/missmessage.png new file mode 100644 index 0000000000..c0251aea7c Binary files /dev/null and b/stepmania/Themes/default/BGAnimations/ScreenHowToPlay overlay/missmessage.png differ diff --git a/stepmania/Themes/default/BGAnimations/ScreenHowToPlay overlay/tapmessage.png b/stepmania/Themes/default/BGAnimations/ScreenHowToPlay overlay/tapmessage.png new file mode 100644 index 0000000000..a6bfbdb415 Binary files /dev/null and b/stepmania/Themes/default/BGAnimations/ScreenHowToPlay overlay/tapmessage.png differ diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index c307d8d9db..3757d2c53b 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -2138,8 +2138,15 @@ NextScreen=ScreenHowToPlay [ScreenHowToPlay] NextScreen=ScreenDemonstration -SongBPM=100 SecondsToShow=25 +SongBPM=100 +NumPerfects=4 +NumMisses=6 +LifeMeterBarOnCommand=x,480;y,40;addy,-60;sleep,2.4;linear,0.2;addy,60 +UseCharacter=1 +CharacterOnCommand=Zoom,20;X,120;Y,400;addy,-500;sleep,6.0;linear,0.4;addy,500 +PadOnCommand=X,40;Y,310;Zoom,15;RotationY,180;sleep,4.7;linear,1.0;RotationY,360;Zoom,20;X,230;Y,390 +PlayerOnCommand=x,480;addx,320;linear,0.3;addx,-320 [ScreenDemonstration] SecondsToShow=30 diff --git a/stepmania/src/ScreenHowToPlay.cpp b/stepmania/src/ScreenHowToPlay.cpp index 925a065516..a014b7d141 100644 --- a/stepmania/src/ScreenHowToPlay.cpp +++ b/stepmania/src/ScreenHowToPlay.cpp @@ -21,13 +21,26 @@ #include "NoteFieldPositioning.h" #include "GameManager.h" -#define SONG_BPM THEME->GetMetricF("ScreenHowToPlay","SongBPM") -#define SECONDS_TO_SHOW THEME->GetMetricF("ScreenHowToPlay","SecondsToShow") -#define NUM_PERFECTS 4 -#define NUM_MISSES 6 +#define SONG_BPM THEME->GetMetricF("ScreenHowToPlay","SongBPM") +#define SECONDS_TO_SHOW THEME->GetMetricF("ScreenHowToPlay","SecondsToShow") +#define NUM_PERFECTS THEME->GetMetricI("ScreenHowToPlay","NumPerfects") +#define NUM_MISSES THEME->GetMetricI("ScreenHowToPlay","NumMisses") +#define LIFEBARONCOMMAND THEME->GetMetric ("ScreenHowToPlay","LifeMeterBarOnCommand") +#define USECHARACTER THEME->GetMetricB("ScreenHowToPlay","UseCharacter") +#define CHARACTERONCOMMAND THEME->GetMetric ("ScreenHowToPlay","CharacterOnCommand") +#define PADONCOMMAND THEME->GetMetric ("ScreenHowToPlay","PadOnCommand") +#define PLAYERONCOMMAND THEME->GetMetric ("ScreenHowToPlay","PlayerOnCommand") ScreenHowToPlay::ScreenHowToPlay() : ScreenAttract("ScreenHowToPlay") { + m_In.Load( THEME->GetPathToB("ScreenHowToPlay in") ); + m_In.StartTransitioning(); + + m_Out.Load( THEME->GetPathToB("ScreenHowToPlay out") ); + + m_Overlay.LoadFromAniDir( THEME->GetPathToB("ScreenHowToPlay overlay") ); + this->AddChild( &m_Overlay ); + switch(GAMESTATE->m_CurGame) // which style should we use to demonstrate? { case GAME_DANCE: GAMESTATE->m_CurStyle = STYLE_DANCE_SINGLE; break; @@ -45,22 +58,23 @@ ScreenHowToPlay::ScreenHowToPlay() : ScreenAttract("ScreenHowToPlay") ASSERT(iNumOfTracks > 0); // crazy to have less than 1 track.... m_LifeMeterBar.Load( PLAYER_1 ); - m_LifeMeterBar.SetXY( 480, 40 ); + m_LifeMeterBar.Command( LIFEBARONCOMMAND ); m_LifeMeterBar.FillForHowToPlay( NUM_PERFECTS, NUM_MISSES ); + m_mDancePad.LoadMilkshapeAscii("Characters" SLASH "DancePad-DDR.txt"); + m_mDancePad.SetRotationX( 35 ); + m_mDancePad.Command( PADONCOMMAND ); + // Display random character+pad - if( GAMESTATE->m_pCharacters.size() ) + if( USECHARACTER && GAMESTATE->m_pCharacters.size() ) { Character* rndchar = GAMESTATE->GetRandomCharacter(); m_mCharacter.LoadMilkshapeAscii( rndchar->GetModelPath() ); - m_mDancePad.LoadMilkshapeAscii("Characters" SLASH "DancePad-DDR.txt"); m_mCharacter.LoadMilkshapeAsciiBones("howtoplay", rndchar->GetHowToPlayAnimationPath() ); m_mCharacter.SetRotationX( 40 ); - m_mDancePad.SetRotationX( 35 ); - m_mCharacter.Command("X,120;Y,300;Zoom,15;RotationY,180;sleep,4.7;linear,1.0;RotationY,360;Zoom,20;X,120;Y,400"); - m_mDancePad.Command("X,40;Y,310;Zoom,15;RotationY,180;sleep,4.7;linear,1.0;RotationY,360;Zoom,20;X,230;Y,390"); + m_mCharacter.Command( CHARACTERONCOMMAND ); } NoteData* pND = new NoteData; @@ -115,9 +129,10 @@ ScreenHowToPlay::ScreenHowToPlay() : ScreenAttract("ScreenHowToPlay") GAMESTATE->m_pCurSong = m_pSong; GAMESTATE->m_bPastHereWeGo = true; GAMESTATE->m_PlayerController[PLAYER_1] = PC_AUTOPLAY; + m_Player.Load( PLAYER_1, pND, &m_LifeMeterBar, NULL, NULL, NULL, NULL, NULL ); - - m_Player.SetX( 480 ); + m_Player.Command( PLAYERONCOMMAND ); + // Don't show judgement GAMESTATE->m_PlayerOptions[PLAYER_1].m_fBlind = 1; GAMESTATE->m_MasterPlayerNumber = PLAYER_1; @@ -129,6 +144,10 @@ ScreenHowToPlay::ScreenHowToPlay() : ScreenAttract("ScreenHowToPlay") m_fFakeSecondsIntoSong = 0; this->ClearMessageQueue(); this->PostScreenMessage( SM_BeginFadingOut, SECONDS_TO_SHOW ); + + this->MoveToTail( &m_Overlay ); + this->MoveToTail( &m_In ); + this->MoveToTail( &m_Out ); } ScreenHowToPlay::~ScreenHowToPlay() @@ -196,12 +215,11 @@ void ScreenHowToPlay::Update( float fDelta ) // if we update at normal speed during a step animation, it is too slow and // doesn't finish in time. rate = 1.8f; - }; - + } } - m_mCharacter.Update(fDelta * rate); - m_mDancePad.Update(fDelta); + m_mCharacter.Update( fDelta * rate ); + m_mDancePad.Update( fDelta ); ScreenAttract::Update( fDelta ); } @@ -219,6 +237,7 @@ void ScreenHowToPlay::HandleScreenMessage( const ScreenMessage SM ) void ScreenHowToPlay::DrawPrimitives() { Screen::DrawPrimitives(); + DISPLAY->SetLighting( true ); DISPLAY->SetLightDirectional( 0, @@ -232,4 +251,8 @@ void ScreenHowToPlay::DrawPrimitives() DISPLAY->SetLightOff( 0 ); DISPLAY->SetLighting( false ); + + m_Overlay.DrawPrimitives(); + m_In.DrawPrimitives(); + m_Out.DrawPrimitives(); } diff --git a/stepmania/src/ScreenHowToPlay.h b/stepmania/src/ScreenHowToPlay.h index 5a180c1f2f..475e76e2af 100644 --- a/stepmania/src/ScreenHowToPlay.h +++ b/stepmania/src/ScreenHowToPlay.h @@ -28,6 +28,7 @@ public: protected: LifeMeterBar m_LifeMeterBar; + BGAnimation m_Overlay; Player m_Player; Model m_mCharacter; Model m_mDancePad;