 |
Cytopia
0.3
A city building simulation game
|
Go to the documentation of this file. 1 #ifndef RESOURCES_MANAGER_HXX_
2 #define RESOURCES_MANAGER_HXX_
5 #include <unordered_map>
57 std::unordered_map<std::string, std::unordered_map<std::string, SDL_Texture *>>
m_uiTextureMap;
SDL_Surface * getTileSurface(const std::string &id)
SDL_Texture * getTileTexture(const std::string &id)
std::unordered_map< std::string, SDL_Texture * > m_tileTextureMap
SDL_Texture * getUITexture(const std::string &uiElement)
retrieves texture for a tileID
void loadUITexture()
Load Texture in to Texture Map, if an entry for this tile ID does not yet exist.
std::unordered_map< std::string, SDL_Surface * > m_surfaceMap
ResourcesManager & operator=(ResourcesManager const &)=delete
SDL_Color getColorOfPixelInSurface(const std::string &tileID, int x, int y)
Get the Color Of Pixel In Surface object at a given coordinate.
Abstract Singleton implementation.
void flush()
Delete everything. Should be called from the destuctor only.
SDL_Texture * createTextureFromSurface(SDL_Surface *surface)
void loadTexture(const std::string &id, const std::string &fileName)
std::unordered_map< std::string, std::unordered_map< std::string, SDL_Texture * > > m_uiTextureMap
SDL_Surface * createSurfaceFromFile(const std::string &fileName)