use "note" NoteSkin in editor

This commit is contained in:
Chris Danford
2003-08-09 19:00:52 +00:00
parent 90e6679ccd
commit 265c0aa739
4 changed files with 13 additions and 12 deletions
-8
View File
@@ -66,8 +66,6 @@ void NoteField::Load( NoteData* pNoteData, PlayerNumber pn, int iFirstPixelToDra
// init note displays
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 );
}
@@ -81,12 +79,6 @@ 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 )
+1 -2
View File
@@ -40,9 +40,9 @@ public:
float m_fBeginMarker, m_fEndMarker; // only used with MODE_EDIT
void FadeToFail();
void ReloadNoteSkin();
protected:
void ReloadNoteSkin();
void DrawBeatBar( const float fBeat );
void DrawMarkerBar( const float fBeat );
void DrawAreaHighlight( const float fStartBeat, const float fEndBeat );
@@ -65,7 +65,6 @@ protected:
BitmapText m_textMeasureNumber;
Quad m_rectMarkerBar;
Quad m_rectAreaHighlight;
CString m_sLastSeenNoteSkin;
};
#endif
+9
View File
@@ -318,6 +318,15 @@ void Player::Update( float fDeltaTime )
CrossedRow( m_iRowLastCrossed );
}
// reload noteskin if it has changed
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 );
}
+3 -2
View File
@@ -238,8 +238,9 @@ ScreenEdit::ScreenEdit() : Screen("ScreenEdit")
GAMESTATE->m_PlayerOptions[PLAYER_1].m_fScrollSpeed = 1;
GAMESTATE->m_SongOptions.m_fMusicRate = 1;
/* Err, not all games have a noteskin named "note" ... */
// GAMESTATE->m_PlayerOptions[PLAYER_1].m_sNoteSkin = "note"; // change noteskin before loading all of the edit Actors
/* Not all games have a noteskin named "note" ... */
if( NOTESKIN->DoesNoteSkinExist("note") )
GAMESTATE->m_PlayerOptions[PLAYER_1].m_sNoteSkin = "note"; // change noteskin before loading all of the edit Actors
m_BGAnimation.LoadFromAniDir( THEME->GetPathToB("ScreenEdit background") );