aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2016-12-07 19:03:08 +0100
committerEugene Sandulenko2016-12-07 19:03:08 +0100
commit7e1dc617c4bd23707bce447fcfe66ad51be745c5 (patch)
treee89a18737cfefbd965c916381a06a1660aa85f48 /engines
parent000a68cf7900ee2388c6d3b53fd6ca62a6c53ae3 (diff)
downloadscummvm-rg350-7e1dc617c4bd23707bce447fcfe66ad51be745c5.tar.gz
scummvm-rg350-7e1dc617c4bd23707bce447fcfe66ad51be745c5.tar.bz2
scummvm-rg350-7e1dc617c4bd23707bce447fcfe66ad51be745c5.zip
FULLPIPE: Implement isSaveAllowed()
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/fullpipe.cpp14
-rw-r--r--engines/fullpipe/fullpipe.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index 8a9b323761..162dff39c9 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -603,5 +603,19 @@ void FullpipeEngine::disableSaves(ExCommand *ex) {
}
}
+bool FullpipeEngine::isSaveAllowed() {
+ if (!g_fp->_isSaveAllowed)
+ return false;
+
+ bool allowed = true;
+
+ for (Common::Array<MessageQueue *>::iterator s = g_fp->_globalMessageQueueList->begin(); s != g_fp->_globalMessageQueueList->end(); ++s) {
+ if (!(*s)->_isFinished && ((*s)->getFlags() & 1))
+ allowed = false;
+ }
+
+ return allowed;
+}
+
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index f6a8e00219..41769baab9 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -235,6 +235,7 @@ public:
void enableSaves() { _isSaveAllowed = true; }
void disableSaves(ExCommand *ex);
+ bool isSaveAllowed();
void initObjectStates();
void setLevelStates();