Refactor:

It seems to be no big deal to have a lot of small files; I think it's the
actual scan of the song tree that's expensive.  Simplify with this in
mind.

Load song banners when the song is loaded, so we don't load banners
for songs that aren't there.

Avoid touching the original banner when we're simply loading.
This commit is contained in:
Glenn Maynard
2003-06-15 00:57:05 +00:00
parent 17f2a9c906
commit 06af315dfd
4 changed files with 82 additions and 51 deletions
+6 -4
View File
@@ -12,16 +12,18 @@ class BannerCache
IniFile BannerData;
static CString GetBannerCachePath( CString BannerPath );
void LoadAllBanners();
void UnloadAllBanners();
public:
BannerCache();
~BannerCache();
RageTextureID LoadCachedSongBanner( CString BannerPath );
void CacheSongBanner( CString BannerPath );
void UncacheSongBanner( CString BannerPath );
RageTextureID LoadCachedBanner( CString BannerPath );
void CacheBanner( CString BannerPath );
void UncacheBanner( CString BannerPath );
void LoadBanner( CString BannerPath );
void OutputStats() const;
};
extern BannerCache *BANNERCACHE; // global and accessable from anywhere in our program