[Scummvm-cvs-logs] scummvm master -> 5a966eef390ef6d8e56bd5afa42ab6871b484417
sev-
sev at scummvm.org
Mon Apr 28 07:19:11 CEST 2014
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5a966eef39 FULLPIPE: Implement ModalSaveGame::init()
Commit: 5a966eef390ef6d8e56bd5afa42ab6871b484417
https://github.com/scummvm/scummvm/commit/5a966eef390ef6d8e56bd5afa42ab6871b484417
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-04-28T08:18:10+03:00
Commit Message:
FULLPIPE: Implement ModalSaveGame::init()
Changed paths:
engines/fullpipe/modal.cpp
engines/fullpipe/modal.h
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index 36dd006..459c714 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()");
}
diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h
index bd6cc18..e2962ab 100644
--- a/engines/fullpipe/modal.h
+++ b/engines/fullpipe/modal.h
@@ -244,7 +244,7 @@ public:
virtual bool pollEvent() { return true; }
virtual bool handleMessage(ExCommand *message) { return false; }
- virtual bool init(int counterdiff) { return true; }
+ virtual bool init(int counterdiff);
virtual void update() {}
virtual void saveload() {}
More information about the Scummvm-git-logs
mailing list