Changeset 2405 for GTP/trunk/App/Demos/Illum/Ogre/src/Moria/include
- Timestamp:
- 06/05/07 01:59:59 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/src/Moria/include/Moria.h
r2395 r2405 28 28 #include "FPSPlayer.h" 29 29 30 AnimationState* mAnimState ;30 AnimationState* mAnimState = 0; 31 31 bool cullCamera = true; 32 32 Body *throwSphere = 0; … … 69 69 framecount++; 70 70 71 mAnimState->addTime(evt.timeSinceLastFrame * 0.5);71 // mAnimState->addTime(evt.timeSinceLastFrame * 1.0); 72 72 73 73 … … 119 119 mTimeUntilNextToggle = 1; 120 120 } 121 if (mInputDevice->isKeyDown(KC_SYSRQ) && mTimeUntilNextToggle <= 0) 122 { 123 char tmp[20]; 124 sprintf(tmp, "screenshot_%d.png", ++mNumScreenShots); 125 mWindow->writeContentsToFile(tmp); 126 mTimeUntilNextToggle = 0.5; 127 mWindow->setDebugText(String("Wrote ") + tmp); 128 } 121 129 return true; 122 130 } … … 148 156 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Basic"); 149 157 ResourceGroupManager::getSingleton().initialiseResourceGroup("General"); 158 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_EnvMap"); 150 159 ResourceGroupManager::getSingleton().initialiseResourceGroup("PostProc"); 151 160 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Particles"); 152 161 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_PathMap"); 153 162 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Moria"); 154 //ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_EnvMap");155 163 //ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Caustic"); 156 164 } … … 289 297 bbs->setMaterialName("Flare"); 290 298 mainLightNode->attachObject(bbs); 291 299 /* 292 300 Entity* ent = mSceneMgr->createEntity("troll", "troll.mesh"); 293 301 ent->setCastShadows(true); … … 296 304 trollNode->attachObject(ent); 297 305 trollNode->setScale(0.05,0.05,0.05); 298 mAnimState = ent->getAnimationState("stand"); 299 mAnimState->setEnabled(true); 300 301 gFPSPlayer = new FPSPlayer(NXScene, mSceneMgr, Vector3(0.5, 1.8, 0.3), Vector3(15, 1, 15), 1.6, mCamera, false); 302 gFPSPlayer->addPlayerMesh("FPSarm.mesh", 0.02, true); 303 gFPSPlayer->addWeaponModel("sword.mesh", "joint28"); 304 306 mAnimState = ent->getAnimationState("walk"); 307 mAnimState->setEnabled(true);*/ 308 309 // PlayerCharacter::frameListenerPriority = 20; 310 gFPSPlayer = new FPSPlayer(NXScene, mSceneMgr, Vector3(0.5, 1.8, 0.3), Vector3(5, 10, 15), 1.6, mCamera, false); 311 //gFPSPlayer->addPlayerMesh("FPSarm.mesh", 0.02, true); 312 //gFPSPlayer->addWeaponModel("sword.mesh", "joint28"); 313 /* 314 PlayerCharacter* troll = new PlayerCharacter("troll1", NXScene, mSceneMgr, Vector3(1.5, 3.0, 1.2), Vector3(5, 10, 5), false); 315 troll->addPlayerMesh("troll.mesh", 0.05, false);*/ 305 316 for(float i = 0; i< 7; i++) 306 317 { … … 312 323 Body* b = NXScene->createBody("cube.mesh", 313 324 new CubeShape(size, size, size), 314 Vector3(3,size/2.0 + size * (i + 0.01),3),325 Vector3(3,size/2.0 + i * 5.0,3), 315 326 ac); 316 327 b->setCharacterCollisionGroup(NX_CHARACTER_COL_GROUP_PUSHABLE); … … 354 365 mFrameListener->setPriority(10); 355 366 mRoot->addFrameListener(mFrameListener); 356 gFPSPlayer->setPriority(20);357 358 OgreIlluminationManager::getSingleton().setPriority( 30);367 // gFPSPlayer->setPriority(20); 368 // mRoot->addFrameListener(gFPSPlayer); 369 OgreIlluminationManager::getSingleton().setPriority(40); 359 370 mRoot->addFrameListener(&OgreIlluminationManager::getSingleton()); 360 371
Note: See TracChangeset
for help on using the changeset viewer.