- Timestamp:
- Jul 8, 2005, 11:19:49 AM (19 years ago)
- Location:
- orxonox/trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/ChangeLog
r4811 r4822 1 1 2005-07-01 Benjamin Grauer <bensch@orxonox.ethz.ch> 2 2 Implemented ClassList.h: 3 4 5 3 an interface to BaseObject saving all instances in Lists. 4 It also enables loadability-identifiers. 5 To decide is, if this approach is fast enough. 6 6 7 7 2005-06-20 Patrick Boenzli <patrick@orxonox.ethz.ch> 8 8 Implemented an OBB collision detection system, injected into the 9 WorldEntity framework. Object - Object Collision Detection works 10 9 WorldEntity framework. Object - Object Collision Detection works 10 fine. Still work on the Object - Ground CD. 11 11 12 12 2005-06-10 Benjamin Grauer <bensch@orxonox.ethz.ch> -
orxonox/trunk/src/lib/graphics/importer/model.cc
r4806 r4822 902 902 else if( tmpFace->vertexCount > 4) 903 903 { 904 PRINTF( 0)("NASTY NASTY: More than 4 vertices for a face, there will be errors in the triangles information!\n");904 PRINTF(1)("NASTY NASTY: More than 4 vertices for a face, there will be errors in the triangles information!\n"); 905 905 //exit(0); 906 906 } -
orxonox/trunk/src/orxonox.cc
r4817 r4822 67 67 this->setName("orxonox-main"); 68 68 69 this->resourceManager = NULL;70 this->objectManager = NULL;71 this->eventHandler = NULL;72 69 this->iniParser = NULL; 73 70 … … 186 183 PRINT(3)("> Initializing input\n"); 187 184 188 this->eventHandler = EventHandler::getInstance(); 189 this->eventHandler->init(); 185 EventHandler::getInstance()->init(); 190 186 191 187 return 0; … … 213 209 214 210 PRINT(3)("initializing ResourceManager\n"); 215 resourceManager = ResourceManager::getInstance();216 211 217 212 // create parser … … 231 226 { 232 227 // printf("Not yet implemented\n"); 233 if (! resourceManager->setDataDir(valuebuf))228 if (!ResourceManager::getInstance()->setDataDir(valuebuf)) 234 229 { 235 230 PRINTF(1)("Data Could not be located\n"); … … 242 237 } 243 238 244 if (! resourceManager->checkDataDir(DEFAULT_DATA_DIR_CHECKFILE))239 if (!ResourceManager::getInstance()->checkDataDir(DEFAULT_DATA_DIR_CHECKFILE)) 245 240 { 246 241 PRINTF(1)("The DataDirectory %s could not be verified\n" \ 247 242 " Please Change in File %s Section %s Entry %s to a suitable value\n", 248 resourceManager->getDataDir(),243 ResourceManager::getInstance()->getDataDir(), 249 244 DEFAULT_CONFIG_FILE, 250 245 CONFIG_SECTION_DATA, … … 253 248 } 254 249 //! \todo this is a hack and should be loadable 255 resourceManager->addImageDir(ResourceManager::getInstance()->getFullName("maps/"));256 resourceManager->debug();250 ResourceManager::getInstance()->addImageDir(ResourceManager::getInstance()->getFullName("maps/")); 251 ResourceManager::getInstance()->debug(); 257 252 258 253 PRINT(3)("initializing TextEngine\n"); … … 260 255 261 256 PRINT(3)("initializing ObjectManager\n"); 262 this->objectManager = ObjectManager::getInstance(); 263 257 ObjectManager::getInstance(); 264 258 CDEngine::getInstance(); 265 259 -
orxonox/trunk/src/orxonox.h
r4817 r4822 11 11 class WorldEntity; 12 12 class GameLoader; 13 class ResourceManager;14 class ObjectManager;15 class EventHandler;16 13 class Event; 17 14 class IniParser; … … 52 49 char configFileName[256]; //!< Filename of the configuration-file. 53 50 GameLoader* gameLoader; //!< The gameLoader 54 ResourceManager* resourceManager; //!< The ResourceManager55 ObjectManager* objectManager; //!< the object manager of the game56 EventHandler* eventHandler; //!< the eventhandler of orxonox is created here57 51 58 52 unsigned int argc; //!< Count of Arguments of orxonox -
orxonox/trunk/src/story_entities/world.cc
r4820 r4822 183 183 ParticleEngine::getInstance()->debug(); 184 184 185 this->eventHandler->unsubscribe(this->localPlayer);185 EventHandler::getInstance()->unsubscribe(this->localPlayer); 186 186 187 187 delete WorldInterface::getInstance(); … … 189 189 delete this->entities; 190 190 delete LightManager::getInstance(); 191 delete this->trackManager; 192 delete this->particleEngine; 191 delete TrackManager::getInstance(); 192 delete ParticleEngine::getInstance(); 193 193 194 TextEngine::getInstance()->flush(); 194 195 SoundEngine::getInstance()->flushAllBuffers(); … … 292 293 WorldInterface* wi = WorldInterface::getInstance(); 293 294 wi->init(this); 294 this->garbageCollector = GarbageCollector::getInstance(); 295 296 this->eventHandler = EventHandler::getInstance(); 297 298 this->particleEngine = ParticleEngine::getInstance(); 299 this->trackManager = TrackManager::getInstance(); 295 300 296 LightManager::getInstance(); 301 297 this->nullParent = NullParent::getInstance (); … … 439 435 PRINTF(4)("Loading Track\n"); 440 436 441 trackManager->loadParams( element);442 trackManager->finalize();437 TrackManager::getInstance()->loadParams( element); 438 TrackManager::getInstance()->finalize(); 443 439 } 444 440 … … 449 445 450 446 // bind input 451 this->eventHandler->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_UP);452 this->eventHandler->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_DOWN);453 this->eventHandler->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_LEFT);454 this->eventHandler->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_RIGHT);455 this->eventHandler->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_FIRE1);456 this->eventHandler->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_NEXT_WEAPON);457 this->eventHandler->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_PREVIOUS_WEAPON);447 EventHandler::getInstance()->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_UP); 448 EventHandler::getInstance()->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_DOWN); 449 EventHandler::getInstance()->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_LEFT); 450 EventHandler::getInstance()->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_RIGHT); 451 EventHandler::getInstance()->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_FIRE1); 452 EventHandler::getInstance()->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_NEXT_WEAPON); 453 EventHandler::getInstance()->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_PREVIOUS_WEAPON); 458 454 459 455 // bind camera … … 474 470 // lightMan->setPosition(100, 80, 60); 475 471 476 // trackManager->setBindSlave(env);477 PNode* tn = trackManager->getTrackNode();472 // TrackManager::getInstance()->setBindSlave(env); 473 PNode* tn = TrackManager::getInstance()->getTrackNode(); 478 474 tn->addChild(this->localPlayer); 479 475 … … 485 481 this->localPlayer->setParentMode(PNODE_ALL); 486 482 Vector* cameraOffset = new Vector (0, 5, -10); 487 trackManager->condition(1, LEFTRIGHT, this->localPlayer);483 TrackManager::getInstance()->condition(1, LEFTRIGHT, this->localPlayer); 488 484 489 485 this->sky->setParent(this->localCamera); … … 493 489 glNewList (objectList, GL_COMPILE); 494 490 495 // trackManager->drawGraph(.01);496 // trackManager->debug(2);491 //TrackManager::getInstance()->drawGraph(.01); 492 //TrackManager::getInstance()->debug(2); 497 493 glEndList(); 498 494 … … 556 552 557 553 // initializing the TrackManager 558 this->trackManager = TrackManager::getInstance(); 559 //trackManager->addPointV(Vector(0,0,0)); 560 trackManager->addPointV(Vector(150, -35, 5)); 561 trackManager->addPointV(Vector(200,-35, 5)); 562 trackManager->addPointV(Vector(250, -35, 5)); 563 trackManager->addPointV(Vector(320,-33,-.55)); 564 trackManager->setDuration(1); 565 trackManager->setSavePoint(); 566 567 trackManager->addPointV(Vector(410, 0, 0)); 568 trackManager->addPointV(Vector(510, 20, -10)); 569 trackManager->addPointV(Vector(550, 20, -10)); 570 trackManager->addPointV(Vector(570, 20, -10)); 571 trackManager->setDuration(2); 572 573 trackManager->forkS("testFork1,testFork2"); 574 trackManager->workOnS("testFork1"); 575 trackManager->addPointV(Vector(640, 25, -30)); 576 trackManager->addPointV(Vector(700, 40, -120)); 577 trackManager->addPointV(Vector(800, 50, -150)); 578 trackManager->addPointV(Vector(900, 60, -100)); 579 trackManager->addPointV(Vector(900, 60, -70)); 580 trackManager->addPointV(Vector(990, 65, -15)); 581 trackManager->addPointV(Vector(1050, 65, -10)); 582 trackManager->addPointV(Vector(1100, 65, -20)); 583 trackManager->setDuration(4); 584 585 trackManager->workOnS("testFork2"); 586 trackManager->addPointV(Vector(640, 25, 20)); 587 trackManager->addPointV(Vector(670, 50, 120)); 588 trackManager->addPointV(Vector(700, 70, 80)); 589 trackManager->addPointV(Vector(800, 70, 65)); 590 trackManager->addPointV(Vector(850, 65, 65)); 591 trackManager->addPointV(Vector(920, 35, 40)); 592 trackManager->addPointV(Vector(945, 40, 40)); 593 trackManager->addPointV(Vector(970, 24, 40)); 594 trackManager->addPointV(Vector(1000, 40, -7)); 595 596 trackManager->setDuration(4); 597 598 599 trackManager->joinS("testFork1,testFork2"); 600 601 trackManager->addPointV(Vector(1200, 60, -50)); 602 trackManager->addPointV(Vector(1300, 50, -50)); 603 trackManager->addPointV(Vector(1400, 40, -50)); 604 trackManager->addPointV(Vector(1500, 40, -60)); 605 trackManager->addPointV(Vector(1600, 35, -55)); 606 trackManager->addPointV(Vector(1700, 45, -40)); 607 trackManager->addPointV(Vector(1750, 60, -40)); 608 trackManager->addPointV(Vector(1770, 80, -40)); 609 trackManager->addPointV(Vector(1800, 100, -40)); 610 trackManager->setDuration(10); 611 612 trackManager->finalize(); 554 TrackManager::getInstance()->addPointV(Vector(150, -35, 5)); 555 TrackManager::getInstance()->addPointV(Vector(200,-35, 5)); 556 TrackManager::getInstance()->addPointV(Vector(250, -35, 5)); 557 TrackManager::getInstance()->addPointV(Vector(320,-33,-.55)); 558 TrackManager::getInstance()->setDuration(1); 559 TrackManager::getInstance()->setSavePoint(); 560 561 TrackManager::getInstance()->addPointV(Vector(410, 0, 0)); 562 TrackManager::getInstance()->addPointV(Vector(510, 20, -10)); 563 TrackManager::getInstance()->addPointV(Vector(550, 20, -10)); 564 TrackManager::getInstance()->addPointV(Vector(570, 20, -10)); 565 TrackManager::getInstance()->setDuration(2); 566 567 TrackManager::getInstance()->forkS("testFork1,testFork2"); 568 TrackManager::getInstance()->workOnS("testFork1"); 569 TrackManager::getInstance()->addPointV(Vector(640, 25, -30)); 570 TrackManager::getInstance()->addPointV(Vector(700, 40, -120)); 571 TrackManager::getInstance()->addPointV(Vector(800, 50, -150)); 572 TrackManager::getInstance()->addPointV(Vector(900, 60, -100)); 573 TrackManager::getInstance()->addPointV(Vector(900, 60, -70)); 574 TrackManager::getInstance()->addPointV(Vector(990, 65, -15)); 575 TrackManager::getInstance()->addPointV(Vector(1050, 65, -10)); 576 TrackManager::getInstance()->addPointV(Vector(1100, 65, -20)); 577 TrackManager::getInstance()->setDuration(4); 578 579 TrackManager::getInstance()->workOnS("testFork2"); 580 TrackManager::getInstance()->addPointV(Vector(640, 25, 20)); 581 TrackManager::getInstance()->addPointV(Vector(670, 50, 120)); 582 TrackManager::getInstance()->addPointV(Vector(700, 70, 80)); 583 TrackManager::getInstance()->addPointV(Vector(800, 70, 65)); 584 TrackManager::getInstance()->addPointV(Vector(850, 65, 65)); 585 TrackManager::getInstance()->addPointV(Vector(920, 35, 40)); 586 TrackManager::getInstance()->addPointV(Vector(945, 40, 40)); 587 TrackManager::getInstance()->addPointV(Vector(970, 24, 40)); 588 TrackManager::getInstance()->addPointV(Vector(1000, 40, -7)); 589 590 TrackManager::getInstance()->setDuration(4); 591 592 593 TrackManager::getInstance()->joinS("testFork1,testFork2"); 594 595 TrackManager::getInstance()->addPointV(Vector(1200, 60, -50)); 596 TrackManager::getInstance()->addPointV(Vector(1300, 50, -50)); 597 TrackManager::getInstance()->addPointV(Vector(1400, 40, -50)); 598 TrackManager::getInstance()->addPointV(Vector(1500, 40, -60)); 599 TrackManager::getInstance()->addPointV(Vector(1600, 35, -55)); 600 TrackManager::getInstance()->addPointV(Vector(1700, 45, -40)); 601 TrackManager::getInstance()->addPointV(Vector(1750, 60, -40)); 602 TrackManager::getInstance()->addPointV(Vector(1770, 80, -40)); 603 TrackManager::getInstance()->addPointV(Vector(1800, 100, -40)); 604 TrackManager::getInstance()->setDuration(10); 605 606 TrackManager::getInstance()->finalize(); 613 607 614 608 … … 639 633 640 634 641 this->eventHandler->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_FIRE1);642 this->eventHandler->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_NEXT_WEAPON);643 this->eventHandler->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_PREVIOUS_WEAPON);635 EventHandler::getInstance()->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_FIRE1); 636 EventHandler::getInstance()->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_NEXT_WEAPON); 637 EventHandler::getInstance()->subscribe(this->localPlayer, ES_GAME, KeyMapper::PEV_PREVIOUS_WEAPON); 644 638 645 639 /* … … 679 673 this->localCamera->lookAt(this->localPlayer); 680 674 681 this->eventHandler->subscribe(this->pilotNode, ES_GAME, KeyMapper::PEV_UP);682 this->eventHandler->subscribe(this->pilotNode, ES_GAME, KeyMapper::PEV_DOWN);683 this->eventHandler->subscribe(this->pilotNode, ES_GAME, KeyMapper::PEV_LEFT);684 this->eventHandler->subscribe(this->pilotNode, ES_GAME, KeyMapper::PEV_RIGHT);685 this->eventHandler->subscribe(this->pilotNode, ES_GAME, EV_MOUSE_MOTION);675 EventHandler::getInstance()->subscribe(this->pilotNode, ES_GAME, KeyMapper::PEV_UP); 676 EventHandler::getInstance()->subscribe(this->pilotNode, ES_GAME, KeyMapper::PEV_DOWN); 677 EventHandler::getInstance()->subscribe(this->pilotNode, ES_GAME, KeyMapper::PEV_LEFT); 678 EventHandler::getInstance()->subscribe(this->pilotNode, ES_GAME, KeyMapper::PEV_RIGHT); 679 EventHandler::getInstance()->subscribe(this->pilotNode, ES_GAME, EV_MOUSE_MOTION); 686 680 687 681 // bind input … … 690 684 691 685 /* 692 PNode* tn = trackManager->getTrackNode();686 PNode* tn = TrackManager::getInstance()->getTrackNode(); 693 687 tn->addChild(this->localPlayer); 694 688 this->localCamera->lookAt(tn); … … 696 690 tn->addChild(this->localCamera); 697 691 this->localPlayer->setParentMode(PNODE_ALL); 698 trackManager->condition(2, LEFTRIGHT, this->localPlayer);692 TrackManager::getInstance()->condition(2, LEFTRIGHT, this->localPlayer); 699 693 */ 700 694 this->glmis->step(); … … 889 883 glCallList (objectList); 890 884 891 particleEngine->draw(); //!< \todo should be dts like in the Trunk;885 ParticleEngine::getInstance()->draw(); //!< \todo should be dts like in the Trunk; 892 886 893 887 crosshair->draw(); … … 1075 1069 1076 1070 /* update tick the rest */ 1077 this->trackManager->tick(this->dt);1071 TrackManager::getInstance()->tick(this->dt); 1078 1072 this->localCamera->tick(this->dt); 1079 1073 // tick the engines … … 1107 1101 void World::update() 1108 1102 { 1109 this->garbageCollector->update();1103 GarbageCollector::getInstance()->update(); 1110 1104 this->nullParent->update (this->dtS); 1111 1105 -
orxonox/trunk/src/story_entities/world.h
r4765 r4822 14 14 class World; 15 15 class WorldEntity; 16 class TrackManager;17 16 class Camera; 18 17 class Player; 19 18 class PNode; 20 19 class GLMenuImageScreen; 21 class LightManager;22 class ParticleEngine;23 20 class Terrain; 24 21 class GarbageCollector; … … 26 23 class TiXmlElement; 27 24 class PilotNode; 28 class EventHandler;29 25 30 26 //! The game world Interface … … 102 98 Uint32 lastFrame; //!< last time of frame 103 99 Uint32 cycle; //!< The cycle we are in (starts with 0 and rises with every frame) 104 Uint32 dt; //!< time needed to calculate this frame 100 Uint32 dt; //!< time needed to calculate this frame (in milliSeconds) 105 101 float dtS; //!< The time needed for caluculations in seconds 106 102 double gameTime; //!< this is where the game time is saved … … 115 111 char* path; //!< The file from which this world is loaded 116 112 113 114 // IMPORTANT WORLD-ENTITIES 117 115 PNode* nullParent; //!< The zero-point, that everything has as its parent. 118 TrackManager* trackManager; //!< The reference of the TrackManager that handles the course through the Level.119 ParticleEngine* particleEngine; //!< The ParticleEngine of the World.120 116 Camera* localCamera; //!< The current Camera 121 117 WorldEntity* sky; //!< The Environmental Heaven of orxonox \todo insert this to environment insted 122 LightManager* lightMan; //!< The Lights of the Level123 118 Terrain* terrain; //!< The Terrain of the World. 124 119 … … 127 122 Player* localPlayer; //!< The Player, you fly through the level. 128 123 PilotNode* pilotNode; //!< THe pilot node to fly with the mouse 129 130 GarbageCollector* garbageCollector; //!< reference to the garbage collector131 EventHandler* eventHandler;132 124 133 125 /* function for main-loop */ -
orxonox/trunk/src/world_entities/player.cc
r4818 r4822 215 215 216 216 this->weaponMan->draw(); 217 218 217 } 219 218
Note: See TracChangeset
for help on using the changeset viewer.