当前位置: 首页>>代码示例>>C++>>正文


C++ MessageQueue::setFlags方法代码示例

本文整理汇总了C++中MessageQueue::setFlags方法的典型用法代码示例。如果您正苦于以下问题:C++ MessageQueue::setFlags方法的具体用法?C++ MessageQueue::setFlags怎么用?C++ MessageQueue::setFlags使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MessageQueue的用法示例。


在下文中一共展示了MessageQueue::setFlags方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: 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);
					}
				}
			}
		}
	}
}
开发者ID:Cruel,项目名称:scummvm,代码行数:53,代码来源:scene16.cpp

示例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;
    }
}
开发者ID:BenCastricum,项目名称:scummvm,代码行数:57,代码来源:scene27.cpp

示例3: sceneHandler26_animateVents

void sceneHandler26_animateVents(StaticANIObject *ani) {
    int qId = 0;

    switch (ani->_okeyCode) {
    case 0:
        if (g_fp->getObjectState(sO_Valve1_26) == g_fp->getObjectEnumState(sO_Valve1_26, sO_Closed))
            qId = QU_SC26_OPEN1;
        else
            qId = QU_SC26_CLOSE1;

        break;

    case 1:
        if (g_fp->getObjectState(sO_Valve2_26) == g_fp->getObjectEnumState(sO_Valve2_26, sO_Closed))
            qId = QU_SC26_OPEN2;
        else
            qId = QU_SC26_CLOSE2;

        break;

    case 2:
        if (g_fp->getObjectState(sO_Valve3_26) == g_fp->getObjectEnumState(sO_Valve3_26, sO_Closed))
            qId = QU_SC26_OPEN3;
        else
            qId = QU_SC26_CLOSE3;

        break;

    case 3:
        if (g_fp->getObjectState(sO_Valve4_26) == g_fp->getObjectEnumState(sO_Valve4_26, sO_Closed))
            qId = QU_SC26_OPEN4;
        else
            qId = QU_SC26_CLOSE4;

        break;

    case 4:
        if (g_fp->getObjectState(sO_Valve5_26) == g_fp->getObjectEnumState(sO_Valve5_26, sO_Closed))
            qId = QU_SC26_OPEN5;
        else
            qId = QU_SC26_CLOSE5;

        break;

    default:
        return;
    }

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

        mq->setFlags(mq->getFlags() | 1);
        mq->chain(0);
    }
}
开发者ID:KitoHo,项目名称:scummvm,代码行数:55,代码来源:scene26.cpp

示例4: 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();
}
开发者ID:33d,项目名称:scummvm,代码行数:12,代码来源:scene08.cpp

示例5: sceneHandler11_hitMan

void sceneHandler11_hitMan() {
	if (g_fp->_aniMan->_ox > 345 && g_fp->_aniMan->_ox < 355) {
		g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT);

		MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC11_MANFALL), 0, 0);

		mq->setFlags(mq->getFlags() | 1);
		if (!mq->chain(g_fp->_aniMan))
			delete mq;

		getCurrSceneSc2MotionController()->replaceNodeX(353, 303);
	}
}
开发者ID:Cruel,项目名称:scummvm,代码行数:13,代码来源:scene11.cpp

示例6: sceneHandler16_startLaugh

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->replaceKeyCode(-1, girl->_okeyCode);
	mq->setFlags(mq->getFlags() | 1);
	mq->chain(0);

	g_fp->getGameLoaderGameVar()->getSubVarByName("OBJSTATES")->setSubVarAsInt(sO_DudeSwinged, 0);

	g_vars->scene16_girlIsLaughing = true;
}
开发者ID:Cruel,项目名称:scummvm,代码行数:15,代码来源:scene16.cpp

示例7: 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;
	}
}
开发者ID:Cruel,项目名称:scummvm,代码行数:48,代码来源:scene29.cpp

示例8: 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;
	}
}
开发者ID:subr3v,项目名称:scummvm,代码行数:48,代码来源:scene29.cpp

示例9: sceneHandler14_arcadeProcessClick

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;
}
开发者ID:Cruel,项目名称:scummvm,代码行数:47,代码来源:scene14.cpp

