add CacheAllUsedNoteSkins
This commit is contained in:
@@ -68,6 +68,15 @@ void NoteField::CacheNoteSkin( CString skin )
|
|||||||
m_NoteDisplays[ skin ] = nd;
|
m_NoteDisplays[ skin ] = nd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NoteField::CacheAllUsedNoteSkins()
|
||||||
|
{
|
||||||
|
/* Cache note skins. */
|
||||||
|
vector<CString> skins;
|
||||||
|
GAMESTATE->GetAllUsedNoteSkins( skins );
|
||||||
|
for( unsigned i=0; i < skins.size(); ++i )
|
||||||
|
CacheNoteSkin( skins[i] );
|
||||||
|
}
|
||||||
|
|
||||||
void NoteField::Load( const NoteData* pNoteData, PlayerNumber pn, int iFirstPixelToDraw, int iLastPixelToDraw, float fYReverseOffsetPixels )
|
void NoteField::Load( const NoteData* pNoteData, PlayerNumber pn, int iFirstPixelToDraw, int iLastPixelToDraw, float fYReverseOffsetPixels )
|
||||||
{
|
{
|
||||||
Unload();
|
Unload();
|
||||||
@@ -88,12 +97,7 @@ void NoteField::Load( const NoteData* pNoteData, PlayerNumber pn, int iFirstPixe
|
|||||||
this->CopyAll( pNoteData );
|
this->CopyAll( pNoteData );
|
||||||
ASSERT( GetNumTracks() == GAMESTATE->GetCurrentStyleDef()->m_iColsPerPlayer );
|
ASSERT( GetNumTracks() == GAMESTATE->GetCurrentStyleDef()->m_iColsPerPlayer );
|
||||||
|
|
||||||
/* Cache note skins. */
|
CacheAllUsedNoteSkins();
|
||||||
vector<CString> skins;
|
|
||||||
GAMESTATE->GetAllUsedNoteSkins( skins );
|
|
||||||
for( unsigned i=0; i < skins.size(); ++i )
|
|
||||||
CacheNoteSkin( skins[i] );
|
|
||||||
|
|
||||||
RefreshBeatToNoteSkin();
|
RefreshBeatToNoteSkin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ public:
|
|||||||
float m_fBeginMarker, m_fEndMarker; // only used with MODE_EDIT
|
float m_fBeginMarker, m_fEndMarker; // only used with MODE_EDIT
|
||||||
|
|
||||||
void FadeToFail();
|
void FadeToFail();
|
||||||
|
void CacheAllUsedNoteSkins();
|
||||||
void CacheNoteSkin( CString skin );
|
void CacheNoteSkin( CString skin );
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user