FULLPIPE: Implement sceneHandler27_batLogic()

This commit is contained in:
Eugene Sandulenko 2014-02-06 23:31:04 +02:00
parent 2d2c9929f6
commit d492457c34
4 changed files with 78 additions and 1 deletions

View File

@ -1096,11 +1096,17 @@ namespace Fullpipe {
#define MSG_SC27_STARTWIPE 2057
#define MSG_SC27_TAKEVENT 4584
#define MV_BTA_FALL 2049
#define MV_BTH_1_0 3366
#define MV_BTH_2_1 3364
#define MV_BTH_3_2 3362
#define MV_BTH_4_3 3360
#define MV_BTH_5_4 3358
#define MV_MAN27_FLOW 1990
#define MV_MAN27_THROWBET 1989
#define PIC_SC27_HITZONE2 4756
#define QU_DRV_GIVEVENT 2040
#define QU_MID_CLEANVENT 4583
#define QU_SC27_RESTARTBETS 3370
#define QU_SC27_SHOWBET 3368
#define SND_27_026 4127
#define SND_27_027 4128
@ -1108,6 +1114,11 @@ namespace Fullpipe {
#define ST_BTA_FALL 2054
#define ST_BTA_HILITE 2052
#define ST_BTA_NORM 2028
#define ST_BTH_1 3365
#define ST_BTH_2 3363
#define ST_BTH_3 3361
#define ST_BTH_4 3359
#define ST_BTH_5 3357
#define ST_DRV_VENT 1996
#define ST_MID_BROOM 2022
#define ST_MID_SPADE 3489

View File

@ -1374,5 +1374,8 @@ void FullpipeEngine::updateMap(PreloadItem *pre) {
}
}
void BallChain::init(Ball **ball) {
warning("STUB: BallChain::init()");
}
} // End of namespace Fullpipe

View File

@ -206,6 +206,8 @@ struct BallChain {
BallChain() : pHead(0), field_8(0), pTail(0), numBalls(0), cPlex(0), cPlexLen(0) {}
~BallChain() { free(cPlex); }
void init(Ball **ball);
};
class Vars {

View File

@ -450,7 +450,68 @@ void sceneHandler27_maidSwitchback() {
}
void sceneHandler27_batLogic() {
warning("STUB: sceneHandler27_batLogic()");
if (g_vars->scene27_balls.numBalls) {
g_vars->scene27_bat = g_vars->scene27_balls.pHead->ani;
g_vars->scene27_balls.pHead = g_vars->scene27_balls.pHead->p0;
if (g_vars->scene27_balls.pHead)
g_vars->scene27_balls.pHead->p0->p1 = 0;
else
g_vars->scene27_balls.field_8 = 0;
g_vars->scene27_balls.init(&g_vars->scene27_balls.pHead->p0);
int mv;
switch (g_vars->scene27_batHandler->_statics->_staticsId) {
case ST_BTH_5:
mv = MV_BTH_5_4;
break;
case ST_BTH_4:
mv = MV_BTH_4_3;
break;
case ST_BTH_3:
mv = MV_BTH_3_2;
break;
case ST_BTH_2:
mv = MV_BTH_2_1;
break;
case ST_BTH_1:
mv = MV_BTH_1_0;
break;
default:
chainQueue(QU_SC27_RESTARTBETS, 1);
getCurrSceneSc2MotionController()->setEnabled();
getGameLoaderInteractionController()->enableFlag24();
g_fp->_behaviorManager->setFlagByStaticAniObject(g_fp->_aniMan, 1);
return;
}
MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
mq->setFlags(mq->getFlags() | 1);
ExCommand *ex = new ExCommand(g_vars->scene27_batHandler->_id, 1, mv, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags |= 2;
mq->addExCommandToEnd(ex);
ex = new ExCommand(0, 17, MSG_SC27_CLICKBET, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags |= 3;
mq->addExCommandToEnd(ex);
mq->chain(0);
} else {
g_vars->scene27_bat = 0;
}
}
void sceneHandler27_calcWinArcade() {