Public Member Functions | |
Actor (AsylumEngine *engine, ActorIndex index) | |
void | setActionIndex2 (int32 index) |
void | setObjectIndex (int32 index) |
void | setDirection (ActorDirection dir) |
void | setFrameCount (int32 count) |
void | setFrameIndex (int32 number) |
void | setLastScreenUpdate (int32 tick) |
void | setNumberFlag01 (int32 number) |
void | setPriority (int32 priority) |
void | setResourceId (ResourceId id) |
void | setSoundResourceId (ResourceId id) |
void | setStatus (ActorStatus status) |
void | setTransparency (int32 val) |
void | setTickCount (int32 tickCount) |
void | setField934 (int32 val) |
void | setField938 (int32 val) |
void | setField944 (int32 val) |
int32 | getActionIndex3 () |
Common::Rect * | getBoundingRect () |
ActorDirection | getDirection () |
uint32 | getFrameCount () |
uint32 | getFrameIndex () |
char * | getName () |
ActorIndex | getNextActorIndex () |
int32 | getNumberValue01 () |
Common::Point * | getPoint () |
Common::Point * | getPoint1 () |
Common::Point * | getPoint2 () |
int32 | getPriority () |
ResourceId | getResourceId () |
ResourceId | getResourcesId (uint32 index) |
int32 | getScriptIndex () |
bool | shouldInvertPriority () |
ResourceId | getSoundResourceId () |
ActorStatus | getStatus () |
int32 | getTickCount () |
int32 | getField934 () |
int32 | getField944 () |
int32 | getField948 () |
int32 | getField94C () |
ActorData * | getData () |
void | load (Common::SeekableReadStream *stream) |
bool | isVisible () |
bool | isOnScreen () |
void | show () |
void | hide () |
void | draw () |
void | drawNumber () |
void | update () |
void | enable () |
void | changeStatus (ActorStatus status) |
void | updateReflectionData () |
void | changeDirection (ActorDirection direction) |
void | faceTarget (uint32 target, DirectionFrom from) |
void | setPosition (int16 newX, int16 newY, ActorDirection newDirection, uint32 frame) |
bool | canChangeStatus (int index) const |
void | adjustCoordinates (Common::Point *point) |
void | stopSound () |
Common::String | toString (bool shortString=true) |
void | clearReflectionData () |
bool | canReach (const Common::Point &point) |
void | forceTo (int16 actorX, int16 actorY, bool doSpeech) |
void | setupReflectionData (ActorIndex nextActor, int32 actionAreaId, ActorDirection nextDirection, const Common::Point &nextPosition, bool invertPriority, const Common::Point &nextPositionOffset) |
bool | aNicePlaceToTalk (Common::Point *point, int32 *param) |
bool | canMove (Common::Point *point, ActorDirection direction, uint32 count, bool hasDelta) |
void | move (ActorDirection dir, uint32 distance) |
bool | testActorCollision (Common::Point *point, ActorDirection direction) |
void | drawInventory () |
void | stopWalking () |
bool | checkBoredStatus () const |
void | saveLoadWithSerializer (Common::Serializer &s) |
Static Public Member Functions | |
static void | crowsReturn (AsylumEngine *engine) |
static void | morphInto (AsylumEngine *engine, int nextPlayer) |
static ActorDirection | getAngle (const Common::Point &vec1, const Common::Point &vec2) |
static uint32 | euclidianDistance (const Common::Point &point1, const Common::Point &point2) |
Public Attributes | |
int32 | flags |
int32 | actionType |
Inventory | inventory |
void Asylum::Actor::load | ( | Common::SeekableReadStream * | stream | ) |
Loads the actor
stream | If non-null, the Common::SeekableReadStream to load from |
|
inline |
Query if this actor is visible.
bool Asylum::Actor::isOnScreen | ( | ) |
Query if this actor is on screen.
|
inline |
Shows this actor.
|
inline |
Hides this actor.
void Asylum::Actor::draw | ( | ) |
Draws the actor
void Asylum::Actor::drawNumber | ( | ) |
Draw number text (called on scene drawing)
void Asylum::Actor::update | ( | ) |
Updates the actor.
|
inline |
Enables the actor
void Asylum::Actor::changeStatus | ( | ActorStatus | status | ) |
Changes the actor status.
status | The status. |
void Asylum::Actor::updateReflectionData | ( | ) |
Updates the actor's mirror image.
void Asylum::Actor::changeDirection | ( | ActorDirection | direction | ) |
Updates resource Id using the actor direction.
direction | The direction. |
void Asylum::Actor::faceTarget | ( | uint32 | target, |
DirectionFrom | from | ||
) |
Face a target from a certain direction
target | Identifier for the target. |
from | direction to face from. |
void Asylum::Actor::setPosition | ( | int16 | newX, |
int16 | newY, | ||
ActorDirection | newDirection, | ||
uint32 | frame | ||
) |
Initialize the x1/y1 values of the actor, update the active animation frame and, if the current direction isn't 8, update the actor's direction.
newX | The new x coordinate. |
newY | The new y coordinate. |
newDirection | The new direction. |
frame | The frame. |
bool Asylum::Actor::canChangeStatus | ( | int | index | ) | const |
Query if a graphic resource is present.
index | Zero-based index of the graphic resource. |
void Asylum::Actor::adjustCoordinates | ( | Common::Point * | point | ) |
Adjust coordinates.
point | The point. |
void Asylum::Actor::stopSound | ( | ) |
Stop the actor related sounds
Common::String Asylum::Actor::toString | ( | bool | shortString = true | ) |
Convert this object into a string representation.
shortString | toggle whether to output a summary or detailed view of the actor object |
void Asylum::Actor::clearReflectionData | ( | ) |
Clears reflection-related data fields
bool Asylum::Actor::checkBoredStatus | ( | ) | const |
Query if the object resource is present in the resource table between indices 10 & 20
|
static |
Updates the player appearance in chapter 9.
[in,out] | engine | If non-null, the engine. |
nextPlayer | The next player index |
|
static |
Gets a direction using the angle between the two vectors.
vec1 | The first vector. |
vec2 | The second vector. |
|
static |
Gets the euclidean distance between two points.
point1 | The first point. |
point2 | The second point. |