Exemplo n.º 1
0
/*
  Short main as most is done in classes.
*/
int main(int argc, char *argv[])
{
	CApp APP;

	if ( !APP.init(argc, argv) )
	{
		printf("init failed\n");
		APP.quit();
		return 1;
	}

	APP.setRunning(true);

	/*
		main application loop
	*/
	while(APP.isRunning())
	{
		if ( !APP.update() )
			break;
	}

	APP.quit();

	return 0;
}
Exemplo n.º 2
0
/*
  A very short main as we do everything else in classes.
*/
int main(int argc, char *argv[])
{
	CApp APP;

	if ( !APP.init(argc, argv) )
	{
		printf("init failed\n");
		return 1;
	}

	APP.run();
	APP.quit();

	return 0;
}
Exemplo n.º 3
0
int main()
{
    CConfig *cfg = new CConfig(L"../system/config.xml");
    if(!cfg->load())
    {
        std::cerr << "Can't read XML file" << std::endl;
        return 1;
    }

    CApp *app = new CApp();
    if(!app->init(cfg->getParam(), cfg->getConfig(L"title"),
                  cfg->getBool(L"resize")) )
    {
        std::cerr << "Could not init device." << std::endl;
        return 1;
    }
    app->loop();
    delete app;
    return 0;
}