SpriteProcess Class Reference

Creates a Sprite. Animates it. Destroys it. More...

#include <SpriteProcess.h>

Inheritance diagram for SpriteProcess:

Process List of all members.

Public Member Functions

 ENABLE_RUNTIME_CLASSTYPE ()
 SpriteProcess ()
 SpriteProcess (int shape, int frame, int last_frame, int repeats, int delay, int x, int y, int z, bool delayed_init=false)
virtual ~SpriteProcess (void)
virtual bool run (const uint32 framenum)
 INTRINSIC (I_createSprite)
bool loadData (IDataSource *ids, uint32 version)

Protected Member Functions

void init ()
virtual void saveData (ODataSource *ods)

Private Attributes

int shape
int frame
int first_frame
int last_frame
int repeats
int delay
int x
int y
int z
int delay_counter
bool initialized

Detailed Description

Creates a Sprite. Animates it. Destroys it.

Definition at line 26 of file SpriteProcess.h.


Constructor & Destructor Documentation

SpriteProcess::SpriteProcess (  ) 

Definition at line 33 of file SpriteProcess.cpp.

SpriteProcess::SpriteProcess ( int  shape,
int  frame,
int  last_frame,
int  repeats,
int  delay,
int  x,
int  y,
int  z,
bool  delayed_init = false 
)

SpriteProcess Constructor

Parameters:
shape The shape to use
frame The initial/first frame of the sprite animation
last_frame The last frame of the sprite animation
repeats The number of times to play the sprite animation
delay The number of runs to wait before incrementing the frame
x X coord of the sprite in the world
y Y coord of the sprite in the world
z Z coord of the sprite in the world
delayed_init if true, wait with initialization until first run

Definition at line 39 of file SpriteProcess.cpp.

References init().

SpriteProcess::~SpriteProcess ( void   )  [virtual]

The SpriteProcess destructor.

Definition at line 59 of file SpriteProcess.cpp.

References Item::destroy(), getItem(), and Process::item_num.


Member Function Documentation

SpriteProcess::ENABLE_RUNTIME_CLASSTYPE (  ) 

Reimplemented from Process.

void SpriteProcess::init (  )  [protected]

Definition at line 50 of file SpriteProcess.cpp.

References ItemFactory::createItem(), Item::EXT_SPRITE, Item::FLG_DISPOSABLE, frame, Object::getObjId(), initialized, Item::move(), Process::setItemNum(), shape, x, y, and z.

Referenced by run(), and SpriteProcess().

SpriteProcess::INTRINSIC ( I_createSprite   ) 

bool SpriteProcess::loadData ( IDataSource ids,
uint32  version 
)

load Process data

Reimplemented from Process.

Definition at line 136 of file SpriteProcess.cpp.

References delay, delay_counter, first_frame, frame, initialized, last_frame, Process::loadData(), shape, x, y, and z.

bool SpriteProcess::run ( const uint32  framenum  )  [virtual]

The SpriteProcess run function

Parameters:
framenum The number of this frame of execution
Returns:
true if a screen repaint is required

Implements Process.

Definition at line 65 of file SpriteProcess.cpp.

References delay, delay_counter, first_frame, frame, getItem(), init(), initialized, Process::item_num, last_frame, repeats, Item::setFrame(), and Process::terminate().

void SpriteProcess::saveData ( ODataSource ods  )  [protected, virtual]

save the Process data

Reimplemented from Process.

Definition at line 119 of file SpriteProcess.cpp.

References delay, delay_counter, first_frame, frame, initialized, last_frame, Process::saveData(), shape, ODataSource::write1(), ODataSource::write4(), x, y, and z.


Member Data Documentation

int SpriteProcess::delay [private]

Definition at line 33 of file SpriteProcess.h.

Referenced by loadData(), run(), and saveData().

int SpriteProcess::delay_counter [private]

Definition at line 35 of file SpriteProcess.h.

Referenced by loadData(), run(), and saveData().

int SpriteProcess::first_frame [private]

Definition at line 30 of file SpriteProcess.h.

Referenced by loadData(), run(), and saveData().

int SpriteProcess::frame [private]

Definition at line 29 of file SpriteProcess.h.

Referenced by init(), loadData(), run(), and saveData().

bool SpriteProcess::initialized [private]

Definition at line 36 of file SpriteProcess.h.

Referenced by init(), loadData(), run(), and saveData().

int SpriteProcess::last_frame [private]

Definition at line 31 of file SpriteProcess.h.

Referenced by loadData(), run(), and saveData().

int SpriteProcess::repeats [private]

Definition at line 32 of file SpriteProcess.h.

Referenced by run().

int SpriteProcess::shape [private]

Definition at line 28 of file SpriteProcess.h.

Referenced by init(), loadData(), and saveData().

int SpriteProcess::x [private]

Definition at line 34 of file SpriteProcess.h.

Referenced by init(), loadData(), and saveData().

int SpriteProcess::y [private]

Definition at line 34 of file SpriteProcess.h.

Referenced by init(), loadData(), and saveData().

int SpriteProcess::z [private]

Definition at line 34 of file SpriteProcess.h.

Referenced by init(), loadData(), and saveData().


The documentation for this class was generated from the following files:
Generated on Fri Jul 27 22:29:58 2007 for pentagram by  doxygen 1.4.7