示例10: sceneHandler32_ladderLogic

void sceneHandler32_ladderLogic(ExCommand *cmd) {
	MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC32_FROMLADDER), 0, 0);

	if (g_fp->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY) != PIC_SC32_LADDER)
		mq->addExCommandToEnd(cmd->createClone());

	mq->setFlags(mq->getFlags() | 1);

	g_fp->_aniMan->changeStatics2(ST_MAN_STANDLADDER);
	if (!mq->chain(g_fp->_aniMan))
		delete mq;

	g_vars->scene32_dudeOnLadder = false;

	getCurrSceneSc2MotionController()->activate();
	getGameLoaderInteractionController()->enableFlag24();
}
开发者ID:OmerMor,项目名称:scummvm,代码行数:17,代码来源:scene32.cpp

示例11: sceneHandler11_swingieJumpDown

void sceneHandler11_swingieJumpDown() {
    MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SWR_JUMPDOWN), 0, 0);

	mq->setFlags(mq->getFlags() | 1);

	if (!mq->chain(g_vars->scene11_swingie))
		delete mq;

	g_vars->scene11_swingIsSwinging = false;
	g_vars->scene11_swingieStands = true;
	g_vars->scene11_swingieScreenEdge = g_fp->_sceneRect.left;

	getCurrSceneSc2MotionController()->enableLinks(sO_CloseThing1, 0);
	getCurrSceneSc2MotionController()->enableLinks(sO_CloseThing2, 1);
	getCurrSceneSc2MotionController()->enableLinks(sO_CloseThing3, 0);

	getCurrSceneSc2MotionController()->replaceNodeX(905, 805);
}
开发者ID:Cruel,项目名称:scummvm,代码行数:18,代码来源:scene11.cpp

示例12: sceneHandler08_badLuck

void sceneHandler08_badLuck() {
	g_fp->_currentScene->getPictureObjectById(PIC_SC8_LADDER, 0)->_flags &= 0xFFFB;

	g_fp->_aniMan->changeStatics2(ST_MAN8_HANDSUP);
	g_fp->_aniMan->setOXY(376, 280);
	g_fp->_aniMan->_priority = 10;

	MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());

	ExCommand *ex = new ExCommand(g_fp->_aniMan->_id, 1, MV_MAN8_BADLUCK, 0, 0, 0, 1, 0, 0, 0);
	ex->_excFlags |= 2;
	ex->_keyCode = g_fp->_aniMan->_okeyCode;
	mq->addExCommandToEnd(ex);

	mq->setFlags(mq->getFlags() | 1);
	mq->chain(0);

	g_fp->setObjectState(sO_StairsUp_8, g_fp->getObjectEnumState(sO_StairsUp_8, sO_NotBroken));

	g_vars->scene08_inAir = false;
}
开发者ID:33d,项目名称:scummvm,代码行数:21,代码来源:scene08.cpp

示例13: sceneHandler11_jumpFromSwing

void sceneHandler11_jumpFromSwing() {
	g_vars->scene11_arcadeIsOn = false;
	g_vars->scene11_hint->_flags &= 0xFFFB;
	g_vars->scene11_scrollIsEnabled = false;

	getCurrSceneSc2MotionController()->activate();
	getGameLoaderInteractionController()->enableFlag24();

	g_vars->scene11_swingOldAngle = 0.0;
	g_vars->scene11_swingAngleDiff = 0.0;
	g_vars->scene11_swingSpeed = 0.0;
	g_vars->scene11_swingAngle = 0.0;

	g_vars->scene11_dudeOnSwing = g_fp->_currentScene->getStaticANIObject1ById(ANI_MAN11, -1);
	g_vars->scene11_dudeOnSwing->_flags &= 0xFFFB;
	g_vars->scene11_dudeOnSwing = g_fp->_currentScene->getStaticANIObject1ById(ANI_KACHELI, -1);
	g_vars->scene11_dudeOnSwing->changeStatics2(ST_KCH_STATIC);
	g_vars->scene11_dudeOnSwing->setOXY(691, 371);
	g_vars->scene11_dudeOnSwing->_priority = 20;
	g_vars->scene11_dudeOnSwing->_flags |= 4;

    MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
    ExCommand *ex = new ExCommand(g_fp->_aniMan->_id, 34, 256, 0, 0, 0, 1, 0, 0, 0);
	ex->_field_14 = 256;
	ex->_messageNum = 0;
	ex->_excFlags |= 3;
	mq->addExCommandToEnd(ex);
	mq->setFlags(mq->getFlags() | 1);

	g_fp->_globalMessageQueueList->addMessageQueue(mq);

	g_fp->_aniMan->_flags |= 0x104;
	g_fp->_aniMan->changeStatics2(ST_MAN11_SWING);
	g_fp->_aniMan->setOXY(685, 373);
	g_fp->_aniMan->startAnim(MV_MAN11_JUMPFROMSWING, mq->_id, -1);

	g_fp->_aniMan2 = g_fp->_aniMan;
}
开发者ID:Cruel,项目名称:scummvm,代码行数:38,代码来源:scene11.cpp

