Skip to content

Commit

Permalink
FULLPIPE: Implement BallChain::sub04()
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed May 29, 2014
1 parent 5eaddc5 commit 5903bac
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions engines/fullpipe/scenes.cpp
Expand Up @@ -1454,9 +1454,28 @@ void BallChain::init(Ball **ball) {
}

Ball *BallChain::sub04(Ball *ballP, Ball *ballN) {
warning("STUB: BallChain::sub04");
if (!pTail) {
cPlex = (byte *)calloc(cPlexLen, sizeof(Ball));

return pTail;
Ball *runPtr = (Ball *)&cPlex[(cPlexLen - 1) * sizeof(Ball)];

for (int i = 0; i < cPlexLen; i++) {
runPtr->p0 = pTail;
pTail = runPtr;

runPtr -= sizeof(Ball);
}
}

Ball *res = pTail;

pTail = res->p0;
res->p1 = ballP;
res->p0 = ballN;
numBalls++;
res->ani = 0;

return res;
}

void BallChain::removeBall(Ball *ball) {
Expand Down

0 comments on commit 5903bac

Please sign in to comment.