Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3604 in orxonox.OLD for orxonox/branches/levelloader


Ignore:
Timestamp:
Mar 18, 2005, 10:49:55 AM (20 years ago)
Author:
chris
Message:

orxonox/branches/levelloader: Found the bug that prevented the loaded world from running. Something is missing however, I am only getting a black screen…

Location:
orxonox/branches/levelloader/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/levelloader/src/story_entities/world.cc

    r3557 r3604  
    212212                        if( created != NULL) this->spawn( created);
    213213                                // if we load a 'Player' we use it as localPlayer
    214                         // if( element->Value() != NULL && !strcmp( element->Value(), "Player")) localPlayer = (Player*) created;
     214                                //todo do this more elegant
     215                         if( element->Value() != NULL && !strcmp( element->Value(), "Player")) localPlayer = (Player*) created;
    215216                        element = element->NextSiblingElement();
    216217                }
     
    722723{
    723724  this->lastFrame = SDL_GetTicks ();
    724   printf("World::mainLoop() - Entering main loop\n");
     725  printf("World::mainLoop() - Entering main loop of '%s'\n", this->worldName);
    725726  while( !this->bQuitOrxonox && !this->bQuitCurrentGame) /* \todo implement pause */
    726727    {
     
    735736        }
    736737      // Process time
    737       this->timeSlice ();
     738     this->timeSlice ();
    738739      // Process collision
    739       this->collide ();
     740     this->collide ();
    740741      // Draw
    741       this->display ();
     742     this->display ();
    742743 
    743744      for( int i = 0; i < 5000000; i++) {}
     
    805806      /* function to let all entities tick (iterate through list) */
    806807      WorldEntity* entity;
    807       float seconds = dt / 1000.0;     
     808      float seconds = dt / 1000.0; 
     809      assert( this->nullParent != NULL);
    808810      this->nullParent->update (seconds);
    809811      entity = entities->enumerate();
     
    813815          entity = entities->nextElement();
    814816        }
    815       skySphere->updatePosition(localCamera->absCoordinate);
     817      //assert( skySphere != NULL);
     818      //skySphere->updatePosition(localCamera->absCoordinate);
    816819     
    817820      /* update tick the rest */
     821      assert( this->localCamera != NULL);
     822      assert( this->trackManager != NULL);
    818823      this->localCamera->timeSlice(dt);
    819824      this->trackManager->tick(dt);
  • orxonox/branches/levelloader/src/world_entities/player.cc

    r3542 r3604  
    7373        if( string == NULL)
    7474        {
    75                 PRINTF(1)("Player is missing a proper 'name'\n");
     75                PRINTF0("Player is missing a proper 'name'\n");
    7676                string = "Unknown";
    7777                temp = new char[strlen(string + 2)];
     
    9292        else
    9393        {
    94                 PRINTF(1)("Player is missing a proper 'model'\n");
     94                PRINTF0("Player is missing a proper 'model'\n");
    9595                this->model = new OBJModel( "../data/models/reaplow.obj");
    9696        }
    9797        if( this->model == NULL)
    9898        {
    99                 PRINTF(1)("Player model '%s' could not be loaded\n", string);
     99                PRINTF0("Player model '%s' could not be loaded\n", string);
    100100        }
    101101}
Note: See TracChangeset for help on using the changeset viewer.