handle NoteField reloading inside NoteField; this fixes note skins in
the editor
This commit is contained in:
@@ -67,6 +67,8 @@ void NoteField::Load( NoteData* pNoteData, PlayerNumber pn, int iFirstPixelToDra
|
||||
for( int c=0; c<GetNumTracks(); c++ )
|
||||
m_NoteDisplay[c].Load( c, pn );
|
||||
|
||||
m_sLastSeenNoteSkin = GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_sNoteSkin;
|
||||
|
||||
ASSERT( GetNumTracks() == GAMESTATE->GetCurrentStyleDef()->m_iColsPerPlayer );
|
||||
}
|
||||
|
||||
@@ -79,6 +81,12 @@ void NoteField::ReloadNoteSkin()
|
||||
|
||||
void NoteField::Update( float fDeltaTime )
|
||||
{
|
||||
if( m_sLastSeenNoteSkin != GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_sNoteSkin )
|
||||
{
|
||||
ReloadNoteSkin();
|
||||
m_sLastSeenNoteSkin = GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_sNoteSkin;
|
||||
}
|
||||
|
||||
m_rectMarkerBar.Update( fDeltaTime );
|
||||
|
||||
if( m_fPercentFadeToFail >= 0 )
|
||||
|
||||
@@ -33,7 +33,6 @@ public:
|
||||
virtual void DrawPrimitives();
|
||||
|
||||
void Load( NoteData* pNoteData, PlayerNumber pn, int iFirstPixelToDraw, int iLastPixelToDraw );
|
||||
void ReloadNoteSkin();
|
||||
void RemoveTapNoteRow( int iIndex );
|
||||
|
||||
vector<bool> m_bIsHoldingHoldNote; // hack: Need this to know when to "light up" the center of hold notes
|
||||
@@ -43,6 +42,7 @@ public:
|
||||
void FadeToFail();
|
||||
|
||||
protected:
|
||||
void ReloadNoteSkin();
|
||||
void DrawBeatBar( const float fBeat );
|
||||
void DrawMarkerBar( const float fBeat );
|
||||
void DrawAreaHighlight( const float fStartBeat, const float fEndBeat );
|
||||
@@ -65,6 +65,7 @@ protected:
|
||||
BitmapText m_textMeasureNumber;
|
||||
Quad m_rectMarkerBar;
|
||||
Quad m_rectAreaHighlight;
|
||||
CString m_sLastSeenNoteSkin;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -280,11 +280,12 @@ void Player::Update( float fDeltaTime )
|
||||
SetHoldNoteScore(i, hns);
|
||||
}
|
||||
|
||||
if( m_sLastSeenNoteSkin != GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_sNoteSkin )
|
||||
/* Is there a reason this wasn't done within NoteField to begin with? */
|
||||
/* if( m_sLastSeenNoteSkin != GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_sNoteSkin )
|
||||
{
|
||||
m_NoteField.ReloadNoteSkin();
|
||||
m_sLastSeenNoteSkin = GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_sNoteSkin;
|
||||
}
|
||||
} */
|
||||
|
||||
ActorFrame::Update( fDeltaTime );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user