aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/scenes/scene08.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2013-12-23 00:13:13 +0200
committerEugene Sandulenko2013-12-23 00:39:27 +0200
commit0a210e8f4e55d5c3cf6d92c71c051087357f6e8b (patch)
treeb736ce2d7690dd729a572251adbaa5ded1dac277 /engines/fullpipe/scenes/scene08.cpp
parent80db7f7bde95c95893801fae9bd9cc1d98d03f84 (diff)
downloadscummvm-rg350-0a210e8f4e55d5c3cf6d92c71c051087357f6e8b.tar.gz
scummvm-rg350-0a210e8f4e55d5c3cf6d92c71c051087357f6e8b.tar.bz2
scummvm-rg350-0a210e8f4e55d5c3cf6d92c71c051087357f6e8b.zip
FULLPIPE: Implement sceneHandler08_pushCallback()
Diffstat (limited to 'engines/fullpipe/scenes/scene08.cpp')
-rw-r--r--engines/fullpipe/scenes/scene08.cpp28
1 files changed, 25 insertions, 3 deletions
diff --git a/engines/fullpipe/scenes/scene08.cpp b/engines/fullpipe/scenes/scene08.cpp
index 45c7856648..c7a6589e98 100644
--- a/engines/fullpipe/scenes/scene08.cpp
+++ b/engines/fullpipe/scenes/scene08.cpp
@@ -175,12 +175,34 @@ void sceneHandler08_resumeFlight() {
g_vars->scene08_var07 = 0;
}
-void sceneHandler08_calcOffset() {
- warning("STUB: sceneHandler08_calcOffset()");
+int sceneHandler08_calcOffset(int off, int flag) {
+ if (off > 0) {
+ if (flag)
+ return off * 31 / 10; // off * 3.1
+ else
+ return 5 * off;
+ } else {
+ return 5 * off;
+ }
}
void sceneHandler08_pushCallback(int *par) {
- warning("STUB: sceneHandler08_pushCallback()");
+ Common::Point point;
+
+ int y = g_fp->_aniMan->_oy + g_fp->_aniMan->getSomeXY(point)->y;
+
+ if (g_fp->_aniMan->_statics && g_fp->_aniMan->_statics->_staticsId == ST_MAN8_FLYDOWN)
+ y -= 25;
+
+ *par = (y - 703) / 10;
+ if (*par > 11) {
+ *par = 11;
+ g_vars->scene08_var08 = 0;
+ }
+ if (*par >= 0)
+ g_vars->scene08_var08 -= sceneHandler08_calcOffset(*par, g_vars->scene08_var08 < 0);
+ else
+ *par = 0;
}
int sceneHandler08_updateScreenCallback() {