Changeset 3530 in orxonox.OLD for orxonox/branches/levelloader/src
- Timestamp:
- Mar 13, 2005, 10:40:25 PM (20 years ago)
- Location:
- orxonox/branches/levelloader/src
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/levelloader/src/defs/debug.h
r3499 r3530 22 22 #define _DEBUG_H 23 23 24 #if HAVE_CONFIG_H 25 #include <config.h> 26 #endif 27 28 #include <stdio.h> 29 24 30 #define NO 0 25 31 #define ERR 1 … … 28 34 #define DEBUGING 4 29 35 30 #if HAVE_CONFIG_H31 #include <config.h>32 #endif33 34 #include <stdio.h>35 36 36 /////////////////////////////////////////////////// 37 37 /// PRINTF: prints with filename and linenumber /// 38 38 /////////////////////////////////////////////////// 39 40 39 #ifdef DEBUG 41 40 extern int verbose; 42 41 #define PRINTF(x) \ 43 42 PRINTF ## x 44 43 45 44 #if DEBUG >= ERR 46 45 #define PRINTF1 \ … … 92 91 #define PRINT(x) \ 93 92 PRINT ## x 94 93 95 94 #if DEBUG >= ERR 96 95 #define PRINT1 \ -
orxonox/branches/levelloader/src/defs/error.h
r3499 r3530 23 23 24 24 25 #ifndef _ ERROR_H26 #define _ ERROR_H25 #ifndef _ORX_ERROR_H 26 #define _ORX_ERROR_H 27 27 28 28 // these are the two undefined error nr. Don't use them ... … … 54 54 */ 55 55 56 typedef struct 56 typedef struct ErrorMessage 57 57 { 58 58 int code; -
orxonox/branches/levelloader/src/defs/stdincl.h
r3525 r3530 8 8 #ifndef _STDINCL_H 9 9 #define _STDINCL_H 10 10 11 11 #define null 0 //!< null 12 12 … … 22 22 #endif 23 23 24 #include <assert.h> 24 25 #include <stdlib.h> 25 26 #include <string.h> … … 27 28 #include "glincl.h" 28 29 30 #include "error.h" 31 #include "debug.h" 29 32 30 33 // MATH // … … 41 44 #include "factory.h" 42 45 43 #include "error.h" 44 #include "debug.h" 46 #define CREATE_FACTORY(x) \ 47 class x ## Factory : public Factory { \ 48 public: \ 49 x ## Factory (){setNext( NULL); setClassname( #x ); initialize();} \ 50 ~x ## Factory () {}; \ 51 private: \ 52 BaseObject* fabricate( TiXmlElement* root) \ 53 { \ 54 if(!strcmp(root->Value(), getClassname())) return new x ( root); \ 55 else if( getNext() != NULL) return getNext()->fabricate( root); \ 56 else return NULL; \ 57 } \ 58 }; \ 59 x ## Factory global_ ## x ## Factory; 45 60 46 61 #endif /* _STDINCL_H */ -
orxonox/branches/levelloader/src/factory.cc
r3525 r3530 18 18 19 19 #include "factory.h" 20 #include "game_loader.h" 20 21 21 22 using namespace std; … … 33 34 Factory::Factory () 34 35 { 35 classname = "NULL" 36 classname = "NULL"; 36 37 next = NULL; 37 38 } 38 39 39 40 /** 40 \brief constructor41 \brief destructor 41 42 42 43 clear the Q … … 51 52 \brief generates the associated object from data 52 53 */ 53 BaseObject* ObjectFactory::fabricate( TiXmlElement* data)54 BaseObject* Factory::fabricate( TiXmlElement* data) 54 55 { 55 56 return NULL; … … 61 62 void Factory::initialize() 62 63 { 64 assert( classname != NULL); 65 PRINTF(3)("Initializing %sFactory\n", classname); 63 66 GameLoader* gl = GameLoader::getInstance(); 64 67 gl->registerFactory( this); … … 88 91 while( node != NULL) 89 92 { 90 if( node->T ype() == TEXT) return node->Value();91 node = node->Next Child();93 if( node->ToText()) return node->Value(); 94 node = node->NextSibling(); 92 95 } 93 96 return NULL; -
orxonox/branches/levelloader/src/factory.h
r3525 r3530 8 8 9 9 #include "stdincl.h" 10 #include "world.h"11 10 12 #define CREATE_FACTORY(CLASS) class CLASSFactory : public Factory { \ 13 public: \ 14 CLASSFactory (){setNext( NULL); setClassname = "CLASS"; initialize();} \ 15 ~CLASSFactory (); \ 16 private: \ 17 BaseObject* fabricate( TiXmlElement* root) \ 18 { \ 19 if(!strcmp(root->Value(), getClassname())) return new CLASS( root); \ 20 else if( next != NULL) return next->fabricate( root); \ 21 else return NULL; \ 22 } \ 23 }; \ 24 CLASSFactory global_CLASSFactory; 11 class BaseObject; 25 12 26 13 //! The Factory is … … 37 24 void initialize(); 38 25 void registerFactory( Factory* factory); 39 void setClassname(char* name) {classname = name}; 40 char* getClassname() {return classname}; 41 void setNext( ObjectFactory* factory) {next = factory}; 26 void setClassname(char* name) {classname = name;} 27 char* getClassname() {return classname;}; 28 void setNext( Factory* factory) {next = factory;} 29 Factory* getNext() {return next;} 42 30 43 31 private: -
orxonox/branches/levelloader/src/game_loader.cc
r3525 r3530 15 15 co-programmer: ... 16 16 */ 17 18 17 19 18 #include "game_loader.h" … … 162 161 if( name == NULL) 163 162 { 164 PRINTF( ERR)("No filename specified for loading");163 PRINTF(1)("No filename specified for loading"); 165 164 return NULL; 166 165 } … … 168 167 TiXmlDocument* XMLDoc = new TiXmlDocument( name); 169 168 // load the campaign document 170 if( !XMLDoc .LoadFile())169 if( !XMLDoc->LoadFile()) 171 170 { 172 171 // report an error 173 PRINTF( ERR)("Error loading XML File: %s @ %d:%d\n", XMLDoc.ErrorDesc(), XMLDoc.ErrorRow(), XMLDoc.ErrorCol());172 PRINTF(1)("Error loading XML File: %s @ %d:%d\n", XMLDoc->ErrorDesc(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol()); 174 173 delete XMLDoc; 175 174 return NULL; … … 177 176 178 177 // check basic validity 179 TiXmlElement* element = XMLDoc .RootElement();178 TiXmlElement* element = XMLDoc->RootElement(); 180 179 assert( element != NULL); 181 180 … … 185 184 { 186 185 // report an error 187 PRINTF( ERR)("Specified XML File is not an orxonox campaign file (Campaign element missing)\n");186 PRINTF(1)("Specified XML File is not an orxonox campaign file (Campaign element missing)\n"); 188 187 delete XMLDoc; 189 188 return NULL; … … 191 190 192 191 // construct campaign 193 Campaign c = new Campaign( element);192 Campaign* c = new Campaign( element); 194 193 195 194 // free the XML data 196 195 delete XMLDoc; 196 197 return c; 197 198 } 198 199 … … 269 270 void GameLoader::registerFactory( Factory* factory) 270 271 { 271 if( next == NULL) next = factory; 272 else next->registerFactory( factory); 272 assert( factory != NULL); 273 274 printf("Registered factory for '%s'\n", factory->getClassname()); 275 276 if( first == NULL) first = factory; 277 else first->registerFactory( factory); 273 278 } 274 279 … … 277 282 \param element a XMLElement containing all the needed info 278 283 */ 279 StoryEntity* GameLoader::fabricate( TiXmlElement* element)284 BaseObject* GameLoader::fabricate( TiXmlElement* element) 280 285 { 281 286 if( first == NULL) 282 287 { 283 PRINTF( ERR)("GameLoader does not know any factories, fabricate() failed\n");288 PRINTF(1)("GameLoader does not know any factories, fabricate() failed\n"); 284 289 return NULL; 285 290 } -
orxonox/branches/levelloader/src/game_loader.h
r3525 r3530 4 4 #include "stdincl.h" 5 5 #include "story_def.h" 6 #include "factory.h" 6 7 7 8 //----------------------------------------------------------------------------- -
orxonox/branches/levelloader/src/lib/util/substring.cc
r3525 r3530 22 22 #include "substring.h" 23 23 24 SubString::SubString( c har* string)24 SubString::SubString( const char* string) 25 25 { 26 26 n = 0; … … 32 32 n += 1; 33 33 34 strings = malloc( sizeof( char*) * n);34 strings = new char*[n]; 35 35 36 36 int i = 0; 37 37 int l = 0; 38 38 39 c har* offset = string;39 const char* offset = string; 40 40 char* end = strchr( string, ','); 41 41 while( end != NULL) 42 42 { 43 43 l = end - offset; 44 strings[i] = malloc( l + 1);44 strings[i] = new char[l + 1]; 45 45 strncpy( strings[i], offset, l); 46 46 i++; … … 50 50 } 51 51 52 strings[i] = malloc( l + 1);52 strings[i] = new char[l + 1]; 53 53 strncpy( strings[i], offset, l); 54 54 l = strlen( offset); … … 62 62 for( int i = 0; i < n; i++) 63 63 { 64 free( strings[i]);64 delete strings[i]; 65 65 } 66 66 67 free( strings);67 delete strings; 68 68 } 69 69 -
orxonox/branches/levelloader/src/lib/util/substring.h
r3525 r3530 3 3 \brief a small class to get the parts of a string separated by commas 4 4 */ 5 6 #ifndef _SUBSTRING_H 7 #define _SUBSTRING_H 5 8 6 9 #include "stdincl.h" … … 10 13 public: 11 14 12 SubString( c har* string);15 SubString( const char* string); 13 16 ~SubString(); 14 17 … … 20 23 int n; 21 24 }; 25 26 #endif /* _SUBSTRING_H */ -
orxonox/branches/levelloader/src/story_entities/campaign.cc
r3525 r3530 22 22 #include "story_entity.h" 23 23 #include "factory.h" 24 #include "game_loader.h" 24 25 25 26 using namespace std; 26 27 28 CREATE_FACTORY(Campaign); 27 29 28 30 Campaign::Campaign () … … 37 39 { 38 40 TiXmlElement* element; 39 c harstring;41 const char* string; 40 42 int id; 41 43 … … 48 50 // grab all the necessary parameters 49 51 string = grabParameter( root, "identifier"); 50 if( string == NULL || if( sscanf(string, "%d", &id) != 1))51 { 52 PRINTF( ERR)("Campaign is missing a proper 'identifier'\n");53 setStoryId( -1);54 } 55 else setStoryId( id);52 if( string == NULL || sscanf(string, "%d", &id) != 1) 53 { 54 PRINTF(1)("Campaign is missing a proper 'identifier'\n"); 55 this->setStoryID( -1); 56 } 57 else this->setStoryID( id); 56 58 57 59 // find WorldList … … 63 65 StoryEntity* created = (StoryEntity*) loader->fabricate( element); 64 66 if( created != NULL) addEntity( created); 65 element = element-> nextSiblingElement();67 element = element->NextSiblingElement(); 66 68 } 67 69 } -
orxonox/branches/levelloader/src/story_entities/campaign.h
r3525 r3530 41 41 }; 42 42 43 CREATE_FACTORY(Campaign);44 45 43 #endif /* _CAMPAIGN_H */ -
orxonox/branches/levelloader/src/story_entities/world.cc
r3525 r3530 30 30 #include "fontset.h" 31 31 #include "factory.h" 32 #include "game_loader.h" 32 33 33 34 using namespace std; 34 35 36 CREATE_FACTORY(World); 35 37 36 38 World::World( TiXmlElement* root) 37 39 { 38 char *string, *name; 40 const char *string; 41 char *name; 39 42 int id; 40 43 41 44 // identifier 42 45 string = grabParameter( root, "identifier"); 43 if( string == NULL || if( sscanf(string, "%d", &id) != 1))44 { 45 PRINTF( ERR)("World is missing a proper 'identifier'\n");46 setStoryId( -1);47 } 48 else setStoryI d( id);46 if( string == NULL || sscanf(string, "%d", &id) != 1) 47 { 48 PRINTF(1)("World is missing a proper 'identifier'\n"); 49 this->setStoryID( -1); 50 } 51 else setStoryID( id); 49 52 50 53 // path … … 52 55 if( string == NULL) 53 56 { 54 PRINTF( ERR)("World is missing a proper 'path'\n");55 setPath( NULL);57 PRINTF(1)("World is missing a proper 'path'\n"); 58 this->setPath( NULL); 56 59 } 57 60 else … … 59 62 name = new char[strlen(string + 2)]; 60 63 strcpy( name, string); 61 setPath( name);64 this->setPath( name); 62 65 } 63 66 … … 105 108 this->nullParent->destroy(); 106 109 delete this->skySphere; 110 if( this->worldName) delete this->worldName; 111 if( this->path) delete this->path; 107 112 108 113 //delete this->trackManager; … … 137 142 if( getPath() == NULL) 138 143 { 139 PRINTF( ERR)("World has no path specified for loading");144 PRINTF(1)("World has no path specified for loading"); 140 145 return (ErrorMessage){213,"Path not specified","World::load()"}; 141 146 } 142 147 143 TiXmlDocument* XMLDoc = new TiXmlDocument( name);148 TiXmlDocument* XMLDoc = new TiXmlDocument( path); 144 149 // load the campaign document 145 if( !XMLDoc .LoadFile())150 if( !XMLDoc->LoadFile()) 146 151 { 147 152 // report an error 148 PRINTF( ERR)("Error loading XML File: %s @ %d:%d\n", XMLDoc.ErrorDesc(), XMLDoc.ErrorRow(), XMLDoc.ErrorCol());153 PRINTF(1)("Error loading XML File: %s @ %d:%d\n", XMLDoc->ErrorDesc(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol()); 149 154 delete XMLDoc; 150 155 return (ErrorMessage){213,"XML File parsing error","World::load()"}; … … 152 157 153 158 // check basic validity 154 TiXmlElement* root = XMLDoc .RootElement();159 TiXmlElement* root = XMLDoc->RootElement(); 155 160 assert( root != NULL); 156 161 157 element = root->FirstChildElement( "WorldDataFile");162 TiXmlElement* element = root->FirstChildElement( "WorldDataFile"); 158 163 159 164 if( root == NULL ) 160 165 { 161 166 // report an error 162 PRINTF( ERR)("Specified XML File is not an orxonox world data file (WorldDataFile element missing)\n");167 PRINTF(1)("Specified XML File is not an orxonox world data file (WorldDataFile element missing)\n"); 163 168 delete XMLDoc; 164 169 return (ErrorMessage){213,"Path not a WorldDataFile","World::load()"}; … … 167 172 // load the parameters 168 173 // name 169 TiXmlElement* element;170 174 char* temp; 171 c har* string = grabParameter( root, "name");175 const char* string = grabParameter( root, "name"); 172 176 if( string == NULL) 173 177 { 174 PRINTF( ERR)("World is missing a proper 'name'\n");175 setStoryId( -1);178 PRINTF(1)("World is missing a proper 'name'\n"); 179 this->setStoryID( -1); 176 180 } 177 181 else 178 182 { 179 183 temp = new char[strlen(string + 2)]; 180 worldName = temp;184 this->worldName = temp; 181 185 } 182 186 … … 187 191 if( element == NULL) 188 192 { 189 PRINTF( ERR)("World is missing 'WorldEntities'\n");193 PRINTF(1)("World is missing 'WorldEntities'\n"); 190 194 } 191 195 else … … 197 201 WorldEntity* created = (WorldEntity*) loader->fabricate( element); 198 202 if( created != NULL) spawn( created); 199 element = element-> nextSiblingElement();203 element = element->NextSiblingElement(); 200 204 } 201 205 } … … 205 209 if( element == NULL) 206 210 { 207 PRINTF( ERR)("World is missing a 'Track'\n");211 PRINTF(1)("World is missing a 'Track'\n"); 208 212 } 209 213 else … … 225 229 testFont->buildFont("../data/pictures/font.tga"); 226 230 227 // initializing the TrackManager228 trackManager = TrackManager::getInstance();229 trackManager->addPoint(Vector(0,-5,0));230 trackManager->addPoint(Vector(10,0,5));231 trackManager->addPoint(Vector(20,0,-5));232 trackManager->addPoint(Vector(30,0,5));233 trackManager->addPoint(Vector(40,0,5));234 trackManager->setDuration(2);235 trackManager->setSavePoint();236 trackManager->addPoint(Vector(50,10,10));237 trackManager->addPoint(Vector(60,0, 10));238 trackManager->addPoint(Vector(70,0, 10));239 trackManager->addPoint(Vector(80,0,-10));240 trackManager->addPoint(Vector(90,0,-10));241 trackManager->setDuration(5);242 trackManager->setSavePoint();243 trackManager->addPoint(Vector(110,0,5));244 trackManager->addPoint(Vector(120,0, 10));245 trackManager->addPoint(Vector(130,0, 10));246 trackManager->addPoint(Vector(140,0,-10));247 trackManager->addPoint(Vector(150,0,-10));248 trackManager->setDuration(3);249 int fork11, fork12, fork13, fork14;250 trackManager->fork(4, &fork11, &fork12, &fork13, &fork14);251 trackManager->workOn(fork11);252 trackManager->addPoint(Vector(170, 0, -15));253 trackManager->addPoint(Vector(180, 0, -15));254 trackManager->setDuration(3);255 trackManager->workOn(fork12);256 trackManager->addPoint(Vector(170, 0, 10));257 trackManager->addPoint(Vector(180, 0, 10));258 trackManager->addPoint(Vector(190,2,5));259 trackManager->addPoint(Vector(200,2,5));260 trackManager->setDuration(7);261 int fork21, fork22;262 trackManager->fork(2, &fork21, &fork22);263 trackManager->workOn(fork21);264 trackManager->addPoint(Vector(220, 10,-10));265 trackManager->addPoint(Vector(230, 0,-10));266 trackManager->addPoint(Vector(240, 0, 2));267 trackManager->addPoint(Vector(250, 0, 0));268 trackManager->addPoint(Vector(260, 0, 5));269 trackManager->setDuration(3);270 trackManager->join(2, fork12, fork11);271 trackManager->workOn(fork22);272 trackManager->addPoint(Vector(220, -10,10));273 trackManager->addPoint(Vector(230, 0, 10));274 trackManager->addPoint(Vector(240, 0, 10));275 trackManager->addPoint(Vector(250, 0, 5));276 trackManager->setDuration(6);277 trackManager->workOn(fork13);278 trackManager->addPoint(Vector(200,-10,5));279 trackManager->addPoint(Vector(250,-10,5));280 trackManager->setDuration(3);281 trackManager->workOn(fork14);282 trackManager->addPoint(Vector(200,15,0));283 trackManager->addPoint(Vector(210,0,10));284 trackManager->setDuration(1);285 trackManager->join(4, fork21, fork22, fork13, fork14);286 trackManager->workOn(10);287 trackManager->addPoint(Vector(250,-10,5));288 trackManager->addPoint(Vector(260,-10,5));289 trackManager->finalize();290 291 231 /*monitor progress*/ 292 232 this->glmis->step(); -
orxonox/branches/levelloader/src/story_entities/world.h
r3525 r3530 8 8 9 9 #include "stdincl.h" 10 10 11 #include "story_entity.h" 11 12 12 13 13 class TrackManager; … … 25 25 it is the main driving factor during gameplay. 26 26 */ 27 //#define SUBCLASS(x,y) class x : public y { 28 29 //SUBCLASS(World,StoryEntity) 27 30 class World : public StoryEntity { 28 31 29 32 public: 30 World (TiXmlElement* root) ,33 World (TiXmlElement* root); 31 34 World (char* name); 32 35 World (int worldID); … … 92 95 }; 93 96 94 CREATE_FACTORY(World);95 96 97 #endif /* _WORLD_H */ -
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 } -
orxonox/branches/levelloader/src/track_manager.h
r3525 r3530 14 14 #include "stdincl.h" 15 15 #include "curve.h" 16 #include "substring.h" 16 17 17 18 class PNode; … … 38 39 TrackElement* findByID(unsigned int trackID); 39 40 TrackElement* findByName(const char* trackName); 40 41 void setName( const char* trackName); 42 41 43 bool isFresh; //!< If no Points where added until now 42 44 bool isHotPoint; //!< If the first node is a specialPoint; … … 112 114 113 115 TrackElement* findTrackElementByID(unsigned int trackID) const; 114 TrackElement* findTrackElementByName(c har* trackName) const;116 TrackElement* findTrackElementByName(const char* trackName) const; 115 117 116 118 public: … … 133 135 void joinV(unsigned int count, int* trackIDs); 134 136 void finalize(void); 135 void forkS( c har* string);136 void joinS( c har* string);137 void workOnS( c har* string);137 void forkS( const char* string); 138 void joinS( const char* string); 139 void workOnS( const char* string); 138 140 139 141 // Method to load track data from file
Note: See TracChangeset
for help on using the changeset viewer.