aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2013-12-17 21:49:03 +0200
committerEugene Sandulenko2013-12-17 21:49:32 +0200
commit35758d05d4fdfbe04c26419b347c261be6e2b444 (patch)
tree6d88c2730cb61a67261a6cd43fc0f2d2b931366f
parent47bdabdb31156f84c704e90af10ead3292f026ee (diff)
downloadscummvm-rg350-35758d05d4fdfbe04c26419b347c261be6e2b444.tar.gz
scummvm-rg350-35758d05d4fdfbe04c26419b347c261be6e2b444.tar.bz2
scummvm-rg350-35758d05d4fdfbe04c26419b347c261be6e2b444.zip
FULLPIPE: Implement sceneHandler06_throwBall()
-rw-r--r--engines/fullpipe/constants.h9
-rw-r--r--engines/fullpipe/scenes/scene06.cpp31
2 files changed, 31 insertions, 9 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index ccaea13e4a..fd4f835ec4 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -138,15 +138,15 @@ namespace Fullpipe {
#define MV_BLK_OPEN 910
#define MV_EGTR_FATASK 5332
#define MV_IN1MAN_SLEEP 5111
+#define MV_BDG_OPEN 1379
+#define MV_BTN_CLICK 599
+#define MV_CLK_GO 589
+#define MV_HND_POINT 602
#define MV_KZW_GOR 564
#define MV_KZW_JUMP 558
#define MV_KZW_JUMPROTATE 561
#define MV_KZW_TOHOLERV 537
#define MV_KZW_WALKPLANK 500
-#define MV_BDG_OPEN 1379
-#define MV_BTN_CLICK 599
-#define MV_CLK_GO 589
-#define MV_HND_POINT 602
#define MV_KZW_JUMPHIT 2857
#define MV_KZW_JUMPOUT 586
#define MV_KZW_RAISEHEAD 577
@@ -171,6 +171,7 @@ namespace Fullpipe {
#define MV_MAN_TOLADDER2 2841
#define MV_MAN_TURN_LU 486
#define MV_MAN_TURN_SUD 1089
+#define MV_MAN6_THROWBALL 2692
#define MV_MANHDL_HANDLEDOWN 630
#define MV_MANHDL_HANDLEUP 631
#define MV_OTM_BOXHANDLEDOWN 626
diff --git a/engines/fullpipe/scenes/scene06.cpp b/engines/fullpipe/scenes/scene06.cpp
index 07532588e6..65494f4bf2 100644
--- a/engines/fullpipe/scenes/scene06.cpp
+++ b/engines/fullpipe/scenes/scene06.cpp
@@ -172,8 +172,33 @@ void sceneHandler06_sub02() {
warning("STUB: sceneHandler06_sub02()");
}
+void sceneHandler06_sub07() {
+ warning("STUB: sceneHandler06_sub07()");
+}
+
+void sceneHandler06_throwCallback(int *arg) {
+ if (g_vars->scene06_var08) {
+ int dist = (g_fullpipe->_mouseVirtY - g_vars->scene06_sceneClickY)
+ * (g_fullpipe->_mouseVirtY - g_vars->scene06_sceneClickY)
+ + (g_fullpipe->_mouseVirtX - g_vars->scene06_sceneClickX)
+ * (g_fullpipe->_mouseVirtX - g_vars->scene06_sceneClickX);
+
+ *arg = sqrt(dist) * 0.1;
+
+ if (*arg > 8)
+ *arg = 8;
+ } else {
+ *arg = *arg + 1;
+ if (*arg == 12)
+ sceneHandler06_sub07();
+ }
+}
+
void sceneHandler06_throwBall() {
- warning("STUB: sceneHandler06_throwBall()");
+ g_fullpipe->_aniMan->_callback2 = sceneHandler06_throwCallback;
+ g_fullpipe->_aniMan->startAnim(MV_MAN6_THROWBALL, 0, -1);
+
+ g_vars->scene06_var08 = 1;
}
void sceneHandler06_sub03() {
@@ -192,10 +217,6 @@ void sceneHandler06_sub06() {
warning("STUB: sceneHandler06_sub06()");
}
-void sceneHandler06_sub07() {
- warning("STUB: sceneHandler06_sub07()");
-}
-
void sceneHandler06_sub09() {
warning("STUB: sceneHandler06_sub09()");
}