Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

SpriteCache Class Reference

#include <spritecache.h>

List of all members.


Detailed Description

A class to maintain the sprite cache.

Definition at line 22 of file spritecache.h.

Public Methods

 SpriteCache ()
 Constructor.

 ~SpriteCache ()
 Destructor.

SurfaceFind (string n)
 Looks for a surface.


Private Attributes

vector< SpriteCacheInfocache
 the data containing our cache.


Constructor & Destructor Documentation

SpriteCache::SpriteCache  
 

Constructor.

Initializes an empty cache

Definition at line 7 of file spritecache.cpp.

SpriteCache::~SpriteCache  
 

Destructor.

Frees all used memory

Definition at line 11 of file spritecache.cpp.

References cache, Graphics::freeImage(), and Graphics::UntexturizeSurface().


Member Function Documentation

Surface * SpriteCache::Find string    n
 

Looks for a surface.

Parameters:
n the name of the surface to return. If n isn't loaded then it is loaded from disk and placed into the cache.
Returns:
a pointer to the surface. NULL if n couldn't be found or loaded.

Definition at line 23 of file spritecache.cpp.

Referenced by Sprite::AddFrame(), and Util_parseImage().


Member Data Documentation

vector<SpriteCacheInfo> SpriteCache::cache [private]
 

the data containing our cache.

Definition at line 45 of file spritecache.h.

Referenced by ~SpriteCache().


The documentation for this class was generated from the following files:
Generated on Sun Dec 8 12:02:22 2002 for nnc by doxygen1.3-rc1