ScummVM API documentation
MADS::Player Class Reference

Public Member Functions

 Player (MADSEngine *vm)
 
bool loadSprites (const Common::String &prefix)
 
void setFinalFacing ()
 
void cancelWalk ()
 
void cancelCommand ()
 
void selectSeries ()
 
void updateFrame ()
 
void update ()
 
void idle ()
 
void startWalking (const Common::Point &pt, Facing facing)
 
void walk (const Common::Point &pos, Facing facing)
 
void newWalk ()
 
void nextFrame ()
 
void addWalker (int walker, int trigger)
 
void releasePlayerSprites ()
 
void synchronize (Common::Serializer &s)
 
void removePlayerSprites ()
 
void firstWalk (Common::Point fromPos, Facing fromFacing, Common::Point destPos, Facing destFacing, bool enableFl)
 
void setWalkTrigger (int val)
 
void resetFacing (Facing facing)
 

Static Public Member Functions

static void preloadSequences (const Common::String &prefix, int level)
 

Public Attributes

MADSAction_action
 
Facing _facing
 
Facing _turnToFacing
 
Facing _prepareWalkFacing
 
int _xDirection
 
int _yDirection
 
Facing _targetFacing
 
bool _spritesLoaded
 
int _spritesStart
 
int _spritesIdx
 
int _numSprites
 
bool _stepEnabled
 
bool _spritesChanged
 
bool _visible
 
bool _priorVisible
 
bool _beenVisible
 
bool _walkAnywhere
 
int _frameNumber
 
bool _loadsFirst
 
bool _loadedFirst
 
Common::Point _playerPos
 
Common::Point _targetPos
 
Common::Point _posChange
 
Common::Point _posDiff
 
Common::Point _prepareWalkPos
 
bool _moving
 
int _walkOffScreen
 
int _walkOffScreenSceneId
 
int _special
 
int _ticksAmount
 
uint32 _priorTimer
 
int _velocity
 
int _upcomingTrigger
 
int _trigger
 
bool _scalingVelocity
 
bool _forceRefresh
 
bool _forcePrefix
 
bool _needToWalk
 
bool _readyToWalk
 
bool _commandsAllowed
 
bool _enableAtTarget
 
int _centerOfGravity
 
int _currentDepth
 
int _currentScale
 
Common::String _spritesPrefix
 
int _walkTrigger
 
TriggerMode _walkTriggerDest
 
ActionDetails _walkTriggerAction
 
StopWalkers _stopWalkers
 

Member Function Documentation

◆ loadSprites()

bool MADS::Player::loadSprites ( const Common::String prefix)

Load sprites for the player

◆ setFinalFacing()

void MADS::Player::setFinalFacing ( )

Called when the player has reached the given destination, start him turning to the specified facing

◆ cancelWalk()

void MADS::Player::cancelWalk ( )

Stops the player walking

◆ cancelCommand()

void MADS::Player::cancelCommand ( )

Cancels any outstanding player action

◆ selectSeries()

void MADS::Player::selectSeries ( )

Set up control parameters for the current active series (the direction which the player is facing in)

◆ idle()

void MADS::Player::idle ( )

Handler method for when the player is not moving

◆ startWalking()

void MADS::Player::startWalking ( const Common::Point pt,
Facing  facing 
)

Starts the player walking towards a given point and direction facing

Parameters
posDestination location
facingDirection to face once the destination is reached

◆ walk()

void MADS::Player::walk ( const Common::Point pos,
Facing  facing 
)

Used by the game scripst to make the player walk to a given destination. The difference from startWalking is that this contains several extra layers of checking that startWalking bypasses.

◆ newWalk()

void MADS::Player::newWalk ( )

If a new walk sequence is pending, and has been okayed by the preparser, start the actual walking

◆ addWalker()

void MADS::Player::addWalker ( int  walker,
int  trigger 
)

Add a walker to the current queue

◆ releasePlayerSprites()

void MADS::Player::releasePlayerSprites ( )

Delete any sprites used by the player

◆ synchronize()

void MADS::Player::synchronize ( Common::Serializer s)

Serialize the data of the player


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