diff options
Diffstat (limited to 'engines/fullpipe/scenes.cpp')
-rw-r--r-- | engines/fullpipe/scenes.cpp | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 47c6a3c8cd..13c653ad09 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -590,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); @@ -1106,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; @@ -1460,9 +1454,31 @@ 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 pTail; + return res; } void BallChain::removeBall(Ball *ball) { |