Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 5, 2008, 3:40:10 AM (17 years ago)
Author:
landauf
Message:
  • added exit command: quits orxonox (no, it's not a hidden segfault :D)
  • added exec command: executes files (that contain other commands)

funny: use the log function to write commands into orxonox.log and then use 'exec orxonox.log' - it works. I've even added a recursion-blocker to avoid an (almost) endless loop after logging 'exec orxonox.log' ;)

I'm currently thinking about more complex commands (what about delayed commands? or commands with returnvalue and a pipeline symbol?).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core2/src/orxonox/GraphicsEngine.cc

    r790 r993  
    4242namespace orxonox {
    4343
    44   using namespace Ogre;
    45 
    4644  GraphicsEngine::GraphicsEngine()
    4745  {
     
    7169    std::string plugin_filename = "plugins.cfg";
    7270#endif
    73     root_ = new Root(plugin_filename);
     71    root_ = new Ogre::Root(plugin_filename);
    7472  }
    7573
     
    7775   * @return scene manager
    7876   */
    79   SceneManager* GraphicsEngine::getSceneManager()
     77  Ogre::SceneManager* GraphicsEngine::getSceneManager()
    8078  {
    8179    if(!scene_)
    8280    {
    83       scene_ = root_->createSceneManager(ST_GENERIC, "Default SceneManager");
     81      scene_ = root_->createSceneManager(Ogre::ST_GENERIC, "Default SceneManager");
    8482      COUT(3) << "Info: Created SceneMan: " << scene_ << std::endl;
    8583    }
     
    9896  {
    9997    root_->initialise(true, "OrxonoxV2");
    100     TextureManager::getSingleton().setDefaultNumMipmaps(5);
    101     ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
     98    Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5);
     99    Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
    102100  }
    103101
     
    107105    //TODO: Work with ressource groups (should be generated by a special loader)
    108106    // Load resource paths from data file using configfile ressource type
    109     ConfigFile cf;
     107    Ogre::ConfigFile cf;
    110108    cf.load(dataPath + "resources.cfg");
    111109
    112110    // Go through all sections & settings in the file
    113     ConfigFile::SectionIterator seci = cf.getSectionIterator();
     111    Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
    114112
    115113    std::string secName, typeName, archName;
     
    117115    {
    118116      secName = seci.peekNextKey();
    119       ConfigFile::SettingsMultiMap *settings = seci.getNext();
    120       ConfigFile::SettingsMultiMap::iterator i;
     117      Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext();
     118      Ogre::ConfigFile::SettingsMultiMap::iterator i;
    121119      for (i = settings->begin(); i != settings->end(); ++i)
    122120      {
     
    124122        archName = i->second; // name (and location) of archive
    125123
    126         ResourceGroupManager::getSingleton().addResourceLocation(
     124        Ogre::ResourceGroupManager::getSingleton().addResourceLocation(
    127125                                           std::string(dataPath + archName),
    128126                                           typeName, secName);
Note: See TracChangeset for help on using the changeset viewer.