ScummVM API documentation
Saga2::Actor Class Reference
Inheritance diagram for Saga2::Actor:
Saga2::GameObject

Public Types

enum  {
  kAFLobotomized = (1 << 0), kAFTemporary = (1 << 1), kAFAfraid = (1 << 2), kAFHasAssignment = (1 << 3),
  kAFSpecialAttack = (1 << 4), kAFFightStance = (1 << 5)
}
 
enum  vitalityRecovery { kRecPointsPerVitality = 10 }
 

Public Member Functions

 Actor (const ResourceActor &res)
 
 Actor (Common::InSaveFile *in)
 
int32 archiveSize ()
 
void write (Common::MemoryWriteStreamDynamic *out)
 
void deleteActor ()
 
void stopMoving ()
 
void die ()
 
void imNotQuiteDead ()
 
void vitalityUpdate ()
 
void activateActor ()
 
void deactivateActor ()
 
void delobotomize ()
 
void lobotomize ()
 
ActorAssignmentgetAssignment ()
 
bool hasProperty (const ActorProperty &actorProp)
 
bool inReach (const TilePoint &tp)
 
bool inUseRange (const TilePoint &tp, GameObject *obj)
 
bool isDead ()
 
bool isImmobile ()
 
GameObjectoffensiveObject ()
 
void defensiveObject (GameObject **priPtr, GameObject **secPtr=NULL)
 
GameObjectblockingObject (Actor *attacker)
 
void totalArmorAttributes (ArmorAttributes &armorAttribs)
 
bool inAttackRange (const TilePoint &tp)
 
void attack (GameObject *obj)
 
void stopAttack (GameObject *obj)
 
bool canDefend ()
 
int16 offenseScore ()
 
int16 defenseScore ()
 
void handleSuccessfulStrike (GameObject *weapon)
 
int16 getDisposition ()
 
int16 setDisposition (int16 newDisp)
 
ActorAttributesgetStats ()
 
ActorAttributesgetBaseStats ()
 
void getColorTranslation (ColorTable map)
 
bool isInterruptable ()
 
bool isPermanentlyUninterruptable ()
 
void setInterruptablity (bool val)
 
void setActionPoints (uint8 points)
 
void dropInventory ()
 
void holdInRightHand (ObjectID objID)
 
void holdInLeftHand (ObjectID objID)
 
void wear (ObjectID objID, uint8 where)
 
void updateAppearance (int32 deltaTime)
 
bool setAvailableAction (int16 action1, int16 action2, int16 action3, int16 actiondefault)
 
int16 setAction (int16 newState, int16 flags)
 
bool isActionAvailable (int16 newState, bool anyDir=false)
 
int16 animationFrames (int16 actionType, Direction dir)
 
bool nextAnimationFrame ()
 
bool calcSpriteFrames ()
 
int pathFindState ()
 
void evaluateNeeds ()
 
void updateState ()
 
void handleTaskCompletion (TaskResult result)
 
void handleOffensiveAct (Actor *attacker)
 
void handleDamageTaken (uint8 damage)
 
void handleSuccessfulStrike (Actor *target, int8 damage)
 
void handleSuccessfulKill (Actor *target)
 
void evaluateMeleeAttack (Actor *attacker)
 
void bandWith (Actor *newLeader)
 
void disband ()
 
bool inBandingRange ()
 
bool addKnowledge (uint16 kID)
 
bool removeKnowledge (uint16 kID)
 
void clearKnowledge ()
 
void useKnowledge (scriptCallFrame &scf)
 
bool canSenseProtaganistIndirectly (SenseInfo &info, int16 range)
 
bool canSenseSpecificActorIndirectly (SenseInfo &info, int16 range, Actor *a)
 
bool canSenseSpecificObjectIndirectly (SenseInfo &info, int16 range, ObjectID obj)
 
bool canSenseActorPropertyIndirectly (SenseInfo &info, int16 range, ActorPropertyID prop)
 
