mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-30 23:43:10 +00:00
MOHAWK: Add a convenience method for creating a script with a single command
This commit is contained in:
parent
14bbf8aab4
commit
6d4260719c
@ -153,6 +153,14 @@ RivenScriptPtr RivenScriptManager::createScriptFromData(uint16 commandCount, ...
|
||||
return readScript(&readStream);
|
||||
}
|
||||
|
||||
RivenScriptPtr RivenScriptManager::createScriptWithCommand(RivenCommand *command) {
|
||||
assert(command);
|
||||
|
||||
RivenScriptPtr script = RivenScriptPtr(new RivenScript());
|
||||
script->addCommand(command);
|
||||
return script;
|
||||
}
|
||||
|
||||
RivenScript::RivenScript() {
|
||||
_continueRunning = true;
|
||||
}
|
||||
|
@ -130,6 +130,13 @@ public:
|
||||
/** Create a script from the caller provided arguments containing raw data */
|
||||
RivenScriptPtr createScriptFromData(uint16 commandCount, ...);
|
||||
|
||||
/**
|
||||
* Create a script with a single user provided command
|
||||
*
|
||||
* The script takes ownership of the command.
|
||||
*/
|
||||
RivenScriptPtr createScriptWithCommand(RivenCommand *command);
|
||||
|
||||
/** Read a list of typed scripts from a stream */
|
||||
RivenScriptList readScripts(Common::ReadStream *stream);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user