Fix: Make BPM Display work.
This commit is contained in:
@@ -202,6 +202,13 @@ void BPMDisplay::SetBPM( const Course* pCourse )
|
|||||||
m_fCycleTime = 0.2f;
|
m_fCycleTime = 0.2f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BPMDisplay::SetBPM( float fBPM )
|
||||||
|
{
|
||||||
|
DisplayBpms bpms;
|
||||||
|
bpms.Add( fBPM );
|
||||||
|
SetBPMRange( bpms );
|
||||||
|
}
|
||||||
|
|
||||||
void BPMDisplay::DrawPrimitives()
|
void BPMDisplay::DrawPrimitives()
|
||||||
{
|
{
|
||||||
ActorFrame::DrawPrimitives();
|
ActorFrame::DrawPrimitives();
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ public:
|
|||||||
virtual void DrawPrimitives();
|
virtual void DrawPrimitives();
|
||||||
void SetBPM( const Song* pSong );
|
void SetBPM( const Song* pSong );
|
||||||
void SetBPM( const Course* pCourse );
|
void SetBPM( const Course* pCourse );
|
||||||
|
void SetBPM( float fBPM );
|
||||||
void CycleRandomly();
|
void CycleRandomly();
|
||||||
void NoBPM();
|
void NoBPM();
|
||||||
|
|
||||||
|
|||||||
@@ -640,6 +640,7 @@ void ScreenGameplay::Init()
|
|||||||
m_BPMDisplay.Load();
|
m_BPMDisplay.Load();
|
||||||
SET_XY( m_BPMDisplay );
|
SET_XY( m_BPMDisplay );
|
||||||
this->AddChild( &m_BPMDisplay );
|
this->AddChild( &m_BPMDisplay );
|
||||||
|
m_fLastBPS = 0;
|
||||||
|
|
||||||
ZERO( m_pInventory );
|
ZERO( m_pInventory );
|
||||||
FOREACH_PlayerNumber(p)
|
FOREACH_PlayerNumber(p)
|
||||||
@@ -983,18 +984,6 @@ void ScreenGameplay::LoadNextSong()
|
|||||||
|
|
||||||
m_textSongTitle.SetText( GAMESTATE->m_pCurSong->m_sMainTitle );
|
m_textSongTitle.SetText( GAMESTATE->m_pCurSong->m_sMainTitle );
|
||||||
|
|
||||||
/* XXX: set it to the current BPM, not the range */
|
|
||||||
/* What does this comment mean? -Chris
|
|
||||||
*
|
|
||||||
* We're in gameplay. A BPM display should display the current BPM, updating
|
|
||||||
* it as it changes, instead of the "BPM preview" of ScreenSelectMusic. That'd
|
|
||||||
* be used in IIDX, anyway. (Havn't done this since I don't know what this is
|
|
||||||
* currently actually used for and don't feel like investigating it until it's
|
|
||||||
* needed.)
|
|
||||||
* -glenn
|
|
||||||
*/
|
|
||||||
m_BPMDisplay.SetBPM( GAMESTATE->m_pCurSong );
|
|
||||||
|
|
||||||
const bool bReverse[NUM_PLAYERS] = {
|
const bool bReverse[NUM_PLAYERS] = {
|
||||||
GAMESTATE->m_PlayerOptions[0].m_fScrolls[PlayerOptions::SCROLL_REVERSE] == 1,
|
GAMESTATE->m_PlayerOptions[0].m_fScrolls[PlayerOptions::SCROLL_REVERSE] == 1,
|
||||||
GAMESTATE->m_PlayerOptions[1].m_fScrolls[PlayerOptions::SCROLL_REVERSE] == 1
|
GAMESTATE->m_PlayerOptions[1].m_fScrolls[PlayerOptions::SCROLL_REVERSE] == 1
|
||||||
@@ -1502,6 +1491,15 @@ void ScreenGameplay::Update( float fDeltaTime )
|
|||||||
this->PostScreenMessage( SM_NotesEnded, 0 );
|
this->PostScreenMessage( SM_NotesEnded, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// update bpm display
|
||||||
|
//
|
||||||
|
if ( m_fLastBPS != GAMESTATE->m_fCurBPS )
|
||||||
|
{
|
||||||
|
m_fLastBPS = GAMESTATE->m_fCurBPS;
|
||||||
|
m_BPMDisplay.SetBPM( GAMESTATE->m_fCurBPS * 60.0 );
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// play assist ticks
|
// play assist ticks
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -119,6 +119,7 @@ protected:
|
|||||||
BitmapText m_textStepsDescription[NUM_PLAYERS];
|
BitmapText m_textStepsDescription[NUM_PLAYERS];
|
||||||
|
|
||||||
BPMDisplay m_BPMDisplay;
|
BPMDisplay m_BPMDisplay;
|
||||||
|
float m_fLastBPS;
|
||||||
|
|
||||||
Sprite m_sprScoreFrame;
|
Sprite m_sprScoreFrame;
|
||||||
ScoreDisplay* m_pPrimaryScoreDisplay[NUM_PLAYERS];
|
ScoreDisplay* m_pPrimaryScoreDisplay[NUM_PLAYERS];
|
||||||
|
|||||||
Reference in New Issue
Block a user