Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 4, 2007, 5:00:41 PM (16 years ago)
Author:
rgrieder
Message:
  • added namespace Orxonox to every file
    • removed all the "using namespace Ogre" in the header files
  • cleaned up with the includes: attempt to include as little as possible to reduce compile time.
    • created a header file: orxonox_prerequisites.h
    • used OgrePrerequisites in the header files
    • avoided including "Ogre.h", using separate files instead
  • created empty class: AmmunitionDump
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/main_reto_vs05/include/run_manager.h

    r159 r161  
    3030#define RUN_MANAGER_H
    3131
    32 #include "Ogre.h"
    33 #include "OgreStringConverter.h"
    34 #include "OgreException.h"
     32#include "OgrePrerequisites.h"
     33#include "OgreWindowEventUtilities.h"
     34#include "OgreTextureManager.h"
    3535
    36 #include "ogre_control.h"
    37 #include "orxonox_scene.h"
    38 #include "orxonox_ship.h"
     36#include <OIS/OISPrereqs.h>
     37
     38#include "Orxonox_prerequisites.h"
    3939
    4040
    41 //Use this define to signify OIS will be used as a DLL
    42 //(so that dll import/export macros are in effect)
    43 #define OIS_DYNAMIC_LIB
    44 #include <OIS/OIS.h>
     41namespace Orxonox {
    4542
    46 using namespace Ogre;
     43  // let the class inherit from WindowEventListener in order for the RunMgr
     44  // to act as the central point of all the calcuations in Orxonox
     45  class RunManager : Ogre::WindowEventListener
     46  {
     47  public:
     48          RunManager(OgreControl*);
     49
     50          virtual ~RunManager();
     51
     52    virtual bool tick(unsigned long, Ogre::Real);
     53
     54  protected:
     55          virtual void createCamera(void);
     56
     57          virtual void createViewports(void);
    4758
    4859
    49 // let the class inherit from WindowEventListener in order for the RunMgr
    50 // to act as the central point of all the calcuations in Orxonox
    51 class RunManager : WindowEventListener
    52 {
    53 public:
    54         RunManager(OgreControl*);
     60          /** EVENT HANDLING **/
    5561
    56         virtual ~RunManager();
     62          //Adjust mouse clipping area
     63          virtual void windowResized(Ogre::RenderWindow*);
    5764
    58         virtual bool tick(unsigned long, Real);
    59 
    60 protected:
    61         virtual void createCamera(void);
    62 
    63         virtual void createViewports(void);
     65          //Unattach OIS before window shutdown (very important under Linux)
     66          virtual void windowClosed(Ogre::RenderWindow*);
    6467
    6568
    66         /** EVENT HANDLING **/
     69          /** INPUT PROCESSING **/
     70          virtual bool processUnbufferedKeyInput();
    6771
    68         //Adjust mouse clipping area
    69         virtual void windowResized(RenderWindow*);
    70 
    71         //Unattach OIS before window shutdown (very important under Linux)
    72         virtual void windowClosed(RenderWindow*);
     72          virtual bool processUnbufferedMouseInput();
    7373
    7474
    75         /** INPUT PROCESSING **/
    76         virtual bool processUnbufferedKeyInput();
     75          /** OUTPUT **/
    7776
    78         virtual bool processUnbufferedMouseInput();
     77          virtual void updateStats(void);
    7978
     79          virtual void showDebugOverlay(bool);
    8080
    81         /** OUTPUT **/
     81  protected:
     82          Ogre::SceneManager *sceneMgr_;
     83          Ogre::RenderWindow *window_;
     84          Ogre::Camera       *camera_;
     85          OgreControl  *ogre_;
     86          OrxonoxScene *backgroundScene_;
     87          OrxonoxShip  *playerShip_;
    8288
    83         virtual void updateStats(void);
     89          bool statsOn_;
     90          std::string debugText_;
    8491
    85         virtual void showDebugOverlay(bool);
     92          unsigned int screenShotCounter_;
     93          // just to stop toggles flipping too fast
     94          Ogre::Real timeUntilNextToggle_;
     95          bool leftButtonDown_;
     96          Ogre::TextureFilterOptions filtering_;
     97          int aniso_;
    8698
    87 protected:
    88         OgreControl  *ogre_;
    89         SceneManager *sceneMgr_;
    90         RenderWindow *window_;
    91         OrxonoxScene *backgroundScene_;
    92         Camera       *camera_;
    93         OrxonoxShip  *playerShip_;
     99          int sceneDetailIndex_;
     100          Ogre::Overlay* debugOverlay_;
    94101
    95         bool statsOn_;
    96         std::string debugText_;
     102          //OIS Input devices
     103          OIS::InputManager* inputManager_;
     104          OIS::Mouse*    mouse_;
     105          OIS::Keyboard* keyboard_;
     106          OIS::JoyStick* joystick_;
    97107
    98         unsigned int screenShotCounter_;
    99         // just to stop toggles flipping too fast
    100         Real timeUntilNextToggle_;
    101         bool leftButtonDown_;
    102         TextureFilterOptions filtering_;
    103         int aniso_;
     108    const Ogre::Real mouseSensitivity_;
    104109
    105         int sceneDetailIndex_;
    106         Overlay* debugOverlay_;
     110    // Bullet array
     111          Bullet **bullets_;
     112          int bulletsSize_;
     113          int bulletsIndex_;
    107114
    108         //OIS Input devices
    109         OIS::InputManager* inputManager_;
    110         OIS::Mouse*    mouse_;
    111         OIS::Keyboard* keyboard_;
    112         OIS::JoyStick* joystick_;
     115          // previously elapsed render time
     116          unsigned long totalTime_;
    113117
    114   const Real mouseSensitivity_;
     118  };
    115119
    116   // Bullet array
    117         Bullet **bullets_;
    118         int bulletsSize_;
    119         int bulletsIndex_;
    120 
    121         // previously elapsed render time
    122         unsigned long totalTime_;
    123 
    124 };
     120}
    125121
    126122#endif /* RUN_MANAGER_H */
Note: See TracChangeset for help on using the changeset viewer.