Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 27, 2007, 3:02:03 PM (16 years ago)
Author:
rgrieder
Message:
  • updated to current revision from Visual studio directory
  • hopefully working libraries with cmake
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/main_reto/src/run_manager.h

    r190 r267  
    3333#include "OgreWindowEventUtilities.h"
    3434#include "OgreTextureManager.h"
     35#include "OgreSingleton.h"
    3536
    3637#include <OIS/OISPrereqs.h>
     
    4344  // let the class inherit from WindowEventListener in order for the RunMgr
    4445  // to act as the central point of all the calcuations in Orxonox
    45   class RunManager : Ogre::WindowEventListener
     46  class RunManager : public Ogre::WindowEventListener,
     47                     public Ogre::Singleton<RunManager>
    4648  {
    4749  public:
    48           RunManager(OgreControl*);
     50    RunManager(OgreControl*);
    4951
    50           virtual ~RunManager();
     52    virtual ~RunManager();
     53    //void initialise(OgreControl*);
    5154
    52     virtual bool tick(unsigned long, Ogre::Real);
     55    bool tick(unsigned long, Ogre::Real);
     56
     57    Ogre::SceneManager& getSceneManager();
     58
     59    Ogre::SceneManager* getSceneManagerPtr();
     60
     61    weapon::BulletManager* getBulletManagerPtr();
     62
     63    int getAmmunitionID(const Ogre::String&);
     64
     65    int getNumberOfAmmos();
     66
     67    static RunManager& getSingleton(void);
     68
     69    static RunManager* getSingletonPtr(void);
     70
    5371
    5472  protected:
    55           virtual void createCamera(void);
     73          void createCamera(void);
    5674
    57           virtual void createViewports(void);
     75          void createViewports(void);
    5876
    5977
     
    6179
    6280          //Adjust mouse clipping area
    63           virtual void windowResized(Ogre::RenderWindow*);
     81          void windowResized(Ogre::RenderWindow*);
    6482
    6583          //Unattach OIS before window shutdown (very important under Linux)
    66           virtual void windowClosed(Ogre::RenderWindow*);
     84          void windowClosed(Ogre::RenderWindow*);
    6785
    6886
    6987          /** INPUT PROCESSING **/
    70           virtual bool processUnbufferedKeyInput();
     88          bool processUnbufferedKeyInput();
    7189
    72           virtual bool processUnbufferedMouseInput();
     90          bool processUnbufferedMouseInput();
    7391
    7492
    7593          /** OUTPUT **/
    7694
    77           virtual void updateStats(void);
     95          void updateStats(void);
    7896
    79           virtual void showDebugOverlay(bool);
     97          void showDebugOverlay(bool);
    8098
    8199  protected:
     100    // directly Ogre related fields
    82101          Ogre::SceneManager *sceneMgr_;
    83102          Ogre::RenderWindow *window_;
    84103          Ogre::Camera       *camera_;
     104
     105
     106    // self made orxonox fields
    85107          OgreControl  *ogre_;
    86108          OrxonoxScene *backgroundScene_;
    87109          OrxonoxShip  *playerShip_;
     110    hud::HUDOverlay   *hud_;
    88111
     112    // Bullet manager
     113    weapon::BulletManager *bulletManager_;
     114
     115    const Ogre::Real mouseSensitivity_;
     116
     117          // previously elapsed render time
     118          unsigned long totalTime_;
     119
     120
     121    // fields from the example framework
    89122          bool statsOn_;
    90123          std::string debugText_;
     
    93126          // just to stop toggles flipping too fast
    94127          Ogre::Real timeUntilNextToggle_;
    95           bool leftButtonDown_;
     128          //bool leftButtonDown_;
    96129          Ogre::TextureFilterOptions filtering_;
    97130          int aniso_;
    98 
    99131          int sceneDetailIndex_;
    100132          Ogre::Overlay* debugOverlay_;
     
    106138          OIS::JoyStick* joystick_;
    107139
    108     const Ogre::Real mouseSensitivity_;
    109 
    110     // Bullet array
    111           /*Bullet **bullets_;
    112           int bulletsSize_;
    113           int bulletsIndex_;*/
    114     weapon::BulletManager *bulletManager_;
    115 
    116           // previously elapsed render time
    117           unsigned long totalTime_;
    118 
    119140  };
    120141
Note: See TracChangeset for help on using the changeset viewer.