本文整理汇总了C++中MessageQueue::addExCommandToEnd方法的典型用法代码示例。如果您正苦于以下问题:C++ MessageQueue::addExCommandToEnd方法的具体用法?C++ MessageQueue::addExCommandToEnd怎么用?C++ MessageQueue::addExCommandToEnd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MessageQueue
的用法示例。
在下文中一共展示了MessageQueue::addExCommandToEnd方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sceneHandler14_showBallMan
void sceneHandler14_showBallMan() {
if (g_vars->scene14_flyingBall) {
g_vars->scene14_flyingBall->show1(g_vars->scene14_dudeX - 166, g_vars->scene14_dudeY + 40, MV_BAL14_TOGMA, 0);
g_vars->scene14_flyingBall->_priority = 27;
MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
ExCommand *ex = new ExCommand(ANI_BALL14, 1, MV_BAL14_TOGMA, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = g_vars->scene14_flyingBall->_okeyCode;
ex->_excFlags |= 2;
ex->_field_24 = 1;
mq->addExCommandToEnd(ex);
ex = new ExCommand(ANI_BALL14, 6, 0, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = g_vars->scene14_flyingBall->_okeyCode;
ex->_excFlags |= 3;
mq->addExCommandToEnd(ex);
mq->chain(0);
g_vars->scene14_flyingBall->startAnim(MV_BAL14_TOGMA, 0, -1);
g_vars->scene14_balls.push_back(g_vars->scene14_flyingBall);
g_vars->scene14_flyingBall = 0;
if (g_vars->scene14_dudeX >= 1300)
sceneHandler14_exitScene();
}
}
示例2: sceneHandler27_batLogic
void sceneHandler27_batLogic() {
if (g_vars->scene27_balls.size()) {
g_vars->scene27_bat = g_vars->scene27_balls[0];
g_vars->scene27_balls.remove_at(0);
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()->activate();
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;
}
}
示例3: sceneHandler14_arcadeLogic
void sceneHandler14_arcadeLogic() {
g_vars->scene14_flyingBall->stopAnim_maybe();
g_vars->scene14_flyingBall->hide();
if (g_vars->scene14_dudeIsKicking)
sceneHandler14_clearCallback();
if (g_vars->scene14_hitsLeft <= 1) {
setInputDisabled(1);
sceneHandler14_clearCallback();
g_vars->scene14_dudeCanKick = false;
g_fp->_aniMan2 = 0;
chainQueue(QU_SC14_WINARCADE, 1);
--g_vars->scene14_hitsLeft;
} else {
ExCommand *ex;
g_vars->scene14_grandma->changeStatics2(ST_GMA_SIT);
if (g_vars->scene14_hitsLeft != 3 || g_vars->scene14_pink) {
MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
ex = new ExCommand(ANI_GRANDMA, 1, MV_GMA_BACKOFF, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags |= 2;
mq->addExCommandToEnd(ex);
ex = new ExCommand(ANI_GRANDMA, 1, MV_GMA_THROW, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags |= 2;
mq->addExCommandToEnd(ex);
mq->chain(0);
} else {
MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
ex = new ExCommand(ANI_GRANDMA, 1, MV_GMA_BACKOFF2, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags |= 2;
mq->addExCommandToEnd(ex);
ex = new ExCommand(ANI_GRANDMA, 1, MV_GMA_THROW, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags |= 2;
mq->addExCommandToEnd(ex);
mq->chain(0);
}
sceneHandler14_grandmaStepForward();
--g_vars->scene14_hitsLeft;
}
}
示例4: sceneHandler14_grandmaThrow
void sceneHandler14_grandmaThrow() {
g_vars->scene14_grandma->changeStatics2(ST_GMA_SIT);
MessageQueue *mq = new MessageQueue;
ExCommand *ex = new ExCommand(ANI_GRANDMA, 2, 30, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags |= 2;
mq->addExCommandToEnd(ex);
ex = new ExCommand(ANI_GRANDMA, 1, MV_GMA_THROW, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags |= 2;
mq->addExCommandToEnd(ex);
mq->chain(0);
}
示例5: sceneHandler29_manHit
void sceneHandler29_manHit() {
MGMInfo mgminfo;
g_vars->scene29_var15 = 1;
g_fp->_aniMan->changeStatics2(ST_MAN29_RUNR);
g_fp->_aniMan->setOXY(g_vars->scene29_var20, g_vars->scene29_var21);
mgminfo.ani = g_fp->_aniMan;
mgminfo.staticsId2 = ST_MAN29_SITR;
mgminfo.y1 = 463;
mgminfo.x1 = g_vars->scene29_var20 <= 638 ? 351 : 0;
mgminfo.field_1C = 10;
mgminfo.field_10 = 1;
mgminfo.flags = (g_vars->scene29_var20 <= 638 ? 2 : 0) | 0x44;
mgminfo.movementId = MV_MAN29_HIT;
MessageQueue *mq = g_vars->scene29_mgm.genMovement(&mgminfo);
ExCommand *ex;
if (mq) {
if (g_vars->scene29_var20 <= 638) {
ex = new ExCommand(ANI_MAN, 1, MV_MAN29_STANDUP_NORM, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags = 2;
ex->_keyCode = g_fp->_aniMan->_okeyCode;
mq->addExCommandToEnd(ex);
ex = new ExCommand(0, 17, MSG_SC29_STOPRIDE, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags = 2;
mq->addExCommandToEnd(ex);
g_vars->scene29_var09 = 0;
g_vars->scene29_var10 = 0;
g_vars->scene29_var11 = 0;
g_vars->scene29_var12 = 0;
} else {
ex = new ExCommand(ANI_MAN, 1, MV_MAN29_STANDUP, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags = 2;
ex->_keyCode = g_fp->_aniMan->_okeyCode;
mq->addExCommandToEnd(ex);
}
mq->setFlags(mq->getFlags() | 1);
if (!mq->chain(g_fp->_aniMan))
delete mq;
}
}
示例6: sceneHandler29_manHit
void sceneHandler29_manHit() {
MGMInfo mgminfo;
g_vars->scene29_manIsHit = true;
g_fp->_aniMan->changeStatics2(ST_MAN29_RUNR);
g_fp->_aniMan->setOXY(g_vars->scene29_manX, g_vars->scene29_manY);
mgminfo.ani = g_fp->_aniMan;
mgminfo.staticsId2 = ST_MAN29_SITR;
mgminfo.y1 = 463;
mgminfo.x1 = g_vars->scene29_manX <= 638 ? 351 : 0;
mgminfo.field_1C = 10;
mgminfo.field_10 = 1;
mgminfo.flags = (g_vars->scene29_manX <= 638 ? 2 : 0) | 0x44;
mgminfo.movementId = MV_MAN29_HIT;
MessageQueue *mq = g_vars->scene29_mgm.genMovement(&mgminfo);
ExCommand *ex;
if (mq) {
if (g_vars->scene29_manX <= 638) {
ex = new ExCommand(ANI_MAN, 1, MV_MAN29_STANDUP_NORM, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags = 2;
ex->_keyCode = g_fp->_aniMan->_okeyCode;
mq->addExCommandToEnd(ex);
ex = new ExCommand(0, 17, MSG_SC29_STOPRIDE, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags = 2;
mq->addExCommandToEnd(ex);
g_vars->scene29_manIsRiding = false;
g_vars->scene29_arcadeIsOn = false;
g_vars->scene29_reachedFarRight = false;
g_vars->scene29_rideBackEnabled = false;
} else {
ex = new ExCommand(ANI_MAN, 1, MV_MAN29_STANDUP, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags = 2;
ex->_keyCode = g_fp->_aniMan->_okeyCode;
mq->addExCommandToEnd(ex);
}
mq->setFlags(mq->getFlags() | 1);
if (!mq->chain(g_fp->_aniMan))
delete mq;
}
}
示例7: sceneHandler26_clickVent
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;
}
示例8: sceneHandler10_clickGum
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);
}
}
}
示例9: sceneHandler11_jumpOver
void sceneHandler11_jumpOver(double angle) {
MGMInfo mgminfo;
sceneHandler11_emptySwing();
g_fp->_aniMan->show1(690 - (int)(sin(g_vars->scene11_swingAngle) * -267.0), 215 - (int)(cos(g_vars->scene11_swingAngle) * -267.0),
MV_MAN11_JUMPOVER, 0);
g_fp->_aniMan->_priority = 0;
mgminfo.staticsId2 = ST_MAN_1PIX;
mgminfo.ani = g_fp->_aniMan;
mgminfo.x1 = 1163;
mgminfo.y1 = 837 - (int)(angle * 153.0);
mgminfo.field_1C = 0;
mgminfo.field_10 = 1;
mgminfo.flags = 78;
mgminfo.movementId = MV_MAN11_JUMPOVER;
MessageQueue *mq = g_vars->scene11_mgm.genMovement(&mgminfo);
if (mq) {
g_vars->scene11_crySound = SND_11_022;
ExCommand *ex = new ExCommand(0, 17, MSG_SC11_RESTARTMAN, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags = 2;
mq->addExCommandToEnd(ex);
if (!mq->chain(g_fp->_aniMan))
delete mq;
}
}
示例10: sceneHandler28_clickLift
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;
}
}
}
示例11: sceneHandler11_jumpHitAndWin
void sceneHandler11_jumpHitAndWin() {
MGMInfo mgminfo;
sceneHandler11_emptySwing();
g_fp->_aniMan->show1(690 - (int)(sin(g_vars->scene11_swingAngle) * -267.0), 215 - (int)(cos(g_vars->scene11_swingAngle) * -267.0),
MV_MAN11_JUMPHIT, 0);
g_fp->_aniMan->_priority = 10;
mgminfo.field_1C = 10;
mgminfo.ani = g_fp->_aniMan;
mgminfo.staticsId2 = ST_MAN_1PIX;
mgminfo.x1 = 1400;
mgminfo.y1 = 0;
mgminfo.field_10 = 1;
mgminfo.flags = 66;
mgminfo.movementId = MV_MAN11_JUMPHIT;
MessageQueue *mq = g_vars->scene11_mgm.genMovement(&mgminfo);
if (mq) {
g_vars->scene11_crySound = SND_11_024;
ExCommand *ex = new ExCommand(ANI_MAN, 2, 36, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = -1;
ex->_excFlags = 2;
mq->addExCommandToEnd(ex);
ex = new ExCommand(SC_11, 17, 61, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = TrubaRight;
ex->_excFlags = 3;
mq->addExCommandToEnd(ex);
if (!mq->chain(g_fp->_aniMan))
delete mq;
if (g_fp->getObjectState(sO_Swingie) == g_fp->getObjectEnumState(sO_Swingie, sO_IsStandingInCorner))
g_fp->setObjectState(sO_Swingie, g_fp->getObjectEnumState(sO_Swingie, sO_IsSitting));
g_fp->setObjectState(sO_DudeHasJumped, g_fp->getObjectEnumState(sO_DudeHasJumped, sO_Yes));
}
}
示例12: sceneHandler29_clickPorter
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();
}
}
}
示例13: sceneHandler16_drink
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);
}
}
}
}
}
}
示例14: sceneHandler08_jumpOff
void sceneHandler08_jumpOff(ExCommand *cmd) {
MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
mq->addExCommandToEnd(cmd->createClone());
mq->setFlags(mq->getFlags() | 1);
g_fp->_globalMessageQueueList->addMessageQueue(mq);
g_fp->_aniMan->startAnim(MV_MAN8_JUMPOFF, mq->_id, -1);
sceneHandler08_finishArcade();
}
示例15: sceneHandler14_showBallGrandmaHit
void sceneHandler14_showBallGrandmaHit() {
if (g_vars->scene14_flyingBall) {
g_vars->scene14_flyingBall->show1(g_vars->scene14_grandmaX + 190, g_vars->scene14_grandmaY + 56, MV_BAL14_TOGMA, 0);
g_vars->scene14_flyingBall->_priority = 27;
MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
ExCommand *ex = new ExCommand(ANI_BALL14, 1, MV_BAL14_TOGMA, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = g_vars->scene14_flyingBall->_okeyCode;
ex->_excFlags |= 2;
ex->_field_24 = 1;
mq->addExCommandToEnd(ex);
ex = new ExCommand(ANI_BALL14, 6, 0, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = g_vars->scene14_flyingBall->_okeyCode;
ex->_excFlags |= 3;
mq->addExCommandToEnd(ex);
mq->chain(0);
g_vars->scene14_balls.push_back(g_vars->scene14_flyingBall);
g_vars->scene14_flyingBall = 0;
}
}