ActorAnimProcess Class Reference

#include <ActorAnimProcess.h>

Inheritance diagram for ActorAnimProcess:

Process TargetedAnimProcess List of all members.

Public Member Functions

 ActorAnimProcess ()
 ActorAnimProcess (Actor *actor, Animation::Sequence action, uint32 dir, uint32 steps=0)
 ENABLE_RUNTIME_CLASSTYPE ()
virtual bool run (const uint32 framenum)
virtual void terminate ()
virtual void dumpInfo ()
Animation::Sequence getAction () const
bool loadData (IDataSource *ids, uint32 version)

Protected Member Functions

virtual void saveData (ODataSource *ods)
virtual bool init ()
void doSpecial ()
void doHitSpecial (Item *hit)

Protected Attributes

Animation::Sequence action
uint32 dir
uint32 steps
AnimationTrackertracker
int repeatcounter
uint32 currentstep
bool firstframe
bool animAborted
bool attackedSomething

Detailed Description

Definition at line 30 of file ActorAnimProcess.h.


Constructor & Destructor Documentation

ActorAnimProcess::ActorAnimProcess (  ) 

Definition at line 60 of file ActorAnimProcess.cpp.

ActorAnimProcess::ActorAnimProcess ( Actor actor,
Animation::Sequence  action,
uint32  dir,
uint32  steps = 0 
)

note: this probably needs some more parameters

Definition at line 65 of file ActorAnimProcess.cpp.

References action, currentstep, dir, firstframe, Object::getObjId(), Process::item_num, steps, tracker, and Process::type.


Member Function Documentation

void ActorAnimProcess::doHitSpecial ( Item hit  )  [protected]

perform special action when hitting an opponent

Definition at line 487 of file ActorAnimProcess.cpp.

References Actor::ACT_DEAD, action, Kernel::addProcess(), Animation::attack, dir, Item::FLG_FAST_ONLY, Kernel::get_instance(), AudioProcess::get_instance(), getActor(), Actor::getActorFlags(), Actor::getEquip(), getItem(), Item::getLocation(), getMainActor(), Item::getShape(), Process::item_num, ShapeInfo::SE_WEAPON, Process::waitFor(), x, x_fact, y, and y_fact.

Referenced by run().

void ActorAnimProcess::doSpecial (  )  [protected]

perform special action for an animation

Definition at line 357 of file ActorAnimProcess.cpp.

References Actor::ACT_DEAD, action, Kernel::addProcess(), Animation::attack, Item::canExistAt(), Item::countNearby(), Actor::createActor(), Container::destroy(), dir, Actor::doAnim(), Item::explode(), Item::FLG_FAST_ONLY, SettingManager::get(), Kernel::get_instance(), World::get_instance(), SettingManager::get_instance(), AudioProcess::get_instance(), getActor(), Actor::getCombatProcess(), World::getCurrentMap(), Actor::getDir(), Actor::getEquip(), getItem(), Item::getLocation(), getMainActor(), Item::getMapNum(), Item::getRange(), Item::getShape(), UCList::getSize(), CombatProcess::getTarget(), UCList::getuint16(), Process::item_num, Item::move(), AudioProcess::playSFX(), Animation::readyWeapon, Animation::run, ShapeInfo::SE_WEAPON, Actor::setActorFlag(), Item::setFlag(), Actor::setInCombat(), CombatProcess::setTarget(), Animation::standUp, CurrentMap::surfaceSearch(), Animation::unreadyWeapon, x, x_fact, y, and y_fact.

Referenced by run().

void ActorAnimProcess::dumpInfo (  )  [virtual]

dump some info about this process to pout

Reimplemented from Process.

Definition at line 626 of file ActorAnimProcess.cpp.

References action, dir, Process::dumpInfo(), and pout.

ActorAnimProcess::ENABLE_RUNTIME_CLASSTYPE (  ) 

Reimplemented from Process.

Reimplemented in TargetedAnimProcess.

Animation::Sequence ActorAnimProcess::getAction (  )  const [inline]

Definition at line 47 of file ActorAnimProcess.h.

bool ActorAnimProcess::init (  )  [protected, virtual]

Reimplemented in TargetedAnimProcess.

Definition at line 80 of file ActorAnimProcess.cpp.

