Exemplo n.º 1
0
void
App::Run()
{
    //
    // Initialize the event handler
    //
    EventManager eventHandler;
    
    // Main game loop
    while(1)
    {
        //
        // Draw the next screen
        //
        
        DrawScreen();
        
        // Step the physics world
        PhysicsWorld::GetInstance()->Step(1.0 / 60.0);
        
        // Sleep
        SDL_Delay(1000.0 / 60.0);
        
        //
        // Handle events
        //
        while(eventHandler.IsEventWaiting())
            eventHandler.HandleEvent();
    }
    
    
}