bool canSenseObjectPropertyIndirectly (SenseInfo &info, int16 range, ObjectPropertyID prop)
 
bool takeMana (ActorManaID i, int8 dMana)
 
bool hasMana (ActorManaID i, int8 dMana)
 
uint32 getBaseEnchantmentEffects ()
 
uint16 getBaseResistance ()
 
uint16 getBaseImmunity ()
 
uint16 getBaseRecovery ()
 
bool resists (effectResistTypes r)
 
bool isImmuneTo (effectImmuneTypes r)
 
bool hasEffect (effectOthersTypes e)
 
void setResist (effectResistTypes r, bool on)
 
void setImmune (effectImmuneTypes r, bool on)
 
void setEffect (effectOthersTypes e, bool on)
 
bool makeSavingThrow ()
 
void setFightStance (bool val)
 
- Public Member Functions inherited from Saga2::GameObject
ObjectID thisID ()
 
 GameObject (const ResourceGameObject &res)
 
 GameObject (Common::InSaveFile *in)
 
void read (Common::InSaveFile *in, bool expandProto)
 
int32 archiveSize ()
 
void write (Common::MemoryWriteStreamDynamic *out, bool expandProto)
 
void deleteObject ()
 
void deleteObjectRecursive ()
 
GameObjectparent ()
 
GameObjectnext ()
 
GameObjectchild ()
 
ObjectID IDParent ()
 
ObjectID IDNext ()
 
ObjectID IDChild ()
 
GameWorldworld ()
 
int16 getMapNum ()
 
int16 sprNum (int16 state)
 
int32 getSprOffset (int16 num=-1)
 
void recharge ()
 
int16 getChargeType ()
 
bool deductCharge (ActorManaID manaID, uint16 manaCost)
 
bool hasCharge (ActorManaID manaID, uint16 manaCost)
 
void setLocation (const Location &loc)
 
void setLocation (const TilePoint &tp)
 
void move (const Location &loc)
 
void move (const Location &loc, int16 num)
 
void move (const TilePoint &tp)
 
void updateImage (ObjectID)
 
bool unstack ()
 
bool moveMerged (const Location &loc)
 
bool moveMerged (const Location &loc, int16 num=1)
 
bool moveMerged (const TilePoint &tp)
 
ObjectID extractMerged (const Location &loc, int16 num)
 
GameObjectextractMerged (int16 num)
 
void moveRandom (const TilePoint &minLoc, const TilePoint &maxLoc)
 
ObjectID copy (const Location &loc)
 
ObjectID copy (const Location &loc, int16 num)
 
ObjectID makeAlias (const Location &loc)
 
void move (int16 slot)
 
void activate ()
 
void deactivate ()
 
bool isAlias ()
 
bool canContain (ObjectID item)
 
bool isContaining (GameObject *item)
 
bool isContaining (ObjectTarget *objTarget)
 
bool hasProperty (const ObjectProperty &objProp)
 
TilePoint getFirstEmptySlot (GameObject *obj)
 
bool getAvailableSlot (GameObject *obj, TilePoint *slot, bool canMerge=false, GameObject **mergeObj=NULL)
 
bool placeObject (ObjectID enactor, ObjectID objID, bool canMerge=false, int16 num=1)
 
void dropInventoryObject (GameObject *obj, int16 count=1)
 
GameObjectgetIntangibleContainer (int containerType)
 
bool use (ObjectID enactor)
 
bool useOn (ObjectID enactor, ObjectID item)
 
bool useOn (ObjectID enactor, ActiveItem *item)
 
bool useOn (ObjectID enactor, Location &loc)
 
bool take (ObjectID enactor, int16 num=1)
 
bool drop (ObjectID enactor, const Location &l, int16 num=1)
 
bool dropOn (ObjectID enactor, ObjectID target, int16 num=1)
 
bool dropOn (ObjectID enactor, ActiveItem *target, const Location &loc, int16 num=1)
 
