#include <SpriteProcess.h>
Inheritance diagram for SpriteProcess:
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 |
Definition at line 26 of file SpriteProcess.h.
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
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.
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
framenum | The number of this frame of execution |
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.
int SpriteProcess::delay [private] |
int SpriteProcess::delay_counter [private] |
int SpriteProcess::first_frame [private] |
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] |
int SpriteProcess::repeats [private] |
int SpriteProcess::shape [private] |
int SpriteProcess::x [private] |
int SpriteProcess::y [private] |
int SpriteProcess::z [private] |