コード例 #1
0
LONG CHumanInterface::MCINotifyMode (int iMode)

//	MCIWNDM_NOTIFYMODE
//
//	Notification that MCI playback mode has changed.

	{
	switch (iMode)
		{
		case MCI_MODE_NOT_READY:
			break;

		case MCI_MODE_OPEN:
			break;

		case MCI_MODE_PAUSE:
			break;

		case MCI_MODE_PLAY:
			break;

		case MCI_MODE_RECORD:
			break;

		case MCI_MODE_SEEK:
			break;

		case MCI_MODE_STOP:
			HICommand(CMD_SOUNDTRACK_DONE);
			break;
		}

	return 0;
	}
コード例 #2
0
void CHumanInterface::OnPostCommand (LPARAM pData)

//	OnPostCommand
//
//	Handle a posted command

	{
	SPostCommand *pMsg = (SPostCommand *)pData;
	HICommand(pMsg->sCmd, pMsg->pData);
	delete pMsg;
	}
コード例 #3
0
void IHISession::OnAniCommand (const CString &sID, const CString &sEvent, const CString &sCmd, DWORD dwData)

//	OnAniCommand
//
//	Handle event from reanimator

	{
	SPerformanceEvent Ctx;
	Ctx.sID = sID;
	Ctx.sEvent = sEvent;

	HICommand(sCmd, &Ctx);
	}
コード例 #4
0
void CHumanInterface::HardCrash (const CString &sProgramState)

//	HardCrash
//
//	Report an error

	{
	CString sSessionMessage;
	try
		{
		if (m_pCurSession)
			m_pCurSession->HIReportHardCrash(&sSessionMessage);
		}
	catch (...)
		{
		sSessionMessage = CONSTLIT("Unable to obtain crash report from session.");
		}

	CString sMessage = strPatternSubst(CONSTLIT(
			"Unable to continue due to program error.\r\n\r\n"
			"program state: %s\r\n"
			"%s"
			"\r\n\r\nPlease contact [email protected] with a copy of Debug.log and your save file. "
			"We are sorry for the inconvenience.\r\n"),
			sProgramState,
			sSessionMessage
			);

	kernelDebugLogMessage(sMessage);
	ShowHardCrashSession(CONSTLIT("Transcendence System Crash"), sMessage);

	//	Ask the controller to post a crash report

	CString *pCrashReport = new CString(::kernelGetSessionDebugLog());
	if (HICommand(CONSTLIT("cmdPostCrashReport"), pCrashReport) == ERR_NOTFOUND)
		delete pCrashReport;
	}