Changeset 3530 in orxonox.OLD for orxonox/branches/levelloader/src/track_manager.cc
- Timestamp:
- Mar 13, 2005, 10:40:25 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/levelloader/src/track_manager.cc
r3525 r3530 112 112 { 113 113 // return if Found. 114 if ( this->name != NULL && !strcmp( this->name, track name))114 if ( this->name != NULL && !strcmp( this->name, trackName)) 115 115 return this; 116 116 // search on. … … 160 160 PRINTF(3)("Deleting all the TrackElements\n"); 161 161 delete this->firstTrackElem; 162 delete this->namer;162 // delete this->name; 163 163 164 164 // we do not have a TrackManager anymore … … 196 196 if( this->findTrackElementByName( names->getString(i))) 197 197 { 198 PRINTF( ERR)("Track name '%s' already taken198 PRINTF(1)("Track name '%s' already taken", names->getString(i)); 199 199 } 200 200 } … … 699 699 while( element != NULL) 700 700 { 701 if( !strcmp( element->Value(), "Point") 701 if( !strcmp( element->Value(), "Point")) 702 702 { 703 703 container = element->FirstChild(); 704 if( container != NULL && container->Type() == TEXT)704 if( container->ToText()) 705 705 { 706 706 assert( container->Value() != NULL); … … 709 709 else 710 710 { 711 PRINTF( ERR)("Invalid Point in Track (skipped)\n");711 PRINTF(1)("Invalid Point in Track (skipped)\n"); 712 712 } 713 713 } 714 714 } 715 else if( !strcmp( element->Value(), "Duration") 715 else if( !strcmp( element->Value(), "Duration")) 716 716 { 717 717 container = element->FirstChild(); 718 if( container != NULL && container->Type() == TEXT)718 if( container->ToText()) 719 719 { 720 720 assert( container->Value() != NULL); … … 723 723 else 724 724 { 725 PRINTF( ERR)("Invalid Duration in Track (skipped)\n");725 PRINTF(1)("Invalid Duration in Track (skipped)\n"); 726 726 } 727 727 } 728 728 } 729 else if( !strcmp( element->Value(), "SavePoint") 729 else if( !strcmp( element->Value(), "SavePoint")) 730 730 { 731 731 setSavePoint(); 732 732 } 733 else if( !strcmp( element->Value(), "Fork") 733 else if( !strcmp( element->Value(), "Fork")) 734 734 { 735 735 container = element->FirstChild(); 736 if( container != NULL && container->Type() == TEXT)736 if( container->ToText()) 737 737 { 738 738 assert( container->Value() != NULL); … … 740 740 } 741 741 } 742 else if( !strcmp( element->Value(), "Join") 742 else if( !strcmp( element->Value(), "Join")) 743 743 { 744 744 container = element->FirstChild(); 745 if( container != NULL && container->Type() == TEXT)745 if( container->ToText()) 746 746 { 747 747 assert( container->Value() != NULL); … … 749 749 } 750 750 } 751 else if( !strcmp( element->Value(), "WorkOn") 751 else if( !strcmp( element->Value(), "WorkOn")) 752 752 { 753 753 container = element->FirstChild(); 754 if( container != NULL && container->Type() == TEXT)754 if( container->ToText()) 755 755 { 756 756 assert( container->Value() != NULL); … … 769 769 The names used have to be unique within a particular track system. 770 770 */ 771 void TrackManager::forkS( c har* string)771 void TrackManager::forkS( const char* string) 772 772 { 773 773 // get the names for the tracks and therefore the amount of new tracks 774 SubString* names = new SubString( string);774 SubString* parts = new SubString( string); 775 775 int *IDs; 776 776 int n = parts->getN(); … … 780 780 IDs = new int[n]; 781 781 782 forkV( n, IDs, names);782 forkV( n, IDs, parts); 783 783 784 784 // IDs are irrelevant when assigning string names to tracks 785 785 delete IDs; 786 delete names;786 delete parts; 787 787 } 788 788 … … 791 791 \param string the names of the track to be joined, separated by commas 792 792 */ 793 void TrackManager::joinS( c har* string)793 void TrackManager::joinS( const char* string) 794 794 { 795 795 SubString* parts = new SubString( string); … … 805 805 t = n; 806 806 807 PRINTF( DEBUG)("Joining tracks:");807 PRINTF(4)("Joining tracks:"); 808 808 809 809 for( int i = 0; i < n; i++) … … 812 812 if( element == NULL) 813 813 { 814 PRINTF( ERR)("Track name '%s' unknown, could not join\n", parts->getString( i));814 PRINTF(1)("Track name '%s' unknown, could not join\n", parts->getString( i)); 815 815 t--; 816 816 } 817 817 else 818 818 { 819 PRINTF( DEBUG)(" '%s'(%d)", parts->getString( i), element->ID);819 PRINTF(4)(" '%s'(%d)", parts->getString( i), element->ID); 820 820 IDs[d] = element->ID; 821 821 d++; … … 823 823 } 824 824 825 PRINTF( DEBUG)("\n");825 PRINTF(4)("\n"); 826 826 827 827 joinV( t, IDs); … … 835 835 \param string the name of the track to work on (must have been previosly set by forkS) 836 836 */ 837 void TrackManager::workOnS( c har* string)837 void TrackManager::workOnS( const char* string) 838 838 { 839 839 TrackElement* tmpElem = findTrackElementByName( string); … … 841 841 this->currentTrackElem = tmpElem; 842 842 else 843 PRINTF( ERR)("TrackElement not Found, leaving unchanged\n");844 PRINTF( DEBUG)("now Working on %d\n", this->currentTrackElem->ID);845 } 843 PRINTF(1)("TrackElement not Found, leaving unchanged\n"); 844 PRINTF(4)("now Working on %d\n", this->currentTrackElem->ID); 845 }
Note: See TracChangeset
for help on using the changeset viewer.