References Actor::ACT_ANIMLOCK, action, animAborted, attackedSomething, dir, Actor::direction, Item::FLG_FASTAREA, Kernel::get_instance(), getActor(), Actor::getActorFlags(), Actor::getDir(), Item::getFlags(), Kernel::getFrameNum(), Process::getPid(), AnimationTracker::init(), Process::item_num, Actor::lastanim, perr, pout, repeatcounter, Actor::setActorFlag(), steps, tracker, and watchactor.

Referenced by TargetedAnimProcess::init(), and run().

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

load Process data

Reimplemented from Process.

Reimplemented in TargetedAnimProcess.

Definition at line 655 of file ActorAnimProcess.cpp.

References action, animAborted, attackedSomething, currentstep, dir, firstframe, AnimationTracker::load(), Process::loadData(), repeatcounter, steps, and tracker.

Referenced by TargetedAnimProcess::loadData().

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

Implements Process.

Definition at line 139 of file ActorAnimProcess.cpp.

References AnimAction::AAF_UNSTOPPABLE, AnimFrame::AFF_SPECIAL, animAborted, attackedSomething, Item::collideMove(), currentstep, dir, doHitSpecial(), doSpecial(), Item::fall(), firstframe, AnimFrame::flags, AnimAction::flags, Item::FLG_FASTAREA, AnimAction::framerepeat, AudioProcess::get_instance(), Kernel::get_instance(), getActor(), AnimationTracker::getAnimAction(), AnimationTracker::getAnimFrame(), Item::getFlags(), AnimationTracker::getFrame(), Kernel::getFrameNum(), AnimationTracker::getInterpolatedPosition(), getItem(), Item::getLocation(), Item::getShape(), AnimationTracker::getSpeed(), AnimationTracker::hitSomething(), Item::hurl(), init(), AnimationTracker::isBlocked(), AnimationTracker::isDone(), AnimationTracker::isUnsupported(), Process::item_num, AudioProcess::playSFX(), pout, Item::receiveHit(), repeatcounter, Process::result, Item::setFrame(), AnimFrame::sfx, AnimationTracker::stepFrom(), steps, terminate(), Process::terminateDeferred(), tracker, AnimationTracker::updateActorFlags(), watchactor, x, and y.

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

save the Process data

Reimplemented from Process.

Reimplemented in TargetedAnimProcess.

Definition at line 632 of file ActorAnimProcess.cpp.

References action, animAborted, attackedSomething, currentstep, dir, firstframe, repeatcounter, AnimationTracker::save(), Process::saveData(), steps, tracker, ODataSource::write1(), and ODataSource::write2().

Referenced by TargetedAnimProcess::saveData().

void ActorAnimProcess::terminate (  )  [virtual]

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

Reimplemented from Process.

Definition at line 590 of file ActorAnimProcess.cpp.

References AnimAction::AAF_DESTROYACTOR, Actor::ACT_ANIMLOCK, Kernel::addProcess(), Actor::clearActorFlag(), Kernel::get_instance(), getActor(), Kernel::getFrameNum(), Process::item_num, pout, Process::terminate(), tracker, and watchactor.

Referenced by run().


Member Data Documentation

Animation::Sequence ActorAnimProcess::action [protected]

Definition at line 61 of file ActorAnimProcess.h.

Referenced by ActorAnimProcess(), doHitSpecial(), doSpecial(), dumpInfo(), init(), loadData(), and saveData().

bool ActorAnimProcess::animAborted [protected]

Definition at line 71 of file ActorAnimProcess.h.

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

bool ActorAnimProcess::attackedSomething [protected]

Definition at line 73 of file ActorAnimProcess.h.

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

uint32 ActorAnimProcess::currentstep [protected]

Definition at line 67 of file ActorAnimProcess.h.

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

uint32 ActorAnimProcess::dir [protected]

Definition at line 62 of file ActorAnimProcess.h.

Referenced by ActorAnimProcess(), doHitSpecial(), doSpecial(), dumpInfo(), init(), loadData(), run(), and saveData().

bool ActorAnimProcess::firstframe [protected]

Definition at line 69 of file ActorAnimProcess.h.

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

int ActorAnimProcess::repeatcounter [protected]

Definition at line 66 of file ActorAnimProcess.h.

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

uint32 ActorAnimProcess::steps [protected]

Definition at line 63 of file ActorAnimProcess.h.

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

AnimationTracker* ActorAnimProcess::tracker [protected]

Definition at line 65 of file ActorAnimProcess.h.

Referenced by ActorAnimProcess(), TargetedAnimProcess::init(), init(), loadData(), run(), saveData(), and terminate().


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