ScummVM API documentation
Ultima::Ultima8::MainActor Class Reference
Inheritance diagram for Ultima::Ultima8::MainActor:
Ultima::Ultima8::Actor Ultima::Ultima8::Container Ultima::Ultima8::Item Ultima::Ultima8::Object

Public Types

enum  CruBatteryType { NoBattery = 0, ChemicalBattery = 1, FissionBattery = 2, FusionBattery = 3 }
 
- Public Types inherited from Ultima::Ultima8::Actor
enum  ActorFlags {
  ACT_INVINCIBLE = 0x000001, ACT_ASCENDING = 0x000002, ACT_DESCENDING = 0x000004, ACT_ANIMLOCK = 0x000008,
  ACT_KNEELING = 0x000100, ACT_FIRSTSTEP = 0x000400, ACT_INCOMBAT = 0x000800, ACT_DEAD = 0x001000,
  ACT_SURRENDERED = 0x002000, ACT_WEAPONREADY = 0x004000, ACT_COMBATRUN = 0x008000, ACT_AIRWALK = 0x010000,
  ACT_IMMORTAL = 0x040000, ACT_WITHSTANDDEATH = 0x080000, ACT_FEIGNDEATH = 0x100000, ACT_STUNNED = 0x200000,
  ACT_POISONED = 0x400000, ACT_PATHFINDING = 0x800000
}
 
- Public Types inherited from Ultima::Ultima8::Item
enum  statusflags {
  FLG_DISPOSABLE = 0x0002, FLG_OWNED = 0x0004, FLG_CONTAINED = 0x0008, FLG_INVISIBLE = 0x0010,
  FLG_FLIPPED = 0x0020, FLG_IN_NPC_LIST = 0x0040, FLG_FAST_ONLY = 0x0080, FLG_GUMP_OPEN = 0x0100,
  FLG_EQUIPPED = 0x0200, FLG_BOUNCING = 0x0400, FLG_ETHEREAL = 0x0800, FLG_HANGING = 0x1000,
  FLG_FASTAREA = 0x2000, FLG_LOW_FRICTION = 0x4000, FLG_BROKEN = 0x8000
}
 
enum  extflags {
  EXT_FIXED = 0x0001, EXT_INCURMAP = 0x0002, EXT_LERP_NOPREV = 0x0008, EXT_HIGHLIGHT = 0x0010,
  EXT_CAMERA = 0x0020, EXT_SPRITE = 0x0040, EXT_TRANSPARENT = 0x0080, EXT_PERMANENT_NPC = 0x0100,
  EXT_TARGET = 0x0200, EXT_FEMALE = 0x8000
}
 

Public Member Functions

bool CanAddItem (Item *item, bool checkwghtvol=false) override
 
bool addItem (Item *item, bool checkwghtvol=false) override
 
const ShapeInfogetShapeInfoFromGameInstance () const override
 
void move (int32 X, int32 Y, int32 Z) override
 
int16 addItemCru (Item *item, bool showtoast)
 
bool removeItemCru (Item *item)
 Remove a single item - only called from an intrinsic.
 
void teleport (int mapNum, int32 x, int32 y, int32 z) override
 teleport to the given location on the given map
 
void teleport (int mapNum, int teleport_id)
 
bool hasJustTeleported () const
 
void setJustTeleported (bool t)
 
void accumulateStr (int n)
 
void accumulateDex (int n)
 
void accumulateInt (int n)
 
GravityProcessensureGravityProcess () override
 Get the GravityProcess of this Item, creating it if necessary.
 
uint32 getArmourClass () const override
 
uint16 getDefenseType () const override
 
int16 getAttackingDex () const override
 
int16 getDefendingDex () const override
 
uint16 getDamageType () const override
 get the damage type this object does when hitting something
 
int getDamageAmount () const override
 
void toggleInCombat ()
 
void setInCombat (int activity) override
 
void clearInCombat () override
 
ProcId die (uint16 damageType, uint16 damagePts, Direction srcDir) override
 
const Std::stringgetName () const
 
void setName (const Std::string &name)
 
int16 getMaxEnergy ()
 
CruBatteryType getBatteryType () const
 
void setBatteryType (CruBatteryType newbattery)
 
void setShieldType (uint16 shieldtype)
 
uint16 getShieldType ()
 
bool hasKeycard (int num) const
 
void addKeycard (int bitno)
 
void clrKeycards ()
 
uint16 getActiveInvItem () const
 
