only cache special banners on screens that need to

This commit is contained in:
Glenn Maynard
2005-07-07 01:44:24 +00:00
parent 378295df84
commit 5499c7124b
3 changed files with 9 additions and 11 deletions
-9
View File
@@ -16,15 +16,6 @@ Banner::Banner()
{ {
m_bScrolling = false; m_bScrolling = false;
m_fPercentScrolling = 0; m_fPercentScrolling = 0;
if( PREFSMAN->m_BannerCache != PrefsManager::BNCACHE_OFF )
{
m_TexturePreload.Load( SongBannerTexture(THEME->GetPathG("Banner","all music")) );
m_TexturePreload.Load( SongBannerTexture(THEME->GetPathG("Common","fallback banner")) );
m_TexturePreload.Load( SongBannerTexture(THEME->GetPathG("Banner","roulette")) );
m_TexturePreload.Load( SongBannerTexture(THEME->GetPathG("Banner","random")) );
m_TexturePreload.Load( SongBannerTexture(THEME->GetPathG("Banner","Mode")) );
}
} }
bool Banner::Load( RageTextureID ID ) bool Banner::Load( RageTextureID ID )
-2
View File
@@ -5,7 +5,6 @@
#include "Sprite.h" #include "Sprite.h"
#include "RageTextureID.h" #include "RageTextureID.h"
#include "RageTexturePreloader.h"
class Song; class Song;
class Course; class Course;
class Character; class Character;
@@ -39,7 +38,6 @@ public:
protected: protected:
bool m_bScrolling; bool m_bScrolling;
float m_fPercentScrolling; float m_fPercentScrolling;
RageTexturePreloader m_TexturePreload;
}; };
#endif #endif
+9
View File
@@ -109,6 +109,15 @@ void ScreenSelectMusic::Init()
m_TexturePreload.Load( m_sFallbackCDTitlePath ); m_TexturePreload.Load( m_sFallbackCDTitlePath );
if( PREFSMAN->m_BannerCache != PrefsManager::BNCACHE_OFF )
{
m_TexturePreload.Load( Banner::SongBannerTexture(THEME->GetPathG("Banner","all music")) );
m_TexturePreload.Load( Banner::SongBannerTexture(THEME->GetPathG("Common","fallback banner")) );
m_TexturePreload.Load( Banner::SongBannerTexture(THEME->GetPathG("Banner","roulette")) );
m_TexturePreload.Load( Banner::SongBannerTexture(THEME->GetPathG("Banner","random")) );
m_TexturePreload.Load( Banner::SongBannerTexture(THEME->GetPathG("Banner","Mode")) );
}
if( GAMESTATE->m_pCurStyle == NULL ) if( GAMESTATE->m_pCurStyle == NULL )
RageException::Throw( "The Style has not been set. A theme must set the Style before loading ScreenSelectMusic." ); RageException::Throw( "The Style has not been set. A theme must set the Style before loading ScreenSelectMusic." );