Textures Namespace Reference

Namespace for management of individual images used in the player. More...


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.


Detailed Description

Namespace for management of individual images used in the player.

Function Documentation

SDL_Surface * Textures::createTexture ( const ustring &  id,
const Texture &  tex 
)

Create a usable surface after loading a texture from memory.

Parameters:
id The ID of the image
tex Texture struct prepared from memory
Returns:
Pointer to a new image surface

SDL_Surface * Textures::createTexture ( const ustring &  id,
const ustring &  file 
)

Create a usable surface after loading an image from file.

Parameters:
id The ID of the image
file The path to the image
Returns:
Pointer to a new image surface

void Textures::popTexture ( const ustring &  id  ) 

Remove an image from the stack and free allocated memory.

Parameters:
id The ID of the image

void Textures::pushTexture ( const ustring &  id,
SDL_Surface *  texture 
)

Add a new image to the internal map.

Parameters:
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.

Parameters:
id The ID of the image
Returns:
Pointer to a surface of the image


Generated on Fri Feb 22 22:29:23 2008 for Phoenix Wright Case Player API by  doxygen 1.5.3