aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2014-04-02 15:10:11 +0300
committerEugene Sandulenko2014-04-02 15:10:28 +0300
commit9aa17f4cdea68d3e86190016cf6fea9bbf0e6674 (patch)
tree6d2852f013961f67e8fe4a29ec61c9e1ffd7b565 /engines
parentc08a4fdba13319b1af96e120297d4aee792f360f (diff)
downloadscummvm-rg350-9aa17f4cdea68d3e86190016cf6fea9bbf0e6674.tar.gz
scummvm-rg350-9aa17f4cdea68d3e86190016cf6fea9bbf0e6674.tar.bz2
scummvm-rg350-9aa17f4cdea68d3e86190016cf6fea9bbf0e6674.zip
FULLPIPE: Implement sceneHandler29_sub03()
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/constants.h4
-rw-r--r--engines/fullpipe/scenes.cpp4
-rw-r--r--engines/fullpipe/scenes.h1
-rw-r--r--engines/fullpipe/scenes/scene29.cpp162
4 files changed, 156 insertions, 15 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 0d1db26669..5a291dfdc6 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -1304,8 +1304,10 @@ namespace Fullpipe {
#define MV_MAN29_STANDUP_NORM 2093
#define MV_PTR_MOVEFAST 2102
#define MV_SHG_HITASS 2151
+#define MV_SHG_HITMAN 2147
#define MV_SHG_NORM 2117
#define MV_SHR_HITASS 2152
+#define MV_SHR_HITMAN 2149
#define MV_SHR_NORM 2131
#define MV_STR1_SHOOT 2109
#define MV_STR2_SHOOT 2112
@@ -1319,6 +1321,8 @@ namespace Fullpipe {
#define QU_SC29_MANFROM_R 2104
#define QU_SC29_MANTO_L 2103
#define QU_SC29_MANTO_R 2100
+#define SND_29_014 4348
+#define SND_29_027 4757
#define SND_29_028 4758
#define SND_29_029 4759
#define ST_ASS_NORM 2122
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 3fe8704d3b..55d67abcf7 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -1469,5 +1469,9 @@ Ball *BallChain::sub04(Ball *ballP, Ball *ballN) {
return pTail;
}
+void BallChain::sub05(Ball *ball) {
+ warning("STUB: BallChain::sub05");
+}
+
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h
index ef6af54c0f..a0701f2078 100644
--- a/engines/fullpipe/scenes.h
+++ b/engines/fullpipe/scenes.h
@@ -232,6 +232,7 @@ struct BallChain {
void init(Ball **ball);
Ball *sub04(Ball *ballP, Ball *ballN);
+ void sub05(Ball *ball);
void reset() { pHead = 0; pTail = 0; field_8 = 0; numBalls = 0; free(cPlex); cPlex = 0; cPlexLen = 0; }
};
diff --git a/engines/fullpipe/scenes/scene29.cpp b/engines/fullpipe/scenes/scene29.cpp
index 21454906d7..c89385057b 100644
--- a/engines/fullpipe/scenes/scene29.cpp
+++ b/engines/fullpipe/scenes/scene29.cpp
@@ -452,8 +452,154 @@ void sceneHandler29_manHit() {
}
}
+void sceneHandler29_assHitRed() {
+ if (g_vars->scene29_ass->_statics->_staticsId == ST_ASS_NORM) {
+ g_vars->scene29_ass->changeStatics2(ST_ASS_NORM);
+ g_vars->scene29_ass->startAnim(MV_ASS_HITRED, 0, -1);
+ }
+}
+
+void sceneHandler29_assHitGreen() {
+ if (g_vars->scene29_ass->_statics->_staticsId == ST_ASS_NORM) {
+ g_vars->scene29_ass->changeStatics2(ST_ASS_NORM);
+ g_vars->scene29_ass->startAnim(MV_ASS_HITGREEN, 0, -1);
+ }
+}
+
void sceneHandler29_sub03() {
- warning("STUB: sceneHandler29_sub03()");
+ Ball *ball = g_vars->scene29_var08.pHead;
+ Ball *newball;
+ int x, y;
+
+ while (ball) {
+ x = ball->ani->_ox - 30;
+ y = ball->ani->_oy;
+
+ if (x >= 186) {
+ if (sceneHandler29_sub16(ball->ani, x)) {
+ newball = g_vars->scene29_var05.sub04(g_vars->scene29_var05.field_8, 0);
+ newball->ani = ball->ani;
+
+ if (g_vars->scene29_var05.field_8)
+ g_vars->scene29_var05.field_8->p0 = newball;
+ else
+ g_vars->scene29_var05.pHead = newball;
+
+ g_vars->scene29_var05.field_8 = newball;
+
+ if (ball == g_vars->scene29_var08.pHead)
+ g_vars->scene29_var08.pHead = ball->p0;
+ else
+ ball->p1->p0 = ball->p0;
+
+ if (ball == g_vars->scene29_var08.field_8)
+ g_vars->scene29_var08.field_8 = ball->p1;
+ else
+ ball->p0->p1 = ball->p1;
+
+ g_vars->scene29_var08.init(&ball);
+
+ sceneHandler29_manHit();
+
+ g_fp->playSound(SND_29_014, 0);
+
+ ball->ani->startAnim(MV_SHG_HITMAN, 0, -1);
+
+ g_vars->scene29_var18 = ball->ani->_id;
+ } else {
+ ball->ani->setOXY(x, y);
+ }
+ } else {
+ newball = g_vars->scene29_var05.sub04(g_vars->scene29_var05.field_8, 0);
+ newball->ani = ball->ani;
+
+ if (g_vars->scene29_var05.field_8)
+ g_vars->scene29_var05.field_8->p0 = newball;
+ else
+ g_vars->scene29_var05.pHead = newball;
+
+ g_vars->scene29_var05.field_8 = newball;
+
+ ball->ani->hide();
+
+ if (ball == g_vars->scene29_var08.pHead)
+ g_vars->scene29_var08.pHead = ball->p0;
+ else
+ ball->p1->p0 = ball->p0;
+
+ if (ball == g_vars->scene29_var08.field_8)
+ g_vars->scene29_var08.field_8 = ball->p1;
+ else
+ ball->p0->p1 = ball->p1;
+
+ g_vars->scene29_var08.init(&ball);
+
+ sceneHandler29_assHitGreen();
+ }
+
+ ball = ball->p0;
+ }
+
+ ball = g_vars->scene29_var07.pHead;
+
+ while (ball) {
+ x = ball->ani->_ox - 30;
+ y = ball->ani->_oy;
+
+ if (x >= 147) {
+ if (sceneHandler29_sub15(ball->ani, x)) {
+ newball = g_vars->scene29_var06.sub04(g_vars->scene29_var06.field_8, 0);
+ newball->ani = ball->ani;
+
+ if (g_vars->scene29_var06.field_8)
+ g_vars->scene29_var06.field_8->p0 = newball;
+ else
+ g_vars->scene29_var06.pHead = newball;
+
+ g_vars->scene29_var06.field_8 = newball;
+
+ g_vars->scene29_var07.sub05(ball);
+
+ sceneHandler29_manHit();
+
+ g_fp->playSound(SND_29_027, 0);
+
+ ball->ani->startAnim(MV_SHR_HITMAN, 0, -1);
+
+ g_vars->scene29_var18 = ball->ani->_id;
+ } else {
+ ball->ani->setOXY(x, y);
+ }
+ } else {
+ newball = g_vars->scene29_var06.sub04(g_vars->scene29_var06.field_8, 0);
+ newball->ani = ball->ani;
+
+ if (g_vars->scene29_var06.field_8)
+ g_vars->scene29_var06.field_8->p0 = newball;
+ else
+ g_vars->scene29_var06.pHead = newball;
+
+ g_vars->scene29_var06.field_8 = newball;
+
+ ball->ani->hide();
+
+ if (ball == g_vars->scene29_var07.pHead)
+ g_vars->scene29_var07.pHead = ball->p0;
+ else
+ ball->p1->p0 = ball->p0;
+
+ if (ball == g_vars->scene29_var07.field_8)
+ g_vars->scene29_var07.field_8 = ball->p1;
+ else
+ ball->p0->p1 = ball->p1;
+
+ g_vars->scene29_var07.init(&ball);
+
+ sceneHandler29_assHitRed();
+ }
+
+ ball = ball->p0;
+ }
}
void sceneHandler29_manFromL() {
@@ -603,20 +749,6 @@ void sceneHandler29_sub07() {
g_fp->_aniMan->setOXY(g_vars->scene29_var20, g_vars->scene29_var21);
}
-void sceneHandler29_assHitGreen() {
- if (g_vars->scene29_ass->_statics->_staticsId == ST_ASS_NORM) {
- g_vars->scene29_ass->changeStatics2(ST_ASS_NORM);
- g_vars->scene29_ass->startAnim(MV_ASS_HITGREEN, 0, -1);
- }
-}
-
-void sceneHandler29_assHitRed() {
- if (g_vars->scene29_ass->_statics->_staticsId == ST_ASS_NORM) {
- g_vars->scene29_ass->changeStatics2(ST_ASS_NORM);
- g_vars->scene29_ass->startAnim(MV_ASS_HITRED, 0, -1);
- }
-}
-
void sceneHandler29_shoot() {
if (g_vars->scene29_var10 && g_vars->scene29_var20 < 1310) {
if (g_fp->_rnd->getRandomNumber(1) || g_vars->scene29_shooter1->_movement || g_vars->scene29_shooter1->_statics->_staticsId != ST_STR1_RIGHT) {