aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/fullpipe/messages.cpp19
-rw-r--r--engines/fullpipe/messages.h1
-rw-r--r--engines/fullpipe/scenes/scene06.cpp27
3 files changed, 39 insertions, 8 deletions
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp
index e8fcf75fb6..8ea94ff1eb 100644
--- a/engines/fullpipe/messages.cpp
+++ b/engines/fullpipe/messages.cpp
@@ -810,6 +810,25 @@ bool chainQueue(int queueId, int flags) {
return true;
}
+bool chainObjQueue(StaticANIObject *obj, int queueId, int flags) {
+ MessageQueue *mq = g_fullpipe->_currentScene->getMessageQueueById(queueId);
+
+ if (!mq)
+ return false;
+
+ MessageQueue *nmq = new MessageQueue(mq, 0, 0);
+
+ nmq->_flags |= flags;
+
+ if (!nmq->chain(obj)) {
+ delete nmq;
+
+ return false;
+ }
+
+ return true;
+}
+
void postExCommand(int parentId, int keyCode, int x, int y, int f20, int f14) {
ExCommand *ex = new ExCommand(parentId, 17, 64, 0, 0, 0, 1, 0, 0, 0);
diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h
index ca61dad007..44245bcf19 100644
--- a/engines/fullpipe/messages.h
+++ b/engines/fullpipe/messages.h
@@ -178,6 +178,7 @@ void updateGlobalMessageQueue(int id, int objid);
void clearGlobalMessageQueueList1();
bool chainQueue(int queueId, int flags);
+bool chainObjQueue(StaticANIObject *obj, int queueId, int flags);
void postExCommand(int parentId, int keyCode, int x, int y, int f20, int f16);
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/scenes/scene06.cpp b/engines/fullpipe/scenes/scene06.cpp
index 8b9db0f446..62360e62b8 100644
--- a/engines/fullpipe/scenes/scene06.cpp
+++ b/engines/fullpipe/scenes/scene06.cpp
@@ -226,22 +226,33 @@ void sceneHandler06_sub03() {
warning("STUB: sceneHandler06_sub03()");
}
-void sceneHandler06_sub04(int par) {
- warning("STUB: sceneHandler06_sub04()");
-}
-
void sceneHandler06_sub05() {
warning("STUB: sceneHandler06_sub05()");
}
-void sceneHandler06_sub06() {
- warning("STUB: sceneHandler06_sub06()");
-}
-
void sceneHandler06_sub09() {
warning("STUB: sceneHandler06_sub09()");
}
+void sceneHandler06_sub04(int par) {
+ int pixel;
+
+ if (g_vars->scene06_var04 <= 475) {
+ if (g_vars->scene06_mumsy->getPixelAtPos(g_vars->scene06_var03, g_vars->scene06_var04, &pixel)) {
+ if (pixel) {
+ chainObjQueue(g_vars->scene06_mumsy, QU_MOM_JUMPBK, 0);
+ sceneHandler06_sub09();
+ }
+ }
+ } else {
+ sceneHandler06_sub05();
+ }
+}
+
+void sceneHandler06_sub06() {
+ warning("STUB: sceneHandler06_sub06()");
+}
+
void sceneHandler06_sub10() {
warning("STUB: sceneHandler06_sub10()");
}