aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2015-01-20 01:21:16 +0200
committerFilippos Karapetis2015-01-20 01:21:16 +0200
commit5f9858844a24b00e75ef2c504b2d68c189261dd2 (patch)
tree55496eec60de4490784dedc5b590ad138ab5b183
parent5df2e08c1668c6649f7817688ce1ce198e563083 (diff)
downloadscummvm-rg350-5f9858844a24b00e75ef2c504b2d68c189261dd2.tar.gz
scummvm-rg350-5f9858844a24b00e75ef2c504b2d68c189261dd2.tar.bz2
scummvm-rg350-5f9858844a24b00e75ef2c504b2d68c189261dd2.zip
ZVISION: Fix saving when using the original save dialog
A regression from commit dcac5be493
-rw-r--r--engines/zvision/scripting/script_manager.cpp28
1 files changed, 16 insertions, 12 deletions
diff --git a/engines/zvision/scripting/script_manager.cpp b/engines/zvision/scripting/script_manager.cpp
index 34376cee5b..a4491103e6 100644
--- a/engines/zvision/scripting/script_manager.cpp
+++ b/engines/zvision/scripting/script_manager.cpp
@@ -594,26 +594,30 @@ void ScriptManager::ChangeLocationReal(bool isLoading) {
_engine->setRenderDelay(2);
- if (!enteringMenu) {
- if (!isLoading && !leavingMenu) {
+ if (!leavingMenu) {
+ if (!isLoading && !enteringMenu) {
setStateValue(StateKey_LastWorld, getStateValue(StateKey_World));
setStateValue(StateKey_LastRoom, getStateValue(StateKey_Room));
setStateValue(StateKey_LastNode, getStateValue(StateKey_Node));
setStateValue(StateKey_LastView, getStateValue(StateKey_View));
setStateValue(StateKey_LastViewPos, getStateValue(StateKey_ViewPos));
+ } else {
+ setStateValue(StateKey_Menu_LastWorld, getStateValue(StateKey_World));
+ setStateValue(StateKey_Menu_LastRoom, getStateValue(StateKey_Room));
+ setStateValue(StateKey_Menu_LastNode, getStateValue(StateKey_Node));
+ setStateValue(StateKey_Menu_LastView, getStateValue(StateKey_View));
+ setStateValue(StateKey_Menu_LastViewPos, getStateValue(StateKey_ViewPos));
}
- } else {
- setStateValue(StateKey_Menu_LastWorld, getStateValue(StateKey_World));
- setStateValue(StateKey_Menu_LastRoom, getStateValue(StateKey_Room));
- setStateValue(StateKey_Menu_LastNode, getStateValue(StateKey_Node));
- setStateValue(StateKey_Menu_LastView, getStateValue(StateKey_View));
- setStateValue(StateKey_Menu_LastViewPos, getStateValue(StateKey_ViewPos));
}
- if (isSaveScreen && !leavingMenu) {
- _engine->getSaveManager()->prepareSaveBuffer();
- } else if (leavingMenu) {
- _engine->getSaveManager()->flushSaveBuffer();
+ if (enteringMenu) {
+ if (isSaveScreen && !leavingMenu) {
+ _engine->getSaveManager()->prepareSaveBuffer();
+ }
+ } else {
+ if (leavingMenu) {
+ _engine->getSaveManager()->flushSaveBuffer();
+ }
}
setStateValue(StateKey_World, _nextLocation.world);