don't load battle components unless PlayMode is battle
This commit is contained in:
@@ -25,20 +25,23 @@
|
||||
|
||||
ActiveItemList::ActiveItemList()
|
||||
{
|
||||
for( int i=0; i<MAX_ACTIVE_ITEMS_LINES; i++ )
|
||||
{
|
||||
m_text[i].LoadFromFont( THEME->GetPathTo("Fonts","Common normal") );
|
||||
m_text[i].SetZoom( TEXT_ZOOM );
|
||||
// m_text[i].SetText( "WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW" );
|
||||
this->AddChild( &m_text[i] );
|
||||
}
|
||||
}
|
||||
|
||||
void ActiveItemList::Init( PlayerNumber pn )
|
||||
{
|
||||
m_PlayerNumber = pn;
|
||||
|
||||
for( int i=0; i<MAX_ACTIVE_ITEMS_LINES; i++ )
|
||||
int i;
|
||||
|
||||
for( i=0; i<MAX_ACTIVE_ITEMS_LINES; i++ )
|
||||
{
|
||||
m_text[i].LoadFromFont( THEME->GetPathTo("Fonts","Common normal") );
|
||||
m_text[i].SetZoom( TEXT_ZOOM );
|
||||
// m_text[i].SetText( "WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW" );
|
||||
this->AddChild( &m_text[i] );
|
||||
}
|
||||
|
||||
for( i=0; i<MAX_ACTIVE_ITEMS_LINES; i++ )
|
||||
{
|
||||
m_text[i].SetHorizAlign( (Actor::HorizAlign)TEXT_HORIZ_ALIGN(pn) );
|
||||
bool bReverse = GAMESTATE->m_PlayerOptions[pn].m_fReverseScroll == 1;
|
||||
|
||||
@@ -50,11 +50,12 @@ void ReloadItems()
|
||||
|
||||
Inventory::Inventory()
|
||||
{
|
||||
ReloadItems();
|
||||
}
|
||||
|
||||
void Inventory::Load( PlayerNumber pn )
|
||||
{
|
||||
ReloadItems();
|
||||
|
||||
m_PlayerNumber = pn;
|
||||
m_iLastSeenCombo = 0;
|
||||
|
||||
|
||||
@@ -229,9 +229,12 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration )
|
||||
|
||||
m_TimingAssist.Load((PlayerNumber)p, &m_Player[p]);
|
||||
|
||||
m_ActiveItemList[p].Init( (PlayerNumber)p );
|
||||
/* Position it in LoadNextSong. */
|
||||
this->AddChild( &m_ActiveItemList[p] );
|
||||
if( GAMESTATE->m_PlayMode == PLAY_MODE_BATTLE )
|
||||
{
|
||||
m_ActiveItemList[p].Init( (PlayerNumber)p );
|
||||
/* Position it in LoadNextSong. */
|
||||
this->AddChild( &m_ActiveItemList[p] );
|
||||
}
|
||||
|
||||
m_sprOniGameOver[p].Load( THEME->GetPathTo("Graphics","ScreenGameplay oni gameover") );
|
||||
m_sprOniGameOver[p].SetX( fPlayerX );
|
||||
@@ -411,11 +414,17 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration )
|
||||
|
||||
for( p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
m_Inventory[p].Load( (PlayerNumber)p );
|
||||
this->AddChild( &m_Inventory[p] );
|
||||
if( GAMESTATE->m_PlayMode==PLAY_MODE_BATTLE )
|
||||
{
|
||||
m_Inventory[p].Load( (PlayerNumber)p );
|
||||
this->AddChild( &m_Inventory[p] );
|
||||
}
|
||||
|
||||
m_RaveHelper[p].Load( (PlayerNumber)p );
|
||||
this->AddChild( &m_RaveHelper[p] );
|
||||
if( GAMESTATE->m_PlayMode==PLAY_MODE_RAVE )
|
||||
{
|
||||
m_RaveHelper[p].Load( (PlayerNumber)p );
|
||||
this->AddChild( &m_RaveHelper[p] );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ ScreenSelectCharacter::ScreenSelectCharacter()
|
||||
{
|
||||
m_iSelectedCharacter[p] = 0;
|
||||
m_iSelectedLevelIndex[p] = 0;
|
||||
if( GAMESTATE->IsPlayerEnabled(p) )
|
||||
if( GAMESTATE->IsHumanPlayer(p) )
|
||||
m_SelectionRow[p] = CHOOSING_HUMAN_CHARACTER;
|
||||
}
|
||||
|
||||
@@ -342,7 +342,8 @@ void ScreenSelectCharacter::MenuStart( PlayerNumber pn )
|
||||
|
||||
bool bAllAreFinished = true;
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
bAllAreFinished &= (m_SelectionRow[p] == FINISHED_CHOOSING);
|
||||
if( GAMESTATE->IsHumanPlayer(p) )
|
||||
bAllAreFinished &= (m_SelectionRow[p] == FINISHED_CHOOSING);
|
||||
|
||||
if( bAllAreFinished )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user