ScummVM API documentation
ZVision::ScriptManager Class Reference

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)
 
ControlgetControl (uint32 key)
 
void enableControl (uint32 key)
 
void disableControl (uint32 key)
 
void focusControl (uint32 key)
 
void setFocusControlKey (uint32 key)
 
void addSideFX (ScriptingEffect *fx)
 
ScriptingEffectgetSideFX (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 ()
 

Member Function Documentation

◆ onMouseDown()

void ZVision::ScriptManager::onMouseDown ( const Common::Point screenSpacePos,
const Common::Point backgroundImageSpacePos 
)

Called when LeftMouse is pushed.

Parameters
screenSpacePosThe position of the mouse in screen space
backgroundImageSpacePosThe position of the mouse in background image space

◆ onMouseUp()

void ZVision::ScriptManager::onMouseUp ( const Common::Point screenSpacePos,
const Common::Point backgroundImageSpacePos 
)

Called when LeftMouse is lifted.

Parameters
screenSpacePosThe position of the mouse in screen space
backgroundImageSpacePosThe position of the mouse in background image space

◆ onMouseMove()

bool ZVision::ScriptManager::onMouseMove ( const Common::Point screenSpacePos,
const Common::Point backgroundImageSpacePos 
)

Called on every MouseMove.

Parameters
screenSpacePosThe position of the mouse in screen space
backgroundImageSpacePosThe position of the mouse in background image space
Returns
Was the cursor changed?

◆ onKeyDown()

void ZVision::ScriptManager::onKeyDown ( Common::KeyState  keyState)

Called when a key is pressed.

Parameters
keycodeThe key that was pressed

◆ onKeyUp()

void ZVision::ScriptManager::onKeyUp ( Common::KeyState  keyState)

Called when a key is released.

Parameters
keycodeThe key that was pressed

◆ changeLocation()

void ZVision::ScriptManager::changeLocation ( char  world,
char  room,
char  node,
char  view,
uint32  offset 
)

Mark next location

◆ trimCommentsAndWhiteSpace()

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.

Parameters
stringThe string to modify. It is modified in place

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