aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/modal.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2014-04-28 08:18:10 +0300
committerEugene Sandulenko2014-04-28 08:18:10 +0300
commit5a966eef390ef6d8e56bd5afa42ab6871b484417 (patch)
treea202f8b08dd1a7bd9492427bb2a81fcc0b0c0ce9 /engines/fullpipe/modal.cpp
parent277a712f0b6835a54c2ee9373b06ff6db42eb7f9 (diff)
downloadscummvm-rg350-5a966eef390ef6d8e56bd5afa42ab6871b484417.tar.gz
scummvm-rg350-5a966eef390ef6d8e56bd5afa42ab6871b484417.tar.bz2
scummvm-rg350-5a966eef390ef6d8e56bd5afa42ab6871b484417.zip
FULLPIPE: Implement ModalSaveGame::init()
Diffstat (limited to 'engines/fullpipe/modal.cpp')
-rw-r--r--engines/fullpipe/modal.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index 36dd0066df..459c714984 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -1484,6 +1484,47 @@ void ModalSaveGame::processKey(int key) {
_queryRes = 0;
}
+bool ModalSaveGame::init(int counterdiff) {
+ if (_queryDlg) {
+ if (!_queryDlg->init(counterdiff)) {
+ if (!_queryDlg->getQueryResult())
+ _queryRes = -1;
+
+ delete _queryDlg;
+ _queryDlg = 0;
+ }
+
+ return true;
+ }
+
+ if (_queryRes == -1)
+ return true;
+
+ g_fp->_sceneRect = _rect;
+
+ if (g_fp->_currentScene) {
+ g_fp->_currentScene->_x = _oldBgX;
+ g_fp->_currentScene->_y = _oldBgY;
+ }
+
+ if (!_queryRes) {
+ ModalMainMenu *m = new ModalMainMenu;
+
+ g_fp->_modalObject = m;
+
+ m->_parentObj = _parentObj;
+ m->_screct = _rect;
+ m->_bgX = _oldBgX;
+ m->_bgY = _oldBgY;
+
+ delete this;
+
+ return true;
+ }
+
+ return false;
+}
+
void ModalSaveGame::setup(Scene *sc, int mode) {
warning("STUB: ModalSaveGame::setup()");
}