Changeset 919 for code/branches/network/src/orxonox/Orxonox.cc
- Timestamp:
- Mar 24, 2008, 1:12:31 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/orxonox/Orxonox.cc
r918 r919 67 67 network::Server *server_g; 68 68 69 70 69 // objects 71 70 #include "tools/Timer.h" 72 #include "tools/OrxListener.h"73 71 #include "core/ArgReader.h" 74 72 #include "core/Debug.h" … … 79 77 #include "objects/weapon/BulletManager.h" 80 78 79 #include "InputHandler.h" 80 81 81 #include "Orxonox.h" 82 82 … … 95 95 this->auMan_ = 0; 96 96 this->singletonRef_ = 0; 97 this->keyboard_ = 0; 98 this->mouse_ = 0; 99 this->inputManager_ = 0; 97 //this->keyboard_ = 0; 98 //this->mouse_ = 0; 99 //this->inputManager_ = 0; 100 this->inputHandler_ = 0; 100 101 this->frameListener_ = 0; 101 102 this->root_ = 0; … … 187 188 //setupInputSystem(); 188 189 189 createFrameListener();190 191 190 startRenderLoop(); 192 191 } … … 201 200 setupInputSystem(); 202 201 203 createFrameListener();204 202 server_g->open(); 205 203 … … 215 213 setupScene(); 216 214 setupInputSystem(); 217 218 createFrameListener();219 215 220 216 startRenderLoop(); … … 380 376 void Orxonox::setupInputSystem() 381 377 { 382 size_t windowHnd = 0; 378 inputHandler_ = InputHandler::getSingleton(); 379 inputHandler_->initialise(ogre_->getWindowHandle(), 380 ogre_->getWindowWidth(), ogre_->getWindowHeight()); 381 382 /*size_t windowHnd = 0; 383 383 std::ostringstream windowHndStr; 384 384 OIS::ParamList pl; … … 403 403 { 404 404 throw new Ogre::Exception(42, e.eText, "OrxApplication::setupInputSystem"); 405 } 406 } 407 408 // FIXME we actually want to do this differently... 409 void Orxonox::createFrameListener() 410 { 411 frameListener_ = new OrxListener(keyboard_, auMan_, mode_); 412 } 413 414 void Orxonox::startRenderLoop() 415 { 416 // FIXME 417 // this is a hack!!! 418 // the call to reset the mouse clipping size should probably be somewhere 419 // else, however this works for the moment. 420 unsigned int width, height, depth; 421 int left, top; 422 ogre_->getRoot()->getAutoCreatedWindow()->getMetrics(width, height, depth, left, top); 423 424 if(mode_!=CLIENT){ 425 const OIS::MouseState &ms = mouse_->getMouseState(); 426 ms.width = width; 427 ms.height = height; 428 } 429 mainLoop(); 405 }*/ 430 406 } 431 407 … … 444 420 means of the recent most dt_n-1, dt_n-2, etc. 445 421 */ 446 void Orxonox:: mainLoop()422 void Orxonox::startRenderLoop() 447 423 { 448 424 // use the ogre timer class to measure time.
Note: See TracChangeset
for help on using the changeset viewer.