remove unused, tried to do some work with section music, but no go.
This commit is contained in:
@@ -34,17 +34,11 @@ AutoScreenMessage( SM_SongChanged )
|
|||||||
AutoScreenMessage( SM_UsersUpdate )
|
AutoScreenMessage( SM_UsersUpdate )
|
||||||
AutoScreenMessage( SM_BackFromPlayerOptions )
|
AutoScreenMessage( SM_BackFromPlayerOptions )
|
||||||
|
|
||||||
// todo: metric this?
|
|
||||||
const RString AllGroups = "[ALL MUSIC]";
|
|
||||||
|
|
||||||
#define DIFFBG_WIDTH THEME->GetMetricF(m_sName,"DiffBGWidth")
|
|
||||||
#define DIFFBG_HEIGHT THEME->GetMetricF(m_sName,"DiffBGHeight")
|
|
||||||
|
|
||||||
REGISTER_SCREEN_CLASS( ScreenNetSelectMusic );
|
REGISTER_SCREEN_CLASS( ScreenNetSelectMusic );
|
||||||
|
|
||||||
void ScreenNetSelectMusic::Init()
|
void ScreenNetSelectMusic::Init()
|
||||||
{
|
{
|
||||||
/* Finish any previous stage. It's OK to call this when we haven't played a stage yet. */
|
// Finish any previous stage. It's OK to call this when we haven't played a stage yet.
|
||||||
GAMESTATE->FinishStage();
|
GAMESTATE->FinishStage();
|
||||||
|
|
||||||
ScreenNetSelectBase::Init();
|
ScreenNetSelectBase::Init();
|
||||||
@@ -78,14 +72,14 @@ void ScreenNetSelectMusic::Init()
|
|||||||
this->AddChild( &m_MusicWheel );
|
this->AddChild( &m_MusicWheel );
|
||||||
this->MoveToHead( &m_MusicWheel );
|
this->MoveToHead( &m_MusicWheel );
|
||||||
|
|
||||||
// todo: lua me?
|
// todo: handle me theme-side -aj
|
||||||
m_BPMDisplay.SetName( "BPMDisplay" );
|
m_BPMDisplay.SetName( "BPMDisplay" );
|
||||||
m_BPMDisplay.LoadFromFont( THEME->GetPathF("BPMDisplay","bpm") );
|
m_BPMDisplay.LoadFromFont( THEME->GetPathF("BPMDisplay","bpm") );
|
||||||
m_BPMDisplay.Load();
|
m_BPMDisplay.Load();
|
||||||
LOAD_ALL_COMMANDS_AND_SET_XY_AND_ON_COMMAND( m_BPMDisplay );
|
LOAD_ALL_COMMANDS_AND_SET_XY_AND_ON_COMMAND( m_BPMDisplay );
|
||||||
this->AddChild( &m_BPMDisplay );
|
this->AddChild( &m_BPMDisplay );
|
||||||
|
|
||||||
// todo: lua me
|
// todo: handle me theme-side -aj
|
||||||
FOREACH_EnabledPlayer( p )
|
FOREACH_EnabledPlayer( p )
|
||||||
{
|
{
|
||||||
m_ModIconRow[p].SetName( ssprintf("ModIconsP%d",p+1) );
|
m_ModIconRow[p].SetName( ssprintf("ModIconsP%d",p+1) );
|
||||||
@@ -114,7 +108,7 @@ void ScreenNetSelectMusic::Input( const InputEventPlus &input )
|
|||||||
if( !m_bAllowInput || IsTransitioning() )
|
if( !m_bAllowInput || IsTransitioning() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( input.type == IET_RELEASE )
|
if( input.type == IET_RELEASE )
|
||||||
{
|
{
|
||||||
m_MusicWheel.Move(0);
|
m_MusicWheel.Move(0);
|
||||||
return;
|
return;
|
||||||
@@ -126,21 +120,22 @@ void ScreenNetSelectMusic::Input( const InputEventPlus &input )
|
|||||||
bool bHoldingCtrl =
|
bool bHoldingCtrl =
|
||||||
INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, KEY_LCTRL)) ||
|
INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, KEY_LCTRL)) ||
|
||||||
INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, KEY_RCTRL)) ||
|
INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, KEY_RCTRL)) ||
|
||||||
(!NSMAN->useSMserver); //If we are disconnected, assume no chatting
|
(!NSMAN->useSMserver); //If we are disconnected, assume no chatting
|
||||||
|
|
||||||
wchar_t c = INPUTMAN->DeviceInputToChar(input.DeviceI,false);
|
wchar_t c = INPUTMAN->DeviceInputToChar(input.DeviceI,false);
|
||||||
MakeUpper( &c, 1 );
|
MakeUpper( &c, 1 );
|
||||||
|
|
||||||
if ( bHoldingCtrl && ( c >= 'A' ) && ( c <= 'Z' ) )
|
// Ctrl+[A-Z] to go to that letter of the alphabet
|
||||||
|
if( bHoldingCtrl && ( c >= 'A' ) && ( c <= 'Z' ) )
|
||||||
{
|
{
|
||||||
SortOrder so = GAMESTATE->m_SortOrder;
|
SortOrder so = GAMESTATE->m_SortOrder;
|
||||||
if ( ( so != SORT_TITLE ) && ( so != SORT_ARTIST ) )
|
if( ( so != SORT_TITLE ) && ( so != SORT_ARTIST ) )
|
||||||
{
|
{
|
||||||
so = SORT_TITLE;
|
so = SORT_TITLE;
|
||||||
|
|
||||||
GAMESTATE->m_PreferredSortOrder = so;
|
GAMESTATE->m_PreferredSortOrder = so;
|
||||||
GAMESTATE->m_SortOrder.Set( so );
|
GAMESTATE->m_SortOrder.Set( so );
|
||||||
//Odd, changing the sort order requires us to call SetOpenSection more than once
|
// Odd, changing the sort order requires us to call SetOpenSection more than once
|
||||||
m_MusicWheel.ChangeSort( so );
|
m_MusicWheel.ChangeSort( so );
|
||||||
m_MusicWheel.SetOpenSection( ssprintf("%c", c ) );
|
m_MusicWheel.SetOpenSection( ssprintf("%c", c ) );
|
||||||
}
|
}
|
||||||
@@ -179,9 +174,9 @@ void ScreenNetSelectMusic::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
//you can chose which copy to play.
|
//you can chose which copy to play.
|
||||||
Song* CurSong = m_MusicWheel.GetSelectedSong();
|
Song* CurSong = m_MusicWheel.GetSelectedSong();
|
||||||
|
|
||||||
if (CurSong != NULL )
|
if(CurSong != NULL )
|
||||||
|
|
||||||
if ( ( !CurSong->GetTranslitArtist().CompareNoCase( NSMAN->m_sArtist ) ) &&
|
if( ( !CurSong->GetTranslitArtist().CompareNoCase( NSMAN->m_sArtist ) ) &&
|
||||||
( !CurSong->GetTranslitMainTitle().CompareNoCase( NSMAN->m_sMainTitle ) ) &&
|
( !CurSong->GetTranslitMainTitle().CompareNoCase( NSMAN->m_sMainTitle ) ) &&
|
||||||
( !CurSong->GetTranslitSubTitle().CompareNoCase( NSMAN->m_sSubTitle ) ) )
|
( !CurSong->GetTranslitSubTitle().CompareNoCase( NSMAN->m_sSubTitle ) ) )
|
||||||
{
|
{
|
||||||
@@ -204,7 +199,7 @@ void ScreenNetSelectMusic::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
for( i=0; i < AllSongs.size(); i++ )
|
for( i=0; i < AllSongs.size(); i++ )
|
||||||
{
|
{
|
||||||
m_cSong = AllSongs[i];
|
m_cSong = AllSongs[i];
|
||||||
if ( ( !m_cSong->GetTranslitArtist().CompareNoCase( NSMAN->m_sArtist ) ) &&
|
if( ( !m_cSong->GetTranslitArtist().CompareNoCase( NSMAN->m_sArtist ) ) &&
|
||||||
( !m_cSong->GetTranslitMainTitle().CompareNoCase( NSMAN->m_sMainTitle ) ) &&
|
( !m_cSong->GetTranslitMainTitle().CompareNoCase( NSMAN->m_sMainTitle ) ) &&
|
||||||
( !m_cSong->GetTranslitSubTitle().CompareNoCase( NSMAN->m_sSubTitle ) ) )
|
( !m_cSong->GetTranslitSubTitle().CompareNoCase( NSMAN->m_sSubTitle ) ) )
|
||||||
break;
|
break;
|
||||||
@@ -218,9 +213,9 @@ void ScreenNetSelectMusic::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
StartSelectedSong();
|
StartSelectedSong();
|
||||||
break;
|
break;
|
||||||
case 2: //We need to do cmd 1 as well here
|
case 2: //We need to do cmd 1 as well here
|
||||||
if (haveSong)
|
if(haveSong)
|
||||||
{
|
{
|
||||||
if (!m_MusicWheel.SelectSong( m_cSong ) )
|
if(!m_MusicWheel.SelectSong( m_cSong ) )
|
||||||
{
|
{
|
||||||
m_MusicWheel.ChangeSort( SORT_GROUP );
|
m_MusicWheel.ChangeSort( SORT_GROUP );
|
||||||
m_MusicWheel.FinishTweening();
|
m_MusicWheel.FinishTweening();
|
||||||
@@ -234,9 +229,9 @@ void ScreenNetSelectMusic::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1: //Scroll to song as well
|
case 1: //Scroll to song as well
|
||||||
if (haveSong)
|
if(haveSong)
|
||||||
{
|
{
|
||||||
if (!m_MusicWheel.SelectSong( m_cSong ) )
|
if(!m_MusicWheel.SelectSong( m_cSong ) )
|
||||||
{
|
{
|
||||||
//m_MusicWheel.ChangeSort( SORT_GROUP );
|
//m_MusicWheel.ChangeSort( SORT_GROUP );
|
||||||
//m_MusicWheel.FinishTweening();
|
//m_MusicWheel.FinishTweening();
|
||||||
@@ -252,14 +247,14 @@ void ScreenNetSelectMusic::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
}
|
}
|
||||||
//don't break here
|
//don't break here
|
||||||
case 0: //See if client has song
|
case 0: //See if client has song
|
||||||
if (haveSong)
|
if(haveSong)
|
||||||
NSMAN->m_iSelectMode = 0;
|
NSMAN->m_iSelectMode = 0;
|
||||||
else
|
else
|
||||||
NSMAN->m_iSelectMode = 1;
|
NSMAN->m_iSelectMode = 1;
|
||||||
NSMAN->SelectUserSong();
|
NSMAN->SelectUserSong();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( SM == SM_SetWheelSong ) //After we're done the sort on wheel, select song.
|
else if( SM == SM_SetWheelSong ) // After we're done the sort on wheel, select song.
|
||||||
{
|
{
|
||||||
m_MusicWheel.SelectSong( m_cSong );
|
m_MusicWheel.SelectSong( m_cSong );
|
||||||
}
|
}
|
||||||
@@ -289,7 +284,7 @@ void ScreenNetSelectMusic::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
}
|
}
|
||||||
else if( SM == SM_SMOnlinePack )
|
else if( SM == SM_SMOnlinePack )
|
||||||
{
|
{
|
||||||
if ( NSMAN->m_SMOnlinePacket.Read1() == 1 )
|
if( NSMAN->m_SMOnlinePacket.Read1() == 1 )
|
||||||
{
|
{
|
||||||
switch ( NSMAN->m_SMOnlinePacket.Read1() )
|
switch ( NSMAN->m_SMOnlinePacket.Read1() )
|
||||||
{
|
{
|
||||||
@@ -298,7 +293,7 @@ void ScreenNetSelectMusic::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
RString titleSub;
|
RString titleSub;
|
||||||
titleSub = NSMAN->m_SMOnlinePacket.ReadNT() + "\n";
|
titleSub = NSMAN->m_SMOnlinePacket.ReadNT() + "\n";
|
||||||
titleSub += NSMAN->m_SMOnlinePacket.ReadNT();
|
titleSub += NSMAN->m_SMOnlinePacket.ReadNT();
|
||||||
if ( NSMAN->m_SMOnlinePacket.Read1() != 1 )
|
if( NSMAN->m_SMOnlinePacket.Read1() != 1 )
|
||||||
{
|
{
|
||||||
RString SMOnlineSelectScreen = THEME->GetMetric( m_sName, "RoomSelectScreen" );
|
RString SMOnlineSelectScreen = THEME->GetMetric( m_sName, "RoomSelectScreen" );
|
||||||
SCREENMAN->SetNewScreen( SMOnlineSelectScreen );
|
SCREENMAN->SetNewScreen( SMOnlineSelectScreen );
|
||||||
@@ -322,7 +317,7 @@ void ScreenNetSelectMusic::MenuLeft( const InputEventPlus &input )
|
|||||||
bool bRightPressed = INPUTMAPPER->IsBeingPressed( GAME_BUTTON_RIGHT, pn );
|
bool bRightPressed = INPUTMAPPER->IsBeingPressed( GAME_BUTTON_RIGHT, pn );
|
||||||
bool bLeftAndRightPressed = bLeftPressed && bRightPressed;
|
bool bLeftAndRightPressed = bLeftPressed && bRightPressed;
|
||||||
|
|
||||||
if ( bLeftAndRightPressed )
|
if( bLeftAndRightPressed )
|
||||||
m_MusicWheel.ChangeSort( SORT_MODE_MENU );
|
m_MusicWheel.ChangeSort( SORT_MODE_MENU );
|
||||||
else
|
else
|
||||||
m_MusicWheel.Move( -1 );
|
m_MusicWheel.Move( -1 );
|
||||||
@@ -336,7 +331,7 @@ void ScreenNetSelectMusic::MenuRight( const InputEventPlus &input )
|
|||||||
bool bRightPressed = INPUTMAPPER->IsBeingPressed( GAME_BUTTON_RIGHT, pn );
|
bool bRightPressed = INPUTMAPPER->IsBeingPressed( GAME_BUTTON_RIGHT, pn );
|
||||||
bool bLeftAndRightPressed = bLeftPressed && bRightPressed;
|
bool bLeftAndRightPressed = bLeftPressed && bRightPressed;
|
||||||
|
|
||||||
if ( bLeftAndRightPressed )
|
if( bLeftAndRightPressed )
|
||||||
m_MusicWheel.ChangeSort( SORT_MODE_MENU );
|
m_MusicWheel.ChangeSort( SORT_MODE_MENU );
|
||||||
else
|
else
|
||||||
m_MusicWheel.Move( +1 );
|
m_MusicWheel.Move( +1 );
|
||||||
@@ -357,16 +352,16 @@ void ScreenNetSelectMusic::MenuDown( const InputEventPlus &input )
|
|||||||
// I agree, that's a stupid idea -aj
|
// I agree, that's a stupid idea -aj
|
||||||
|
|
||||||
PlayerNumber pn = input.pn;
|
PlayerNumber pn = input.pn;
|
||||||
if ( GAMESTATE->IsPlayerEnabled( PLAYER_2 ) &&
|
if( GAMESTATE->IsPlayerEnabled( PLAYER_2 ) &&
|
||||||
!GAMESTATE->IsPlayerEnabled( PLAYER_1 ) )
|
!GAMESTATE->IsPlayerEnabled( PLAYER_1 ) )
|
||||||
pn = PLAYER_2;
|
pn = PLAYER_2;
|
||||||
|
|
||||||
if ( GAMESTATE->m_pCurSong == NULL )
|
if( GAMESTATE->m_pCurSong == NULL )
|
||||||
return;
|
return;
|
||||||
StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType;
|
StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType;
|
||||||
vector <Steps *> MultiSteps;
|
vector <Steps *> MultiSteps;
|
||||||
MultiSteps = GAMESTATE->m_pCurSong->GetStepsByStepsType( st );
|
MultiSteps = GAMESTATE->m_pCurSong->GetStepsByStepsType( st );
|
||||||
if (MultiSteps.size() == 0)
|
if(MultiSteps.size() == 0)
|
||||||
m_DC[pn] = NUM_Difficulty;
|
m_DC[pn] = NUM_Difficulty;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -374,26 +369,26 @@ void ScreenNetSelectMusic::MenuDown( const InputEventPlus &input )
|
|||||||
|
|
||||||
bool dcs[NUM_Difficulty];
|
bool dcs[NUM_Difficulty];
|
||||||
|
|
||||||
for ( i=0; i<NUM_Difficulty; ++i )
|
for( i=0; i<NUM_Difficulty; ++i )
|
||||||
dcs[i] = false;
|
dcs[i] = false;
|
||||||
|
|
||||||
for ( i=0; i<(int)MultiSteps.size(); ++i )
|
for( i=0; i<(int)MultiSteps.size(); ++i )
|
||||||
dcs[MultiSteps[i]->GetDifficulty()] = true;
|
dcs[MultiSteps[i]->GetDifficulty()] = true;
|
||||||
|
|
||||||
for ( i=0; i<NUM_Difficulty; ++i )
|
for( i=0; i<NUM_Difficulty; ++i )
|
||||||
{
|
{
|
||||||
if ( (dcs[i]) && (i > m_DC[pn]) )
|
if( (dcs[i]) && (i > m_DC[pn]) )
|
||||||
{
|
{
|
||||||
m_DC[pn] = (Difficulty)i;
|
m_DC[pn] = (Difficulty)i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If failed to go up, loop
|
// If failed to go up, loop
|
||||||
if ( i == NUM_Difficulty )
|
if( i == NUM_Difficulty )
|
||||||
{
|
{
|
||||||
for (i = 0;i<NUM_Difficulty;i++)
|
for(i = 0;i<NUM_Difficulty;i++)
|
||||||
{
|
{
|
||||||
if (dcs[i])
|
if(dcs[i])
|
||||||
{
|
{
|
||||||
m_DC[pn] = (Difficulty)i;
|
m_DC[pn] = (Difficulty)i;
|
||||||
break;
|
break;
|
||||||
@@ -413,23 +408,22 @@ void ScreenNetSelectMusic::MenuStart( const InputEventPlus &input )
|
|||||||
if( !bResult )
|
if( !bResult )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( m_MusicWheel.GetSelectedType() != TYPE_SONG )
|
if( m_MusicWheel.GetSelectedType() != TYPE_SONG )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Song * pSong = m_MusicWheel.GetSelectedSong();
|
Song * pSong = m_MusicWheel.GetSelectedSong();
|
||||||
|
|
||||||
if ( pSong == NULL )
|
if( pSong == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GAMESTATE->m_pCurSong.Set( pSong );
|
GAMESTATE->m_pCurSong.Set( pSong );
|
||||||
|
|
||||||
if ( NSMAN->useSMserver )
|
if( NSMAN->useSMserver )
|
||||||
{
|
{
|
||||||
//int j = m_iSongNum % m_vSongs.size();
|
|
||||||
NSMAN->m_sArtist = pSong->GetTranslitArtist();
|
NSMAN->m_sArtist = pSong->GetTranslitArtist();
|
||||||
NSMAN->m_sMainTitle = pSong->GetTranslitMainTitle();
|
NSMAN->m_sMainTitle = pSong->GetTranslitMainTitle();
|
||||||
NSMAN->m_sSubTitle = pSong->GetTranslitSubTitle();
|
NSMAN->m_sSubTitle = pSong->GetTranslitSubTitle();
|
||||||
NSMAN->m_iSelectMode = 2; //Command for user selecting song
|
NSMAN->m_iSelectMode = 2; // Command for user selecting song
|
||||||
NSMAN->SelectUserSong ();
|
NSMAN->SelectUserSong ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -444,7 +438,6 @@ void ScreenNetSelectMusic::MenuBack( const InputEventPlus &input )
|
|||||||
Cancel( SM_GoToPrevScreen );
|
Cancel( SM_GoToPrevScreen );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ScreenNetSelectMusic::TweenOffScreen()
|
void ScreenNetSelectMusic::TweenOffScreen()
|
||||||
{
|
{
|
||||||
ScreenNetSelectBase::TweenOffScreen();
|
ScreenNetSelectBase::TweenOffScreen();
|
||||||
@@ -480,7 +473,7 @@ void ScreenNetSelectMusic::StartSelectedSong()
|
|||||||
GAMESTATE->m_PreferredSortOrder = GAMESTATE->m_SortOrder;
|
GAMESTATE->m_PreferredSortOrder = GAMESTATE->m_SortOrder;
|
||||||
GAMESTATE->m_pPreferredSong = pSong;
|
GAMESTATE->m_pPreferredSong = pSong;
|
||||||
|
|
||||||
//force event mode
|
// force event mode
|
||||||
GAMESTATE->m_bTemporaryEventMode = true;
|
GAMESTATE->m_bTemporaryEventMode = true;
|
||||||
|
|
||||||
TweenOffScreen();
|
TweenOffScreen();
|
||||||
@@ -489,14 +482,14 @@ void ScreenNetSelectMusic::StartSelectedSong()
|
|||||||
|
|
||||||
void ScreenNetSelectMusic::UpdateDifficulties( PlayerNumber pn )
|
void ScreenNetSelectMusic::UpdateDifficulties( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
if ( GAMESTATE->m_pCurSong == NULL )
|
if( GAMESTATE->m_pCurSong == NULL )
|
||||||
{
|
{
|
||||||
m_StepsDisplays[pn].SetFromStepsTypeAndMeterAndDifficultyAndCourseType( StepsType_Invalid, 0, Difficulty_Beginner, CourseType_Invalid );
|
m_StepsDisplays[pn].SetFromStepsTypeAndMeterAndDifficultyAndCourseType( StepsType_Invalid, 0, Difficulty_Beginner, CourseType_Invalid );
|
||||||
//m_DifficultyIcon[pn].SetFromSteps( pn, NULL ); //It will blank it out
|
//m_DifficultyIcon[pn].SetFromSteps( pn, NULL ); //It will blank it out
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_DC[pn] < Difficulty_Edit && m_DC[pn] >= Difficulty_Beginner )
|
if( m_DC[pn] < Difficulty_Edit && m_DC[pn] >= Difficulty_Beginner )
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
m_DifficultyIcon[pn].SetPlayer( pn );
|
m_DifficultyIcon[pn].SetPlayer( pn );
|
||||||
@@ -513,7 +506,7 @@ void ScreenNetSelectMusic::UpdateDifficulties( PlayerNumber pn )
|
|||||||
Steps * pSteps = SongUtil::GetStepsByDifficulty( GAMESTATE->m_pCurSong, st, m_DC[pn] );
|
Steps * pSteps = SongUtil::GetStepsByDifficulty( GAMESTATE->m_pCurSong, st, m_DC[pn] );
|
||||||
GAMESTATE->m_pCurSteps[pn].Set( pSteps );
|
GAMESTATE->m_pCurSteps[pn].Set( pSteps );
|
||||||
|
|
||||||
if ( ( m_DC[pn] < NUM_Difficulty ) && ( m_DC[pn] >= Difficulty_Beginner ) )
|
if( ( m_DC[pn] < NUM_Difficulty ) && ( m_DC[pn] >= Difficulty_Beginner ) )
|
||||||
m_StepsDisplays[pn].SetFromSteps( pSteps );
|
m_StepsDisplays[pn].SetFromSteps( pSteps );
|
||||||
else
|
else
|
||||||
m_StepsDisplays[pn].SetFromStepsTypeAndMeterAndDifficultyAndCourseType( StepsType_Invalid, 0, Difficulty_Beginner, CourseType_Invalid );
|
m_StepsDisplays[pn].SetFromStepsTypeAndMeterAndDifficultyAndCourseType( StepsType_Invalid, 0, Difficulty_Beginner, CourseType_Invalid );
|
||||||
@@ -521,14 +514,15 @@ void ScreenNetSelectMusic::UpdateDifficulties( PlayerNumber pn )
|
|||||||
|
|
||||||
void ScreenNetSelectMusic::MusicChanged()
|
void ScreenNetSelectMusic::MusicChanged()
|
||||||
{
|
{
|
||||||
if ( GAMESTATE->m_pCurSong == NULL )
|
if( GAMESTATE->m_pCurSong == NULL )
|
||||||
{
|
{
|
||||||
m_BPMDisplay.NoBPM();
|
m_BPMDisplay.NoBPM();
|
||||||
FOREACH_EnabledPlayer (pn)
|
FOREACH_EnabledPlayer (pn)
|
||||||
UpdateDifficulties( pn );
|
UpdateDifficulties( pn );
|
||||||
|
|
||||||
SOUND->StopMusic();
|
SOUND->StopMusic();
|
||||||
// xxx: it should play the menu music instead. -aj
|
// todo: handle playing section music correctly. -aj
|
||||||
|
// SOUND->PlayMusic( m_sSectionMusicPath, NULL, true, 0, -1 );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_BPMDisplay.SetBpmFromSong( GAMESTATE->m_pCurSong );
|
m_BPMDisplay.SetBpmFromSong( GAMESTATE->m_pCurSong );
|
||||||
@@ -539,7 +533,7 @@ void ScreenNetSelectMusic::MusicChanged()
|
|||||||
StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType;
|
StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType;
|
||||||
vector <Steps *> MultiSteps;
|
vector <Steps *> MultiSteps;
|
||||||
MultiSteps = GAMESTATE->m_pCurSong->GetStepsByStepsType( st );
|
MultiSteps = GAMESTATE->m_pCurSong->GetStepsByStepsType( st );
|
||||||
if (MultiSteps.size() == 0)
|
if(MultiSteps.size() == 0)
|
||||||
m_DC[pn] = NUM_Difficulty;
|
m_DC[pn] = NUM_Difficulty;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -548,24 +542,24 @@ void ScreenNetSelectMusic::MusicChanged()
|
|||||||
|
|
||||||
bool dcs[NUM_Difficulty];
|
bool dcs[NUM_Difficulty];
|
||||||
|
|
||||||
for ( i=0; i<NUM_Difficulty; ++i )
|
for( i=0; i<NUM_Difficulty; ++i )
|
||||||
dcs[i] = false;
|
dcs[i] = false;
|
||||||
|
|
||||||
for ( i=0; i<(int)MultiSteps.size(); ++i )
|
for( i=0; i<(int)MultiSteps.size(); ++i )
|
||||||
dcs[MultiSteps[i]->GetDifficulty()] = true;
|
dcs[MultiSteps[i]->GetDifficulty()] = true;
|
||||||
|
|
||||||
for ( i=0; i<NUM_Difficulty; ++i )
|
for( i=0; i<NUM_Difficulty; ++i )
|
||||||
if ( dcs[i] )
|
if( dcs[i] )
|
||||||
{
|
{
|
||||||
Target = (Difficulty)i;
|
Target = (Difficulty)i;
|
||||||
if ( i >= m_DC[pn] )
|
if( i >= m_DC[pn] )
|
||||||
{
|
{
|
||||||
m_DC[pn] = (Difficulty)i;
|
m_DC[pn] = (Difficulty)i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( i == NUM_Difficulty )
|
if( i == NUM_Difficulty )
|
||||||
m_DC[pn] = Target;
|
m_DC[pn] = Target;
|
||||||
}
|
}
|
||||||
UpdateDifficulties( pn );
|
UpdateDifficulties( pn );
|
||||||
@@ -591,7 +585,7 @@ void ScreenNetSelectMusic::MusicChanged()
|
|||||||
|
|
||||||
void ScreenNetSelectMusic::Update( float fDeltaTime )
|
void ScreenNetSelectMusic::Update( float fDeltaTime )
|
||||||
{
|
{
|
||||||
if (!m_bInitialSelect)
|
if(!m_bInitialSelect)
|
||||||
{
|
{
|
||||||
m_bInitialSelect = true;
|
m_bInitialSelect = true;
|
||||||
SCREENMAN->PostMessageToTopScreen( SM_RefreshWheelLocation, 1.0f );
|
SCREENMAN->PostMessageToTopScreen( SM_RefreshWheelLocation, 1.0f );
|
||||||
@@ -599,7 +593,6 @@ void ScreenNetSelectMusic::Update( float fDeltaTime )
|
|||||||
ScreenNetSelectBase::Update( fDeltaTime );
|
ScreenNetSelectBase::Update( fDeltaTime );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -21,30 +21,8 @@ public:
|
|||||||
virtual void Input( const InputEventPlus &input );
|
virtual void Input( const InputEventPlus &input );
|
||||||
virtual void HandleScreenMessage( const ScreenMessage SM );
|
virtual void HandleScreenMessage( const ScreenMessage SM );
|
||||||
|
|
||||||
void UpdateSongsListPos();
|
|
||||||
void UpdateGroupsListPos();
|
|
||||||
void UpdateSongsList();
|
|
||||||
void UpdateTextInput();
|
|
||||||
|
|
||||||
void StartSelectedSong();
|
void StartSelectedSong();
|
||||||
|
|
||||||
private:
|
|
||||||
int m_iSongNum;
|
|
||||||
int m_iShowSongs; //The number of songs to display to each side
|
|
||||||
int m_iGroupNum;
|
|
||||||
int m_iShowGroups; //The number of groups to display to each side
|
|
||||||
|
|
||||||
enum NetScreenSelectModes
|
|
||||||
{
|
|
||||||
SelectGroup = 0,
|
|
||||||
SelectSong,
|
|
||||||
SelectDifficulty,
|
|
||||||
SelectOptions,
|
|
||||||
SelectModes,
|
|
||||||
};
|
|
||||||
|
|
||||||
NetScreenSelectModes m_SelectMode;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void MenuStart( const InputEventPlus &input );
|
virtual void MenuStart( const InputEventPlus &input );
|
||||||
virtual void MenuLeft( const InputEventPlus &input );
|
virtual void MenuLeft( const InputEventPlus &input );
|
||||||
@@ -67,7 +45,7 @@ protected:
|
|||||||
private:
|
private:
|
||||||
MusicWheel m_MusicWheel;
|
MusicWheel m_MusicWheel;
|
||||||
|
|
||||||
// todo: replace difficulty icons with StepsDisplay out the ass
|
// todo: replace difficulty icons with StepsDisplay -aj
|
||||||
//Difficulty Icon(s)
|
//Difficulty Icon(s)
|
||||||
//DifficultyIcon m_DifficultyIcon[NUM_PLAYERS];
|
//DifficultyIcon m_DifficultyIcon[NUM_PLAYERS];
|
||||||
Difficulty m_DC[NUM_PLAYERS];
|
Difficulty m_DC[NUM_PLAYERS];
|
||||||
@@ -78,6 +56,7 @@ private:
|
|||||||
RageSound m_soundChangeOpt;
|
RageSound m_soundChangeOpt;
|
||||||
RageSound m_soundChangeSel;
|
RageSound m_soundChangeSel;
|
||||||
|
|
||||||
|
// todo: do these theme-side instead. -aj
|
||||||
BPMDisplay m_BPMDisplay;
|
BPMDisplay m_BPMDisplay;
|
||||||
ModIconRow m_ModIconRow[NUM_PLAYERS];
|
ModIconRow m_ModIconRow[NUM_PLAYERS];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user