示例#1
0
void BaseScene::RunFrame() {
	FrameStart();
	HandleEvents();
	Update();
	Render(screen);
	SDL_Flip(screen);
	FrameEnd();
}
示例#2
0
LRESULT CGameApp::Run()
{	//游戏的主循环
	MSG msg;
	memset(&msg,0,sizeof(msg));
	while(msg.message!=WM_QUIT)
	{	
		if (PeekMessage(&msg,NULL,0,0,PM_REMOVE))
		{
			TranslateMessage( &msg );
			DispatchMessage( &msg );
		}
		else
		{
			FrameStart();
			Render();
			FrameEnd();				
		}
	}
	UnregisterClass(m_szClassName, m_hInstance);
	return msg.wParam;
}
示例#3
0
void BaseScene::RunFrame() {
	FrameStart();
	ProcessEvents();
	Update();
	FrameEnd();
}
示例#4
0
void BaseScene::RunFrame(double delta) {
	FrameStart();
	HandleEvents();
	Update(delta);
	FrameEnd();
}