void nextWeapon ()
 Swap to the next active weapon (Crusader)
 
void nextInvItem ()
 Swap to the next inventory item (Crusader)
 
void dropWeapon ()
 Drop the current weapon (Crusader)
 
int receiveShieldHit (int damage, uint16 damage_type) override
 Check if we can absorb a hit with the shield. Returns the modified damage value.
 
void detonateBomb ()
 Detonate used bomb (Crusader)
 
bool loadData (Common::ReadStream *rs, uint32 version)
 
void saveData (Common::WriteStream *ws) override
 
 INTRINSIC (I_teleportToEgg)
 
 INTRINSIC (I_accumulateStrength)
 
 INTRINSIC (I_accumulateDexterity)
 
 INTRINSIC (I_accumulateIntelligence)
 
 INTRINSIC (I_clrAvatarInCombat)
 
 INTRINSIC (I_setAvatarInCombat)
 
 INTRINSIC (I_isAvatarInCombat)
 
 INTRINSIC (I_getMaxEnergy)
 
 INTRINSIC (I_hasKeycard)
 
 INTRINSIC (I_clrKeycards)
 
 INTRINSIC (I_addItemCru)
 
 INTRINSIC (I_getNumberOfCredits)
 
 INTRINSIC (I_switchMap)
 
 INTRINSIC (I_removeItemCru)
 
void getWeaponOverlay (const WeaponOverlayFrame *&frame, uint32 &shape)
 
- Public Member Functions inherited from Ultima::Ultima8::Actor
int16 getStr () const
 
void setStr (int16 str)
 
int16 getDex () const
 
void setDex (int16 dex)
 
int16 getInt () const
 
void setInt (int16 intl)
 
uint16 getHP () const
 
void setHP (uint16 hp)
 
int16 getMana () const
 
void setMana (int16 mp)
 
int16 getMaxMana () const
 
uint16 getMaxHP () const
 
bool isDead () const
 
bool isInCombat () const
 
bool isKneeling () const
 
bool isFalling () const
 
CombatProcessgetCombatProcess () const
 
AttackProcessgetAttackProcess () const
 
uint16 getAlignment () const
 
void setAlignment (uint16 a)
 
uint16 getEnemyAlignment () const
 
void setEnemyAlignment (uint16 a)
 
Animation::Sequence getLastAnim () const
 
void setLastAnim (Animation::Sequence anim)
 
Direction getDir () const
 
void setDir (Direction dir)
 
int32 getFallStart () const
 
void setFallStart (int32 zp)
 
void setUnkByte (uint8 b)
 
uint8 getUnkByte () const
 
bool hasActorFlags (uint32 flags) const
 
void setActorFlag (uint32 mask)
 
void clearActorFlag (uint32 mask)
 
void setCombatTactic (int no)
 
bool loadMonsterStats ()
 
bool giveTreasure ()
 
bool removeItem (Item *item) override
 
uint16 schedule (uint32 time)
 
bool setEquip (Item *item, bool checkwghtvol=false)
 
uint16 getEquip (uint32 type) const
 
void setDefaultActivity (int no, uint16 activity)
 
uint16 getDefaultActivity (int no) const
 
void setHomePosition (int32 x, int32 y, int32 z)
 
void getHomePosition (int32 &x, int32 &y, int32 &z) const
 
int calculateAttackDamage (uint16 other, int damage, uint16 type)
 
void receiveHit (uint16 other, Direction dir, int damage, uint16 type) override
 
void killAllButCombatProcesses ()
 kill all processes except those related to combat
 
ProcId killAllButFallAnims (bool death)
 
bool areEnemiesNear ()
 check if NPCs are near which are in combat mode and hostile
 
uint16 setActivity (int activity)
 
uint16 getCurrentActivityNo () const
 
uint16 getLastActivityNo () const
 
void clearLastActivityNo ()
 
int32 getLastTickWasHit () const
 
uint16 doAnim (Animation::Sequence anim, Direction dir, unsigned int steps=0)
 
uint16 doAnimAfter (Animation::Sequence anim, Direction dir, ProcId waitfor)
 
bool hasAnim (Animation::Sequence anim)
 check if this actor has a specific animation
 
void setToStartOfAnim (Animation::Sequence anim)
 
Animation::Result tryAnim (Animation::Sequence anim, Direction dir, unsigned int steps=0, PathfindingState *state=0)
 
DirectionMode animDirMode (Animation::Sequence anim) const
 Get the number of directions supported by a given animation.
 
