ScummVM API documentation
Sherlock::Tattoo::TattooPerson Class Reference
Inheritance diagram for Sherlock::Tattoo::TattooPerson:
Sherlock::Person Sherlock::Sprite Sherlock::BaseObject

Public Member Functions

void clearNPC ()
 
void updateNPC ()
 
void pushNPCPath ()
 
void pullNPCPath ()
 
void checkWalkGraphics ()
 
void synchronize (Serializer &s)
 
void walkHolmesToNPC ()
 
void walkBothToCoords (const PositionFacing &holmesDest, const PositionFacing &npcDest)
 
void adjustSprite () override
 
void gotoStand () override
 
void setWalking () override
 
void walkToCoords (const Point32 &destPos, int destDir) override
 
void setObjTalkSequence (int seq) override
 
void centerScreenOnPerson () override
 
- Public Member Functions inherited from Sherlock::Person
void goAllTheWay ()
 
- Public Member Functions inherited from Sherlock::Sprite
void clear ()
 
void setImageFrame ()
 
void checkSprite ()
 
int frameWidth () const
 
int frameHeight () const
 
const Common::Rect getOldBounds () const
 
- Public Member Functions inherited from Sherlock::BaseObject
bool hasAborts () const
 
void checkObject ()
 
int checkNameForCodes (const Common::String &name, FixedTextActionId fixedTextActionId=kFixedTextAction_Invalid)
 

Public Attributes

Common::Stack< SavedNPCPath_pathStack
 
int _npcIndex
 
int _npcPause
 
byte _npcPath [MAX_NPC_PATH]
 
bool _npcMoved
 
int _npcFacing
 
bool _resetNPCPath
 
int _savedNpcSequence
 
int _savedNpcFrame
 
int _tempX
 
int _tempScaleVal
 
bool _updateNPCPath
 
bool _lookHolmes
 
- Public Attributes inherited from Sherlock::Person
Common::Queue< Common::Point_walkTo
 
int _srcZone
 
int _destZone
 
bool _walkLoaded
 
Common::String _portrait
 
Common::Point _walkDest
 
Common::String _npcName
 
Common::Path _walkVGSName
 
- Public Attributes inherited from Sherlock::Sprite
Common::String _name
 
Common::String _examine
 
Common::String _pickUp
 
WalkSequences _walkSequences
 
Common::Point _noShapeSize
 
int _status
 
int8 _misc
 
ImageFrame_stopFrames [8]
 
ImageFile_altImages
 
int _altSeq
 
int _centerWalk
 
Common::Point _adjust
 
int _oldWalkSequence
 
- Public Attributes inherited from Sherlock::BaseObject
SpriteType _type
 
Common::String _description
 
byte * _sequences
 
ImageFile_images
 
ImageFrame_imageFrame
 
int _sequenceNumber
 
int _startSeq
 
int _walkCount
 
int _allow
 
int _frameNumber
 
Point32 _position
 
Point32 _delta
 
Common::Point _oldPosition
 
Common::Point _oldSize
 
Point32 _goto
 
int _lookFlag
 
int _requiredFlag [2]
 
Common::Point _noShapeSize
 
int _status
 
int8 _misc
 
int _maxFrames
 
int _flags
 
AType _aType
 
int _lookFrames
 
int _seqCounter
 
PositionFacing _lookPosition
 
int _lookcAnim
 
int _seqStack
 
int _seqTo
 
uint _descOffset
 
int _seqCounter2
 
uint _seqSize
 
UseType _use [6]
 
int _quickDraw
 
int _scaleVal
 
int _gotoSeq
 
int _talkSeq
 
int _restoreSlot
 

Protected Member Functions

Common::Point getSourcePoint () const override
 
- Protected Member Functions inherited from Sherlock::BaseObject
bool checkEndOfSequence ()
 
void setObjSequence (int seq, bool wait)
 

Additional Inherited Members

- Static Public Member Functions inherited from Sherlock::Sprite
static void setVm (SherlockEngine *vm)
 
- Static Public Member Functions inherited from Sherlock::BaseObject
static void setVm (SherlockEngine *vm)
 
