save memory by loading SMData from cache on demand

This commit is contained in:
Glenn Maynard
2004-07-22 21:02:07 +00:00
parent daff442724
commit bd7eaf3f6c
3 changed files with 77 additions and 11 deletions
+11 -7
View File
@@ -262,6 +262,17 @@ bool Song::LoadFromSongDir( CString sDir )
SaveToCacheFile();
}
for( unsigned i=0; i<m_vpSteps.size(); i++ )
{
m_vpSteps[i]->SetFile( GetCacheFilePath() );
/* Compress all Steps. During initial caching, this will remove cached NoteData;
* during cached loads, this will just remove cached SMData. */
m_vpSteps[i]->Compress();
}
/* Load the cached banners, if it's not loaded already. */
if( m_bHasBanner )
BANNERCACHE->LoadBanner( GetBannerPath() );
@@ -814,13 +825,6 @@ void Song::TidyUpData()
}
}
}
// Compress all Steps
for( i=0; i<m_vpSteps.size(); i++ )
{
m_vpSteps[i]->Compress();
}
}
void Song::TranslateTitles()