don't load character images with banner hints

This commit is contained in:
Glenn Maynard
2005-08-15 15:11:02 +00:00
parent 65c5944b47
commit 6f89faaece
2 changed files with 12 additions and 10 deletions
+10 -8
View File
@@ -18,12 +18,14 @@ Banner::Banner()
m_fPercentScrolling = 0;
}
bool Banner::Load( RageTextureID ID )
/* Ugly: if sIsBanner is false, we're actually loading something other than a banner. */
bool Banner::Load( RageTextureID ID, bool bIsBanner )
{
if( ID.filename == "" )
ID = THEME->GetPathG("Common","fallback banner");
ID = SongBannerTexture(ID);
if( bIsBanner )
ID = SongBannerTexture(ID);
m_fPercentScrolling = 0;
m_bScrolling = false;
@@ -42,7 +44,7 @@ void Banner::Update( float fDeltaTime )
if( m_bScrolling )
{
m_fPercentScrolling += fDeltaTime/2;
m_fPercentScrolling += fDeltaTime/2;
m_fPercentScrolling -= (int)m_fPercentScrolling;
const RectF *pTextureRect = m_pTexture->GetTextureCoordRect(0);
@@ -116,9 +118,9 @@ void Banner::LoadCardFromCharacter( Character* pCharacter )
void Banner::LoadIconFromCharacter( Character* pCharacter )
{
if( pCharacter == NULL ) LoadCourseFallbackCharacterIcon();
else if( pCharacter->GetIconPath() != "" ) Load( pCharacter->GetIconPath() );
else LoadCourseFallbackCharacterIcon();
if( pCharacter == NULL ) LoadFallbackCharacterIcon();
else if( pCharacter->GetIconPath() != "" ) Load( pCharacter->GetIconPath(), false );
else LoadFallbackCharacterIcon();
m_bScrolling = false;
}
@@ -143,11 +145,11 @@ void Banner::LoadCourseFallback()
Load( THEME->GetPathG("Banner","course fallback") );
}
void Banner::LoadCourseFallbackCharacterIcon()
void Banner::LoadFallbackCharacterIcon()
{
Character *pCharacter = CHARMAN->GetDefaultCharacter();
if( pCharacter && !pCharacter->GetIconPath().empty() )
Load( pCharacter->GetIconPath() );
Load( pCharacter->GetIconPath(), false );
else
LoadFallback();
}
+2 -2
View File
@@ -15,7 +15,7 @@ public:
Banner();
virtual ~Banner() { }
virtual bool Load( RageTextureID ID );
virtual bool Load( RageTextureID ID, bool bIsBanner=true );
virtual void Update( float fDeltaTime );
@@ -31,7 +31,7 @@ public:
void LoadRandom();
void LoadFallback();
void LoadCourseFallback();
void LoadCourseFallbackCharacterIcon();
void LoadFallbackCharacterIcon();
void SetScrolling( bool bScroll, float Percent = 0);
bool IsScrolling() const { return m_bScrolling; }