diff options
author | David Walter Seikel | 2014-01-13 19:47:58 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-01-13 19:47:58 +1000 |
commit | f9158592e1478b2013afc7041d9ed041cf2d2f4a (patch) | |
tree | b16e389d7988700e21b4c9741044cefa536dcbae /libraries/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceStub.h | |
parent | Libraries readme updated with change markers and more of the Irrlicht changes. (diff) | |
download | SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.zip SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.gz SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.bz2 SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.xz |
Update Irrlicht to 1.8.1. Include actual change markers this time. lol
Diffstat (limited to '')
-rw-r--r-- | libraries/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceStub.h | 186 |
1 files changed, 186 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceStub.h b/libraries/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceStub.h new file mode 100644 index 0000000..c6334fe --- /dev/null +++ b/libraries/irrlicht-1.8.1/source/Irrlicht/CIrrDeviceStub.h | |||
@@ -0,0 +1,186 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | ||
2 | // This file is part of the "Irrlicht Engine". | ||
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | ||
4 | |||
5 | #ifndef __C_IRR_DEVICE_STUB_H_INCLUDED__ | ||
6 | #define __C_IRR_DEVICE_STUB_H_INCLUDED__ | ||
7 | |||
8 | #include "IrrlichtDevice.h" | ||
9 | #include "IImagePresenter.h" | ||
10 | #include "SIrrCreationParameters.h" | ||
11 | #include "CVideoModeList.h" | ||
12 | |||
13 | namespace irr | ||
14 | { | ||
15 | // lots of prototypes: | ||
16 | class ILogger; | ||
17 | class CLogger; | ||
18 | class IRandomizer; | ||
19 | |||
20 | namespace gui | ||
21 | { | ||
22 | class IGUIEnvironment; | ||
23 | IGUIEnvironment* createGUIEnvironment(io::IFileSystem* fs, | ||
24 | video::IVideoDriver* Driver, IOSOperator* op); | ||
25 | } | ||
26 | |||
27 | namespace scene | ||
28 | { | ||
29 | ISceneManager* createSceneManager(video::IVideoDriver* driver, | ||
30 | io::IFileSystem* fs, gui::ICursorControl* cc, gui::IGUIEnvironment *gui); | ||
31 | } | ||
32 | |||
33 | namespace io | ||
34 | { | ||
35 | IFileSystem* createFileSystem(); | ||
36 | } | ||
37 | |||
38 | namespace video | ||
39 | { | ||
40 | IVideoDriver* createSoftwareDriver(const core::dimension2d<u32>& windowSize, | ||
41 | bool fullscreen, io::IFileSystem* io, | ||
42 | video::IImagePresenter* presenter); | ||
43 | IVideoDriver* createBurningVideoDriver(const irr::SIrrlichtCreationParameters& params, | ||
44 | io::IFileSystem* io, video::IImagePresenter* presenter); | ||
45 | IVideoDriver* createNullDriver(io::IFileSystem* io, const core::dimension2d<u32>& screenSize); | ||
46 | } | ||
47 | |||
48 | |||
49 | |||
50 | //! Stub for an Irrlicht Device implementation | ||
51 | class CIrrDeviceStub : public IrrlichtDevice | ||
52 | { | ||
53 | public: | ||
54 | |||
55 | //! constructor | ||
56 | CIrrDeviceStub(const SIrrlichtCreationParameters& param); | ||
57 | |||
58 | //! destructor | ||
59 | virtual ~CIrrDeviceStub(); | ||
60 | |||
61 | //! returns the video driver | ||
62 | virtual video::IVideoDriver* getVideoDriver(); | ||
63 | |||
64 | //! return file system | ||
65 | virtual io::IFileSystem* getFileSystem(); | ||
66 | |||
67 | //! returns the gui environment | ||
68 | virtual gui::IGUIEnvironment* getGUIEnvironment(); | ||
69 | |||
70 | //! returns the scene manager | ||
71 | virtual scene::ISceneManager* getSceneManager(); | ||
72 | |||
73 | //! \return Returns a pointer to the mouse cursor control interface. | ||
74 | virtual gui::ICursorControl* getCursorControl(); | ||
75 | |||
76 | //! Returns a pointer to a list with all video modes supported by the gfx adapter. | ||
77 | virtual video::IVideoModeList* getVideoModeList(); | ||
78 | |||
79 | //! Returns a pointer to the ITimer object. With it the current Time can be received. | ||
80 | virtual ITimer* getTimer(); | ||
81 | |||
82 | //! Returns the version of the engine. | ||
83 | virtual const char* getVersion() const; | ||
84 | |||
85 | //! send the event to the right receiver | ||
86 | virtual bool postEventFromUser(const SEvent& event); | ||
87 | |||
88 | //! Sets a new event receiver to receive events | ||
89 | virtual void setEventReceiver(IEventReceiver* receiver); | ||
90 | |||
91 | //! Returns pointer to the current event receiver. Returns 0 if there is none. | ||
92 | virtual IEventReceiver* getEventReceiver(); | ||
93 | |||
94 | //! Sets the input receiving scene manager. | ||
95 | /** If set to null, the main scene manager (returned by GetSceneManager()) will receive the input */ | ||
96 | virtual void setInputReceivingSceneManager(scene::ISceneManager* sceneManager); | ||
97 | |||
98 | //! Returns a pointer to the logger. | ||
99 | virtual ILogger* getLogger(); | ||
100 | |||
101 | //! Provides access to the engine's currently set randomizer. | ||
102 | virtual IRandomizer* getRandomizer() const; | ||
103 | |||
104 | //! Sets a new randomizer. | ||
105 | virtual void setRandomizer(IRandomizer* r); | ||
106 | |||
107 | //! Creates a new default randomizer. | ||
108 | virtual IRandomizer* createDefaultRandomizer() const; | ||
109 | |||
110 | //! Returns the operation system opertator object. | ||
111 | virtual IOSOperator* getOSOperator(); | ||
112 | |||
113 | //! Checks if the window is running in fullscreen mode. | ||
114 | virtual bool isFullscreen() const; | ||
115 | |||
116 | //! get color format of the current window | ||
117 | virtual video::ECOLOR_FORMAT getColorFormat() const; | ||
118 | |||
119 | //! Activate any joysticks, and generate events for them. | ||
120 | virtual bool activateJoysticks(core::array<SJoystickInfo> & joystickInfo); | ||
121 | |||
122 | //! Set the current Gamma Value for the Display | ||
123 | virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ); | ||
124 | |||
125 | //! Get the current Gamma Value for the Display | ||
126 | virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue, f32 &brightness, f32 &contrast ); | ||
127 | |||
128 | //! Set the maximal elapsed time between 2 clicks to generate doubleclicks for the mouse. It also affects tripleclick behavior. | ||
129 | //! When set to 0 no double- and tripleclicks will be generated. | ||
130 | virtual void setDoubleClickTime( u32 timeMs ); | ||
131 | |||
132 | //! Get the maximal elapsed time between 2 clicks to generate double- and tripleclicks for the mouse. | ||
133 | virtual u32 getDoubleClickTime() const; | ||
134 | |||
135 | //! Remove all messages pending in the system message loop | ||
136 | virtual void clearSystemMessages(); | ||
137 | |||
138 | |||
139 | protected: | ||
140 | |||
141 | void createGUIAndScene(); | ||
142 | |||
143 | //! checks version of SDK and prints warning if there might be a problem | ||
144 | bool checkVersion(const char* version); | ||
145 | |||
146 | //! Compares to the last call of this function to return double and triple clicks. | ||
147 | //! \return Returns only 1,2 or 3. A 4th click will start with 1 again. | ||
148 | virtual u32 checkSuccessiveClicks(s32 mouseX, s32 mouseY, EMOUSE_INPUT_EVENT inputEvent ); | ||
149 | |||
150 | void calculateGammaRamp ( u16 *ramp, f32 gamma, f32 relativebrightness, f32 relativecontrast ); | ||
151 | void calculateGammaFromRamp ( f32 &gamma, const u16 *ramp ); | ||
152 | |||
153 | video::IVideoDriver* VideoDriver; | ||
154 | gui::IGUIEnvironment* GUIEnvironment; | ||
155 | scene::ISceneManager* SceneManager; | ||
156 | ITimer* Timer; | ||
157 | gui::ICursorControl* CursorControl; | ||
158 | IEventReceiver* UserReceiver; | ||
159 | CLogger* Logger; | ||
160 | IOSOperator* Operator; | ||
161 | IRandomizer* Randomizer; | ||
162 | io::IFileSystem* FileSystem; | ||
163 | scene::ISceneManager* InputReceivingSceneManager; | ||
164 | |||
165 | struct SMouseMultiClicks | ||
166 | { | ||
167 | SMouseMultiClicks() | ||
168 | : DoubleClickTime(500), CountSuccessiveClicks(0), LastClickTime(0), LastMouseInputEvent(EMIE_COUNT) | ||
169 | {} | ||
170 | |||
171 | u32 DoubleClickTime; | ||
172 | u32 CountSuccessiveClicks; | ||
173 | u32 LastClickTime; | ||
174 | core::position2di LastClick; | ||
175 | EMOUSE_INPUT_EVENT LastMouseInputEvent; | ||
176 | }; | ||
177 | SMouseMultiClicks MouseMultiClicks; | ||
178 | video::CVideoModeList* VideoModeList; | ||
179 | SIrrlichtCreationParameters CreationParams; | ||
180 | bool Close; | ||
181 | }; | ||
182 | |||
183 | } // end namespace irr | ||
184 | |||
185 | #endif | ||
186 | |||