Changeset 1249
- Timestamp:
- May 8, 2008, 1:29:38 PM (17 years ago)
- Location:
- code/branches/ogre/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ogre/src/core/Debug.h
r1219 r1249 273 273 #define CCOUT_EXEC(x) \ 274 274 orxonox::OutputHandler::getOutStream().setOutputLevel(x) \ 275 << "*** " <<this->getIdentifier()->getName() << ": "275 << this->getIdentifier()->getName() << ": " 276 276 277 277 #ifndef CCOUT -
code/branches/ogre/src/orxonox/GraphicsEngine.cc
r1244 r1249 52 52 @return The only instance of GraphicsEngine. 53 53 */ 54 GraphicsEngine& GraphicsEngine::getSingleton()54 /*static*/ GraphicsEngine& GraphicsEngine::getSingleton() 55 55 { 56 56 static GraphicsEngine theOnlyInstance; … … 61 61 @brief Only use constructor to initialise variables and pointers! 62 62 */ 63 GraphicsEngine::GraphicsEngine() 63 GraphicsEngine::GraphicsEngine() : 64 root_(0), 65 scene_(0), 66 renderWindow_(0), 67 //configPath_(""), 68 dataPath_(""), 69 ogreLogfile_("") 64 70 { 65 71 RegisterObject(GraphicsEngine); 66 // set to standard values 67 this->configPath_ = ""; 68 this->root_ = 0; 69 this->scene_ = 0; 70 this->renderWindow_ = 0; 72 71 73 this->setConfigValues(); 72 74 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"); 73 84 } 74 85 … … 102 113 } 103 114 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");113 115 } 114 116 -
code/branches/ogre/src/orxonox/GraphicsEngine.h
r1244 r1249 94 94 Ogre::RenderWindow* renderWindow_;//!< the current render window 95 95 //bool bOverwritePath_; //!< overwrites path 96 std::string configPath_; //!< path to config file96 //std::string configPath_; //!< path to config file 97 97 std::string dataPath_; //!< path to data file 98 98 std::string ogreLogfile_; //!< log file name for Ogre log messages -
code/branches/ogre/src/orxonox/Main.cc
r1214 r1249 78 78 Orxonox* orx = Orxonox::getSingleton(); 79 79 80 bool res = false; 80 81 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_APPLE 81 orx->init(argc, argv, macBundlePath());82 res = orx->init(argc, argv, macBundlePath()); 82 83 #else 83 orx->init(argc, argv, "");84 res = orx->init(argc, argv, ""); 84 85 #endif 85 86 86 orx->start(); 87 if (res) 88 orx->start(); 87 89 orx->destroySingleton(); 88 90 /*} -
code/branches/ogre/src/orxonox/Orxonox.cc
r1244 r1249 158 158 * Create a new instance of Orxonox. Avoid doing any actual work here. 159 159 */ 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), 169 164 // 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 { 173 173 } 174 174 -
code/branches/ogre/src/orxonox/Orxonox.h
r1243 r1249 94 94 GraphicsEngine* ogre_; //!< our dearest graphics engine <3 95 95 //audio::AudioManager* auMan_; //!< audio manager 96 InputManager* inputHandler_; //!< Handles input with key bindings97 96 Ogre::Timer* timer_; //!< Main loop timer 98 97 // TODO: make this a config-value by creating a config class for orxonox -
code/branches/ogre/src/orxonox/console/InGameConsole.cc
r1223 r1249 54 54 const float BLINK = 0.25; 55 55 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 { 57 69 //RegisterObject(InGameConsole); 58 ib_ = ib;59 active = false;60 cursor = 0.0;61 70 init(); 62 71 }
Note: See TracChangeset
for help on using the changeset viewer.