Public Member Functions | |
ScriptManager (ZVision *engine) | |
void | initialize () |
void | update (uint deltaTimeMillis) |
void | queuePuzzles (uint32 key) |
int | getStateValue (uint32 key) |
void | setStateValue (uint32 key, int value) |
uint | getStateFlag (uint32 key) |
void | setStateFlag (uint32 key, uint value) |
void | unsetStateFlag (uint32 key, uint value) |
void | addControl (Control *control) |
Control * | getControl (uint32 key) |
void | enableControl (uint32 key) |
void | disableControl (uint32 key) |
void | focusControl (uint32 key) |
void | setFocusControlKey (uint32 key) |
void | addSideFX (ScriptingEffect *fx) |
ScriptingEffect * | getSideFX (uint32 key) |
void | deleteSideFx (uint32 key) |
void | stopSideFx (uint32 key) |
void | killSideFx (uint32 key) |
void | killSideFxType (ScriptingEffect::ScriptingEffectType type) |
void | addEvent (Common::Event) |
void | flushEvent (Common::EventType type) |
void | onMouseDown (const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) |
void | onMouseUp (const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) |
bool | onMouseMove (const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) |
void | onKeyDown (Common::KeyState keyState) |
void | onKeyUp (Common::KeyState keyState) |
void | changeLocation (char world, char room, char node, char view, uint32 offset) |
void | changeLocation (const Location &_newLocation) |
void | serialize (Common::WriteStream *stream) |
void | deserialize (Common::SeekableReadStream *stream) |
Location | getCurrentLocation () const |
Location | getLastLocation () |
Location | getLastMenuLocation () |
void | trimCommentsAndWhiteSpace (Common::String *string) const |
void | inventoryAdd (int16 item) |
void | inventoryDrop (int16 item) |
void | inventoryCycle () |
void ZVision::ScriptManager::onMouseDown | ( | const Common::Point & | screenSpacePos, |
const Common::Point & | backgroundImageSpacePos | ||
) |
Called when LeftMouse is pushed.
screenSpacePos | The position of the mouse in screen space |
backgroundImageSpacePos | The position of the mouse in background image space |
void ZVision::ScriptManager::onMouseUp | ( | const Common::Point & | screenSpacePos, |
const Common::Point & | backgroundImageSpacePos | ||
) |
Called when LeftMouse is lifted.
screenSpacePos | The position of the mouse in screen space |
backgroundImageSpacePos | The position of the mouse in background image space |
bool ZVision::ScriptManager::onMouseMove | ( | const Common::Point & | screenSpacePos, |
const Common::Point & | backgroundImageSpacePos | ||
) |
Called on every MouseMove.
screenSpacePos | The position of the mouse in screen space |
backgroundImageSpacePos | The position of the mouse in background image space |
void ZVision::ScriptManager::onKeyDown | ( | Common::KeyState | keyState | ) |
Called when a key is pressed.
keycode | The key that was pressed |
void ZVision::ScriptManager::onKeyUp | ( | Common::KeyState | keyState | ) |
Called when a key is released.
keycode | The key that was pressed |
void ZVision::ScriptManager::changeLocation | ( | char | world, |
char | room, | ||
char | node, | ||
char | view, | ||
uint32 | offset | ||
) |
Mark next location
void ZVision::ScriptManager::trimCommentsAndWhiteSpace | ( | Common::String * | string | ) | const |
Removes any line comments using '#' as a sequence start. Then removes any trailing and leading 'whitespace' using String::trim() Note: String::trim uses isspace() to determine what is whitespace and what is not.
string | The string to modify. It is modified in place |