Skip to content

Commit

Permalink
FULLPIPE: More code to scene06
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Dec 17, 2013
1 parent 35758d0 commit 17cb840
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 12 deletions.
2 changes: 1 addition & 1 deletion engines/fullpipe/scenes.cpp
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions engines/fullpipe/scenes.h
Expand Up @@ -158,8 +158,8 @@ class Vars {
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;
Expand Down
39 changes: 30 additions & 9 deletions engines/fullpipe/scenes/scene06.cpp
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand All @@ -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
Expand All @@ -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) {
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 17cb840

Please sign in to comment.