Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 24, 2008, 1:12:31 PM (16 years ago)
Author:
rgrieder
Message:
  • AudioManager is now Tickable
  • NPC update moved to its tick-function
  • corrected CMakeLists
  • added a few window properties to GraphicsEngine
  • OrxListener has been completely replaced
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/orxonox/Orxonox.cc

    r918 r919  
    6767network::Server *server_g;
    6868
    69 
    7069// objects
    7170#include "tools/Timer.h"
    72 #include "tools/OrxListener.h"
    7371#include "core/ArgReader.h"
    7472#include "core/Debug.h"
     
    7977#include "objects/weapon/BulletManager.h"
    8078
     79#include "InputHandler.h"
     80
    8181#include "Orxonox.h"
    8282
     
    9595    this->auMan_ = 0;
    9696    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;
    100101    this->frameListener_ = 0;
    101102    this->root_ = 0;
     
    187188    //setupInputSystem();
    188189   
    189     createFrameListener();
    190    
    191190    startRenderLoop();
    192191  }
     
    201200    setupInputSystem();
    202201   
    203     createFrameListener();
    204202    server_g->open();
    205203   
     
    215213    setupScene();
    216214    setupInputSystem();
    217    
    218     createFrameListener();
    219215   
    220216    startRenderLoop();
     
    380376  void Orxonox::setupInputSystem()
    381377  {
    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;
    383383    std::ostringstream windowHndStr;
    384384    OIS::ParamList pl;
     
    403403    {
    404404      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    }*/
    430406  }
    431407
     
    444420    means of the recent most dt_n-1, dt_n-2, etc.
    445421  */
    446   void Orxonox::mainLoop()
     422  void Orxonox::startRenderLoop()
    447423  {
    448424    // use the ogre timer class to measure time.
Note: See TracChangeset for help on using the changeset viewer.