예제 #1
0
void CGameManager::playClip(CMovieClip *clip, CRoomItem *oldRoom, CRoomItem *newRoom) {
	if (oldRoom != newRoom || newRoom != _movieRoom || !_movie)
		roomTransition(oldRoom, newRoom);

	if (clip && clip->_startFrame != clip->_endFrame && _movie) {
		// Clip details specifying a sub-section of movie to play
		Rect tempRect(20, 10, SCREEN_WIDTH - 20, 350);

		lockInputHandler();
		CScreenManager::_screenManagerPtr->_mouseCursor->hide();
		_movie->playCutscene(tempRect, clip->_startFrame, clip->_endFrame);
		CScreenManager::_screenManagerPtr->_mouseCursor->show();
		unlockInputHandler();
	}
}
예제 #2
0
파일: doorbot.cpp 프로젝트: 86400/scummvm
bool CDoorbot::TimerMsg(CTimerMsg *msg) {
	if (msg->_action == "NPCIdleAnim") {
		return CTrueTalkNPC::TimerMsg(msg);
	} else if (_npcFlags & NPCFLAG_DOORBOT_INTRO) {
		_timerId = 0;

		switch (msg->_actionVal) {
		case 0:
			startTalking(this, 221475);
			break;

		case 1:
			startTalking(this, 221476);
			break;

		case 2:
			startTalking(this, 221477);
			break;

		case 3:
			playClip("DoubleTake Start");
			playClip("DoubleTake End");
			playClip("DoubleTake Start");
			playClip("DoubleTake End", MOVIE_NOTIFY_OBJECT);
			_introMovieNum = 3;
			break;

		case 4:
			startTalking(this, 221483);
			lockInputHandler();
			_field114 = true;
			break;

		case 5:
			lockInputHandler();
			mouseDisableControl();
			_field114 = true;
			startTalking(this, 221485);
			break;

		case 6:
			// Start dragging photograph to PET
			CMouseButtonDownMsg::generate();
			mouseSetPosition(Point(200, 430), 2500);
			_timerId = addTimer(7, 2500, 0);
			break;

		case 7:
			// Drop photograph in PET
			CMouseButtonUpMsg::generate();
			startTalking(this, 221486);
			mouseEnableControl();
			unlockInputHandler();
			_field114 = false;
			disableMouse();
			break;

		default:
			break;
		}
	} else if (msg->_action == "SummonBellbot") {
		CRoomItem *room = getRoom();
		if (room) {
			CSummonBotMsg botMsg;
			botMsg._npcName = "Bellbot";
			botMsg.execute(room);
		}

		_npcFlags &= ~NPCFLAG_4000000;
	}

	return true;
}