ScummVM API documentation
Ultima::Ultima8::AnimationTracker Class Reference

Public Member Functions

bool init (const Actor *actor, Animation::Sequence action, Direction dir, const PathfindingState *state=0)
 
void evaluateMaxAnimTravel (int32 &max_endx, int32 &max_endy, Direction dir)
 
bool step ()
 
bool stepFrom (const Point3 &pt)
 
void updateState (PathfindingState &state)
 update the PathfindingState with latest coordinates and flags
 
void updateActorFlags ()
 update the Actor with latest flags and animframe
 
Point3 getPosition () const
 get the current position
 
Point3 getInterpolatedPosition (int fc) const
 
void getSpeed (int32 &dx, int32 &dy, int32 &dz) const
 get the difference between current position and previous position
 
uint32 getFrame () const
 get the current (shape)frame
 
const AnimActiongetAnimAction () const
 get the current AnimAction
 
const AnimFramegetAnimFrame () const
 get the current AnimFrame
 
void setTargetedMode (const Point3 &pt)
 
bool isDone () const
 
bool isBlocked () const
 
bool isUnsupported () const
 
ObjId hitSomething () const
 
bool load (Common::ReadStream *rs, uint32 version)
 
void save (Common::WriteStream *ods)
 

Member Function Documentation

◆ init()

bool Ultima::Ultima8::AnimationTracker::init ( const Actor actor,
Animation::Sequence  action,
Direction  dir,
const PathfindingState state = 0 
)

initialize the AnimationTracker for the given actor, action, dir if state is non-zero, start from that state instead of the Actor's current state

◆ evaluateMaxAnimTravel()

void Ultima::Ultima8::AnimationTracker::evaluateMaxAnimTravel ( int32 &  max_endx,
int32 &  max_endy,
Direction  dir 
)

evaluate the maximum distance the actor will travel if the current animation runs to completion by incremental calls to step

◆ step()

bool Ultima::Ultima8::AnimationTracker::step ( )

do a single step of the animation returns true if everything ok, false if not caller must decide if animation should continue after a 'false'

◆ stepFrom()

bool Ultima::Ultima8::AnimationTracker::stepFrom ( const Point3 pt)

do a single step of the animation, starting at the point returns true if everything ok, false if not caller must decide if animation should continue after a 'false'


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