Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4817 in orxonox.OLD for orxonox/trunk/src/orxonox.cc


Ignore:
Timestamp:
Jul 7, 2005, 5:12:45 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: orxonox is now baseobject, graphicsengine handles events itself and is therefore eventlistener now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/orxonox.cc

    r4815 r4817  
    9090  delete ObjectManager::getInstance();
    9191  delete TextEngine::getInstance();
    92   delete EventHandler::getInstance();
    9392  delete Factory::getFirst();
    9493  delete GameLoader::getInstance();
     
    9796  delete CDEngine::getInstance();
    9897  delete GarbageCollector::getInstance();
     98
     99  delete EventHandler::getInstance();
    99100
    100101  ClassList::debug(0);
     
    148149  if( initNetworking () == -1) return -1;
    149150
    150   // subscribe the resolutionChanged-event
    151   EventHandler::getInstance()->subscribe(this, ES_GAME, EV_VIDEO_RESIZE);
    152151  return 0;
    153152}
     
    291290   \param event: an event not handled by the CommandNode
    292291*/
    293 void Orxonox::graphicsHandler(SDL_Event* event)
    294 {
    295   // Handle special events such as reshape, quit, focus changes
    296   switch (event->type)
    297     {
    298     case SDL_VIDEORESIZE:
    299       GraphicsEngine* tmpGEngine = GraphicsEngine::getInstance();
    300       tmpGEngine->resolutionChanged(event->resize);
    301       break;
    302     }
    303 }
    304 
    305 
    306 /**
    307   \brief processes the events for orxonox main class
    308   \param the event to handle
    309 */
    310 void Orxonox::process(const Event &event)
    311 {
    312   switch (event.type)
    313   {
    314     case EV_VIDEO_RESIZE:
    315       GraphicsEngine::getInstance()->resolutionChanged(event.resize);
    316       break;
    317   }
    318 
    319 }
     292// void Orxonox::graphicsHandler(SDL_Event* event)
     293// {
     294//   // Handle special events such as reshape, quit, focus changes
     295//   switch (event->type)
     296//     {
     297//     case SDL_VIDEORESIZE:
     298//       GraphicsEngine* tmpGEngine = GraphicsEngine::getInstance();
     299//       tmpGEngine->resolutionChanged(event->resize);
     300//       break;
     301//     }
     302// }
     303
     304
     305
    320306
    321307
Note: See TracChangeset for help on using the changeset viewer.