aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/fullpipe/constants.h5
-rw-r--r--engines/fullpipe/scenes.cpp1
-rw-r--r--engines/fullpipe/scenes.h12
-rw-r--r--engines/fullpipe/scenes/scene04.cpp41
4 files changed, 52 insertions, 7 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 60ca0814f9..b774c89ed0 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -119,6 +119,8 @@ namespace Fullpipe {
#define MV_MAN_GOLADDER 451
#define MV_MAN_GOLADDER2 2844
#define MV_MAN_GOU 460
+#define MV_MAN_JUMPONPLANK 551
+#define MV_MAN_LOOKLADDER 520
#define MV_MAN_LOOKUP 4773
#define MV_MAN_STARTLADDER 452
#define MV_MAN_STARTLADDER2 2842
@@ -291,8 +293,11 @@ namespace Fullpipe {
#define ST_LBN_9N 2777
#define ST_LBN_9P 2778
#define ST_MAN_EMPTY 476
+#define ST_MAN_LADDERDOWN 521
+#define ST_MAN_ONPLANK 552
#define ST_MAN_RIGHT 325
#define ST_MAN_SIT 1164
+#define ST_MAN_STANDLADDER 453
#define ST_PNK_WEIGHTLEFT 503
#define TrubaDown 697
#define TrubaLeft 474
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 014459e847..74d4b2ba1c 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -100,6 +100,7 @@ Vars::Vars() {
scene04_var20 = 0;
scene04_var24 = 0;
scene04_bottleY = 0;
+ scene04_ladderOffset = 0;
selector = 0;
}
diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h
index ced671d6e7..78013f2bb4 100644
--- a/engines/fullpipe/scenes.h
+++ b/engines/fullpipe/scenes.h
@@ -95,6 +95,8 @@ public:
Common::List<StaticANIObject *> scene04_kozyawkiAni;
MctlLadder *scene04_ladder;
+ int scene04_ladderOffset;
+
bool scene04_coinPut;
bool scene04_soundPlaying;
int scene04_dynamicPhaseIndex;
@@ -102,11 +104,16 @@ public:
int scene04_sceneClickY;
int scene04_dudePosX;
int scene04_dudePosY;
+ int scene04_bottleY;
+
+ StaticANIObject *scene04_walkingKozyawka;
+
+ int scene04_speakerVariant;
+ int scene04_speakerPhase;
int scene04_var01;
int scene04_var02;
int scene04_var04;
- StaticANIObject *scene04_walkingKozyawka;
int scene04_var06;
int scene04_var07;
int scene04_var08;
@@ -117,13 +124,10 @@ public:
int scene04_var13;
int scene04_var14;
int scene04_var15;
- int scene04_speakerVariant;
- int scene04_speakerPhase;
int scene04_var18;
int scene04_var19;
int scene04_var20;
StaticANIObject *scene04_var24;
- int scene04_bottleY;
PictureObject *selector;
};
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index 7ee889954f..e2b124329c 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -282,13 +282,48 @@ void sceneHandler04_clickLadder() {
warning("sceneHandler04_clickLadder()");
}
-void sceneHandler04_sub13() {
- warning("sceneHandler04_sub13()");
+void sceneHandler04_jumpOnLadder() {
+ if (g_fullpipe->_aniMan->_movement && g_fullpipe->_aniMan->_movement->_id != MV_MAN_LOOKLADDER)
+ return;
+
+ if (g_fullpipe->_aniMan->_statics->_staticsId != ST_MAN_STANDLADDER && g_fullpipe->_aniMan->_statics->_staticsId != ST_MAN_LADDERDOWN)
+ return;
+
+ g_fullpipe->_aniMan->changeStatics2(ST_MAN_LADDERDOWN);
+
+ g_fullpipe->_aniMan->_flags |= 1;
+
+ MGM mgm;
+ MGMInfo mgminfo;
+
+ mgm.addItem(ANI_MAN);
+
+ mgminfo.ani = g_fullpipe->_aniMan;
+ mgminfo.staticsId2 = ST_MAN_ONPLANK;
+ mgminfo.x1 = 938;
+ mgminfo.y1 = 442;
+ mgminfo.field_1C = 10;
+ mgminfo.field_10 = 1;
+ mgminfo.flags = 78;
+ mgminfo.movementId = MV_MAN_JUMPONPLANK;
+
+ MessageQueue *mq = mgm.genMovement(&mgminfo);
+
+ if (mq) {
+ mq->_flags |= 1;
+
+ if (!mq->chain(g_fullpipe->_aniMan))
+ delete mq;
+
+ g_fullpipe->_aniMan->_priority = 10;
+ }
+
+ g_vars->scene04_ladderOffset = g_vars->scene04_ladder->collisionDetection(g_fullpipe->_aniMan);
}
void sceneHandler04_clickPlank() {
if (sceneHandler04_friesAreWalking())
- sceneHandler04_sub13();
+ sceneHandler04_jumpOnLadder();
else if (g_vars->scene04_var01)
g_fullpipe->playSound(SND_4_033, 0);
else if (!g_vars->scene04_soundPlaying)