mirror of
https://github.com/Maschell/libgui.git
synced 2024-11-27 07:04:19 +01:00
35 lines
814 B
C++
35 lines
814 B
C++
#ifndef RECOURCES_H_
|
|
#define RECOURCES_H_
|
|
|
|
#include <map>
|
|
#include <dynamic_libs/os_types.h>
|
|
|
|
//! forward declaration
|
|
class GuiImageData;
|
|
class GuiSound;
|
|
|
|
class Resources
|
|
{
|
|
public:
|
|
static void Clear();
|
|
static bool LoadFiles(const char * path);
|
|
static const u8 * GetFile(const char * filename);
|
|
static u32 GetFileSize(const char * filename);
|
|
|
|
static GuiImageData * GetImageData(const char * filename);
|
|
static void RemoveImageData(GuiImageData * image);
|
|
|
|
static GuiSound * GetSound(const char * filename);
|
|
static void RemoveSound(GuiSound * sound);
|
|
private:
|
|
static Resources *instance;
|
|
|
|
Resources() {}
|
|
~Resources() {}
|
|
|
|
std::map<std::string, std::pair<u32, GuiImageData *> > imageDataMap;
|
|
std::map<std::string, std::pair<u32, GuiSound *> > soundDataMap;
|
|
};
|
|
|
|
#endif
|