Split off some functions. Use static members, not free functions.
This commit is contained in:
@@ -23,12 +23,8 @@
|
|||||||
const ScreenMessage SM_NotesEnded = ScreenMessage(SM_User+10); // MUST be same as in ScreenGameplay
|
const ScreenMessage SM_NotesEnded = ScreenMessage(SM_User+10); // MUST be same as in ScreenGameplay
|
||||||
|
|
||||||
|
|
||||||
bool PrepareForJukebox() // always return true.
|
bool ScreenJukebox::SetSong()
|
||||||
{
|
{
|
||||||
// ScreeJukeboxMenu must set this
|
|
||||||
ASSERT( GAMESTATE->m_CurStyle != STYLE_INVALID );
|
|
||||||
GAMESTATE->m_PlayMode = PLAY_MODE_ARCADE;
|
|
||||||
|
|
||||||
vector<Song*> vSongs;
|
vector<Song*> vSongs;
|
||||||
if( GAMESTATE->m_sPreferredGroup == GROUP_ALL_MUSIC )
|
if( GAMESTATE->m_sPreferredGroup == GROUP_ALL_MUSIC )
|
||||||
SONGMAN->GetSongs( vSongs );
|
SONGMAN->GetSongs( vSongs );
|
||||||
@@ -68,9 +64,20 @@ bool PrepareForJukebox() // always return true.
|
|||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
GAMESTATE->m_pCurNotes[p] = pNotes;
|
GAMESTATE->m_pCurNotes[p] = pNotes;
|
||||||
|
|
||||||
break; // done looking
|
return true; // done looking
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ScreenJukebox::PrepareForJukebox() // always return true.
|
||||||
|
{
|
||||||
|
// ScreeJukeboxMenu must set this
|
||||||
|
ASSERT( GAMESTATE->m_CurStyle != STYLE_INVALID );
|
||||||
|
GAMESTATE->m_PlayMode = PLAY_MODE_ARCADE;
|
||||||
|
|
||||||
|
SetSong();
|
||||||
|
|
||||||
ASSERT( GAMESTATE->m_pCurSong );
|
ASSERT( GAMESTATE->m_pCurSong );
|
||||||
|
|
||||||
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
|
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
|
||||||
|
|||||||
@@ -25,11 +25,14 @@ public:
|
|||||||
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
||||||
virtual void HandleScreenMessage( const ScreenMessage SM );
|
virtual void HandleScreenMessage( const ScreenMessage SM );
|
||||||
|
|
||||||
protected:
|
/* Hack: public for JukeboxMenu */
|
||||||
|
static bool SetSong();
|
||||||
|
|
||||||
|
protected:
|
||||||
TransitionBGAnimation m_In;
|
TransitionBGAnimation m_In;
|
||||||
TransitionBGAnimation m_Out;
|
TransitionBGAnimation m_Out;
|
||||||
|
|
||||||
|
static bool PrepareForJukebox();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user