homebrew_launcher/src/resources/Resources.h

34 lines
827 B
C
Raw Normal View History

2016-02-29 22:28:18 +01:00
#ifndef RECOURCES_H_
#define RECOURCES_H_
#include <map>
#include <stdint.h>
2016-02-29 22:28:18 +01:00
//! forward declaration
class GuiImageData;
class GuiSound;
class Resources {
2016-02-29 22:28:18 +01:00
public:
static void Clear();
static bool LoadFiles(const char * path);
static const uint8_t * GetFile(const char * filename);
static uint32_t GetFileSize(const char * filename);
2016-02-29 22:28:18 +01:00
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<unsigned int, GuiImageData *> > imageDataMap;
std::map<std::string, std::pair<unsigned int, GuiSound *> > soundDataMap;
};
#endif