int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { TestApp* tApp = new TestApp(hInstance); if(!tApp->Init()) return 1; return tApp->Run(); }
void Test::Run() { m_result = true; try { TestApp* app = new TestApp; Punk::Config cfg; cfg.gpu_config.view_width = 800; cfg.gpu_config.view_height = 600; app->Init(cfg); System::Mouse::Instance()->LockInWindow(false); app->Run(); delete app; } catch(System::PunkException& e) { out_error() << e.ToString() << std::endl; m_result = false; } catch(...) { m_result = false; } }