GravityProcess Class Reference

#include <GravityProcess.h>

Inheritance diagram for GravityProcess:

Process AvatarGravityProcess List of all members.

Public Member Functions

 GravityProcess ()
 GravityProcess (Item *item, int gravity)
void move (int xs, int ys, int zs)
void setGravity (int gravity)
void init ()
 ENABLE_RUNTIME_CLASSTYPE ()
virtual bool run (const uint32 framenum)
virtual void terminate ()
virtual void dumpInfo ()
bool loadData (IDataSource *ids, uint32 version)

Protected Member Functions

virtual void saveData (ODataSource *ods)

Protected Attributes

int gravity
int xspeed
int yspeed
int zspeed

Detailed Description

Definition at line 26 of file GravityProcess.h.


Constructor & Destructor Documentation

GravityProcess::GravityProcess (  ) 

Definition at line 39 of file GravityProcess.cpp.

GravityProcess::GravityProcess ( Item item,
int  gravity 
)

Definition at line 45 of file GravityProcess.cpp.

References Object::getObjId(), gravity, Process::item_num, and Process::type.


Member Function Documentation

void GravityProcess::dumpInfo (  )  [virtual]

dump some info about this process to pout

Reimplemented from Process.

Definition at line 375 of file GravityProcess.cpp.

References Process::dumpInfo(), gravity, pout, xspeed, yspeed, and zspeed.

GravityProcess::ENABLE_RUNTIME_CLASSTYPE (  ) 

Reimplemented from Process.

Reimplemented in AvatarGravityProcess.

void GravityProcess::init (  ) 

Definition at line 56 of file GravityProcess.cpp.

References getItem(), Process::getPid(), Item::getZ(), Process::item_num, Actor::setFallStart(), and Item::setGravityPID().

Referenced by MainActor::ensureGravityProcess(), and Item::ensureGravityProcess().

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

load Process data

Reimplemented from Process.

Reimplemented in AvatarGravityProcess.

Definition at line 394 of file GravityProcess.cpp.

References gravity, Process::loadData(), xspeed, yspeed, and zspeed.

Referenced by AvatarGravityProcess::loadData().

void GravityProcess::move ( int  xs,
int  ys,
int  zs 
)

Definition at line 69 of file GravityProcess.cpp.

References xspeed, yspeed, and zspeed.

Referenced by Item::hurl().

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

Implements Process.

Reimplemented in AvatarGravityProcess.

Definition at line 84 of file GravityProcess.cpp.

References Item::collideMove(), ShapeInfo::flags, Item::FLG_BOUNCING, World::get_instance(), World::getCurrentMap(), Actor::getFallStart(), Item::getFootpadWorld(), getItem(), Item::getLocation(), Object::getObjId(), Item::getShapeInfo(), Item::getZ(), gravity, ShapeInfo::is_land(), CurrentMap::isValidPosition(), Process::item_num, Item::move(), pout, Actor::setFallStart(), terminate(), Process::terminateDeferred(), xspeed, yspeed, and zspeed.

Referenced by AvatarGravityProcess::run().

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

save the Process data

Reimplemented from Process.

Reimplemented in AvatarGravityProcess.

Definition at line 384 of file GravityProcess.cpp.

References gravity, Process::saveData(), ODataSource::write4(), xspeed, yspeed, and zspeed.

Referenced by AvatarGravityProcess::saveData().

void GravityProcess::setGravity ( int  gravity  ) 

Definition at line 76 of file GravityProcess.cpp.

References gravity.

Referenced by Item::fall(), and Item::hurl().

void GravityProcess::terminate (  )  [virtual]

terminate the process. This wakes up all processes waiting for it.

Reimplemented from Process.

Definition at line 315 of file GravityProcess.cpp.

References Item::clearFlag(), Animation::combatStand, Animation::die, WeaponInfo::DMG_FALLING, WeaponInfo::DMG_PIERCE, Actor::doAnim(), Item::FLG_BOUNCING, Kernel::get_instance(), AudioProcess::get_instance(), Actor::getDir(), Actor::getFallStart(), Actor::getHP(), getItem(), Actor::getLastAnim(), Kernel::getProcess(), Item::getZ(), height, Actor::isDead(), Actor::isInCombat(), Process::item_num, Kernel::killProcesses(), Animation::land, AudioProcess::playSFX(), Actor::receiveHit(), Item::setGravityPID(), Process::terminate(), and Process::waitFor().

Referenced by AvatarMoverProcess::handleHangingMode(), and run().


Member Data Documentation

int GravityProcess::gravity [protected]

Definition at line 51 of file GravityProcess.h.

Referenced by dumpInfo(), GravityProcess(), loadData(), run(), saveData(), and setGravity().

int GravityProcess::xspeed [protected]

Definition at line 52 of file GravityProcess.h.

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

int GravityProcess::yspeed [protected]

Definition at line 52 of file GravityProcess.h.

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

int GravityProcess::zspeed [protected]

Definition at line 52 of file GravityProcess.h.

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


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