Created SurfaceManager

This commit is contained in:
Kayne Ruse
2013-04-28 23:04:17 +10:00
parent 79304f24b8
commit 1226fa08ca
8 changed files with 189 additions and 5 deletions
+25
View File
@@ -0,0 +1,25 @@
#ifndef SURFACEMANAGER_H_
#define SURFACEMANAGER_H_
#include "SDL/SDL.h"
#include <map>
#include <string>
class SurfaceManager {
public:
SurfaceManager();
~SurfaceManager();
SDL_Surface* Load(std::string key, std::string fname);
SDL_Surface* Reload(std::string key, std::string fname);
SDL_Surface* Get(std::string key);
SDL_Surface* Set(std::string key, SDL_Surface* ptr);
void Free(std::string key);
private:
SDL_Surface* LoadSurface(std::string key, std::string fname);
typedef std::map<std::string, SDL_Surface*> mapType;
mapType surfaceMap;
};
#endif