Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3546 in orxonox.OLD for orxonox/trunk/src/story_entities


Ignore:
Timestamp:
Mar 14, 2005, 6:21:37 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: fixed a bug in the update phase, added real debug output bensch style

File:
1 edited

Legend:

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

    r3545 r3546  
    4343{
    4444  this->init(name, -1);
    45   printf("World::World - generating Nullparent\n");
    4645  NullParent* np = NullParent::getInstance();
    4746}
     
    6463World::~World ()
    6564{
    66   printf("World::~World() - deleting current world\n");
     65  PRINTF(3)("World::~World() - deleting current world\n");
    6766  CommandNode* cn = Orxonox::getInstance()->getLocalInput();
    6867  cn->unbind(this->localPlayer);
     
    469468ErrorMessage World::start()
    470469{
    471   printf("World::start() - starting current World: nr %i\n", this->debugWorldNr);
     470  PRINTF(3)("World::start() - starting current World: nr %i\n", this->debugWorldNr);
    472471  this->bQuitOrxonox = false;
    473472  this->bQuitCurrentGame = false;
     
    482481ErrorMessage World::stop()
    483482{
    484   printf("World::stop() - got stop signal\n");
     483  PRINTF(3)("World::stop() - got stop signal\n");
    485484  this->bQuitCurrentGame = true;
    486485}
     
    515514void World::displayLoadScreen ()
    516515{
    517   printf ("World::displayLoadScreen - start\n");
     516  PRINTF(3)("World::displayLoadScreen - start\n");
    518517 
    519518  //GLMenuImageScreen*
     
    523522  this->glmis->draw();
    524523 
    525   printf ("World::displayLoadScreen - end\n");
     524  PRINTF(3)("World::displayLoadScreen - end\n");
    526525}
    527526
     
    533532void World::releaseLoadScreen ()
    534533{
    535   printf ("World::releaseLoadScreen - start\n");
     534  PRINTF(3)("World::releaseLoadScreen - start\n");
    536535  this->glmis->setValue(this->glmis->getMaximum());
    537536  SDL_Delay(500);
    538   printf ("World::releaseLoadScreen - end\n");
     537  PRINTF(3)("World::releaseLoadScreen - end\n");
    539538}
    540539
     
    614613void World::debug()
    615614{
    616   printf ("World::debug() - starting debug\n");
     615  PRINTF(2)("debug() - starting debug\n");
    617616  PNode* p1 = NullParent::getInstance ();
    618617  PNode* p2 = new PNode (new Vector(2, 2, 2), p1);
     
    686685{
    687686  this->lastFrame = SDL_GetTicks ();
    688   printf("World::mainLoop() - Entering main loop\n");
     687  PRINTF(3)("World::mainLoop() - Entering main loop\n");
    689688  while( !this->bQuitOrxonox && !this->bQuitCurrentGame) /* \todo implement pause */
    690689    {
    691       printf("World::mainloop() - number of entities: %i\n", this->entities->getSize());
     690      PRINTF(3)("World::mainloop() - number of entities: %i\n", this->entities->getSize());
    692691      // Network
    693692      this->synchronize ();
     
    695694      this->handleInput ();
    696695      if( this->bQuitCurrentGame || this->bQuitOrxonox)
    697         {
    698           printf("World::mainLoop() - leaving loop earlier...\n");
    699696          break;
    700         }
    701697      // Process time
    702698      this->timeSlice ();
     
    709705      /* \todo this is to slow down the program for openGl Software emulator computers, reimplement*/
    710706    }
    711   printf("World::mainLoop() - Exiting the main loop\n");
     707  PRINTF(3)("World::mainLoop() - Exiting the main loop\n");
    712708}
    713709
     
    755751        {
    756752          float fps = 1000/dt;
    757           printf("fps = %f\n", fps);
     753          PRINTF(3)("fps = %f\n", fps);
    758754        }
    759755      else
     
    762758             nothing.
    763759          */
    764           printf("fps = 1000 - frame rate is adjusted\n");
     760          PRINTF(2)("fps = 1000 - frame rate is adjusted\n");
    765761          SDL_Delay(10);
    766762          dt = 10;
     
    771767      WorldEntity* entity;
    772768      float seconds = dt / 1000.0;     
    773       this->nullParent->update (seconds);
    774769      entity = entities->enumerate();
    775770      while( entity != NULL)
     
    783778      this->localCamera->timeSlice(dt);
    784779      this->trackManager->tick(dt);
     780      this->nullParent->update (seconds);
    785781    }
    786782  this->lastFrame = currentFrame;
Note: See TracChangeset for help on using the changeset viewer.