ScummVM API documentation
Mohawk::RivenCard Class Reference

#include <riven_card.h>

Classes

struct  Picture
 

Public Member Functions

 RivenCard (MohawkEngine_Riven *vm, uint16 id)
 
void enter (bool unkMovies)
 
void leave ()
 
void runScript (uint16 scriptType)
 
uint16 getId () const
 
Picture getPicture (uint16 index) const
 
void drawPicture (uint16 index, bool queue=false)
 
void playSound (uint16 index, bool queue=false)
 
SLSTRecord getSound (uint16 index) const
 
void overrideSound (uint16 index, uint16 withIndex)
 
void playMovie (uint16 index, bool queue=false)
 
MLSTRecord getMovie (uint16 index) const
 
void drawHotspotRects ()
 
void initializeZipMode ()
 
RivenHotspotgetHotspotContainingPoint (const Common::Point &point) const
 
RivenHotspotgetHotspotByName (const Common::String &name, bool optional=false) const
 
RivenHotspotfindEnabledHotspotByName (const char **names) const
 
RivenHotspotgetHotspotByBlstId (const uint16 blstId) const
 
RivenHotspotgetCurHotspot () const
 
Common::Array< RivenHotspot * > getHotspots () const
 
void activateHotspotEnableRecord (uint16 index)
 
void activateWaterEffect (uint16 index)
 
RivenScriptPtr onMouseDown (const Common::Point &mouse)
 
RivenScriptPtr onMouseUp (const Common::Point &mouse)
 
RivenScriptPtr onMouseMove (const Common::Point &mouse)
 
RivenScriptPtr onKeyAction (RivenAction keyAction)
 
RivenScriptPtr onFrame ()
 
RivenScriptPtr onMouseUpdate ()
 
RivenScriptPtr onMouseDragUpdate ()
 
void dump () const
 

Detailed Description

A game view

The names Card and Stack are legacy from the HyperCard engine used in the original mac version of Myst.

Cards contain hotspots, scripts, and resource lists.

Member Function Documentation

◆ enter()

void Mohawk::RivenCard::enter ( bool  unkMovies)

Initialization routine used to draw a card for the first time or to refresh it

◆ leave()

void Mohawk::RivenCard::leave ( )

Run the card's leave scripts

◆ runScript()

void Mohawk::RivenCard::runScript ( uint16  scriptType)

Run one of the card's scripts

◆ getId()

uint16 Mohawk::RivenCard::getId ( ) const

Get the id of the card in the stack

◆ getPicture()

Picture Mohawk::RivenCard::getPicture ( uint16  index) const

Get the card's picture with the specified index

◆ drawPicture()

void Mohawk::RivenCard::drawPicture ( uint16  index,
bool  queue = false 
)

Draw one of the card's pictures synchronously or asynchronously

◆ playSound()

void Mohawk::RivenCard::playSound ( uint16  index,
bool  queue = false 
)

Play the card's ambient sounds with the specified index

◆ getSound()

SLSTRecord Mohawk::RivenCard::getSound ( uint16  index) const

Get the card's sound description with the specified index

◆ overrideSound()

void Mohawk::RivenCard::overrideSound ( uint16  index,
uint16  withIndex 
)

Replace an ambient sound list with another one

◆ playMovie()

void Mohawk::RivenCard::playMovie ( uint16  index,
bool  queue = false 
)

Play the card's movie with the specified index

◆ getMovie()

MLSTRecord Mohawk::RivenCard::getMovie ( uint16  index) const

Get the card's movie description with the specified index

◆ drawHotspotRects()

void Mohawk::RivenCard::drawHotspotRects ( )

Draw borders for all the hotspots in the card

◆ initializeZipMode()

void Mohawk::RivenCard::initializeZipMode ( )

Enable the zip hotspots if they match to already visited locations

◆ getHotspotContainingPoint()

RivenHotspot* Mohawk::RivenCard::getHotspotContainingPoint ( const Common::Point point) const

Get the hotspot containing the specified point

◆ getHotspotByName()

RivenHotspot* Mohawk::RivenCard::getHotspotByName ( const Common::String name,
bool  optional = false 
) const

Get the hotspot with the specified name

◆ findEnabledHotspotByName()

RivenHotspot* Mohawk::RivenCard::findEnabledHotspotByName ( const char **  names) const

Find an enabled hotspot with a name matching one of the arguments

◆ getHotspotByBlstId()

RivenHotspot* Mohawk::RivenCard::getHotspotByBlstId ( const uint16  blstId) const

Get the hotspot with the specified BLST id

◆ getCurHotspot()

RivenHotspot* Mohawk::RivenCard::getCurHotspot ( ) const

Get the currently hovered hotspot if any

◆ getHotspots()

Common::Array<RivenHotspot *> Mohawk::RivenCard::getHotspots ( ) const

Get all the hotspots in the card. To be used for debugging features only

◆ activateHotspotEnableRecord()

void Mohawk::RivenCard::activateHotspotEnableRecord ( uint16  index)

Activate a hotspot using a hotspot enable list entry

◆ activateWaterEffect()

void Mohawk::RivenCard::activateWaterEffect ( uint16  index)

Activate a water effect list entry

◆ onMouseDown()

RivenScriptPtr Mohawk::RivenCard::onMouseDown ( const Common::Point mouse)

Handle a mouse down event

◆ onMouseUp()

RivenScriptPtr Mohawk::RivenCard::onMouseUp ( const Common::Point mouse)

Handle a mouse up event

◆ onMouseMove()

RivenScriptPtr Mohawk::RivenCard::onMouseMove ( const Common::Point mouse)

Handle a mouse move event

◆ onKeyAction()

RivenScriptPtr Mohawk::RivenCard::onKeyAction ( RivenAction  keyAction)

Handle a keyboard action

◆ onFrame()

RivenScriptPtr Mohawk::RivenCard::onFrame ( )

General frame update handler

◆ onMouseUpdate()

RivenScriptPtr Mohawk::RivenCard::onMouseUpdate ( )

Frame update handler for the mouse cursor

◆ onMouseDragUpdate()

RivenScriptPtr Mohawk::RivenCard::onMouseDragUpdate ( )

Frame update handler for mouse dragging

◆ dump()

void Mohawk::RivenCard::dump ( ) const

Write all of the card's data to standard output


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