ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Stark::Resources::ItemVisual Class Reference

A renderable item. More...

#include <item.h>

Inheritance diagram for Stark::Resources::ItemVisual:
Collaboration diagram for Stark::Resources::ItemVisual:

List of all members.

Public Member Functions

 ItemVisual (Object *parent, byte subType, uint16 index, const Common::String &name)
virtual ~ItemVisual ()
virtual void readData (Formats::XRCReadStream *stream) override
 Deserialize the resource static data and initial state.
virtual void onAllLoaded () override
 Called when the resource sub-tree is entirely loaded.
virtual void saveLoad (ResourceSerializer *serializer) override
 Persist / restore the resource state.
virtual void saveLoadCurrent (ResourceSerializer *serializer) override
 Persist / restore the resource state.
virtual void onPreDestroy () override
 Called before a resource sub-tree is unloaded.
void setEnabled (bool enabled) override
 Enable or disable the item.
ItemVisualgetSceneInstance () override
 Obtain the concrete instance of an item template.
void setAnimHierarchy (AnimHierarchy *animHierarchy) override
 Set the currently active anim hierachy.
virtual void setPosition2D (const Common::Point &position)
 Change the item's 2D position.
int getHotspotIndexForPoint (const Common::Point &point)
 Get the hotspot index for an item relative position.
Common::String getHotspotTitle (uint32 hotspotIndex)
 Obtain the title for one of the item's hotspots.
bool canPerformAction (uint32 action, uint32 hotspotIndex)
 Check whether the item has runnable scripts for the specified action.
bool doAction (uint32 action, uint32 hotspotIndex)
 Perform an action on one of the item's hotspots.
void setAnimActivity (int32 activity)
 Define the current animation kind for the item.
int32 getAnimActivity () const
 Get the current animation kind.
AnimgetAnim () const
 Get the currently playing animation.
AnimgetActionAnim () const
 Get the currently playing action animation, if any.
void playActionAnim (Anim *anim)
 Replace the current generic animation with an action specific animation.
void resetActionAnim ()
 Remove the current specific animation and revert to a generic one.

Protected Member Functions

void printData () override
Common::Array< Common::PointlistExitPositionsImpl ()
 Implemented version used in FloorPositionedImageItem and ImageItem.
VisualgetVisual ()

Protected Attributes

Gfx::RenderEntry_renderEntry
Anim_actionAnim
AnimHierarchy_animHierarchy
int32 _currentAnimActivity
bool _clickable

Detailed Description

A renderable item.

Renderable items are found in location layers

Definition at line 139 of file item.h.


Constructor & Destructor Documentation

Stark::Resources::ItemVisual::ItemVisual ( Object parent,
byte  subType,
uint16  index,
const Common::String name 
)

Definition at line 186 of file item.cpp.

Stark::Resources::ItemVisual::~ItemVisual (  )  [virtual]

Definition at line 182 of file item.cpp.


Member Function Documentation

bool Stark::Resources::ItemVisual::canPerformAction ( uint32  action,
uint32  hotspotIndex 
)

Check whether the item has runnable scripts for the specified action.

Definition at line 357 of file item.cpp.

bool Stark::Resources::ItemVisual::doAction ( uint32  action,
uint32  hotspotIndex 
)

Perform an action on one of the item's hotspots.

Definition at line 362 of file item.cpp.

Anim * Stark::Resources::ItemVisual::getActionAnim (  )  const

Get the currently playing action animation, if any.

Definition at line 325 of file item.cpp.

Anim * Stark::Resources::ItemVisual::getAnim (  )  const

Get the currently playing animation.

Definition at line 317 of file item.cpp.

int32 Stark::Resources::ItemVisual::getAnimActivity (  )  const

Get the current animation kind.

Definition at line 296 of file item.cpp.

int Stark::Resources::ItemVisual::getHotspotIndexForPoint ( const Common::Point point  ) 

Get the hotspot index for an item relative position.

Definition at line 349 of file item.cpp.

