Implement the last remaining SampleMusicPreviewMode: StartToPreview. This one requires [ScreenSelectMusic] TwoPartConfirmsOnly=true in the metrics to work correctly.

This commit is contained in:
AJ Kelly
2010-06-23 14:09:43 -05:00
parent 2be759893a
commit cc470cad86
4 changed files with 17 additions and 9 deletions
+6
View File
@@ -9,6 +9,12 @@ Not all changes are documented, for various reasons.
supported but exist anyways.)
_____________________________________________________________________________
20100623
--------
* Implement the last remaining SampleMusicPreviewMode: StartToPreview.
This one requires [ScreenSelectMusic] TwoPartConfirmsOnly=true in the
metrics to work correctly.
20100619
--------
* [HighScore] add GetGrade() Lua binding.
+1 -1
View File
@@ -416,7 +416,7 @@ LuaXType( EditMode );
static const char *SampleMusicPreviewModeNames[] = {
"Normal",
//"StartToPreview",
"StartToPreview",
"ScreenMusic",
"LastSong"
};
+2 -2
View File
@@ -106,7 +106,7 @@ const RString& PlayModeToLocalizedString( PlayMode pm );
PlayMode StringToPlayMode( const RString& s );
LuaDeclareType( PlayMode );
// ziup2 has SortOrder_PinnedMeter (¿qef?)
enum SortOrder
{
// song sorts
@@ -461,7 +461,7 @@ original options from ScreenEz2SelectMusic:
enum SampleMusicPreviewMode
{
SampleMusicPreviewMode_Normal,
//SampleMusicPreviewMode_StartToPreview,
SampleMusicPreviewMode_StartToPreview,
SampleMusicPreviewMode_ScreenMusic,
SampleMusicPreviewMode_LastSong, // continue playing the last song
NUM_SampleMusicPreviewMode,
+8 -6
View File
@@ -990,14 +990,12 @@ void ScreenSelectMusic::MenuStart( const InputEventPlus &input )
// a song was selected
if( m_MusicWheel.GetSelectedSong() != NULL )
{
/*
if(TWO_PART_CONFIRMS_ONLY && SAMPLE_MUSIC_PREVIEW_MODE == SampleMusicPreviewMode_StartToPreview)
{
// start playing the preview music.
g_bSampleMusicWaiting = true;
CheckBackgroundRequests( true );
}
*/
const bool bIsNew = PROFILEMAN->IsSongNew( m_MusicWheel.GetSelectedSong() );
bool bIsHard = false;
@@ -1568,9 +1566,9 @@ void ScreenSelectMusic::AfterMusicChange()
m_fSampleStartSeconds = 0;
m_fSampleLengthSeconds = -1;
break;
//case SampleMusicPreviewMode_StartToPreview:
case SampleMusicPreviewMode_StartToPreview:
// we want to load the sample music, but we don't want to
// actually play it; fall through for now. -aj
// actually play it. fall through. -aj
case SampleMusicPreviewMode_Normal:
case SampleMusicPreviewMode_LastSong: // fall through
// play the sample music
@@ -1654,8 +1652,12 @@ void ScreenSelectMusic::AfterMusicChange()
if( !m_MusicWheel.IsRouletting() && SOUND->GetMusicPath() != m_sSampleMusicToPlay )
{
SOUND->StopMusic();
if( !m_sSampleMusicToPlay.empty() )
g_bSampleMusicWaiting = true;
// some SampleMusicPreviewModes don't want the sample music immediately.
if( SAMPLE_MUSIC_PREVIEW_MODE != SampleMusicPreviewMode_StartToPreview )
{
if( !m_sSampleMusicToPlay.empty() )
g_bSampleMusicWaiting = true;
}
}
g_StartedLoadingAt.Touch();