Now returns to the correct Difficulty on pump music select instead of whatever the first one is...
This commit is contained in:
@@ -19,6 +19,7 @@ public:
|
|||||||
virtual void AddChild( Actor* pActor );
|
virtual void AddChild( Actor* pActor );
|
||||||
virtual void MoveToTail( Actor* pActor );
|
virtual void MoveToTail( Actor* pActor );
|
||||||
virtual void MoveToHead( 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 ~ActorFrame() { }
|
||||||
|
|
||||||
virtual void Update( float fDeltaTime );
|
virtual void Update( float fDeltaTime );
|
||||||
|
|||||||
@@ -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 = 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
|
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)
|
if(currentPos-2 >= 0)
|
||||||
pSong = arraySongs[currentPos-2];
|
pSong = arraySongs[currentPos-2];
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -392,6 +392,7 @@ void ScreenEz2SelectMusic::EasierDifficulty( PlayerNumber pn )
|
|||||||
if(PREVIEWMUSICMODE == 1 && iConfirmSelection == 1)
|
if(PREVIEWMUSICMODE == 1 && iConfirmSelection == 1)
|
||||||
{
|
{
|
||||||
iConfirmSelection = 0;
|
iConfirmSelection = 0;
|
||||||
|
m_MusicBannerWheel.StopBouncing();
|
||||||
SOUNDMAN->StopMusic();
|
SOUNDMAN->StopMusic();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -408,7 +409,8 @@ void ScreenEz2SelectMusic::EasierDifficulty( PlayerNumber pn )
|
|||||||
|
|
||||||
void ScreenEz2SelectMusic::HarderDifficulty( PlayerNumber pn )
|
void ScreenEz2SelectMusic::HarderDifficulty( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
if( !GAMESTATE->IsPlayerEnabled(pn) )
|
if( !GAMESTATE->IsPlayerEnabled(pn
|
||||||
|
) )
|
||||||
return;
|
return;
|
||||||
if( m_arrayNotes[pn].empty() )
|
if( m_arrayNotes[pn].empty() )
|
||||||
return;
|
return;
|
||||||
@@ -424,6 +426,8 @@ void ScreenEz2SelectMusic::HarderDifficulty( PlayerNumber pn )
|
|||||||
if(PREVIEWMUSICMODE == 1 && iConfirmSelection == 1)
|
if(PREVIEWMUSICMODE == 1 && iConfirmSelection == 1)
|
||||||
{
|
{
|
||||||
iConfirmSelection = 0;
|
iConfirmSelection = 0;
|
||||||
|
|
||||||
|
m_MusicBannerWheel.StopBouncing();
|
||||||
SOUNDMAN->StopMusic();
|
SOUNDMAN->StopMusic();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -434,6 +438,7 @@ void ScreenEz2SelectMusic::HarderDifficulty( PlayerNumber pn )
|
|||||||
// m_soundChangeNotes.Play();
|
// m_soundChangeNotes.Play();
|
||||||
|
|
||||||
AfterNotesChange( pn );
|
AfterNotesChange( pn );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -461,6 +466,22 @@ void ScreenEz2SelectMusic::MusicChanged()
|
|||||||
}
|
}
|
||||||
|
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
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 );
|
AfterNotesChange( (PlayerNumber)p );
|
||||||
}
|
}
|
||||||
@@ -468,14 +489,18 @@ void ScreenEz2SelectMusic::MusicChanged()
|
|||||||
|
|
||||||
void ScreenEz2SelectMusic::AfterNotesChange( PlayerNumber pn )
|
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]];
|
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()));
|
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];
|
// Notes* m_pNotes = GAMESTATE->m_pCurNotes[pn];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user