コード例 #1
0
ファイル: parrot.cpp プロジェクト: a-detiste/scummvm
bool CParrot::EnterViewMsg(CEnterViewMsg *msg) {
	static const char *const NAMES[] = {
		"Talking0", "Talking1", "Talking2", "Talking3", "Talking4",
		"Talking5", "Talking6", "Talking7", nullptr
	};

	if (!_v4) {
		setPosition(Point(_field124, _bounds.top));
		_field118 = 1;
		_npcFlags &= ~(NPCFLAG_10000  |  NPCFLAG_20000  |  NPCFLAG_40000  |  NPCFLAG_80000  |  NPCFLAG_100000  |  NPCFLAG_200000  |  NPCFLAG_400000);
		loadFrame(0);
		endTalking(this, true, findView());

		if (_speechCounter > 0) {
			playRandomClip(NAMES, MOVIE_NOTIFY_OBJECT);
		} else {
			startTalking(this, 280258, findView());
		}

		petSetArea(PET_CONVERSATION);
		_field12C = 0;
		_npcFlags |= NPCFLAG_START_IDLING;
	}

	return true;
}
コード例 #2
0
ファイル: maitre_d.cpp プロジェクト: Tkachov/scummvm
bool CMaitreD::EnterViewMsg(CEnterViewMsg *msg) {
	endTalking(this, true, findView());
	_field12C = _field134;

	if (_string3 == "STMusic" && (!_field11C || _string2 == _string3))
		return true;

	if (_string3.contains("nasty ambient"))
		startTalking(this, 111, findView());
	else if (!CMusicRoom::_musicHandler->checkSound(1))
		startTalking(this, 114, findView());
	else if (!CMusicRoom::_musicHandler->checkSound(3))
		startTalking(this, 113, findView());
	else if (!CMusicRoom::_musicHandler->checkSound(2))
		startTalking(this, 115, findView());
	else {
		startTalking(this, 110, findView());
		CMaitreDHappyMsg happyMsg;
		happyMsg.execute("MaitreD Left Arm");
		happyMsg.execute("MaitreD Right Arm");
	}

	return true;
}