- Timestamp:
- Jun 3, 2005, 11:59:34 AM (19 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/story_entities/world.cc
r4496 r4501 452 452 this->localPlayer->setParentMode(PNODE_ALL); 453 453 Vector* cameraOffset = new Vector (0, 5, -10); 454 trackManager->condition(2, LEFTRIGHT, this->localPlayer); 455 454 trackManager->condition(1, LEFTRIGHT, this->localPlayer); 455 trackManager->debug(3); 456 456 457 this->sky->setParent(this->localCamera); 457 458 … … 544 545 545 546 trackManager->forkS("testFork1,testFork2"); 546 trackManager->workOn ("testFork1");547 trackManager->workOnS("testFork1"); 547 548 trackManager->addPointV(Vector(640, 25, -30)); 548 549 trackManager->addPointV(Vector(700, 40, -120)); … … 555 556 trackManager->setDuration(4); 556 557 557 trackManager->workOn ("testFork2");558 trackManager->workOnS("testFork2"); 558 559 trackManager->addPointV(Vector(640, 25, 20)); 559 560 trackManager->addPointV(Vector(670, 50, 120)); -
orxonox/trunk/src/util/loading/load_param.cc
r4496 r4501 34 34 this->loadString = NULL; 35 35 36 if ( likely(!multi))37 this->loadString = grabParameter(root, paramName);36 if (paramCount == 0) 37 this->loadString = "none"; 38 38 else 39 39 { 40 printf("paramName:::::%s\n", root->Value()); 41 if (!strcmp(root->Value(), paramName)) 42 { 43 const TiXmlNode* val = root->FirstChild(); 44 if( val->ToText()) 45 this->loadString = val->Value(); 46 } 47 } 48 if (loadString) 49 printf("%s\n", loadString); 40 if (likely(!multi)) 41 this->loadString = grabParameter(root, paramName); 42 else 43 { 44 if (!strcmp(root->Value(), paramName)) 45 { 46 const TiXmlNode* val = root->FirstChild(); 47 if( val->ToText()) 48 this->loadString = val->Value(); 49 } 50 } 51 } 50 52 51 53 this->paramDesc = NULL; -
orxonox/trunk/src/util/loading/load_param.h
r4496 r4501 247 247 { 248 248 public: 249 LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(), bool multi = false) 250 : BaseLoadParam(root, pt2Object, paramName, 0, multi, "") 251 { 252 if (loadString != NULL && root != NULL) 253 (*pt2Object.*function)(); 254 else 255 PRINTF(4)("Not loaded parameter %s of %s\n", paramName, pt2Object->getClassName()); 256 } 257 258 249 259 //! makes functions with one string loadable 250 260 LoadParam1(l_STRING); -
orxonox/trunk/src/util/track/track_manager.cc
r4496 r4501 409 409 410 410 element = root->FirstChildElement(); 411 411 412 412 413 while( element != NULL) 413 414 { 415 LoadParam<TrackManager>(element, "WorkOn", this, &TrackManager::workOnS, true) 416 .describe("Selects a TrackElement (by name) to work on"); 417 414 418 LoadParam<TrackManager>(element, "Point", this, &TrackManager::addPoint, true) 415 419 .describe("Adds a new Point to the currently selected TrackElement"); … … 418 422 .describe("Sets the Duration of the currently selected TrackElement"); 419 423 420 LoadParam<TrackManager>(element, "SavePoint", this, &TrackManager::setSavePoint, true); 424 LoadParam<TrackManager>(element, "SavePoint", this, &TrackManager::setSavePointS, true) 425 .describe("Sets the current selected Point to a Savepoint, meaning that the curve will be ended and a new one starts, and that one starts again from this point on"); 426 427 LoadParam<TrackManager>(element, "Fork", this, &TrackManager::forkS, true) 428 .describe("Forks the Path into multiple forked Path names seperated by ','"); 429 430 LoadParam<TrackManager>(element, "Join", this, &TrackManager::joinS, true) 431 .describe("Joins multiple joining Path names seperated by ','"); 421 432 422 433 /* 423 if( !strcmp( element->Value(), "SavePoint")) 424 { 425 PRINTF(5)("Loaded Savepoint\n"); 426 setSavePoint(); 434 if( !strcmp( element->Value(), "Fork")) 435 { 436 container = element->FirstChild(); 437 if( container->ToText()) 438 { 439 assert( container->Value() != NULL); 440 PRINTF(4)("Loaded Fork: %s\n", container->Value()); 441 forkS(container->Value()); 442 } 427 443 } 428 444 */ 429 if( !strcmp( element->Value(), "Fork")) 430 { 431 container = element->FirstChild(); 432 if( container->ToText()) 433 { 434 assert( container->Value() != NULL); 435 PRINTF(4)("Loaded Fork: %s\n", container->Value()); 436 forkS(container->Value()); 437 } 438 } 439 else if( !strcmp( element->Value(), "Join")) 440 { 441 container = element->FirstChild(); 442 if( container->ToText()) 443 { 444 assert( container->Value() != NULL); 445 PRINTF0("Loaded Join: %s\n", container->Value()); 446 joinS(container->Value()); 447 } 448 } 449 else if( !strcmp( element->Value(), "WorkOn")) 450 { 451 container = element->FirstChild(); 452 if( container->ToText()) 453 { 454 assert( container->Value() != NULL); 455 PRINTF(4)("Loaded WorkOn: %s\n", container->Value()); 456 workOn( container->Value()); 457 } 458 } 459 445 /* 446 if( !strcmp( element->Value(), "Join")) 447 { 448 container = element->FirstChild(); 449 if( container->ToText()) 450 { 451 assert( container->Value() != NULL); 452 PRINTF0("Loaded Join: %s\n", container->Value()); 453 joinS(container->Value()); 454 } 455 } 456 */ 460 457 element = element->NextSiblingElement(); 461 458 } … … 545 542 \param trackName the Name of the Track to work on 546 543 */ 547 void TrackManager::workOn (const char* trackName)544 void TrackManager::workOnS(const char* trackName) 548 545 { 549 546 TrackElement* tmpElem = this->firstTrackElem->findByName(trackName); … … 658 655 \todo this must be better 659 656 */ 660 void TrackManager::setSavePoint (int isLoadable)661 { 662 this-> setSavePoint();657 void TrackManager::setSavePointS(const char* nextElementName) 658 { 659 this->firstTrackElem->findByID(this->setSavePoint(NULL))->setName(nextElementName); 663 660 } 664 661 … … 743 740 { 744 741 this->firstTrackElem->findByID(trackIDs[i])->setName(strings.getString(i)); 745 } 742 } 743 delete []trackIDs; 746 744 } 747 745 -
orxonox/trunk/src/util/track/track_manager.h
r4496 r4501 146 146 // Methods to change the Path (initialisation) 147 147 void workOn(unsigned int trackID); 148 void workOn (const char* trackName);148 void workOnS(const char* trackName); 149 149 150 150 /** \see setCurveType(CurveType curveType, TrackElement* trackElem); \param curveType the type of the Curve */ … … 156 156 void addPointV(Vector newPoint, TrackElement* trackElem = NULL); 157 157 int addHotPoint(Vector newPoint, TrackElement* trackElem = NULL); 158 void setSavePoint (int isLoadable);158 void setSavePointS(const char* nextElementName); 159 159 int setSavePoint(TrackElement* trackElem = NULL); 160 160 void fork(unsigned int count, ...);
Note: See TracChangeset
for help on using the changeset viewer.