Common::String Stark::Resources::ItemVisual::getHotspotTitle ( uint32  hotspotIndex  ) 

Obtain the title for one of the item's hotspots.

Definition at line 397 of file item.cpp.

ItemVisual * Stark::Resources::ItemVisual::getSceneInstance (  )  [override, virtual]

Obtain the concrete instance of an item template.

Implements Stark::Resources::Item.

Definition at line 292 of file item.cpp.

Visual * Stark::Resources::ItemVisual::getVisual (  )  [protected]

Definition at line 339 of file item.cpp.

Common::Array< Common::Point > Stark::Resources::ItemVisual::listExitPositionsImpl (  )  [protected]

Implemented version used in FloorPositionedImageItem and ImageItem.

Definition at line 413 of file item.cpp.

void Stark::Resources::ItemVisual::onAllLoaded (  )  [override, virtual]

Called when the resource sub-tree is entirely loaded.

Allows to load data from other nodes.

Reimplemented from Stark::Resources::Object.

Reimplemented in Stark::Resources::ModelItem.

Definition at line 202 of file item.cpp.

void Stark::Resources::ItemVisual::onPreDestroy (  )  [override, virtual]

Called before a resource sub-tree is unloaded.

Reimplemented from Stark::Resources::Object.

Definition at line 267 of file item.cpp.

void Stark::Resources::ItemVisual::playActionAnim ( Anim anim  ) 

Replace the current generic animation with an action specific animation.

Definition at line 371 of file item.cpp.

void Stark::Resources::ItemVisual::printData (  )  [override, protected, virtual]
void Stark::Resources::ItemVisual::readData ( Formats::XRCReadStream stream  )  [override, virtual]

Deserialize the resource static data and initial state.

Reimplemented from Stark::Resources::Item.

Reimplemented in Stark::Resources::FloorPositionedImageItem, Stark::Resources::ModelItem, and Stark::Resources::ImageItem.

Definition at line 196 of file item.cpp.

void Stark::Resources::ItemVisual::resetActionAnim (  ) 

Remove the current specific animation and revert to a generic one.

Definition at line 380 of file item.cpp.

void Stark::Resources::ItemVisual::saveLoad ( ResourceSerializer serializer  )  [override, virtual]

Persist / restore the resource state.

Reimplemented from Stark::Resources::Item.

Reimplemented in Stark::Resources::FloorPositionedItem.

Definition at line 223 of file item.cpp.

void Stark::Resources::ItemVisual::saveLoadCurrent ( ResourceSerializer serializer  )  [override, virtual]

Persist / restore the resource state.

Called only for active locations

Reimplemented from Stark::Resources::Item.

Reimplemented in Stark::Resources::ModelItem.

Definition at line 243 of file item.cpp.

void Stark::Resources::ItemVisual::setAnimActivity ( int32  activity  ) 

Define the current animation kind for the item.

Definition at line 300 of file item.cpp.

void Stark::Resources::ItemVisual::setAnimHierarchy ( AnimHierarchy animHierarchy  )  [override, virtual]

Set the currently active anim hierachy.

Implements Stark::Resources::Item.

Definition at line 329 of file item.cpp.

void Stark::Resources::ItemVisual::setEnabled ( bool  enabled  )  [override, virtual]

Enable or disable the item.

Reimplemented from Stark::Resources::Item.

Reimplemented in Stark::Resources::InventoryItem.

Definition at line 276 of file item.cpp.

void Stark::Resources::ItemVisual::setPosition2D ( const Common::Point position  )  [virtual]

Change the item's 2D position.

Only applies to 2D items

Reimplemented in Stark::Resources::FloorPositionedImageItem, and Stark::Resources::ImageItem.

Definition at line 393 of file item.cpp.


Member Data Documentation

Definition at line 204 of file item.h.

Definition at line 205 of file item.h.

Definition at line 207 of file item.h.

Definition at line 206 of file item.h.

Definition at line 202 of file item.h.


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


Generated on Sat Jan 12 2019 05:05:20 for ResidualVM by doxygen 1.7.1
curved edge   curved edge