aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2014-03-05 22:28:24 +0200
committerEugene Sandulenko2014-03-05 23:02:55 +0200
commitb0d681e5be6b3de608e8f5418747d7c4a6019e26 (patch)
tree283886e8dedceee7807096eea3b93a0518eb6e6e /engines
parentce72606616b7b57c7ba5e1e471e9370e2af747aa (diff)
downloadscummvm-rg350-b0d681e5be6b3de608e8f5418747d7c4a6019e26.tar.gz
scummvm-rg350-b0d681e5be6b3de608e8f5418747d7c4a6019e26.tar.bz2
scummvm-rg350-b0d681e5be6b3de608e8f5418747d7c4a6019e26.zip
FULLPIPE: Implement sceneHandler18()
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/constants.h10
-rw-r--r--engines/fullpipe/scenes/scene18and19.cpp151
2 files changed, 161 insertions, 0 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index d84b6396ce..60f5760def 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -877,6 +877,16 @@ namespace Fullpipe {
#define ANI_GIRL18 1484
#define ANI_KRESLO 1459
#define ANI_WHIRLIGIG_18 829
+#define MSG_SC18_CLICKBOARD 3297
+#define MSG_SC18_MANCLIMBEDDOWN 1540
+#define MSG_SC18_MANCLIMBEDUP 1539
+#define MSG_SC18_MANREADY 1507
+#define MSG_SC18_SHOWBOYJUMP 1495
+#define MSG_SC18_SHOWBOYJUMPTO 1497
+#define MSG_SC18_SHOWGIRLJUMP 1496
+#define MSG_SC18_SHOWGIRLJUMPTO 1499
+#define MSG_SC18_SHOWMANJUMP 1510
+#define MSG_SC18_SHOWMANJUMPTO 1508
#define MV_KSL_SWING 1460
#define MV_KSL_SWINGBOY 1462
#define MV_KSL_SWINGGIRL 1464
diff --git a/engines/fullpipe/scenes/scene18and19.cpp b/engines/fullpipe/scenes/scene18and19.cpp
index 8319c83d29..d365ba2fae 100644
--- a/engines/fullpipe/scenes/scene18and19.cpp
+++ b/engines/fullpipe/scenes/scene18and19.cpp
@@ -384,4 +384,155 @@ int scene19_updateCursor() {
return g_fp->_cursorId;
}
+void sceneHandler18_clickBoard() {
+ warning("STUB: sceneHandler18_clickBoard()");
+}
+
+void sceneHandler18and19_showManJump() {
+ warning("STUB: sceneHandler18and19_showManJump()");
+}
+
+void sceneHandler18_showManJumpTo() {
+ warning("STUB: sceneHandler18_showManJumpTo()");
+}
+
+void sceneHandler18and19_showGirlJumpTo() {
+ warning("STUB: sceneHandler18and19_showGirlJumpTo()");
+}
+
+void sceneHandler18and19_showGirlJump() {
+ warning("STUB: sceneHandler18and19_showGirlJump()");
+}
+
+void sceneHandler18and19_showBoyJumpTo() {
+ warning("STUB: sceneHandler18and19_showBoyJumpTo()");
+}
+
+void sceneHandler18and19_showBoyJump() {
+ warning("STUB: sceneHandler18and19_showBoyJump()");
+}
+
+void sceneHandler18and19_drawRiders() {
+ warning("STUB: sceneHandler18and19_drawRiders()");
+}
+
+void sceneHandler18and19_animateRiders() {
+ warning("STUB: sceneHandler18and19_animateRiders()");
+}
+
+int sceneHandler18(ExCommand *cmd) {
+ if (cmd->_messageKind != 17)
+ return 0;
+
+ switch (cmd->_messageNum) {
+ case MSG_SC18_CLICKBOARD:
+ sceneHandler18_clickBoard();
+ break;
+
+ case MSG_SC3_HIDEDOMINO:
+ g_vars->scene18_domino->_flags &= 0xFFFB;
+ break;
+
+ case MSG_SC18_SHOWMANJUMP:
+ sceneHandler18and19_showManJump();
+ break;
+
+ case MSG_SC18_MANREADY:
+ g_vars->scene18_var28 = 1;
+ break;
+
+ case MSG_SC18_SHOWMANJUMPTO:
+ sceneHandler18_showManJumpTo();
+ break;
+
+ case MSG_SC18_SHOWGIRLJUMPTO:
+ sceneHandler18and19_showGirlJumpTo();
+ break;
+
+ case MSG_SC18_SHOWGIRLJUMP:
+ sceneHandler18and19_showGirlJump();
+ break;
+
+ case MSG_SC18_SHOWBOYJUMPTO:
+ sceneHandler18and19_showBoyJumpTo();
+ break;
+
+ case MSG_SC18_SHOWBOYJUMP:
+ sceneHandler18and19_showBoyJump();
+ break;
+
+ case 29:
+ {
+ if (g_vars->scene18_var15) {
+ cmd->_messageKind = 0;
+ break;
+ }
+
+ StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(cmd->_sceneClickX, cmd->_sceneClickY);
+
+ if (!ani || !canInteractAny(g_fp->_aniMan, ani, cmd->_keyCode)) {
+ int picId = g_fp->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY);
+ PictureObject *pic = g_fp->_currentScene->getPictureObjectById(picId, 0);
+
+ if (pic && pic->_id == PIC_SC18_DOMIN && g_vars->scene18_domino
+ && (g_vars->scene18_domino->_flags & 4) && g_fp->_aniMan->isIdle()) {
+ if (!(g_fp->_aniMan->_flags & 0x100) && g_fp->_msgObjectId2 != g_vars->scene18_domino->_id) {
+ handleObjectInteraction(g_fp->_aniMan, g_vars->scene18_domino, cmd->_keyCode);
+ cmd->_messageKind = 0;
+ break;
+ }
+ }
+
+ if (!pic || !canInteractAny(g_fp->_aniMan, pic, cmd->_keyCode)) {
+ if ((g_fp->_sceneRect.right - cmd->_sceneClickX < 47 && g_fp->_sceneRect.right < g_fp->_sceneWidth - 1)
+ || (cmd->_sceneClickX - g_fp->_sceneRect.left < 47 && g_fp->_sceneRect.left > 0)) {
+ g_fp->processArcade(cmd);
+
+ g_vars->scene18_var28 = 0;
+
+ break;
+ }
+ }
+ }
+ break;
+ }
+
+ case 33:
+ if (g_fp->_aniMan2) {
+ int x = g_fp->_aniMan2->_ox;
+
+ g_vars->scene18_var11 = g_fp->_aniMan2->_oy;
+
+ if (x < g_fp->_sceneRect.left + g_vars->scene18_var16)
+ g_fp->_currentScene->_x = x - g_vars->scene18_var18 - g_fp->_sceneRect.left;
+
+ if (x > g_fp->_sceneRect.right - g_vars->scene18_var16)
+ g_fp->_currentScene->_x = x + g_vars->scene18_var18 - g_fp->_sceneRect.right;
+ }
+
+ if (g_vars->scene18_var28 && g_fp->_aniMan->_movement)
+ g_vars->scene18_var28 = 0;
+
+ if (g_vars->scene18_var08) {
+ if (!g_vars->scene18_var12)
+ sceneHandler18and19_drawRiders();
+
+ g_vars->scene18_var12 = g_vars->scene18_var12 == 0;
+
+ if (!g_vars->scene18_whirlgig->_movement) {
+ g_vars->scene18_whirlgig->startAnim(MV_WHR18_SPIN, 0, -1);
+ g_fp->_behaviorManager->updateBehaviors();
+ break;
+ }
+ } else {
+ sceneHandler18and19_animateRiders();
+ }
+
+ g_fp->_behaviorManager->updateBehaviors();
+ break;
+ }
+
+ return 0;
+}
+
} // End of namespace Fullpipe