Flappy-Bird_GX2/src/resources/Resources.h

30 lines
781 B
C
Raw Normal View History

#pragma once
2016-10-05 16:03:29 +02:00
#include <map>
#include <stdint.h>
2016-10-05 16:03:29 +02:00
//! forward declaration
class GuiImageData;
class GuiSound;
2020-07-05 13:34:13 +02:00
class Resources {
2016-10-05 16:03:29 +02: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-10-05 16:03:29 +02:00
static GuiImageData * GetImageData(const char * filename);
static void RemoveImageData(GuiImageData * image);
2016-10-05 16:03:29 +02:00
static GuiSound * GetSound(const char * filename);
static void RemoveSound(GuiSound * sound);
2016-10-05 16:03:29 +02:00
private:
static Resources *instance;
Resources() {}
~Resources() {}
std::map<std::string, std::pair<uint32_t, GuiImageData *> > imageDataMap;
std::map<std::string, std::pair<uint32_t, GuiSound *> > soundDataMap;
};