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


C++ StaticANIObject::playIdle方法代码示例

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


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

示例1: global_messageHandler4

int global_messageHandler4(ExCommand *cmd) {
	StaticANIObject *ani = 0;

	switch (cmd->_messageKind) {
	case 18: {
		MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(cmd->_messageNum), cmd->_parId, 0);

		if (cmd->_excFlags & 1)
			mq->_flag1 = 1;
		else
			mq->_flag1 = 0;

		mq->sendNextCommand();
		break;
	}
	case 2:
		if (!g_fp->_currentScene)
			break;

		ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_param);
		if (!ani)
			break;

		ani->trySetMessageQueue(cmd->_messageNum, cmd->_parId);
		break;

	case 1: {
		if (!g_fp->_currentScene)
			break;

		ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_param);
		if (!ani)
			break;

		int flags = cmd->_field_14;
		if (flags <= 0)
			flags = -1;

		if (cmd->_excFlags & 1)
			ani->startAnim(cmd->_messageNum, 0, flags);
		else
			ani->startAnim(cmd->_messageNum, cmd->_parId, flags);

		break;
	}
	case 8:
		if (!g_fp->_currentScene)
			break;

		ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_param);
		if (!ani)
			break;

		ani->startAnimEx(cmd->_messageNum, cmd->_parId, -1, -1);
		break;

	case 20: {
		if (!g_fp->_currentScene)
			break;

		ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_param);
		if (!ani)
			break;

		int flags = cmd->_field_14;
		if (flags <= 0)
			flags = -1;

		ExCommand2 *cmd2 = (ExCommand2 *)cmd;

		if (cmd->_excFlags & 1) {
			ani->startAnimSteps(cmd->_messageNum, 0, cmd->_x, cmd->_y, cmd2->_points, cmd2->_pointsSize, flags);
		} else {
			ani->startAnimSteps(cmd->_messageNum, cmd->_parId, cmd->_x, cmd->_y, cmd2->_points, cmd2->_pointsSize, flags);
		}
		break;
	}
	case 21:
		if (!g_fp->_currentScene)
			break;

		ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_param);
		if (!ani)
			break;

		ani->queueMessageQueue(0);
		ani->playIdle();
		break;
	case 9:
		// Nop in original
		break;
	case 3:
		g_fp->_currentScene->_y = cmd->_messageNum - cmd->_messageNum % g_fp->_scrollSpeed;
		break;

	case 4:
		g_fp->_currentScene->_x = cmd->_messageNum - cmd->_messageNum % g_fp->_scrollSpeed;
		break;

	case 19: {
//.........这里部分代码省略.........
开发者ID:DrItanium,项目名称:scummvm,代码行数:101,代码来源:messagehandlers.cpp


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