ScummVM API documentation
Mohawk::RivenStack Class Reference

#include <riven_stack.h>

Inheritance diagram for Mohawk::RivenStack:
Mohawk::RivenStacks::ASpit Mohawk::RivenStacks::DomeSpit Mohawk::RivenStacks::OSpit Mohawk::RivenStacks::RSpit Mohawk::RivenStacks::BSpit Mohawk::RivenStacks::GSpit Mohawk::RivenStacks::JSpit Mohawk::RivenStacks::PSpit Mohawk::RivenStacks::TSpit

Public Types

typedef Common::Array< uint16 > ArgumentArray
 
typedef Common::Functor0< void > TimerProc
 

Public Member Functions

 RivenStack (MohawkEngine_Riven *vm, uint16 id)
 
uint16 getId () const
 
Common::String getName (RivenNameResource nameResource, uint16 nameId) const
 
int16 getIdFromName (RivenNameResource nameResource, const Common::String &name) const
 
void registerName (RivenNameResource nameResource, uint16 nameId, const Common::String &name)
 
uint16 getCardStackId (uint32 globalId) const
 
uint32 getCurrentCardGlobalId () const
 
uint32 getCardGlobalId (uint16 cardId) const
 
void runCommand (uint16 commandNameId, const Common::Array< uint16 > &args)
 
void dump () const
 
virtual void installCardTimer ()
 
void removeTimer ()
 
void onMouseDown (const Common::Point &mouse)
 
void onMouseUp (const Common::Point &mouse)
 
void onMouseMove (const Common::Point &mouse)
 
void queueMouseCursorRefresh ()
 
void onFrame ()
 
bool mouseIsDown () const
 
Common::Point getMousePosition () const
 
Common::Point getMouseDragStartPosition () const
 
void mouseForceUp ()
 
void onAction (RivenAction keyAction)
 
RivenAction getAction () const
 
void resetAction ()
 
void xflies (const ArgumentArray &args)
 
uint16 getComboDigit (uint32 correctCombo, uint32 digit)
 
void runDemoBoundaryDialog ()
 
void runEndGame (uint16 videoCode, uint32 delay, uint32 videoFrameCountOverride)
 
void runCredits (uint16 video, uint32 delay, uint32 videoFrameCountOverride)
 
void pageTurn (RivenTransition transition)
 
bool keepTurningPages ()
 
void waitForPageTurnSound ()
 

Protected Types

typedef Common::Functor1< const ArgumentArray &, void > ExternalCommand
 

Protected Member Functions

void registerCommand (const Common::String &name, ExternalCommand *command)
 
void installTimer (TimerProc *proc, uint32 time)
 

Protected Attributes

MohawkEngine_Riven_vm
 

Detailed Description

A game level

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

Stacks contain behaviors and data that are specific to a game level.

Member Function Documentation

◆ getId()

uint16 Mohawk::RivenStack::getId ( ) const

Get the id of the stack

◆ getName()

Common::String Mohawk::RivenStack::getName ( RivenNameResource  nameResource,
uint16  nameId 
) const

Get the name of a resource using its id

◆ getIdFromName()

int16 Mohawk::RivenStack::getIdFromName ( RivenNameResource  nameResource,
const Common::String name 
) const

Get the id of a resource using its name

The search is case insensitive.

◆ registerName()

void Mohawk::RivenStack::registerName ( RivenNameResource  nameResource,
uint16  nameId,
const Common::String name 
)

Add a name id => name mapping in a name list

◆ getCardStackId()

uint16 Mohawk::RivenStack::getCardStackId ( uint32  globalId) const

Get the id of a card in the card from its global identifier

◆ getCurrentCardGlobalId()

uint32 Mohawk::RivenStack::getCurrentCardGlobalId ( ) const

Get the global id of the currently active card

◆ getCardGlobalId()

uint32 Mohawk::RivenStack::getCardGlobalId ( uint16  cardId) const

Get the global id of a card in the stack

◆ runCommand()

void Mohawk::RivenStack::runCommand ( uint16  commandNameId,
const Common::Array< uint16 > &  args 
)

Run an external command with the specified parameters

◆ dump()

void Mohawk::RivenStack::dump ( ) const

Write all of the stack's data including its cards to standard output

◆ installCardTimer()

virtual void Mohawk::RivenStack::installCardTimer ( )
virtual

Install a timer for the current card if one is defined

Reimplemented in Mohawk::RivenStacks::JSpit, and Mohawk::RivenStacks::PSpit.

◆ removeTimer()

void Mohawk::RivenStack::removeTimer ( )

Clear any currently installed timer

◆ onMouseDown()

void Mohawk::RivenStack::onMouseDown ( const Common::Point mouse)

Handle a mouse down event

◆ onMouseUp()

void Mohawk::RivenStack::onMouseUp ( const Common::Point mouse)

Handle a mouse up event

◆ onMouseMove()

void Mohawk::RivenStack::onMouseMove ( const Common::Point mouse)

Handle a mouse move event

◆ queueMouseCursorRefresh()

void Mohawk::RivenStack::queueMouseCursorRefresh ( )

The mouse cursor needs to be refreshed on the next interactive frame

Even if the mouse didn't move.

◆ onFrame()

void Mohawk::RivenStack::onFrame ( )

Frame update handler

◆ mouseIsDown()

bool Mohawk::RivenStack::mouseIsDown ( ) const

Is the left mouse button currently pressed?

◆ getMousePosition()

Common::Point Mohawk::RivenStack::getMousePosition ( ) const

Get the current mouse position

◆ getMouseDragStartPosition()

Common::Point Mohawk::RivenStack::getMouseDragStartPosition ( ) const

Get the mouse position when dragging started

◆ mouseForceUp()

void Mohawk::RivenStack::mouseForceUp ( )

Force the left mouse button to be considered unpressed until the next mouse click

◆ onAction()

void Mohawk::RivenStack::onAction ( RivenAction  keyAction)

Handle a key press event

◆ getAction()

RivenAction Mohawk::RivenStack::getAction ( ) const

Get the action for the pressed keyboard key, if any

◆ resetAction()

void Mohawk::RivenStack::resetAction ( )

Force the keyboard to be considered unpressed until the next key press

◆ registerCommand()

void Mohawk::RivenStack::registerCommand ( const Common::String name,
ExternalCommand command 
)
protected

Register an external command for use by the scripts

◆ installTimer()

void Mohawk::RivenStack::installTimer ( TimerProc proc,
uint32  time 
)
protected

Register a proc for planned execution


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