aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2014-04-30 08:22:03 +0300
committerEugene Sandulenko2014-04-30 08:22:23 +0300
commitb5271364a34d753291b58b5eb344894f17cfe797 (patch)
tree8addde29cc3b4be7cdecc73057cb8e7ed354cfa2
parent1e4f171e8add003a40454af911d933cd6b9ffd0c (diff)
downloadscummvm-rg350-b5271364a34d753291b58b5eb344894f17cfe797.tar.gz
scummvm-rg350-b5271364a34d753291b58b5eb344894f17cfe797.tar.bz2
scummvm-rg350-b5271364a34d753291b58b5eb344894f17cfe797.zip
FULLPIPE: Implement ModalSaveGame::update()
-rw-r--r--engines/fullpipe/modal.cpp56
-rw-r--r--engines/fullpipe/modal.h2
2 files changed, 57 insertions, 1 deletions
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index dbbd7beeb2..39b021b38a 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -1629,6 +1629,62 @@ bool ModalSaveGame::getFileInfo(char *filename, FileInfo *fileinfo) {
return false;
}
+void ModalSaveGame::update() {
+ if (_menuScene)
+ _menuScene->draw();
+
+ _bgr->draw();
+
+ if (_queryDlg) {
+ _queryDlg->update();
+
+ return;
+ }
+
+ g_fp->_cursorId = PIC_CSR_DEFAULT;
+
+ g_fp->setCursor(g_fp->_cursorId);
+
+ Common::Point point;
+
+ for (uint i = 0; i < _files.size(); i++) {
+ if (g_fp->_mouseScreenPos.x < _files[i]->fx1 || g_fp->_mouseScreenPos.x > _files[i]->fx2 ||
+ g_fp->_mouseScreenPos.y < _files[i]->fy1 || g_fp->_mouseScreenPos.y > _files[i]->fy2 ) {
+ if (_files[i]->empty) {
+ _emptyD->setOXY(_files[i]->fx1, _files[i]->fy1);
+ _emptyD->draw();
+ } else {
+ int x = _files[i]->fx1;
+
+ for (int j = 0; j < 16; j++) {
+ _arrayL[j + _files[i]->day]->setOXY(x + 1, _files[i]->fy1);
+ _arrayL[j + _files[i]->day]->draw();
+
+ x += _arrayL[j + _files[i]->day]->getDimensions(&point)->x + 2;
+ }
+ }
+ } else {
+ if (_files[i]->empty) {
+ _emptyL->setOXY(_files[i]->fx1, _files[i]->fy1);
+ _emptyL->draw();
+ } else {
+ int x = _files[i]->fx1;
+
+ for (int j = 0; j < 16; j++) {
+ _arrayD[j + _files[i]->day]->setOXY(x + 1, _files[i]->fy1);
+ _arrayD[j + _files[i]->day]->draw();
+
+ x += _arrayD[j + _files[i]->day]->getDimensions(&point)->x + 2;
+ }
+ }
+ }
+ }
+ if (_cancelL->isPixelHitAtPos(g_fp->_mouseScreenPos.x, g_fp->_mouseScreenPos.y))
+ _cancelL->draw();
+ else if (_okL->isPixelHitAtPos(g_fp->_mouseScreenPos.x, g_fp->_mouseScreenPos.y))
+ _okL->draw();
+}
+
bool ModalSaveGame::handleMessage(ExCommand *cmd) {
if (_queryDlg)
return _queryDlg->handleMessage(cmd);
diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h
index 48ae2b2970..2c2295f775 100644
--- a/engines/fullpipe/modal.h
+++ b/engines/fullpipe/modal.h
@@ -258,7 +258,7 @@ public:
virtual bool pollEvent() { return true; }
virtual bool handleMessage(ExCommand *message);
virtual bool init(int counterdiff);
- virtual void update() {}
+ virtual void update();
virtual void saveload() {}
void processMouse(int x, int y);