bool isBusy () const
 True if the actor is currently doing an animation.
 
int32 collideMove (int32 x, int32 y, int32 z, bool teleport, bool force, ObjId *hititem=0, uint8 *dirs=0) override
 overrides the standard item collideMove so we can notify nearby objects.
 
uint16 turnTowardDir (Direction dir, ProcId prevpid=0)
 
uint16 assignObjId () override
 
Common::String dumpInfo () const override
 dump some info about this object to a string
 
bool loadData (Common::ReadStream *rs, uint32 version)
 
uint16 getActiveWeapon () const
 
uint16 getCombatTactic () const
 
bool activeWeaponIsSmall () const
 
void tookHitCru ()
 A cru-specific behavior - mostly make "ugh" noises, or explode for some robots.
 
bool canSeeControlledActor (bool forcombat)
 Whether this NPC has the controlled actor in their sights (Crusader only)
 
void addFireAnimOffsets (int32 &x, int32 &y, int32 &z)
 Add the x/y/z fire offsets given the current state of the actor.
 
uint32 getAttackMoveTimeoutFinishFrame () const
 
uint16 getAttackMoveDodgeFactor () const
 
bool getAttackAimFlag () const
 
void setAttackAimFlag (bool val)
 
 INTRINSIC (I_isNPC)
 
 INTRINSIC (I_getDir)
 
 INTRINSIC (I_getLastAnimSet)
 
 INTRINSIC (I_pathfindToItem)
 
 INTRINSIC (I_pathfindToPoint)
 
 INTRINSIC (I_getStr)
 
 INTRINSIC (I_getDex)
 
 INTRINSIC (I_getInt)
 
 INTRINSIC (I_getHp)
 
 INTRINSIC (I_getMaxHp)
 
 INTRINSIC (I_getMana)
 
 INTRINSIC (I_getAlignment)
 
 INTRINSIC (I_getEnemyAlignment)
 
 INTRINSIC (I_setStr)
 
 INTRINSIC (I_setDex)
 
 INTRINSIC (I_setInt)
 
 INTRINSIC (I_setHp)
 
 INTRINSIC (I_setMana)
 
 INTRINSIC (I_setAlignment)
 
 INTRINSIC (I_setEnemyAlignment)
 
 INTRINSIC (I_getMap)
 
 INTRINSIC (I_addHp)
 
 INTRINSIC (I_teleport)
 
 INTRINSIC (I_doAnim)
 
 INTRINSIC (I_isInCombat)
 
 INTRINSIC (I_setInCombat)
 
 INTRINSIC (I_clrInCombat)
 
 INTRINSIC (I_setTarget)
 
 INTRINSIC (I_getTarget)
 
 INTRINSIC (I_isEnemy)
 
 INTRINSIC (I_isDead)
 
 INTRINSIC (I_setDead)
 
 INTRINSIC (I_clrDead)
 
 INTRINSIC (I_isImmortal)
 
 INTRINSIC (I_setImmortal)
 
 INTRINSIC (I_clrImmortal)
 
 INTRINSIC (I_isWithstandDeath)
 
 INTRINSIC (I_setWithstandDeath)
 
 INTRINSIC (I_clrWithstandDeath)
 
 INTRINSIC (I_isFeignDeath)
 
 INTRINSIC (I_setFeignDeath)
 
 INTRINSIC (I_clrFeignDeath)
 
 INTRINSIC (I_areEnemiesNear)
 
 INTRINSIC (I_isBusy)
 
 INTRINSIC (I_createActor)
 
 INTRINSIC (I_createActorCru)
 
 INTRINSIC (I_setActivity)
 
 INTRINSIC (I_setAirWalkEnabled)
 
 INTRINSIC (I_getAirWalkEnabled)
 
 INTRINSIC (I_schedule)
 
 INTRINSIC (I_getEquip)
 
 INTRINSIC (I_setEquip)
 
 INTRINSIC (I_setDefaultActivity0)
 
 INTRINSIC (I_setDefaultActivity1)
 
 INTRINSIC (I_setDefaultActivity2)
 
 INTRINSIC (I_getDefaultActivity0)
 
 INTRINSIC (I_getDefaultActivity1)
 
 INTRINSIC (I_getDefaultActivity2)
 
 INTRINSIC (I_setCombatTactic)
 
 INTRINSIC (I_setUnkByte)
 
 INTRINSIC (I_getUnkByte)
 
 INTRINSIC (I_getLastActivityNo)
 
 INTRINSIC (I_getCurrentActivityNo)
 
 INTRINSIC (I_turnToward)
 
 INTRINSIC (I_isKneeling)
 
 INTRINSIC (I_isFalling)
 
