Exemple #1
0
void BPMDisplay::SetBpmFromSong( const Song* pSong )
{
    ASSERT( pSong != NULL );
    switch( pSong->m_DisplayBPMType )
    {
    case DISPLAY_BPM_ACTUAL:
    case DISPLAY_BPM_SPECIFIED:
    {
        DisplayBpms bpms;
        pSong->GetDisplayBpms( bpms );
        SetBPMRange( bpms );
        m_fCycleTime = 1.0f;
    }
    break;
    case DISPLAY_BPM_RANDOM:
        CycleRandomly();
        break;
    default:
        FAIL_M(ssprintf("Invalid display BPM type: %i", pSong->m_DisplayBPMType));
    }
}
void BPMDisplay::SetBpmFromSong( const Song* pSong )
{
	ASSERT( pSong );
	switch( pSong->m_DisplayBPMType )
	{
	case DISPLAY_BPM_ACTUAL:
	case DISPLAY_BPM_SPECIFIED:
		{
			DisplayBpms bpms;
			pSong->GetDisplayBpms( bpms );
			SetBPMRange( bpms );
			m_fCycleTime = 1.0f;
		}
		break;
	case DISPLAY_BPM_RANDOM:
		CycleRandomly();
		break;
	default:
		ASSERT(0);
	}
}
Exemple #3
0
void BPMDisplay::SetFromGameState()
{
    if( GAMESTATE->m_pCurSong.Get() )
    {
        if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
            CycleRandomly();
        else
            SetBpmFromSong( GAMESTATE->m_pCurSong );
        return;
    }
    if( GAMESTATE->m_pCurCourse.Get() )
    {
        if( GAMESTATE->GetCurrentStyle(PLAYER_INVALID) == NULL )
            ; // This is true when backing out from ScreenSelectCourse to ScreenTitleMenu.  So, don't call SetBpmFromCourse where an assert will fire.
        else
            SetBpmFromCourse( GAMESTATE->m_pCurCourse );

        return;
    }

    NoBPM();
}