void sceneHandler10_clickGum() { if (g_vars->scene10_hasGum) { if (sceneHandler10_inflaterIsBlind()) { if (g_vars->scene10_hasGum) { int x = g_vars->scene10_gum->_ox - 139; int y = g_vars->scene10_gum->_oy - 48; if (abs(x - g_fp->_aniMan->_ox) > 1 || abs(y - g_fp->_aniMan->_oy) > 1) { MessageQueue *mq = getCurrSceneSc2MotionController()->method34(g_fp->_aniMan, x, y, 1, ST_MAN_RIGHT); if (mq) { ExCommand *ex = new ExCommand(0, 17, MSG_SC10_CLICKGUM, 0, 0, 0, 1, 0, 0, 0); ex->_excFlags = 2; mq->addExCommandToEnd(ex); postExCommand(g_fp->_aniMan->_id, 2, x, y, 0, -1); } } else { g_vars->scene10_hasGum = 0; chainQueue(QU_SC10_TAKEGUM, 1); } } } else { g_vars->scene10_inflater->changeStatics2(ST_NDV_SIT); if (g_fp->getObjectState(sO_Inflater) == g_fp->getObjectEnumState(sO_Inflater, sO_WithGum)) g_vars->scene10_inflater->startAnim(MV_NDV_DENIES, 0, -1); else g_vars->scene10_inflater->startAnim(MV_NDV_DENY_NOGUM, 0, -1); } } }
void sceneHandler26_clickVent(StaticANIObject *ani, ExCommand *cmd) { if (ani->_okeyCode || g_fp->getObjectState(sO_Hatch_26) == g_fp->getObjectEnumState(sO_Hatch_26, sO_Opened)) { if (g_fp->_aniMan->isIdle() && !(g_fp->_aniMan->_flags & 0x100)) { g_vars->scene26_activeVent = ani; int x = ani->_ox - 20; int y = ani->_oy + 61; if (abs(x - g_fp->_aniMan->_ox) > 1 || abs(y - g_fp->_aniMan->_oy) > 1 || g_fp->_aniMan->_movement || g_fp->_aniMan->_statics->_staticsId != ST_MAN_UP) { MessageQueue *mq = getCurrSceneSc2MotionController()->method34(g_fp->_aniMan, x, y, 1, ST_MAN_UP); if (mq) { ExCommand *ex = new ExCommand(0, 17, MSG_SC26_CLICKVENT, 0, 0, 0, 1, 0, 0, 0); ex->_excFlags |= 3; ex->_keyCode = ani->_okeyCode; mq->addExCommandToEnd(ex); postExCommand(g_fp->_aniMan->_id, 2, x, y, 0, -1); } } else { sceneHandler26_animateVents(ani); } } } cmd->_messageKind = 0; }
void sceneHandler28_clickLift(int numLift) { int x = 0; debugC(2, kDebugSceneLogic, "scene28: clickLift(%d)", numLift); switch (numLift) { case 0: x = 600; break; case 1: x = 824; break; case 2: x = 1055; break; case 3: x = 1286; break; case 4: x = 1517; break; case 5: x = 1748; break; case 6: x = 1979; break; } if (abs(x - g_fp->_aniMan->_ox) > 1 || abs(472 - g_fp->_aniMan->_oy) > 1 || g_fp->_aniMan->_movement || g_fp->_aniMan->_statics->_staticsId != ST_MAN_UP) { debugC(2, kDebugSceneLogic, "scene28: clickLift: overwrite"); MessageQueue *mq = getCurrSceneSc2MotionController()->startMove(g_fp->_aniMan, x, 472, 1, ST_MAN_UP); if (mq) { ExCommand *ex = new ExCommand(0, 17, MSG_SC28_CLICKLIFT, 0, 0, 0, 1, 0, 0, 0); ex->_excFlags |= 3; ex->_param = numLift; mq->addExCommandToEnd(ex); postExCommand(g_fp->_aniMan->_id, 2, x, 472, 0, -1); } } else { switch (numLift) { case 0: sceneHandler28_lift0Start(); break; case 1: sceneHandler28_lift1Start(); break; case 2: sceneHandler28_lift2Start(); break; case 3: sceneHandler28_lift3Start(); break; case 4: sceneHandler28_lift4Start(); break; case 5: sceneHandler28_lift5Start(); break; case 6: sceneHandler28_lift6Start(); break; default: return; } } }
void sceneHandler29_clickPorter(ExCommand *cmd) { if (!g_fp->_aniMan->isIdle() || g_fp->_aniMan->_flags & 0x100) { cmd->_messageKind = 0; return; } if (g_vars->scene29_manX <= g_vars->scene29_porter->_ox) { if (ABS(351 - g_vars->scene29_manX) > 1 || ABS(443 - g_vars->scene29_manY) > 1 || g_fp->_aniMan->_movement || g_fp->_aniMan->_statics->_staticsId != ST_MAN_RIGHT) { if (g_fp->_msgX != 351 || g_fp->_msgY != 443) { MessageQueue *mq = getCurrSceneSc2MotionController()->startMove(g_fp->_aniMan, 351, 443, 1, ST_MAN_RIGHT); if (mq) { mq->addExCommandToEnd(cmd->createClone()); postExCommand(g_fp->_aniMan->_id, 2, 351, 443, 0, -1); } } } else { sceneHandler29_manToL(); } } else { g_vars->scene29_manX = g_fp->_aniMan->_ox; g_vars->scene29_manY = g_fp->_aniMan->_oy; if (ABS(1582 - g_vars->scene29_manX) > 1 || ABS(445 - g_fp->_aniMan->_oy) > 1 || g_fp->_aniMan->_movement || g_fp->_aniMan->_statics->_staticsId != (0x4000 | ST_MAN_RIGHT)) { if (g_fp->_msgX != 1582 || g_fp->_msgY != 445) { MessageQueue *mq = getCurrSceneSc2MotionController()->startMove(g_fp->_aniMan, 1582, 445, 1, (0x4000 | ST_MAN_RIGHT)); if (mq) { mq->addExCommandToEnd(cmd->createClone()); postExCommand(g_fp->_aniMan->_id, 2, 1582, 445, 0, -1); } } } else { sceneHandler29_manToR(); } } }
void sceneHandler16_mugClick() { if (abs(310 - g_fp->_aniMan->_ox) >= 1 || abs(449 - g_fp->_aniMan->_oy) >= 1 || g_fp->_aniMan->_movement || g_fp->_aniMan->_statics->_staticsId != ST_MAN_RIGHT) { MessageQueue *mq = getCurrSceneSc2MotionController()->startMove(g_fp->_aniMan, 310, 449, 1, ST_MAN_RIGHT); if (mq) { ExCommand *ex = new ExCommand(0, 17, MSG_SC16_MUGCLICK, 0, 0, 0, 1, 0, 0, 0); ex->_excFlags = 2; mq->addExCommandToEnd(ex); postExCommand(g_fp->_aniMan->_id, 2, 310, 449, 0, -1); } } else { sceneHandler16_drink(); } }
bool sceneHandler14_arcadeProcessClick(ExCommand *cmd) { if (!getCurrSceneSc2MotionController()->_isEnabled) return 0; if (!g_vars->scene14_grandmaIsHere) { if (!cmd->_keyCode) { if (g_vars->scene14_pink) { if (g_vars->scene14_pink->_flags & 4) { if (cmd->_sceneClickX < g_vars->scene14_pink->_ox + 40) { handleObjectInteraction(g_fp->_aniMan, g_vars->scene14_pink, 0); cmd->_messageKind = 0; return true; } } } } return false; } if (getCurrSceneSc2MotionController()->_objtype != kObjTypeMctlCompound) return false; if (!getCurrSceneSc2MotionController()->_motionControllers[0]->_movGraphReactObj->pointInRegion(cmd->_sceneClickX, cmd->_sceneClickY)) return false; if (cmd->_sceneClickX > 1237) return false; MessageQueue *mq = getCurrSceneSc2MotionController()->startMove(g_fp->_aniMan, 1237, 451, 1, 0); if (!mq) return false; ExCommand *ex = new ExCommand(0, 17, MSG_SC14_STARTARCADE, 0, 0, 0, 1, 0, 0, 0); ex->_excFlags |= 3; mq->addExCommandToEnd(ex); mq->setFlags(mq->getFlags() | 1); postExCommand(g_fp->_aniMan->_id, 2, 1237, 451, 0, -1); cmd->_messageKind = 0; getCurrSceneSc2MotionController()->deactivate(); getGameLoaderInteractionController()->disableFlag24(); return true; }
void sceneHandler11_putBoot() { if (abs(353 - g_fp->_aniMan->_ox) > 1 || abs(498 - g_fp->_aniMan->_oy) > 1 || g_fp->_aniMan->_movement || g_fp->_aniMan->_statics->_staticsId != ST_MAN_RIGHT) { MessageQueue *mq = getCurrSceneSc2MotionController()->startMove(g_fp->_aniMan, 353, 498, 1, ST_MAN_RIGHT); if (mq) { ExCommand *ex = new ExCommand(0, 17, MSG_SC11_PUTBOOT, 0, 0, 0, 1, 0, 0, 0); ex->_excFlags |= 3; mq->addExCommandToEnd(ex); postExCommand(g_fp->_aniMan->_id, 2, 353, 498, 0, -1); } } else { sceneHandler11_putABoot(); } }
void sceneHandler06_takeBall() { if (g_vars->scene06_currentBall && !g_vars->scene06_currentBall->_movement && g_vars->scene06_currentBall->_statics->_staticsId == ST_NBL_NORM) { if (abs(1158 - g_fp->_aniMan->_ox) > 1 || abs(452 - g_fp->_aniMan->_oy) > 1 || g_fp->_aniMan->_movement || g_fp->_aniMan->_statics->_staticsId != (0x4000 | ST_MAN_RIGHT)) { MessageQueue *mq = getCurrSceneSc2MotionController()->method34(g_fp->_aniMan, 1158, 452, 1, (0x4000 | ST_MAN_RIGHT)); if (mq) { ExCommand *ex = new ExCommand(0, 17, MSG_SC6_TAKEBALL, 0, 0, 0, 1, 0, 0, 0); ex->_excFlags |= 3; mq->addExCommandToEnd(ex); postExCommand(g_fp->_aniMan->_id, 2, 1158, 452, 0, -1); } } else { sceneHandler06_startAiming(); } } }
void sceneHandler27_clickBat(ExCommand *cmd) { int bx = g_vars->scene27_bat->_ox - 5; int by = g_vars->scene27_bat->_oy - 71; #if DBG sceneHandler27_throwBat(); return; #endif if (ABS(bx - g_fp->_aniMan->_ox) > 1 || ABS(by - g_fp->_aniMan->_oy) > 1 || g_fp->_aniMan->_movement || g_fp->_aniMan->_statics->_staticsId != ST_MAN_RIGHT) { MessageQueue *mq = getCurrSceneSc2MotionController()->startMove(g_fp->_aniMan, bx, by, 1, ST_MAN_RIGHT); if (mq) { mq->addExCommandToEnd(cmd->createClone()); postExCommand(g_fp->_aniMan->_id, 2, bx, by, 0, -1); } } else { sceneHandler27_throwBat(); } }