- Public Member Functions inherited from Ultima::Ultima8::Container
virtual bool moveItemToEnd (Item *item)
 
void removeContents ()
 
void destroyContents ()
 Destroy all contents.
 
void setFlagRecursively (uint32 mask) override
 Set flag on container and all its contents recursively.
 
void containerSearch (UCList *itemlist, const uint8 *loopscript, uint32 scriptsize, bool recurse) const
 
ItemgetFirstItemWithShape (uint16 shapeno, bool recurse)
 
void getItemsWithShapeFamily (Std::vector< Item *> &itemlist, uint16 family, bool recurse)
 
uint32 getTotalWeight () const override
 
virtual uint32 getCapacity () const
 Get the container's capacity.
 
virtual uint32 getContentVolume () const
 Get the total volume used up by the container's current contents.
 
ObjId assignObjId () override
 
void clearObjId () override
 Clear objIDs of self and contents.
 
void destroy (bool delnow=false) override
 Destroy self.
 
Common::String dumpInfo () const override
 dump some info about this object to a string
 
bool loadData (Common::ReadStream *rs, uint32 version)
 
void saveData (Common::WriteStream *ws) override
 
 INTRINSIC (I_removeContents)
 
 INTRINSIC (I_destroyContents)
 
- Public Member Functions inherited from Ultima::Ultima8::Item
ObjId getParent () const
 Get the Container this Item is in, if any. (0 if not in a Container)
 
void setParent (ObjId p)
 Set the parent container of this item.
 
ContainergetParentAsContainer () const
 Get the Container this Item is in, if any. (NULL if not in a Container)
 
ContainergetRootContainer () const
 Get the top-most Container this Item is in, if any. (NULL if not in a Container)
 
const ItemgetTopItem () const
 
void setLocation (int32 x, int32 y, int32 z)
 
void setLocation (const Point3 &pt)
 
void move (const Point3 &pt)
 Move, but with a point struct.
 
bool moveToContainer (Container *container, bool checkwghtvol=false)
 
void moveToEtherealVoid ()
 Move an item to the Ethereal Void.
 
void returnFromEtherealVoid ()
 Move an item out of the Ethereal Void to where it originally was.
 
void movedByPlayer ()
 Check if moving this item is stealing; call AvatarStoleSomething if so.
 
Point3 getLocationAbsolute () const
 
Point3 getLocation () const
 
int32 getZ () const
 Get this Item's Z coordinate.
 
void setZ (int32 z)
 Set this Item's Z coordinate.
 
void getGumpLocation (int32 &x, int32 &y) const
 
void setGumpLocation (int32 x, int32 y)
 
void randomGumpLocation ()
 
Point3 getCentre () const
 
void getFootpadWorld (int32 &x, int32 &y, int32 &z) const
 Get the size of this item's 3D bounding box, in world coordinates.
 
void getFootpadData (int32 &x, int32 &y, int32 &z) const
 
Box getWorldBox () const
 Get the Box this item occupies in the world. Undef if item is contained.
 
uint16 getFlags () const
 Get all flags.
 
bool hasFlags (uint16 flags) const
 Does this item have any of the given flags mask set.
 
void setFlag (uint32 mask)
 Set the flags set in the given mask.
 
void clearFlag (uint32 mask)
 Clear the flags set in the given mask.
 
void setExtFlags (uint32 f)
 Set _extendedFlags.
 
uint32 getExtFlags () const
 Get _extendedFlags.
 
bool hasExtFlags (uint32 flags) const
 Does item have any of the given extended flags.
 
void setExtFlag (uint32 mask)
 Set the _extendedFlags set in the given mask.
 
void clearExtFlag (uint32 mask)
 Clear the _extendedFlags set in the given mask.
 
uint32 getShape () const
 Get this Item's shape number.
 
void setShape (uint32 shape)
 Set this Item's shape number.
 
uint32 getFrame () const
 Get this Item's frame number.
 
void setFrame (uint32 frame)
 Set this Item's frame number.
 
uint16 getQuality () const
 Get this Item's quality (a.k.a. 'Q')
 
void setQuality (uint16 quality)
 Set this Item's quality (a.k.a 'Q');.
 
uint16 getNpcNum () const
 
void setNpcNum (uint16 npcnum)
 
