//
  // Perform task processing
  //
  Bool UnitAnimate::Process()
  {
    inst.Process(this);  

    // Perform type processing
    GameProcess();

    return (FALSE);
  }
Beispiel #2
0
INT WINAPI wWinMain( HINSTANCE hInst, HINSTANCE, LPWSTR, INT )
{
	_CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | _CRTDBG_LEAK_CHECK_DF);
	//_CrtSetBreakAlloc(196);
	FrameAnimationManager::Init();
	GameInit(512,512);
	if (!EnvInit(GameGetWidth(), GameGetHeight(), GameGetTitle().c_str()))
	{
		MessageBox(NULL, "Init Failed", "Error", MB_OK);
		return 1;
	}
	TextureManager::Init();
	AtlasManager::Init();
	SpriteBatch::Init();
	Time::Start();
	Input::Init();
	EnvSetExitSizeMoveCB(OnExitSizeMove);
	while (EnvHandleSysMessage())
	{
		Time::SampleTime();
		Input::UpdateInput();
		if (!EnvGetProcessEnable()) continue;
		float dt = Time::GetDeltaTime();
		GameProcess(dt);
		int frames = Frame::GetFrameByTime(dt);
		char buf[100] = "";
		sprintf(buf, "frames = %d\n", frames);
		OutputDebugString(buf);
		for(int i = 0; i < frames; ++i)
			GameProcessByFrame();
		GameRender();
	}
	FrameAnimationManager::Uninit();
	Input::Uninit();
	AtlasManager::Uninit();
	TextureManager::Clean();
	SpriteBatch::Uninit();
	EnvUninit();
	GameUninit();
	//_CrtDumpMemoryLeaks();
    return 0;
}
Beispiel #3
0
void wnd_draw()
{

	char tmp[] = "Fps:000 | Marble Match-3 ";
	
	kol_paint_start();

	tmp[4] = '0' + ( (fps/100) % 10 );
	tmp[5] = '0' + ( (fps/10) % 10 );
	tmp[6] = '0' + ( (fps) % 10 );

	kol_wnd_define(100, 100, window_width, window_height, 0x74ddddff, 0x34ddddff, "Heliothryx");
	kol_wnd_caption(tmp);

	GameProcess();

	//kol_btn_define(10, 10, 120, 20, 2, 0xccccee);
	//kol_paint_string(20, 15, "Hello World", 0x902222ff);

	kol_paint_end();

}
//
// Perform task processing
//
Bool UnitExplore::Process()
{
    inst.Process(this);
    GameProcess();
    return (quit);
}