Skip to content

Commit

Permalink
FULLPIPE: Implement sceneHandler34_animateAction()
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Jan 13, 2014
1 parent aef5655 commit 5a27411
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 3 deletions.
5 changes: 5 additions & 0 deletions engines/fullpipe/constants.h
Expand Up @@ -1154,11 +1154,16 @@ namespace Fullpipe {
#define MSG_SC34_SHOWVENT 2481
#define MSG_SC34_TESTVENT 2557
#define MSG_SC34_UNCLIMB 2492
#define MV_MAN34_TRY 2485
#define MV_MAN34_TRYTABUR 2489
#define MV_MAN34_TURNVENT_L 4307
#define MV_MAN34_TURNVENT_R 2500
#define QU_SC34_ENTERLIFT 2819
#define QU_SC34_EXITLIFT 2820
#define QU_SC34_FROMBOX 2494
#define QU_SC34_FROMBOX_FLOOR 4572
#define QU_SC34_FROMCACTUS 4312
#define QU_SC34_FROMSTOOL 2491
#define QU_SC34_SHOWSTOOL 2496
#define QU_CTS34_FALLEFT 4316
#define QU_CTS34_FALLRIGHT 4317
Expand Down
67 changes: 64 additions & 3 deletions engines/fullpipe/scenes/scene34.cpp
Expand Up @@ -194,8 +194,69 @@ void sceneHandler34_sub02(ExCommand *cmd) {
warning("STUB: sceneHandler34_sub02(cmd)");
}

void sceneHandler34_sub01(ExCommand *cmd) {
warning("STUB: sceneHandler34_sub01(cmd)");
void sceneHandler34_animateAction(ExCommand *cmd) {
if (g_fp->_aniMan->_movement)
return;

int ox = g_fp->_aniMan->_ox;
int oy = g_fp->_aniMan->_oy;
StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(g_fp->_sceneRect.left + cmd->_x, g_fp->_sceneRect.top + cmd->_y);

if (!ani || ani->_id != ANI_VENT_34) {
int qId = 0;

if (ox == 887) {
if (oy != 370)
return;

qId = QU_SC34_FROMSTOOL;
} else {
if (ox != 916)
return;

if (oy == 286) {
MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC34_FROMBOX), 0, 0);

mq->addExCommandToEnd(cmd->createClone());
mq->chain(0);

sceneHandler34_setExits();

return;
}

if (oy != 345)
return;

qId = QU_SC34_FROMBOX_FLOOR;
}

if (qId) {
MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(qId), 0, 0);

mq->addExCommandToEnd(cmd->createClone());
mq->chain(0);
}

return;
}

if (ox == 887) {
if (oy == 370)
g_fp->_aniMan->startAnim(MV_MAN34_TRYTABUR, 0, -1);

} else if (ox == 916) {
if (oy == 286) {
int id = g_vars->scene34_vent->_statics->_staticsId;
if (id == ST_VNT34_UP2) {
g_fp->_aniMan->startAnim(MV_MAN34_TURNVENT_R, 0, -1);
} else if (id == ST_VNT34_RIGHT3) {
g_fp->_aniMan->startAnim(MV_MAN34_TURNVENT_L, 0, -1);
}
} else if (oy == 345) {
g_fp->_aniMan->startAnim(MV_MAN34_TRY, 0, -1);
}
}
}

void sceneHandler34_showVent() {
Expand Down Expand Up @@ -331,7 +392,7 @@ int sceneHandler34(ExCommand *cmd) {
case 29:
{
if (g_vars->scene34_var05) {
sceneHandler34_sub01(cmd);
sceneHandler34_animateAction(cmd);
break;
}

Expand Down

0 comments on commit 5a27411

Please sign in to comment.