Пример #1
0
void CHumanInterface::OnAnimate (void)

//	OnAnimate
//
//	Paint an animation frame

	{
	if (m_pCurSession)
		{
		bool bCrash = false;

		try
			{
			m_pCurSession->HIAnimate(GetScreen());
			}
		catch (...)
			{
			bCrash = true;
			}

		//	If we crashed, report it

		if (bCrash)
			HardCrash(CONSTLIT("animating"));
		}
	else
		{
		GetScreen().Fill(0, 0, GetScreen().GetWidth(), GetScreen().GetHeight(), CG16bitImage::RGBValue(0, 0, 0));
		BltScreen();
		FlipScreen();
		}
	}
Пример #2
0
void CHumanInterface::OnAnimate (void)

//	OnAnimate
//
//	Paint an animation frame

	{
	int i;

	//	If minimized, bail out

	if (m_ScreenMgr.IsMinimized())
		return;

	//	DirectDraw

	if (!m_ScreenMgr.CheckIsReady())
		return;

	//	Paint the current session

	if (m_pCurSession)
		{
		bool bCrash = false;

		try
			{
			//	Paint the background sessions

			for (i = 0; i < m_BackgroundSessions.GetCount(); i++)
				m_BackgroundSessions[i]->HIAnimate(GetScreen(), false);

			//	Paint the current session

			m_pCurSession->HIAnimate(GetScreen(), true);
			}
		catch (...)
			{
			bCrash = true;
			}

		//	If we crashed, report it

		if (bCrash)
			HardCrash(CONSTLIT("OnAnimate"));
		}
	else
		{
		GetScreen().Fill(0, 0, GetScreen().GetWidth(), GetScreen().GetHeight(), CG16bitImage::RGBValue(0, 0, 0));
		BltScreen();
		FlipScreen();
		}
	}