____                _       __
    / __ )____  _____   | |     / /___ ___________
   / __  / __ \/ ___/   | | /| / / __ `/ ___/ ___/
  / /_/ / /_/ (__  )    | |/ |/ / /_/ / /  (__  )
 /_____/\____/____/     |__/|__/\__,_/_/  /____/

       A futuristic real-time strategy game.
          This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project. Distributed under the "GNU General Public License"

GraphicAnimation Class Reference

#include <particle.h>

Inheritance diagram for GraphicAnimation:

Animation

List of all members.

Public Member Functions

 GraphicAnimation (CGraphic *g, int ticksPerFrame)
virtual ~GraphicAnimation ()
virtual void draw (int x, int y)
virtual void update (int ticks)
virtual bool isFinished ()
virtual Animation * clone ()


Detailed Description

Definition at line 56 of file particle.h.


Constructor & Destructor Documentation

GraphicAnimation::GraphicAnimation ( CGraphic *  g,
int  ticksPerFrame 
)

Definition at line 35 of file graphicanimation.cpp.

References Assert.

Referenced by clone().

virtual GraphicAnimation::~GraphicAnimation (  )  [inline, virtual]

Definition at line 64 of file particle.h.


Member Function Documentation

void GraphicAnimation::draw ( int  x,
int  y 
) [virtual]

Draw the current frame of the animation.

Parameters:
x x screen coordinate where to draw the animation.
y y screen coordinate where to draw the animation.

Implements Animation.

Definition at line 42 of file graphicanimation.cpp.

References CGraphic::DrawFrameClip(), CGraphic::Height, isFinished(), and CGraphic::Width.

void GraphicAnimation::update ( int  ticks  )  [virtual]

Update the animation.

Parameters:
ticks the number of ticks elapsed since the last call.

Implements Animation.

Definition at line 49 of file graphicanimation.cpp.

bool GraphicAnimation::isFinished (  )  [virtual]

Implements Animation.

Definition at line 58 of file graphicanimation.cpp.

References CGraphic::NumFrames.

Referenced by draw().

Animation * GraphicAnimation::clone (  )  [virtual]

Implements Animation.

Definition at line 63 of file graphicanimation.cpp.

References GraphicAnimation().


The documentation for this class was generated from the following files:

Generated on Sat Feb 21 00:28:25 2009 for Bos Wars by  doxygen 1.5.6