Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1249


Ignore:
Timestamp:
May 8, 2008, 1:29:38 PM (16 years ago)
Author:
rgrieder
Message:
  • added initialiser lists
Location:
code/branches/ogre/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ogre/src/core/Debug.h

    r1219 r1249  
    273273#define CCOUT_EXEC(x) \
    274274  orxonox::OutputHandler::getOutStream().setOutputLevel(x) \
    275   << "*** " << this->getIdentifier()->getName() << ": "
     275  << this->getIdentifier()->getName() << ": "
    276276
    277277#ifndef CCOUT
  • code/branches/ogre/src/orxonox/GraphicsEngine.cc

    r1244 r1249  
    5252    @return The only instance of GraphicsEngine.
    5353  */
    54   GraphicsEngine& GraphicsEngine::getSingleton()
     54  /*static*/ GraphicsEngine& GraphicsEngine::getSingleton()
    5555  {
    5656    static GraphicsEngine theOnlyInstance;
     
    6161    @brief Only use constructor to initialise variables and pointers!
    6262  */
    63   GraphicsEngine::GraphicsEngine()
     63  GraphicsEngine::GraphicsEngine() :
     64    root_(0),
     65    scene_(0),
     66    renderWindow_(0),
     67    //configPath_(""),
     68    dataPath_(""),
     69    ogreLogfile_("")
    6470  {
    6571    RegisterObject(GraphicsEngine);
    66     // set to standard values
    67     this->configPath_ = "";
    68     this->root_ = 0;
    69     this->scene_ = 0;
    70     this->renderWindow_ = 0;
     72
    7173    this->setConfigValues();
    7274    CCOUT(4) << "Constructed" << std::endl;
     75  }
     76
     77  void GraphicsEngine::setConfigValues()
     78  {
     79    SetConfigValue(dataPath_, "../../Media/").description("relative path to media data");
     80    SetConfigValue(ogreLogfile_, "ogre.log").description("Logfile for messages from Ogre. Use \"\" to suppress log file creation.");
     81    SetConfigValue(ogreLogLevelTrivial_ , 5).description("Corresponding orxonox debug level for ogre Trivial");
     82    SetConfigValue(ogreLogLevelNormal_  , 4).description("Corresponding orxonox debug level for ogre Normal");
     83    SetConfigValue(ogreLogLevelCritical_, 2).description("Corresponding orxonox debug level for ogre Critical");
    7384  }
    7485
     
    102113    }
    103114    COUT(4) << "Destroying objects done" << std::endl;
    104   }
    105 
    106   void GraphicsEngine::setConfigValues()
    107   {
    108     SetConfigValue(dataPath_, "../../Media/").description("relative path to media data");
    109     SetConfigValue(ogreLogfile_, "ogre.log").description("Logfile for messages from Ogre. Use \"\" to suppress log file creation.");
    110     SetConfigValue(ogreLogLevelTrivial_ , 5).description("Corresponding orxonox debug level for ogre Trivial");
    111     SetConfigValue(ogreLogLevelNormal_  , 4).description("Corresponding orxonox debug level for ogre Normal");
    112     SetConfigValue(ogreLogLevelCritical_, 2).description("Corresponding orxonox debug level for ogre Critical");
    113115  }
    114116
  • code/branches/ogre/src/orxonox/GraphicsEngine.h

    r1244 r1249  
    9494            Ogre::RenderWindow* renderWindow_;//!< the current render window
    9595            //bool               bOverwritePath_; //!< overwrites path
    96             std::string         configPath_;  //!< path to config file
     96            //std::string         configPath_;  //!< path to config file
    9797            std::string         dataPath_;    //!< path to data file
    9898            std::string         ogreLogfile_; //!< log file name for Ogre log messages
  • code/branches/ogre/src/orxonox/Main.cc

    r1214 r1249  
    7878    Orxonox* orx = Orxonox::getSingleton();
    7979
     80    bool res = false;
    8081#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_APPLE
    81     orx->init(argc, argv, macBundlePath());
     82    res = orx->init(argc, argv, macBundlePath());
    8283#else
    83     orx->init(argc, argv, "");
     84    res = orx->init(argc, argv, "");
    8485#endif
    8586
    86     orx->start();
     87    if (res)
     88      orx->start();
    8789    orx->destroySingleton();
    8890  /*}
  • code/branches/ogre/src/orxonox/Orxonox.cc

    r1244 r1249  
    158158   * Create a new instance of Orxonox. Avoid doing any actual work here.
    159159   */
    160   Orxonox::Orxonox()
    161   {
    162     this->mode_ = STANDALONE;
    163     this->serverIp_ = "";
    164     this->ogre_ = &GraphicsEngine::getSingleton();
    165     this->timer_ = 0;
    166     //this->auMan_ = 0;
    167     this->orxonoxHUD_ = 0;
    168     this->inputHandler_ = 0;
     160  Orxonox::Orxonox() :
     161    ogre_(&GraphicsEngine::getSingleton()),
     162    //auMan_(0),
     163    timer_(0),
    169164    // turn on frame smoothing by setting a value different from 0
    170     this->frameSmoothingTime_ = 0.0f;
    171     this->bAbort_ = false;
    172     this->timefactor_ = 1.0f;
     165    frameSmoothingTime_(0.0f),
     166    orxonoxConsole_(0),
     167    orxonoxHUD_(0),
     168    bAbort_(false),
     169    timefactor_(1.0f),
     170    mode_(STANDALONE),
     171    serverIp_("")
     172  {
    173173  }
    174174
  • code/branches/ogre/src/orxonox/Orxonox.h

    r1243 r1249  
    9494      GraphicsEngine*       ogre_;          //!< our dearest graphics engine <3
    9595      //audio::AudioManager*  auMan_;         //!< audio manager
    96       InputManager*         inputHandler_;  //!< Handles input with key bindings
    9796      Ogre::Timer*          timer_;         //!< Main loop timer
    9897      // TODO: make this a config-value by creating a config class for orxonox
  • code/branches/ogre/src/orxonox/console/InGameConsole.cc

    r1223 r1249  
    5454    const float BLINK = 0.25;
    5555
    56     InGameConsole::InGameConsole(InputBuffer* ib){
     56    InGameConsole::InGameConsole(InputBuffer* ib) :
     57        windowW(0), windowH(0),
     58        scroll(0), scrollTimer(0.0f),
     59        cursor(0.0f),
     60        active(false),
     61        ib_(ib),
     62        om(0),
     63        consoleOverlay(0),
     64        consoleOverlayContainer(0),
     65        consoleOverlayNoise(0),
     66        consoleOverlayBorder(0),
     67        consoleOverlayTextAreas(0)
     68    {
    5769        //RegisterObject(InGameConsole);
    58         ib_ = ib;
    59         active = false;
    60         cursor = 0.0;
    6170        init();
    6271    }
Note: See TracChangeset for help on using the changeset viewer.