- Static Public Attributes inherited from Sherlock::BaseObject
static bool _countCAnimFrames
 
- Static Protected Attributes inherited from Sherlock::BaseObject
static SherlockEngine_vm
 

Member Function Documentation

◆ getSourcePoint()

Common::Point Sherlock::Tattoo::TattooPerson::getSourcePoint ( ) const
overrideprotectedvirtual

Get the source position for a character potentially affected by scaling

Implements Sherlock::Person.

◆ clearNPC()

void Sherlock::Tattoo::TattooPerson::clearNPC ( )

Clear the NPC related data

◆ updateNPC()

void Sherlock::Tattoo::TattooPerson::updateNPC ( )

Called from doBgAnim to move NPCs along any set paths. If an NPC is paused in his path, he will remain paused until his pause timer runs out. If he is walking somewhere, he will continue walking there until he reaches the dest position. When an NPC stops moving, the next element of his path is processed.

The path is an array of bytes with control codes followed by their parameters as needed.

◆ pushNPCPath()

void Sherlock::Tattoo::TattooPerson::pushNPCPath ( )

Push the NPC's path data onto the path stack for when a talk file moves the NPC that has some control codes.

◆ pullNPCPath()

void Sherlock::Tattoo::TattooPerson::pullNPCPath ( )

Pull an NPC's path data that has been previously saved on the path stack for that character. There are two possibilities for when the NPC was interrupted, and both are handled differently: 1) The NPC was paused at a position If the NPC didn't move, we can just restore his pause counter and exit. But if he did move, he must return to that position, and the path index must be reset to the pause he was executing. This means that the index must be decremented by 3 2) The NPC was in route to a position He must be set to walk to that position again. This is done by moving the path index so that it points to the code that set the NPC walking there in the first place. The regular calls to updateNPC will handle the rest

◆ checkWalkGraphics()

void Sherlock::Tattoo::TattooPerson::checkWalkGraphics ( )

Checks a sprite associated with an NPC to see if the frame sequence specified in the sequence number uses alternate graphics, and if so if they need to be loaded

◆ synchronize()

void Sherlock::Tattoo::TattooPerson::synchronize ( Serializer s)

Synchronize the data for a savegame

◆ walkHolmesToNPC()

void Sherlock::Tattoo::TattooPerson::walkHolmesToNPC ( )

Walk Holmes to the NPC

◆ walkBothToCoords()

void Sherlock::Tattoo::TattooPerson::walkBothToCoords ( const PositionFacing holmesDest,
const PositionFacing npcDest 
)

Walk both the specified character and Holmes to specified destination positions

◆ adjustSprite()

void Sherlock::Tattoo::TattooPerson::adjustSprite ( )
overridevirtual

This adjusts the sprites position, as well as its animation sequence:

Implements Sherlock::Sprite.

◆ gotoStand()

void Sherlock::Tattoo::TattooPerson::gotoStand ( )
overridevirtual

Bring a moving character to a standing position

Implements Sherlock::Sprite.

◆ setWalking()

void Sherlock::Tattoo::TattooPerson::setWalking ( )
overridevirtual

Set the variables for moving a character from one poisition to another in a straight line

Implements Sherlock::Sprite.

◆ walkToCoords()

void Sherlock::Tattoo::TattooPerson::walkToCoords ( const Point32 destPos,
int  destDir 
)
overridevirtual

Walk to the co-ordinates passed, and then face the given direction

Implements Sherlock::Person.

◆ setObjTalkSequence()

void Sherlock::Tattoo::TattooPerson::setObjTalkSequence ( int  seq)
overridevirtual

Adjusts the frame and sequence variables of a sprite that corresponds to the current speaker so that it points to the beginning of the sequence number's talk sequence in the object's sequence buffer

Parameters
seqWhich sequence to use (if there's more than 1)
Remarks
1: First talk seq, 2: second talk seq, etc.

Reimplemented from Sherlock::Sprite.

◆ centerScreenOnPerson()

void Sherlock::Tattoo::TattooPerson::centerScreenOnPerson ( )
overridevirtual

Center the visible screen so that the person is in the center of the screen

Reimplemented from Sherlock::Person.


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