|
From: <sik...@us...> - 2006-05-19 15:56:40
|
Revision: 44 Author: sik0fewl Date: 2006-05-19 08:56:34 -0700 (Fri, 19 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=44&view=rev Log Message: ----------- Playing around a bit Modified Paths: -------------- trunk/perceptioncrash/src/GameManager.cpp trunk/perceptioncrash/src/PlayState.cpp Modified: trunk/perceptioncrash/src/GameManager.cpp =================================================================== --- trunk/perceptioncrash/src/GameManager.cpp 2006-05-19 14:35:07 UTC (rev 43) +++ trunk/perceptioncrash/src/GameManager.cpp 2006-05-19 15:56:34 UTC (rev 44) @@ -47,7 +47,6 @@ mDebugPanelOverlay = Ogre::OverlayManager::getSingleton().getByName("Core/DebugOverlay"); - changeState(state); mRoot->startRendering(); @@ -112,7 +111,7 @@ rgm->addResourceLocation("data/materials/textures", "FileSystem", "General"); rgm->addResourceLocation("data/materials/programs", "FileSystem", "General"); rgm->addResourceLocation("data/packs/OgreCore.zip", "Zip", "General"); - rgm->addResourceLocation("data/maps/ogretestmap.zip", "Zip", rgm->getWorldResourceGroupName()); + rgm->addResourceLocation("data/maps/ogretestmap.zip", "Zip", "PlayStateResources"); #if 0 // load resource paths from config file Modified: trunk/perceptioncrash/src/PlayState.cpp =================================================================== --- trunk/perceptioncrash/src/PlayState.cpp 2006-05-19 14:35:07 UTC (rev 43) +++ trunk/perceptioncrash/src/PlayState.cpp 2006-05-19 15:56:34 UTC (rev 44) @@ -24,6 +24,7 @@ Ogre::Real(mViewport->getActualHeight())); Ogre::ResourceGroupManager* rgm = Ogre::ResourceGroupManager::getSingletonPtr(); + rgm->setWorldResourceGroupName("PlayStateResources"); rgm->linkWorldGeometryToResourceGroup(rgm->getWorldResourceGroupName(), "ogretestmap.bsp", mSceneMgr); @@ -31,6 +32,7 @@ // sdw: This line causes me to crash, i don't know why. It works fine in another // project, and used to in this one, until something must have changed. rgm->loadResourceGroup(rgm->getWorldResourceGroupName(), false, true); + mSceneMgr->setAmbientLight(Ogre::ColourValue(1, 1, 1)); Ogre::ViewPoint vp = mSceneMgr->getSuggestedViewpoint(true); @@ -50,6 +52,8 @@ if (mLogoOverlay) mLogoOverlay->hide(); + Ogre::ResourceGroupManager::getSingleton().unloadResourceGroup(Ogre::ResourceGroupManager::getSingleton().getWorldResourceGroupName()); + mSceneMgr->clearScene(); mSceneMgr->destroyAllCameras(); mRoot->getAutoCreatedWindow()->removeAllViewports(); @@ -103,18 +107,18 @@ } void -PlayState::mouseMoved(Ogre::MouseEvent *e) +PlayState::mouseMoved(Ogre::MouseEvent* e) { mCamera->yaw(Ogre::Radian(-e->getRelX() * 1.f)); mCamera->pitch(Ogre::Radian(-e->getRelY() * 1.f)); } void -PlayState::mouseDragged(Ogre::MouseEvent *e) +PlayState::mouseDragged(Ogre::MouseEvent* e) { } void -PlayState::mouseDragMoved(Ogre::MouseEvent *e) +PlayState::mouseDragMoved(Ogre::MouseEvent* e) { } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |