optimize battle mode: don't call NoteField::CacheAllUsedNoteSkins every frame

This commit is contained in:
Glenn Maynard
2005-01-01 22:39:08 +00:00
parent 4b69f947dd
commit c5a683b03c
3 changed files with 5 additions and 6 deletions
-6
View File
@@ -508,12 +508,6 @@ void PlayerMinus::Update( float fDeltaTime )
// process transforms that are waiting to be applied
ApplyWaitingTransforms();
/* Cache any newly-used note skins. Normally, the only new skins cached now are
* when we're adding course modifiers at the start of a song. If this is spending
* time loading skins in the middle of a song, something is wrong. */
if( m_pNoteField )
m_pNoteField->CacheAllUsedNoteSkins();
ActorFrame::Update( fDeltaTime );
}
+2
View File
@@ -123,6 +123,8 @@ public:
ScoreKeeper* pPrimaryScoreKeeper,
ScoreKeeper* pSecondaryScoreKeeper );
void CacheAllUsedNoteSkins() { m_NoteField.CacheAllUsedNoteSkins(); }
protected:
NoteField m_NoteField;
+3
View File
@@ -858,6 +858,9 @@ void ScreenGameplay::SetupSong( PlayerNumber p, int iSongIndex )
GAMESTATE->m_SongOptions.FromString( a.sModifier );
}
/* Now that course options are applied, load any needed note skins. */
m_Player[p].CacheAllUsedNoteSkins();
/* Update attack bOn flags. */
GAMESTATE->Update(0);
GAMESTATE->RebuildPlayerOptionsFromActiveAttacks( p );