We don't know which players are joined until BeginScreen, so always load
assets for both players (fixes preload asserts). This isn't an important optimization point: it's not acceptable for a screen to be so much slower in 2-player than 1-player that this type of optimization would matter. Also, always loading both players will help reduce the chance of code that's too slow in 2-player not being noticed due to only being tested in 1-player.
This commit is contained in:
@@ -299,7 +299,7 @@ void OptionRow::InitText()
|
|||||||
{
|
{
|
||||||
case LAYOUT_SHOW_ONE_IN_ROW:
|
case LAYOUT_SHOW_ONE_IN_ROW:
|
||||||
// init text
|
// init text
|
||||||
FOREACH_HumanPlayer( p )
|
FOREACH_PlayerNumber( p )
|
||||||
{
|
{
|
||||||
BitmapText *bt = new BitmapText( m_pParentType->m_textItemParent );
|
BitmapText *bt = new BitmapText( m_pParentType->m_textItemParent );
|
||||||
m_textItems.push_back( bt );
|
m_textItems.push_back( bt );
|
||||||
@@ -321,7 +321,7 @@ void OptionRow::InitText()
|
|||||||
// init underlines
|
// init underlines
|
||||||
if( m_pParentType->SHOW_UNDERLINES )
|
if( m_pParentType->SHOW_UNDERLINES )
|
||||||
{
|
{
|
||||||
FOREACH_HumanPlayer( p )
|
FOREACH_PlayerNumber( p )
|
||||||
{
|
{
|
||||||
OptionsCursor *ul = new OptionsCursor( m_pParentType->m_UnderlineParent );
|
OptionsCursor *ul = new OptionsCursor( m_pParentType->m_UnderlineParent );
|
||||||
m_Underline[p].push_back( ul );
|
m_Underline[p].push_back( ul );
|
||||||
@@ -359,7 +359,7 @@ void OptionRow::InitText()
|
|||||||
// init underlines
|
// init underlines
|
||||||
if( m_pParentType->SHOW_UNDERLINES )
|
if( m_pParentType->SHOW_UNDERLINES )
|
||||||
{
|
{
|
||||||
FOREACH_HumanPlayer( p )
|
FOREACH_PlayerNumber( p )
|
||||||
{
|
{
|
||||||
OptionsCursor *ul = new OptionsCursor( m_pParentType->m_UnderlineParent );
|
OptionsCursor *ul = new OptionsCursor( m_pParentType->m_UnderlineParent );
|
||||||
m_Underline[p].push_back( ul );
|
m_Underline[p].push_back( ul );
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ void ScreenOptions::Init()
|
|||||||
m_framePage.AddChild( m_sprPage );
|
m_framePage.AddChild( m_sprPage );
|
||||||
|
|
||||||
// init line line highlights
|
// init line line highlights
|
||||||
FOREACH_HumanPlayer( p )
|
FOREACH_PlayerNumber( p )
|
||||||
{
|
{
|
||||||
m_sprLineHighlight[p].Load( THEME->GetPathG(m_sName,"line highlight") );
|
m_sprLineHighlight[p].Load( THEME->GetPathG(m_sName,"line highlight") );
|
||||||
m_sprLineHighlight[p].SetName( "LineHighlight" );
|
m_sprLineHighlight[p].SetName( "LineHighlight" );
|
||||||
@@ -133,7 +133,7 @@ void ScreenOptions::Init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// init cursors
|
// init cursors
|
||||||
FOREACH_HumanPlayer( p )
|
FOREACH_PlayerNumber( p )
|
||||||
{
|
{
|
||||||
m_Cursor[p].Load( m_sName, OptionsCursor::cursor );
|
m_Cursor[p].Load( m_sName, OptionsCursor::cursor );
|
||||||
m_Cursor[p].Set( p );
|
m_Cursor[p].Set( p );
|
||||||
|
|||||||
Reference in New Issue
Block a user