#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 () |
Script manager
Reads scripts from raw data. Can run scripts immediately, or store them for future execution.
RivenScriptPtr Mohawk::RivenScriptManager::readScript | ( | Common::ReadStream * | stream | ) |
Read a single script from a stream
RivenScriptPtr Mohawk::RivenScriptManager::readScriptFromData | ( | uint16 * | data, |
uint16 | size | ||
) |
Read a script from an array of uint16
data | Script data array. Will be modified. |
size | Number of uint16 in data |
RivenScriptPtr Mohawk::RivenScriptManager::createScriptFromData | ( | uint | commandCount, |
... | |||
) |
Create a script from the caller provided arguments containing raw data
RivenScriptPtr Mohawk::RivenScriptManager::createScriptWithCommand | ( | RivenCommand * | command | ) |
Create a script with a single user provided command
The script takes ownership of the command.
RivenScriptList Mohawk::RivenScriptManager::readScripts | ( | Common::ReadStream * | stream | ) |
Read a list of typed scripts from a stream
void Mohawk::RivenScriptManager::runScript | ( | const RivenScriptPtr & | script, |
bool | queue | ||
) |
Run a script
bool Mohawk::RivenScriptManager::hasQueuedScripts | ( | ) | const |
Are scripts running in the background
void Mohawk::RivenScriptManager::runQueuedScripts | ( | ) |
Run queued scripts
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.
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.
bool Mohawk::RivenScriptManager::stoppingAllScripts | ( | ) | const |
Should all the scripts stop immediately?