Exemple #1
0
//
// Begin the frontend miniloop preceding main game execution.
//
void FE_StartFrontend(void)
{
    // initialize
    FE_Init();

    while(!frontend_done)
    {
        FE_UpdateTics();

        // get input
        FE_Responder();

        // run ticks
        FE_Ticker();

        // render
        FE_Drawer();

        // update sounds
        S_UpdateSounds(NULL);

        // framerate
        while(FE_CapFrameRate());
    }

    // shutdown
    FE_Shutdown();
}
Exemple #2
0
int eb_open_subsystems(void)
{
	if(SDL_Init(SDL_INIT_AUDIO | SDL_INIT_VIDEO
#ifndef _WIN32
			| SDL_INIT_EVENTTHREAD
#endif
#ifdef DEBUG
			| SDL_INIT_NOPARACHUTE
#endif
			) == 0)
	{
		if(FE_Init() == 0)
		{
			if(SDLNet_Init() == 0)
			{
				if(NET2_Init() == 0)
					return 0;
				fprintf(stderr, "EELBox: Could not initialize"
						" Net2!\n");
				SDLNet_Quit();
			}
			fprintf(stderr, "EELBox: Could not initialize"
					" SDL_net!\n");
			FE_Quit();
		}
		fprintf(stderr, "EELBox: Could not initialize FastEvents!\n");
		SDL_Quit();
	}
	fprintf(stderr, "EELBox: Could not initialize SDL!\n");
	return -1;
}