Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jul 3, 2005, 12:26:16 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: orxonox-events registered, solved an error in ClassList

File:
1 edited

Legend:

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

    r4777 r4782  
    6969  this->argc = 0;
    7070  this->argv = NULL;
     71
    7172}
    7273
     
    130131
    131132
     133  // initialize everything
    132134  SDL_Init (SDL_INIT_TIMER);
    133   // initialize everything
    134135  if( initResources () == -1) return -1;
    135136  if( initVideo() == -1) return -1;
     
    137138  if( initInput() == -1) return -1;
    138139  if( initNetworking () == -1) return -1;
    139   //printf("> Initializing world\n");
    140   //if( init_world () == -1) return -1; PB: world will be initialized when started
    141 
     140
     141  // subscribe the resolutionChanged-event
     142  EventHandler::getInstance()->subscribe(this, ES_GAME, EV_VIDEO_RESIZE);
    142143  return 0;
    143144}
     
    288289    case SDL_VIDEORESIZE:
    289290      GraphicsEngine* tmpGEngine = GraphicsEngine::getInstance();
    290       tmpGEngine->resolutionChanged(&event->resize);
     291      tmpGEngine->resolutionChanged(event->resize);
    291292      break;
    292293    }
     
    299300*/
    300301void Orxonox::process(const Event &event)
    301 {}
     302{
     303  switch (event.type)
     304  {
     305    case EV_VIDEO_RESIZE:
     306      GraphicsEngine::getInstance()->resolutionChanged(event.resize);
     307      break;
     308  }
     309
     310}
    302311
    303312
Note: See TracChangeset for help on using the changeset viewer.