void sceneHandler25_animateBearders() { if (g_fp->_rnd->getRandomNumber(32767) < 218) { MessageQueue *mq; mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC25_BEARDED), 0, 1); mq->setParamInt(-1, g_vars->scene25_bearders[0]->_odelay); mq->getExCommandByIndex(0)->_x = g_fp->_rnd->getRandomNumber(650) + 100; mq->chain(0); g_vars->scene25_beardersCounter = 0; if (g_fp->_rnd->getRandomNumber(32767) < 0x1FFF) { mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC25_BEARDED2), 0, 1); mq->setParamInt(-1, g_vars->scene25_bearders[1]->_odelay); mq->getExCommandByIndex(0)->_x = g_fp->_rnd->getRandomNumber(650) + 100; mq->chain(0); if (g_fp->_rnd->getRandomNumber(32767) < 8191) { mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC25_BEARDED3), 0, 1); mq->setParamInt(-1, g_vars->scene25_bearders[2]->_odelay); mq->getExCommandByIndex(0)->_x = g_fp->_rnd->getRandomNumber(650) + 100; mq->chain(0); } } } }
void sceneHandler27_showNextBat() { if (g_vars->scene27_bat) { MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC27_SHOWBET), 0, 1); mq->setParamInt(-1, g_vars->scene27_bat->_odelay); mq->chain(0); } g_vars->scene27_batHandler->_priority = 1045; }
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->setParamInt(-1, g_vars->scene16_walkingBoy->_odelay); ex = new ExCommand(ANI_MAN, 34, 384, 0, 0, 0, 1, 0, 0, 0); ex->_excFlags |= 3u; ex->_z = 384; ex->_messageNum = 0; mq->insertExCommandAt(2, ex); mq->setFlags(mq->getFlags() | 1); mq->chain(0); } else { g_fp->_aniMan->_flags |= 0x100; 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->_z = 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); } } } } } }
void sceneHandler06_showNextBall() { if (g_vars->scene06_balls.size()) { g_vars->scene06_currentBall = g_vars->scene06_balls.remove_at(0); MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC6_SHOWNEXTBALL), 0, 1); mq->setParamInt(-1, g_vars->scene06_currentBall->_odelay); mq->chain(0); ++g_vars->scene06_numBallsGiven; } }
void sceneHandler16_putOnWheel() { StaticANIObject *ani = g_vars->scene16_walkingBoy; if (!ani) ani = g_vars->scene16_walkingGirl; if (ani) g_vars->scene16_figures.push_back(ani); ani = g_vars->scene16_figures.front(); g_vars->scene16_figures.pop_front(); if (ani) { MessageQueue *mq; if (ani->_id == ANI_BOY) { mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC16_GOBOY), 0, 1); mq->setParamInt(-1, ani->_odelay); mq->chain(0); g_vars->scene16_walkingBoy = ani; g_vars->scene16_walkingGirl = 0; } else if (ani->_id == ANI_GIRL) { if (g_fp->getObjectState(sO_Girl) == g_fp->getObjectEnumState(sO_Girl, sO_IsSwinging)) { mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC16_GOGIRL), 0, 1); mq->setParamInt(-1, ani->_odelay); mq->chain(0); g_vars->scene16_walkingBoy = 0; g_vars->scene16_walkingGirl = ani; } } } }
void sceneHandler16_startLaugh() { StaticANIObject *girl = g_fp->_currentScene->getStaticANIObject1ById(ANI_GIRL, -1); girl->changeStatics2(ST_GRL_STAND); MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC16_GIRLLAUGH), 0, 1); mq->setParamInt(-1, girl->_odelay); mq->setFlags(mq->getFlags() | 1); mq->chain(0); g_fp->getGameLoaderGameVar()->getSubVarByName("OBJSTATES")->setSubVarAsInt(sO_DudeSwinged, 0); g_vars->scene16_girlIsLaughing = true; }
void sceneHandler06_fallBall() { g_vars->scene06_ballY = 475; g_vars->scene06_flyingBall->setOXY(g_vars->scene06_ballX, g_vars->scene06_ballY); MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC6_FALLBALL), 0, 1); mq->setParamInt(-1, g_vars->scene06_flyingBall->_odelay); mq->chain(0); g_vars->scene06_balls.push_back(g_vars->scene06_flyingBall); g_vars->scene06_flyingBall = 0; sceneHandler06_dropBall(); sceneHandler06_eggieWalk(); }
void sceneHandler16_fillMug() { if (g_vars->scene16_mug->_flags & 4) { g_vars->scene16_jettie->_priority = 2; g_vars->scene16_jettie->startAnim(MV_JTI_FLOWIN, 0, -1); if (g_fp->_aniMan->_movement) { if (g_fp->_aniMan->_movement->_id == MV_MAN16_TAKEMUG) { g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT); g_vars->scene16_mug->show1(-1, -1, -1, 0); g_fp->setObjectState(sO_Cup, g_fp->getObjectEnumState(sO_Cup, sO_DudeHas)); } } return; } MessageQueue *mq; if (!(g_vars->scene16_boot->_flags & 4)) { g_vars->scene16_jettie->_priority = 15; g_vars->scene16_jettie->startAnim(MV_JTI_FLOWBY, 0, -1); if (g_vars->scene16_walkingBoy) { mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC16_BOYOUT), 0, 1); mq->setParamInt(-1, g_vars->scene16_walkingBoy->_odelay); if (mq->chain(g_vars->scene16_walkingBoy)) return; } else { if (!g_vars->scene16_walkingGirl) return; mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC16_GIRLOUT), 0, 1); mq->setParamInt(-1, g_vars->scene16_walkingGirl->_odelay); if (mq->chain(g_vars->scene16_walkingGirl)) return; } delete mq; return; } g_vars->scene16_jettie->_priority = 15; g_vars->scene16_boot->startAnim(MV_BT16_FILL, 0, -1); StaticANIObject *ani; if (g_vars->scene16_walkingBoy) { mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC16_BOYOUT), 0, 1); mq->setParamInt(-1, g_vars->scene16_walkingBoy->_odelay); ani = g_vars->scene16_walkingBoy; } else { if (!g_vars->scene16_walkingGirl) return; mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC16_GIRLOUT), 0, 1); mq->setParamInt(-1, g_vars->scene16_walkingGirl->_odelay); ani = g_vars->scene16_walkingGirl; } if (!mq->chain(ani)) delete mq; }
void sceneHandler28_trySecondaryPers() { MessageQueue *mq; int x; if (g_vars->scene28_headBeardedFlipper) { if (g_vars->scene28_beardedDirection) { mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_BRD28_GOR), 0, 1); mq->getExCommandByIndex(0)->_x = g_fp->_sceneRect.left - 20; mq->getExCommandByIndex(0)->_param = 1; mq->setParamInt(-1, 1); mq->chain(0); mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_BRD28_GOR), 0, 1); mq->getExCommandByIndex(0)->_x = g_fp->_sceneRect.left - 40; mq->getExCommandByIndex(0)->_y += 20; mq->getExCommandByIndex(0)->_param = 2; mq->setParamInt(-1, 2); mq->chain(0); mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_BRD28_GOR), 0, 1); x = g_fp->_sceneRect.left - 60; } else { mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_BRD28_GOL), 0, 1); mq->getExCommandByIndex(0)->_x = g_fp->_sceneRect.right + 20; mq->getExCommandByIndex(0)->_param = 1; mq->setParamInt(-1, 1); mq->chain(0); mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_BRD28_GOL), 0, 1); mq->getExCommandByIndex(0)->_x = g_fp->_sceneRect.right + 40; mq->getExCommandByIndex(0)->_y += 20; mq->getExCommandByIndex(0)->_param = 2; mq->setParamInt(-1, 2); mq->chain(0); mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_BRD28_GOL), 0, 1); x = g_fp->_sceneRect.right + 60; } mq->getExCommandByIndex(0)->_x = x; mq->getExCommandByIndex(0)->_y += 40; mq->getExCommandByIndex(0)->_param = 3; mq->setParamInt(-1, 3); mq->chain( 0); g_vars->scene28_beardedDirection = !g_vars->scene28_beardedDirection; } else { if (g_vars->scene28_headDirection) { mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_GLV28_GOR), 0, 1); x = g_fp->_sceneRect.left - 40; } else { mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_GLV28_GOL), 0, 1); x = g_fp->_sceneRect.right + 40; } mq->getExCommandByIndex(0)->_x = x; mq->chain(0); g_vars->scene28_headDirection = !g_vars->scene28_headDirection; } g_vars->scene28_headBeardedFlipper = !g_vars->scene28_headBeardedFlipper; }