aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision/scripting/script_manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/zvision/scripting/script_manager.cpp')
-rw-r--r--engines/zvision/scripting/script_manager.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/engines/zvision/scripting/script_manager.cpp b/engines/zvision/scripting/script_manager.cpp
index 4dd51816a0..6a9398d356 100644
--- a/engines/zvision/scripting/script_manager.cpp
+++ b/engines/zvision/scripting/script_manager.cpp
@@ -486,6 +486,10 @@ void ScriptManager::onKeyUp(Common::KeyState keyState) {
}
}
+void ScriptManager::changeLocation(const Location &_newLocation) {
+ changeLocation(_newLocation.world, _newLocation.room, _newLocation.node, _newLocation.view, _newLocation.offset);
+}
+
void ScriptManager::changeLocation(char _world, char _room, char _node, char _view, uint32 offset) {
_nextLocation.world = _world;
_nextLocation.room = _room;
@@ -731,6 +735,28 @@ Location ScriptManager::getCurrentLocation() const {
return location;
}
+Location ScriptManager::getLastLocation() {
+ Location location;
+ location.world = getStateValue(StateKey_LastWorld);
+ location.room = getStateValue(StateKey_LastRoom);
+ location.node = getStateValue(StateKey_LastNode);
+ location.view = getStateValue(StateKey_LastView);
+ location.offset = getStateValue(StateKey_LastViewPos);
+
+ return location;
+}
+
+Location ScriptManager::getLastMenuLocation() {
+ Location location;
+ location.world = getStateValue(StateKey_Menu_LastWorld);
+ location.room = getStateValue(StateKey_Menu_LastRoom);
+ location.node = getStateValue(StateKey_Menu_LastNode);
+ location.view = getStateValue(StateKey_Menu_LastView);
+ location.offset = getStateValue(StateKey_Menu_LastViewPos);
+
+ return location;
+}
+
void ScriptManager::addEvent(Common::Event event) {
_controlEvents.push_back(event);
}