banner cache for course banners

This commit is contained in:
Glenn Maynard
2003-06-15 02:07:31 +00:00
parent 375c2df8ff
commit 65c51af8a4
2 changed files with 12 additions and 5 deletions
+6
View File
@@ -24,6 +24,7 @@
#include "TitleSubstitution.h"
#include "Notes.h"
#include "GameState.h"
#include "BannerCache.h"
Course::Course()
@@ -121,8 +122,13 @@ void Course::LoadFromCRSFile( CString sPath )
GetDirListing( sFName + ".bmp", arrayPossibleBanners, false, true );
GetDirListing( sFName + ".gif", arrayPossibleBanners, false, true );
if( !arrayPossibleBanners.empty() )
{
m_sBannerPath = arrayPossibleBanners[0];
/* Cache and load the course banner. */
BANNERCACHE->CacheBanner( m_sBannerPath );
}
for( unsigned i=0; i<msd.GetNumValues(); i++ )
{
CString sValueName = msd.GetParam(i, 0);
+6 -5
View File
@@ -16,6 +16,9 @@
#include "BannerCache.h"
#include "song.h"
#include "RageLog.h"
#include "course.h"
#include "PrefsManager.h"
#include "ThemeManager.h"
/* XXX: metric */
static const float FadeTime = 0.25;
@@ -34,8 +37,6 @@ void FadingBanner::SetCroppedSize( float fWidth, float fHeight )
m_Banner[i].SetCroppedSize( fWidth, fHeight );
}
#include "PrefsManager.h"
#include "ThemeManager.h"
void FadingBanner::Update( float fDeltaTime )
{
ActorFrame::Update( fDeltaTime );
@@ -150,9 +151,9 @@ void FadingBanner::LoadFromGroup( CString sGroupName )
void FadingBanner::LoadFromCourse( Course* pCourse )
{
// LoadFromCachedBanner( pCourse->GetBannerPath() );
BeforeChange();
m_Banner[GetBackIndex()].LoadFromCourse( pCourse );
LoadFromCachedBanner( pCourse->m_sBannerPath );
// BeforeChange();
// m_Banner[GetBackIndex()].LoadFromCourse( pCourse );
}
void FadingBanner::LoadRoulette()