void sceneHandler11_putABoot() { if (g_vars->scene11_boots->_flags & 4) { if (g_vars->scene11_boots->_statics->_staticsId == ST_BTS11_ONE) chainObjQueue(0, QU_SC11_PUTBOOT2, 1); } else { chainObjQueue(0, QU_SC11_PUTBOOT1, 1); } }
void sceneHandler25_rowHand() { PicAniInfo info; g_fp->_aniMan->getPicAniInfo(&info); g_fp->_aniMan->_messageQueueId = 0; g_fp->_aniMan->changeStatics2(g_fp->_aniMan->_statics->_staticsId); int x = g_fp->_aniMan->_ox; int y = g_fp->_aniMan->_oy; g_fp->_aniMan->setPicAniInfo(&info); int id = g_fp->_aniMan->_statics->_staticsId; int qid = 0; if (id == ST_MAN25_ONBOARD && x == 370 && y == 502) { g_fp->_aniMan->changeStatics2(ST_MAN25_ONBOARD); qid = QU_SC25_TRYROWHAND; } else if (id == (ST_MAN25_ONBOARD|0x4000) && x == 632 && y == 502) { g_fp->_aniMan->changeStatics2(ST_MAN25_ONBOARD|0x4000); qid = QU_SC25_TRYROWHAND_R; } if (qid) { chainObjQueue(g_fp->_aniMan, qid, 1); g_vars->scene25_sneezeFlipper = false; } }
void sceneHandler11_restartMan() { chainObjQueue(0, QU_SC11_RESTARTMAN, 1); getGameLoaderInteractionController()->enableFlag24(); getCurrSceneSc2MotionController()->activate(); g_vars->scene11_scrollIsEnabled = false; }
void sceneHandler17_moonshineFill() { StaticANIObject *moonshiner = g_fp->_currentScene->getStaticANIObject1ById(ANI_SAMOGONSHCHIK, -1); if (!(moonshiner->_flags & 0x80)) { moonshiner->changeStatics2(ST_SMG_SIT); chainObjQueue(moonshiner, QU_SMG_FILLBOTTLE, 1); g_vars->scene17_sugarIsShown = false; } }
void sceneHandler25_tryRow(int obj) { PicAniInfo info; g_fp->_aniMan->getPicAniInfo(&info); g_fp->_aniMan->_messageQueueId = 0; g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT|0x4000); int x = g_fp->_aniMan->_ox; int y = g_fp->_aniMan->_oy; g_fp->_aniMan->setPicAniInfo(&info); int qid = 0; if (x == 788 && y == 468) { if (g_vars->scene25_board->_statics->_staticsId == ST_BRD25_RIGHT2) { if (obj == ANI_INV_BROOM) { g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT|0x4000); qid = QU_SC25_TRYBROOM; } if (obj == ANI_INV_LOPAT) { g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT|0x4000); qid = QU_SC25_TRYSPADE; } if (qid) { chainQueue(qid, 1); g_fp->playSound(SND_25_028, 0); return; } if (obj == ANI_INV_SWAB) { g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT|0x4000); chainQueue(QU_SC25_TRYSWAB, 1); } else if (!obj) { g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT|0x4000); chainObjQueue(g_fp->_aniMan, QU_SC25_TRYHAND, 1); g_fp->playSound(SND_25_028, 0); } } else if (g_vars->scene25_board->_statics->_staticsId == (ST_MAN_RIGHT|0x4000) && !obj) { g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT|0x4000); chainQueue(QU_SC25_TRUBATOBOARD, 1); g_vars->scene25_dudeIsOnBoard = true; } } }
void sceneHandler06_checkBallTarget(int par) { if (g_vars->scene06_ballY <= 475) { if (g_vars->scene06_mumsy->isPixelHitAtPos(g_vars->scene06_ballX, g_vars->scene06_ballY)) { chainObjQueue(g_vars->scene06_mumsy, QU_MOM_JUMPBK, 0); sceneHandler06_catchBall(); } } else { sceneHandler06_fallBall(); } }
void sceneHandler08_enterUp() { g_fp->_currentScene->getPictureObjectById(PIC_SC8_LADDER, 0)->_flags &= 0xFFFB; g_fp->_aniMan->changeStatics2(ST_MAN8_HANDSUP); g_fp->_aniMan->setOXY(386, 236); g_fp->_aniMan->_priority = 10; g_fp->_aniMan->_flags = 4; chainObjQueue(g_fp->_aniMan, QU_SC8_FINISH, 1); g_vars->scene08_inAir = false; }
void sceneHandler16_drink() { if (g_vars->scene16_mug->_flags & 4) { if (!g_vars->scene16_jettie->_movement) { if (!g_vars->scene16_walkingBoy || !g_vars->scene16_walkingBoy->_movement || g_vars->scene16_walkingBoy->_movement->_id != MV_BOY_DRINK) { if (!g_vars->scene16_walkingGirl || !g_vars->scene16_walkingGirl->_movement || g_vars->scene16_walkingGirl->_movement->_id != MV_GRL_DRINK) { if (g_vars->scene16_mug->_statics->_staticsId == ST_MUG_FULL) { MessageQueue *mq; ExCommand *ex; if (g_vars->scene16_walkingBoy) { g_fp->_aniMan->_flags |= 0x180; g_vars->scene16_walkingBoy->changeStatics2(ST_BOY_STAND); g_vars->scene16_walkingBoy->queueMessageQueue(0); mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC16_BOYKICK), 0, 1); mq->replaceKeyCode(-1, g_vars->scene16_walkingBoy->_okeyCode); ex = new ExCommand(ANI_MAN, 34, 384, 0, 0, 0, 1, 0, 0, 0); ex->_excFlags |= 3u; ex->_field_14 = 384; ex->_messageNum = 0; mq->insertExCommandAt(2, ex); mq->setFlags(mq->getFlags() | 1); mq->chain(0); } else { g_fp->_aniMan->_flags |= 1; mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC16_MANDRINK), 0, 1); ex = new ExCommand(ANI_MAN, 34, 256, 0, 0, 0, 1, 0, 0, 0); ex->_excFlags |= 3u; ex->_field_14 = 256; ex->_messageNum = 0; mq->addExCommandToEnd(ex); mq->setFlags(mq->getFlags() | 1); mq->chain(0); g_fp->_currentScene->getStaticANIObject1ById(ANI_GIRL, -1)->changeStatics2(ST_GRL_STAND); } g_fp->_currentScene->getStaticANIObject1ById(ANI_WIRE16, -1)->show1(-1, -1, -1, 0); } else { chainObjQueue(g_fp->_aniMan, QU_SC16_TAKEMUG, 1); } } } } } }
int sceneHandler28(ExCommand *cmd) { if (cmd->_messageKind != 17) return 0; switch (cmd->_messageNum) { case MSG_SC28_LIFT6MUSIC: g_fp->playTrack(g_fp->getGameLoaderGameVar()->getSubVarByName("SC_28"), "MUSIC_TIOTIA", 1); break; case MSG_SC28_LIFT6INSIDE: g_vars->scene28_lift6inside = true; break; case MSG_SC28_LIFT1_SHOWAFTER: sceneHandler28_lift1ShowAfter(); break; case MSG_SC28_MAKEFACES: sceneHandler28_makeFaces(cmd); break; case MSG_SC28_TRYVTORPERS: sceneHandler28_trySecondaryPers(); break; case MSG_SC28_TURNOFF_0: g_vars->scene28_lighteningObject = g_fp->_currentScene->getPictureObjectById(PIC_SC28_DARK0, 0); g_vars->scene28_lighteningObject->_flags |= 4; break; case MSG_SC28_TURNON_0: g_vars->scene28_darkeningObject = g_fp->_currentScene->getPictureObjectById(PIC_SC28_DARK0, 0); break; case MSG_SC28_TURNON_1: g_vars->scene28_darkeningObject = g_fp->_currentScene->getPictureObjectById(PIC_SC28_DARK1, 0); break; case MSG_SC28_TURNOFF_1: g_vars->scene28_lighteningObject = g_fp->_currentScene->getPictureObjectById(PIC_SC28_DARK1, 0); g_vars->scene28_lighteningObject->_flags |= 4; break; case MSG_SC28_TURNON_2: g_vars->scene28_darkeningObject = g_fp->_currentScene->getPictureObjectById(PIC_SC28_DARK2, 0); sceneHandler28_turnOn2(); break; case MSG_SC28_TURNOFF_2: g_vars->scene28_lighteningObject = g_fp->_currentScene->getPictureObjectById(PIC_SC28_DARK2, 0); g_vars->scene28_lighteningObject->_flags |= 4; break; case MSG_SC28_TURNON_3: g_vars->scene28_darkeningObject = g_fp->_currentScene->getPictureObjectById(PIC_SC28_DARK3, 0); break; case MSG_SC28_TURNOFF_3: g_vars->scene28_lighteningObject = g_fp->_currentScene->getPictureObjectById(PIC_SC28_DARK3, 0); g_vars->scene28_lighteningObject->_flags |= 4; break; case MSG_SC28_TURNON_4: g_vars->scene28_darkeningObject = g_fp->_currentScene->getPictureObjectById(PIC_SC28_DARK4, 0); break; case MSG_SC28_TURNOFF_4: g_vars->scene28_lighteningObject = g_fp->_currentScene->getPictureObjectById(PIC_SC28_DARK4, 0); g_vars->scene28_lighteningObject->_flags |= 4; break; case MSG_SC28_TURNON_6: g_vars->scene28_darkeningObject = g_fp->_currentScene->getPictureObjectById(PIC_SC28_DARK6, 0); break; case MSG_SC28_TURNOFF_6: g_vars->scene28_lighteningObject = g_fp->_currentScene->getPictureObjectById(PIC_SC28_DARK6, 0); g_vars->scene28_lighteningObject->_flags |= 4; break; case MSG_SC28_STARTWORK1: sceneHandler28_startWork1(); break; case MSG_SC28_CLICKLIFT: sceneHandler28_clickLift(cmd->_param); break; case MSG_SC28_ENDLIFT1: case MSG_SC28_ENDLIFT6: case MSG_SC28_ENDCABIN: g_fp->_behaviorManager->setFlagByStaticAniObject(g_fp->_aniMan, 1); g_fp->_aniMan->_flags &= 0xFEFF; break; case 29: { if (g_vars->scene28_lift6inside) { chainObjQueue(g_fp->_aniMan, QU_SC28_LIFT6_END, 1); g_fp->playTrack(g_fp->getGameLoaderGameVar()->getSubVarByName("SC_28"), "MUSIC", 1); g_vars->scene28_lift6inside = false; } StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(cmd->_sceneClickX, cmd->_sceneClickY); if (ani) if (ani->_id == ANI_LIFT || ani->_id == ANI_LIFT_28 ) { sceneHandler28_clickLift(ani->_odelay); cmd->_messageKind = 0; break; } if (!ani || !canInteractAny(g_fp->_aniMan, ani, cmd->_param)) { int picId = g_fp->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY); PictureObject *pic = g_fp->_currentScene->getPictureObjectById(picId, 0); if (!pic || !canInteractAny(g_fp->_aniMan, pic, cmd->_param)) { if ((g_fp->_sceneRect.right - cmd->_sceneClickX < 47 && g_fp->_sceneRect.right < g_fp->_sceneWidth - 1) || (cmd->_sceneClickX - g_fp->_sceneRect.left < 47 && g_fp->_sceneRect.left > 0)) g_fp->processArcade(cmd); } } break; } case 33: if (g_fp->_aniMan2) { int x = g_fp->_aniMan2->_ox; if (x < g_fp->_sceneRect.left + 200) g_fp->_currentScene->_x = x - 300 - g_fp->_sceneRect.left; if (x > g_fp->_sceneRect.right - 200) g_fp->_currentScene->_x = x + 300 - g_fp->_sceneRect.right; } if (g_vars->scene28_darkeningObject) { if (g_vars->scene28_darkeningObject->_picture->getAlpha() > 10) { g_vars->scene28_darkeningObject->_picture->setAlpha(g_vars->scene28_darkeningObject->_picture->getAlpha() - 10); } else { g_vars->scene28_darkeningObject->_flags &= 0xFFFB; g_vars->scene28_darkeningObject = 0; } } if (g_vars->scene28_lighteningObject) { if (g_vars->scene28_lighteningObject->_picture->getAlpha() < 0xF9u) { g_vars->scene28_lighteningObject->_picture->setAlpha(g_vars->scene28_lighteningObject->_picture->getAlpha() + 6); } else { g_vars->scene28_lighteningObject->_picture->setAlpha(0xff); g_vars->scene28_lighteningObject = 0; } } g_fp->_floaters->update(); for (uint i = 0; i < g_fp->_floaters->_array2.size(); i++) if (g_fp->_floaters->_array2[i]->val13 == 1) g_fp->_floaters->_array2[i]->ani->_priority = 15; g_fp->_behaviorManager->updateBehaviors(); g_fp->startSceneTrack(); break; } return 0; }