aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2013-12-28 11:37:23 +0200
committerEugene Sandulenko2013-12-28 14:17:49 +0200
commit0238e20c3687f0d3c4d6833d26ee3e27d9580743 (patch)
tree9eebfd61ee4863edf4365390c282c8891ab084a2
parent4ffbae38154949fdcf0e55cc18dbf8047e608829 (diff)
downloadscummvm-rg350-0238e20c3687f0d3c4d6833d26ee3e27d9580743.tar.gz
scummvm-rg350-0238e20c3687f0d3c4d6833d26ee3e27d9580743.tar.bz2
scummvm-rg350-0238e20c3687f0d3c4d6833d26ee3e27d9580743.zip
FULLPIPE: Implement sceneHandler11_jumpFromSwing()
-rw-r--r--engines/fullpipe/constants.h2
-rw-r--r--engines/fullpipe/scenes/scene11.cpp41
2 files changed, 40 insertions, 3 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 2a6f03be3b..06b5f35544 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -504,6 +504,7 @@ namespace Fullpipe {
#define MV_KCH_MOVE2 1099
#define MV_KCH_START 1121
#define MV_MAN11_JUMPHIT 1129
+#define MV_MAN11_JUMPFROMSWING 5209
#define MV_MAN11_JUMPOVER 1131
#define MV_MAN11_SWING_0 1109
#define MV_MAN11_SWING_1 1111
@@ -522,6 +523,7 @@ namespace Fullpipe {
#define ST_KCH_STATIC 1122
#define ST_MAN_1PIX 518
#define ST_MAN11_EMPTY 1110
+#define ST_MAN11_SWING 1127
#define ST_SWR_SIT 1147
#define ST_SWR_SITBALD 1153
#define ST_SWR_STAND3 3014
diff --git a/engines/fullpipe/scenes/scene11.cpp b/engines/fullpipe/scenes/scene11.cpp
index bde67d7f5c..864d0eb5ff 100644
--- a/engines/fullpipe/scenes/scene11.cpp
+++ b/engines/fullpipe/scenes/scene11.cpp
@@ -248,8 +248,43 @@ void sceneHandler11_showSwing() {
g_vars->scene11_dudeOnSwing->_priority = 20;
}
-void sceneHandler11_sub12() {
- warning("STUB: sceneHandler11_sub12()");
+void sceneHandler11_jumpFromSwing() {
+ g_vars->scene11_var02 = 0;
+ g_vars->scene11_hint->_flags &= 0xFFFB;
+ g_vars->scene11_var03 = 0;
+
+ getCurrSceneSc2MotionController()->setEnabled();
+ getGameLoaderInteractionController()->enableFlag24();
+
+ g_vars->scene11_var09 = 1.0;
+ g_vars->scene11_var11 = 1.0;
+ g_vars->scene11_var10 = 1.0;
+ g_vars->scene11_var08 = 1.0;
+
+ g_vars->scene11_dudeOnSwing = g_fp->_currentScene->getStaticANIObject1ById(ANI_MAN11, -1);
+ g_vars->scene11_dudeOnSwing->_flags &= 0xFFFB;
+ g_vars->scene11_dudeOnSwing = g_fp->_currentScene->getStaticANIObject1ById(ANI_KACHELI, -1);
+ g_vars->scene11_dudeOnSwing->changeStatics2(ST_KCH_STATIC);
+ g_vars->scene11_dudeOnSwing->setOXY(691, 371);
+ g_vars->scene11_dudeOnSwing->_priority = 20;
+ g_vars->scene11_dudeOnSwing->_flags |= 4;
+
+ MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
+ ExCommand *ex = new ExCommand(g_fp->_aniMan->_id, 34, 256, 0, 0, 0, 1, 0, 0, 0);
+ ex->_field_14 = 256;
+ ex->_messageNum = 0;
+ ex->_excFlags |= 3;
+ mq->addExCommandToEnd(ex);
+ mq->setFlags(mq->getFlags() | 1);
+
+ g_fp->_globalMessageQueueList->addMessageQueue(mq);
+
+ g_fp->_aniMan->_flags |= 0x104;
+ g_fp->_aniMan->changeStatics2(ST_MAN11_SWING);
+ g_fp->_aniMan->setOXY(685, 373);
+ g_fp->_aniMan->startAnim(MV_MAN11_JUMPFROMSWING, mq->_id, -1);
+
+ g_fp->_aniMan2 = g_fp->_aniMan;
}
void sceneHandler11_swing0() {
@@ -440,7 +475,7 @@ void sceneHandler11_swingLogic() {
}
if (ph > 38 && ph < 53 && fabs(g_vars->scene11_var10) <= 5.0)
- sceneHandler11_sub12();
+ sceneHandler11_jumpFromSwing();
}
}