Add GiveUpGoesToNextScreen. Used in workout so that giving up doesn't loose everything you've done in the stage so far.
This commit is contained in:
@@ -1188,6 +1188,7 @@ PlayerP2TwoPlayersTwoSidesX=SCREEN_CENTER_X+160
|
|||||||
PlayerP1OnePlayerTwoSidesX=SCREEN_CENTER_X
|
PlayerP1OnePlayerTwoSidesX=SCREEN_CENTER_X
|
||||||
PlayerP2OnePlayerTwoSidesX=SCREEN_CENTER_X
|
PlayerP2OnePlayerTwoSidesX=SCREEN_CENTER_X
|
||||||
StopCourseEarly=0
|
StopCourseEarly=0
|
||||||
|
GivingUpGoesToNextScreen=0
|
||||||
|
|
||||||
[ScreenGameplayExtra]
|
[ScreenGameplayExtra]
|
||||||
Class=ScreenGameplay
|
Class=ScreenGameplay
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ AutoScreenMessage( SM_SaveChangedBeforeGoingBack )
|
|||||||
AutoScreenMessage( SM_GoToScreenAfterBack )
|
AutoScreenMessage( SM_GoToScreenAfterBack )
|
||||||
|
|
||||||
AutoScreenMessage( SM_BeginFailed )
|
AutoScreenMessage( SM_BeginFailed )
|
||||||
|
AutoScreenMessage( SM_LeaveGameplay )
|
||||||
|
|
||||||
// received while STATE_INTRO
|
// received while STATE_INTRO
|
||||||
AutoScreenMessage( SM_StartHereWeGo )
|
AutoScreenMessage( SM_StartHereWeGo )
|
||||||
@@ -95,6 +96,7 @@ ScreenGameplay::ScreenGameplay( CString sName ) : ScreenWithMenuElements(sName)
|
|||||||
START_GIVES_UP.Load( sName, "StartGivesUp" );
|
START_GIVES_UP.Load( sName, "StartGivesUp" );
|
||||||
BACK_GIVES_UP.Load( sName, "BackGivesUp" );
|
BACK_GIVES_UP.Load( sName, "BackGivesUp" );
|
||||||
GIVING_UP_FAILS.Load( sName, "GivingUpFails" );
|
GIVING_UP_FAILS.Load( sName, "GivingUpFails" );
|
||||||
|
GIVING_UP_GOES_TO_NEXT_SCREEN.Load( sName, "GivingUpGoesToNextScreen" );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenGameplay::Init()
|
void ScreenGameplay::Init()
|
||||||
@@ -1523,6 +1525,11 @@ void ScreenGameplay::Update( float fDeltaTime )
|
|||||||
|
|
||||||
this->PostScreenMessage( SM_NotesEnded, 0 );
|
this->PostScreenMessage( SM_NotesEnded, 0 );
|
||||||
}
|
}
|
||||||
|
else if( GIVING_UP_GOES_TO_NEXT_SCREEN )
|
||||||
|
{
|
||||||
|
HandleScreenMessage( SM_LeaveGameplay );
|
||||||
|
return;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BackOutFromGameplay();
|
BackOutFromGameplay();
|
||||||
@@ -2129,7 +2136,22 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
if( bStopCourseEarly || bAllReallyFailed || bIsLastSong )
|
if( bStopCourseEarly || bAllReallyFailed || bIsLastSong )
|
||||||
{
|
{
|
||||||
// Time to leave from ScreenGameplay
|
// Time to leave from ScreenGameplay
|
||||||
|
HandleScreenMessage( SM_LeaveGameplay );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Load the next song in the course. First, fade out and stop the music. */
|
||||||
|
float fFadeLengthSeconds = MUSIC_FADE_OUT_SECONDS;
|
||||||
|
RageSoundParams p = m_pSoundMusic->GetParams();
|
||||||
|
p.m_FadeLength = fFadeLengthSeconds;
|
||||||
|
p.m_LengthSeconds = GAMESTATE->m_fMusicSeconds + fFadeLengthSeconds;
|
||||||
|
m_pSoundMusic->SetParams(p);
|
||||||
|
SCREENMAN->PostMessageToTopScreen( SM_StartLoadingNextSong, fFadeLengthSeconds );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if( SM == SM_LeaveGameplay )
|
||||||
|
{
|
||||||
// update dancing characters for win / lose
|
// update dancing characters for win / lose
|
||||||
DancingCharacters *Dancers = m_SongBackground.GetDancingCharacters();
|
DancingCharacters *Dancers = m_SongBackground.GetDancingCharacters();
|
||||||
if( Dancers )
|
if( Dancers )
|
||||||
@@ -2158,6 +2180,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
|
|
||||||
LIGHTSMAN->SetLightsMode( LIGHTSMODE_ALL_CLEARED );
|
LIGHTSMAN->SetLightsMode( LIGHTSMODE_ALL_CLEARED );
|
||||||
|
|
||||||
|
bool bAllReallyFailed = STATSMAN->m_CurStageStats.AllFailed();
|
||||||
|
|
||||||
if( bAllReallyFailed )
|
if( bAllReallyFailed )
|
||||||
{
|
{
|
||||||
@@ -2200,18 +2223,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
|
|
||||||
SOUND->PlayOnceFromAnnouncer( "gameplay cleared" );
|
SOUND->PlayOnceFromAnnouncer( "gameplay cleared" );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Load the next song in the course. First, fade out and stop the music. */
|
|
||||||
float fFadeLengthSeconds = MUSIC_FADE_OUT_SECONDS;
|
|
||||||
RageSoundParams p = m_pSoundMusic->GetParams();
|
|
||||||
p.m_FadeLength = fFadeLengthSeconds;
|
|
||||||
p.m_LengthSeconds = GAMESTATE->m_fMusicSeconds + fFadeLengthSeconds;
|
|
||||||
m_pSoundMusic->SetParams(p);
|
|
||||||
SCREENMAN->PostMessageToTopScreen( SM_StartLoadingNextSong, fFadeLengthSeconds );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if( SM == SM_StartLoadingNextSong )
|
else if( SM == SM_StartLoadingNextSong )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ protected:
|
|||||||
ThemeMetric<bool> START_GIVES_UP;
|
ThemeMetric<bool> START_GIVES_UP;
|
||||||
ThemeMetric<bool> BACK_GIVES_UP;
|
ThemeMetric<bool> BACK_GIVES_UP;
|
||||||
ThemeMetric<bool> GIVING_UP_FAILS;
|
ThemeMetric<bool> GIVING_UP_FAILS;
|
||||||
|
ThemeMetric<bool> GIVING_UP_GOES_TO_NEXT_SCREEN;
|
||||||
|
|
||||||
void TweenOnScreen();
|
void TweenOnScreen();
|
||||||
void TweenOffScreen();
|
void TweenOffScreen();
|
||||||
|
|||||||
Reference in New Issue
Block a user