[Scummvm-cvs-logs] scummvm master -> 6832352c9b745a3d5fe89ae95ff8332264d75401
sev-
sev at scummvm.org
Sat Feb 1 21:26:38 CET 2014
This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
e4e699beb2 FULLPIPE: Check for potential null dereference. Matches original
5cf538bc01 FULLPIPE: Fix stupid error with wrong identifier. CID 1166823
1a77fba3f9 FULLPIPE: Starter ModalHelp implementation
60622b49f7 FULLPIPE: More code to ModalHelp
8ac3a3654b FULLPIPE: Implement ModalHelp::launch()
6832352c9b FULLPIPE: Implement openHelp(). This completes the help screen
Commit: e4e699beb25a69d41878d884f763608636d4ba7d
https://github.com/scummvm/scummvm/commit/e4e699beb25a69d41878d884f763608636d4ba7d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-02-01T12:25:53-08:00
Commit Message:
FULLPIPE: Check for potential null dereference. Matches original
Changed paths:
engines/fullpipe/lift.cpp
diff --git a/engines/fullpipe/lift.cpp b/engines/fullpipe/lift.cpp
index 8acea6a..13e2af3 100644
--- a/engines/fullpipe/lift.cpp
+++ b/engines/fullpipe/lift.cpp
@@ -220,8 +220,12 @@ void FullpipeEngine::lift_init(Scene *sc, int enterSeq, int exitSeq) {
}
void FullpipeEngine::lift_exitSeq(ExCommand *cmd) {
- if (cmd)
- _globalMessageQueueList->getMessageQueueById(cmd->_parId)->activateExCommandsByKind(34);
+ if (cmd) {
+ MessageQueue *mq = _globalMessageQueueList->getMessageQueueById(cmd->_parId);
+
+ if (mq)
+ mq->activateExCommandsByKind(34);
+ }
_lift->changeStatics2(ST_LFT_CLOSED);
Commit: 5cf538bc01d8a29d268415238b9b8d021f8f0915
https://github.com/scummvm/scummvm/commit/5cf538bc01d8a29d268415238b9b8d021f8f0915
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-02-01T12:25:53-08:00
Commit Message:
FULLPIPE: Fix stupid error with wrong identifier. CID 1166823
Changed paths:
engines/fullpipe/lift.cpp
diff --git a/engines/fullpipe/lift.cpp b/engines/fullpipe/lift.cpp
index 13e2af3..37c4a30 100644
--- a/engines/fullpipe/lift.cpp
+++ b/engines/fullpipe/lift.cpp
@@ -238,7 +238,7 @@ void FullpipeEngine::lift_exitSeq(ExCommand *cmd) {
ex->_excFlags |= 3;
mq->addExCommandToEnd(ex);
- if (!ex) {
+ if (!cmd) {
ex = new ExCommand(_aniMan->_id, 2, 40, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = _aniMan->_okeyCode;
ex->_excFlags |= 2;
Commit: 1a77fba3f9c8b5b980c814335950731c3063a908
https://github.com/scummvm/scummvm/commit/1a77fba3f9c8b5b980c814335950731c3063a908
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-02-01T12:25:53-08:00
Commit Message:
FULLPIPE: Starter ModalHelp implementation
Changed paths:
engines/fullpipe/constants.h
engines/fullpipe/modal.cpp
engines/fullpipe/modal.h
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 9188217..70b77d2 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -215,6 +215,7 @@ namespace Fullpipe {
#define SC_INTRO2 3907
#define SC_INV 858
#define SC_LDR 635
+#define SC_MAINMENU 4620
#define SC_MAP 5222
#define SC_TITLES 5166
#define SND_CMN_031 3516
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index f52dc95..f80d96b 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -755,6 +755,29 @@ ModalMainMenu::ModalMainMenu() {
_field_34 = 0;
}
+ModalHelp::ModalHelp() {
+ _mainMenuScene = 0;
+ _bg = 0;
+ _isRunning = false;
+ _rect = g_fp->_sceneRect;
+ _hx = g_fp->_currentScene->_x;
+ _hy = g_fp->_currentScene->_y;
+
+ g_fp->_sceneRect.left = 0;
+ g_fp->_sceneRect.bottom = 600;
+ g_fp->_sceneRect.top = 0;
+ g_fp->_sceneRect.right = 800;
+}
+
+ModalHelp::~ModalHelp() {
+ g_fp->_gameLoader->unloadScene(SC_MAINMENU);
+
+ g_fp->_sceneRect = _rect;
+
+ g_fp->_currentScene->_x = _hx;
+ g_fp->_currentScene->_y = _hy;
+}
+
void FullpipeEngine::openHelp() {
warning("STUB: FullpipeEngine::openHelp()");
}
diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h
index 72d439f..0cb3c30 100644
--- a/engines/fullpipe/modal.h
+++ b/engines/fullpipe/modal.h
@@ -26,6 +26,7 @@
namespace Fullpipe {
class PictureObject;
+class Picture;
class BaseModalObject {
public:
@@ -163,8 +164,16 @@ public:
class ModalHelp : public BaseModalObject {
public:
+ Scene *_mainMenuScene;
+ Picture *_bg;
+ bool _isRunning;
+ Common::Rect _rect;
+ int _hx;
+ int _hy;
+
+public:
ModalHelp();
- virtual ~ModalHelp() {}
+ virtual ~ModalHelp();
virtual bool pollEvent() { return true; }
virtual bool handleMessage(ExCommand *message) { return false; }
Commit: 60622b49f7ffa1940e6febba1a6ac52a3123ea41
https://github.com/scummvm/scummvm/commit/60622b49f7ffa1940e6febba1a6ac52a3123ea41
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-02-01T12:25:53-08:00
Commit Message:
FULLPIPE: More code to ModalHelp
Changed paths:
engines/fullpipe/modal.cpp
engines/fullpipe/modal.h
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index f80d96b..ddfcc5d 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -778,6 +778,35 @@ ModalHelp::~ModalHelp() {
g_fp->_currentScene->_y = _hy;
}
+bool ModalHelp::handleMessage(ExCommand *cmd) {
+ if (cmd->_messageKind == 17) {
+ int msg = cmd->_messageNum;
+
+ if (msg == 29 || msg == 36 || msg == 107) {
+ _isRunning = 0;
+
+ return true;
+ }
+ }
+
+ return false;
+}
+
+bool ModalHelp::init(int counterdiff) {
+ g_fp->setCursor(PIC_CSR_DEFAULT);
+
+ return _isRunning;
+}
+
+void ModalHelp::update() {
+ g_fp->_sceneRect.left = 0;
+ g_fp->_sceneRect.top = 0;
+ g_fp->_sceneRect.right = 800;
+ g_fp->_sceneRect.bottom = 600;
+
+ _bg->draw(0, 0, 0, 0);
+}
+
void FullpipeEngine::openHelp() {
warning("STUB: FullpipeEngine::openHelp()");
}
diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h
index 0cb3c30..c06ef29 100644
--- a/engines/fullpipe/modal.h
+++ b/engines/fullpipe/modal.h
@@ -176,9 +176,9 @@ public:
virtual ~ModalHelp();
virtual bool pollEvent() { return true; }
- virtual bool handleMessage(ExCommand *message) { return false; }
- virtual bool init(int counterdiff) { return true; }
- virtual void update() {}
+ virtual bool handleMessage(ExCommand *message);
+ virtual bool init(int counterdiff);
+ virtual void update();
virtual void saveload() {}
};
Commit: 8ac3a3654b2a3b375b7ccd5d1fe34296568c6622
https://github.com/scummvm/scummvm/commit/8ac3a3654b2a3b375b7ccd5d1fe34296568c6622
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-02-01T12:25:53-08:00
Commit Message:
FULLPIPE: Implement ModalHelp::launch()
Changed paths:
engines/fullpipe/constants.h
engines/fullpipe/modal.cpp
engines/fullpipe/modal.h
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 70b77d2..f22505a 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -88,6 +88,7 @@ namespace Fullpipe {
#define PIC_CSR_ITN_RED 5329
#define PIC_CSR_LIFT 5176
#define PIC_CSR_MAP 5339
+#define PIC_HLP_BGR 3562
#define PIC_IN1_GAMETITLE 5169
#define PIC_IN1_PIPETITLE 5167
#define PIC_INV_MENU 991
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index ddfcc5d..1bbed69 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -807,6 +807,15 @@ void ModalHelp::update() {
_bg->draw(0, 0, 0, 0);
}
+void ModalHelp::launch() {
+ _mainMenuScene = g_fp->accessScene(SC_MAINMENU);
+
+ if (_mainMenuScene) {
+ _bg = _mainMenuScene->getPictureObjectById(PIC_HLP_BGR, 0)->_picture;
+ _isRunning = 1;
+ }
+}
+
void FullpipeEngine::openHelp() {
warning("STUB: FullpipeEngine::openHelp()");
}
diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h
index c06ef29..aa9b997 100644
--- a/engines/fullpipe/modal.h
+++ b/engines/fullpipe/modal.h
@@ -180,6 +180,8 @@ public:
virtual bool init(int counterdiff);
virtual void update();
virtual void saveload() {}
+
+ void launch();
};
class ModalQuery : public BaseModalObject {
Commit: 6832352c9b745a3d5fe89ae95ff8332264d75401
https://github.com/scummvm/scummvm/commit/6832352c9b745a3d5fe89ae95ff8332264d75401
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-02-01T12:25:53-08:00
Commit Message:
FULLPIPE: Implement openHelp(). This completes the help screen
Changed paths:
engines/fullpipe/modal.cpp
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index 1bbed69..2e7b33b 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -817,7 +817,13 @@ void ModalHelp::launch() {
}
void FullpipeEngine::openHelp() {
- warning("STUB: FullpipeEngine::openHelp()");
+ if (!_modalObject) {
+ ModalHelp *help = new ModalHelp;
+
+ _modalObject = help;
+
+ help->launch();
+ }
}
void FullpipeEngine::openMainMenu() {
More information about the Scummvm-git-logs
mailing list