uint16 getMapNum () const
 
void setMapNum (uint16 mapnum)
 
const ShapeInfogetShapeInfo () const
 Get the ShapeInfo object for this Item. (The pointer will be cached.)
 
const ShapegetShapeObject () const
 Get the Shape object for this Item. (The pointer will be cached.)
 
uint16 getFamily () const
 
bool canMergeWith (const Item *other) const
 Check if we can merge with another item.
 
ObjId getGump () const
 Get the open ContainerGump for this Item, if any. (NULL if not open.)
 
void clearGump ()
 Call this to notify the Item's open Gump has closed.
 
ObjId openGump (uint32 gumpshape)
 Open a gump with the given shape for this Item.
 
void closeGump ()
 Close this Item's gump, if any.
 
ProcId bark (const Std::string &msg, ObjId id=0)
 
void clearBark ()
 Call this to notify the Item's open bark has closed.
 
void closeBark ()
 Close this Item's bark, if any.
 
bool overlaps (const Item &item2) const
 Check if this item overlaps another item in 3D world-space.
 
bool overlapsxy (const Item &item2) const
 Check if this item overlaps another item in the xy dims in 3D space.
 
bool isOn (const Item &item2) const
 Check if this item is on top of another item.
 
bool isCompletelyOn (const Item &item2) const
 Check if this item is on completely on top of another item.
 
bool isCentreOn (const Item &item2) const
 Check if the centre of this item is on top of another item.
 
bool isOnScreen () const
 Check if the item is currently entirely visible on screen.
 
bool isPartlyOnScreen () const
 Check if the item is currently partly visible on screen.
 
bool canExistAt (int32 x, int32 y, int32 z, bool needsupport=false) const
 Check if this item can exist at the given coordinates.
 
bool canExistAt (const Point3 &pt, bool needsupport=false) const
 
Direction getDirToItemCentre (const Item &item2) const
 
Direction getDirToItemCentre (const Point3 &pt) const
 Same as above, but from a fixed point.
 
int getRange (const Item &item2, bool checkz=false) const
 
int getRangeIfVisible (const Item &item2) const
 get 'distance' to other item if it's visible (ie, there's nothing blocking the path)
 
bool canReach (const Item *other, int range, int32 x=0, int32 y=0, int32 z=0) const
 
int32 ascend (int delta)
 
void fall ()
 
void grab ()
 
void hurl (int xs, int ys, int zs, int grav)
 Hurl the item in the given direction.
 
void setGravityPID (ProcId pid)
 Set the PID of the GravityProcess for this Item. There should be only one.
 
ProcId getGravityPID () const
 Get the PID of the GravityProcess for this Item (or 0)
 
virtual uint32 getWeight () const
 Get the weight of this Item.
 
virtual uint32 getVolume () const
 Get the volume this item takes up in a container.
 
void explode (int explosion_type, bool destroy_item, bool cause_damage=true)
 
uint16 fireWeapon (int32 x, int32 y, int32 z, Direction dir, int firetype, bool findtarget)
 fire the given weapon type in the given direction from location x, y, z.
 
uint16 fireDistance (const Item *other, Direction dir, int16 xoff, int16 yoff, int16 zoff) const
 
uint8 getDamagePoints () const
 get damage points, used in Crusader for item damage.
 
void setDamagePoints (uint8 points)
 set damage points, used in Crusader for item damage.
 
int32 getTargetZRelativeToAttackerZ (int32 attackerz) const
 
unsigned int countNearby (uint32 shape, uint16 range) const
 count nearby objects of a given shape
 
bool canDrag () const
 can this item be dragged?
 
int getThrowRange () const
 
bool checkLoopScript (const uint8 *script, uint32 scriptsize) const
 
uint32 callUsecodeEvent_look ()
 
uint32 callUsecodeEvent_use ()
 
uint32 callUsecodeEvent_anim ()
 
uint32 callUsecodeEvent_cachein ()
 
uint32 callUsecodeEvent_hit (ObjId hitted, int16 hitforce)
 
uint32 callUsecodeEvent_gotHit (ObjId hitter, int16 hitforce)
 
uint32 callUsecodeEvent_hatch ()
 
uint32 callUsecodeEvent_schedule (uint32 time)
 
uint32 callUsecodeEvent_release ()
 
uint32 callUsecodeEvent_equip ()
 
uint32 callUsecodeEvent_equipWithParam (ObjId param)
 
uint32 callUsecodeEvent_unequip ()
 
