diff options
author | Eugene Sandulenko | 2014-02-19 22:46:38 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2014-02-19 22:46:58 +0200 |
commit | 72cc9351912c17defd7b5a5d1de4e5e1ce523f71 (patch) | |
tree | 247e11162403174d9f9179cc5ba63128a90d151b /engines | |
parent | 6d2f3019c7bc42e7a72491e2d3c723c471cc7c96 (diff) | |
download | scummvm-rg350-72cc9351912c17defd7b5a5d1de4e5e1ce523f71.tar.gz scummvm-rg350-72cc9351912c17defd7b5a5d1de4e5e1ce523f71.tar.bz2 scummvm-rg350-72cc9351912c17defd7b5a5d1de4e5e1ce523f71.zip |
FULLPIPE: Implement sceneHandler09_showBall()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/constants.h | 1 | ||||
-rw-r--r-- | engines/fullpipe/scenes/scene09.cpp | 38 |
2 files changed, 38 insertions, 1 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index 525e23764b..01bb364796 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -599,6 +599,7 @@ namespace Fullpipe { #define MSG_SC9_SHOWBALL 936 #define MSG_SC9_STARTTIOTIA 4942 #define MSG_SC9_TOLADDER 4206 +#define MV_BALL9_EXPLODE 939 #define MV_GLT_FLYAWAY 931 #define MV_MAN9_SHOOT 922 #define MV_VSN_CYCLE2 2987 diff --git a/engines/fullpipe/scenes/scene09.cpp b/engines/fullpipe/scenes/scene09.cpp index 0679a0c374..f8a78bedff 100644 --- a/engines/fullpipe/scenes/scene09.cpp +++ b/engines/fullpipe/scenes/scene09.cpp @@ -305,7 +305,43 @@ void sceneHandler09_eatBall() { } void sceneHandler09_showBall() { - warning("STUB: sceneHandler09_showBall()"); + if (g_vars->scene09_var07.numBalls) { + StaticANIObject *ani = g_vars->scene09_var07.pHead->ani; + Ball *ph = g_vars->scene09_var07.pHead; + g_vars->scene09_var07.pHead = ph->p0; + + if (g_vars->scene09_var07.pHead) + ph->p0->p1 = 0; + else + g_vars->scene09_var07.field_8 = 0; + + ph->p0 = g_vars->scene09_var07.pTail; + + g_vars->scene09_var07.pTail = ph; + g_vars->scene09_var07.numBalls--; + + if (!g_vars->scene09_var07.numBalls) { + g_vars->scene09_var07.numBalls = 0; + g_vars->scene09_var07.pTail = 0; + g_vars->scene09_var07.field_8 = 0; + g_vars->scene09_var07.pHead = 0; + + free(g_vars->scene09_var07.cPlex); + g_vars->scene09_var07.cPlex = 0; + } + + Ball *ball = g_vars->scene09_balls.sub04(g_vars->scene09_balls.field_8, 0); + ball->ani = ani; + + if (g_vars->scene09_balls.field_8) + g_vars->scene09_balls.field_8->p0 = ball; + else + g_vars->scene09_balls.pHead = ball; + + g_vars->scene09_balls.field_8 = ball; + + ani->show1(g_fp->_aniMan->_ox + 94, g_fp->_aniMan->_oy - 162, MV_BALL9_EXPLODE, 0); + } } void sceneHandler09_cycleHangers() { |