#include <riven_stack.h>
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 |
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.
uint16 Mohawk::RivenStack::getId | ( | ) | const |
Get the id of the stack
Common::String Mohawk::RivenStack::getName | ( | RivenNameResource | nameResource, |
uint16 | nameId | ||
) | const |
Get the name of a resource using its id
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.
void Mohawk::RivenStack::registerName | ( | RivenNameResource | nameResource, |
uint16 | nameId, | ||
const Common::String & | name | ||
) |
Add a name id => name mapping in a name list
uint16 Mohawk::RivenStack::getCardStackId | ( | uint32 | globalId | ) | const |
Get the id of a card in the card from its global identifier
uint32 Mohawk::RivenStack::getCurrentCardGlobalId | ( | ) | const |
Get the global id of the currently active card
uint32 Mohawk::RivenStack::getCardGlobalId | ( | uint16 | cardId | ) | const |
Get the global id of a card in the stack
void Mohawk::RivenStack::runCommand | ( | uint16 | commandNameId, |
const Common::Array< uint16 > & | args | ||
) |
Run an external command with the specified parameters
void Mohawk::RivenStack::dump | ( | ) | const |
Write all of the stack's data including its cards to standard output
|
virtual |
Install a timer for the current card if one is defined
Reimplemented in Mohawk::RivenStacks::JSpit, and Mohawk::RivenStacks::PSpit.
void Mohawk::RivenStack::removeTimer | ( | ) |
Clear any currently installed timer
void Mohawk::RivenStack::onMouseDown | ( | const Common::Point & | mouse | ) |
Handle a mouse down event
void Mohawk::RivenStack::onMouseUp | ( | const Common::Point & | mouse | ) |
Handle a mouse up event
void Mohawk::RivenStack::onMouseMove | ( | const Common::Point & | mouse | ) |
Handle a mouse move event
void Mohawk::RivenStack::queueMouseCursorRefresh | ( | ) |
The mouse cursor needs to be refreshed on the next interactive frame
Even if the mouse didn't move.
void Mohawk::RivenStack::onFrame | ( | ) |
Frame update handler
bool Mohawk::RivenStack::mouseIsDown | ( | ) | const |
Is the left mouse button currently pressed?
Common::Point Mohawk::RivenStack::getMousePosition | ( | ) | const |
Get the current mouse position
Common::Point Mohawk::RivenStack::getMouseDragStartPosition | ( | ) | const |
Get the mouse position when dragging started
void Mohawk::RivenStack::mouseForceUp | ( | ) |
Force the left mouse button to be considered unpressed until the next mouse click
void Mohawk::RivenStack::onAction | ( | RivenAction | keyAction | ) |
Handle a key press event
RivenAction Mohawk::RivenStack::getAction | ( | ) | const |
Get the action for the pressed keyboard key, if any
void Mohawk::RivenStack::resetAction | ( | ) |
Force the keyboard to be considered unpressed until the next key press
|
protected |
Register an external command for use by the scripts
|
protected |
Register a proc for planned execution