uint32 callUsecodeEvent_unequipWithParam (ObjId param)
 
uint32 callUsecodeEvent_combine ()
 
uint32 callUsecodeEvent_calledFromAnim ()
 
uint32 callUsecodeEvent_enterFastArea ()
 
uint32 callUsecodeEvent_leaveFastArea ()
 
uint32 callUsecodeEvent_cast (uint16 unk)
 
uint32 callUsecodeEvent_justMoved ()
 
uint32 callUsecodeEvent_AvatarStoleSomething (uint16 unk)
 
uint32 callUsecodeEvent_guardianBark (int16 unk)
 
uint32 callUsecodeEvent_unhatch ()
 
uint32 use ()
 
Point3 getLerped () const
 Get lerped location.
 
void doLerp (int32 factor)
 
void setupLerp (int32 gametick)
 Setup the lerped info for this gametick and animate the item.
 
virtual uint32 enterFastArea ()
 The item has entered the fast area.
 
virtual void leaveFastArea ()
 
Common::String dumpInfo () const override
 dump some info about this item to a string
 
bool loadData (Common::ReadStream *rs, uint32 version)
 
void saveData (Common::WriteStream *ws) override
 
 INTRINSIC (I_touch)
 
 INTRINSIC (I_getX)
 
 INTRINSIC (I_getY)
 
 INTRINSIC (I_getZ)
 
 INTRINSIC (I_getCX)
 
 INTRINSIC (I_getCY)
 
 INTRINSIC (I_getCZ)
 
 INTRINSIC (I_getPoint)
 
 INTRINSIC (I_getShape)
 
 INTRINSIC (I_setShape)
 
 INTRINSIC (I_getFrame)
 
 INTRINSIC (I_setFrame)
 
 INTRINSIC (I_getQuality)
 
 INTRINSIC (I_getUnkEggType)
 
 INTRINSIC (I_setUnkEggType)
 
 INTRINSIC (I_getQuantity)
 
 INTRINSIC (I_getContainer)
 
 INTRINSIC (I_getRootContainer)
 
 INTRINSIC (I_getQ)
 
 INTRINSIC (I_getQHi)
 
 INTRINSIC (I_getQLo)
 
 INTRINSIC (I_setQ)
 
 INTRINSIC (I_setQHi)
 
 INTRINSIC (I_setQLo)
 
 INTRINSIC (I_setQuality)
 
 INTRINSIC (I_setQuantity)
 
 INTRINSIC (I_setQAndCombine)
 
 INTRINSIC (I_getFamily)
 
 INTRINSIC (I_getTypeFlag)
 
 INTRINSIC (I_getStatus)
 
 INTRINSIC (I_orStatus)
 
 INTRINSIC (I_andStatus)
 
 INTRINSIC (I_getFootpadData)
 
 INTRINSIC (I_overlaps)
 
 INTRINSIC (I_overlapsXY)
 
 INTRINSIC (I_isOn)
 
 INTRINSIC (I_isCompletelyOn)
 
 INTRINSIC (I_isCentreOn)
 
 INTRINSIC (I_isInNpc)
 
 INTRINSIC (I_ascend)
 
 INTRINSIC (I_getWeight)
 
 INTRINSIC (I_getWeightIncludingContents)
 
 INTRINSIC (I_getVolume)
 
 INTRINSIC (I_bark)
 
 INTRINSIC (I_getMapArray)
 
 INTRINSIC (I_setMapArray)
 
 INTRINSIC (I_getNpcNum)
 
 INTRINSIC (I_setNpcNum)
 
 INTRINSIC (I_getDirToCoords)
 
 INTRINSIC (I_getDirFromCoords)
 
 INTRINSIC (I_getDirToItem)
 
 INTRINSIC (I_getDirFromItem)
 
 INTRINSIC (I_getDirFromTo16)
 
 INTRINSIC (I_getClosestDirectionInRange)
 
 INTRINSIC (I_look)
 
 INTRINSIC (I_use)
 
 INTRINSIC (I_gotHit)
 
 INTRINSIC (I_enterFastArea)
 
 INTRINSIC (I_cast)
 
 INTRINSIC (I_ask)
 
 INTRINSIC (I_getSliderInput)
 
 INTRINSIC (I_openGump)
 
 INTRINSIC (I_closeGump)
 
 INTRINSIC (I_create)
 
 INTRINSIC (I_legalCreateAtPoint)
 
 INTRINSIC (I_legalCreateAtCoords)
 
 INTRINSIC (I_legalCreateInCont)
 
 INTRINSIC (I_push)
 
 INTRINSIC (I_pop)
 
 INTRINSIC (I_popToCoords)
 
 INTRINSIC (I_popToContainer)
 
 INTRINSIC (I_popToEnd)
 
 INTRINSIC (I_destroy)
 
 INTRINSIC (I_move)
 
 INTRINSIC (I_legalMoveToPoint)
 
 INTRINSIC (I_legalMoveToContainer)
 
 INTRINSIC (I_hurl)
 
 INTRINSIC (I_shoot)
 
 INTRINSIC (I_fall)
 
 INTRINSIC (I_grab)
 
 INTRINSIC (I_igniteChaos)
 
 INTRINSIC (I_getFamilyOfType)
 
 INTRINSIC (I_getEtherealTop)
 
 INTRINSIC (I_guardianBark)
 
 INTRINSIC (I_getSurfaceWeight)
 
 INTRINSIC (I_isExplosive)
 
 INTRINSIC (I_receiveHit)
 
 INTRINSIC (I_explode)
 
 INTRINSIC (I_canReach)
 
 INTRINSIC (I_getRange)
 
 INTRINSIC (I_getRangeIfVisible)
 
 INTRINSIC (I_isCrusTypeNPC)
 
 INTRINSIC (I_setBroken)
 
 INTRINSIC (I_inFastArea)
 
 INTRINSIC (I_equip)
 
 INTRINSIC (I_unequip)
 
 INTRINSIC (I_avatarStoleSomething)
 
 INTRINSIC (I_isPartlyOnScreen)
 
 INTRINSIC (I_fireWeapon)
 
 INTRINSIC (I_fireDistance)
 
