Пример #1
0
///////////////////////////////////////////////////////////////////////////////////////////////////////////
// 게임 루프
///////////////////////////////////////////////////////////////////////////////////////////////////////////
void Update_Game(void)
{
	timeBeginPeriod(1);

	if (g_bActiveApp)
		KeyProcess();

	Action();

	if (g_FrameSkip.FrameSkip())
	{
		if (g_dwStartTick == 0)	g_dwStartTick = timeGetTime();
		if (timeGetTime() - g_dwStartTick >= 1000)
		{
			if (g_pPlayerObject != NULL)
			{
				HDC hdc = GetDC(g_hWnd);
				WCHAR point[30];
				wsprintf(point, L"%d, %d, %d", g_pPlayerObject->GetCurX(), g_pPlayerObject->GetCurY(),
					g_dwFrameCount);
				TextOut(hdc, 0, 480, point, wcslen(point));
				ReleaseDC(g_hWnd, hdc);
			}
			g_dwFrameCount = 0;
			g_dwStartTick = timeGetTime();
		}
		g_dwFrameCount++;
		Draw();
		g_cScreenDib.DrawBuffer(g_hWnd);
	}

	timeBeginPeriod(1);
}
Пример #2
0
bool bgDInput::Frame()
{
	PreProcess();

	KeyProcess();
	MouseProcess();

	return true;
}