Changeset 3546 in orxonox.OLD for orxonox/trunk/src/story_entities
- Timestamp:
- Mar 14, 2005, 6:21:37 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/story_entities/world.cc
r3545 r3546 43 43 { 44 44 this->init(name, -1); 45 printf("World::World - generating Nullparent\n");46 45 NullParent* np = NullParent::getInstance(); 47 46 } … … 64 63 World::~World () 65 64 { 66 printf("World::~World() - deleting current world\n");65 PRINTF(3)("World::~World() - deleting current world\n"); 67 66 CommandNode* cn = Orxonox::getInstance()->getLocalInput(); 68 67 cn->unbind(this->localPlayer); … … 469 468 ErrorMessage World::start() 470 469 { 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); 472 471 this->bQuitOrxonox = false; 473 472 this->bQuitCurrentGame = false; … … 482 481 ErrorMessage World::stop() 483 482 { 484 printf("World::stop() - got stop signal\n");483 PRINTF(3)("World::stop() - got stop signal\n"); 485 484 this->bQuitCurrentGame = true; 486 485 } … … 515 514 void World::displayLoadScreen () 516 515 { 517 printf("World::displayLoadScreen - start\n");516 PRINTF(3)("World::displayLoadScreen - start\n"); 518 517 519 518 //GLMenuImageScreen* … … 523 522 this->glmis->draw(); 524 523 525 printf("World::displayLoadScreen - end\n");524 PRINTF(3)("World::displayLoadScreen - end\n"); 526 525 } 527 526 … … 533 532 void World::releaseLoadScreen () 534 533 { 535 printf("World::releaseLoadScreen - start\n");534 PRINTF(3)("World::releaseLoadScreen - start\n"); 536 535 this->glmis->setValue(this->glmis->getMaximum()); 537 536 SDL_Delay(500); 538 printf("World::releaseLoadScreen - end\n");537 PRINTF(3)("World::releaseLoadScreen - end\n"); 539 538 } 540 539 … … 614 613 void World::debug() 615 614 { 616 printf ("World::debug() - starting debug\n");615 PRINTF(2)("debug() - starting debug\n"); 617 616 PNode* p1 = NullParent::getInstance (); 618 617 PNode* p2 = new PNode (new Vector(2, 2, 2), p1); … … 686 685 { 687 686 this->lastFrame = SDL_GetTicks (); 688 printf("World::mainLoop() - Entering main loop\n");687 PRINTF(3)("World::mainLoop() - Entering main loop\n"); 689 688 while( !this->bQuitOrxonox && !this->bQuitCurrentGame) /* \todo implement pause */ 690 689 { 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()); 692 691 // Network 693 692 this->synchronize (); … … 695 694 this->handleInput (); 696 695 if( this->bQuitCurrentGame || this->bQuitOrxonox) 697 {698 printf("World::mainLoop() - leaving loop earlier...\n");699 696 break; 700 }701 697 // Process time 702 698 this->timeSlice (); … … 709 705 /* \todo this is to slow down the program for openGl Software emulator computers, reimplement*/ 710 706 } 711 printf("World::mainLoop() - Exiting the main loop\n");707 PRINTF(3)("World::mainLoop() - Exiting the main loop\n"); 712 708 } 713 709 … … 755 751 { 756 752 float fps = 1000/dt; 757 printf("fps = %f\n", fps);753 PRINTF(3)("fps = %f\n", fps); 758 754 } 759 755 else … … 762 758 nothing. 763 759 */ 764 printf("fps = 1000 - frame rate is adjusted\n");760 PRINTF(2)("fps = 1000 - frame rate is adjusted\n"); 765 761 SDL_Delay(10); 766 762 dt = 10; … … 771 767 WorldEntity* entity; 772 768 float seconds = dt / 1000.0; 773 this->nullParent->update (seconds);774 769 entity = entities->enumerate(); 775 770 while( entity != NULL) … … 783 778 this->localCamera->timeSlice(dt); 784 779 this->trackManager->tick(dt); 780 this->nullParent->update (seconds); 785 781 } 786 782 this->lastFrame = currentFrame;
Note: See TracChangeset
for help on using the changeset viewer.