don't waste time caching banners for Banner, only FadingBanner (eg. ScreenStage)

This commit is contained in:
Glenn Maynard
2004-12-30 20:08:34 +00:00
parent b6fe2c3bae
commit 02d68f44ef
3 changed files with 17 additions and 9 deletions
+13 -9
View File
@@ -16,16 +16,20 @@ Banner::Banner()
{
m_bScrolling = false;
m_fPercentScrolling = 0;
}
if( PREFSMAN->m_iBannerCache != PrefsManager::BNCACHE_OFF )
{
TEXTUREMAN->CacheTexture( SongBannerTexture(THEME->GetPathG("Banner","all music")) );
TEXTUREMAN->CacheTexture( SongBannerTexture(THEME->GetPathG("Common","fallback banner")) );
TEXTUREMAN->CacheTexture( SongBannerTexture(THEME->GetPathG("Banner","roulette")) );
TEXTUREMAN->CacheTexture( SongBannerTexture(THEME->GetPathG("Banner","random")) );
TEXTUREMAN->CacheTexture( SongBannerTexture(THEME->GetPathG("Banner","Sort")) );
TEXTUREMAN->CacheTexture( SongBannerTexture(THEME->GetPathG("Banner","Mode")) );
}
void Banner::CacheGlobalBanners()
{
if( PREFSMAN->m_iBannerCache == PrefsManager::BNCACHE_OFF )
return;
TEXTUREMAN->CacheTexture( SongBannerTexture(THEME->GetPathG("Banner","all music")) );
TEXTUREMAN->CacheTexture( SongBannerTexture(THEME->GetPathG("Common","fallback banner")) );
TEXTUREMAN->CacheTexture( SongBannerTexture(THEME->GetPathG("Banner","roulette")) );
TEXTUREMAN->CacheTexture( SongBannerTexture(THEME->GetPathG("Banner","random")) );
TEXTUREMAN->CacheTexture( SongBannerTexture(THEME->GetPathG("Banner","leap")) );
TEXTUREMAN->CacheTexture( SongBannerTexture(THEME->GetPathG("Banner","Sort")) );
TEXTUREMAN->CacheTexture( SongBannerTexture(THEME->GetPathG("Banner","Mode")) );
}
bool Banner::Load( RageTextureID ID )
+2
View File
@@ -32,6 +32,8 @@ public:
void LoadRandom();
void LoadFallback();
static void CacheGlobalBanners();
void SetScrolling( bool bScroll, float Percent = 0);
bool IsScrolling() const { return m_bScrolling; }
float ScrollingPercent() const { return m_fPercentScrolling; }
+2
View File
@@ -27,6 +27,8 @@ FadingBanner::FadingBanner()
m_iIndexLatest = 0;
for( int i=0; i<3; i++ )
this->AddChild( &m_Banner[i] );
Banner::CacheGlobalBanners();
}
void FadingBanner::ScaleToClipped( float fWidth, float fHeight )