Etterna 0.74.4
Loading...
Searching...
No Matches
ImageCache.h
1#ifndef IMAGE_CACHE_H
2#define IMAGE_CACHE_H
3
4#include "Etterna/FileTypes/IniFile.h"
5
6#include "RageUtil/Graphics/RageTexture.h"
7
8class LoadingWindow;
11{
12 public:
13 ImageCache();
15 void ReadFromDisk();
16
17 auto LoadCachedImage(const std::string& sImageDir,
18 const std::string& sImagePath) -> RageTextureID;
19 void CacheImage(const std::string& sImageDir,
20 const std::string& sImagePath);
21 void LoadImage(const std::string& sImageDir, const std::string& sImagePath);
22
23 void Demand(const std::string& sImageDir);
24 void Undemand(const std::string& sImageDir);
25
26 void OutputStats() const;
27
28 private:
29 static auto GetImageCachePath(const std::string& sImageDir,
30 const std::string& sImagePath) -> std::string;
31 void UnloadAllImages();
32 void CacheImageInternal(const std::string& sImageDir,
33 const std::string& sImagePath);
34
35 IniFile ImageData;
36};
37
38extern ImageCache*
39 IMAGECACHE; // global and accessible from anywhere in our program
40
41#endif
Maintains a cache of reduced-quality banners.
Definition ImageCache.h:11
The functions to read and write .INI files.
Definition IniFile.h:11
Opens and displays the loading banner.
Definition LoadingWindow.h:9
Definition RageTextureID.h:12