Classes | |
| struct | _Texture |
| Intermediate struct used for loading an image. More... | |
Typedefs | |
| typedef struct _Texture | Texture |
Functions | |
| SDL_Surface * | queryTexture (const ustring &id) |
| Get an image from the map. | |
| void | pushTexture (const ustring &id, SDL_Surface *texture) |
| Add a new image to the internal map. | |
| void | popTexture (const ustring &id) |
| Remove an image from the stack and free allocated memory. | |
| void | clearStack () |
| Clear the image stack. | |
| SDL_Surface * | createTexture (const ustring &id, const ustring &file) |
| Create a usable surface after loading an image from file. | |
| SDL_Surface * | createTexture (const ustring &id, const Texture &tex) |
| Create a usable surface after loading a texture from memory. | |
Variables | |
|
std::map< ustring, SDL_Surface * > | g_TextureMap |
| Map of all allocated images. | |
|
std::map< ustring, SDL_Surface * > | g_TextureMap |
| Map of all allocated images. | |
| SDL_Surface * Textures::createTexture | ( | const ustring & | id, | |
| const Texture & | tex | |||
| ) |
Create a usable surface after loading a texture from memory.
| id | The ID of the image | |
| tex | Texture struct prepared from memory |
| SDL_Surface * Textures::createTexture | ( | const ustring & | id, | |
| const ustring & | file | |||
| ) |
Create a usable surface after loading an image from file.
| id | The ID of the image | |
| file | The path to the image |
| void Textures::popTexture | ( | const ustring & | id | ) |
Remove an image from the stack and free allocated memory.
| id | The ID of the image |
| void Textures::pushTexture | ( | const ustring & | id, | |
| SDL_Surface * | texture | |||
| ) |
Add a new image to the internal map.
| id | The ID of the image to use | |
| texture | Pointer to allocated surface of the image |
| SDL_Surface * Textures::queryTexture | ( | const ustring & | id | ) |
Get an image from the map.
| id | The ID of the image |
1.5.3