diff options
author | David Walter Seikel | 2014-04-22 14:14:13 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-04-22 14:14:13 +1000 |
commit | 30fde0d5e8b315e11e34c9d1fc8014c9f1139336 (patch) | |
tree | 86c9167313b19037db6e8555a8ca2f802ccefb5c | |
parent | Moved images to media, much better idea. (diff) | |
download | SledjHamr-30fde0d5e8b315e11e34c9d1fc8014c9f1139336.zip SledjHamr-30fde0d5e8b315e11e34c9d1fc8014c9f1139336.tar.gz SledjHamr-30fde0d5e8b315e11e34c9d1fc8014c9f1139336.tar.bz2 SledjHamr-30fde0d5e8b315e11e34c9d1fc8014c9f1139336.tar.xz |
Move the Irrlicht demos to the base media directory to, and extantz itself.
Diffstat (limited to '')
-rw-r--r-- | ClientHamr/extantz/CDemo.cpp | 34 | ||||
-rwxr-xr-x | ClientHamr/extantz/build.lua | 4 | ||||
-rw-r--r-- | ClientHamr/extantz/crappisspuke.cpp | 4 | ||||
l--------- | ClientHamr/extantz/media | 1 | ||||
-rwxr-xr-x | ClientHamr/extantz/test.sh | 3 | ||||
l--------- | media/Irrlicht | 1 | ||||
-rwxr-xr-x | test.sh | 3 |
7 files changed, 23 insertions, 27 deletions
diff --git a/ClientHamr/extantz/CDemo.cpp b/ClientHamr/extantz/CDemo.cpp index 3b39653..0ca40f1 100644 --- a/ClientHamr/extantz/CDemo.cpp +++ b/ClientHamr/extantz/CDemo.cpp | |||
@@ -38,11 +38,11 @@ void CDemo::setup(GLData *gld) | |||
38 | if (device->getFileSystem()->existFile("irrlicht.dat")) | 38 | if (device->getFileSystem()->existFile("irrlicht.dat")) |
39 | device->getFileSystem()->addFileArchive("irrlicht.dat"); | 39 | device->getFileSystem()->addFileArchive("irrlicht.dat"); |
40 | else | 40 | else |
41 | device->getFileSystem()->addFileArchive("media/irrlicht.dat"); | 41 | device->getFileSystem()->addFileArchive("media/Irrlicht/irrlicht.dat"); |
42 | if (device->getFileSystem()->existFile("map-20kdm2.pk3")) | 42 | if (device->getFileSystem()->existFile("map-20kdm2.pk3")) |
43 | device->getFileSystem()->addFileArchive("map-20kdm2.pk3"); | 43 | device->getFileSystem()->addFileArchive("map-20kdm2.pk3"); |
44 | else | 44 | else |
45 | device->getFileSystem()->addFileArchive("media/map-20kdm2.pk3"); | 45 | device->getFileSystem()->addFileArchive("media/Irrlicht/map-20kdm2.pk3"); |
46 | 46 | ||
47 | sceneStartTime = device->getTimer()->getTime(); | 47 | sceneStartTime = device->getTimer()->getTime(); |
48 | timeForThisScene = 0; | 48 | timeForThisScene = 0; |
@@ -275,13 +275,13 @@ void CDemo::loadSceneData() | |||
275 | // load sydney model and create 2 instances | 275 | // load sydney model and create 2 instances |
276 | 276 | ||
277 | scene::IAnimatedMesh *mesh = 0; | 277 | scene::IAnimatedMesh *mesh = 0; |
278 | mesh = sm->getMesh("media/sydney.md2"); | 278 | mesh = sm->getMesh("media/Irrlicht/sydney.md2"); |
279 | if (mesh) | 279 | if (mesh) |
280 | { | 280 | { |
281 | model1 = sm->addAnimatedMeshSceneNode(mesh); | 281 | model1 = sm->addAnimatedMeshSceneNode(mesh); |
282 | if (model1) | 282 | if (model1) |
283 | { | 283 | { |
284 | model1->setMaterialTexture(0, driver->getTexture("media/sydney.bmp")); | 284 | model1->setMaterialTexture(0, driver->getTexture("media/Irrlicht/sydney.bmp")); |
285 | model1->setPosition(core::vector3df(100, 40, -80)); | 285 | model1->setPosition(core::vector3df(100, 40, -80)); |
286 | model1->setScale(core::vector3df(2, 2, 2)); | 286 | model1->setScale(core::vector3df(2, 2, 2)); |
287 | model1->setMD2Animation(scene::EMAT_STAND); | 287 | model1->setMD2Animation(scene::EMAT_STAND); |
@@ -293,7 +293,7 @@ void CDemo::loadSceneData() | |||
293 | model2 = sm->addAnimatedMeshSceneNode(mesh); | 293 | model2 = sm->addAnimatedMeshSceneNode(mesh); |
294 | if (model2) | 294 | if (model2) |
295 | { | 295 | { |
296 | model2->setMaterialTexture(0, driver->getTexture("media/spheremap.jpg")); | 296 | model2->setMaterialTexture(0, driver->getTexture("media/Irrlicht/spheremap.jpg")); |
297 | model2->setPosition(core::vector3df(180, 15, -60)); | 297 | model2->setPosition(core::vector3df(180, 15, -60)); |
298 | model2->setScale(core::vector3df(2, 2, 2)); | 298 | model2->setScale(core::vector3df(2, 2, 2)); |
299 | model2->setMD2Animation(scene::EMAT_RUN); | 299 | model2->setMD2Animation(scene::EMAT_RUN); |
@@ -309,12 +309,12 @@ void CDemo::loadSceneData() | |||
309 | // create sky box | 309 | // create sky box |
310 | driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false); | 310 | driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false); |
311 | skyboxNode = sm->addSkyBoxSceneNode( | 311 | skyboxNode = sm->addSkyBoxSceneNode( |
312 | driver->getTexture("media/irrlicht2_up.jpg"), | 312 | driver->getTexture("media/Irrlicht/irrlicht2_up.jpg"), |
313 | driver->getTexture("media/irrlicht2_dn.jpg"), | 313 | driver->getTexture("media/Irrlicht/irrlicht2_dn.jpg"), |
314 | driver->getTexture("media/irrlicht2_lf.jpg"), | 314 | driver->getTexture("media/Irrlicht/irrlicht2_lf.jpg"), |
315 | driver->getTexture("media/irrlicht2_rt.jpg"), | 315 | driver->getTexture("media/Irrlicht/irrlicht2_rt.jpg"), |
316 | driver->getTexture("media/irrlicht2_ft.jpg"), | 316 | driver->getTexture("media/Irrlicht/irrlicht2_ft.jpg"), |
317 | driver->getTexture("media/irrlicht2_bk.jpg")); | 317 | driver->getTexture("media/Irrlicht/irrlicht2_bk.jpg")); |
318 | driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true); | 318 | driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true); |
319 | 319 | ||
320 | // create walk-between-portals animation | 320 | // create walk-between-portals animation |
@@ -333,7 +333,7 @@ void CDemo::loadSceneData() | |||
333 | core::array<video::ITexture*> textures; | 333 | core::array<video::ITexture*> textures; |
334 | for (s32 g=1; g<8; ++g) | 334 | for (s32 g=1; g<8; ++g) |
335 | { | 335 | { |
336 | core::stringc tmp("media/portal"); | 336 | core::stringc tmp("media/Irrlicht/portal"); |
337 | tmp += g; | 337 | tmp += g; |
338 | tmp += ".bmp"; | 338 | tmp += ".bmp"; |
339 | video::ITexture* t = driver->getTexture(tmp); | 339 | video::ITexture* t = driver->getTexture(tmp); |
@@ -348,7 +348,7 @@ void CDemo::loadSceneData() | |||
348 | { | 348 | { |
349 | bill = sm->addBillboardSceneNode(0, core::dimension2d<f32>(100, 100), waypoint[r]+ core::vector3df(0, 20, 0)); | 349 | bill = sm->addBillboardSceneNode(0, core::dimension2d<f32>(100, 100), waypoint[r]+ core::vector3df(0, 20, 0)); |
350 | bill->setMaterialFlag(video::EMF_LIGHTING, false); | 350 | bill->setMaterialFlag(video::EMF_LIGHTING, false); |
351 | bill->setMaterialTexture(0, driver->getTexture("media/portal1.bmp")); | 351 | bill->setMaterialTexture(0, driver->getTexture("media/Irrlicht/portal1.bmp")); |
352 | bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); | 352 | bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); |
353 | bill->addAnimator(anim); | 353 | bill->addAnimator(anim); |
354 | } | 354 | } |
@@ -366,7 +366,7 @@ void CDemo::loadSceneData() | |||
366 | 366 | ||
367 | bill = device->getSceneManager()->addBillboardSceneNode(light, core::dimension2d<f32>(40, 40)); | 367 | bill = device->getSceneManager()->addBillboardSceneNode(light, core::dimension2d<f32>(40, 40)); |
368 | bill->setMaterialFlag(video::EMF_LIGHTING, false); | 368 | bill->setMaterialFlag(video::EMF_LIGHTING, false); |
369 | bill->setMaterialTexture(0, driver->getTexture("media/particlewhite.bmp")); | 369 | bill->setMaterialTexture(0, driver->getTexture("media/Irrlicht/particlewhite.bmp")); |
370 | bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); | 370 | bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); |
371 | 371 | ||
372 | // create meta triangle selector with all triangles selectors in it. | 372 | // create meta triangle selector with all triangles selectors in it. |
@@ -390,7 +390,7 @@ void CDemo::loadSceneData() | |||
390 | 390 | ||
391 | campFire->setMaterialFlag(video::EMF_LIGHTING, false); | 391 | campFire->setMaterialFlag(video::EMF_LIGHTING, false); |
392 | campFire->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false); | 392 | campFire->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false); |
393 | campFire->setMaterialTexture(0, driver->getTexture("media/fireball.bmp")); | 393 | campFire->setMaterialTexture(0, driver->getTexture("media/Irrlicht/fireball.bmp")); |
394 | campFire->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); | 394 | campFire->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); |
395 | } | 395 | } |
396 | 396 | ||
@@ -444,7 +444,7 @@ void CDemo::shoot() | |||
444 | node = sm->addBillboardSceneNode(0, core::dimension2d<f32>(25, 25), start); | 444 | node = sm->addBillboardSceneNode(0, core::dimension2d<f32>(25, 25), start); |
445 | 445 | ||
446 | node->setMaterialFlag(video::EMF_LIGHTING, false); | 446 | node->setMaterialFlag(video::EMF_LIGHTING, false); |
447 | node->setMaterialTexture(0, device->getVideoDriver()->getTexture("media/fireball.bmp")); | 447 | node->setMaterialTexture(0, device->getVideoDriver()->getTexture("media/Irrlicht/fireball.bmp")); |
448 | node->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); | 448 | node->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); |
449 | 449 | ||
450 | f32 length = (f32)(end - start).getLength(); | 450 | f32 length = (f32)(end - start).getLength(); |
@@ -496,7 +496,7 @@ void CDemo::createParticleImpacts() | |||
496 | 496 | ||
497 | pas->setMaterialFlag(video::EMF_LIGHTING, false); | 497 | pas->setMaterialFlag(video::EMF_LIGHTING, false); |
498 | pas->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false); | 498 | pas->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false); |
499 | pas->setMaterialTexture(0, device->getVideoDriver()->getTexture("media/smoke.bmp")); | 499 | pas->setMaterialTexture(0, device->getVideoDriver()->getTexture("media/Irrlicht/smoke.bmp")); |
500 | pas->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); | 500 | pas->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR); |
501 | 501 | ||
502 | scene::ISceneNodeAnimator *anim = sm->createDeleteAnimator(2000); | 502 | scene::ISceneNodeAnimator *anim = sm->createDeleteAnimator(2000); |
diff --git a/ClientHamr/extantz/build.lua b/ClientHamr/extantz/build.lua index 7e8c29c..0bb2a0b 100755 --- a/ClientHamr/extantz/build.lua +++ b/ClientHamr/extantz/build.lua | |||
@@ -17,10 +17,10 @@ CFLAGS = CFLAGS .. ' -I../../libraries/irrlicht-1.8.1/include -I/usr/X11R6/inc | |||
17 | LDFLAGS = LDFLAGS .. ' -L../../libraries/irrlicht-1.8.1/lib/Linux' | 17 | LDFLAGS = LDFLAGS .. ' -L../../libraries/irrlicht-1.8.1/lib/Linux' |
18 | libs = libs .. ' -lIrrlicht -lGL -lbz2' | 18 | libs = libs .. ' -lIrrlicht -lGL -lbz2' |
19 | 19 | ||
20 | removeFiles(dir, {'extantz', 'crappisspuke.o', 'CDemo.o', 'extantzCamera.o', '../../media/extantz.edj'}) | 20 | removeFiles(dir, {'../../extantz', 'crappisspuke.o', 'CDemo.o', 'extantzCamera.o', '../../media/extantz.edj'}) |
21 | 21 | ||
22 | runCommand('edje_cc', dir, 'edje_cc ' .. EDJE_FLAGS .. ' extantz.edc ../../media/extantz.edj') | 22 | runCommand('edje_cc', dir, 'edje_cc ' .. EDJE_FLAGS .. ' extantz.edc ../../media/extantz.edj') |
23 | runCommand('Irrlicht files', dir, 'g++ ' .. CFLAGS .. ' -O3 -ffast-math -c crappisspuke.cpp -o crappisspuke.o ' .. LDFLAGS) | 23 | runCommand('Irrlicht files', dir, 'g++ ' .. CFLAGS .. ' -O3 -ffast-math -c crappisspuke.cpp -o crappisspuke.o ' .. LDFLAGS) |
24 | runCommand(nil, dir, 'g++ ' .. CFLAGS .. ' -O3 -ffast-math -c CDemo.cpp -o CDemo.o ' .. LDFLAGS) | 24 | runCommand(nil, dir, 'g++ ' .. CFLAGS .. ' -O3 -ffast-math -c CDemo.cpp -o CDemo.o ' .. LDFLAGS) |
25 | runCommand('extantz', dir, 'g++ ' .. CFLAGS .. ' -O3 -ffast-math -c extantzCamera.cpp -o extantzCamera.o ' .. LDFLAGS) | 25 | runCommand('extantz', dir, 'g++ ' .. CFLAGS .. ' -O3 -ffast-math -c extantzCamera.cpp -o extantzCamera.o ' .. LDFLAGS) |
26 | runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' extantz.c crappisspuke.o CDemo.o extantzCamera.o -o extantz ' .. LDFLAGS .. ' ' .. libs .. ' && strip extantz') | 26 | runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' extantz.c crappisspuke.o CDemo.o extantzCamera.o -o ../../extantz ' .. LDFLAGS .. ' ' .. libs) |
diff --git a/ClientHamr/extantz/crappisspuke.cpp b/ClientHamr/extantz/crappisspuke.cpp index 6a560f1..2af9dde 100644 --- a/ClientHamr/extantz/crappisspuke.cpp +++ b/ClientHamr/extantz/crappisspuke.cpp | |||
@@ -189,7 +189,7 @@ etc. of course. | |||
189 | other supported file format. By the way, that cool Quake 2 model | 189 | other supported file format. By the way, that cool Quake 2 model |
190 | called sydney was modelled by Brian Collins. | 190 | called sydney was modelled by Brian Collins. |
191 | */ | 191 | */ |
192 | IAnimatedMesh* mesh = smgr->getMesh("media/sydney.md2"); | 192 | IAnimatedMesh* mesh = smgr->getMesh("media/Irrlicht/sydney.md2"); |
193 | if (!mesh) | 193 | if (!mesh) |
194 | { | 194 | { |
195 | device->drop(); | 195 | device->drop(); |
@@ -209,7 +209,7 @@ etc. of course. | |||
209 | { | 209 | { |
210 | // node->setMaterialFlag(EMF_LIGHTING, false); | 210 | // node->setMaterialFlag(EMF_LIGHTING, false); |
211 | node->setMD2Animation(scene::EMAT_STAND); | 211 | node->setMD2Animation(scene::EMAT_STAND); |
212 | node->setMaterialTexture(0, driver->getTexture("media/sydney.bmp")); | 212 | node->setMaterialTexture(0, driver->getTexture("media/Irrlicht/sydney.bmp")); |
213 | } | 213 | } |
214 | 214 | ||
215 | /* | 215 | /* |
diff --git a/ClientHamr/extantz/media b/ClientHamr/extantz/media deleted file mode 120000 index 5ca5780..0000000 --- a/ClientHamr/extantz/media +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | ../../libraries/irrlicht-1.8.1/media \ No newline at end of file | ||
diff --git a/ClientHamr/extantz/test.sh b/ClientHamr/extantz/test.sh deleted file mode 100755 index f2a17fa..0000000 --- a/ClientHamr/extantz/test.sh +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | #! /bin/bash | ||
2 | |||
3 | ./extantz | ||
diff --git a/media/Irrlicht b/media/Irrlicht new file mode 120000 index 0000000..cd9b2c2 --- /dev/null +++ b/media/Irrlicht | |||
@@ -0,0 +1 @@ | |||
../libraries/irrlicht-1.8.1/media \ No newline at end of file | |||
@@ -7,8 +7,7 @@ wd=$(pwd) | |||
7 | ./build.lua || exit | 7 | ./build.lua || exit |
8 | 8 | ||
9 | echo "_______________ TESTING extantz _______________" | 9 | echo "_______________ TESTING extantz _______________" |
10 | cd $wd/ClientHamr/extantz | 10 | ./extantz & |
11 | ./test.sh & | ||
12 | sleep 1 | 11 | sleep 1 |
13 | 12 | ||
14 | echo "_______________ TESTING GuiLua _______________" | 13 | echo "_______________ TESTING GuiLua _______________" |