示例#1
0
int     main() /** no params because they're not used */
{
    // Acronyms acr;
    // AcronymsInit(&acr);
    // acr.activate(&acr, (e_acronyms)4);
    // acr.activate(&acr, (e_acronyms)5);
    // acr.activate(&acr, (e_acronyms)1);
    // acr.activate(&acr, (e_acronyms)0);
    // for (int i = 0; i < 12; i++)
    // {
    //     std::cout << "[" << i << "] " << acr.names[i] << " = ";
    //     std::cout << (acr.selected[i] ? "(true)" : "(false)") << std::endl;
    // }
    // std::cout << acr.ToString(&acr) << std::endl;
    // std::cout << acr.CSVFormatter(&acr) << std::endl;
    // std::cout << acr.CountSelected(&acr) << std::endl;
    // std::cout << acr << std::endl;

    Application app;

    //todo();

    AppInit(&app); /** initialisation of the `app` structure and reading data from file*/
    app.Start(&app); /** start of the inifinite loop in the function `loop` */
    app.Loop(&app); /** execution of the infinite loop */

    AppDestroy(&app); /** cleaning of the structure and saving data */
    return (EXIT_SUCCESS);
}
示例#2
0
文件: main.cpp 项目: matg94/Portfolio
int main(int argc, char *argv[])
{
	Application app;
	app.Initialize();

	while (!app.quit) {

		app.GameInput();
		if (app.GameManager->MainGame) {
			app.Loop();
		}
		else if (app.GameManager->EndMenu) {
			app.DeathScreen();
		}
		else if (app.GameManager->MainMenu) {
			app.MainMenu();
		}

	}

	SDL_Quit();
	return 0;
}