[Scummvm-git-logs] scummvm master -> cec1f1336e6253b86d6fedeac015976970daa1f9
sev-
sev at scummvm.org
Tue Sep 6 21:30:35 CEST 2016
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
4aabe5626b FULLPIPE: Added more debug info to scene09
20c5713040 FULLPIPE: Start using plain objects insted of Ball in scene09
5ccba26383 FULLPIPE: More fixes to scene09
cec1f1336e FULLPIPE: Further fixes to scene09. Now balls fly as expected
Commit: 4aabe5626b2f4a3bb95f2232665f9bad47b5b75a
https://github.com/scummvm/scummvm/commit/4aabe5626b2f4a3bb95f2232665f9bad47b5b75a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-06T21:30:23+02:00
Commit Message:
FULLPIPE: Added more debug info to scene09
Changed paths:
engines/fullpipe/scenes/scene09.cpp
diff --git a/engines/fullpipe/scenes/scene09.cpp b/engines/fullpipe/scenes/scene09.cpp
index e3f113a..ccf229c 100644
--- a/engines/fullpipe/scenes/scene09.cpp
+++ b/engines/fullpipe/scenes/scene09.cpp
@@ -188,6 +188,8 @@ void sceneHandler09_startAuntie() {
}
void sceneHandler09_spitterClick() {
+ debugC(2, kDebugSceneLogic, "scene09: spitterClick");
+
if (g_vars->scene09_spitter->_flags & 4) {
PicAniInfo info;
@@ -229,6 +231,8 @@ void sceneHandler09_spitterClick() {
}
void sceneHandler09_eatBall() {
+ debugC(2, kDebugSceneLogic, "scene09: eatBall");
+
if (g_vars->scene09_flyingBall) {
g_vars->scene09_flyingBall->hide();
@@ -318,6 +322,8 @@ void sceneHandler09_limitHangerPhase() {
}
void sceneHandler09_collideBall(uint num) {
+ debugC(2, kDebugSceneLogic, "scene09: collideBall");
+
if (g_vars->scene09_gulperIsPresent) {
Ball *ball = g_vars->scene09_balls[num];
@@ -337,6 +343,8 @@ void sceneHandler09_collideBall(uint num) {
}
void sceneHandler09_ballExplode(uint num) {
+ debugC(2, kDebugSceneLogic, "scene09: ballExplode");
+
Ball *ball = g_vars->scene09_balls[num];
g_vars->scene09_balls.remove_at(num);
Commit: 20c5713040e57ce4c98b3f308005ef43bf5eea7a
https://github.com/scummvm/scummvm/commit/20c5713040e57ce4c98b3f308005ef43bf5eea7a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-06T21:30:23+02:00
Commit Message:
FULLPIPE: Start using plain objects insted of Ball in scene09
Changed paths:
engines/fullpipe/scenes.h
engines/fullpipe/scenes/scene09.cpp
diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h
index d87cf6b..19623f8 100644
--- a/engines/fullpipe/scenes.h
+++ b/engines/fullpipe/scenes.h
@@ -219,7 +219,7 @@ struct Ball {
Ball() : p0(0), p1(0), ani(0) {}
};
-typedef Common::Array<Ball *> BallArray;
+typedef Common::Array<StaticANIObject *> BallArray;
struct BallChain {
Ball *pHead;
@@ -380,9 +380,9 @@ public:
int scene09_interactingHanger;
int scene09_intHangerPhase;
int scene09_intHangerMaxPhase;
- BallArray scene09_balls;
+ Common::Array<StaticANIObject *> scene09_balls;
Common::Array<Hanger *> scene09_hangers;
- BallArray scene09_gulpedBalls;
+ Common::Array<StaticANIObject *> scene09_flyingBalls;
int scene09_numMovingHangers;
int scene09_clickY;
Common::Point scene09_hangerOffsets[4];
diff --git a/engines/fullpipe/scenes/scene09.cpp b/engines/fullpipe/scenes/scene09.cpp
index ccf229c..2a2085f 100644
--- a/engines/fullpipe/scenes/scene09.cpp
+++ b/engines/fullpipe/scenes/scene09.cpp
@@ -102,24 +102,18 @@ void scene09_initScene(Scene *sc) {
g_vars->scene09_hangers.push_back(hng);
}
- g_vars->scene09_gulpedBalls.clear();
+ g_vars->scene09_flyingBalls.clear();
- g_vars->scene09_gulpedBalls.push_back(new Ball);
+ g_vars->scene09_flyingBalls.push_back(new StaticANIObject(sc->getStaticANIObject1ById(ANI_BALL9, -1)));
- Ball *b9 = g_vars->scene09_gulpedBalls.front();
-
- b9->ani = sc->getStaticANIObject1ById(ANI_BALL9, -1);
- b9->ani->setAlpha(0xc8);
+ StaticANIObject *b9 = g_vars->scene09_flyingBalls.front();
+ b9->setAlpha(0xc8);
for (int i = 0; i < 4; i++) {
- StaticANIObject *newball = new StaticANIObject(b9->ani);
- b9 = new Ball;
+ StaticANIObject *newball = new StaticANIObject(b9);
newball->setAlpha(0xc8);
-
- b9->ani = newball;
-
- g_vars->scene09_gulpedBalls.push_back(b9);
+ g_vars->scene09_flyingBalls.push_back(newball);
sc->addStaticANIObject(newball, 1);
}
@@ -236,13 +230,8 @@ void sceneHandler09_eatBall() {
if (g_vars->scene09_flyingBall) {
g_vars->scene09_flyingBall->hide();
- Ball *ball = g_vars->scene09_balls.back();
-
g_vars->scene09_balls.pop_back();
-
- ball->ani = g_vars->scene09_flyingBall;
-
- g_vars->scene09_gulpedBalls.pop_back();
+ g_vars->scene09_flyingBalls.pop_back();
g_vars->scene09_flyingBall = 0;
g_vars->scene09_numSwallenBalls++;
@@ -268,11 +257,8 @@ void sceneHandler09_eatBall() {
void sceneHandler09_showBall() {
debugC(2, kDebugSceneLogic, "scene09: showBall");
- if (g_vars->scene09_gulpedBalls.size()) {
- StaticANIObject *ani = g_vars->scene09_gulpedBalls.front()->ani;
-
- Ball *ball = g_vars->scene09_gulpedBalls.front();
- ball->ani = ani;
+ if (g_vars->scene09_flyingBalls.size()) {
+ StaticANIObject *ani = g_vars->scene09_flyingBalls.front();
ani->show1(g_fp->_aniMan->_ox + 94, g_fp->_aniMan->_oy - 162, MV_BALL9_EXPLODE, 0);
}
@@ -325,9 +311,7 @@ void sceneHandler09_collideBall(uint num) {
debugC(2, kDebugSceneLogic, "scene09: collideBall");
if (g_vars->scene09_gulperIsPresent) {
- Ball *ball = g_vars->scene09_balls[num];
-
- g_vars->scene09_flyingBall = ball->ani;
+ g_vars->scene09_flyingBall = g_vars->scene09_balls[num];
if (g_vars->scene09_gulper) {
g_vars->scene09_gulper->changeStatics2(ST_GLT_SIT);
@@ -345,27 +329,27 @@ void sceneHandler09_collideBall(uint num) {
void sceneHandler09_ballExplode(uint num) {
debugC(2, kDebugSceneLogic, "scene09: ballExplode");
- Ball *ball = g_vars->scene09_balls[num];
+ StaticANIObject *ball = g_vars->scene09_balls[num];
g_vars->scene09_balls.remove_at(num);
MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC9_BALLEXPLODE), 0, 1);
- mq->setParamInt(-1, ball->ani->_odelay);
+ mq->setParamInt(-1, ball->_odelay);
- if (!mq->chain(ball->ani))
+ if (!mq->chain(ball))
delete mq;
- g_vars->scene09_gulpedBalls.pop_back();
+ g_vars->scene09_flyingBalls.pop_back();
}
void sceneHandler09_checkHangerCollide() {
for (uint b = 0; b < g_vars->scene09_balls.size(); b++) {
- Ball *ball = g_vars->scene09_balls[b];
+ StaticANIObject *ball = g_vars->scene09_balls[b];
- int newx = ball->ani->_ox + 5;
+ int newx = ball->_ox + 5;
- ball->ani->setOXY(newx, ball->ani->_oy);
+ ball->setOXY(newx, ball->_oy);
if (newx <= 1398 || g_vars->scene09_flyingBall) {
if (g_vars->scene09_gulperIsPresent)
@@ -385,7 +369,7 @@ void sceneHandler09_checkHangerCollide() {
for (int i = 0; i < g_vars->scene09_numMovingHangers; i++) {
for (int j = 0; j < 4; j++) {
- g_vars->scene09_hangers[i]->ani->getPixelAtPos(newx + g_vars->scene09_hangerOffsets[j].x, ball->ani->_oy + g_vars->scene09_hangerOffsets[j].y, &pixel);
+ g_vars->scene09_hangers[i]->ani->getPixelAtPos(newx + g_vars->scene09_hangerOffsets[j].x, ball->_oy + g_vars->scene09_hangerOffsets[j].y, &pixel);
if (pixel) {
sceneHandler09_ballExplode(b);
Commit: 5ccba26383091db0a76d82f8fd8ef2a673c450b0
https://github.com/scummvm/scummvm/commit/5ccba26383091db0a76d82f8fd8ef2a673c450b0
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-06T21:30:23+02:00
Commit Message:
FULLPIPE: More fixes to scene09
Changed paths:
engines/fullpipe/scenes.h
engines/fullpipe/scenes/scene09.cpp
diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h
index 19623f8..10c089a 100644
--- a/engines/fullpipe/scenes.h
+++ b/engines/fullpipe/scenes.h
@@ -380,9 +380,9 @@ public:
int scene09_interactingHanger;
int scene09_intHangerPhase;
int scene09_intHangerMaxPhase;
- Common::Array<StaticANIObject *> scene09_balls;
- Common::Array<Hanger *> scene09_hangers;
Common::Array<StaticANIObject *> scene09_flyingBalls;
+ Common::Array<Hanger *> scene09_hangers;
+ Common::Array<StaticANIObject *> scene09_sceneBalls;
int scene09_numMovingHangers;
int scene09_clickY;
Common::Point scene09_hangerOffsets[4];
diff --git a/engines/fullpipe/scenes/scene09.cpp b/engines/fullpipe/scenes/scene09.cpp
index 2a2085f..3918071 100644
--- a/engines/fullpipe/scenes/scene09.cpp
+++ b/engines/fullpipe/scenes/scene09.cpp
@@ -69,7 +69,7 @@ void scene09_initScene(Scene *sc) {
g_vars->scene09_intHangerPhase = -1;
g_vars->scene09_intHangerMaxPhase = -1000;
- g_vars->scene09_balls.clear();
+ g_vars->scene09_flyingBalls.clear();
g_vars->scene09_hangers.clear();
g_vars->scene09_numMovingHangers = 4;
@@ -90,7 +90,7 @@ void scene09_initScene(Scene *sc) {
StaticANIObject *ani = new StaticANIObject(hanger);
ani->show1(x + hanger->_ox, hanger->_oy, MV_VSN_CYCLE2, 0);
- sc->addStaticANIObject(hanger, 1);
+ sc->addStaticANIObject(ani, 1);
hng = new Hanger;
@@ -102,18 +102,18 @@ void scene09_initScene(Scene *sc) {
g_vars->scene09_hangers.push_back(hng);
}
- g_vars->scene09_flyingBalls.clear();
+ g_vars->scene09_sceneBalls.clear();
- g_vars->scene09_flyingBalls.push_back(new StaticANIObject(sc->getStaticANIObject1ById(ANI_BALL9, -1)));
+ g_vars->scene09_sceneBalls.push_back(new StaticANIObject(sc->getStaticANIObject1ById(ANI_BALL9, -1)));
- StaticANIObject *b9 = g_vars->scene09_flyingBalls.front();
- b9->setAlpha(0xc8);
+ StaticANIObject *newball = g_vars->scene09_sceneBalls.front();
+ newball->setAlpha(0xc8);
for (int i = 0; i < 4; i++) {
- StaticANIObject *newball = new StaticANIObject(b9);
+ newball = new StaticANIObject(newball);
newball->setAlpha(0xc8);
- g_vars->scene09_flyingBalls.push_back(newball);
+ g_vars->scene09_sceneBalls.push_back(newball);
sc->addStaticANIObject(newball, 1);
}
@@ -230,8 +230,8 @@ void sceneHandler09_eatBall() {
if (g_vars->scene09_flyingBall) {
g_vars->scene09_flyingBall->hide();
- g_vars->scene09_balls.pop_back();
g_vars->scene09_flyingBalls.pop_back();
+ //g_vars->scene09_sceneBalls.pop_back();
g_vars->scene09_flyingBall = 0;
g_vars->scene09_numSwallenBalls++;
@@ -257,8 +257,12 @@ void sceneHandler09_eatBall() {
void sceneHandler09_showBall() {
debugC(2, kDebugSceneLogic, "scene09: showBall");
- if (g_vars->scene09_flyingBalls.size()) {
- StaticANIObject *ani = g_vars->scene09_flyingBalls.front();
+ if (g_vars->scene09_sceneBalls.size()) {
+ StaticANIObject *ani = g_vars->scene09_sceneBalls.front();
+ g_vars->scene09_sceneBalls.push_back(ani);
+ g_vars->scene09_sceneBalls.remove_at(0);
+
+ g_vars->scene09_flyingBalls.insert_at(0, ani);
ani->show1(g_fp->_aniMan->_ox + 94, g_fp->_aniMan->_oy - 162, MV_BALL9_EXPLODE, 0);
}
@@ -311,7 +315,7 @@ void sceneHandler09_collideBall(uint num) {
debugC(2, kDebugSceneLogic, "scene09: collideBall");
if (g_vars->scene09_gulperIsPresent) {
- g_vars->scene09_flyingBall = g_vars->scene09_balls[num];
+ g_vars->scene09_flyingBall = g_vars->scene09_flyingBalls[num];
if (g_vars->scene09_gulper) {
g_vars->scene09_gulper->changeStatics2(ST_GLT_SIT);
@@ -327,11 +331,11 @@ void sceneHandler09_collideBall(uint num) {
}
void sceneHandler09_ballExplode(uint num) {
- debugC(2, kDebugSceneLogic, "scene09: ballExplode");
+ debugC(2, kDebugSceneLogic, "scene09: ballExplode(%d) of %d", num, g_vars->scene09_flyingBalls.size());
- StaticANIObject *ball = g_vars->scene09_balls[num];
+ StaticANIObject *ball = g_vars->scene09_flyingBalls[num];
- g_vars->scene09_balls.remove_at(num);
+ g_vars->scene09_flyingBalls.remove_at(num);
MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC9_BALLEXPLODE), 0, 1);
@@ -340,12 +344,12 @@ void sceneHandler09_ballExplode(uint num) {
if (!mq->chain(ball))
delete mq;
- g_vars->scene09_flyingBalls.pop_back();
+ //g_vars->scene09_sceneBalls.pop_back();
}
void sceneHandler09_checkHangerCollide() {
- for (uint b = 0; b < g_vars->scene09_balls.size(); b++) {
- StaticANIObject *ball = g_vars->scene09_balls[b];
+ for (uint b = 0; b < g_vars->scene09_flyingBalls.size(); b++) {
+ StaticANIObject *ball = g_vars->scene09_flyingBalls[b];
int newx = ball->_ox + 5;
@@ -376,6 +380,9 @@ void sceneHandler09_checkHangerCollide() {
break;
}
}
+
+ if (pixel)
+ break;
}
}
}
@@ -503,6 +510,8 @@ int sceneHandler09(ExCommand *cmd) {
}
if (ani->_id == ANI_VISUNCHIK) {
+ debugC(2, kDebugSceneLogic, "scene09: VISUNCHIK");
+
if (g_vars->scene09_numMovingHangers > 0) {
int hng = 0;
Commit: cec1f1336e6253b86d6fedeac015976970daa1f9
https://github.com/scummvm/scummvm/commit/cec1f1336e6253b86d6fedeac015976970daa1f9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-06T21:30:23+02:00
Commit Message:
FULLPIPE: Further fixes to scene09. Now balls fly as expected
Changed paths:
engines/fullpipe/scenes/scene09.cpp
diff --git a/engines/fullpipe/scenes/scene09.cpp b/engines/fullpipe/scenes/scene09.cpp
index 3918071..f9cf58d 100644
--- a/engines/fullpipe/scenes/scene09.cpp
+++ b/engines/fullpipe/scenes/scene09.cpp
@@ -104,9 +104,7 @@ void scene09_initScene(Scene *sc) {
g_vars->scene09_sceneBalls.clear();
- g_vars->scene09_sceneBalls.push_back(new StaticANIObject(sc->getStaticANIObject1ById(ANI_BALL9, -1)));
-
- StaticANIObject *newball = g_vars->scene09_sceneBalls.front();
+ StaticANIObject *newball = new StaticANIObject(sc->getStaticANIObject1ById(ANI_BALL9, -1));
newball->setAlpha(0xc8);
for (int i = 0; i < 4; i++) {
@@ -343,8 +341,6 @@ void sceneHandler09_ballExplode(uint num) {
if (!mq->chain(ball))
delete mq;
-
- //g_vars->scene09_sceneBalls.pop_back();
}
void sceneHandler09_checkHangerCollide() {
More information about the Scummvm-git-logs
mailing list