aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/scenes/scene08.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/fullpipe/scenes/scene08.cpp')
-rw-r--r--engines/fullpipe/scenes/scene08.cpp114
1 files changed, 79 insertions, 35 deletions
diff --git a/engines/fullpipe/scenes/scene08.cpp b/engines/fullpipe/scenes/scene08.cpp
index 763e6f7582..181ac58392 100644
--- a/engines/fullpipe/scenes/scene08.cpp
+++ b/engines/fullpipe/scenes/scene08.cpp
@@ -218,33 +218,6 @@ void sceneHandler08_jumpLogic(ExCommand *cmd) {
}
}
-void sceneHandler08_calcFlight() {
- warning("STUB: sceneHandler08_calcFlight()");
-}
-
-void sceneHandler08_checkEndArcade() {
- if (g_vars->scene08_var02) {
- int x = g_fp->_aniMan->_ox;
- int y = g_vars->scene08_var08 + g_fp->_aniMan->_oy;
-
- if (!((g_vars->scene08_var08 + g_fp->_aniMan->_oy) % 3))
- g_vars->scene08_var08--;
-
- g_fp->_aniMan->setOXY(x, y);
-
- if (y < 80) {
- sceneHandler08_finishArcade();
-
- ExCommand *ex = new ExCommand(SC_8, 17, 0, 0, 0, 0, 1, 0, 0, 0);
- ex->_messageNum = 61;
- ex->_excFlags |= 2;
- ex->_keyCode = TrubaUp;
-
- ex->postMessage();
- }
- }
-}
-
void sceneHandler08_badLuck() {
g_fp->_currentScene->getPictureObjectById(PIC_SC8_LADDER, 0)->_flags &= 0xFFFB;
@@ -267,14 +240,6 @@ void sceneHandler08_badLuck() {
g_vars->scene08_var01 = 0;
}
-void sceneHandler08_calcOffset() {
- warning("STUB: sceneHandler08_calcOffset()");
-}
-
-void sceneHandler08_pushCallback(int *par) {
- warning("STUB: sceneHandler08_pushCallback()");
-}
-
void sceneHandler08_sitDown() {
g_fp->_aniMan->setOXY(380, g_fp->_aniMan->_oy);
@@ -288,6 +253,85 @@ void sceneHandler08_sitDown() {
g_vars->scene08_var03 = 1;
}
+void sceneHandler08_calcFlight() {
+ Common::Point point;
+ int y = g_vars->scene08_var08 + g_fp->_aniMan->_oy;
+
+ g_fp->_aniMan->setOXY(g_fp->_aniMan->_ox, y);
+
+ g_vars->scene08_var08 += 2;
+
+ if (g_vars->scene08_var08 < g_vars->scene08_var04)
+ g_vars->scene08_var08 = g_vars->scene08_var04;
+
+ y = y + g_fp->_aniMan->getSomeXY(point)->y;
+
+ if (g_fp->_aniMan->_statics && g_fp->_aniMan->_statics->_staticsId == ST_MAN8_FLYDOWN)
+ y -= 25;
+
+ if (y <= g_vars->scene08_vmyats->_oy) {
+ g_vars->scene08_vmyats->hide();
+ } else {
+ g_vars->scene08_vmyats->show1(-1, -1, -1, 0);
+
+ if (!g_vars->scene08_vmyats->_movement)
+ g_vars->scene08_vmyats->startAnim(MV_VMT_DEF, 0, -1);
+ }
+
+ if (g_fp->_aniMan->_oy <= 280 && g_vars->scene08_var07 && g_fp->_aniMan->_statics && g_fp->_aniMan->_statics->_staticsId == ST_MAN8_HANDSUP) {
+ sceneHandler08_badLuck();
+ } else if (g_fp->_aniMan->_oy > 236 || g_vars->scene08_var07 || !g_fp->_aniMan->_statics || g_fp->_aniMan->_statics->_staticsId != ST_MAN8_HANDSUP) {
+ if (g_fp->_aniMan->_movement || g_fp->_aniMan->_oy < 660
+ || (g_vars->scene08_vmyats->_movement && g_vars->scene08_vmyats->_movement->_currDynamicPhaseIndex > 0)
+ || abs(g_vars->scene08_var08) > 2) {
+ if (g_vars->scene08_var08 >= 0 && !g_fp->_aniMan->_movement) {
+ if (g_fp->_aniMan->_statics->_staticsId == ST_MAN8_HANDSUP)
+ g_fp->_aniMan->startAnim(MV_MAN8_HANDSDOWN, 0, -1);
+ else
+ g_fp->_aniMan->changeStatics2(ST_MAN8_FLYDOWN);
+ }
+
+ if (g_fp->_aniMan->_oy < 500 && !g_fp->_aniMan->_movement && g_fp->_aniMan->_statics->_staticsId == ST_MAN8_FLYUP && g_vars->scene08_var08 < 0)
+ g_fp->_aniMan->startAnim(MV_MAN8_HANDSUP, 0, -1);
+ } else {
+ sceneHandler08_sitDown();
+ }
+ } else {
+ sceneHandler08_enterUp();
+ }
+}
+
+void sceneHandler08_checkEndArcade() {
+ if (g_vars->scene08_var02) {
+ int x = g_fp->_aniMan->_ox;
+ int y = g_vars->scene08_var08 + g_fp->_aniMan->_oy;
+
+ if (!((g_vars->scene08_var08 + g_fp->_aniMan->_oy) % 3))
+ g_vars->scene08_var08--;
+
+ g_fp->_aniMan->setOXY(x, y);
+
+ if (y < 80) {
+ sceneHandler08_finishArcade();
+
+ ExCommand *ex = new ExCommand(SC_8, 17, 0, 0, 0, 0, 1, 0, 0, 0);
+ ex->_messageNum = 61;
+ ex->_excFlags |= 2;
+ ex->_keyCode = TrubaUp;
+
+ ex->postMessage();
+ }
+ }
+}
+
+void sceneHandler08_calcOffset() {
+ warning("STUB: sceneHandler08_calcOffset()");
+}
+
+void sceneHandler08_pushCallback(int *par) {
+ warning("STUB: sceneHandler08_pushCallback()");
+}
+
int sceneHandler08_updateScreenCallback() {
int res;