diff options
Diffstat (limited to 'engines/fullpipe/scenes.cpp')
-rw-r--r-- | engines/fullpipe/scenes.cpp | 81 |
1 files changed, 69 insertions, 12 deletions
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 147961b519..13c653ad09 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -378,6 +378,23 @@ Vars::Vars() { scene28_headBeardedFlipper = false; scene28_lift6inside = false; + scene29_porter = 0; + scene29_shooter1 = 0; + scene29_shooter2 = 0; + scene29_ass = 0; + scene29_manIsRiding = false; + scene29_arcadeIsOn = false; + scene29_reachedFarRight = false; + scene29_rideBackEnabled = false; + scene29_shootCountdown = 0; + scene29_shootDistance = 75; + scene29_manIsHit = 0; + scene29_scrollSpeed = 0; + scene29_scrollingDisabled = 0; + scene29_hitBall = 0; + scene29_manX = 0; + scene29_manY = 0; + scene30_leg = 0; scene30_liftFlag = 1; @@ -573,10 +590,8 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { scene->setPictureObjectsFlag4(); - for (PtrList::iterator s = scene->_staticANIObjectList1.begin(); s != scene->_staticANIObjectList1.end(); ++s) { - StaticANIObject *o = (StaticANIObject *)*s; - o->setFlags(o->_flags & 0xFE7F); - } + for (uint i = 0; i < scene->_staticANIObjectList1.size(); i++) + scene->_staticANIObjectList1[i]->_flags &= 0xFE7F; PictureObject *p = accessScene(SC_INV)->getPictureObjectById(PIC_INV_MENU, 0); p->setFlags(p->_flags & 0xFFFB); @@ -942,7 +957,6 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { _updateCursorCallback = scene28_updateCursor; break; -#if 0 case SC_29: sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_29"); scene->preloadMovements(sceneVar); @@ -953,7 +967,6 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { addMessageHandler(sceneHandler29, 2); _updateCursorCallback = scene29_updateCursor; break; -#endif case SC_30: sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_30"); @@ -1091,10 +1104,6 @@ int defaultUpdateCursor() { return g_fp->_cursorId; } -void FullpipeEngine::processArcade(ExCommand *ex) { - warning("STUB: FullpipeEngine::processArcade()"); -} - void FullpipeEngine::updateMapPiece(int mapId, int update) { for (int i = 0; i < 200; i++) { int hiWord = (_mapTable[i] >> 16) & 0xffff; @@ -1445,9 +1454,57 @@ void BallChain::init(Ball **ball) { } Ball *BallChain::sub04(Ball *ballP, Ball *ballN) { - warning("STUB: BallChain::sub04"); + if (!pTail) { + if (!cPlexLen) + error("BallChain::sub04: cPlexLen is 0"); + + cPlex = (byte *)calloc(cPlexLen, sizeof(Ball)); + + Ball *runPtr = (Ball *)&cPlex[(cPlexLen - 1) * sizeof(Ball)]; + + for (int i = 0; i < cPlexLen; i++) { + runPtr->p0 = pTail; + pTail = runPtr; + + runPtr--; + } + } + + Ball *res = pTail; + + pTail = res->p0; + res->p1 = ballP; + res->p0 = ballN; + numBalls++; + res->ani = 0; + + return res; +} - return pTail; +void BallChain::removeBall(Ball *ball) { + if (ball == pHead) + pHead = ball->p0; + else + ball->p1->p0 = ball->p0; + + if (ball == field_8) + field_8 = ball->p1; + else + ball->p0->p1 = ball->p1; + + ball->p0 = pTail; + pTail = ball; + + numBalls--; + + if (!numBalls) { + numBalls = 0; + pTail = 0; + field_8 = 0; + pHead = 0; + free(cPlex); + cPlex = 0; + } } |