Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/main_reto/include/RunManager.h @ 133

Last change on this file since 133 was 133, checked in by rgrieder, 16 years ago
File size: 2.0 KB
Line 
1#ifndef __RunManager__
2#define __RunManager__
3
4#include "Ogre.h"
5#include "OgreStringConverter.h"
6#include "OgreException.h"
7
8#include "OgreControl.h"
9#include "OrxonoxScene.h"
10#include "OrxonoxShip.h"
11#include "SteerableNode.h"
12
13//Use this define to signify OIS will be used as a DLL
14//(so that dll import/export macros are in effect)
15#define OIS_DYNAMIC_LIB
16#include <OIS/OIS.h>
17
18using namespace Ogre;
19
20
21// let the class inherit from WindowEventListener in order for the RunMgr
22// to act as the central point of all the calcuations in Orxonox
23class RunManager : WindowEventListener
24{
25public:
26        RunManager(OgreControl*, bool = false, bool = false, bool = false);
27
28        virtual ~RunManager();
29
30        virtual bool tick(unsigned long, float);
31
32protected:
33        OgreControl  *mOgre;
34
35        SceneManager *mSceneMgr;
36        RenderWindow* mWindow;
37
38        OrxonoxScene *mScene;
39        Camera* mCamera;
40        SceneNode *mShipNode;
41        OrxonoxShip *mShip;
42
43        bool mStatsOn;
44
45        std::string mDebugText;
46
47        unsigned int mNumScreenShots;
48        // just to stop toggles flipping too fast
49        Real mTimeUntilNextToggle ;
50        TextureFilterOptions mFiltering;
51        int mAniso;
52
53        int mSceneDetailIndex ;
54        Overlay* mDebugOverlay;
55
56        //OIS Input devices
57        OIS::InputManager* mInputManager;
58        OIS::Mouse*    mMouse;
59        OIS::Keyboard* mKeyboard;
60        OIS::JoyStick* mJoy;
61
62        bool leftButtonDown;
63        Bullet **mBullets;
64        int mBulletsSize;
65        int mBulletsPosition;
66
67        // previously elapsed render time
68        unsigned long mTime;
69
70        virtual void createCamera(void);
71
72        virtual void createViewports(void);
73
74
75        /** EVENT HANDLING **/
76
77        //Adjust mouse clipping area
78        virtual void windowResized(RenderWindow*);
79
80        //Unattach OIS before window shutdown (very important under Linux)
81        virtual void windowClosed(RenderWindow*);
82
83
84        /** INPUT PROCESSING **/
85        virtual bool processUnbufferedKeyInput();
86
87        virtual bool processUnbufferedMouseInput();
88
89
90        /** OUTPUT **/
91
92        virtual void updateStats(void);
93
94        virtual void showDebugOverlay(bool);
95
96};
97
98#endif
Note: See TracBrowser for help on using the repository browser.