diff options
Diffstat (limited to 'ClientHamr/extantz/CDemo.cpp')
-rw-r--r-- | ClientHamr/extantz/CDemo.cpp | 54 |
1 files changed, 35 insertions, 19 deletions
diff --git a/ClientHamr/extantz/CDemo.cpp b/ClientHamr/extantz/CDemo.cpp index 09821ec..9632675 100644 --- a/ClientHamr/extantz/CDemo.cpp +++ b/ClientHamr/extantz/CDemo.cpp | |||
@@ -106,9 +106,13 @@ void CDemo::switchToNextScene() | |||
106 | { | 106 | { |
107 | case 1: // panorama camera | 107 | case 1: // panorama camera |
108 | { | 108 | { |
109 | currentScene += 1; | ||
110 | core::array<core::vector3df> points; | 109 | core::array<core::vector3df> points; |
111 | 110 | ||
111 | points.push_back(core::vector3df(-931.473755f, 900.0f, 2000.0f)); // -49873 | ||
112 | points.push_back(core::vector3df(-931.473755f, 700.0f, 1750.0f)); // -49873 | ||
113 | points.push_back(core::vector3df(-931.473755f, 500.0f, 1500.0f)); // -49873 | ||
114 | points.push_back(core::vector3df(-931.473755f, 300.0f, 1250.0f)); // -49873 | ||
115 | points.push_back(core::vector3df(-931.473755f, 200.0f, 1000.0f)); // -49873 | ||
112 | points.push_back(core::vector3df(-931.473755f, 138.300003f, 987.279114f)); // -49873 | 116 | points.push_back(core::vector3df(-931.473755f, 138.300003f, 987.279114f)); // -49873 |
113 | points.push_back(core::vector3df(-847.902222f, 136.757553f, 915.792725f)); // -50559 | 117 | points.push_back(core::vector3df(-847.902222f, 136.757553f, 915.792725f)); // -50559 |
114 | points.push_back(core::vector3df(-748.680420f, 152.254501f, 826.418945f)); // -51964 | 118 | points.push_back(core::vector3df(-748.680420f, 152.254501f, 826.418945f)); // -51964 |
@@ -146,13 +150,13 @@ void CDemo::switchToNextScene() | |||
146 | points.push_back(core::vector3df(96.783348f, 181.639481f, 648.188110f)); | 150 | points.push_back(core::vector3df(96.783348f, 181.639481f, 648.188110f)); |
147 | points.push_back(core::vector3df(97.865623f, 138.905975f, 484.812561f)); | 151 | points.push_back(core::vector3df(97.865623f, 138.905975f, 484.812561f)); |
148 | points.push_back(core::vector3df(99.612457f, 102.463669f, 347.603210f)); | 152 | points.push_back(core::vector3df(99.612457f, 102.463669f, 347.603210f)); |
149 | points.push_back(core::vector3df(99.612457f, 102.463669f, 347.603210f)); | 153 | points.push_back(core::vector3df(99.0f, 90.0f, 347.0f)); |
150 | points.push_back(core::vector3df(99.612457f, 102.463669f, 347.603210f)); | 154 | points.push_back(core::vector3df(99.0f, 90.0f, 347.0f)); |
155 | points.push_back(core::vector3df(99.0f, 90.0f, 347.0f)); | ||
151 | 156 | ||
152 | timeForThisScene = (points.size()-3)* 1000; | 157 | timeForThisScene = (points.size() - 1) * 1000; |
153 | 158 | ||
154 | camera = sm->addCameraSceneNode(0, points[0], core::vector3df(0 ,400,0)); | 159 | camera = sm->addCameraSceneNode(0, points[0], core::vector3df(0, 400, 0)); |
155 | //camera->setTarget(core::vector3df(0,400,0)); | ||
156 | 160 | ||
157 | sa = sm->createFollowSplineAnimator(device->getTimer()->getTime(), | 161 | sa = sm->createFollowSplineAnimator(device->getTimer()->getTime(), |
158 | points); | 162 | points); |
@@ -161,13 +165,29 @@ void CDemo::switchToNextScene() | |||
161 | } | 165 | } |
162 | break; | 166 | break; |
163 | 167 | ||
164 | case 2: // down fly anim camera | 168 | case 2: // panorama camera |
165 | camera = sm->addCameraSceneNode(0, core::vector3df(100,40,-80), core::vector3df(844,670,-885)); | 169 | { |
166 | sa = sm->createFlyStraightAnimator(core::vector3df(94, 1002, 127), | 170 | core::array<core::vector3df> points; |
167 | core::vector3df(108, 15, -60), 10000, true); | 171 | |
168 | camera->addAnimator(sa); | 172 | points.push_back(core::vector3df(99.0f, 90.0f, 347.0f)); |
169 | timeForThisScene = 9900; | 173 | points.push_back(core::vector3df(99.0f, 90.0f, 347.0f)); |
170 | sa->drop(); | 174 | points.push_back(core::vector3df(99.0f, 90.0f, 347.0f)); |
175 | points.push_back(core::vector3df(99.0f, 90.0f, 347.0f)); | ||
176 | points.push_back(core::vector3df(108.0f, 90.0f, -140.0f)); | ||
177 | points.push_back(core::vector3df(108.0f, 90.0f, -140.0f)); | ||
178 | points.push_back(core::vector3df(108.0f, 90.0f, -140.0f)); | ||
179 | points.push_back(core::vector3df(108.0f, 90.0f, -140.0f)); | ||
180 | points.push_back(core::vector3df(108.0f, 90.0f, -140.0f)); | ||
181 | |||
182 | timeForThisScene = (points.size() - 1) * 500; | ||
183 | |||
184 | camera = sm->addCameraSceneNode(0, points[0], core::vector3df(108, 90, -140)); | ||
185 | |||
186 | sa = sm->createFollowSplineAnimator(device->getTimer()->getTime(), | ||
187 | points); | ||
188 | camera->addAnimator(sa); | ||
189 | sa->drop(); | ||
190 | } | ||
171 | break; | 191 | break; |
172 | 192 | ||
173 | case 3: // interactive, go around | 193 | case 3: // interactive, go around |
@@ -199,15 +219,11 @@ void CDemo::switchToNextScene() | |||
199 | keyMap[8].KeyCode = KEY_KEY_J; | 219 | keyMap[8].KeyCode = KEY_KEY_J; |
200 | 220 | ||
201 | camera = sm->addCameraSceneNodeFPS(0, 100.0f, .4f, -1, keyMap, 9, false, 3.f); | 221 | camera = sm->addCameraSceneNodeFPS(0, 100.0f, .4f, -1, keyMap, 9, false, 3.f); |
202 | camera->setPosition(core::vector3df(108,140,-140)); | 222 | camera->setPosition(core::vector3df(108, 90, -140)); |
203 | camera->setFarValue(5000.0f); | 223 | camera->setFarValue(5000.0f); |
204 | 224 | ||
205 | scene::ISceneNodeAnimatorCollisionResponse* collider = | 225 | scene::ISceneNodeAnimatorCollisionResponse* collider = |
206 | sm->createCollisionResponseAnimator( | 226 | sm->createCollisionResponseAnimator(metaSelector, camera, core::vector3df(50, 100, 25), core::vector3df(0, quakeLevelMesh ? -10.f : 0.0f, 0), core::vector3df(0, 45, 0), 0.005f); |
207 | metaSelector, camera, core::vector3df(25,50,25), | ||
208 | core::vector3df(0, quakeLevelMesh ? -10.f : 0.0f,0), | ||
209 | core::vector3df(0,45,0), 0.005f); | ||
210 | |||
211 | camera->addAnimator(collider); | 227 | camera->addAnimator(collider); |
212 | collider->drop(); | 228 | collider->drop(); |
213 | } | 229 | } |