/***************************************************************************/
/** @file       app.h
    @brief      
    @author     shom
****************************************************************************/

#pragma once

namespace app
{
	enum{ g_kFps = 60 };
	enum{ g_kSec = 1000 };

	typedef void (*fnGameInit)( HWND h_wnd, HINSTANCE h_inst );
	typedef void (*fnGameFin)();
	typedef b32  (*fnGameLoopExec)();
	typedef void (*fnGameLoopDraw)();

#ifdef DX	
	void	AppInit( HINSTANCE h_inst, fnGameInit in_fnGameInit, int nCmdShow );
#else	//GL
	void	AppInit( int argc, char *argv[], fnGameFin in_fnGameFin );
#endif
	int		AppFin( fnGameFin in_fnGameFin );
	void	AppLoop( fnGameLoopExec in_fnExec, fnGameLoopDraw in_fnDraw );
	
	void	StopAppLoop();

	u32		GetTimeElapsedOnFrame();
	u32		GetTimeElapsedFromBoot();
}

