Add WheelItemData::HasBanner and WheelItemData::GetBanner.

This commit is contained in:
Glenn Maynard
2003-04-19 22:53:50 +00:00
parent c3dfb3bf3a
commit ff2b9072ac
2 changed files with 43 additions and 0 deletions
+40
View File
@@ -269,3 +269,43 @@ void MusicWheelItem::DrawPrimitives()
bar->SetGlow( RageColor(0,0,0,0) );
}
}
bool WheelItemData::HasBanner() const
{
switch( m_Type )
{
case TYPE_SONG:
return m_pSong->HasBanner();
case TYPE_COURSE:
return m_pCourse->HasBanner();
case TYPE_SECTION:
return SONGMAN->GetGroupBannerPath( m_sSectionName ).size() != 0;
/* XXX: These are special cases. */
case TYPE_ROULETTE:
case TYPE_RANDOM:
return false;
default: ASSERT(0); return false; // "";
}
}
CString WheelItemData::GetBanner() const
{
switch( m_Type )
{
case TYPE_SONG:
return m_pSong->GetBannerPath();
case TYPE_COURSE:
return m_pCourse->m_sBannerPath;
case TYPE_SECTION:
return SONGMAN->GetGroupBannerPath( m_sSectionName );
case TYPE_ROULETTE:
return THEME->GetPathToG("Banner random");
case TYPE_RANDOM:
return THEME->GetPathToG("Banner roulette");
default: ASSERT(0); return "";
}
}
+3
View File
@@ -59,6 +59,9 @@ struct WheelItemData
WheelItemData() {}
WheelItemData( WheelItemType wit, Song* pSong, CString sSectionName, Course* pCourse, RageColor color );
bool HasBanner() const;
CString GetBanner() const;
WheelItemType m_Type;
CString m_sSectionName;
Course* m_pCourse;