ScummVM API documentation
Twp::Object Class Reference

Public Member Functions

 Object (HSQOBJECT o, const Common::String &key)
 
Common::String getName () const
 
int getId () const
 
void setState (int state, bool instant=false)
 
int getState () const
 
bool isTouchable ()
 
void setTouchable (bool value)
 
void play (int state, bool loop=false, bool instant=false)
 
void play (const Common::String &state, bool loop=false, bool instant=false)
 
void showLayer (const Common::String &layer, bool visible)
 
Facing getFacing () const
 
void lockFacing (int facing)
 
void lockFacing (Facing left, Facing right, Facing front, Facing back)
 
void resetLockFacing ()
 
void trig (const Common::String &name)
 
void setPop (int count)
 
int getPop () const
 
float popScale () const
 
float getScale ()
 
int defaultVerbId ()
 
void setFacing (Facing facing)
 
Math::Vector2d getUsePos ()
 
Facing getDoorFacing ()
 
void setIcon (int fps, const Common::StringArray &icons)
 
void setIcon (const Common::String &icon)
 
Common::String getIcon ()
 
ObjectIcons getIcons () const
 
bool inInventory ()
 
void removeInventory (Common::SharedPtr< Object > obj)
 
int getFlags ()
 
UseFlag useFlag ()
 
bool contains (const Math::Vector2d &pos)
 
void stopObjectMotors ()
 
void dependentOn (Common::SharedPtr< Object > dependentObj, int state)
 
Common::String getAnimName (const Common::String &key)
 
void setHeadIndex (int head)
 
void setAnimationNames (const Common::String &head, const Common::String &stand, const Common::String &walk, const Common::String &reach)
 
Common::String getReachAnim ()
 
bool isWalking ()
 
void stopWalking ()
 
void setCostume (const Common::String &name, const Common::String &sheet)
 
void stand ()
 
void update (float elapsedSec)
 
void setAlphaTo (Common::SharedPtr< Motor > alphaTo)
 
void setRotateTo (Common::SharedPtr< Motor > rotateTo)
 
void setMoveTo (Common::SharedPtr< Motor > moveTo)
 
void setReach (Common::SharedPtr< Motor > reach)
 
Common::SharedPtr< MotorgetWalkTo ()
 
Common::SharedPtr< MotorgetReach ()
 
void setTalking (Common::SharedPtr< Motor > talking)
 
void setShakeTo (Common::SharedPtr< Motor > shakeTo)
 
void setScaleTo (Common::SharedPtr< Motor > scaleTo)
 
Common::SharedPtr< MotorgetTalking ()
 
void stopTalking ()
 
void turn (Facing facing)
 
void jiggle (float amount)
 
void inventoryScrollUp ()
 
void inventoryScrollDown ()
 

Static Public Member Functions

static Common::SharedPtr< ObjectcreateActor ()
 
static void setRoom (Common::SharedPtr< Object > object, Common::SharedPtr< Room > room)
 
static void blinkRate (Common::SharedPtr< Object >, float min, float max)
 
static void walk (Common::SharedPtr< Object > obj, const Math::Vector2d &pos, int facing=0)
 
static void walk (Common::SharedPtr< Object > actor, Common::SharedPtr< Object > obj)
 
static void say (Common::SharedPtr< Object > obj, const Common::StringArray &texts, const Color &color)
 
static void pickupObject (Common::SharedPtr< Object > actor, Common::SharedPtr< Object > obj)
 
static void execVerb (Common::SharedPtr< Object > obj)
 
static void turn (Common::SharedPtr< Object > actor, Common::SharedPtr< Object > obj)
 

Public Attributes

HSQOBJECT _table
 
Common::String _name
 
Common::String _parent
 
Common::String _sheet
 
Common::String _key
 
Common::String _costumeName
 
Common::String _costumeSheet
 
int _state = -1
 
Math::Vector2d _usePos
 
Direction _useDir = dNone
 
Common::Rect _hotspot
 
ObjectType _objType = otNone
 
Common::SharedPtr< Room_room
 
Common::Array< ObjectAnimation_anims
 
bool _temporary = false
 
Common::SharedPtr< Node_node
 
Common::SharedPtr< TextNode_sayNode
 
Common::SharedPtr< Anim_nodeAnim
 
Common::SharedPtr< Layer_layer
 
Common::StringArray _hiddenLayers
 
Common::String _animName
 
int _animFlags = 0
 
bool _animLoop = false
 
Common::Array< LockFacing_facingMap
 
Facing _facing = Facing::FACE_FRONT
 
int _facingLockValue = 0
 
float _fps = 0.f
 
Common::HashMap< int, Common::SharedPtr< Trigger > > _triggers
 
Math::Vector2d _talkOffset
 
Math::Vector2d _walkSpeed
 
bool _triggerActive = false
 
bool _useWalkboxes = false
 
float _volume = 1.f
 
Color _talkColor
 
Common::HashMap< Common::String, Common::String_animNames
 
bool _lit = false
 
Common::SharedPtr< Object_owner
 
Common::Array< Common::SharedPtr< Object > > _inventory
 
int _inventoryOffset = 0
 
int _iconIndex = 0
 
float _iconElapsed = 0.f
 
HSQOBJECT _enter
 
HSQOBJECT _leave
 
int _dependentState = 0
 
Common::SharedPtr< Object_dependentObj
 
float _popElapsed = 0.f
 
int _popCount = 0
 
Sentence _exec
 
int _sound = 0
 
bool _jiggle = false
 

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