[Scummvm-cvs-logs] scummvm master -> b5271364a34d753291b58b5eb344894f17cfe797
sev-
sev at scummvm.org
Wed Apr 30 07:23:31 CEST 2014
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
8fde4cf50f FULLPIPE: Implement ModalSaveGame::processMouse()
1e4f171e8a FULLPIPE: Implement ModalSaveGame::handleMessage()
b5271364a3 FULLPIPE: Implement ModalSaveGame::update()
Commit: 8fde4cf50f7095c17eafd6bc4946837883e0f0c5
https://github.com/scummvm/scummvm/commit/8fde4cf50f7095c17eafd6bc4946837883e0f0c5
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-04-30T08:22:23+03:00
Commit Message:
FULLPIPE: Implement ModalSaveGame::processMouse()
Changed paths:
engines/fullpipe/modal.cpp
engines/fullpipe/modal.h
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index bba5df0..83ebdd6 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -1629,6 +1629,27 @@ bool ModalSaveGame::getFileInfo(char *filename, FileInfo *fileinfo) {
return false;
}
+void ModalSaveGame::processMouse(int x, int y) {
+ for (uint i = 0; i < _files.size(); i++) {
+ if (x >= _files[i]->fx1 && x <= _files[i]->fx2 && y >= _files[i]->fy1 && y <= _files[i]->fy2) {
+ _queryRes = i + 1;
+
+ if (_mode) {
+ if (!_files[i]->empty) {
+ _queryDlg = new ModalQuery;
+
+ _queryDlg->create(_menuScene, 0, PIC_MOV_BGR);
+ }
+ }
+
+ return;
+ }
+ }
+
+ if (_cancelL->isPixelHitAtPos(x, y))
+ _queryRes = 0;
+}
+
void FullpipeEngine::openHelp() {
if (!_modalObject) {
ModalHelp *help = new ModalHelp;
diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h
index a214b1c..6bbf6ec 100644
--- a/engines/fullpipe/modal.h
+++ b/engines/fullpipe/modal.h
@@ -261,6 +261,8 @@ public:
virtual void update() {}
virtual void saveload() {}
+ void processMouse(int x, int y);
+
void setScene(Scene *sc);
void setup(Scene *sc, int mode);
void processKey(int key);
Commit: 1e4f171e8add003a40454af911d933cd6b9ffd0c
https://github.com/scummvm/scummvm/commit/1e4f171e8add003a40454af911d933cd6b9ffd0c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-04-30T08:22:23+03:00
Commit Message:
FULLPIPE: Implement ModalSaveGame::handleMessage()
Changed paths:
engines/fullpipe/modal.cpp
engines/fullpipe/modal.h
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index 83ebdd6..dbbd7be 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -1629,6 +1629,18 @@ bool ModalSaveGame::getFileInfo(char *filename, FileInfo *fileinfo) {
return false;
}
+bool ModalSaveGame::handleMessage(ExCommand *cmd) {
+ if (_queryDlg)
+ return _queryDlg->handleMessage(cmd);
+
+ if (cmd->_messageNum == 29)
+ processMouse(cmd->_x, cmd->_y);
+ else if (cmd->_messageNum == 36)
+ processKey(cmd->_keyCode);
+
+ return false;
+}
+
void ModalSaveGame::processMouse(int x, int y) {
for (uint i = 0; i < _files.size(); i++) {
if (x >= _files[i]->fx1 && x <= _files[i]->fx2 && y >= _files[i]->fy1 && y <= _files[i]->fy2) {
diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h
index 6bbf6ec..48ae2b2 100644
--- a/engines/fullpipe/modal.h
+++ b/engines/fullpipe/modal.h
@@ -256,7 +256,7 @@ public:
virtual ~ModalSaveGame();
virtual bool pollEvent() { return true; }
- virtual bool handleMessage(ExCommand *message) { return false; }
+ virtual bool handleMessage(ExCommand *message);
virtual bool init(int counterdiff);
virtual void update() {}
virtual void saveload() {}
Commit: b5271364a34d753291b58b5eb344894f17cfe797
https://github.com/scummvm/scummvm/commit/b5271364a34d753291b58b5eb344894f17cfe797
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-04-30T08:22:23+03:00
Commit Message:
FULLPIPE: Implement ModalSaveGame::update()
Changed paths:
engines/fullpipe/modal.cpp
engines/fullpipe/modal.h
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index dbbd7be..39b021b 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 48ae2b2..2c2295f 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);
More information about the Scummvm-git-logs
mailing list