- Public Member Functions inherited from Ultima::Ultima8::Object
ObjId getObjId () const
 get this Object's objID
 
ProcId callUsecode (uint16 classid, uint16 offset, const uint8 *args=0, int argsize=0)
 
bool loadData (Common::ReadStream *rs, uint32 version)
 

Protected Member Functions

void useInventoryItem (uint32 shapenum)
 
void useInventoryItem (Item *item)
 
- Protected Member Functions inherited from Ultima::Ultima8::Actor
uint16 setActivityU8 (int activity)
 
uint16 setActivityCru (int activity)
 
bool loadMonsterStatsU8 ()
 
bool loadMonsterStatsCru ()
 
void receiveHitU8 (uint16 other, Direction dir, int damage, uint16 type)
 
void receiveHitCru (uint16 other, Direction dir, int damage, uint16 type)
 
void setInCombatU8 ()
 
void setInCombatCru (int activity)
 
ProcId dieU8 (uint16 damageType)
 
ProcId dieCru (uint16 damageType, uint16 damagePts, Direction srcDir)
 
- Protected Member Functions inherited from Ultima::Ultima8::Item
bool isRobotCru () const
 True if this is a Robot shape (in a fixed list)
 
int scaleReceivedDamageCru (int damage, uint16 type) const
 

Protected Attributes

bool _justTeleported
 
int _accumStr
 
int _accumDex
 
int _accumInt
 
uint32 _keycards
 
CruBatteryType _cruBatteryType
 
uint16 _activeInvItem
 
Std::string _name
 
uint16 _shieldSpriteProc
 Process for a shield zap animation sprite.
 
uint16 _shieldType
 Type of shield (only used in Crusader)
 
- Protected Attributes inherited from Ultima::Ultima8::Actor
int16 _strength
 
int16 _dexterity
 
int16 _intelligence
 
uint16 _hitPoints
 
int16 _mana
 
uint16 _alignment
 
uint16 _enemyAlignment
 
Animation::Sequence _lastAnim
 
uint16 _animFrame
 
Direction _direction
 
int32 _fallStart
 
uint8 _unkByte
 
uint16 _combatTactic
 tactic being used in combat (for Crusader), the entry in the combat.dat flex.
 
uint32 _actorFlags
 
uint16 _defaultActivity [3]
 the 3 default NPC activities from Crusader
 
int32 _homeX
 The "home" position used in some Crusader attack tactics.
 
int32 _homeY
 
int32 _homeZ
 
uint16 _currentActivityNo
 Current and last activity (only used in Crusader)
 
uint16 _lastActivityNo
 
uint16 _activeWeapon
 Active weapon item (only used in Crusader)
 
int32 _lastTickWasHit
 Kernel timer last time NPC was hit (only used in Crusader)
 
