|
From: <sik...@us...> - 2006-05-19 05:48:41
|
Revision: 42 Author: sik0fewl Date: 2006-05-18 22:48:21 -0700 (Thu, 18 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=42&view=rev Log Message: ----------- Added logo to intro and fancy little corner logo to PlayState Modified Paths: -------------- trunk/perceptioncrash/src/GameManager.cpp trunk/perceptioncrash/src/IntroState.cpp trunk/perceptioncrash/src/PlayState.cpp trunk/perceptioncrash/src/PlayState.hpp Added Paths: ----------- trunk/perceptioncrash/data/materials/ trunk/perceptioncrash/data/materials/programs/ trunk/perceptioncrash/data/materials/scripts/ trunk/perceptioncrash/data/materials/scripts/logo.material trunk/perceptioncrash/data/materials/textures/ trunk/perceptioncrash/data/materials/textures/logo/ trunk/perceptioncrash/data/materials/textures/logo/logo.png trunk/perceptioncrash/data/materials/textures/logo/logo2.png trunk/perceptioncrash/data/overlays/ trunk/perceptioncrash/data/overlays/logo.overlay Removed Paths: ------------- trunk/perceptioncrash/data/images/logo.png Deleted: trunk/perceptioncrash/data/images/logo.png =================================================================== (Binary files differ) Added: trunk/perceptioncrash/data/materials/scripts/logo.material =================================================================== --- trunk/perceptioncrash/data/materials/scripts/logo.material (rev 0) +++ trunk/perceptioncrash/data/materials/scripts/logo.material 2006-05-19 05:48:21 UTC (rev 42) @@ -0,0 +1,31 @@ +material Materials/Logo/LogoLarge +{ + // first, preferred technique + technique + { + pass + { + scene_blend alpha_blend + depth_check off + + texture_unit + { + texture logo/logo.png + } + } + } +} + +material Materials/Logo/LogoLargeGreenGlow : Materials/Logo/LogoLarge +{ + technique + { + pass + { + texture_unit + { + texture logo/logo2.png alpha + } + } + } +} Added: trunk/perceptioncrash/data/materials/textures/logo/logo.png =================================================================== (Binary files differ) Property changes on: trunk/perceptioncrash/data/materials/textures/logo/logo.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: trunk/perceptioncrash/data/materials/textures/logo/logo2.png =================================================================== (Binary files differ) Property changes on: trunk/perceptioncrash/data/materials/textures/logo/logo2.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: trunk/perceptioncrash/data/overlays/logo.overlay =================================================================== --- trunk/perceptioncrash/data/overlays/logo.overlay (rev 0) +++ trunk/perceptioncrash/data/overlays/logo.overlay 2006-05-19 05:48:21 UTC (rev 42) @@ -0,0 +1,66 @@ +// Large logo for intro screen +Overlays/Logo/LogoLarge +{ + zorder 500 + + container Panel(OverlayElements/Logo/LogoLarge/Panel) + { + metrics_mode pixels + + // Dimensions + width 771 + height 235 + + // Center horizantally and vertically + horz_align center + vert_align center + left -385 + top -117 + + material Materials/Logo/LogoLarge + } +} + +Overlays/Logo/LogoLargeGreenGlow +{ + zorder 500 + + container Panel(OverlayElements/Logo/LogoLargeGreenGlow/Panel) + { + metrics_mode pixels + + // Dimensions + width 771 + height 235 + + // Center horizantally and vertically + horz_align center + vert_align center + left -385 + top -117 + + material Materials/Logo/LogoLargeGreenGlow + } +} + +Overlays/Logo/LogoCornerGreenGlow +{ + zorder 500 + + container Panel(OverlayElements/Logo/LogoCornerGreenGlow/Panel) + { + metrics_mode pixels + + // Dimensions + width 154 + height 47 + left 0 + top 2 + + // Center horizantally and vertically + horz_align left + vert_align top + + material Materials/Logo/LogoLargeGreenGlow + } +} Modified: trunk/perceptioncrash/src/GameManager.cpp =================================================================== --- trunk/perceptioncrash/src/GameManager.cpp 2006-05-19 04:10:04 UTC (rev 41) +++ trunk/perceptioncrash/src/GameManager.cpp 2006-05-19 05:48:21 UTC (rev 42) @@ -95,6 +95,7 @@ } } + void GameManager::setupResources(void) { @@ -102,6 +103,10 @@ Ogre::ResourceGroupManager* rgm = Ogre::ResourceGroupManager::getSingletonPtr(); rgm->addResourceLocation("data/objects", "FileSystem", "General"); rgm->addResourceLocation("data/images", "FileSystem", "General"); + rgm->addResourceLocation("data/overlays", "FileSystem", "General"); + rgm->addResourceLocation("data/materials/scripts", "FileSystem", "General"); + 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()); Modified: trunk/perceptioncrash/src/IntroState.cpp =================================================================== --- trunk/perceptioncrash/src/IntroState.cpp 2006-05-19 04:10:04 UTC (rev 41) +++ trunk/perceptioncrash/src/IntroState.cpp 2006-05-19 05:48:21 UTC (rev 42) @@ -15,9 +15,9 @@ mSceneMgr = mRoot->createSceneManager(Ogre::ST_GENERIC); mCamera = mSceneMgr->createCamera("IntroCamera"); mViewport = mRoot->getAutoCreatedWindow()->addViewport(mCamera); - mViewport->setBackgroundColour( Ogre::ColourValue(1.0, 1.0, 1.0) ); + mViewport->setBackgroundColour( Ogre::ColourValue(0.0, 0.0, 0.0) ); - mLogoOverlay = Ogre::OverlayManager::getSingleton().getByName("Core/DebugOverlay"); + mLogoOverlay = Ogre::OverlayManager::getSingleton().getByName("Overlays/Logo/LogoLargeGreenGlow"); if (mLogoOverlay) mLogoOverlay->show(); @@ -27,6 +27,9 @@ void IntroState::exit() { + if (mLogoOverlay) + mLogoOverlay->hide(); + mSceneMgr->clearScene(); mSceneMgr->destroyAllCameras(); mRoot->getAutoCreatedWindow()->removeAllViewports(); Modified: trunk/perceptioncrash/src/PlayState.cpp =================================================================== --- trunk/perceptioncrash/src/PlayState.cpp 2006-05-19 04:10:04 UTC (rev 41) +++ trunk/perceptioncrash/src/PlayState.cpp 2006-05-19 05:48:21 UTC (rev 42) @@ -38,11 +38,18 @@ mCamera->pitch(Ogre::Degree(90)); mCamera->rotate(vp.orientation); mCamera->setFixedYawAxis(true, Ogre::Vector3::UNIT_Z); + + mLogoOverlay = Ogre::OverlayManager::getSingleton().getByName("Overlays/Logo/LogoCornerGreenGlow"); + if (mLogoOverlay) + mLogoOverlay->show(); } void PlayState::exit() { + if (mLogoOverlay) + mLogoOverlay->hide(); + mSceneMgr->clearScene(); mSceneMgr->destroyAllCameras(); mRoot->getAutoCreatedWindow()->removeAllViewports(); Modified: trunk/perceptioncrash/src/PlayState.hpp =================================================================== --- trunk/perceptioncrash/src/PlayState.hpp 2006-05-19 04:10:04 UTC (rev 41) +++ trunk/perceptioncrash/src/PlayState.hpp 2006-05-19 05:48:21 UTC (rev 42) @@ -35,6 +35,7 @@ Ogre::SceneManager* mSceneMgr; Ogre::Viewport* mViewport; Ogre::Camera* mCamera; + Ogre::Overlay* mLogoOverlay; private: static PlayState mPlayState; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |