Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


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

Location:
orxonox/trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/coord/p_node.cc

    r3545 r3546  
    327327  if( pNode->parent != NULL )
    328328    {
    329       printf("PNode::addChild() - removing child from old parent \n");
    330329      PRINTF(2)("PNode::addChild() - reparenting node: removing it and adding it again\n");
    331330      pNode->parent->removeChild(pNode);
     
    334333  pNode->parent = this;
    335334  this->children->add(pNode);
    336   printf("PNode::addChild() - Parent added\n");
    337335}
    338336
     
    441439void PNode::update (float timeStamp)
    442440{
    443   printf ("PNode::update - %s - (%f, %f, %f)\n", this->objectName, this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z);
     441  PRINTF(2)("PNode::update - %s - (%f, %f, %f)\n", this->objectName, this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z);
    444442  // printf("%s", this->objectName);
    445443
     
    541539void PNode::debug()
    542540{
    543   printf("PNode::debug() - absCoord: (%f, %f, %f)\n",
     541  PRINTF(2)("PNode::debug() - absCoord: (%f, %f, %f)\n",
    544542         this->absCoordinate.x,
    545543         this->absCoordinate.y,
  • orxonox/trunk/src/orxonox.cc

    r3544 r3546  
    3131#include "game_loader.h"
    3232#include <string.h>
    33 int verbose;
     33int verbose = 2;
    3434
    3535using namespace std;
  • 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;
  • orxonox/trunk/src/track_manager.cc

    r3544 r3546  
    664664      Vector v(0.0, 1.0, 0.0);
    665665      Quaternion q(-PI/2, v);
    666       //this->relDirection = this->relDirection * q;
    667666      quat = quat * q;
    668667
Note: See TracChangeset for help on using the changeset viewer.