diff options
author | Eugene Sandulenko | 2014-02-08 12:45:32 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2014-02-08 12:45:32 +0200 |
commit | a90c5369e181e66a4f24cadb0931f9bbfcfd1b48 (patch) | |
tree | 2b918127b854db515483bb5fd1abf6be141e5a42 /engines | |
parent | 085c53b0ec75f8f68ff2634c62ea0f08c5e78340 (diff) | |
download | scummvm-rg350-a90c5369e181e66a4f24cadb0931f9bbfcfd1b48.tar.gz scummvm-rg350-a90c5369e181e66a4f24cadb0931f9bbfcfd1b48.tar.bz2 scummvm-rg350-a90c5369e181e66a4f24cadb0931f9bbfcfd1b48.zip |
FULLPIPE: Implement sceneHandler27_sub02()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/scenes/scene27.cpp | 51 |
1 files changed, 50 insertions, 1 deletions
diff --git a/engines/fullpipe/scenes/scene27.cpp b/engines/fullpipe/scenes/scene27.cpp index 20e6850721..7564ea2d01 100644 --- a/engines/fullpipe/scenes/scene27.cpp +++ b/engines/fullpipe/scenes/scene27.cpp @@ -560,7 +560,56 @@ void sceneHandler27_calcWinArcade() { } void sceneHandler27_sub02() { - warning("STUB: sceneHandler27_sub02()"); + g_vars->scene27_var10 = 0; + + for (uint i = 0; i < g_vars->scene27_var07.size(); i++) { + g_vars->scene27_var07[i]->ani->hide(); + + Ball *runPtr = g_vars->scene27_balls.pTail; + Ball *lastP = g_vars->scene27_balls.field_8; + StaticANIObject *newbat = g_vars->scene27_var07[i]->ani; + + if (!g_vars->scene27_balls.pTail) { + g_vars->scene27_balls.cPlex = (Ball *)calloc(g_vars->scene27_balls.cPlexLen, sizeof(Ball)); + + Ball *p1 = g_vars->scene27_balls.cPlex + (g_vars->scene27_balls.cPlexLen - 1) * sizeof(Ball); + + if (g_vars->scene27_balls.cPlexLen - 1 < 0) { + runPtr = g_vars->scene27_balls.pTail; + } else { + runPtr = g_vars->scene27_balls.pTail; + + for (int j = 0; j < g_vars->scene27_balls.cPlexLen; j++) { + p1->p1 = runPtr; + runPtr = p1; + + p1 -= sizeof(Ball); + } + + g_vars->scene27_balls.pTail = runPtr; + } + } + + g_vars->scene27_balls.pTail = runPtr->p0; + runPtr->p1 = lastP; + runPtr->p0 = 0; + runPtr->ani = newbat; + + g_vars->scene27_balls.numBalls++; + + if (g_vars->scene27_balls.field_8) + g_vars->scene27_balls.field_8->p0 = runPtr; + else + g_vars->scene27_balls.pHead = runPtr; + + g_vars->scene27_balls.field_8 = runPtr; + } + + g_vars->scene27_var07.clear(); + + sceneHandler27_batLogic(); + + g_vars->scene27_var11 = 0; } void sceneHandler27_animateBats() { |