uint32 _attackMoveStartFrame
 
uint32 _attackMoveTimeout
 The number of frames the above effect lasts for.
 
uint16 _attackMoveDodgeFactor
 
bool _attackAimFlag
 A flag used in Crusader attack process which adjusts the aim accuracy.
 
- Protected Attributes inherited from Ultima::Ultima8::Container
Std::list< Item * > _contents
 
- Protected Attributes inherited from Ultima::Ultima8::Item
uint32 _frame
 
int32 _x
 
int32 _y
 
int32 _z
 
uint16 _flags
 
uint16 _quality
 
uint16 _npcNum
 
uint16 _mapNum
 
uint32 _extendedFlags
 
ObjId _parent
 
const Shape_cachedShape
 
const ShapeInfo_cachedShapeInfo
 
Lerped _lPrev
 
Lerped _lNext
 
int32 _ix
 
int32 _iy
 
int32 _iz
 
ObjId _gump
 
ObjId _bark
 
ProcId _gravityPid
 
uint8 _damagePoints
 
- Protected Attributes inherited from Ultima::Ultima8::Object
ObjId _objId
 

Static Protected Attributes

static ShapeInfo_kneelingShapeInfo
 

Additional Inherited Members

- Static Public Member Functions inherited from Ultima::Ultima8::Actor
static ActorcreateActor (uint32 shape, uint32 frame)
 create an actor, assign objid, make it ethereal and load monster stats.
 
- Static Public Attributes inherited from Ultima::Ultima8::Item
static const int MAX_QUANTITY = 666
 

Member Function Documentation

◆ CanAddItem()

bool Ultima::Ultima8::MainActor::CanAddItem ( Item item,
bool  checkwghtvol = false 
)
overridevirtual

Check if an item can be added to the container

Parameters
itemThe item to check
checkwghtvolNeed to check weight and volume?
Returns
true if item can be added, false if not

Reimplemented from Ultima::Ultima8::Container.

◆ addItem()

bool Ultima::Ultima8::MainActor::addItem ( Item item,
bool  checkwghtvol = false 
)
overridevirtual

Add an item to the container. This does NOT update item.

Parameters
itemThe item to add
checkwghtvolNeed to check weight and volume?
Returns
true if item was added, false if failed

Reimplemented from Ultima::Ultima8::Container.

◆ getShapeInfoFromGameInstance()

const ShapeInfo* Ultima::Ultima8::MainActor::getShapeInfoFromGameInstance ( ) const
overridevirtual

Get the ShapeInfo object for this MainActor. Overrided because it changes when Crusader is kneeling.

Reimplemented from Ultima::Ultima8::Item.

◆ move()

void Ultima::Ultima8::MainActor::move ( int32  x,
int32  y,
int32  z 
)
overridevirtual

Move an item. This moves an item to the new location, and updates CurrentMap and fastArea if necessary.

Reimplemented from Ultima::Ultima8::Item.

◆ addItemCru()

int16 Ultima::Ultima8::MainActor::addItemCru ( Item item,
bool  showtoast 
)

Add item to avatar's inventory, but with some extra logic to do things like combine ammo and credits, use batteries, etc.

◆ teleport()

void Ultima::Ultima8::MainActor::teleport ( int  mapNum,
int  teleport_id 
)

teleport to a teleport-destination egg

Parameters
mapnumThe map to teleport to
teleport_idThe ID of the egg to teleport to

◆ accumulateStr()

void Ultima::Ultima8::MainActor::accumulateStr ( int  n)

accumulate a little bit of strength. When you reach 650 you gain one strength point. (There's a chance you gain strength sooner)

◆ accumulateDex()

void Ultima::Ultima8::MainActor::accumulateDex ( int  n)

accumulate a little bit of dexterity. When you reach 650 you gain one dex. point. (There's a chance you gain dex. sooner)

◆ accumulateInt()

void Ultima::Ultima8::MainActor::accumulateInt ( int  n)

accumulate a little bit of intelligence. When you reach 650 you gain one int. point. (There's a chance you gain int. sooner)

◆ die()

ProcId Ultima::Ultima8::MainActor::die ( uint16  damageType,
uint16  damagePts,
Direction  srcDir 
)
overridevirtual

die

Parameters
damageTypedamage type that caused the death
damagPtsdamage points that caused the death
srcDirdirection damage came from
Returns
the process ID of the death animation

Reimplemented from Ultima::Ultima8::Actor.


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