Hosting courtesy of Sourceforge

SourceForge Logo
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Game::Flame Class Reference

#include <Flame.h>

Inheritance diagram for Game::Flame:

Inheritance graph
[legend]
Collaboration diagram for Game::Flame:

Collaboration graph
[legend]
List of all members.

Public Methods

void drawAt (SDL_Surface *surf, SDL_Rect *loc)
bool isOnFire ()
void addSpark (FlameType spark, int duration=Constants::FLAME_DURATION)

Detailed Description

Class that handles the explosions. Flames keep track of if they are currently on fire, as well as what the flame looks like

Definition at line 42 of file Flame.h.


Constructor & Destructor Documentation

Flame::Flame  
 

Definition at line 20 of file Flame.cpp.

Flame::~Flame  
 

Definition at line 27 of file Flame.cpp.


Member Function Documentation

void Flame::addSpark FlameType    spark,
int    duration = Constants::FLAME_DURATION
 

Adds another spark to the flame, possibly changing the look of what is drawn

Parameters:
spark  FlameType of the newest spark
duration  number of drawAt calls before spark disappears

Definition at line 50 of file Flame.cpp.

void Flame::drawAt SDL_Surface *    surf,
SDL_Rect *    loc
[virtual]
 

Draws the flame at the selected location, as well as decreases the flames duration

Reimplemented from Graphics::DrawableAt.

Definition at line 35 of file Flame.cpp.

bool Flame::isOnFire  
 

Determines whether a current flame has an active spark.. whether it is on fire or not

Returns:
true iff it will actually draw something on the surface that drawAt is called on

Definition at line 31 of file Flame.cpp.


The documentation for this class was generated from the following files:
Generated on Tue May 21 07:26:52 2002 for BomberLAN by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001