This commit is contained in:
Fighter19
2015-05-06 10:06:12 +02:00
6 changed files with 102 additions and 19 deletions
+5
View File
@@ -16,6 +16,11 @@ Example:
This means that three strings were added to the "ScreenDebugOverlay" section,
"Mute actions", "Mute actions on", and "Mute actions off".
2015/05/05
----------
* [ScreenGameplay] SkipSongText
2015/04/23
----------
* [OptionExplanations] Display Options
+18
View File
@@ -4,6 +4,24 @@ The StepMania 5 Changelog covers all post-sm-ssc changes. For a list of changes
from StepMania 4 alpha 5 to sm-ssc v1.2.5, see Changelog_sm-ssc.txt.
________________________________________________________________________________
2015/05/05
----------
* [Gameplay] Holding Select on gameplay now skips the current song in course
or endless mode. [kyzentun]
2015/04/30
----------
* [beat] Default key configuration slightly tweaked, space is now the
default scratch key, key7 is now mapped to right instead of key3.
Backwards and shuffle chart mods now ignore the scratch column. [jobn]
2015/04/27
----------
* [general] "Do not show again" button on missing texture dialog works now.
If the background or banner file for a song doesn't exist when the song is
cached, the cache file will have a blank path so Stepmania won't try to
load the nonexistent banner or background.
2015/04/25
----------
* [General] Screenshot key now checks whether there is a current song, and
+1
View File
@@ -1661,6 +1661,7 @@ HeaderText=Final Results
GiveUpAbortedText=Don't give up!
GiveUpStartText=Continue holding &START; to give up
GiveUpBackText=Continue holding &BACK; to give up
SkipSongText=Continue holding &SELECT; to skip song
[ScreenGameplaySyncMachine]
Standard deviation=Standard deviation
+1
View File
@@ -3452,6 +3452,7 @@ AllowCenter1Player=true
FailOnMissCombo=FailCombo()
GivingUpGoesToPrevScreen=false
GivingUpGoesToNextScreen=false
SelectSkipsSong=true
#
MinSecondsToStep=6.0
MinSecondsToMusic=2.0
+70 -19
View File
@@ -337,6 +337,7 @@ void ScreenGameplay::Init()
GIVE_UP_START_TEXT.Load( m_sName, "GiveUpStartText" );
GIVE_UP_BACK_TEXT.Load( m_sName, "GiveUpBackText" );
GIVE_UP_ABORTED_TEXT.Load( m_sName, "GiveUpAbortedText" );
SKIP_SONG_TEXT.Load(m_sName, "SkipSongText");
GIVE_UP_SECONDS.Load( m_sName, "GiveUpSeconds" );
MUSIC_FADE_OUT_SECONDS.Load( m_sName, "MusicFadeOutSeconds" );
OUT_TRANSITION_LENGTH.Load( m_sName, "OutTransitionLength" );
@@ -347,6 +348,7 @@ void ScreenGameplay::Init()
MIN_SECONDS_TO_STEP_NEXT_SONG.Load( m_sName, "MinSecondsToStepNextSong" );
START_GIVES_UP.Load( m_sName, "StartGivesUp" );
BACK_GIVES_UP.Load( m_sName, "BackGivesUp" );
SELECT_SKIPS_SONG.Load(m_sName, "SelectSkipsSong");
GIVING_UP_GOES_TO_PREV_SCREEN.Load( m_sName, "GivingUpGoesToPrevScreen" );
FAIL_ON_MISS_COMBO.Load( m_sName, "FailOnMissCombo" );
ALLOW_CENTER_1_PLAYER.Load( m_sName, "AllowCenter1Player" );
@@ -900,6 +902,7 @@ void ScreenGameplay::Init()
LoadNextSong();
m_GiveUpTimer.SetZero();
m_SkipSongTimer.SetZero();
}
bool ScreenGameplay::Center1Player() const
@@ -1509,7 +1512,7 @@ void ScreenGameplay::PauseGame( bool bPause, GameController gc )
if( bPause && m_DancingState == STATE_OUTRO )
return;
AbortGiveUp( false );
ResetGiveUpTimers(false);
m_bPaused = bPause;
m_PauseController = gc;
@@ -1926,6 +1929,7 @@ void ScreenGameplay::Update( float fDeltaTime )
// update give up
bool bGiveUpTimerFired = !m_GiveUpTimer.IsZero() && m_GiveUpTimer.Ago() > GIVE_UP_SECONDS;
m_gave_up= bGiveUpTimerFired;
m_skipped_song= !m_SkipSongTimer.IsZero() && m_SkipSongTimer.Ago() > GIVE_UP_SECONDS;
bool bAllHumanHaveBigMissCombo = true;
@@ -1942,7 +1946,7 @@ void ScreenGameplay::Update( float fDeltaTime )
{
bAllHumanHaveBigMissCombo = FAIL_ON_MISS_COMBO.GetValue() != -1 && STATSMAN->m_CurStageStats.GetMinimumMissCombo() >= (unsigned int)FAIL_ON_MISS_COMBO;
}
if( bGiveUpTimerFired || bAllHumanHaveBigMissCombo )
if(bGiveUpTimerFired || bAllHumanHaveBigMissCombo || m_skipped_song)
{
STATSMAN->m_CurStageStats.m_bGaveUp = true;
FOREACH_EnabledPlayerNumberInfo( m_vPlayerInfo, pi )
@@ -1951,9 +1955,9 @@ void ScreenGameplay::Update( float fDeltaTime )
pi->GetPlayerStageStats()->m_bDisqualified |= bGiveUpTimerFired; // Don't disqualify if failing for miss combo. The player should still be eligable for a high score on courses.
}
AbortGiveUp( false );
ResetGiveUpTimers(false);
if( GIVING_UP_GOES_TO_PREV_SCREEN )
if(GIVING_UP_GOES_TO_PREV_SCREEN && !m_skipped_song)
{
BeginBackingOutFromGameplay();
}
@@ -2353,7 +2357,7 @@ void ScreenGameplay::SendCrossedMessages()
void ScreenGameplay::BeginBackingOutFromGameplay()
{
m_DancingState = STATE_OUTRO;
AbortGiveUp( false );
ResetGiveUpTimers(false);
m_pSoundMusic->StopPlaying();
m_GameplayAssist.StopPlaying(); // Stop any queued assist ticks.
@@ -2370,21 +2374,45 @@ void ScreenGameplay::BeginBackingOutFromGameplay()
m_Cancel.StartTransitioning( SM_DoPrevScreen );
}
void ScreenGameplay::AbortGiveUpText(bool show_abort_text)
{
m_textDebug.StopTweening();
if(show_abort_text)
{
m_textDebug.SetText(GIVE_UP_ABORTED_TEXT);
}
// otherwise tween out the text that's there
m_textDebug.BeginTweening(1/2.f);
m_textDebug.SetDiffuse(RageColor(1,1,1,0));
}
void ScreenGameplay::AbortSkipSong(bool show_text)
{
if(m_SkipSongTimer.IsZero())
{
return;
}
AbortGiveUpText(show_text);
m_SkipSongTimer.SetZero();
}
void ScreenGameplay::AbortGiveUp( bool bShowText )
{
if( m_GiveUpTimer.IsZero() )
{
return;
m_textDebug.StopTweening();
if( bShowText )
m_textDebug.SetText( GIVE_UP_ABORTED_TEXT );
// otherwise tween out the text that's there
m_textDebug.BeginTweening( 1/2.f );
m_textDebug.SetDiffuse( RageColor(1,1,1,0) );
}
AbortGiveUpText(bShowText);
m_GiveUpTimer.SetZero();
}
void ScreenGameplay::ResetGiveUpTimers(bool show_text)
{
AbortSkipSong(show_text);
AbortGiveUp(show_text);
}
bool ScreenGameplay::Input( const InputEventPlus &input )
{
@@ -2426,6 +2454,22 @@ bool ScreenGameplay::Input( const InputEventPlus &input )
bHoldingGiveUp |= ( START_GIVES_UP && input.MenuI == GAME_BUTTON_START );
bHoldingGiveUp |= ( BACK_GIVES_UP && input.MenuI == GAME_BUTTON_BACK );
}
// Allow holding SELECT to skip the current song in course mode. -Kyz
if(GAMESTATE->IsCourseMode() && SELECT_SKIPS_SONG &&
input.MenuI == GAME_BUTTON_SELECT)
{
if(input.type == IET_RELEASE)
{
AbortSkipSong(true);
}
else if(input.type == IET_FIRST_PRESS && m_SkipSongTimer.IsZero())
{
m_textDebug.SetText(SKIP_SONG_TEXT);
m_textDebug.PlayCommand("StartOn");
m_SkipSongTimer.Touch();
}
return true;
}
if( bHoldingGiveUp )
{
@@ -2508,7 +2552,7 @@ bool ScreenGameplay::Input( const InputEventPlus &input )
// handle a step or battle item activate
if( GAMESTATE->IsHumanPlayer( input.pn ) )
{
AbortGiveUp( true );
ResetGiveUpTimers(true);
if( GamePreferences::m_AutoPlay == PC_HUMAN && GAMESTATE->m_pPlayerState[input.pn]->m_PlayerOptions.GetCurrent().m_fPlayerAutoPlay == 0 )
{
@@ -2665,7 +2709,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
}
else if( SM == SM_NotesEnded ) // received while STATE_DANCING
{
AbortGiveUp( false ); // don't allow giveup while the next song is loading
ResetGiveUpTimers(false); // don't allow giveup while the next song is loading
/* Do this in LoadNextSong, so we don't tween off old attacks until
* m_NextSong finishes. */
@@ -2700,9 +2744,16 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
const bool bIsLastSong = IsLastSong();
LOG->Trace( "bAllReallyFailed = %d, bStopCourseEarly = %d, "
"bIsLastSong = %d, m_gave_up = %d", bAllReallyFailed, bStopCourseEarly,
bIsLastSong, m_gave_up );
"bIsLastSong = %d, m_gave_up = %d, m_skipped_song = %d",
bAllReallyFailed, bStopCourseEarly, bIsLastSong, m_gave_up,
m_skipped_song);
if(!bIsLastSong && m_skipped_song)
{
// Load the next song in the course.
HandleScreenMessage( SM_StartLoadingNextSong );
return;
}
if( bStopCourseEarly || bAllReallyFailed || bIsLastSong || m_gave_up )
{
// Time to leave from ScreenGameplay
@@ -2740,7 +2791,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
if( m_DancingState == STATE_OUTRO ) // ScreenGameplay already ended
return; // ignore
m_DancingState = STATE_OUTRO;
AbortGiveUp( false );
ResetGiveUpTimers(false);
GAMESTATE->RemoveAllActiveAttacks();
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
@@ -2947,7 +2998,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
else if( SM == SM_BeginFailed )
{
m_DancingState = STATE_OUTRO;
AbortGiveUp( false );
ResetGiveUpTimers(false);
m_GameplayAssist.StopPlaying(); // Stop any queued assist ticks.
TweenOffScreen();
m_Failed.StartTransitioning( SM_DoNextScreen );
+7
View File
@@ -193,6 +193,7 @@ protected:
LocalizedString GIVE_UP_START_TEXT;
LocalizedString GIVE_UP_BACK_TEXT;
LocalizedString GIVE_UP_ABORTED_TEXT;
LocalizedString SKIP_SONG_TEXT;
ThemeMetric<float> GIVE_UP_SECONDS;
ThemeMetric<float> MUSIC_FADE_OUT_SECONDS;
ThemeMetric<float> OUT_TRANSITION_LENGTH;
@@ -203,6 +204,7 @@ protected:
ThemeMetric<float> MIN_SECONDS_TO_STEP_NEXT_SONG;
ThemeMetric<bool> START_GIVES_UP;
ThemeMetric<bool> BACK_GIVES_UP;
ThemeMetric<bool> SELECT_SKIPS_SONG;
ThemeMetric<bool> GIVING_UP_GOES_TO_PREV_SCREEN;
/** @brief The miss combo a player needs to fail out of a song. */
ThemeMetric<int> FAIL_ON_MISS_COMBO;
@@ -279,7 +281,12 @@ protected:
RageTimer m_GiveUpTimer;
bool m_gave_up;
RageTimer m_SkipSongTimer;
bool m_skipped_song;
void AbortGiveUpText(bool show_abort_text);
void AbortSkipSong(bool show_text);
void AbortGiveUp( bool bShowText );
void ResetGiveUpTimers(bool show_text);
Transition m_Ready;
Transition m_Go;