aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/examples/Demo/CDemo.h
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/irrlicht-1.8/examples/Demo/CDemo.h')
-rw-r--r--libraries/irrlicht-1.8/examples/Demo/CDemo.h220
1 files changed, 110 insertions, 110 deletions
diff --git a/libraries/irrlicht-1.8/examples/Demo/CDemo.h b/libraries/irrlicht-1.8/examples/Demo/CDemo.h
index e2c564d..77d548c 100644
--- a/libraries/irrlicht-1.8/examples/Demo/CDemo.h
+++ b/libraries/irrlicht-1.8/examples/Demo/CDemo.h
@@ -1,110 +1,110 @@
1// This is a Demo of the Irrlicht Engine (c) 2006 by N.Gebhardt. 1// This is a Demo of the Irrlicht Engine (c) 2006 by N.Gebhardt.
2// This file is not documented. 2// This file is not documented.
3 3
4#ifndef __C_DEMO_H_INCLUDED__ 4#ifndef __C_DEMO_H_INCLUDED__
5#define __C_DEMO_H_INCLUDED__ 5#define __C_DEMO_H_INCLUDED__
6 6
7//#define USE_IRRKLANG 7//#define USE_IRRKLANG
8//#define USE_SDL_MIXER 8//#define USE_SDL_MIXER
9 9
10#include <irrlicht.h> 10#include <irrlicht.h>
11 11
12#ifdef _IRR_WINDOWS_ 12#ifdef _IRR_WINDOWS_
13#include <windows.h> 13#include <windows.h>
14#endif 14#endif
15 15
16using namespace irr; 16using namespace irr;
17 17
18// audio support 18// audio support
19 19
20#ifdef USE_IRRKLANG 20#ifdef USE_IRRKLANG
21 #include <irrKlang.h> // problem here? go to http://www.ambiera.com/irrklang and download 21 #include <irrKlang.h> // problem here? go to http://www.ambiera.com/irrklang and download
22 // the irrKlang library or undefine USE_IRRKLANG at the beginning 22 // the irrKlang library or undefine USE_IRRKLANG at the beginning
23 // of this file. 23 // of this file.
24 #ifdef _IRR_WINDOWS_ 24 #ifdef _IRR_WINDOWS_
25 #pragma comment (lib, "irrKlang.lib") 25 #pragma comment (lib, "irrKlang.lib")
26 #endif 26 #endif
27#endif 27#endif
28#ifdef USE_SDL_MIXER 28#ifdef USE_SDL_MIXER
29 # include <SDL/SDL.h> 29 # include <SDL/SDL.h>
30 # include <SDL/SDL_mixer.h> 30 # include <SDL/SDL_mixer.h>
31#endif 31#endif
32 32
33const int CAMERA_COUNT = 7; 33const int CAMERA_COUNT = 7;
34 34
35class CDemo : public IEventReceiver 35class CDemo : public IEventReceiver
36{ 36{
37public: 37public:
38 38
39 CDemo(bool fullscreen, bool music, bool shadows, bool additive, bool vsync, bool aa, video::E_DRIVER_TYPE driver); 39 CDemo(bool fullscreen, bool music, bool shadows, bool additive, bool vsync, bool aa, video::E_DRIVER_TYPE driver);
40 40
41 ~CDemo(); 41 ~CDemo();
42 42
43 void run(); 43 void run();
44 44
45 virtual bool OnEvent(const SEvent& event); 45 virtual bool OnEvent(const SEvent& event);
46 46
47private: 47private:
48 48
49 void createLoadingScreen(); 49 void createLoadingScreen();
50 void loadSceneData(); 50 void loadSceneData();
51 void switchToNextScene(); 51 void switchToNextScene();
52 void shoot(); 52 void shoot();
53 void createParticleImpacts(); 53 void createParticleImpacts();
54 54
55 bool fullscreen; 55 bool fullscreen;
56 bool music; 56 bool music;
57 bool shadows; 57 bool shadows;
58 bool additive; 58 bool additive;
59 bool vsync; 59 bool vsync;
60 bool aa; 60 bool aa;
61 video::E_DRIVER_TYPE driverType; 61 video::E_DRIVER_TYPE driverType;
62 IrrlichtDevice *device; 62 IrrlichtDevice *device;
63 63
64#ifdef USE_IRRKLANG 64#ifdef USE_IRRKLANG
65 void startIrrKlang(); 65 void startIrrKlang();
66 irrklang::ISoundEngine* irrKlang; 66 irrklang::ISoundEngine* irrKlang;
67 irrklang::ISoundSource* ballSound; 67 irrklang::ISoundSource* ballSound;
68 irrklang::ISoundSource* impactSound; 68 irrklang::ISoundSource* impactSound;
69#endif 69#endif
70 70
71#ifdef USE_SDL_MIXER 71#ifdef USE_SDL_MIXER
72 void startSound(); 72 void startSound();
73 void playSound(Mix_Chunk *); 73 void playSound(Mix_Chunk *);
74 void pollSound(); 74 void pollSound();
75 Mix_Music *stream; 75 Mix_Music *stream;
76 Mix_Chunk *ballSound; 76 Mix_Chunk *ballSound;
77 Mix_Chunk *impactSound; 77 Mix_Chunk *impactSound;
78#endif 78#endif
79 79
80 struct SParticleImpact 80 struct SParticleImpact
81 { 81 {
82 u32 when; 82 u32 when;
83 core::vector3df pos; 83 core::vector3df pos;
84 core::vector3df outVector; 84 core::vector3df outVector;
85 }; 85 };
86 86
87 int currentScene; 87 int currentScene;
88 video::SColor backColor; 88 video::SColor backColor;
89 89
90 gui::IGUIStaticText* statusText; 90 gui::IGUIStaticText* statusText;
91 gui::IGUIInOutFader* inOutFader; 91 gui::IGUIInOutFader* inOutFader;
92 92
93 scene::IQ3LevelMesh* quakeLevelMesh; 93 scene::IQ3LevelMesh* quakeLevelMesh;
94 scene::ISceneNode* quakeLevelNode; 94 scene::ISceneNode* quakeLevelNode;
95 scene::ISceneNode* skyboxNode; 95 scene::ISceneNode* skyboxNode;
96 scene::IAnimatedMeshSceneNode* model1; 96 scene::IAnimatedMeshSceneNode* model1;
97 scene::IAnimatedMeshSceneNode* model2; 97 scene::IAnimatedMeshSceneNode* model2;
98 scene::IParticleSystemSceneNode* campFire; 98 scene::IParticleSystemSceneNode* campFire;
99 99
100 scene::IMetaTriangleSelector* metaSelector; 100 scene::IMetaTriangleSelector* metaSelector;
101 scene::ITriangleSelector* mapSelector; 101 scene::ITriangleSelector* mapSelector;
102 102
103 s32 sceneStartTime; 103 s32 sceneStartTime;
104 s32 timeForThisScene; 104 s32 timeForThisScene;
105 105
106 core::array<SParticleImpact> Impacts; 106 core::array<SParticleImpact> Impacts;
107}; 107};
108 108
109#endif 109#endif
110 110