Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

SpriteList Class Reference

A doubly-linked sprite list class.

#include <spritelist.h>

Collaboration diagram for SpriteList:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SpriteList ()
 Constructor.

 ~SpriteList ()
 Destructor, frees any freeable sprites and destroys list.

void Destroy ()
 Destructor, frees any freeable sprites and destroys list.

bool Extract (Sprite *spr)
 Attempts to removes specified sprite from list.

bool Insert (Sprite *spr)
 Attempts to insert specified sprite into the list.

bool Find (Sprite *spr)
 Attempts to find the specified sprite in the list.

Sprite * Tail ()
 Returns the last sprite in the list, or NULL if none.

Sprite * Head ()
 Returns the first sprite in the list, or NULL if none.


Constructor & Destructor Documentation

SpriteList::SpriteList (   ) 
 

Default constructor. Starts list empty.

Definition at line 30 of file spritelist.cpp.

SpriteList::~SpriteList (   ) 
 

Destructor.

Definition at line 62 of file spritelist.cpp.

References Destroy().

Here is the call graph for this function:


Member Function Documentation

void SpriteList::Destroy (   ) 
 

Destroys list and all deleteable sprites.

Definition at line 38 of file spritelist.cpp.

References Sprite::Deleteable(), Sprite::next, and Sprite::prev.

Referenced by ~SpriteList().

Here is the call graph for this function:

bool SpriteList::Extract (  Sprite *  spr  ) 
 

Attempts to remove the specified sprite from the list. Returns true if the sprite was contained, false if not.

Definition at line 94 of file spritelist.cpp.

References Find(), Sprite::next, and Sprite::prev.

Referenced by SpriteManager::FastBlit(), SpriteManager::QuadBlit(), SpriteManager::RemoveSprite(), and SpriteManager::SimpleBlit().

Here is the call graph for this function:

bool SpriteList::Find (  Sprite *  spr  ) 
 

Returns true if specified sprite is contained, false if not.

Definition at line 167 of file spritelist.cpp.

References Sprite::DrawLayer(), and Sprite::next.

Referenced by Extract().

Here is the call graph for this function:

Sprite * SpriteList::Head (   ) 
 

Returns first sprite in list, if any.

Definition at line 70 of file spritelist.cpp.

Referenced by SpriteManager::FastBlit(), SpriteManager::Move(), SpriteManager::Preserve(), SpriteManager::QuadBlit(), SpriteManager::SendEvent(), and SpriteManager::SimpleBlit().

bool SpriteList::Insert (  Sprite *  spr  ) 
 

Inserts a sprite into the list, putting it in proper drawing order.

Definition at line 123 of file spritelist.cpp.

References Sprite::DrawLayer(), Sprite::next, and Sprite::prev.

Referenced by SpriteManager::AddSprite().

Here is the call graph for this function:

Sprite * SpriteList::Tail (   ) 
 

Returns last sprite in list, if any.

Definition at line 78 of file spritelist.cpp.

References Sprite::next.


The documentation for this class was generated from the following files:
Generated on Sat Oct 11 13:19:36 2003 for Spritelib by doxygen 1.3.4