예제 #1
0
Word BURGER_API Burger::GameApp::SwitchVideo(void)
{
	Word uResult = 10;
	// Is switching allowed?
	if (m_bAllowWindowSwitching) {
		// Is there a display class?
		Display *pDisplay = GetDisplay();
		if (pDisplay) {
#if defined(BURGER_WINDOWS)
			static_cast<WindowsApp *>(this)->KillInputFocus();
#endif
			pDisplay->Init(pDisplay->GetWidth(),pDisplay->GetHeight(),pDisplay->GetDepth(),pDisplay->GetFlags()^Display::FULLSCREEN);
#if defined(BURGER_WINDOWS)
			static_cast<WindowsApp *>(this)->GetInputFocus();
#endif
			uResult = 0;
		}
	}
	return uResult;
}
예제 #2
0
void ImageLoader::internalCreate(std::string key, std::string fileName, int x1, int y1, int x2, int y2)
{
	Display* display = Display::Acquire();

	if (x1 < 0)
	{
		x1 = 0;
	}
	if (x2 < 0)
	{
		x2 = display->GetWidth(fileName);
	}	
	if (y1 < 0)
	{
		y1 = 0;
	}	
	if (y2 < 0)
	{
		y2 = display->GetHeight(fileName);
	}

	display->LoadImageFromFile(fileName, key, x1, y1, x2, y2);
}