示例14: sceneHandler35_startFlow

void sceneHandler35_startFlow() {
    if (g_fp->getObjectState(sO_Valve_35) == g_fp->getObjectEnumState(sO_Valve_35, sO_TurnedOn)) {
        if ((g_vars->scene35_hose->_flags & 4) && g_vars->scene35_hose->_statics->_staticsId == ST_HZE_NORM) {
            g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene35_bellyInflater, ST_PDV_SMALL, QU_PDV_SML_BLINK, 0);
            g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene35_bellyInflater, ST_PDV_SMALL, QU_PDV_SML_TRY, 0);

            g_vars->scene35_bellyInflater->changeStatics2(ST_PDV_SMALL);
            g_vars->scene35_bellyInflater->_flags &= 0xFEFF;

            MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC35_EATHOZE), 0, 0);

            mq->setFlags(mq->getFlags() | 1);

            ExCommand *cmd = new ExCommand(g_vars->scene35_bellyInflater->_id, 34, 256, 0, 0, 0, 1, 0, 0, 0);

            cmd->_excFlags |= 3;
            cmd->_field_14 = 256;
            cmd->_messageNum = 0;

            mq->addExCommandToEnd(cmd);

            if (!mq->chain(g_vars->scene35_bellyInflater))
                delete mq;

            g_vars->scene35_bellyInflater->_flags |= 1;

            getCurrSceneSc2MotionController()->enableLinks(sO_CloseThing, 1);

            g_fp->playSound(SND_35_012, 1);
        } else {
            if (!g_vars->scene35_flowCounter)
                g_vars->scene35_flowCounter = 98;

            g_fp->playSound(SND_35_011, 1);
        }
    }
}
开发者ID:lousyphreak,项目名称:scummvm,代码行数:37,代码来源:scene35.cpp

示例15: sceneHandler25_isOnLadder

bool sceneHandler25_isOnLadder(ExCommand *cmd) {
	if ((g_fp->_aniMan->_movement && g_fp->_aniMan->_movement->_id == MV_MAN_GOLADDERDOWN)
		|| g_fp->_aniMan->_statics->_staticsId == ST_MAN_GOLADDERD) {
		Interaction *inter = getGameLoaderInteractionController()->getInteractionByObjectIds(PIC_SC25_LADDERDOWN, ANI_MAN, cmd->_keyCode);

		if (!inter)
			return 0;

		MessageQueue *mq = new MessageQueue(inter->_messageQueue, 0, 1);
		PictureObject *pic = g_fp->_currentScene->getPictureObjectById(PIC_SC25_LADDERDOWN, 0);
		Common::Point point;

		point.x = inter->_xOffs + pic->_ox;
		point.y = inter->_yOffs + pic->_oy;

		mq->setFlags(mq->getFlags() | 1);

		sceneHandler25_walkOnLadder(g_fp->_aniMan, &point, mq, 0);

		return true;
	} else {
		return false;
	}
}
开发者ID:AlbanBedel,项目名称:scummvm,代码行数:24,代码来源:scene25.cpp


注:本文中的MessageQueue::setFlags方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。