Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 12, 2007, 7:54:44 PM (16 years ago)
Author:
nicolape
Message:

Level loader working, see test1 class

Location:
code/branches/FICN/src/orxonox
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/orxonox/CMakeLists.txt

    r462 r480  
    3232  objects
    3333  weapon
     34  xml
    3435)
    3536
  • code/branches/FICN/src/orxonox/core/OrxonoxClass.h

    r474 r480  
    9292            inline const bool isVisible() const { return this->bVisible_; }
    9393
    94                         //virtual void loadParams(TIXMLNode n);
    9594
    9695        private:
  • code/branches/FICN/src/orxonox/objects/BaseObject.cc

    r258 r480  
    1313    {
    1414    }
     15   
    1516}
  • code/branches/FICN/src/orxonox/objects/BaseObject.h

    r384 r480  
    1111            BaseObject();
    1212            virtual ~BaseObject();
     13                        virtual void loadParams(TiXmlElement* xmlElem) {}
     14           
    1315    };
    1416}
  • code/branches/FICN/src/orxonox/objects/CMakeLists.txt

    r376 r480  
    99
    1010ADD_LIBRARY(objects SHARED ${OBJECTS_SRC_FILES})
     11
     12TARGET_LINK_LIBRARIES( objects
     13  xml
     14)
  • code/branches/FICN/src/orxonox/objects/test1.cc

    r384 r480  
    22#include "test2.h"
    33#include "test3.h"
     4#include "../../tinyxml/tinyxml.h"
    45
    56namespace orxonox
     
    6667        this->usefullClass3_ = identifier;
    6768    }
     69   
     70    void Test1::loadParams(TiXmlElement* xmlElem)
     71    {
     72        std::cout<< xmlElem->GetText()<<std::endl;
     73    }
    6874}
  • code/branches/FICN/src/orxonox/objects/test1.h

    r384 r480  
    55#include "Tickable.h"
    66#include "test3.h"
     7#include "../../tinyxml/tinyxml.h"
    78
    89namespace orxonox
     
    2223            void setUsefullClass2(Identifier* identifier);
    2324            void setUsefullClassOfTypeTest3(Identifier* identifier);
     25           
     26            void loadParams(TiXmlElement* xmlElem);
    2427
    2528        private:
  • code/branches/FICN/src/orxonox/orxonox.cc

    r473 r480  
    218218  {
    219219    //TODO: start modules
    220     ogre_->startRender();
    221     auMan_ = new audio::AudioManager();
    222     // load this file from config
    223     string levelFile = "sample.oxw";
    224     //loader_ = new loader::LevelLoader(levelFile);
     220
    225221    //TODO: run engine
    226222  }
     
    339335  void Orxonox::createScene(void)
    340336  {
     337        // Init audio
    341338    auMan_ = new audio::AudioManager();
    342 
     339   
     340    // load this file from config
     341    loader_ = new loader::LevelLoader("sample.oxw");
     342    loader_->loadLevel();
     343
     344        /*
    343345    auMan_->ambientAdd("a1");
    344346    auMan_->ambientAdd("a2");
     
    346348                                //auMan->ambientAdd("ambient1");
    347349    auMan_->ambientStart();
    348 
    349     string levelFile = "sp_level_moonstation.oxw";
    350 //       loader::LevelLoader* loader = new loader::LevelLoader(levelFile);
     350        */
    351351  }
    352352
Note: See TracChangeset for help on using the changeset viewer.