bool open (ObjectID enactor)
 
bool close (ObjectID enactor)
 
bool strike (ObjectID enactor, ObjectID item)
 
bool damage (ObjectID enactor, ObjectID target)
 
bool eat (ObjectID enactor)
 
bool insert (ObjectID enactor, ObjectID item)
 
bool remove (ObjectID enactor)
 
bool acceptDrop (ObjectID enactor, ObjectID droppedObj, int count)
 
bool acceptDamage (ObjectID enactor, int8 absDamage, effectDamageTypes dType=kDamageOther, int8 dice=0, uint8 sides=1, int8 perDieMod=0)
 
bool acceptHealing (ObjectID enactor, int8 absDamage, int8 dice=0, uint8 sides=1, int8 perDieMod=0)
 
bool acceptStrike (ObjectID enactor, ObjectID strikingObj, uint8 skillIndex)
 
bool acceptLockToggle (ObjectID enactor, uint8 keyCode)
 
bool acceptMix (ObjectID enactor, ObjectID mixObj)
 
bool acceptInsertion (ObjectID enactor, ObjectID item, int16 count)
 
bool acceptInsertionAt (ObjectID enactor, ObjectID item, const TilePoint &where, int16 num=1)
 
ObjectID possessor ()
 
ProtoObjproto ()
 
TilePoint getLocation () const
 
TilePoint getWorldLocation ()
 
bool getWorldLocation (Location &loc)
 
Location notGetLocation ()
 
Location notGetWorldLocation ()
 
const char * objName ()
 
void objCursorText (char nameBuf[], const int8 size, int16 count=-1)
 
bool isTrueSkill ()
 
uint16 getNameIndex ()
 
void setNameIndex (uint16 n)
 
const char * protoName ()
 
void updateState ()
 
bool isOpen ()
 
bool isLocked ()
 
bool isImportant ()
 
bool isGhosted ()
 
bool isInvisible ()
 
bool isMoving ()
 
bool isActivated ()
 
void setScavengable (bool val)
 
bool isScavengable ()
 
void setObscured (bool val)
 
bool isObscured ()
 
void setTriggeringTAG (bool val)
 
bool isTriggeringTAG ()
 
void setOnScreen (bool val)
 
bool isOnScreen ()
 
void setSightedByCenter (bool val)
 
bool isSightedByCenter ()
 
bool isMissile ()
 
SpritegetIconSprite ()
 
SpritegetGroundSprite ()
 
uint16 containmentSet ()
 
uint16 scriptClass ()
 
uint16 getScript ()
 
void setScript (uint16 scr)
 
void setFlags (uint8 newval, uint8 changeMask)
 
uint8 getHitPoints ()
 
void setHitPoints (uint8 hp)
 
void getColorTranslation (ColorTable map)
 
int32 getProtoNum ()
 
void setProtoNum (int32 nProto)
 
uint16 getExtra ()
 
void setExtra (uint16 x)
 
void evalEnchantments ()
 
bool makeSavingThrow ()
 
bool inRange (const TilePoint &tp, uint16 range)
 
bool isCarryable ()
 
bool isMergeable ()
 
void timerTick (TimerID timer)
 
void senseObject (SensorID sensor, ObjectID sensedObj)
 
void senseEvent (SensorID sensor, int16 type, ObjectID directObject, ObjectID indirectObject)
 
bool addTimer (TimerID id)
 
bool addTimer (TimerID id, int16 frameInterval)
 
void removeTimer (TimerID id)
 
void removeAllTimers ()
 
bool addProtaganistSensor (SensorID id, int16 range)
 
bool addSpecificActorSensor (SensorID id, int16 range, Actor *a)
 
bool addSpecificObjectSensor (SensorID id, int16 range, ObjectID obj)
 
bool addActorPropertySensor (SensorID id, int16 range, ActorPropertyID prop)
 
bool addObjectPropertySensor (SensorID id, int16 range, ObjectPropertyID prop)
 
