Esempio 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;
}
Esempio n. 2
0
int main(int argc, char** argv) {
    // Initialize
    CApp Client;
    Client.bRunning = Client.initializeSDL();
    
    
    // Main loop
    int i = 0;
    
    while ( Client.bRunning ) {
        Client.update();
        SDL_Delay( 20 );
        
        i++;
        if ( i > 100 ) {
            Client.bRunning = false;
        }
    }
    
    
    // Close
    Client.shutdown();
    
    return 0;
}