From 65c51af8a47dbe6314652fa41178e5ee55ae4ef4 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 15 Jun 2003 02:07:31 +0000 Subject: [PATCH] banner cache for course banners --- stepmania/src/Course.cpp | 6 ++++++ stepmania/src/FadingBanner.cpp | 11 ++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index 2967b12494..428bd9883c 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -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; iGetBannerPath() ); - BeforeChange(); - m_Banner[GetBackIndex()].LoadFromCourse( pCourse ); + LoadFromCachedBanner( pCourse->m_sBannerPath ); +// BeforeChange(); +// m_Banner[GetBackIndex()].LoadFromCourse( pCourse ); } void FadingBanner::LoadRoulette()