#include <GameMonkey.h>
Wraps a GameMonkey interpreter machine instance to load/run GameMonkey scripts.
◆ GameMonkey()
Ult::GameMonkey::GameMonkey |
( |
| ) |
|
|
inline |
◆ ~GameMonkey()
virtual Ult::GameMonkey::~GameMonkey |
( |
| ) |
|
|
inlinevirtual |
◆ ExecuteScript()
void Ult::GameMonkey::ExecuteScript |
( |
GmScript | handle | ) |
|
Execute the loaded script referenced by the input handle.
◆ GetError()
const char * Ult::GameMonkey::GetError |
( |
| ) |
|
|
inline |
Returns a string of any errors encountered in LoadScript.
◆ GetScriptFunction()
bool Ult::GameMonkey::GetScriptFunction |
( |
const std::string & | name, |
|
|
GameMonkeyFunction & | call ) |
Get a handle to a function contained in a previously loaded script.
- Parameters
-
name | The function name to find. |
call | The result to store the function handle in. |
- Returns
- True if the function with the given name was found, false otherwise.
◆ LoadScript()
bool Ult::GameMonkey::LoadScript |
( |
const std::string & | script, |
|
|
GmScript * | handle ) |
Load a script from file and store a handle to it. If errors, adds to the buffer accessible by GetError().
- Parameters
-
script | The filename of the GameMonkey script to load. |
handle | Pointer to the result handle to store. |
- Returns
- True on success, false on failure.
◆ RegisterHostFunction()
void Ult::GameMonkey::RegisterHostFunction |
( |
const std::string & | name, |
|
|
gmCFunction | func ) |
Make a function callable from a GameMonkey script.
- Parameters
-
name | The name of the function to use within the GM script. |
func | Function pointer to be ran when the GM script calls 'name'. |
The documentation for this class was generated from the following files: