Now returns to the correct Difficulty on pump music select instead of whatever the first one is...

This commit is contained in:
Andrew Livy
2003-01-21 13:33:56 +00:00
parent a41cba7deb
commit d144d137bb
3 changed files with 45 additions and 20 deletions
+1
View File
@@ -19,6 +19,7 @@ public:
virtual void AddChild( Actor* pActor );
virtual void MoveToTail( Actor* pActor );
virtual void MoveToHead( Actor* pActor );
virtual void MoveToFront( Actor* pActor ) { MoveToHead( pActor ); } // hack! so many things call this... when they really mean move to head.
virtual ~ActorFrame() { }
virtual void Update( float fDeltaTime );
-1
View File
@@ -136,7 +136,6 @@ void MusicBannerWheel::InsertNewBanner(int direction)
scrlistpos = 4 4 0 1 [2] [3] [4] [0] [1] 2 3 4 0 1 2 3 // we lost 2 and got a new one
scrlistpos = 3 3 4 0 [1] [2] [3] [4] [0] 1 2 3 4 0 1 2 // we lost 1 and got a new one
*/
if(currentPos-2 >= 0)
pSong = arraySongs[currentPos-2];
else
+30 -5
View File
@@ -392,6 +392,7 @@ void ScreenEz2SelectMusic::EasierDifficulty( PlayerNumber pn )
if(PREVIEWMUSICMODE == 1 && iConfirmSelection == 1)
{
iConfirmSelection = 0;
m_MusicBannerWheel.StopBouncing();
SOUNDMAN->StopMusic();
}
@@ -408,7 +409,8 @@ void ScreenEz2SelectMusic::EasierDifficulty( PlayerNumber pn )
void ScreenEz2SelectMusic::HarderDifficulty( PlayerNumber pn )
{
if( !GAMESTATE->IsPlayerEnabled(pn) )
if( !GAMESTATE->IsPlayerEnabled(pn
) )
return;
if( m_arrayNotes[pn].empty() )
return;
@@ -424,6 +426,8 @@ void ScreenEz2SelectMusic::HarderDifficulty( PlayerNumber pn )
if(PREVIEWMUSICMODE == 1 && iConfirmSelection == 1)
{
iConfirmSelection = 0;
m_MusicBannerWheel.StopBouncing();
SOUNDMAN->StopMusic();
}
@@ -434,6 +438,7 @@ void ScreenEz2SelectMusic::HarderDifficulty( PlayerNumber pn )
// m_soundChangeNotes.Play();
AfterNotesChange( pn );
}
@@ -461,6 +466,22 @@ void ScreenEz2SelectMusic::MusicChanged()
}
for( int p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled( PlayerNumber(p) ) )
continue;
for( unsigned i=0; i<m_arrayNotes[p].size(); i++ )
{
if( m_arrayNotes[p][i]->GetDifficulty() == GAMESTATE->m_PreferredDifficulty[p] )
{
m_iSelection[p] = i;
break;
}
}
m_iSelection[p] = clamp( m_iSelection[p], 0, int(m_arrayNotes[p].size()) ) ;
}
for( p=0; p<NUM_PLAYERS; p++ )
{
AfterNotesChange( (PlayerNumber)p );
}
@@ -468,14 +489,18 @@ void ScreenEz2SelectMusic::MusicChanged()
void ScreenEz2SelectMusic::AfterNotesChange( PlayerNumber pn )
{
if( !GAMESTATE->IsPlayerEnabled(pn) )
return;
m_iSelection[pn] = clamp( m_iSelection[pn], 0, int(m_arrayNotes[pn].size()-1) ); // bounds clamping
Notes* pNotes = m_arrayNotes[pn].empty()? NULL: m_arrayNotes[pn][m_iSelection[pn]];
if( pNotes != NULL )
GAMESTATE->m_pCurNotes[pn] = pNotes;
if( pNotes != NULL && pn == GAMESTATE->m_MasterPlayerNumber )
m_PumpDifficultyRating.SetText(ssprintf("Lv.%d",pNotes->GetMeter()));
GAMESTATE->m_pCurNotes[pn] = pNotes;
// GAMESTATE->m_pCurNotes[pn] = pNotes;
// Notes* m_pNotes = GAMESTATE->m_pCurNotes[pn];