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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user