[Scummvm-cvs-logs] scummvm master -> 5903bacd2517a4f1e59b754baf5866b0d964ef65
sev-
sev at scummvm.org
Thu May 29 08:05:33 CEST 2014
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5903bacd25 FULLPIPE: Implement BallChain::sub04()
Commit: 5903bacd2517a4f1e59b754baf5866b0d964ef65
https://github.com/scummvm/scummvm/commit/5903bacd2517a4f1e59b754baf5866b0d964ef65
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-05-29T09:04:50+03:00
Commit Message:
FULLPIPE: Implement BallChain::sub04()
Changed paths:
engines/fullpipe/scenes.cpp
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 72d73a9..b346bf3 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -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) {
More information about the Scummvm-git-logs
mailing list