bool addEventSensor (SensorID id, int16 range, int16 eventType)
 
void removeSensor (SensorID id)
 
void removeAllSensors ()
 
bool canSenseProtaganist (SenseInfo &info, int16 range)
 
bool canSenseSpecificActor (SenseInfo &info, int16 range, Actor *a)
 
bool canSenseSpecificObject (SenseInfo &info, int16 range, ObjectID obj)
 
bool canSenseActorProperty (SenseInfo &info, int16 range, ActorPropertyID prop)
 
bool canSenseObjectProperty (SenseInfo &info, int16 range, ObjectPropertyID prop)
 
bool merge (ObjectID enactor, ObjectID objToMergeID, int16 count)
 
bool stack (ObjectID enactor, ObjectID objToStackID)
 
bool canFitBulkwise (GameObject *obj)
 
bool canFitMasswise (GameObject *obj)
 
uint16 totalContainedMass ()
 
uint16 totalContainedBulk ()
 
uint16 totalMass ()
 
uint16 totalBulk ()
 
uint16 massCapacity ()
 
uint16 bulkCapacity ()
 

Static Public Member Functions

static ActornewActor (int16 protoNum, uint16 nameIndex, uint16 scriptIndex, int32 appearanceNum, uint8 colorSchemeIndex, uint8 factionNum, uint8 initFlags)
 
- Static Public Member Functions inherited from Saga2::GameObject
static const char * nameText (uint16 index)
 
static GameObjectobjectAddress (ObjectID id)
 
static ProtoObjprotoAddress (ObjectID id)
 
static int32 nameIndexToID (uint16 ind)
 
static Common::Array< ObjectID > nameToID (Common::String name)
 
static GameObjectnewObject ()
 
static int32 canStackOrMerge (GameObject *dropObj, GameObject *target)
 
static void mergeWith (GameObject *dropObj, GameObject *target, int16 count)
 

Public Attributes

uint8 _faction
 
uint8 _colorScheme
 
int32 _appearanceID
 
int8 _attitude
 
int8 _mood
 
uint8 _disposition
 
Direction _currentFacing
 
int16 _tetherLocU
 
int16 _tetherLocV
 
int16 _tetherDist
 
ObjectID _leftHandObject
 
ObjectID _rightHandObject
 
uint16 _knowledge [16]
 
uint16 _schedule
 
uint8 _conversationMemory [4]
 
uint8 _currentAnimation
 
uint8 _currentPose
 
uint8 _animationFlags
 
uint8 _flags
 
ActorPose _poseInfo
 
ActorAppearance_appearance
 
int16 _cycleCount
 
int16 _kludgeCount
 
uint32 _enchantmentFlags
 
MotionTask_moveTask
 
TaskStack_curTask
 
uint8 _currentGoal
 
uint8 _deactivationCounter
 
ActorAssignment_assignment
 
ActorAttributes _effectiveStats
 
uint8 _actionCounter
 
uint16 _effectiveResistance
 
uint16 _effectiveImmunity
 
int16 _recPointsPerUpdate
 
int16 _currentRecoveryPoints
 
Actor_leader
 
ObjectID _leaderID
 
Band_followers
 
BandID _followersID
 
ObjectID _armorObjects [ARMOR_COUNT]
 
GameObject_currentTarget
 
ObjectID _currentTargetID
 
int16 _scriptVar [kActorScriptVars]
 
- Public Attributes inherited from Saga2::GameObject
ObjectData _data
 
uint _index
 
bool _godmode
 

Additional Inherited Members

- Protected Member Functions inherited from Saga2::GameObject
void remove ()
 
void append (ObjectID newParent)
 
void insert (ObjectID newPrev)
 
- Static Protected Member Functions inherited from Saga2::GameObject
static ObjectID * getHeadPtr (ObjectID parentID, TilePoint &l)
 
- Protected Attributes inherited from Saga2::GameObject
ProtoObj_prototype
 

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