aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2014-02-03 21:14:24 +0200
committerEugene Sandulenko2014-02-03 21:14:24 +0200
commitbdd282efe7a09e8b5278e4db04d39799b6ff9773 (patch)
treeb25fa141263429fd8d0691df460aa8e54d389c88
parentb128b8cacb1cd57d4245d0bbb31db5a66be78aff (diff)
downloadscummvm-rg350-bdd282efe7a09e8b5278e4db04d39799b6ff9773.tar.gz
scummvm-rg350-bdd282efe7a09e8b5278e4db04d39799b6ff9773.tar.bz2
scummvm-rg350-bdd282efe7a09e8b5278e4db04d39799b6ff9773.zip
FULLPIPE: Implement sceneHandler27_clickBat()
-rw-r--r--engines/fullpipe/scenes/scene27.cpp26
1 files changed, 22 insertions, 4 deletions
diff --git a/engines/fullpipe/scenes/scene27.cpp b/engines/fullpipe/scenes/scene27.cpp
index 63b4964fc5..529e0d6c1e 100644
--- a/engines/fullpipe/scenes/scene27.cpp
+++ b/engines/fullpipe/scenes/scene27.cpp
@@ -180,8 +180,26 @@ void sceneHandler27_showNextBat() {
warning("STUB: sceneHandler27_showNextBat()");
}
+void sceneHandler27_throwBat() {
+ warning("STUB: sceneHandler27_throwBat()");
+}
+
void sceneHandler27_clickBat(ExCommand *cmd) {
- warning("STUB: sceneHandler27_clickBat()");
+ int bx = g_vars->scene27_bat->_ox - 5;
+ int by = g_vars->scene27_bat->_oy - 71;
+
+ if (ABS(bx - g_fp->_aniMan->_ox) > 1 || ABS(by - g_fp->_aniMan->_oy) > 1
+ || g_fp->_aniMan->_movement || g_fp->_aniMan->_statics->_staticsId != ST_MAN_RIGHT) {
+ MessageQueue *mq = getCurrSceneSc2MotionController()->method34(g_fp->_aniMan, bx, by, 1, ST_MAN_RIGHT);
+
+ if (mq) {
+ mq->addExCommandToEnd(cmd->createClone());
+
+ postExCommand(g_fp->_aniMan->_id, 2, bx, by, 0, -1);
+ }
+ } else {
+ sceneHandler27_throwBat();
+ }
}
void sceneHandler27_startBat(StaticANIObject *bat) {
@@ -226,8 +244,8 @@ void sceneHandler27_aimDude() {
g_fp->_aniMan->_movement->setDynamicPhaseIndex(phase);
}
-void sceneHandler27_throwBat() {
- warning("STUB: sceneHandler27_throwBat()");
+void sceneHandler27_sub07() {
+ warning("STUB: sceneHandler27_sub07()");
}
void sceneHandler27_animateBats() {
@@ -302,7 +320,7 @@ int sceneHandler27(ExCommand *cmd) {
sceneHandler27_aimDude();
if (g_vars->scene27_var10) {
- sceneHandler27_throwBat();
+ sceneHandler27_sub07();
if (!g_fp->_aniMan->_movement && g_fp->_aniMan->_statics->_staticsId == ST_MAN_RIGHT)
g_fp->_aniMan->startAnim(MV_MAN27_FLOW, 0, -1);