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.
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 140 of file item.h.


Constructor & Destructor Documentation

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

Definition at line 187 of file item.cpp.

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

Definition at line 183 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 349 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 354 of file item.cpp.

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

Get the currently playing action animation, if any.

Definition at line 317 of file item.cpp.

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

Get the currently playing animation.

Definition at line 309 of file item.cpp.

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

Get the current animation kind.

Definition at line 288 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 341 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 389 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 284 of file item.cpp.

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

Definition at line 331 of file item.cpp.

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

Implemented version used in FloorPositionedImageItem and ImageItem.

Definition at line 405 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 203 of file item.cpp.

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

Replace the current generic animation with an action specific animation.

Definition at line 363 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 197 of file item.cpp.

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

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

Definition at line 372 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 224 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 244 of file item.cpp.

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

Define the current animation kind for the item.

Definition at line 292 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 321 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 268 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 385 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 Nov 9 2019 05:02:30 for ResidualVM by doxygen 1.7.1
curved edge   curved edge