Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 13, 2005, 5:16:24 PM (19 years ago)
Author:
chris
Message:

orxonox/branches/levelloader: Implemented support for loading tracks in the WorldDataFiles

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/levelloader/src/track_manager.h

    r3499 r3523  
    1616
    1717class PNode;
     18class TrackNamer;
    1819
    1920//! condition for choosing a certain Path. \todo implement a useful way.
     
    106107  int trackElemCount;                 //!< The count of TrackElements that exist.
    107108  PNode* bindSlave;
     109        TrackNamer* namer;
    108110 
    109111  void initChildren(unsigned int childCount);
     
    130132  void joinV(unsigned int count, int* trackIDs);
    131133  void finalize(void);
     134        void forkS( char* string);
     135        void joinS( char* string);
     136        void workOnS( char* string);
     137
     138        // Method to load track data from file
     139        void loadTrack( TiXMLElement* root);
    132140
    133141  // Methods to calculate the position on the Path (runtime)
     
    145153};
    146154
     155typedef struct
     156{
     157        int ID;
     158        char* name;
     159        struct TrackIdentifier *next;
     160} TrackIdentifier;
     161
     162class TrackNamer
     163{
     164        public:
     165                TrackNamer() { first = NULL};
     166                ~TrackNamer();
     167               
     168                int getIDof( const char* name);
     169                const char* getNameof( int ID);
     170                void add( const char* name, int ID);
     171       
     172        private:
     173                TrackIdentifier* first;
     174};
     175
    147176#endif /* _TRACK_MANAGER_H */
Note: See TracChangeset for help on using the changeset viewer.