aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2013-12-17 22:47:56 +0200
committerEugene Sandulenko2013-12-17 22:47:56 +0200
commit17cb840bc2a405c5b93f046f389481f72d878fdd (patch)
tree589b13b7cc22850cf83daed24f0c0fa0bc1de949 /engines
parent35758d05d4fdfbe04c26419b347c261be6e2b444 (diff)
downloadscummvm-rg350-17cb840bc2a405c5b93f046f389481f72d878fdd.tar.gz
scummvm-rg350-17cb840bc2a405c5b93f046f389481f72d878fdd.tar.bz2
scummvm-rg350-17cb840bc2a405c5b93f046f389481f72d878fdd.zip
FULLPIPE: More code to scene06
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/scenes.cpp2
-rw-r--r--engines/fullpipe/scenes.h4
-rw-r--r--engines/fullpipe/scenes/scene06.cpp39
3 files changed, 33 insertions, 12 deletions
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 38c5b8ce33..b4a8625ef9 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -121,7 +121,7 @@ Vars::Vars() {
scene06_ballDrop = 0;
scene06_var07 = 0;
scene06_var08 = 0;
- scene06_var09 = 0;
+ scene06_currentBall = 0;
scene06_var10 = 0;
scene06_var11 = 0;
scene06_numBallsGiven = 0;
diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h
index 28fc2b7801..15f5e7ac92 100644
--- a/engines/fullpipe/scenes.h
+++ b/engines/fullpipe/scenes.h
@@ -158,8 +158,8 @@ public:
StaticANIObject *scene06_ballDrop;
int scene06_var07;
int scene06_var08;
- StaticANIObject *scene06_var09;
- int scene06_var10;
+ StaticANIObject *scene06_currentBall;
+ StaticANIObject *scene06_var10;
StaticANIObject *scene06_var11;
Common::Array<StaticANIObject *> scene06_balls;
int scene06_numBallsGiven;
diff --git a/engines/fullpipe/scenes/scene06.cpp b/engines/fullpipe/scenes/scene06.cpp
index 65494f4bf2..8b9db0f446 100644
--- a/engines/fullpipe/scenes/scene06.cpp
+++ b/engines/fullpipe/scenes/scene06.cpp
@@ -59,7 +59,7 @@ int scene06_updateCursor() {
return PIC_CSR_ITN;
}
- } else if (g_fullpipe->_objectAtCursor && (StaticANIObject *)g_fullpipe->_objectAtCursor == g_vars->scene06_var09
+ } else if (g_fullpipe->_objectAtCursor && (StaticANIObject *)g_fullpipe->_objectAtCursor == g_vars->scene06_currentBall
&& g_fullpipe->_cursorId == PIC_CSR_DEFAULT) {
g_fullpipe->_cursorId = PIC_CSR_ITN;
}
@@ -127,12 +127,12 @@ void sceneHandler06_buttonPush() {
void sceneHandler06_showNextBall() {
if (g_vars->scene06_balls.size()) {
- g_vars->scene06_var09 = new StaticANIObject(g_vars->scene06_balls.front());
+ g_vars->scene06_currentBall = new StaticANIObject(g_vars->scene06_balls.front());
g_vars->scene06_balls.remove_at(0);
MessageQueue *mq = new MessageQueue(g_fullpipe->_currentScene->getMessageQueueById(QU_SC6_SHOWNEXTBALL), 0, 1);
- mq->replaceKeyCode(-1, g_vars->scene06_var09->_okeyCode);
+ mq->replaceKeyCode(-1, g_vars->scene06_currentBall->_okeyCode);
mq->chain(0);
++g_vars->scene06_numBallsGiven;
@@ -148,7 +148,7 @@ void sceneHandler06_sub08() {
}
void sceneHandler06_takeBall() {
- if (g_vars->scene06_var09 && !g_vars->scene06_var09->_movement && g_vars->scene06_var09->_statics->_staticsId == ST_NBL_NORM) {
+ if (g_vars->scene06_currentBall && !g_vars->scene06_currentBall->_movement && g_vars->scene06_currentBall->_statics->_staticsId == ST_NBL_NORM) {
if (abs(1158 - g_fullpipe->_aniMan->_ox) > 1
|| abs(452 - g_fullpipe->_aniMan->_oy) > 1
|| g_fullpipe->_aniMan->_movement
@@ -169,11 +169,32 @@ void sceneHandler06_takeBall() {
}
void sceneHandler06_sub02() {
- warning("STUB: sceneHandler06_sub02()");
+ if (g_vars->scene06_var10) {
+ g_vars->scene06_var17 = 4 * g_fullpipe->_aniMan->_movement->_currDynamicPhaseIndex + 16;
+ g_vars->scene06_var18 = 5 * (g_fullpipe->_aniMan->_movement->_currDynamicPhaseIndex + 4);
+
+ if (g_fullpipe->_aniMan->_movement->_currDynamicPhaseIndex < 4) {
+ g_fullpipe->_aniMan->_movement->setDynamicPhaseIndex(11);
+
+ g_vars->scene06_var08 = 0;
+
+ return;
+ }
+
+ g_fullpipe->_aniMan->_movement->setDynamicPhaseIndex(9);
+ }
+
+ g_vars->scene06_var08 = 0;
}
void sceneHandler06_sub07() {
- warning("STUB: sceneHandler06_sub07()");
+ if (g_vars->scene06_var10) {
+ g_vars->scene06_var11 = g_vars->scene06_var10;
+ g_vars->scene06_var10 = 0;
+ g_vars->scene06_var11->show1(g_fullpipe->_aniMan->_ox - 60, g_fullpipe->_aniMan->_oy - 60, -1, 0);
+
+ g_vars->scene06_var11->_priority = 27;
+ }
}
void sceneHandler06_throwCallback(int *arg) {
@@ -234,7 +255,7 @@ void scene06_initScene(Scene *sc) {
g_vars->scene06_ballDrop = sc->getStaticANIObject1ById(ANI_BALLDROP, -1);
g_vars->scene06_var07 = 0;
g_vars->scene06_var08 = 0;
- g_vars->scene06_var09 = 0;
+ g_vars->scene06_currentBall = 0;
g_vars->scene06_var10 = 0;
g_vars->scene06_var11 = 0;
g_vars->scene06_balls.clear();
@@ -388,7 +409,7 @@ int sceneHandler06(ExCommand *ex) {
return 0;
}
- if (g_vars->scene06_var09 == st) {
+ if (g_vars->scene06_currentBall == st) {
if (g_vars->scene06_numBallsGiven == 1)
sceneHandler06_takeBall();
@@ -484,7 +505,7 @@ int sceneHandler06(ExCommand *ex) {
sceneHandler06_sub04(g_vars->scene06_var17);
}
if (g_vars->scene06_var07
- && !g_vars->scene06_var09
+ && !g_vars->scene06_currentBall
&& !g_vars->scene06_var10
&& !g_vars->scene06_var11
&& g_vars->scene06_numBallsGiven >= 15