コード例 #1
0
bool CTitaniaSpeech::ActMsg(CActMsg *msg) {
	CSetFrameMsg frameMsg;
	CVisibleMsg visibleMsg;
	CActMsg actMsg;

	if (msg->_action == "TitaniaSpeech") {
		switch (_paraNum) {
		case 0:
			movieSetAudioTiming(true);
			loadSound("a#12.wav");
			sleep(1000);
			playMovie(0, 187, MOVIE_GAMESTATE || MOVIE_NOTIFY_OBJECT);
			movieEvent(0);
			break;

		case 1:
			loadSound("a#11.wav");
			addTimer(0);
			startAnimTimer("Para2", 300);
			addTimer(6000);
			addTimer(12000);
			addTimer(18000);
			addTimer(24000);
			startAnimTimer("NextPara", 30000);
			break;

		case 2:
			visibleMsg._visible = false;
			visibleMsg.execute("TitaniaStillControl");
			loadSound("a#10.wav");
			playMovie(585, 706, MOVIE_GAMESTATE || MOVIE_NOTIFY_OBJECT);
			playSound("a#10.wav");
			break;

		case 3:
			visibleMsg._visible = false;
			visibleMsg.execute("TitaniaStillControl");
			loadSound("a#9.wav");
			playMovie(707, 905, MOVIE_GAMESTATE || MOVIE_NOTIFY_OBJECT);
			playSound("a#9.wav");
			break;

		case 4:
			visibleMsg._visible = false;
			visibleMsg.execute("TitaniaStillControl");
			loadSound("a#8.wav");
			playMovie(906, 938, MOVIE_GAMESTATE || MOVIE_NOTIFY_OBJECT);
			playSound("a#8.wav");
			break;

		default:
			sleep(3000);
			actMsg._action = "SleepTitania";
			actMsg.execute(this);
		}
	}

	return true;
}
コード例 #2
0
bool CTitaniaSpeech::MovieEndMsg(CMovieEndMsg *msg) {
	if (_paraNum == 5) {
		startAnimTimer("NextPara", 0);
	} else {
		if (_paraNum != 1)
			addTimer(0);
		startAnimTimer("NextPara", 3000);
	}

	return true;
}
コード例 #3
0
ファイル: bellbot.cpp プロジェクト: 86400/scummvm
bool CBellBot::MovieEndMsg(CMovieEndMsg *msg) {
	if (!(_npcFlags & NPCFLAG_10000)) {
		CTrueTalkNPC::MovieEndMsg(msg);
	} else if (clipExistsByEnd("Walk On", msg->_endFrame)) {
		setPosition(Point(80, 10));
		loadFrame(543);
		_npcFlags |= NPCFLAG_START_IDLING;
		if (_npcFlags & NPCFLAG_40000) {
			startTalking(this, 157);
			_npcFlags &= ~NPCFLAG_40000;
		}

		setTalking(this, true);
		petSetArea(PET_CONVERSATION);
	} else if (clipExistsByEnd("Walk Off", msg->_endFrame)) {
		CPutBotBackInHisBoxMsg boxMsg;
		boxMsg.execute(this);

		if (_npcFlags & NPCFLAG_20000)
			startAnimTimer("SummonDoorbot", 1500);
	} else {
		CTrueTalkNPC::MovieEndMsg(msg);
	}

	return true;
}
コード例 #4
0
ファイル: maitre_d.cpp プロジェクト: Tkachov/scummvm
bool CMaitreD::LoadSuccessMsg(CLoadSuccessMsg *msg) {
	if (_field12C) {
		_timerId = startAnimTimer("MD Fight", 3000 + getRandomNumber(3000));
	}

	return true;
}
コード例 #5
0
ファイル: maitre_d.cpp プロジェクト: Tkachov/scummvm
bool CMaitreD::TrueTalkNotifySpeechEndedMsg(CTrueTalkNotifySpeechEndedMsg *msg) {
	if (_field12C) {
		stopAnimTimer(_timerId);
		_timerId = startAnimTimer("MD Fight", 3000 + getRandomNumber(3000));
	}

	CTrueTalkNPC::TrueTalkNotifySpeechEndedMsg(msg);
	return true;
}
コード例 #6
0
ファイル: maitre_d.cpp プロジェクト: Tkachov/scummvm
bool CMaitreD::TrueTalkTriggerActionMsg(CTrueTalkTriggerActionMsg *msg) {
	if (msg->_action == 8) {
		_field12C = 1;
		stopAnimTimer(_timerId);
		_timerId = startAnimTimer("MD Fight", 3500, 0);
	} else if (msg->_action == 9) {
		stopAnimTimer(_timerId);
		_timerId = 0;
	} else if (msg->_action == 10) {
		_field12C = 0;
		_v1 = 1;
		stopAnimTimer(_timerId);
		_timerId = 0;

		CMaitreDDefeatedMsg defeatedMsg;
		defeatedMsg.execute(findRoom());
	}

	return true;
}
コード例 #7
0
void DIGITAL_prepare(void)
{
  /* Disable clipping. Needed because digital init will draw to a larger number buffer */
  GUI_SetClipRect(NULL);
  
  DIGITAL_init();
  
  /* Set clipping to avoid emWin overwriting frame buffer control signals */
  GUI_SetClipRect(&clipRect); 
  
  frameCounter = 0;
  
  /* Use time for last second. This makes sliding
   * animations look smoother */
  struct tm *time = getTimeMinusOne();
  
  drawWatchFace(time);
  
  startAnimTimer(1000);
}
コード例 #8
0
ファイル: animation.c プロジェクト: AndreMiras/EFM32-Library
void ANIM_prepare(void)
{ 
  startAnimTimer(30);
  curFrame = 0;
}
コード例 #9
0
ファイル: true_talk_npc.cpp プロジェクト: Tkachov/scummvm
bool CTrueTalkNPC::NPCQueueIdleAnimMsg(CNPCQueueIdleAnimMsg *msg) {
	int rndVal = getRandomNumber(_fieldF8 - 1) - (_fieldF8 / 2);
	_speechTimerId = startAnimTimer("NPCIdleAnim", _fieldF4 + rndVal, 0);

	return true;
}
コード例 #10
0
ファイル: doorbot.cpp プロジェクト: 86400/scummvm
bool CDoorbot::MovieEndMsg(CMovieEndMsg *msg) {
	debugC(ERROR_DETAILED, kDebugScripts, "CDoorbot MovieEndMsg flags=%x v=%d, start=%d, end=%d",
		_npcFlags, _introMovieNum, msg->_startFrame, msg->_endFrame);

	if (_npcFlags & NPCFLAG_DOORBOT_INTRO) {
		switch (_introMovieNum) {
		case 3:
			startTalking(this, 221482);
			_introMovieNum = 4;
			break;

		case 6:
			if (clipExistsByEnd("Cloak On", msg->_endFrame)) {
				petShow();
				setState1C(true);
				changeView("ServiceElevator.Node 1.S");
				changeView("ServiceElevator.Node 1.N");
			}
			break;

		case 7:
			startTalking(this, 221467);
			_introMovieNum = 8;
			break;

		case 9:
			startTalking(this, 221468);
			break;

		case 11:
			changeView("ServiceElevator.Node 1.S");
			changeView("MoonEmbLobby.Node 1.NE");
			break;

		default:
			break;
		}

		CTrueTalkNPC::MovieEndMsg(msg);
	} else if (_npcFlags & NPCFLAG_100000) {
		if (clipExistsByEnd("Cloak Off", msg->_endFrame)) {
			_npcFlags = (_npcFlags & ~NPCFLAG_8) | NPCFLAG_START_IDLING;
			setTalking(this, false);
			startTalking(this, 221474);
			_npcFlags |= NPCFLAG_DOORBOT_INTRO;
			_introMovieNum = 0;
		} else if (clipExistsByEnd("Cloak On", msg->_endFrame)) {
			petShow();
			setState1C(true);
			changeView("ServiceElevator.Node 1.S");
		} else {
			CTrueTalkNPC::MovieEndMsg(msg);
		}
	} else if (_npcFlags & NPCFLAG_400000) {
		if (clipExistsByEnd("Whizz On Left", msg->_endFrame)
				|| clipExistsByEnd("Whizz On Right", msg->_endFrame)) {
			setPosition(Point((600 - _bounds.width()) / 2 + 18, 42));
			loadFrame(0);
			setTalking(this, true);
			_npcFlags |= NPCFLAG_START_IDLING;
			petSetArea(PET_CONVERSATION);
		} else if (clipExistsByEnd("Whizz Off Left", msg->_endFrame)
				|| clipExistsByEnd("Whizz Off Right", msg->_endFrame)) {
			CPutBotBackInHisBoxMsg boxMsg;
			boxMsg.execute(this);
			if (_npcFlags & NPCFLAG_4000000)
				startAnimTimer("SummonBellbot", 1500);
		} else {
			CTrueTalkNPC::MovieEndMsg(msg);
		}
	} else {
		CTrueTalkNPC::MovieEndMsg(msg);
	}

	return true;
}