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