ScummVM API documentation
Mohawk::RivenScriptManager Class Reference

#include <riven_scripts.h>

Classes

struct  StoredMovieOpcode
 

Public Member Functions

 RivenScriptManager (MohawkEngine_Riven *vm)
 
RivenScriptPtr readScript (Common::ReadStream *stream)
 
RivenScriptPtr readScriptFromData (uint16 *data, uint16 size)
 
RivenScriptPtr createScriptFromData (uint commandCount,...)
 
RivenScriptPtr createScriptWithCommand (RivenCommand *command)
 
RivenScriptList readScripts (Common::ReadStream *stream)
 
void runScript (const RivenScriptPtr &script, bool queue)
 
bool hasQueuedScripts () const
 
void runQueuedScripts ()
 
bool runningQueuedScripts () const
 
void stopAllScripts ()
 
bool stoppingAllScripts () const
 
uint16 getStoredMovieOpcodeSlot ()
 
uint32 getStoredMovieOpcodeTime ()
 
void setStoredMovieOpcode (const StoredMovieOpcode &op)
 
void runStoredMovieOpcode ()
 
void clearStoredMovieOpcode ()
 

Detailed Description

Script manager

Reads scripts from raw data. Can run scripts immediately, or store them for future execution.

Member Function Documentation

◆ readScript()

RivenScriptPtr Mohawk::RivenScriptManager::readScript ( Common::ReadStream stream)

Read a single script from a stream

◆ readScriptFromData()

RivenScriptPtr Mohawk::RivenScriptManager::readScriptFromData ( uint16 *  data,
uint16  size 
)

Read a script from an array of uint16

Parameters
dataScript data array. Will be modified.
sizeNumber of uint16 in data
Returns

◆ createScriptFromData()

RivenScriptPtr Mohawk::RivenScriptManager::createScriptFromData ( uint  commandCount,
  ... 
)

Create a script from the caller provided arguments containing raw data

◆ createScriptWithCommand()

RivenScriptPtr Mohawk::RivenScriptManager::createScriptWithCommand ( RivenCommand command)

Create a script with a single user provided command

The script takes ownership of the command.

◆ readScripts()

RivenScriptList Mohawk::RivenScriptManager::readScripts ( Common::ReadStream stream)

Read a list of typed scripts from a stream

◆ runScript()

void Mohawk::RivenScriptManager::runScript ( const RivenScriptPtr script,
bool  queue 
)

Run a script

◆ hasQueuedScripts()

bool Mohawk::RivenScriptManager::hasQueuedScripts ( ) const

Are scripts running in the background

◆ runQueuedScripts()

void Mohawk::RivenScriptManager::runQueuedScripts ( )

Run queued scripts

◆ runningQueuedScripts()

bool Mohawk::RivenScriptManager::runningQueuedScripts ( ) const

Are queued scripts currently running?

The game is mostly non-interactive while scripts are running. This method is used to check if user interaction should be permitted.

◆ stopAllScripts()

void Mohawk::RivenScriptManager::stopAllScripts ( )

Stop running all the scripts

This is effective immediately after the current command completes. The next command in the script is not executed. The next scripts in the queue are skipped until the queue is empty. Scripts execution then resumes normally.

◆ stoppingAllScripts()

bool Mohawk::RivenScriptManager::stoppingAllScripts ( ) const

Should all the scripts stop immediately?


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