You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(70) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
|
From: <sik...@us...> - 2007-12-13 18:19:55
|
Revision: 82
http://perceptioncrash.svn.sourceforge.net/perceptioncrash/?rev=82&view=rev
Author: sik0fewl
Date: 2007-12-13 10:19:38 -0800 (Thu, 13 Dec 2007)
Log Message:
-----------
Finally added logo from Codehead :)
Modified Paths:
--------------
trunk/perceptioncrash/lib/tinyxml/Jamfile
trunk/perceptioncrash/src/PlayState.cpp
Added Paths:
-----------
trunk/htdocs/
trunk/media/logo/
trunk/media/logo/PC_Logo_6.psd
trunk/media/logo/readme.txt
trunk/perceptioncrash-xna/
Added: trunk/media/logo/PC_Logo_6.psd
===================================================================
(Binary files differ)
Property changes on: trunk/media/logo/PC_Logo_6.psd
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/media/logo/readme.txt
===================================================================
--- trunk/media/logo/readme.txt (rev 0)
+++ trunk/media/logo/readme.txt 2007-12-13 18:19:38 UTC (rev 82)
@@ -0,0 +1,3 @@
+Logo requires Cyborg 45 font which can be found here:
+
+ http://www.dafont.com/cyborg45.font
Property changes on: trunk/media/logo/readme.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/perceptioncrash/lib/tinyxml/Jamfile
===================================================================
--- trunk/perceptioncrash/lib/tinyxml/Jamfile 2006-06-03 02:06:22 UTC (rev 81)
+++ trunk/perceptioncrash/lib/tinyxml/Jamfile 2007-12-13 18:19:38 UTC (rev 82)
@@ -5,6 +5,7 @@
: tinystr.h tinyxml.h tinystr.cpp tinyxml.cpp tinyxmlerror.cpp tinyxmlparser.cpp
: noinstall ;
+DefineConst tixml : TIXML_USE_STL
#ExternalLibs perceptioncrash : OGRE CEGUI CEGUIOGRERENDERER ;
# Construct a description for the help target
Modified: trunk/perceptioncrash/src/PlayState.cpp
===================================================================
--- trunk/perceptioncrash/src/PlayState.cpp 2006-06-03 02:06:22 UTC (rev 81)
+++ trunk/perceptioncrash/src/PlayState.cpp 2007-12-13 18:19:38 UTC (rev 82)
@@ -36,7 +36,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);
+ rgm->loadResourceGroup(rgm->getWorldResourceGroupName(), false, true);
mSceneMgr->setAmbientLight(Ogre::ColourValue(1, 1, 1));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mac...@us...> - 2006-06-03 02:06:48
|
Revision: 81 Author: machaira Date: 2006-06-02 19:06:22 -0700 (Fri, 02 Jun 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=81&view=rev Log Message: ----------- Added Paths: ----------- trunk/perceptioncrash/src/NewGameState.hpp Added: trunk/perceptioncrash/src/NewGameState.hpp =================================================================== --- trunk/perceptioncrash/src/NewGameState.hpp (rev 0) +++ trunk/perceptioncrash/src/NewGameState.hpp 2006-06-03 02:06:22 UTC (rev 81) @@ -0,0 +1,55 @@ +#ifndef PC_NEW_GAME_STATE_HPP +#define PC_NEW_GAME_STATE_HPP + +#include <Ogre.h> +#include <CEGUI/CEGUIImageset.h> +#include <CEGUI/CEGUISystem.h> +#include <CEGUI/CEGUILogger.h> +#include <CEGUI/CEGUISchemeManager.h> +#include <CEGUI/CEGUIWindowManager.h> +#include <CEGUI/CEGUIWindow.h> +#include "OgreCEGUIRenderer.h" +#include "OgreCEGUIResourceProvider.h" + +#include "GameState.hpp" + +class NewGameState : public GameState +{ + public: + void enter(); + void exit(); + + void pause(); + void resume(); + + void mouseMoved(Ogre::MouseEvent* e); + void mouseDragged(Ogre::MouseEvent* e); + void mouseDragMoved(Ogre::MouseEvent* e); + + void buttonPressed(InputControllerEvent* e); + void buttonReleased(InputControllerEvent* e); + bool frameStarted(const Ogre::FrameEvent& evt); + bool frameEnded(const Ogre::FrameEvent& evt); + + static NewGameState* getInstance() { return &mNewGameState; } + + protected: + NewGameState() { } + + Ogre::Root *mRoot; + Ogre::SceneManager* mSceneMgr; + Ogre::Viewport* mViewport; + InputController* mInputController; + Ogre::Camera* mCamera; + + CEGUI::OgreCEGUIRenderer* mGUIRenderer; + CEGUI::System* mGUISystem; + CEGUI::Window* mGUISheet; + + bool mExitGame; + + private: + static NewGameState mNewGameState; +}; + +#endif /* PC_NEW_GAME_STATE_HPP */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <Mac...@us...> - 2006-06-01 13:11:09
|
Revision: 79 Author: Machaira Date: 2006-06-01 06:10:49 -0700 (Thu, 01 Jun 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=79&view=rev Log Message: ----------- Added first cut of character creation window; some changes to quest classes. Modified Paths: -------------- trunk/perceptioncrash/contrib/VC++Project/perceptioncrash/perceptioncrash.vcproj trunk/perceptioncrash/src/Entity.hpp trunk/perceptioncrash/src/IntroState.cpp trunk/perceptioncrash/src/MainMenuState.cpp trunk/perceptioncrash/src/Quest.cpp trunk/perceptioncrash/src/Quest.hpp trunk/perceptioncrash/src/QuestManager.cpp trunk/perceptioncrash/src/QuestManager.hpp Added Paths: ----------- trunk/perceptioncrash/data/gui/newgame.xml trunk/perceptioncrash/src/Quests.hpp Modified: trunk/perceptioncrash/contrib/VC++Project/perceptioncrash/perceptioncrash.vcproj =================================================================== --- trunk/perceptioncrash/contrib/VC++Project/perceptioncrash/perceptioncrash.vcproj 2006-05-26 19:57:10 UTC (rev 78) +++ trunk/perceptioncrash/contrib/VC++Project/perceptioncrash/perceptioncrash.vcproj 2006-06-01 13:10:49 UTC (rev 79) @@ -39,7 +39,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="..\..\..\lib\sdl\win\include;include;"$(OGRE_HOME)\include";"$(OGRE_HOME)\samples\include";C:\boost_1_33_1;"$(OGRE_HOME)\include\CEGUI"" + AdditionalIncludeDirectories=""C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include";include;"$(OGRE_HOME)\include";"$(OGRE_HOME)\include\CEGUI";"$(OGRE_HOME)\samples\include";C:\boost_1_33_1;..\..\..\lib\sdl\win\include;C:\SVN\trunk\perceptioncrash\src\tinyxml" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS" MinimalRebuild="true" ExceptionHandling="1" @@ -64,10 +64,10 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="OgreMain_d.lib CEGUIBase_d.lib OgreGUIRenderer_d.lib" - OutputFile="..\..\..\$(ProjectName).exe" + AdditionalDependencies="OgreMain_d.lib CEGUIBase_d.lib OgreGUIRenderer_d.lib SDL.lib SDLmain.lib" + OutputFile="$(OGRE_HOME)\bin\debug\$(ProjectName).exe" LinkIncremental="2" - AdditionalLibraryDirectories="$(OGRE_HOME)\lib" + AdditionalLibraryDirectories=""$(OGRE_HOME)\lib";C:\SVN\trunk\perceptioncrash\lib\sdl\win\lib" GenerateDebugInformation="true" ProgramDatabaseFile="$(OutDir)/perceptioncrash.pdb" SubSystem="2" @@ -78,6 +78,7 @@ /> <Tool Name="VCManifestTool" + UseFAT32Workaround="true" /> <Tool Name="VCXDCMakeTool" @@ -125,7 +126,7 @@ <Tool Name="VCCLCompilerTool" InlineFunctionExpansion="1" - AdditionalIncludeDirectories="include;$(OGRE_HOME)\include;$(OGRE_HOME)\include\CEGUI;$(OGRE_HOME)\samples\include" + AdditionalIncludeDirectories="include;"$(OGRE_HOME)\include";"$(OGRE_HOME)\include\CEGUI";"$(OGRE_HOME)\samples\include";"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include";C:\boost_1_33_1;..\..\..\lib\sdl\win\include;C:\SVN\trunk\perceptioncrash\src\tinyxml" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" MinimalRebuild="true" ExceptionHandling="1" @@ -149,10 +150,10 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="OgreMain.lib CEGUIBase.lib OgreGUIRenderer.lib" - OutputFile="..\..\..\$(ProjectName).exe" + AdditionalDependencies="OgreMain.lib CEGUIBase.lib OgreGUIRenderer.lib SDL.lib SDLmain.lib" + OutputFile="$(OGRE_HOME)\bin\release\$(ProjectName).exe" LinkIncremental="1" - AdditionalLibraryDirectories="$(OGRE_HOME)\lib" + AdditionalLibraryDirectories="$(OGRE_HOME)\lib;C:\SVN\trunk\perceptioncrash\lib\sdl\win\lib" GenerateDebugInformation="true" SubSystem="2" OptimizeReferences="2" @@ -223,6 +224,10 @@ > </File> <File + RelativePath="..\..\..\src\NewGameState.cpp" + > + </File> + <File RelativePath="..\..\..\src\PauseState.cpp" > </File> @@ -242,6 +247,22 @@ RelativePath="..\..\..\src\QuestManager.cpp" > </File> + <File + RelativePath="..\..\..\src\tinyxml\tinystr.cpp" + > + </File> + <File + RelativePath="..\..\..\src\tinyxml\tinyxml.cpp" + > + </File> + <File + RelativePath="..\..\..\src\tinyxml\tinyxmlerror.cpp" + > + </File> + <File + RelativePath="..\..\..\src\tinyxml\tinyxmlparser.cpp" + > + </File> </Filter> <Filter Name="Header Files" @@ -253,6 +274,10 @@ > </File> <File + RelativePath="..\..\..\src\EntityManager.hpp" + > + </File> + <File RelativePath="..\..\..\src\Factory.hpp" > </File> @@ -293,6 +318,10 @@ > </File> <File + RelativePath="..\..\..\src\NewGameState.hpp" + > + </File> + <File RelativePath="..\..\..\src\PauseState.hpp" > </File> @@ -313,6 +342,18 @@ > </File> <File + RelativePath="..\..\..\src\Quests.hpp" + > + </File> + <File + RelativePath="..\..\..\src\tinyxml\tinystr.h" + > + </File> + <File + RelativePath="..\..\..\src\tinyxml\tinyxml.h" + > + </File> + <File RelativePath="..\..\..\src\item_system\WeaponItem.hpp" > </File> Added: trunk/perceptioncrash/data/gui/newgame.xml =================================================================== --- trunk/perceptioncrash/data/gui/newgame.xml (rev 0) +++ trunk/perceptioncrash/data/gui/newgame.xml 2006-06-01 13:10:49 UTC (rev 79) @@ -0,0 +1,225 @@ +<?xml version="1.0" encoding="UTF-8"?> +<GUILayout> +<Window Type="DefaultWindow" Name="Root" > +<Property Name="UnifiedAreaRect" Value="{{0.000000,0.000000},{0.000000,0.000000},{1.000000,0.000000},{1.000000,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +<Window Type="TaharezLook/StaticText" Name="lblPoints" > +<Property Name="BackgroundImage" Value="set:TaharezLook image:StaticBackdrop" /> +<Property Name="BottomFrameImage" Value="set:TaharezLook image:StaticBottom" /> +<Property Name="BottomLeftFrameImage" Value="set:TaharezLook image:StaticBottomLeft" /> +<Property Name="BottomRightFrameImage" Value="set:TaharezLook image:StaticBottomRight" /> +<Property Name="LeftFrameImage" Value="set:TaharezLook image:StaticLeft" /> +<Property Name="RightFrameImage" Value="set:TaharezLook image:StaticRight" /> +<Property Name="Text" Value="Points Remaining:" /> +<Property Name="TopFrameImage" Value="set:TaharezLook image:StaticTop" /> +<Property Name="TopLeftFrameImage" Value="set:TaharezLook image:StaticTopLeft" /> +<Property Name="TopRightFrameImage" Value="set:TaharezLook image:StaticTopRight" /> +<Property Name="UnifiedAreaRect" Value="{{0.065000,0.000000},{0.085000,0.000000},{0.210000,0.000000},{0.145000,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +</Window> +<Window Type="TaharezLook/StaticText" Name="lblPointsRemaining" > +<Property Name="BackgroundImage" Value="set:TaharezLook image:StaticBackdrop" /> +<Property Name="BottomFrameImage" Value="set:TaharezLook image:StaticBottom" /> +<Property Name="BottomLeftFrameImage" Value="set:TaharezLook image:StaticBottomLeft" /> +<Property Name="BottomRightFrameImage" Value="set:TaharezLook image:StaticBottomRight" /> +<Property Name="Font" Value="Commonwealth-10" /> +<Property Name="LeftFrameImage" Value="set:TaharezLook image:StaticLeft" /> +<Property Name="RightFrameImage" Value="set:TaharezLook image:StaticRight" /> +<Property Name="Text" Value="10" /> +<Property Name="TopFrameImage" Value="set:TaharezLook image:StaticTop" /> +<Property Name="TopLeftFrameImage" Value="set:TaharezLook image:StaticTopLeft" /> +<Property Name="TopRightFrameImage" Value="set:TaharezLook image:StaticTopRight" /> +<Property Name="UnifiedAreaRect" Value="{{0.252500,0.000000},{0.085000,0.000000},{0.311250,0.000000},{0.145000,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +</Window> +<Window Type="TaharezLook/StaticText" Name="lblSTR" > +<Property Name="BackgroundImage" Value="set:TaharezLook image:StaticBackdrop" /> +<Property Name="BottomFrameImage" Value="set:TaharezLook image:StaticBottom" /> +<Property Name="BottomLeftFrameImage" Value="set:TaharezLook image:StaticBottomLeft" /> +<Property Name="BottomRightFrameImage" Value="set:TaharezLook image:StaticBottomRight" /> +<Property Name="Font" Value="Commonwealth-10" /> +<Property Name="LeftFrameImage" Value="set:TaharezLook image:StaticLeft" /> +<Property Name="RightFrameImage" Value="set:TaharezLook image:StaticRight" /> +<Property Name="Text" Value="Strength:" /> +<Property Name="TopFrameImage" Value="set:TaharezLook image:StaticTop" /> +<Property Name="TopLeftFrameImage" Value="set:TaharezLook image:StaticTopLeft" /> +<Property Name="TopRightFrameImage" Value="set:TaharezLook image:StaticTopRight" /> +<Property Name="UnifiedAreaRect" Value="{{0.065000,0.000000},{0.168333,0.000000},{0.210000,0.000000},{0.228333,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +</Window> +<Window Type="TaharezLook/Spinner" Name="spnAGI" > +<Property Name="CurrentValue" Value="60.000000" /> +<Property Name="Text" Value="60" /> +<Property Name="UnifiedAreaRect" Value="{{0.252500,0.000000},{0.250000,0.000000},{0.327500,0.000000},{0.306667,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +</Window> +<Window Type="TaharezLook/StaticText" Name="lblAGI" > +<Property Name="BackgroundImage" Value="set:TaharezLook image:StaticBackdrop" /> +<Property Name="BottomFrameImage" Value="set:TaharezLook image:StaticBottom" /> +<Property Name="BottomLeftFrameImage" Value="set:TaharezLook image:StaticBottomLeft" /> +<Property Name="BottomRightFrameImage" Value="set:TaharezLook image:StaticBottomRight" /> +<Property Name="Font" Value="Commonwealth-10" /> +<Property Name="LeftFrameImage" Value="set:TaharezLook image:StaticLeft" /> +<Property Name="RightFrameImage" Value="set:TaharezLook image:StaticRight" /> +<Property Name="Text" Value="Agility:" /> +<Property Name="TopFrameImage" Value="set:TaharezLook image:StaticTop" /> +<Property Name="TopLeftFrameImage" Value="set:TaharezLook image:StaticTopLeft" /> +<Property Name="TopRightFrameImage" Value="set:TaharezLook image:StaticTopRight" /> +<Property Name="UnifiedAreaRect" Value="{{0.065000,0.000000},{0.250000,0.000000},{0.210000,0.000000},{0.310000,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +</Window> +<Window Type="TaharezLook/Spinner" Name="spnSTR" > +<Property Name="CurrentValue" Value="60.000000" /> +<Property Name="Font" Value="Commonwealth-10" /> +<Property Name="Text" Value="60" /> +<Property Name="UnifiedAreaRect" Value="{{0.252500,0.000000},{0.168334,0.000000},{0.327500,0.000000},{0.225001,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +</Window> +<Window Type="TaharezLook/StaticText" Name="lblCON" > +<Property Name="BackgroundImage" Value="set:TaharezLook image:StaticBackdrop" /> +<Property Name="BottomFrameImage" Value="set:TaharezLook image:StaticBottom" /> +<Property Name="BottomLeftFrameImage" Value="set:TaharezLook image:StaticBottomLeft" /> +<Property Name="BottomRightFrameImage" Value="set:TaharezLook image:StaticBottomRight" /> +<Property Name="Font" Value="Commonwealth-10" /> +<Property Name="LeftFrameImage" Value="set:TaharezLook image:StaticLeft" /> +<Property Name="RightFrameImage" Value="set:TaharezLook image:StaticRight" /> +<Property Name="Text" Value="Constitution:" /> +<Property Name="TopFrameImage" Value="set:TaharezLook image:StaticTop" /> +<Property Name="TopLeftFrameImage" Value="set:TaharezLook image:StaticTopLeft" /> +<Property Name="TopRightFrameImage" Value="set:TaharezLook image:StaticTopRight" /> +<Property Name="UnifiedAreaRect" Value="{{0.065000,0.000000},{0.415000,0.000000},{0.210000,0.000000},{0.475000,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +</Window> +<Window Type="TaharezLook/Spinner" Name="spnDEX" > +<Property Name="CurrentValue" Value="60.000000" /> +<Property Name="Font" Value="Commonwealth-10" /> +<Property Name="Text" Value="60" /> +<Property Name="UnifiedAreaRect" Value="{{0.251250,0.000000},{0.333334,0.000000},{0.326250,0.000000},{0.390001,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +</Window> +<Window Type="TaharezLook/Spinner" Name="spnCON" > +<Property Name="CurrentValue" Value="60.000000" /> +<Property Name="Font" Value="Commonwealth-10" /> +<Property Name="Text" Value="60" /> +<Property Name="UnifiedAreaRect" Value="{{0.251250,0.000000},{0.415000,0.000000},{0.326250,0.000000},{0.471667,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +</Window> +<Window Type="TaharezLook/StaticText" Name="lblDEX" > +<Property Name="BackgroundImage" Value="set:TaharezLook image:StaticBackdrop" /> +<Property Name="BottomFrameImage" Value="set:TaharezLook image:StaticBottom" /> +<Property Name="BottomLeftFrameImage" Value="set:TaharezLook image:StaticBottomLeft" /> +<Property Name="BottomRightFrameImage" Value="set:TaharezLook image:StaticBottomRight" /> +<Property Name="Font" Value="Commonwealth-10" /> +<Property Name="LeftFrameImage" Value="set:TaharezLook image:StaticLeft" /> +<Property Name="RightFrameImage" Value="set:TaharezLook image:StaticRight" /> +<Property Name="Text" Value="Dexterity:" /> +<Property Name="TopFrameImage" Value="set:TaharezLook image:StaticTop" /> +<Property Name="TopLeftFrameImage" Value="set:TaharezLook image:StaticTopLeft" /> +<Property Name="TopRightFrameImage" Value="set:TaharezLook image:StaticTopRight" /> +<Property Name="UnifiedAreaRect" Value="{{0.065000,0.000000},{0.333333,0.000000},{0.210000,0.000000},{0.393333,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +</Window> +<Window Type="TaharezLook/StaticText" Name="lblWIL" > +<Property Name="BackgroundImage" Value="set:TaharezLook image:StaticBackdrop" /> +<Property Name="BottomFrameImage" Value="set:TaharezLook image:StaticBottom" /> +<Property Name="BottomLeftFrameImage" Value="set:TaharezLook image:StaticBottomLeft" /> +<Property Name="BottomRightFrameImage" Value="set:TaharezLook image:StaticBottomRight" /> +<Property Name="Font" Value="Commonwealth-10" /> +<Property Name="LeftFrameImage" Value="set:TaharezLook image:StaticLeft" /> +<Property Name="RightFrameImage" Value="set:TaharezLook image:StaticRight" /> +<Property Name="Text" Value="Will:" /> +<Property Name="TopFrameImage" Value="set:TaharezLook image:StaticTop" /> +<Property Name="TopLeftFrameImage" Value="set:TaharezLook image:StaticTopLeft" /> +<Property Name="TopRightFrameImage" Value="set:TaharezLook image:StaticTopRight" /> +<Property Name="UnifiedAreaRect" Value="{{0.066250,0.000000},{0.581667,0.000000},{0.211250,0.000000},{0.641667,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +</Window> +<Window Type="TaharezLook/Spinner" Name="spnINT" > +<Property Name="CurrentValue" Value="60.000000" /> +<Property Name="Font" Value="Commonwealth-10" /> +<Property Name="Text" Value="60" /> +<Property Name="UnifiedAreaRect" Value="{{0.253750,0.000000},{0.503334,0.000000},{0.328750,0.000000},{0.560001,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +</Window> +<Window Type="TaharezLook/Spinner" Name="spnWIL" > +<Property Name="CurrentValue" Value="60.000000" /> +<Property Name="Font" Value="Commonwealth-10" /> +<Property Name="Text" Value="60" /> +<Property Name="UnifiedAreaRect" Value="{{0.255000,0.000000},{0.583334,0.000000},{0.330000,0.000000},{0.640001,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +</Window> +<Window Type="TaharezLook/StaticText" Name="lblINT" > +<Property Name="BackgroundImage" Value="set:TaharezLook image:StaticBackdrop" /> +<Property Name="BottomFrameImage" Value="set:TaharezLook image:StaticBottom" /> +<Property Name="BottomLeftFrameImage" Value="set:TaharezLook image:StaticBottomLeft" /> +<Property Name="BottomRightFrameImage" Value="set:TaharezLook image:StaticBottomRight" /> +<Property Name="Font" Value="Commonwealth-10" /> +<Property Name="LeftFrameImage" Value="set:TaharezLook image:StaticLeft" /> +<Property Name="RightFrameImage" Value="set:TaharezLook image:StaticRight" /> +<Property Name="Text" Value="Intelligence:" /> +<Property Name="TopFrameImage" Value="set:TaharezLook image:StaticTop" /> +<Property Name="TopLeftFrameImage" Value="set:TaharezLook image:StaticTopLeft" /> +<Property Name="TopRightFrameImage" Value="set:TaharezLook image:StaticTopRight" /> +<Property Name="UnifiedAreaRect" Value="{{0.065000,0.000000},{0.501666,0.000000},{0.210000,0.000000},{0.561666,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +</Window> +<Window Type="TaharezLook/Editbox" Name="txtName" > +<Property Name="MaxTextLength" Value="1073741823" /> +<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseTextBar" /> +<Property Name="UnifiedAreaRect" Value="{{0.253750,0.000000},{0.668333,0.000000},{0.503750,0.000000},{0.728333,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +</Window> +<Window Type="TaharezLook/StaticText" Name="lblName" > +<Property Name="BackgroundImage" Value="set:TaharezLook image:StaticBackdrop" /> +<Property Name="BottomFrameImage" Value="set:TaharezLook image:StaticBottom" /> +<Property Name="BottomLeftFrameImage" Value="set:TaharezLook image:StaticBottomLeft" /> +<Property Name="BottomRightFrameImage" Value="set:TaharezLook image:StaticBottomRight" /> +<Property Name="LeftFrameImage" Value="set:TaharezLook image:StaticLeft" /> +<Property Name="RightFrameImage" Value="set:TaharezLook image:StaticRight" /> +<Property Name="Text" Value="Name:" /> +<Property Name="TopFrameImage" Value="set:TaharezLook image:StaticTop" /> +<Property Name="TopLeftFrameImage" Value="set:TaharezLook image:StaticTopLeft" /> +<Property Name="TopRightFrameImage" Value="set:TaharezLook image:StaticTopRight" /> +<Property Name="UnifiedAreaRect" Value="{{0.065000,0.000000},{0.666667,0.000000},{0.157500,0.000000},{0.728333,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +</Window> +<Window Type="TaharezLook/Button" Name="bntOK" > +<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseArrow" /> +<Property Name="Text" Value="OK" /> +<Property Name="UnifiedAreaRect" Value="{{0.325000,0.000000},{0.841667,0.000000},{0.453750,0.000000},{0.931667,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +</Window> +<Window Type="TaharezLook/Button" Name="btnCancel" > +<Property Name="Font" Value="Commonwealth-10" /> +<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseArrow" /> +<Property Name="Text" Value="Cancel" /> +<Property Name="UnifiedAreaRect" Value="{{0.477500,0.000000},{0.840000,0.000000},{0.606250,0.000000},{0.930000,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +</Window> +<Window Type="TaharezLook/StaticText" Name="lblSex" > +<Property Name="BackgroundImage" Value="set:TaharezLook image:StaticBackdrop" /> +<Property Name="BottomFrameImage" Value="set:TaharezLook image:StaticBottom" /> +<Property Name="BottomLeftFrameImage" Value="set:TaharezLook image:StaticBottomLeft" /> +<Property Name="BottomRightFrameImage" Value="set:TaharezLook image:StaticBottomRight" /> +<Property Name="LeftFrameImage" Value="set:TaharezLook image:StaticLeft" /> +<Property Name="RightFrameImage" Value="set:TaharezLook image:StaticRight" /> +<Property Name="Text" Value="Sex:" /> +<Property Name="TopFrameImage" Value="set:TaharezLook image:StaticTop" /> +<Property Name="TopLeftFrameImage" Value="set:TaharezLook image:StaticTopLeft" /> +<Property Name="TopRightFrameImage" Value="set:TaharezLook image:StaticTopRight" /> +<Property Name="UnifiedAreaRect" Value="{{0.066250,0.000000},{0.753333,0.000000},{0.125000,0.000000},{0.813333,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +</Window> +<Window Type="TaharezLook/RadioButton" Name="rdoMale" > +<Property Name="Text" Value="Male" /> +<Property Name="UnifiedAreaRect" Value="{{0.255000,0.000000},{0.753333,0.000000},{0.327500,0.000000},{0.800000,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +</Window> +<Window Type="TaharezLook/RadioButton" Name="rdoFemale" > +<Property Name="Font" Value="Commonwealth-10" /> +<Property Name="Text" Value="Female" /> +<Property Name="UnifiedAreaRect" Value="{{0.376250,0.000000},{0.751666,0.000000},{0.470000,0.000000},{0.798333,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +</Window> +</Window> +</GUILayout> Modified: trunk/perceptioncrash/src/Entity.hpp =================================================================== --- trunk/perceptioncrash/src/Entity.hpp 2006-05-26 19:57:10 UTC (rev 78) +++ trunk/perceptioncrash/src/Entity.hpp 2006-06-01 13:10:49 UTC (rev 79) @@ -2,19 +2,40 @@ #define PC_ENTITY_HPP #include <OgreEntity.h> +#include <string> +#include <vector> +#include "tinyxml/tinyxml.h" + +#include "Quest.hpp" +#include "QuestManager.hpp" + +class QuestManager; +class Quest; + class Entity : public Ogre::Entity { public: Entity(void); + Entity(TiXmlElement* node); + public: ~Entity(void); + bool HasQuest; + private: - std::string mName; + std::string mName; + std::vector<Quest*> mQuests; //quests that the entity has that the player can get + + QuestManager* mAssignedQuests; //quests the player has accepted + + + + }; #endif /* PC_ENTITY_HPP */ Modified: trunk/perceptioncrash/src/IntroState.cpp =================================================================== --- trunk/perceptioncrash/src/IntroState.cpp 2006-05-26 19:57:10 UTC (rev 78) +++ trunk/perceptioncrash/src/IntroState.cpp 2006-06-01 13:10:49 UTC (rev 79) @@ -23,8 +23,10 @@ mExitGame = false; - mTimerID = SDL_AddTimer(3000, IntroState::timerCallback, this); + //SDL_Init(SDL_INIT_TIMER); + //mTimerID = SDL_AddTimer(3000, IntroState::timerCallback, this); + } void @@ -38,8 +40,7 @@ mRoot->getAutoCreatedWindow()->removeAllViewports(); mRoot->destroySceneManager(mSceneMgr); - SDL_RemoveTimer(mTimerID); - + //SDL_Quit(); } void @@ -88,6 +89,7 @@ Uint32 IntroState::timerCallback(Uint32 interval, void* param) { + SDL_RemoveTimer(IntroState::getInstance()->mTimerID); IntroState::getInstance()->changeState(MainMenuState::getInstance()); return 0; Modified: trunk/perceptioncrash/src/MainMenuState.cpp =================================================================== --- trunk/perceptioncrash/src/MainMenuState.cpp 2006-05-26 19:57:10 UTC (rev 78) +++ trunk/perceptioncrash/src/MainMenuState.cpp 2006-06-01 13:10:49 UTC (rev 79) @@ -1,7 +1,7 @@ #include <Ogre.h> #include "MainMenuState.hpp" -#include "PlayState.hpp" +#include "NewGameState.hpp" MainMenuState MainMenuState::mMainMenuState; @@ -72,7 +72,7 @@ { if (e->getButton() == "select") { - changeState(PlayState::getInstance()); + changeState(NewGameState::getInstance()); } if (e->getButton() == "back") Modified: trunk/perceptioncrash/src/Quest.cpp =================================================================== --- trunk/perceptioncrash/src/Quest.cpp 2006-05-26 19:57:10 UTC (rev 78) +++ trunk/perceptioncrash/src/Quest.cpp 2006-06-01 13:10:49 UTC (rev 79) @@ -7,3 +7,9 @@ Quest::~Quest(void) { } + +Quest::Quest(TiXmlElement* node) +{ + + +} \ No newline at end of file Modified: trunk/perceptioncrash/src/Quest.hpp =================================================================== --- trunk/perceptioncrash/src/Quest.hpp 2006-05-26 19:57:10 UTC (rev 78) +++ trunk/perceptioncrash/src/Quest.hpp 2006-06-01 13:10:49 UTC (rev 79) @@ -1,12 +1,15 @@ #ifndef PC_QUEST_HPP #define PC_QUEST_HPP -#include "tinyxml/tinyxml.h" #include <string> #include <vector> -using namespace std; +#include "tinyxml/tinyxml.h" +#include "Entity.hpp" + +class Entity; + enum QuestType { QUEST_FED_EX, @@ -24,50 +27,62 @@ REWARD_LOOT }; -struct QuestStep +class Quest; + +class QuestStep { public: - string StepName; + std::string StepName; + Entity* Target; + int ConversationIndex; + int RewardIndex; + int ItemToGiveIndex; + QuestType Interaction; + long TimeLimit; + std::vector<Quest> SubQuests; + }; + class Quest { public: Quest(void); - Quest(TiXmlElement* element); + Quest(TiXmlElement* node); public: ~Quest(void); void Save(); - void Save(string filename); + void Save(std::string filename); + void Save(TiXmlElement* parent); - void Load(string filename); + void Load(std::string filename); + void Load(TiXmlElement* node); - private: - string mName; - QuestType mType; - int mID; - string mDescription; + int mID; + std::string mName; + QuestType mType; + std::string mDescription; - RewardType mRewardType; - int mRewardID; //for loot reward - int mRewardAmount; //for cash reward + RewardType mRewardType; + int mRewardID; //for loot reward + int mRewardAmount; //for cash reward - vector<QuestStep> mSteps; + std::vector<QuestStep> mSteps; - long mTimeLimit; //measured in milliseconds, 0 = no time limit + long mTimeLimit; //measured in milliseconds, 0 = no time limit - vector<int> mPreQuestsRequired; //quests that must be completed before this one + std::vector<int> mPreQuestsRequired; //quests that must be completed before this one - bool mAllowMultiple; //can this quest be performed multiple times - long mTimeBetweenQuests; //measured in milliseconds, 0 = no time limit + bool mAllowMultiple; //can this quest be performed multiple times + long mTimeBetweenQuests; //measured in milliseconds, 0 = no time limit - string mFileName; //the file this quest is saved in + std::string mFileName; //the file this quest is saved in Modified: trunk/perceptioncrash/src/QuestManager.cpp =================================================================== --- trunk/perceptioncrash/src/QuestManager.cpp 2006-05-26 19:57:10 UTC (rev 78) +++ trunk/perceptioncrash/src/QuestManager.cpp 2006-06-01 13:10:49 UTC (rev 79) @@ -1,4 +1,48 @@ #include "QuestManager.hpp" -QuestManager QuestManager::mQuestManager; +Quest* QuestManager::FindQuest(int id) +{ + + return NULL; +} + +void QuestManager::Load(TiXmlElement* node) +{ + +} + +void QuestManager::Save(TiXmlElement* parent) +{ + + +} + +bool QuestManager::AssignQuest(int id, Entity* entity) +{ + + if (!PlayerHasQuest(id)) + { + AssignedQuest* qst = new AssignedQuest(); + + qst->mID=id; + qst->mCurStep=0; + + mQuests.push_back(*qst); + + return true; + } + + return false; +} + +bool QuestManager::PlayerHasQuest(int id) +{ + for (int i=0; i < ((int)mQuests.size())-1; i++) + { + if (mQuests[i].mID == id) + return true; + } + + return false; +} \ No newline at end of file Modified: trunk/perceptioncrash/src/QuestManager.hpp =================================================================== --- trunk/perceptioncrash/src/QuestManager.hpp 2006-05-26 19:57:10 UTC (rev 78) +++ trunk/perceptioncrash/src/QuestManager.hpp 2006-06-01 13:10:49 UTC (rev 79) @@ -1,23 +1,50 @@ #ifndef PC_QUEST_MANAGER_HPP #define PC_QUEST_MANAGER_HPP +#include <vector> +#include "tinyxml/tinyxml.h" #include "GameState.hpp" #include "QuestLogState.hpp" +#include "Entity.hpp" +#include "Quest.hpp" +class Entity; +class Quest; + +class AssignedQuest +{ +public: + + int mID; //quest ID - unique identifier + int mQuestIndex; //index into quests array for level + int mCurStep; //the current step of the quest that the player is on + long mTimeStepStarted; //time the current step was started + long mTimeStepFinished; //time the previous step was finished + long mTimeQuestStarted; //time the quest was started + long mTimeQuestFinished; //if the quest has been finished, time it was finished +}; + +//manager class for the quests that the player has accepted class QuestManager { public: - static QuestManager* getInstance() - { return &mQuestManager; } + QuestManager(TiXmlElement* node); + void ShowQuestLog() {GameManager::getSingleton().pushState(QuestLogState::getInstance());} -private: + void Load(TiXmlElement* node); + void Save(TiXmlElement* parent); - static QuestManager mQuestManager; + bool AssignQuest(int id, Entity* entity); + bool PlayerHasQuest(int id); + Quest* FindQuest(int id); +private: + std::vector<AssignedQuest> mQuests; + }; #endif /* PC_QUEST_MANAGER_HPP */ Added: trunk/perceptioncrash/src/Quests.hpp =================================================================== --- trunk/perceptioncrash/src/Quests.hpp (rev 0) +++ trunk/perceptioncrash/src/Quests.hpp 2006-06-01 13:10:49 UTC (rev 79) @@ -0,0 +1,25 @@ +#ifndef QUESTS_HPP +#define QUESTS_HPP + +#include <vector> +#include "Quest.hpp" + +class Quest; + +//manager class for all entities in a level +class Quests: public std::vector<Quest> +{ +public: + + static Quests* getInstance() + { return &mQuests; } + +protected: + Quests() { }; + +private: + + static Quests mQuests; + +} +#endif /* QUESTS_HPP */ \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sik...@us...> - 2006-05-26 19:57:15
|
Revision: 78 Author: sik0fewl Date: 2006-05-26 12:57:10 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=78&view=rev Log Message: ----------- Fixed button mappings for 'pause' and 'back' Modified Paths: -------------- trunk/perceptioncrash/data/config.xml Modified: trunk/perceptioncrash/data/config.xml =================================================================== --- trunk/perceptioncrash/data/config.xml 2006-05-26 18:38:09 UTC (rev 77) +++ trunk/perceptioncrash/data/config.xml 2006-05-26 19:57:10 UTC (rev 78) @@ -4,8 +4,8 @@ <InputController type="KeyboardMouse" name="default"> <!-- Note: these will use strings instead of codes in the future --> <MapKey from="57" to="select" /> - <MapKey from="1" to="pause"/> - <MapKey from="25" to="back"/> + <MapKey from="25" to="pause"/> + <MapKey from="1" to="back"/> <MapKey from="208" to="move_down"/> <MapKey from="88" to="toggle_fps"/> </InputController> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sir...@us...> - 2006-05-26 18:38:22
|
Revision: 77 Author: sirisian Date: 2006-05-26 11:38:09 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=77&view=rev Log Message: ----------- Added Paths: ----------- trunk/perceptioncrash/src/item_system2/ trunk/perceptioncrash/src/item_system2/ItemManager.hpp trunk/perceptioncrash/src/item_system2/cDATA_itemSystem.hpp trunk/perceptioncrash/src/item_system2/cDATA_weaponItem.hpp trunk/perceptioncrash/src/item_system2/c_containerContents.hpp trunk/perceptioncrash/src/item_system2/c_itemSystem.hpp trunk/perceptioncrash/src/item_system2/c_unitWindow.hpp trunk/perceptioncrash/src/item_system2/c_weaponItem.hpp trunk/perceptioncrash/src/item_system2/class_text.h Added: trunk/perceptioncrash/src/item_system2/ItemManager.hpp =================================================================== --- trunk/perceptioncrash/src/item_system2/ItemManager.hpp (rev 0) +++ trunk/perceptioncrash/src/item_system2/ItemManager.hpp 2006-05-26 18:38:09 UTC (rev 77) @@ -0,0 +1,126 @@ +enum enumSupplyType{ +metal +}; + +enum enumUsuableType{ +buff +}; + +enum enumAmmoType{ +solid, +energy +}; + +enum enumEquipableType{ +ArmorHelmet, +ArmorBody, +ArmorGauntlets, +ArmorLegs +}; + +//class c_itemInventory; +struct s_dataRange +{ + int min, max;//The minimum and maximum of the range. +}; +#include "cDATA_itemSystem.hpp" +#include "c_itemSystem.hpp" +#include "c_unitWindow.hpp" + + +class c_itemManager +{ +private: + +public: + cDATA_itemData itemData; + std::vector<c_itemInventory*> itemContainerArray; + c_unitWindow unitWindow; + + c_itemManager::c_itemManager(){ + + } + + void InitializeItemData(std::string name){ + + + TiXmlDocument configFile; + TiXmlElement* configNode; + /// @todo This should load the file using the Ogre resource manager + //configFile.Parse(&(Ogre::ResourceGroupManager::getSingleton().openResource("config.xml")->getAsString()[0])); + configFile.LoadFile("data/config.xml"); + configNode = dynamic_cast<TiXmlElement*>(configFile.RootElement()->FirstChild("Item")); + assert(configNode != 0); + + + throw std::runtime_error("Controller '" + name + "' already exists"); + + + TiXmlElement* node; + InputManager* inputManager = InputManager::getSingletonPtr(); + inputManager->getEventProcessor()->addKeyListener(this); + inputManager->getEventProcessor()->addMouseMotionListener(this); + + // Make sure we were given the right kind of node + if (static_cast<std::string>(node->Value()) != "item") + { + throw std::runtime_error("Invalid XML node. Must be element called item."); + } + static_cast<std::string>(node->Attribute("type")) + for (TiXmlNode* child = node->FirstChild(); child; child = child->NextSibling()) + { + TiXmlElement* nodeItemData = dynamic_cast<TiXmlElement*>(child); + + if (nodeItemData == 0) + continue; + //nodeItemData->Attribute("classification", &classification); + std::string classification = 0; + + itemData.addItem( + static_cast<std::string>(node->Attribute("classification")), + static_cast<std::string>(node->Attribute("name")), + static_cast<std::string>(node->Attribute("size")) + static_cast<std::string>(node->Attribute("rariety")) + static_cast<std::string>(node->Attribute("questNumber")) + ); + if(nodeItemData->Attribute("classification")=="supply"){ + + }else if(nodeItemData->Attribute("classification")=="usuable"){ + + } + + Button to; + + + to = nodeItemData->Attribute("to"); + + createKeyboardInputButton(to, from); + } + } + /* + itemData.addItem("supply", "iron ore", 10, 0, 0); + dynamic_cast<cDATA_supplyItem&>(itemData.editLastCreated()).supplyType = metal; + itemData.addItem("supply", "copper ore", 10, 0, 0); + itemData.addItem("supply", "coal ore", 10, 0, 0); + itemData.addItem("supply", "steel bar", 10, 1, 0); + itemData.addItem("supply", "bronze bar", 10, 1, 0); + itemData.addItem("supply", "electronic chip", 10, 1, 0); + itemData.addItem("supply", "copper bar", 10, 1, 0); + itemData.addItem("supply", "alloy", 10, 2, 0); + itemData.addItem("supply", "steel plate", 10, 2, 0); + itemData.addItem("usuable", "medkit", 10, 1, 0); + itemData.addItem("usuable", "drugs", 10, 2, 0); + itemData.addItem("weapon", "m16", 10, 2, 0); + //dynamic_cast<cDATA_usuableItem&>(itemData.editLastCreated()).attributeBuffs.addBuff("health rejuvenation", 10, 100); + //dynamic_cast<cDATA_usuableItem&>(itemData.editLastCreated()).attributeBuffs.addBuff("speed", -10, 50); + //itemData.editLastCreated().supplyType = metal; + */ + } + + void addItemContainer(){ + itemInventoryData.push_back(c_itemInventory); + } + + + +}; Added: trunk/perceptioncrash/src/item_system2/cDATA_itemSystem.hpp =================================================================== --- trunk/perceptioncrash/src/item_system2/cDATA_itemSystem.hpp (rev 0) +++ trunk/perceptioncrash/src/item_system2/cDATA_itemSystem.hpp 2006-05-26 18:38:09 UTC (rev 77) @@ -0,0 +1,138 @@ +#ifndef ITEM_DATA_HPP +#define ITEM_DATA_HPP + +class cDATA_buff +{ + struct s_statBuff + { + std::string buffType; + std::string attributeName; + int value; + int duration; + }; +public: + std::vector<s_statBuff> buffArray; + void addBuff(std::string buffType, std::string attributeName,int value, int duration){ // you'd add a buff like itemData.editLastCreated().addBuff("health rejuvenation", 10,100); meaning a buff of 10 to health rujevenation over 100 time + buffArray.push_back(s_statBuff()); + buffArray[buffArray.size()-1].type = type; + buffArray[buffArray.size()-1].attributeName = attributeName; + buffArray[buffArray.size()-1].value = value; + buffArray[buffArray.size()-1].duration = duration; + } + std::vector<cDATA_buff::s_statBuff> & getBuffs(){ + return buffArray; + } +}; + +class cDATA_item +{ +public: + virtual cDATA_item::~cDATA_item(){} + + std::string name; + std::string classification; + int size; + int rarity; + int questNumber; +}; + +class cDATA_supplyItem: public cDATA_item +{ +public: + enumSupplyType supplyType; +}; + +class cDATA_usuableItem: public cDATA_item +{ +public: + enumUsuableType usuableType; + int numberOfUses; + int cooldownPerUse; + cDATA_buff attributeBuffs; +}; + +class cDATA_ammoItem: public cDATA_item +{ +public: + enumAmmoType ammoType; + + cDATA_ammoItem::cDATA_ammoItem(){ + + } +}; + +class cDATA_equipableItem: public cDATA_item +{ +public: + enumEquipableType equipableType; + cDATA_buff attributeBuffs; + + cDATA_equipableItem::cDATA_equipableItem(){ + + } + cDATA_equipableItem::~cDATA_equipableItem(){ + + } +}; +#include "cDATA_weaponItem.hpp" + +class cDATA_itemDataFactory +{ +public: + cDATA_item *Create(std::string classification) + { + if(classification=="supply") + return new cDATA_supplyItem; + else if(classification=="usuable") + return new cDATA_usuableItem; + else if(classification=="ammo") + return new cDATA_ammoItem; + else if(classification=="equipable") + return new cDATA_equipableItem; + else if(classification=="weapon") + return new cDATA_weaponItem; + } +}; +class cDATA_itemData +{ +private: +cDATA_itemDataFactory itemDataFactory; + +public: + std::vector<cDATA_item*> itemData; + int lastIndex; + + cDATA_itemData::cDATA_itemData(){ + listIndex = 0; + listSize = 10; + } + + cDATA_itemData::~cDATA_itemData(){ + while(!itemData.empty()){ + delete itemData[itemData.size()-1]; + itemData.pop_back(); + } + } + + void addItem(std::string classification, std::string name, int size, int rarity, int questNumber) + { + itemData.push_back(itemDataFactory.Create(classification)); + + itemData[itemData.size()-1]->name = name; + itemData[itemData.size()-1]->classification = classification; + itemData[itemData.size()-1]->size = size; + itemData[itemData.size()-1]->rarity = rarity; + itemData[itemData.size()-1]->questNumber = questNumber; + lastIndex=itemData.size()-1; + } + + cDATA_item & editLastCreated(){ + return * itemData[lastIndex]; + } + + cDATA_item & editItemData(int index){ + return *itemData[index]; + } + +}; +#endif /* ITEM_DATA_HPP */ Added: trunk/perceptioncrash/src/item_system2/cDATA_weaponItem.hpp =================================================================== --- trunk/perceptioncrash/src/item_system2/cDATA_weaponItem.hpp (rev 0) +++ trunk/perceptioncrash/src/item_system2/cDATA_weaponItem.hpp 2006-05-26 18:38:09 UTC (rev 77) @@ -0,0 +1,117 @@ +struct s_color +{ + int r, g, b, a;//red,green,blue,alpha +}; +class cDATA_weaponItem : public cDATA_equipableItem +{ + struct s_modeAccuracy + { + int value;//Accuracy of the Gun -(value) to value modifier + int add;//Amount to add to accuracy when firing + int delay;//How many bullets have to be fired before the COF goes up + int delayTime;//The amount of time for the delay to reset + int cooldownTime;//The time it takes for the accuracy modifier to go down + int cooldownAmount;//The amount the accuracy will go down after the counter equals the time + //add crouch values later + }; + struct s_modeFireRate + { + int value;//Rate at which bullets are fired + int fireModeIndex; + int reFireRate; + int reFireModeIndex; + }; + struct s_modeChargeRate + { + int chargeType;//Charge for Each Bullet, Only Burst Fire, Only ShotGun + int value;//The amount the gun has to charge before firing + bool lockTheGun;//When performing the structures action is the gun locked from doing other things? + }; + struct s_modeStatMod + { + s_dataRange speed; + s_dataRange range; + //ect to have all the mods possible + int fireModeIndex; + }; + struct s_modeReload + { + int value;//The time it takes to reload + bool lockTheGun;//When performing the structures action is the gun locked from doing other things? + int fireModeIndex;//redirects to another firing mode if not its own + }; + struct s_modeBurstShot + { + int value;//How many times the Gun burst shots. + bool lockTheGun;//When performing the structures action is the gun locked from doing other things? + int fireModeIndex;//redirects to another firing mode if not its own + }; + struct s_modeSpreadShot//The number of projectiles fired at one time + { + int value; + bool lockTheGun;//When performing the structures action is the gun locked from doing other things? + int fireModeIndex;//redirects to another firing mode if not its own + }; + struct s_modeAmmoAndClip + { + int ammoType;//Solid, Energy, Grenade, Rocket + int caliber;//The size of the Rounds + int clipType;//Normal Magazine, Banana Clip, Shell Clip, Top-Load Magazine, Canister + s_dataRange speed;//Ammo has different speed classifications, 0-100, and the gun can only use ammo between two values + s_dataRange damageClass;//Ammo has different damage classifications, 0-100, and the gun can only use ammo between two values + s_dataRange range;//Ammo has different range classifications, 0-100, and the gun can only use ammo between two values + s_dataRange ammoCapacity;//Ammo has different ammo capacity classifications, 0-100, and the gun can only use ammo between two values + int fireModeIndex;//redirects to another firing mode if not its own + }; + struct s_modeParticles //When gun is fired, the particles that are created + { + s_color color; + int image; + int interval; + int amount; + int range; + int speed; + s_dataRange angle; + int fireModeIndex;//redirects to another firing mode if not its own + }; + struct s_modeMelee + { + bool value;//Whether the gun can melee + int range;//The range of the melee attack + int baseDamage;//The normal damage of the melee + int modDamage;//Any extra damage the gun may do + int interval;//The time it takes to melee with the weapon + }; + struct s_firingMode + { + s_modeAccuracy accuracy; + s_modeFireRate fireRate; + s_modeChargeRate chargeRate; + s_modeStatMod statMod; + s_modeReload reload; + s_modeBurstShot burstShot; + s_modeSpreadShot spreadShot; + s_modeAmmoAndClip ammoAndClip; + s_modeParticles fireParticles; + }; + +private: + s_modeMelee melee; + std::vector<s_firingMode> firingModes; + +public: + cDATA_weaponItem::cDATA_weaponItem(){ + + } + void Initialize(int numberOfFiringModes){ + for(int expandFiringModes = 0; expandFiringModes < numberOfFiringModes; ++expandFiringModes){ + firingModes.push_back(s_firingMode()); + } + } + s_firingMode & cDATA_weaponItem::editFiringMode(int firingMode){ + return firingModes[firingMode]; + } + s_modeMelee & cDATA_weaponItem::editMelee(int firingMode){ + return melee; + } +}; Added: trunk/perceptioncrash/src/item_system2/c_containerContents.hpp =================================================================== --- trunk/perceptioncrash/src/item_system2/c_containerContents.hpp (rev 0) +++ trunk/perceptioncrash/src/item_system2/c_containerContents.hpp 2006-05-26 18:38:09 UTC (rev 77) @@ -0,0 +1,34 @@ +class c_specificItemGroup +{ + struct s_specificItem + { + int itemDataIndex; + int quantity; + }; + struct s_randomItem + { + s_dataRange rarity; + }; + struct s_randomTypeItem + { + std::string type; + s_dataRange rarity; + }; + struct s_containerContents + { + std::vector<s_specificItem> specificItemArray; + std::vector<s_randomItem> randomItemArray; + std::vector<s_randomTypeItem> randomTypeItemArray; + }; +private: + std::vector<s_containerContents> mContainerContents; +public: + std::map< std::string, int> SpecificContainerMap; + c_specificContents::c_specificContents(){} + +void addItemGroup(std::string){ +mContainerContents.push_back(new +SpecificContainerMap[std::string] = +} + +}; Added: trunk/perceptioncrash/src/item_system2/c_itemSystem.hpp =================================================================== --- trunk/perceptioncrash/src/item_system2/c_itemSystem.hpp (rev 0) +++ trunk/perceptioncrash/src/item_system2/c_itemSystem.hpp 2006-05-26 18:38:09 UTC (rev 77) @@ -0,0 +1,113 @@ +class c_item +{ +public: + virtual c_item::~c_item(){} + int itemDataIndex; + int quantity; + bool slotUsed; +}; + +class c_supplyItem: public c_item +{ +public: + +}; + +class c_usuableItem: public c_item +{ +public: + enumUsuableType usuableType; + int amountLeft; + int cooldownCounter; + c_usuableItem::c_usuableItem(){ + amountLeft = 0; + cooldownCounter = 0; + } +}; + +class c_ammoItem: public c_item +{ +public: + enumAmmoType ammoType; + + c_ammoItem::c_ammoItem(){ + + } +}; + +class c_equipableItem: public c_item +{ +public: + c_equipableItem::c_equipableItem(){ + + } + c_equipableItem::~c_equipableItem(){} +}; +#include "c_weaponItem.hpp" +class c_itemDataFactory +{ +public: + c_item *Create(std::string classification) + { + if(classification=="supply") + return new c_supplyItem; + else if(classification=="usuable") + return new c_usuableItem; + else if(classification=="ammo") + return new c_ammoItem; + else if(classification=="equipable") + return new c_equipableItem; + else if(classification=="weapon") + return new c_weaponItem; + } +}; + +class c_itemInventory +{ +private: + c_itemDataFactory itemDataFactory; +public: + bool slotUsed; + std::vector<c_item*> itemInventoryData; + + c_itemInventory::c_itemInventory(){ + + } + + c_itemInventory::~c_itemInventory(){ + while(!itemInventoryData.empty()){ + delete itemInventoryData[itemInventoryData.size()-1]; + itemInventoryData.pop_back(); + } + } + + void addItem(cDATA_itemData & itemData, int itemDataIndex, int quantity) + { + + for(int cycleItems = 0; cycleItems < itemInventoryData.size(); ++cycleItems){ + if(itemInventoryData[cycleItems]->slotUsed == false){ + delete itemInventoryData[cycleItems]; + itemInventoryData[cycleItems] = itemDataFactory.Create(itemData.itemData[itemDataIndex]->classification); + itemInventoryData[cycleItems]->slotUsed = true; + itemInventoryData[cycleItems]->itemDataIndex = itemDataIndex; + itemInventoryData[cycleItems]->quantity = quantity; + return; + } + } + + itemInventoryData.push_back(itemDataFactory.Create(itemData.itemData[itemDataIndex]->classification)); + itemInventoryData[itemInventoryData.size()-1]->slotUsed = true; + itemInventoryData[itemInventoryData.size()-1]->itemDataIndex = itemDataIndex; + itemInventoryData[itemInventoryData.size()-1]->quantity = quantity; + } + + c_item & editItemData(int index){ + return *itemInventoryData[index]; + } + + void removeItem(int index){ + itemInventoryData[index]->slotUsed = false; + itemInventoryData.erase( itemInventoryData.begin()+index ); + } + +}; Added: trunk/perceptioncrash/src/item_system2/c_unitWindow.hpp =================================================================== --- trunk/perceptioncrash/src/item_system2/c_unitWindow.hpp (rev 0) +++ trunk/perceptioncrash/src/item_system2/c_unitWindow.hpp 2006-05-26 18:38:09 UTC (rev 77) @@ -0,0 +1,218 @@ +class c_unitWindow +{ + struct s_equipmentTile + { + int X, Y, alpha; + }; +private: + std::vector<s_equipmentTile> equipmentTileArray; + + int itemDatalistIndex; + int itemDatalistSize; + int itemDatalistCounter; + +public: + c_unitWindow::c_unitWindow(){ + for(int expandArray = 0; expandArray < 21; ++expandArray){ + equipmentTileArray.push_back(s_equipmentTile()); + equipmentTileArray[equipmentTileArray.size()-1].alpha = 255; + } + equipmentTileArray[0].X = 70; + equipmentTileArray[0].Y = 0; + equipmentTileArray[1].X = 140; + equipmentTileArray[1].Y = 0; + equipmentTileArray[2].X = 70; + equipmentTileArray[2].Y = 70; + equipmentTileArray[3].X = 70; + equipmentTileArray[3].Y = 130; + equipmentTileArray[4].X = 0; + equipmentTileArray[4].Y = 70; + equipmentTileArray[5].X = 0; + equipmentTileArray[5].Y = 130; + equipmentTileArray[6].X = 30; + equipmentTileArray[6].Y = 200; + equipmentTileArray[7].X = 30; + equipmentTileArray[7].Y = 260; + equipmentTileArray[8].X = 30; + equipmentTileArray[8].Y = 330; + + equipmentTileArray[9].X = 230; + equipmentTileArray[9].Y = 10; + equipmentTileArray[10].X = 230; + equipmentTileArray[10].Y = 70; + equipmentTileArray[11].X = 230; + equipmentTileArray[11].Y = 130; + equipmentTileArray[12].X = 230; + equipmentTileArray[12].Y = 190; + equipmentTileArray[13].X = 230; + equipmentTileArray[13].Y = 260; + equipmentTileArray[14].X = 230; + equipmentTileArray[14].Y = 320; + equipmentTileArray[15].X = 230; + equipmentTileArray[15].Y = 390; + //Transparent Counterparts + equipmentTileArray[16].X = 140; + equipmentTileArray[16].Y = 70; + equipmentTileArray[16].alpha = 175; + equipmentTileArray[17].X = 140; + equipmentTileArray[17].Y = 130; + equipmentTileArray[17].alpha = 175; + equipmentTileArray[18].X = 110; + equipmentTileArray[18].Y = 200; + equipmentTileArray[18].alpha = 175; + equipmentTileArray[19].X = 110; + equipmentTileArray[19].Y = 260; + equipmentTileArray[19].alpha = 175; + equipmentTileArray[20].X = 110; + equipmentTileArray[20].Y = 330; + equipmentTileArray[20].alpha = 175; + } + /* + void show(int offsetX, int offsetY){ + for(int cycleEquipmentTiles = 0; cycleEquipmentTiles < equipmentTileArray.size(); ++cycleEquipmentTiles){ + glColor4ub(255, 255, 255, equipmentTileArray[cycleEquipmentTiles].alpha); + glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); + glEnable (GL_BLEND); + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, IMGequipmentTile); + glBegin(GL_QUADS); + setVertexAndTexCoords(equipmentTileArray[cycleEquipmentTiles].X+offsetX, equipmentTileArray[cycleEquipmentTiles].Y+offsetY,60,60,64,64,0.0f,0.0f); + glEnd(); + glDisable(GL_TEXTURE_2D); + glDisable (GL_BLEND); + } + } + */ + //ItemData Stuff + /* + void checkClick(int mouseX, int mouseY, bool mouseDown, int offsetX, int offsetY){ + if(listCounter<10) + listCounter++; + if(mouseDown==true && listCounter == 10){ + listCounter = 0; + if(mouseX>offsetX && mouseX<offsetX+200 && mouseY>offsetY && mouseY<offsetY+20) + if(listIndex > 0) listIndex--; + + if(mouseX>offsetX && mouseX<offsetX+200 && mouseY>offsetY+(listSize+1)*20 && mouseY<offsetY+20+(listSize+1)*20) + if(listIndex+listSize < itemData.size()) listIndex++; + } + } + + void show(int offsetX, int offsetY){ + glBegin(GL_QUADS); + glColor4ub(200, 200, 200, 255); + glVertex2f(offsetX, offsetY); + glVertex2f(200+offsetX, offsetY); + glVertex2f(200+offsetX, 20+offsetY); + glVertex2f(offsetX, 20+offsetY); + glEnd(); + for(int cycleDataItems = listIndex, drawY = 0; cycleDataItems<(listIndex + listSize > itemData.size() ? itemData.size() : listIndex + listSize); ++cycleDataItems, ++drawY){ + glBegin(GL_QUADS); + glColor4ub(150, 150, 150, 255); + glVertex2f(offsetX, drawY*20+20+offsetY); + glVertex2f(200+offsetX, drawY*20+20+offsetY); + glVertex2f(200+offsetX, drawY*20+40+offsetY); + glVertex2f(offsetX, drawY*20+40+offsetY); + glEnd(); + switch(itemData[cycleDataItems]->rareness){ + case 0: + drawglyphs(itemData[cycleDataItems]->name, 60, 100+offsetX, 5+drawY*20+20+offsetY, 0, 3, 0, 204, 0, 255); + break; + case 1: + drawglyphs(itemData[cycleDataItems]->name, 60, 100+offsetX, 5+drawY*20+20+offsetY, 0, 3, 255, 255, 0, 255); + break; + case 2: + drawglyphs(itemData[cycleDataItems]->name, 60, 100+offsetX, 5+drawY*20+20+offsetY, 0, 3, 204, 0, 255, 255); + break; + } + } + glBegin(GL_QUADS); + glColor4ub(200, 200, 200, 255); + glVertex2f(offsetX, (listSize+1)*20+offsetY); + glVertex2f(200+offsetX, (listSize+1)*20+offsetY); + glVertex2f(200+offsetX, (listSize+1)*20+20+offsetY); + glVertex2f(offsetX, (listSize+1)*20+20+offsetY); + glEnd(); + + drawglyphs("up", 60, 100+offsetX, 5+offsetY, 0, 3, 0, 204, 0, 255); + drawglyphs("down", 60, 100+offsetX, 5+(listSize+1)*20+offsetY, 0, 3, 0, 204, 0, 255); + } + */ + //Item List Stuff + /* + void checkClick(int mouseX, int mouseY, bool mouseDown, int offsetX, int offsetY){ + if(listCounter<10) + listCounter++; + if(mouseDown==true && listCounter == 10){ + listCounter = 0; + if(mouseX>offsetX && mouseX<offsetX+200 && mouseY>offsetY && mouseY<offsetY+20) + if(listIndex > 0) listIndex--; + + if(mouseX>offsetX && mouseX<offsetX+200 && mouseY>offsetY+(listSize+1)*20 && mouseY<offsetY+20+(listSize+1)*20) + if(listIndex+listSize < itemInventoryData.size()) listIndex++; + + for(int cycleItems = listIndex, checkY = 0; cycleItems < (listIndex+listSize<itemInventoryData.size() ? listIndex+listSize : itemInventoryData.size()); ++cycleItems, ++checkY){ + if(itemInventoryData[cycleItems]->slotUsed == true){ + if(mouseX>offsetX && mouseX<offsetX+200 && mouseY>offsetY+20+checkY*20 && mouseY<offsetY+40+checkY*20){ + this->removeItem(cycleItems); + break; + } + } + } + } + } + */ + + /* + void show(int offsetX, int offsetY, cDATA_itemData & itemData){ + glBegin(GL_QUADS); + glColor4ub(200, 200, 200, 255); + glVertex2f(offsetX, offsetY); + glVertex2f(200+offsetX, offsetY); + glVertex2f(200+offsetX, 20+offsetY); + glVertex2f(offsetX, 20+offsetY); + glEnd(); + for(int cycleDataItems = listIndex, drawY = 0; cycleDataItems<(listIndex + listSize > itemInventoryData.size() ? itemInventoryData.size() : listIndex + listSize); ++cycleDataItems, ++drawY){ + if(itemInventoryData[cycleDataItems]->slotUsed == true){ + glBegin(GL_QUADS); + glColor4ub(150, 150, 150, 255); + glVertex2f(offsetX, drawY*20+20+offsetY); + glVertex2f(200+offsetX, drawY*20+20+offsetY); + glVertex2f(200+offsetX, drawY*20+40+offsetY); + glVertex2f(offsetX, drawY*20+40+offsetY); + glEnd(); + + switch(itemData.itemData[itemInventoryData[cycleDataItems]->itemDataIndex]->rareness){ + case 0: + drawglyphs(itemData.itemData[itemInventoryData[cycleDataItems]->itemDataIndex]->name, 60, 100+offsetX, 5+drawY*20+20+offsetY, 0, 3, 0, 204, 0, 255); + break; + case 1: + drawglyphs(itemData.itemData[itemInventoryData[cycleDataItems]->itemDataIndex]->name, 60, 100+offsetX, 5+drawY*20+20+offsetY, 0, 3, 255, 255, 0, 255); + break; + case 2: + drawglyphs(itemData.itemData[itemInventoryData[cycleDataItems]->itemDataIndex]->name, 60, 100+offsetX, 5+drawY*20+20+offsetY, 0, 3, 204, 0, 255, 255); + break; + } + }else{ + glBegin(GL_QUADS); + glColor4ub(255, 0, 255, 255); + glVertex2f(offsetX, drawY*20+20+offsetY); + glVertex2f(200+offsetX, drawY*20+20+offsetY); + glVertex2f(200+offsetX, drawY*20+40+offsetY); + glVertex2f(offsetX, drawY*20+40+offsetY); + glEnd(); + } + } + glBegin(GL_QUADS); + glColor4ub(200, 200, 200, 255); + glVertex2f(offsetX, (listSize+1)*20+offsetY); + glVertex2f(200+offsetX, (listSize+1)*20+offsetY); + glVertex2f(200+offsetX, (listSize+1)*20+20+offsetY); + glVertex2f(offsetX, (listSize+1)*20+20+offsetY); + glEnd(); + + drawglyphs("up", 60, 100+offsetX, 5+offsetY, 0, 3, 0, 204, 0, 255); + drawglyphs("down", 60, 100+offsetX, 5+(listSize+1)*20+offsetY, 0, 3, 0, 204, 0, 255); + } + */ +}; Added: trunk/perceptioncrash/src/item_system2/c_weaponItem.hpp =================================================================== --- trunk/perceptioncrash/src/item_system2/c_weaponItem.hpp (rev 0) +++ trunk/perceptioncrash/src/item_system2/c_weaponItem.hpp 2006-05-26 18:38:09 UTC (rev 77) @@ -0,0 +1,78 @@ +class c_weaponItem : public c_equipableItem +{ + struct s_modeAccuracy + { + int delayCounter; + int cooldownCounter; + //add crouch values later + }; + struct s_modeFireRate + { + int rateCounter; + int reFireRateCounter; + }; + struct s_modeChargeRate + { + int chargeCounter; + }; + struct s_modeStatMod + { + int speedMod; + int rangeMod; + //ect to have all the mods possible + }; + struct s_modeReload + { + int counter; + }; + struct s_modeBurstShot + { + int counter; + }; + struct s_modeSpreadShot//The number of projectiles fired at one time + { + int counter; + }; + struct s_modeAmmoAndClip + { + int itemNumber; + }; + struct s_modeParticles //When gun is fired, the particles that are created + { + int intervalCounter; + }; + struct s_modeMelee + { + int modDamage;//Any extra damage the gun may do + int intervalCounter;//a counter to keep track of when the gun can melee again + }; + struct s_firingMode + { + s_modeAccuracy accuracy; + s_modeFireRate fireRate; + s_modeChargeRate chargeRate; + s_modeStatMod statMod; + s_modeReload reload; + s_modeBurstShot burstShot; + s_modeSpreadShot spreadShot; + s_modeAmmoAndClip ammoAndClip; + }; +private: + s_modeMelee melee; + std::vector<s_firingMode> firingModes; +public: + c_weaponItem::c_weaponItem(){ + + } + void Initialize(int numberOfFiringModes){ + for(int expandFiringModes = 0; expandFiringModes < numberOfFiringModes; ++expandFiringModes){ + firingModes.push_back(s_firingMode()); + } + } + c_weaponItem::s_firingMode & editFiringMode(int firingMode){ + return firingModes[firingMode]; + } + c_weaponItem::s_modeMelee & editMeleeMode(int firingMode){ + return melee; + } +}; Added: trunk/perceptioncrash/src/item_system2/class_text.h =================================================================== --- trunk/perceptioncrash/src/item_system2/class_text.h (rev 0) +++ trunk/perceptioncrash/src/item_system2/class_text.h 2006-05-26 18:38:09 UTC (rev 77) @@ -0,0 +1,331 @@ +#ifndef textFunction +#define textFunction +struct s_textColor +{ +int red, green, blue, alpha; +}; +struct s_text +{ +bool slotUsed; +int fontSize; +int x,y,width; +int alignment; +s_textColor textColor; +std::string preText; +//double * variable; +//std::string postText; +}; + +void drawglyphs(std::string tempstring, int fontsize, int x, int y, int w, int alignment, int r, int g, int b, int a){ +int wc=0; +float size = float(fontsize)/100; +std::string::size_type length; +length=tempstring.size(); +switch(alignment){ +case 0: + break; +case 1: + w=length; + break; +case 2: + x-=int(size*20.0)*w/2; + break; +case 3: + w=length; + x-=int(size*20.0)*w/2; + break; +case 4: + x-=int(size*20.0)*w; + break; +case 5: + w=length; + x-=int(size*20.0)*w; + break; +default: + break; +} +float gridx,gridy,gridwidth,gridheight; + gridwidth = 16; + gridheight = 16; + for(int drawglyph=0;drawglyph<length;drawglyph++){ + switch(tempstring[drawglyph]){ + case ' ': + gridx = -16; + gridy = -16; + break; + case 'a': + gridx = 0; + gridy = 0; + break; + case 'b': + gridx = 16; + gridy = 0; + break; + case 'c': + gridx = 32; + gridy = 0; + break; + case 'd': + gridx = 48; + gridy = 0; + break; + case 'e': + gridx = 64; + gridy = 0; + break; + case 'f': + gridx = 80; + gridy = 0; + break; + case 'g': + gridx = 96; + gridy = 0; + break; + case 'h': + gridx = 112; + gridy = 0; + break; + case 'i': + gridx = 128; + gridy = 0; + break; + case 'j': + gridx = 144; + gridy = 0; + break; + case 'k': + gridx = 0; + gridy = 16; + break; + case 'l': + gridx = 16; + gridy = 16; + break; + case 'm': + gridx = 32; + gridy = 16; + break; + case 'n': + gridx = 48; + gridy = 16; + break; + case 'o': + gridx = 64; + gridy = 16; + break; + case 'p': + gridx = 80; + gridy = 16; + break; + case 'q': + gridx = 96; + gridy = 16; + break; + case 'r': + gridx = 112; + gridy = 16; + break; + case 's': + gridx = 128; + gridy = 16; + break; + case 't': + gridx = 144; + gridy = 16; + break; + case 'u': + gridx = 0; + gridy = 32; + break; + case 'v': + gridx = 16; + gridy = 32; + break; + case 'w': + gridx = 32; + gridy = 32; + break; + case 'x': + gridx = 48; + gridy = 32; + break; + case 'y': + gridx = 64; + gridy = 32; + break; + case 'z': + gridx = 80; + gridy = 32; + break; + case '0': + gridx = 96; + gridy = 32; + break; + case '1': + gridx = 112; + gridy = 32; + break; + case '2': + gridx = 128; + gridy = 32; + break; + case '3': + gridx = 144; + gridy = 32; + break; + case '4': + gridx = 0; + gridy = 48; + break; + case '5': + gridx = 16; + gridy = 48; + break; + case '6': + gridx = 32; + gridy = 48; + break; + case '7': + gridx = 48; + gridy = 48; + break; + case '8': + gridx = 64; + gridy = 48; + break; + case '9': + gridx = 80; + gridy = 48; + break; + case ',': + gridx = 96; + gridy = 48; + break; + case '/': + gridx = 112; + gridy = 48; + break; + case '-': + gridx = 128; + gridy = 48; + break; + } + wc++; + if(gridx!=-16||gridy!=-16){ + glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); + glColor4ub(r, g, b, a); + + glEnable (GL_BLEND); + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, fontMap); + glBegin(GL_QUADS); + glTexCoord2f(gridx/256, gridy/64); + glVertex2f(x,y); + glTexCoord2f((gridx+16)/256, gridy/64); + glVertex2f(x+int(size*16),y); + glTexCoord2f((gridx+16)/256, (gridy+16)/64); + glVertex2f(x+int(size*16),y+int(size*16)); + glTexCoord2f(gridx/256, (gridy+16)/64); + glVertex2f(x,y+int(size*16)); + glEnd(); + glDisable(GL_TEXTURE_2D); + glDisable (GL_BLEND); + } + x+=int(size*20); + if(wc==w){ + wc=0; + x-=w*int(size*20); + y+=int(size*20); + } + } +} + +class class_text +{ +private: +int lastIndexAdded; +std::vector<s_text> textArray; + +public: + class_text::class_text(){ + + } + void class_text::addText(std::string preText, int x, int y, int width, int fontSize,std::string alignment, s_textColor textColor){//, double &variable, std::string postText + bool textOpen = false; //Used to see if any command buttons that were made arn't being used. + for(short expandTextArray = 0; expandTextArray<textArray.size(); ++expandTextArray){ + if(textArray[expandTextArray].slotUsed == false){ + textOpen = true; + break; + } + } + if(textOpen==false){ + textArray.push_back(s_text()); + textArray[textArray.size()-1].slotUsed = false; + } + for(short cycleText = 0; cycleText < textArray.size(); ++cycleText){ + if(textArray[cycleText].slotUsed == false){ + textArray[cycleText].slotUsed = true; + textArray[cycleText].preText = preText; + //textArray[cycleText].variable = &variable; + //textArray[cycleText].postText = postText; + textArray[cycleText].x = x; + textArray[cycleText].y = y; + textArray[cycleText].width = width; + textArray[cycleText].textColor = textColor; + textArray[cycleText].fontSize = fontSize; + + if(alignment == "none") + textArray[cycleText].alignment = 0; + else + if(alignment == "left") + textArray[cycleText].alignment = 1; + else + if(alignment == "leftFullLine") + textArray[cycleText].alignment = 2; + else + if(alignment == "center") + textArray[cycleText].alignment = 3; + else + if(alignment == "centerFullLine") + textArray[cycleText].alignment = 4; + else + if(alignment == "right") + textArray[cycleText].alignment = 5; + else + if(alignment == "rightFullLine") + textArray[cycleText].alignment = 6; + + lastIndexAdded = cycleText; + break; + } + } + } + void class_text::show(float offsetX, float offsetY){ + for(short cycleText = 0; cycleText < textArray.size(); ++cycleText){ + std::ostringstream text; + text << textArray[cycleText].preText;// << *textArray[cycleText].variable << textArray[cycleText].postText; + if(textArray[cycleText].slotUsed == true){ + drawglyphs( + text.str(), + textArray[cycleText].fontSize, + textArray[cycleText].x+int(offsetX), + textArray[cycleText].y+int(offsetY), + textArray[cycleText].width, + textArray[cycleText].alignment, + textArray[cycleText].textColor.red, + textArray[cycleText].textColor.green, + textArray[cycleText].textColor.blue, + textArray[cycleText].textColor.alpha); + } + } + } + void class_text::edit(int textNumber, std::string text){ + textArray[textNumber].preText = text; + } + void class_text::reset(){ + while(textArray.size()){ + textArray.pop_back(); + } + } +}; +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <Mac...@us...> - 2006-05-26 04:57:39
|
Revision: 76 Author: Machaira Date: 2006-05-25 21:57:35 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=76&view=rev Log Message: ----------- Added Paths: ----------- trunk/perceptioncrash/data/gui/pausemenu.xml Added: trunk/perceptioncrash/data/gui/pausemenu.xml =================================================================== --- trunk/perceptioncrash/data/gui/pausemenu.xml (rev 0) +++ trunk/perceptioncrash/data/gui/pausemenu.xml 2006-05-26 04:57:35 UTC (rev 76) @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<GUILayout> +<Window Type="DefaultWindow" Name="Root" > +<Property Name="Text" Value="Pause Menu" /> +<Property Name="UnifiedAreaRect" Value="{{0.000000,0.000000},{0.000000,0.000000},{1.000000,0.000000},{1.000000,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +<Window Type="TaharezLook/Button" Name="btnResume" > +<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseArrow" /> +<Property Name="Text" Value="Resume" /> +<Property Name="UnifiedAreaRect" Value="{{0.330000,0.000000},{0.100000,0.000000},{0.660000,0.000000},{0.200000,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +</Window> +<Window Type="TaharezLook/Button" Name="btnExit" > +<Property Name="Font" Value="Commonwealth-10" /> +<Property Name="MouseCursorImage" Value="set:TaharezLook image:MouseArrow" /> +<Property Name="Text" Value="Exit" /> +<Property Name="UnifiedAreaRect" Value="{{0.330000,0.000000},{0.250000,0.000000},{0.660000,0.000000},{0.350000,0.000000}}" /> +<Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> +</Window> +</Window> +</GUILayout> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sik...@us...> - 2006-05-26 04:49:08
|
Revision: 75 Author: sik0fewl Date: 2006-05-25 21:48:58 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=75&view=rev Log Message: ----------- Added XML missing declaration Modified Paths: -------------- trunk/perceptioncrash/data/config.xml Modified: trunk/perceptioncrash/data/config.xml =================================================================== --- trunk/perceptioncrash/data/config.xml 2006-05-26 00:31:22 UTC (rev 74) +++ trunk/perceptioncrash/data/config.xml 2006-05-26 04:48:58 UTC (rev 75) @@ -1,3 +1,5 @@ +<?xml version="1.0"?> + <Configuration> <InputController type="KeyboardMouse" name="default"> <!-- Note: these will use strings instead of codes in the future --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sik...@us...> - 2006-05-26 00:31:34
|
Revision: 74 Author: sik0fewl Date: 2006-05-25 17:31:22 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=74&view=rev Log Message: ----------- Updated Doxyfile to inlude lib/ Modified Paths: -------------- trunk/perceptioncrash/Doxyfile Modified: trunk/perceptioncrash/Doxyfile =================================================================== --- trunk/perceptioncrash/Doxyfile 2006-05-25 23:31:51 UTC (rev 73) +++ trunk/perceptioncrash/Doxyfile 2006-05-26 00:31:22 UTC (rev 74) @@ -82,7 +82,7 @@ #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- -INPUT = src/ +INPUT = src/ lib/ FILE_PATTERNS = *.cpp \ *.hpp \ *.h This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sik...@us...> - 2006-05-25 23:31:56
|
Revision: 73 Author: sik0fewl Date: 2006-05-25 16:31:51 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=73&view=rev Log Message: ----------- Fixed header excluder defines Modified Paths: -------------- trunk/perceptioncrash/src/Entity.hpp trunk/perceptioncrash/src/MainMenuState.hpp trunk/perceptioncrash/src/Quest.hpp trunk/perceptioncrash/src/QuestLogState.hpp trunk/perceptioncrash/src/QuestManager.hpp Modified: trunk/perceptioncrash/src/Entity.hpp =================================================================== --- trunk/perceptioncrash/src/Entity.hpp 2006-05-25 23:29:12 UTC (rev 72) +++ trunk/perceptioncrash/src/Entity.hpp 2006-05-25 23:31:51 UTC (rev 73) @@ -1,5 +1,5 @@ -#ifndef ENTITY_HPP -#define ENTITY_HPP +#ifndef PC_ENTITY_HPP +#define PC_ENTITY_HPP #include <OgreEntity.h> @@ -17,4 +17,4 @@ }; -#endif /* ENTITY_HPP */ +#endif /* PC_ENTITY_HPP */ Modified: trunk/perceptioncrash/src/MainMenuState.hpp =================================================================== --- trunk/perceptioncrash/src/MainMenuState.hpp 2006-05-25 23:29:12 UTC (rev 72) +++ trunk/perceptioncrash/src/MainMenuState.hpp 2006-05-25 23:31:51 UTC (rev 73) @@ -1,5 +1,5 @@ -#ifndef MAIN_MENU_STATE_HPP -#define MAIN_MENU_STATE_HPP +#ifndef PC_MAIN_MENU_STATE_HPP +#define PC_MAIN_MENU_STATE_HPP #include <Ogre.h> #include <CEGUIImageset.h> @@ -56,4 +56,4 @@ static MainMenuState mMainMenuState; }; -#endif /* MAIN_MENU_STATE_HPP */ +#endif /* PC_MAIN_MENU_STATE_HPP */ Modified: trunk/perceptioncrash/src/Quest.hpp =================================================================== --- trunk/perceptioncrash/src/Quest.hpp 2006-05-25 23:29:12 UTC (rev 72) +++ trunk/perceptioncrash/src/Quest.hpp 2006-05-25 23:31:51 UTC (rev 73) @@ -1,5 +1,5 @@ -#ifndef QUEST_HPP -#define QUEST_HPP +#ifndef PC_QUEST_HPP +#define PC_QUEST_HPP #include "tinyxml/tinyxml.h" #include <string> @@ -72,4 +72,4 @@ }; -#endif /* QUEST_HPP */ \ No newline at end of file +#endif /* QUEST_HPP */ Modified: trunk/perceptioncrash/src/QuestLogState.hpp =================================================================== --- trunk/perceptioncrash/src/QuestLogState.hpp 2006-05-25 23:29:12 UTC (rev 72) +++ trunk/perceptioncrash/src/QuestLogState.hpp 2006-05-25 23:31:51 UTC (rev 73) @@ -1,5 +1,5 @@ -#ifndef QUEST_LOG_STATE_HPP -#define QUEST_LOG_STATE_HPP +#ifndef PC_QUEST_LOG_STATE_HPP +#define PC_QUEST_LOG_STATE_HPP #include "GameState.hpp" @@ -38,4 +38,4 @@ static QuestLogState mQuestLogState; }; -#endif /* QUEST_LOG_STATE_HPP */ +#endif /* PC_QUEST_LOG_STATE_HPP */ Modified: trunk/perceptioncrash/src/QuestManager.hpp =================================================================== --- trunk/perceptioncrash/src/QuestManager.hpp 2006-05-25 23:29:12 UTC (rev 72) +++ trunk/perceptioncrash/src/QuestManager.hpp 2006-05-25 23:31:51 UTC (rev 73) @@ -1,5 +1,5 @@ -#ifndef QUEST_MANAGER_HPP -#define QUEST_MANAGER_HPP +#ifndef PC_QUEST_MANAGER_HPP +#define PC_QUEST_MANAGER_HPP #include "GameState.hpp" #include "QuestLogState.hpp" @@ -20,4 +20,4 @@ }; -#endif /* QUEST_MANAGER_HPP */ +#endif /* PC_QUEST_MANAGER_HPP */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sik...@us...> - 2006-05-25 23:29:19
|
Revision: 72 Author: sik0fewl Date: 2006-05-25 16:29:12 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=72&view=rev Log Message: ----------- Some docs Modified Paths: -------------- trunk/perceptioncrash/src/Factory.hpp trunk/perceptioncrash/src/GameManager.hpp trunk/perceptioncrash/src/KeyboardMouseInputController.hpp Modified: trunk/perceptioncrash/src/Factory.hpp =================================================================== --- trunk/perceptioncrash/src/Factory.hpp 2006-05-25 23:13:54 UTC (rev 71) +++ trunk/perceptioncrash/src/Factory.hpp 2006-05-25 23:29:12 UTC (rev 72) @@ -7,6 +7,11 @@ #include "tinyxml/tinyxml.h" +/** + * Factory class + * + * Use Factory<T>::factory() to get an instance of Factory for type T + */ template <typename T> class Factory { @@ -22,18 +27,37 @@ CreatorXmlMap creatorsXml; public: + /** + * Return instance of Factory + */ static Factory<T>& factory() { static Factory<T> factory_; return factory_; } + /** + * Register a new object factory type. + * + * The RegisterFatory class provides a simple interface to this function + * + * @param id type name + * @param creator function to create object of type 'id' + * @param creatorXml function to create object of tyoe 'id' from an XML DOM node + * + * @see RegisterFactory + */ void register_(std::string const &id, CreatorFuncPtr creator, CreatorFuncXmlPtr creatorXml) { creators.insert(std::make_pair(id, creator)); creatorsXml.insert(std::make_pair(id, creatorXml)); } - + + /** + * Create new object + * + * @param id object type + */ T* create(std::string const &id) { typename CreatorMap::iterator i = creators.find(id); @@ -44,6 +68,11 @@ throw std::runtime_error("Factory for '" + id + "' does not exist"); } + /** + * Create new object from XML DOM node + * + * @param node XML DOM node. The type is specified in the 'type' XML attribute + */ T* create(TiXmlElement* node) { typename CreatorXmlMap::iterator i = creatorsXml.find(node->Attribute("type")); @@ -59,21 +88,38 @@ } }; +/** + * Convenience class for registering new factories + * + * Example usage: + * RegisterFactory<Base, Implementation> ImplementationFactory("Implementation"); + */ template <typename T, typename U> struct RegisterFactory { typedef Factory<T> FactoryType; + /** + * Create a new object + */ static T* newCreator() { return new U; } + /** + * Create a new object + */ static T* newCreator(TiXmlElement* node) { return new U(node); } + /** + * Constructor + * + * @param id object factory type + */ RegisterFactory(std::string const &id) { FactoryType::factory().register_(id, Modified: trunk/perceptioncrash/src/GameManager.hpp =================================================================== --- trunk/perceptioncrash/src/GameManager.hpp 2006-05-25 23:13:54 UTC (rev 71) +++ trunk/perceptioncrash/src/GameManager.hpp 2006-05-25 23:29:12 UTC (rev 72) @@ -18,21 +18,25 @@ public Ogre::Singleton<GameManager> { public: - /** Default constructor + /** + * Default constructor */ GameManager(); - /** Default destructor + /** + * Default destructor */ ~GameManager(); - /** Start game from specified game state + /** + * Start game from specified game state * * @param state game state to start from */ void start(GameState* state); - /** Change state to the specified state. + /** + * Change state to the specified state. * * This exits the current state, pops it, pushes the new state and enters * it @@ -41,7 +45,8 @@ */ void changeState(GameState* state); - /** Push new state onto state stack + /** + * Push new state onto state stack * * This pauses the current state, pushes the new state onto the game state * stack and enters it @@ -50,7 +55,8 @@ */ void pushState(GameState* state); - /** Pop current state off of state stack + /** + * Pop current state off of state stack * * This exits the current state, pops it off the state stack and resumes * the previous state (if any) @@ -58,7 +64,8 @@ void popState(); - /** Override standard Ogre::Singleton retrieval. + /** + * Override standard Ogre::Singleton retrieval. * * @remarks * @@ -75,7 +82,8 @@ */ static GameManager& getSingleton(void); - /** Override standard Ogre::Singleton retrieval. + /** + * Override standard Ogre::Singleton retrieval. * * @remarks * @@ -130,7 +138,8 @@ /** Update debug panel overlay with current FPS, etc */ void updateDebugPanelOverlay(); - /** Debug panel overlay. + /** + * Debug panel overlay. * Shows current FPS another stats on-screen */ Ogre::Overlay* mDebugPanelOverlay; Modified: trunk/perceptioncrash/src/KeyboardMouseInputController.hpp =================================================================== --- trunk/perceptioncrash/src/KeyboardMouseInputController.hpp 2006-05-25 23:13:54 UTC (rev 71) +++ trunk/perceptioncrash/src/KeyboardMouseInputController.hpp 2006-05-25 23:29:12 UTC (rev 72) @@ -17,7 +17,15 @@ public Ogre::MouseMotionListener { public: + /** + * Default constructor + */ KeyboardMouseInputController(); + /** + * Constructor + * + * Creates controller based on XML DOM node + */ KeyboardMouseInputController(TiXmlElement* node); ~KeyboardMouseInputController(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sik...@us...> - 2006-05-25 23:13:59
|
Revision: 71 Author: sik0fewl Date: 2006-05-25 16:13:54 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=71&view=rev Log Message: ----------- Update svn:ignore (added windows executable) Property Changed: ---------------- trunk/perceptioncrash/ Property changes on: trunk/perceptioncrash ___________________________________________________________________ Name: svn:ignore - .sconsign ogre.log Ogre.log CEGUI.log ogre.cfg build perceptioncrash configure config.log config.status config.h config.h.in Jamconfig Jamconfig.in autom4te.cache aclocal.m4 + .sconsign ogre.log Ogre.log CEGUI.log ogre.cfg build perceptioncrash perceptioncrash.exe configure config.log config.status config.h config.h.in Jamconfig Jamconfig.in autom4te.cache aclocal.m4 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sik...@us...> - 2006-05-25 23:04:25
|
Revision: 69 Author: sik0fewl Date: 2006-05-25 16:04:17 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=69&view=rev Log Message: ----------- Added SDL to build Fixed Factory for MSVC++ Modified Paths: -------------- trunk/perceptioncrash/README trunk/perceptioncrash/configure.ac trunk/perceptioncrash/src/Factory.hpp trunk/perceptioncrash/src/IntroState.cpp trunk/perceptioncrash/src/Jamfile Removed Paths: ------------- trunk/perceptioncrash/lib/sdl/ Modified: trunk/perceptioncrash/README =================================================================== --- trunk/perceptioncrash/README 2006-05-25 21:04:57 UTC (rev 68) +++ trunk/perceptioncrash/README 2006-05-25 23:04:17 UTC (rev 69) @@ -11,3 +11,4 @@ OGRE >= 1.2.0 CEGUI >= 0.4.1 Boost + SDL >= 1.2.4 Modified: trunk/perceptioncrash/configure.ac =================================================================== --- trunk/perceptioncrash/configure.ac 2006-05-25 21:04:57 UTC (rev 68) +++ trunk/perceptioncrash/configure.ac 2006-05-25 23:04:17 UTC (rev 69) @@ -65,7 +65,6 @@ #---------------------------------------------------------------------------- # find libraries #---------------------------------------------------------------------------- -#AM_PATH_SDL([1.2.5]) PKG_CHECK_MODULES([OGRE], [OGRE >= 1.2.0]) PKG_CHECK_MODULES([CEGUI], [CEGUI >= 0.4.1]) @@ -81,6 +80,13 @@ [AC_MSG_ERROR([Unable to find libCEGUIOgreRenderer. Please check your Ogre3d installation.])], [$OGRE_CFLAGS $CEGUI_CFLAGS], [$OGRE_LIBS $CEGUI_LIBS]) +# Check for SDL +SDL_VERSION=1.2.4 +AM_PATH_SDL($SDL_VERSION, + :, + AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])) + + # do jam specific fixes AC_INIT_JAM Modified: trunk/perceptioncrash/src/Factory.hpp =================================================================== --- trunk/perceptioncrash/src/Factory.hpp 2006-05-25 21:04:57 UTC (rev 68) +++ trunk/perceptioncrash/src/Factory.hpp 2006-05-25 23:04:17 UTC (rev 69) @@ -77,8 +77,8 @@ RegisterFactory(std::string const &id) { FactoryType::factory().register_(id, - static_cast<T* (*)()>&(RegisterFactory<T, U>::newCreator), - static_cast<T* (*)(TiXmlElement*)>&(RegisterFactory<T, U>::newCreator)); + static_cast<T* (*)()>(&RegisterFactory<T, U>::newCreator), + static_cast<T* (*)(TiXmlElement*)>(&RegisterFactory<T, U>::newCreator)); } }; Modified: trunk/perceptioncrash/src/IntroState.cpp =================================================================== --- trunk/perceptioncrash/src/IntroState.cpp 2006-05-25 21:04:57 UTC (rev 68) +++ trunk/perceptioncrash/src/IntroState.cpp 2006-05-25 23:04:17 UTC (rev 69) @@ -23,7 +23,7 @@ mExitGame = false; - mTimerID = SDL_AddTimer(3000, IntroState::timerCallback, this); + mTimerID = SDL_AddTimer(3000, IntroState::timerCallback, this); } @@ -88,7 +88,7 @@ Uint32 IntroState::timerCallback(Uint32 interval, void* param) { - IntroState::getInstance()->changeState(MainMenuState::getInstance()); + IntroState::getInstance()->changeState(MainMenuState::getInstance()); - return 0; -} \ No newline at end of file + return 0; +} Modified: trunk/perceptioncrash/src/Jamfile =================================================================== --- trunk/perceptioncrash/src/Jamfile 2006-05-25 21:04:57 UTC (rev 68) +++ trunk/perceptioncrash/src/Jamfile 2006-05-25 23:04:17 UTC (rev 69) @@ -15,7 +15,7 @@ Application perceptioncrash : $(sources) ; LinkWith perceptioncrash : tinyxml ; -ExternalLibs perceptioncrash : OGRE CEGUI CEGUIOGRERENDERER ; +ExternalLibs perceptioncrash : OGRE CEGUI CEGUIOGRERENDERER SDL ; # Construct a description for the help target Help perceptioncrash : "Build the Perception Crash executable" ; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sik...@us...> - 2006-05-25 21:05:05
|
Revision: 68 Author: sik0fewl Date: 2006-05-25 14:04:57 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=68&view=rev Log Message: ----------- Oops, forgot to add this to logo update Modified Paths: -------------- trunk/perceptioncrash/data/overlays/logo.overlay Modified: trunk/perceptioncrash/data/overlays/logo.overlay =================================================================== --- trunk/perceptioncrash/data/overlays/logo.overlay 2006-05-25 20:00:17 UTC (rev 67) +++ trunk/perceptioncrash/data/overlays/logo.overlay 2006-05-25 21:04:57 UTC (rev 68) @@ -8,14 +8,14 @@ metrics_mode pixels // Dimensions - width 771 - height 235 + width 668 + height 145 // Center horizantally and vertically horz_align center vert_align center - left -385 - top -117 + left -334 + top -72 material Materials/Logo/LogoLarge } @@ -30,14 +30,14 @@ metrics_mode pixels // Dimensions - width 771 - height 235 + width 668 + height 145 // Center horizantally and vertically horz_align center vert_align center - left -385 - top -117 + left -332 + top -72 material Materials/Logo/LogoLargeGreenGlow } @@ -52,8 +52,8 @@ metrics_mode pixels // Dimensions - width 154 - height 47 + width 152 + height 33 left 0 top 2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <Mac...@us...> - 2006-05-25 20:03:16
|
Revision: 67 Author: Machaira Date: 2006-05-25 13:00:17 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=67&view=rev Log Message: ----------- Initial updates to item system classes - changed class names to conform to standards, removed rendering code - implementation code should probably be moved to cpp files.html Added SDL and implemented timer for automatically moving from intro state to mainmenu state - not tested due to compile errors in Factory.hpp Change suggested by sik made to factory.hpp to try to fix compile errors Modified Paths: -------------- trunk/perceptioncrash/contrib/VC++Project/perceptioncrash/perceptioncrash.vcproj trunk/perceptioncrash/data/gui/mainmenu.xml trunk/perceptioncrash/src/Entity.hpp trunk/perceptioncrash/src/Factory.hpp trunk/perceptioncrash/src/IntroState.cpp trunk/perceptioncrash/src/IntroState.hpp trunk/perceptioncrash/src/PauseState.cpp trunk/perceptioncrash/src/PauseState.hpp Added Paths: ----------- trunk/perceptioncrash/lib/sdl/ trunk/perceptioncrash/lib/sdl/linux/ trunk/perceptioncrash/lib/sdl/linux/SDL-1.2.10-1.i386.rpm trunk/perceptioncrash/lib/sdl/win/ trunk/perceptioncrash/lib/sdl/win/BUGS trunk/perceptioncrash/lib/sdl/win/COPYING trunk/perceptioncrash/lib/sdl/win/README trunk/perceptioncrash/lib/sdl/win/README-SDL.txt trunk/perceptioncrash/lib/sdl/win/VisualC.html trunk/perceptioncrash/lib/sdl/win/WhatsNew trunk/perceptioncrash/lib/sdl/win/docs/ trunk/perceptioncrash/lib/sdl/win/docs/html/ trunk/perceptioncrash/lib/sdl/win/docs/html/audio.html trunk/perceptioncrash/lib/sdl/win/docs/html/cdrom.html trunk/perceptioncrash/lib/sdl/win/docs/html/event.html trunk/perceptioncrash/lib/sdl/win/docs/html/eventfunctions.html trunk/perceptioncrash/lib/sdl/win/docs/html/eventstructures.html trunk/perceptioncrash/lib/sdl/win/docs/html/general.html trunk/perceptioncrash/lib/sdl/win/docs/html/guide.html trunk/perceptioncrash/lib/sdl/win/docs/html/guideaboutsdldoc.html trunk/perceptioncrash/lib/sdl/win/docs/html/guideaudioexamples.html trunk/perceptioncrash/lib/sdl/win/docs/html/guidebasicsinit.html trunk/perceptioncrash/lib/sdl/win/docs/html/guidecdromexamples.html trunk/perceptioncrash/lib/sdl/win/docs/html/guidecredits.html trunk/perceptioncrash/lib/sdl/win/docs/html/guideeventexamples.html trunk/perceptioncrash/lib/sdl/win/docs/html/guideexamples.html trunk/perceptioncrash/lib/sdl/win/docs/html/guideinput.html trunk/perceptioncrash/lib/sdl/win/docs/html/guideinputkeyboard.html trunk/perceptioncrash/lib/sdl/win/docs/html/guidepreface.html trunk/perceptioncrash/lib/sdl/win/docs/html/guidethebasics.html trunk/perceptioncrash/lib/sdl/win/docs/html/guidetimeexamples.html trunk/perceptioncrash/lib/sdl/win/docs/html/guidevideo.html trunk/perceptioncrash/lib/sdl/win/docs/html/guidevideoopengl.html trunk/perceptioncrash/lib/sdl/win/docs/html/index.html trunk/perceptioncrash/lib/sdl/win/docs/html/joystick.html trunk/perceptioncrash/lib/sdl/win/docs/html/reference.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlactiveevent.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdladdtimer.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlaudiocvt.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlaudiospec.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlblitsurface.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlbuildaudiocvt.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcd.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcdclose.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcdeject.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcdname.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcdnumdrives.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcdopen.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcdpause.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcdplay.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcdplaytracks.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcdresume.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcdstatus.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcdstop.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcdtrack.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcloseaudio.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcolor.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcondbroadcast.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcondsignal.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcondwait.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcondwaittimeout.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlconvertaudio.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlconvertsurface.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcreatecond.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcreatecursor.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcreatemutex.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcreatergbsurface.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcreatergbsurfacefrom.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcreatesemaphore.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcreatethread.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlcreateyuvoverlay.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdldelay.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdldestroycond.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdldestroymutex.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdldestroysemaphore.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdldisplayformat.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdldisplayformatalpha.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdldisplayyuvoverlay.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlenablekeyrepeat.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlenableunicode.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlenvvars.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlevent.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdleventstate.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlexposeevent.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlfillrect.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlflip.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlfreecursor.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlfreesurface.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlfreewav.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlfreeyuvoverlay.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlgetappstate.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlgetaudiostatus.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlgetcliprect.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlgetcursor.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlgeterror.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlgeteventfilter.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlgetgammaramp.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlgetkeyname.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlgetkeystate.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlgetmodstate.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlgetmousestate.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlgetrelativemousestate.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlgetrgb.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlgetrgba.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlgetthreadid.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlgetticks.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlgetvideoinfo.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlgetvideosurface.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlglattr.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlglgetattribute.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlglgetprocaddress.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlglloadlibrary.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlglsetattribute.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlglswapbuffers.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlinit.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlinitsubsystem.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdljoyaxisevent.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdljoyballevent.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdljoybuttonevent.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdljoyhatevent.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdljoystickclose.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdljoystickeventstate.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdljoystickgetaxis.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdljoystickgetball.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdljoystickgetbutton.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdljoystickgethat.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdljoystickindex.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdljoystickname.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdljoysticknumaxes.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdljoysticknumballs.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdljoysticknumbuttons.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdljoysticknumhats.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdljoystickopen.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdljoystickopened.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdljoystickupdate.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlkey.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlkeyboardevent.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlkeysym.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlkillthread.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdllistmodes.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlloadbmp.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlloadwav.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdllockaudio.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdllocksurface.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdllockyuvoverlay.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlmaprgb.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlmaprgba.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlmixaudio.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlmousebuttonevent.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlmousemotionevent.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlmutexp.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlmutexv.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlnumjoysticks.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlopenaudio.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdloverlay.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlpalette.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlpauseaudio.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlpeepevents.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlpixelformat.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlpollevent.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlpumpevents.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlpushevent.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlquit.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlquitevent.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlquitsubsystem.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlrect.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlremovetimer.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlresizeevent.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlsavebmp.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlsempost.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlsemtrywait.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlsemvalue.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlsemwait.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlsemwaittimeout.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlsetalpha.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlsetcliprect.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlsetcolorkey.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlsetcolors.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlsetcursor.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlseteventfilter.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlsetgamma.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlsetgammaramp.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlsetmodstate.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlsetpalette.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlsettimer.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlsetvideomode.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlshowcursor.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlsurface.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlsyswmevent.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlthreadid.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlunlockaudio.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlunlocksurface.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlunlockyuvoverlay.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlupdaterect.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlupdaterects.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdluserevent.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlvideodrivername.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlvideoinfo.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlvideomodeok.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlwaitevent.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlwaitthread.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlwarpmouse.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlwasinit.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlwmgetcaption.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlwmgrabinput.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlwmiconifywindow.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlwmsetcaption.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlwmseticon.html trunk/perceptioncrash/lib/sdl/win/docs/html/sdlwmtogglefullscreen.html trunk/perceptioncrash/lib/sdl/win/docs/html/thread.html trunk/perceptioncrash/lib/sdl/win/docs/html/time.html trunk/perceptioncrash/lib/sdl/win/docs/html/video.html trunk/perceptioncrash/lib/sdl/win/docs/html/wm.html trunk/perceptioncrash/lib/sdl/win/docs/images/ trunk/perceptioncrash/lib/sdl/win/docs/images/rainbow.gif trunk/perceptioncrash/lib/sdl/win/docs/index.html trunk/perceptioncrash/lib/sdl/win/docs.html trunk/perceptioncrash/lib/sdl/win/include/ trunk/perceptioncrash/lib/sdl/win/include/SDL.h trunk/perceptioncrash/lib/sdl/win/include/SDL_active.h trunk/perceptioncrash/lib/sdl/win/include/SDL_audio.h trunk/perceptioncrash/lib/sdl/win/include/SDL_byteorder.h trunk/perceptioncrash/lib/sdl/win/include/SDL_cdrom.h trunk/perceptioncrash/lib/sdl/win/include/SDL_config.h trunk/perceptioncrash/lib/sdl/win/include/SDL_config.h.default trunk/perceptioncrash/lib/sdl/win/include/SDL_config.h.in trunk/perceptioncrash/lib/sdl/win/include/SDL_config_amiga.h trunk/perceptioncrash/lib/sdl/win/include/SDL_config_dreamcast.h trunk/perceptioncrash/lib/sdl/win/include/SDL_config_macos.h trunk/perceptioncrash/lib/sdl/win/include/SDL_config_macosx.h trunk/perceptioncrash/lib/sdl/win/include/SDL_config_minimal.h trunk/perceptioncrash/lib/sdl/win/include/SDL_config_os2.h trunk/perceptioncrash/lib/sdl/win/include/SDL_config_win32.h trunk/perceptioncrash/lib/sdl/win/include/SDL_copying.h trunk/perceptioncrash/lib/sdl/win/include/SDL_cpuinfo.h trunk/perceptioncrash/lib/sdl/win/include/SDL_endian.h trunk/perceptioncrash/lib/sdl/win/include/SDL_error.h trunk/perceptioncrash/lib/sdl/win/include/SDL_events.h trunk/perceptioncrash/lib/sdl/win/include/SDL_getenv.h trunk/perceptioncrash/lib/sdl/win/include/SDL_joystick.h trunk/perceptioncrash/lib/sdl/win/include/SDL_keyboard.h trunk/perceptioncrash/lib/sdl/win/include/SDL_keysym.h trunk/perceptioncrash/lib/sdl/win/include/SDL_loadso.h trunk/perceptioncrash/lib/sdl/win/include/SDL_main.h trunk/perceptioncrash/lib/sdl/win/include/SDL_mouse.h trunk/perceptioncrash/lib/sdl/win/include/SDL_mutex.h trunk/perceptioncrash/lib/sdl/win/include/SDL_name.h trunk/perceptioncrash/lib/sdl/win/include/SDL_opengl.h trunk/perceptioncrash/lib/sdl/win/include/SDL_platform.h trunk/perceptioncrash/lib/sdl/win/include/SDL_quit.h trunk/perceptioncrash/lib/sdl/win/include/SDL_rwops.h trunk/perceptioncrash/lib/sdl/win/include/SDL_stdinc.h trunk/perceptioncrash/lib/sdl/win/include/SDL_syswm.h trunk/perceptioncrash/lib/sdl/win/include/SDL_thread.h trunk/perceptioncrash/lib/sdl/win/include/SDL_timer.h trunk/perceptioncrash/lib/sdl/win/include/SDL_types.h trunk/perceptioncrash/lib/sdl/win/include/SDL_version.h trunk/perceptioncrash/lib/sdl/win/include/SDL_video.h trunk/perceptioncrash/lib/sdl/win/include/begin_code.h trunk/perceptioncrash/lib/sdl/win/include/close_code.h trunk/perceptioncrash/lib/sdl/win/lib/ trunk/perceptioncrash/lib/sdl/win/lib/SDL.dll trunk/perceptioncrash/lib/sdl/win/lib/SDL.lib trunk/perceptioncrash/lib/sdl/win/lib/SDLmain.lib trunk/perceptioncrash/src/item_system/ItemSystem.hpp trunk/perceptioncrash/src/item_system/ItemSystemData.hpp trunk/perceptioncrash/src/item_system/WeaponItem.hpp trunk/perceptioncrash/src/item_system/WeaponItemData.hpp Modified: trunk/perceptioncrash/contrib/VC++Project/perceptioncrash/perceptioncrash.vcproj =================================================================== --- trunk/perceptioncrash/contrib/VC++Project/perceptioncrash/perceptioncrash.vcproj 2006-05-25 09:10:15 UTC (rev 66) +++ trunk/perceptioncrash/contrib/VC++Project/perceptioncrash/perceptioncrash.vcproj 2006-05-25 20:00:17 UTC (rev 67) @@ -39,7 +39,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="include;"$(OGRE_HOME)\include";"$(OGRE_HOME)\samples\include";C:\boost_1_33_1" + AdditionalIncludeDirectories="..\..\..\lib\sdl\win\include;include;"$(OGRE_HOME)\include";"$(OGRE_HOME)\samples\include";C:\boost_1_33_1;"$(OGRE_HOME)\include\CEGUI"" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS" MinimalRebuild="true" ExceptionHandling="1" @@ -277,6 +277,14 @@ > </File> <File + RelativePath="..\..\..\src\item_system\ItemSystem.hpp" + > + </File> + <File + RelativePath="..\..\..\src\item_system\ItemSystemData.hpp" + > + </File> + <File RelativePath="..\..\..\src\KeyboardMouseInputController.hpp" > </File> @@ -304,6 +312,14 @@ RelativePath="..\..\..\src\QuestManager.hpp" > </File> + <File + RelativePath="..\..\..\src\item_system\WeaponItem.hpp" + > + </File> + <File + RelativePath="..\..\..\src\item_system\WeaponItemData.hpp" + > + </File> </Filter> <Filter Name="Resource Files" Modified: trunk/perceptioncrash/data/gui/mainmenu.xml =================================================================== --- trunk/perceptioncrash/data/gui/mainmenu.xml 2006-05-25 09:10:15 UTC (rev 66) +++ trunk/perceptioncrash/data/gui/mainmenu.xml 2006-05-25 20:00:17 UTC (rev 67) @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <GUILayout> <Window Type="DefaultWindow" Name="Root" > -<Property Name="Text" Value="Save Game" /> +<Property Name="Text" Value="Main Menu" /> <Property Name="UnifiedAreaRect" Value="{{0.000000,0.000000},{0.000000,0.000000},{1.000000,0.000000},{1.000000,0.000000}}" /> <Property Name="UnifiedMaxSize" Value="{{1.000000,0.000000},{1.000000,0.000000}}" /> <Window Type="TaharezLook/Button" Name="btnNew" > Added: trunk/perceptioncrash/lib/sdl/linux/SDL-1.2.10-1.i386.rpm =================================================================== (Binary files differ) Property changes on: trunk/perceptioncrash/lib/sdl/linux/SDL-1.2.10-1.i386.rpm ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/perceptioncrash/lib/sdl/win/BUGS =================================================================== --- trunk/perceptioncrash/lib/sdl/win/BUGS (rev 0) +++ trunk/perceptioncrash/lib/sdl/win/BUGS 2006-05-25 20:00:17 UTC (rev 67) @@ -0,0 +1,204 @@ + +All: + Audio rate conversion is only implemented by multiplying or dividing + by a power of two. This is a side-effect of the requirement that the + raw audio buffer size be a power of two, and can hopefully be fixed. + This means 8 KHz audio converted to 22 KHz ends up being 16 KHz. :-/ + + When the implementation is writing directly to video memory the mouse + cursor doesn't work properly. Applications which do this should use + their own mouse cursor and call SDL_ShowCursor(0) to hide the system + cursor. + +Linux: + Wide UNICODE character input (Kanji, etc.) is not yet supported. + It requires handling of keyboard mapping events and using the XIM + input translation extension. I will implement it as requested. + Latin-1 keyboard input works fine. + (UPDATE 04/06/2004: this bug is now fixed) + + The keyboard modifiers are not set to the correct state on startup. + + The AAlib, GGI, and SVGAlib video drivers are not heavily tested. + +Win32: + The MCI driver can't tell if the CD-ROM drive is paused or stopped. + + The SDL_INIT_EVENTTHREAD flag is not supported on Win32 + (Idea: create a separate DirectInput polling thread) + The main purpose of this flag is for smooth cursor motion in + fullscreen environments. + + Wide UNICODE character input (Kanji, etc.) is not yet supported. + This requires the ToUnicode() API which is only implemented on + Windows NT/2000, not on Windows 95/98. + Latin-1 keyboard input works fine. + + Joysticks are only supported under the Win32 MultiMedia API, + DirectInput support is not yet implemented. + +BeOS: + BePPC is not supported, apparently not even by Be Inc. + + SDL_WM_GrabInput() is not implemented. + Does anyone know how to do this? SDL_WM_GrabInput() is designed + to prevent the user from switching input and mouse focus away from + the SDL application. + + Continuous relative mouse motion is not implemented. + + Wide UNICODE character input (Kanji, etc.) has not been tested. + Latin-1 keyboard input works fine. + +MacOS: + Palette handling isn't implemented in windowed mode yet. + + Audio hasn't been extensively tested, in particular the locking + isn't implemented and mixer routines may not call malloc() or free() + because they are called at interrupt time. + + SDL_WM_GrabInput() is not implemented. + Does anyone know how to do this? SDL_WM_GrabInput() is designed + to prevent the user from switching input and mouse focus away from + the SDL application. + + Continuous relative mouse motion is not implemented. + + SDL_AddTimer() and SDL_RemoveTimer() haven't been implemented yet. + + Not all of the keys are properly recognized on the keyboard. + +Mac OS X: + Depth switching for windowed mode isn't implemented yet. + + Palette handling isn't implemented in windowed mode yet. + + Command-line arguments dialog is not implemented yet. + + Fullscreen drawing has some artifacts. + + Fullscreen OpenGL for the software renderer is broken. + + Some OpenGL parameters are not accounted for, for example color bits customization. + + Continuous mouse motion perhaps is not as smooth as it should be. + + SDL_WM_GrabInput() is implemented, but it "freezes" the hardware + cursor in the center of the window/screen. Also, mouse moved events + are not generated, and the keyboard cannot be grabbed. + + Mac OS X seems to have a broken pthread_cancel() implementation. + Actually, it just only has one cancellation point defined. + http://lists.apple.com/archives/darwin-development/2004/Jun/24/killingapthread.001.txt + +FreeBSD: + pthread_cancel() isn't supported by FreeBSD 3.X, so threads don't + work on versions of FreeBSD earlier than 4.0. + + The CD-ROM handling doesn't work completely. + + Wide UNICODE character input (Kanji, etc.) is not yet supported. + It requires handling of keyboard mapping events and using the XIM + input translation extension. I will implement it as requested. + Latin-1 keyboard input works fine. + (UPDATE 04/06/2004: this bug is now fixed but needs testing) + + The keyboard modifiers are not set to the correct state on startup. + +Solaris: + The joystick functions are not implemented yet. + + Wide UNICODE character input (Kanji, etc.) is not yet supported. + It requires handling of keyboard mapping events and using the XIM + input translation extension. I will implement it as requested. + Latin-1 keyboard input works fine. + (UPDATE 04/06/2004: this bug is now fixed but needs testing) + + The keyboard modifiers are not set to the correct state on startup. + +IRIX: + The CD-ROM handling doesn't work completely. + + The joystick functions are not implemented yet. + + Wide UNICODE character input (Kanji, etc.) is not yet supported. + It requires handling of keyboard mapping events and using the XIM + input translation extension. I will implement it as requested. + Latin-1 keyboard input works fine. + (UPDATE 04/06/2004: this bug is now fixed but needs testing) + + The keyboard modifiers are not set to the correct state on startup. + +EPOC: + Only Crystal version of Epoc/SymbianOS is currently supported. + + SDL is implemented in static library only. SDL uses static/global + variables and that is not allowed in EPOC dll libraries. + + Sound is not yet supported. + + Joystick, OpenGL and cdrom is not supported (think about cdrom in a cell phone:-). + + No console output screen. Printing to stdout do not have any effect. + +QNX: + Fullscreen switch doesn't work (disabled for now). + + +OpenBSD: -= NOT YET SUPPORTED =- + This is reported to work, but I haven't verified this. + + Wide UNICODE character input (Kanji, etc.) is not yet supported. + It requires handling of keyboard mapping events and using the XIM + input translation extension. I will implement it as requested. + Latin-1 keyboard input works fine. + (UPDATE 04/06/2004: this bug is now fixed but needs testing) + + The keyboard modifiers are not set to the correct state on startup. + +OSF/Tru64: -= NOT YET SUPPORTED =- + The audio functions are not implemented yet. + + Joysticks and CD-ROM functions are not implemented yet. + + Wide UNICODE character input (Kanji, etc.) is not yet supported. + It requires handling of keyboard mapping events and using the XIM + input translation extension. I will implement it as requested. + Latin-1 keyboard input works fine. + (UPDATE 04/06/2004: this bug is now fixed but needs testing) + + The keyboard modifiers are not set to the correct state on startup. + +AIX: -= NOT YET SUPPORTED =- + This port has only been tested with AIX 4.3.3 + + The OpenGL support doesn't work yet. + + The joystick subsystem isn't implemented yet. + + Endian detection doesn't work yet - needs a unique CPP symbol. + + Wide UNICODE character input (Kanji, etc.) is not yet supported. + It requires handling of keyboard mapping events and using the XIM + input translation extension. I will implement it as requested. + Latin-1 keyboard input works fine. + (UPDATE 04/06/2004: this bug is now fixed but needs testing) + + The keyboard modifiers are not set to the correct state on startup. + + The AIX port was done by Car...@KO... + More information on this port is available at: + http://www.kom.e-technik.tu-darmstadt.de/~griff/SDL/ + +AmigaOS: -= NOT YET SUPPORTED =- + The OpenGL support isn't implemented yet. + + SDL_WM_GrabInput() is not implemented. + Does anyone know how to do this? SDL_WM_GrabInput() is designed + to prevent the user from switching input and mouse focus away from + the SDL application. + + Continuous relative mouse motion is not implemented. + + The AmigaOS port was done by Gab...@ga... + Added: trunk/perceptioncrash/lib/sdl/win/COPYING =================================================================== --- trunk/perceptioncrash/lib/sdl/win/COPYING (rev 0) +++ trunk/perceptioncrash/lib/sdl/win/COPYING 2006-05-25 20:00:17 UTC (rev 67) @@ -0,0 +1,458 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS Added: trunk/perceptioncrash/lib/sdl/win/README =================================================================== --- trunk/perceptioncrash/lib/sdl/win/README (rev 0) +++ trunk/perceptioncrash/lib/sdl/win/README 2006-05-25 20:00:17 UTC (rev 67) @@ -0,0 +1,48 @@ + + Simple DirectMedia Layer + + (SDL) + + Version 1.2 + +--- +http://www.libsdl.org/ + +This is the Simple DirectMedia Layer, a general API that provides low +level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, +and 2D framebuffer across multiple platforms. + +The current version supports Linux, Windows, Windows CE, BeOS, MacOS, +Mac OS X, FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX. +The code contains support for AmigaOS, Dreamcast, Atari, AIX, OSF/Tru64, +RISC OS, SymbianOS, and OS/2, but these are not officially supported. + +SDL is written in C, but works with C++ natively, and has bindings to +several other languages, including Ada, C#, Eiffel, Erlang, Euphoria, +Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP, +Pike, Pliant, Python, Ruby, and Smalltalk. + +This library is distributed under GNU LGPL version 2, which can be +found in the file "COPYING". This license allows you to use SDL +freely in commercial programs as long as you link with the dynamic +library. + +The best way to learn how to use SDL is to check out the header files in +the "include" subdirectory and the programs in the "test" subdirectory. +The header files and test programs are well commented and always up to date. +More documentation is available in HTML format in "docs/index.html", and +a documentation wiki is available online at: + http://www.libsdl.org/cgi/docwiki.cgi + +The test programs in the "test" subdirectory are in the public domain. + +Frequently asked questions are answered online: + http://www.libsdl.org/faq.php + +If you need help with the library, or just want to discuss SDL related +issues, you can join the developers mailing list: + http://www.libsdl.org/mailing-list.php + +Enjoy! + Sam Lantinga (sl...@li...) + Added: trunk/perceptioncrash/lib/sdl/win/README-SDL.txt =================================================================== --- trunk/perceptioncrash/lib/sdl/win/README-SDL.txt (rev 0) +++ trunk/perceptioncrash/lib/sdl/win/README-SDL.txt 2006-05-25 20:00:17 UTC (rev 67) @@ -0,0 +1,13 @@ + +Please distribute this file with the SDL runtime environment: + +The Simple DirectMedia Layer (SDL for short) is a cross-platfrom library +designed to make it easy to write multi-media software, such as games and +emulators. + +The Simple DirectMedia Layer library source code is available from: +http://www.libsdl.org/ + +This library is distributed under the terms of the GNU LGPL license: +http://www.gnu.org/copyleft/lesser.html + Added: trunk/perceptioncrash/lib/sdl/win/VisualC.html =================================================================== --- trunk/perceptioncrash/lib/sdl/win/VisualC.html (rev 0) +++ trunk/perceptioncrash/lib/sdl/win/VisualC.html 2006-05-25 20:00:17 UTC (rev 67) @@ -0,0 +1,167 @@ +<HTML> + <HEAD> + <TITLE>Using SDL with Microsoft Visual C++</TITLE> + </HEAD> + <BODY> + <H1> + Using SDL with Microsoft Visual C++ 5,6 and 7 + </H1> + <H3> + by <A HREF="mailto:sno...@sp...">Lion Kimbro </A>and additions by <A HREF="mailto:ja...@co..."> + James Turk</A> + </H3> + <p> + You can either use the precompiled libraries from <A HREF="http://www.libsdl.org/download.php"> + the SDL Download web site </A>, or you can build SDL yourself. + </p> + <H3> + Building SDL + </H3> + <P> + Unzip the <CODE>VisualC.zip</CODE> file into the directory that contains this + file (<CODE>VisualC.html</CODE>). + </P> + <P> + Be certain that you unzip the zip file for your compiler into <strong>this</strong> + directory and not any other directory. If you are using WinZip, be careful to + make sure that it extracts to <strong>this</strong> folder, because it's + convenient feature of unzipping to a folder with the name of the file currently + being unzipped will get you in trouble if you use it right now. And that's all + I have to say about that. + </P> + <P> + Now that it's unzipped, go into the VisualC + directory that is created, and double-click on the VC++ file "<CODE>SDL.dsw</CODE>"<STRONG><FONT color="#009900"> + ("<CODE>SDL.sln</CODE>").</FONT></STRONG> This should open up the IDE. + </P> + <P> + You may be prompted at this point to upgrade the workspace, should you be using + a more recent version of Visual C++. If so, allow the workspace to be upgraded. + </P> + <P> + Build the <CODE>.dll</CODE> and <CODE>.lib</CODE> files. + </P> + <P> + This is done by right clicking on each project in turn (Projects are listed in + the Workspace panel in the FileView tab), and selecting "Build". + </P> + <P> + You may get a few warnings, but you should not get any errors. You do have to + have at least the DirectX 5 SDK installed, however. The latest + version of DirectX can be downloaded or purchased on a cheap CD (my + recommendation) from <A HREF="http://www.microsoft.com">Microsoft </A>. + </P> + <P> + Later, we will refer to the following .lib and .dll files that have just been + generated: + </P> + <ul> + <li> SDL.dll</li> + <li> SDL.lib</li> + <li> SDLmain.lib</li> + </ul> + <P> + Search for these using the Windows Find (Windows-F) utility, if you don't + already know where they should be. For those of you with a clue, look inside + the Debug or Release directories of the subdirectories of the Project folder. + (It might be easier to just use Windows Find if this sounds confusing. And + don't worry about needing a clue; we all need visits from the clue fairy + frequently.) + </P> + <H3> + Creating a Project with SDL + </H3> + <P> + Create a project as a Win32 Application. + </P> + <P> + Create a C++ file for your project. + </P> + <P> + Set the C runtime to "Multi-threaded DLL" in the menu: <CODE>Project|Settings|C/C++ + tab|Code Generation|Runtime Library </CODE>. + </P> + <P> + Add the SDL <CODE>include</CODE> directory to your list of includes in the + menu: <CODE>Project|Settings|C/C++ tab|Preprocessor|Additional include directories </CODE> + . + <br> + <STRONG><FONT color="#009900">VC7 Specific: Instead of doing this I find it easier to + add the include and library dire... [truncated message content] |
|
From: <sik...@us...> - 2006-05-25 09:10:30
|
Revision: 66 Author: sik0fewl Date: 2006-05-25 02:10:15 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=66&view=rev Log Message: ----------- Added new logos from Codehead Modified Paths: -------------- trunk/perceptioncrash/data/materials/textures/logo/logo.png trunk/perceptioncrash/data/materials/textures/logo/logo2.png Modified: trunk/perceptioncrash/data/materials/textures/logo/logo.png =================================================================== (Binary files differ) Modified: trunk/perceptioncrash/data/materials/textures/logo/logo2.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sik...@us...> - 2006-05-25 08:33:16
|
Revision: 65 Author: sik0fewl Date: 2006-05-25 01:33:06 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=65&view=rev Log Message: ----------- Keyboard mappings are now read from configuration file Modified Paths: -------------- trunk/perceptioncrash/src/Factory.hpp trunk/perceptioncrash/src/GameManager.cpp trunk/perceptioncrash/src/InputManager.cpp trunk/perceptioncrash/src/KeyboardMouseInputController.cpp Added Paths: ----------- trunk/perceptioncrash/data/config.xml Added: trunk/perceptioncrash/data/config.xml =================================================================== --- trunk/perceptioncrash/data/config.xml (rev 0) +++ trunk/perceptioncrash/data/config.xml 2006-05-25 08:33:06 UTC (rev 65) @@ -0,0 +1,10 @@ +<Configuration> + <InputController type="KeyboardMouse" name="default"> + <!-- Note: these will use strings instead of codes in the future --> + <MapKey from="57" to="select" /> + <MapKey from="1" to="pause"/> + <MapKey from="25" to="back"/> + <MapKey from="208" to="move_down"/> + <MapKey from="88" to="toggle_fps"/> + </InputController> +</Configuration> Modified: trunk/perceptioncrash/src/Factory.hpp =================================================================== --- trunk/perceptioncrash/src/Factory.hpp 2006-05-25 06:40:33 UTC (rev 64) +++ trunk/perceptioncrash/src/Factory.hpp 2006-05-25 08:33:06 UTC (rev 65) @@ -49,7 +49,7 @@ typename CreatorXmlMap::iterator i = creatorsXml.find(node->Attribute("type")); if (i != creatorsXml.end()) - return i->second(); + return i->second(node); else { std::stringstream msg; Modified: trunk/perceptioncrash/src/GameManager.cpp =================================================================== --- trunk/perceptioncrash/src/GameManager.cpp 2006-05-25 06:40:33 UTC (rev 64) +++ trunk/perceptioncrash/src/GameManager.cpp 2006-05-25 08:33:06 UTC (rev 65) @@ -5,9 +5,6 @@ #include "InputManager.hpp" #include "GameState.hpp" -// TODO Temporary! See message below -#include "KeyboardMouseInputController.hpp" - template<> GameManager* Ogre::Singleton<GameManager>::ms_Singleton = 0; GameManager::GameManager() @@ -48,18 +45,6 @@ mInputController = mInputManager->createController("default"); mInputController->addEventListener(this); - // TODO Temporary! This will be configured normally with XML configuration file - KeyboardMouseInputController* kbnm = dynamic_cast<KeyboardMouseInputController*>(mInputController); - if ( kbnm ) - { - kbnm->createKeyboardInputButton("select", Ogre::KC_SPACE); - kbnm->createKeyboardInputButton("pause", Ogre::KC_P); - kbnm->createKeyboardInputButton("back", Ogre::KC_ESCAPE); - kbnm->createKeyboardInputButton("move_down", Ogre::KC_DOWN); - kbnm->createKeyboardInputButton("toggle_fps", Ogre::KC_F12); - } - - mDebugPanelOverlay = Ogre::OverlayManager::getSingleton().getByName("Core/DebugOverlay"); changeState(state); @@ -119,6 +104,7 @@ { // This is all temporary stuff Ogre::ResourceGroupManager* rgm = Ogre::ResourceGroupManager::getSingletonPtr(); + rgm->addResourceLocation("data/", "FileSystem", "General"); rgm->addResourceLocation("data/objects", "FileSystem", "General"); rgm->addResourceLocation("data/images", "FileSystem", "General"); rgm->addResourceLocation("data/overlays", "FileSystem", "General"); @@ -127,7 +113,7 @@ rgm->addResourceLocation("data/materials/programs", "FileSystem", "General"); rgm->addResourceLocation("data/packs/OgreCore.zip", "Zip", "General"); rgm->addResourceLocation("data/maps/ogretestmap.zip", "Zip", "PlayStateResources"); - rgm->addResourceLocation("data/gui", "FileSystem", "General"); + rgm->addResourceLocation("data/gui", "FileSystem", "General"); rgm->addResourceLocation("data/fonts", "FileSystem", "General"); #if 0 Modified: trunk/perceptioncrash/src/InputManager.cpp =================================================================== --- trunk/perceptioncrash/src/InputManager.cpp 2006-05-25 06:40:33 UTC (rev 64) +++ trunk/perceptioncrash/src/InputManager.cpp 2006-05-25 08:33:06 UTC (rev 65) @@ -1,10 +1,12 @@ #include <stdexcept> +#include <Ogre.h> #include <OgreEventProcessor.h> #include <OgrePlatformManager.h> #include "InputManager.hpp" #include "KeyboardMouseInputController.hpp" +#include "Factory.hpp" template<> InputManager* Ogre::Singleton<InputManager>::ms_Singleton = 0; @@ -42,7 +44,15 @@ { if ( mControllers.find(name) == mControllers.end() ) { - return mControllers[name] = new KeyboardMouseInputController(); + TiXmlDocument configFile; + TiXmlElement* configNode; + /// @todo This should load the file using the Ogre resource manager + //configFile.Parse(&(Ogre::ResourceGroupManager::getSingleton().openResource("config.xml")->getAsString()[0])); + configFile.LoadFile("data/config.xml"); + configNode = dynamic_cast<TiXmlElement*>(configFile.RootElement()->FirstChild("InputController")); + assert(configNode != 0); + + return mControllers[name] = Factory<InputController>::factory().create(configNode); } throw std::runtime_error("Controller '" + name + "' already exists"); Modified: trunk/perceptioncrash/src/KeyboardMouseInputController.cpp =================================================================== --- trunk/perceptioncrash/src/KeyboardMouseInputController.cpp 2006-05-25 06:40:33 UTC (rev 64) +++ trunk/perceptioncrash/src/KeyboardMouseInputController.cpp 2006-05-25 08:33:06 UTC (rev 65) @@ -1,17 +1,16 @@ #include <Ogre.h> #include <iostream> +#include <map> #include "KeyboardMouseInputController.hpp" namespace { - RegisterFactory<InputController, KeyboardMouseInputController> KeyboardMouseInputControllerFactory("KeyboardMouseInputController"); + RegisterFactory<InputController, KeyboardMouseInputController> KeyboardMouseInputControllerFactory("KeyboardMouse"); } KeyboardMouseInputController::KeyboardMouseInputController() { - /// @todo this can be implemented with events(current) or unbuffered input. - /// which is better? InputManager* inputManager = InputManager::getSingletonPtr(); inputManager->getEventProcessor()->addKeyListener(this); inputManager->getEventProcessor()->addMouseMotionListener(this); @@ -19,9 +18,35 @@ KeyboardMouseInputController::KeyboardMouseInputController(TiXmlElement* node) { - KeyboardMouseInputController(); + InputManager* inputManager = InputManager::getSingletonPtr(); + inputManager->getEventProcessor()->addKeyListener(this); + inputManager->getEventProcessor()->addMouseMotionListener(this); - // create from xml node + // Make sure we were given the right kind of node + if (static_cast<std::string>(node->Value()) != "InputController" + || static_cast<std::string>(node->Attribute("type")) != "KeyboardMouse") + { + throw std::runtime_error("Invalid XML node. Must be element InputController with type KeyboardMouse."); + } + + for (TiXmlNode* child = node->FirstChild(); child; child = child->NextSibling()) + { + TiXmlElement* mapping = dynamic_cast<TiXmlElement*>(child); + + if (mapping == 0) + continue; + + int from = 0; + Button to; + + /// @todo Could use some error checking. + /// @todo Determine whether to create mouse or keyboard mapping + + mapping->Attribute("from", &from); + to = mapping->Attribute("to"); + + createKeyboardInputButton(to, from); + } } KeyboardMouseInputController::~KeyboardMouseInputController() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sik...@us...> - 2006-05-25 06:40:40
|
Revision: 64 Author: sik0fewl Date: 2006-05-24 23:40:33 -0700 (Wed, 24 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=64&view=rev Log Message: ----------- Finished Factory class (I hope) Added F12 key to toggle FPS Modified Paths: -------------- trunk/perceptioncrash/src/Factory.hpp trunk/perceptioncrash/src/GameManager.cpp Modified: trunk/perceptioncrash/src/Factory.hpp =================================================================== --- trunk/perceptioncrash/src/Factory.hpp 2006-05-24 21:40:13 UTC (rev 63) +++ trunk/perceptioncrash/src/Factory.hpp 2006-05-25 06:40:33 UTC (rev 64) @@ -12,15 +12,26 @@ { public: typedef T*(*CreatorFuncPtr)(); + typedef T*(*CreatorFuncXmlPtr)(TiXmlElement*); private: typedef std::map<std::string, CreatorFuncPtr> CreatorMap; + typedef std::map<std::string, CreatorFuncXmlPtr> CreatorXmlMap; + CreatorMap creators; + CreatorXmlMap creatorsXml; public: - void register_(std::string const &id, CreatorFuncPtr creator) + static Factory<T>& factory() { + static Factory<T> factory_; + return factory_; + } + + void register_(std::string const &id, CreatorFuncPtr creator, CreatorFuncXmlPtr creatorXml) + { creators.insert(std::make_pair(id, creator)); + creatorsXml.insert(std::make_pair(id, creatorXml)); } T* create(std::string const &id) @@ -32,28 +43,42 @@ else throw std::runtime_error("Factory for '" + id + "' does not exist"); } + + T* create(TiXmlElement* node) + { + typename CreatorXmlMap::iterator i = creatorsXml.find(node->Attribute("type")); + + if (i != creatorsXml.end()) + return i->second(); + else + { + std::stringstream msg; + msg << "Factory for '" << node->Attribute("type") << "' does not exist" << std::endl; + throw std::runtime_error(msg.str()); + } + } }; -template <typename T> Factory<T>& factory() -{ - static Factory<T> factory_; - return factory_; -} - -template <typename T, typename U> T* -new_creator() -{ - return new U; -} - template <typename T, typename U> struct RegisterFactory { typedef Factory<T> FactoryType; - + + static T* newCreator() + { + return new U; + } + + static T* newCreator(TiXmlElement* node) + { + return new U(node); + } + RegisterFactory(std::string const &id) { - factory<T>().register_(id, static_cast<T* (*)()>(&new_creator<T, U>)); + FactoryType::factory().register_(id, + static_cast<T* (*)()>(&(RegisterFactory<T, U>::newCreator)), + static_cast<T* (*)(TiXmlElement*)>(&(RegisterFactory<T, U>::newCreator))); } }; Modified: trunk/perceptioncrash/src/GameManager.cpp =================================================================== --- trunk/perceptioncrash/src/GameManager.cpp 2006-05-24 21:40:13 UTC (rev 63) +++ trunk/perceptioncrash/src/GameManager.cpp 2006-05-25 06:40:33 UTC (rev 64) @@ -56,6 +56,7 @@ kbnm->createKeyboardInputButton("pause", Ogre::KC_P); kbnm->createKeyboardInputButton("back", Ogre::KC_ESCAPE); kbnm->createKeyboardInputButton("move_down", Ogre::KC_DOWN); + kbnm->createKeyboardInputButton("toggle_fps", Ogre::KC_F12); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sik...@us...> - 2006-05-24 21:40:28
|
Revision: 63 Author: sik0fewl Date: 2006-05-24 14:40:13 -0700 (Wed, 24 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=63&view=rev Log Message: ----------- Adding missing files Added Paths: ----------- trunk/perceptioncrash/data/gui/Falagard.xsd trunk/perceptioncrash/data/gui/Font.xsd trunk/perceptioncrash/data/gui/GUILayout.xsd trunk/perceptioncrash/data/gui/GUIScheme.xsd trunk/perceptioncrash/data/gui/Imageset.xsd Property Changed: ---------------- trunk/perceptioncrash/ Property changes on: trunk/perceptioncrash ___________________________________________________________________ Name: svn:ignore - .sconsign ogre.log Ogre.log ogre.cfg build perceptioncrash configure config.log config.status config.h config.h.in Jamconfig Jamconfig.in autom4te.cache aclocal.m4 + .sconsign ogre.log Ogre.log CEGUI.log ogre.cfg build perceptioncrash configure config.log config.status config.h config.h.in Jamconfig Jamconfig.in autom4te.cache aclocal.m4 Added: trunk/perceptioncrash/data/gui/Falagard.xsd =================================================================== --- trunk/perceptioncrash/data/gui/Falagard.xsd (rev 0) +++ trunk/perceptioncrash/data/gui/Falagard.xsd 2006-05-24 21:40:13 UTC (rev 63) @@ -0,0 +1,363 @@ +<?xml version="1.0" ?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> + <xsd:element name="Falagard" type="falagardSpecificationType" /> + <xsd:complexType name="falagardSpecificationType"> + <xsd:sequence> + <xsd:element name="WidgetLook" type="widgetLookType" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="widgetLookType"> + <xsd:sequence> + <xsd:element name="PropertyDefinition" type="propertyDefinitionType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="Property" type="propertyType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="NamedArea" type="namedAreaType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="Child" type="widgetComponentType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="ImagerySection" type="imagerySectionType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="StateImagery" type="stateType" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="propertyDefinitionType"> + <xsd:attribute name="type" type="propertyTypeEnum" use="optional" default="Generic" /> + <xsd:attribute name="name" type="xsd:string" use="required" /> + <xsd:attribute name="initialValue" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="layoutOnWrite" type="xsd:boolean" use="optional" default="false" /> + <xsd:attribute name="redrawOnWrite" type="xsd:boolean" use="optional" default="false" /> + </xsd:complexType> + <xsd:complexType name="namedAreaType"> + <xsd:sequence> + <xsd:element name="Area" type="componentAreaType" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="stateType"> + <xsd:sequence> + <xsd:element name="Layer" type="layerType" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + <xsd:attribute name="clipped" type="xsd:boolean" use="optional" default="true" /> + </xsd:complexType> + <xsd:complexType name="layerType"> + <xsd:sequence> + <xsd:element name="Section" type="sectionSpecType" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + <xsd:attribute name="priority" type="xsd:integer" use="optional" default="0" /> + </xsd:complexType> + <xsd:complexType name="sectionSpecType"> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element name="Colours" type="colourRectType" /> + <xsd:element name="ColourProperty" type="settingByPropertyType" /> + <xsd:element name="ColourRectProperty" type="settingByPropertyType" /> + </xsd:choice> + <xsd:attribute name="look" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="section" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="imagerySectionType"> + <xsd:sequence> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element name="Colours" type="colourRectType" /> + <xsd:element name="ColourProperty" type="settingByPropertyType" /> + <xsd:element name="ColourRectProperty" type="settingByPropertyType" /> + </xsd:choice> + <xsd:element name="FrameComponent" type="frameComponentType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="ImageryComponent" type="imageryComponentType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="TextComponent" type="textComponentType" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="frameComponentType"> + <xsd:sequence> + <xsd:element name="Area" type="componentAreaType" /> + <xsd:element name="Image" type="frameImageType" minOccurs="0" maxOccurs="9" /> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element name="Colours" type="colourRectType" /> + <xsd:element name="ColourProperty" type="settingByPropertyType" /> + <xsd:element name="ColourRectProperty" type="settingByPropertyType" /> + </xsd:choice> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element name="VertFormat" type="vertFormatType" /> + <xsd:element name="VertFormatProperty" type="settingByPropertyType" /> + </xsd:choice> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element name="HorzFormat" type="horzFormatType" /> + <xsd:element name="HorzFormatProperty" type="settingByPropertyType" /> + </xsd:choice> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="textComponentType"> + <xsd:sequence> + <xsd:element name="Area" type="componentAreaType" /> + <xsd:element name="Text" type="textStringType" minOccurs="0" maxOccurs="1" /> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element name="Colours" type="colourRectType" /> + <xsd:element name="ColourProperty" type="settingByPropertyType" /> + <xsd:element name="ColourRectProperty" type="settingByPropertyType" /> + </xsd:choice> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element name="VertFormat" type="vertTextFormatType" /> + <xsd:element name="VertFormatProperty" type="settingByPropertyType" /> + </xsd:choice> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element name="HorzFormat" type="horzTextFormatType" /> + <xsd:element name="HorzFormatProperty" type="settingByPropertyType" /> + </xsd:choice> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="imageryComponentType"> + <xsd:sequence> + <xsd:element name="Area" type="componentAreaType" /> + <xsd:choice> + <xsd:element name="Image" type="imageType" /> + <xsd:element name="ImageProperty" type="settingByPropertyType" /> + </xsd:choice> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element name="Colours" type="colourRectType" /> + <xsd:element name="ColourProperty" type="settingByPropertyType" /> + <xsd:element name="ColourRectProperty" type="settingByPropertyType" /> + </xsd:choice> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element name="VertFormat" type="vertFormatType" /> + <xsd:element name="VertFormatProperty" type="settingByPropertyType" /> + </xsd:choice> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element name="HorzFormat" type="horzFormatType" /> + <xsd:element name="HorzFormatProperty" type="settingByPropertyType" /> + </xsd:choice> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="widgetComponentType"> + <xsd:sequence> + <xsd:element name="Area" type="componentAreaType" /> + <xsd:element name="VertAlignment" type="vertAlignmentType" minOccurs="0" maxOccurs="1" /> + <xsd:element name="HorzAlignment" type="horzAlignmentType" minOccurs="0" maxOccurs="1" /> + <xsd:element name="Property" type="propertyType" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + <xsd:attribute name="type" type="xsd:string" use="required" /> + <xsd:attribute name="nameSuffix" type="xsd:string" use="required" /> + <xsd:attribute name="look" type="xsd:string" use="optional" default="" /> + </xsd:complexType> + <xsd:complexType name="horzFormatType"> + <xsd:attribute name="type" type="horzFormatEnum" use="required" /> + </xsd:complexType> + <xsd:complexType name="vertFormatType"> + <xsd:attribute name="type" type="vertFormatEnum" use="required" /> + </xsd:complexType> + <xsd:complexType name="horzTextFormatType"> + <xsd:attribute name="type" type="horzTextFormatEnum" use="required" /> + </xsd:complexType> + <xsd:complexType name="vertTextFormatType"> + <xsd:attribute name="type" type="vertTextFormatEnum" use="required" /> + </xsd:complexType> + <xsd:complexType name="horzAlignmentType"> + <xsd:attribute name="type" type="horzAlignmentEnum" use="required" /> + </xsd:complexType> + <xsd:complexType name="vertAlignmentType"> + <xsd:attribute name="type" type="vertAlignmentEnum" use="required" /> + </xsd:complexType> + <xsd:complexType name="propertyType"> + <xsd:attribute name="name" type="xsd:string" use="required" /> + <xsd:attribute name="value" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="imageType"> + <xsd:attribute name="imageset" type="xsd:string" use="required" /> + <xsd:attribute name="image" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="frameImageType"> + <xsd:attribute name="type" type="frameImageComponentEnum" use="required" /> + <xsd:attribute name="imageset" type="xsd:string" use="required" /> + <xsd:attribute name="image" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="componentAreaType"> + <xsd:choice> + <xsd:sequence> + <xsd:element name="Dim" type="dimensionType" minOccurs="4" maxOccurs="4" /> + </xsd:sequence> + <xsd:element name="AreaProperty" type="settingByPropertyType" /> + </xsd:choice> + </xsd:complexType> + <xsd:complexType name="dimensionType"> + <xsd:choice> + <xsd:element name="UnifiedDim" type="unifiedDimType" /> + <xsd:element name="AbsoluteDim" type="absoluteDimType" /> + <xsd:element name="ImageDim" type="imageDimType" /> + <xsd:element name="WidgetDim" type="widgetDimType" /> + <xsd:element name="FontDim" type="fontDimType" /> + <xsd:element name="PropertyDim" type="propertyDimType" /> + </xsd:choice> + <xsd:attribute name="type" type="dimensionTypeEnum" use="required" /> + </xsd:complexType> + <xsd:complexType name="fontDimType"> + <xsd:sequence> + <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" /> + </xsd:sequence> + <xsd:attribute name="widget" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="font" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="string" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="type" type="fontMetricTypeEnum" use="required" /> + <xsd:attribute name="padding" type="xsd:decimal" use="optional" default="0" /> + </xsd:complexType> + <xsd:complexType name="propertyDimType"> + <xsd:sequence> + <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" /> + </xsd:sequence> + <xsd:attribute name="widget" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="unifiedDimType"> + <xsd:sequence> + <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" /> + </xsd:sequence> + <xsd:attribute name="scale" type="xsd:decimal" use="optional" default="0" /> + <xsd:attribute name="offset" type="xsd:integer" use="optional" default="0" /> + <xsd:attribute name="type" type="dimensionTypeEnum" use="required" /> + </xsd:complexType> + <xsd:complexType name="absoluteDimType"> + <xsd:sequence> + <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" /> + </xsd:sequence> + <xsd:attribute name="value" type="xsd:decimal" use="optional" default="0" /> + </xsd:complexType> + <xsd:complexType name="imageDimType"> + <xsd:sequence> + <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" /> + </xsd:sequence> + <xsd:attribute name="imageset" type="xsd:string" use="required" /> + <xsd:attribute name="image" type="xsd:string" use="required" /> + <xsd:attribute name="dimension" type="dimensionTypeEnum" use="required" /> + </xsd:complexType> + <xsd:complexType name="widgetDimType"> + <xsd:sequence> + <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" /> + </xsd:sequence> + <xsd:attribute name="widget" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="dimension" type="dimensionTypeEnum" use="required" /> + </xsd:complexType> + <xsd:complexType name="settingByPropertyType"> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="colourRectType"> + <xsd:attribute name="topLeft" type="colourValType" use="required" /> + <xsd:attribute name="topRight" type="colourValType" use="required" /> + <xsd:attribute name="bottomLeft" type="colourValType" use="required" /> + <xsd:attribute name="bottomRight" type="colourValType" use="required" /> + </xsd:complexType> + <xsd:simpleType name="colourValType"> + <xsd:restriction base="xsd:string"> + <xsd:pattern value="[a-fA-F0-9]{8}" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:complexType name="textStringType"> + <xsd:attribute name="string" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="font" type="xsd:string" use="optional" default="" /> + </xsd:complexType> + <xsd:complexType name="dimensionOperatorType"> + <xsd:choice> + <xsd:element name="UnifiedDim" type="unifiedDimType" /> + <xsd:element name="AbsoluteDim" type="absoluteDimType" /> + <xsd:element name="ImageDim" type="imageDimType" /> + <xsd:element name="WidgetDim" type="widgetDimType" /> + <xsd:element name="FontDim" type="fontDimType" /> + <xsd:element name="PropertyDim" type="propertyDimType" /> + </xsd:choice> + <xsd:attribute name="op" type="dimensionOperatorEnum" use="required" /> + </xsd:complexType> + <xsd:simpleType name="dimensionTypeEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="LeftEdge" /> + <xsd:enumeration value="TopEdge" /> + <xsd:enumeration value="RightEdge" /> + <xsd:enumeration value="BottomEdge" /> + <xsd:enumeration value="XPosition" /> + <xsd:enumeration value="YPosition" /> + <xsd:enumeration value="Width" /> + <xsd:enumeration value="Height" /> + <xsd:enumeration value="XOffset" /> + <xsd:enumeration value="YOffset" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="vertFormatEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="TopAligned" /> + <xsd:enumeration value="CentreAligned" /> + <xsd:enumeration value="BottomAligned" /> + <xsd:enumeration value="Stretched" /> + <xsd:enumeration value="Tiled" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="horzFormatEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="LeftAligned" /> + <xsd:enumeration value="CentreAligned" /> + <xsd:enumeration value="RightAligned" /> + <xsd:enumeration value="Stretched" /> + <xsd:enumeration value="Tiled" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="vertAlignmentEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="TopAligned" /> + <xsd:enumeration value="CentreAligned" /> + <xsd:enumeration value="BottomAligned" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="horzAlignmentEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="LeftAligned" /> + <xsd:enumeration value="CentreAligned" /> + <xsd:enumeration value="RightAligned" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="horzTextFormatEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="LeftAligned" /> + <xsd:enumeration value="RightAligned" /> + <xsd:enumeration value="CentreAligned" /> + <xsd:enumeration value="Justified" /> + <xsd:enumeration value="WordWrapLeftAligned" /> + <xsd:enumeration value="WordWrapRightAligned" /> + <xsd:enumeration value="WordWrapCentreAligned" /> + <xsd:enumeration value="WordWrapJustified" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="vertTextFormatEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="TopAligned" /> + <xsd:enumeration value="BottomAligned" /> + <xsd:enumeration value="CentreAligned" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="propertyTypeEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="Generic" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="fontMetricTypeEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="LineSpacing" /> + <xsd:enumeration value="Baseline" /> + <xsd:enumeration value="HorzExtent" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="dimensionOperatorEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="Noop" /> + <xsd:enumeration value="Add" /> + <xsd:enumeration value="Subtract" /> + <xsd:enumeration value="Multiply" /> + <xsd:enumeration value="Divide" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="frameImageComponentEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="Background" /> + <xsd:enumeration value="TopLeftCorner" /> + <xsd:enumeration value="TopRightCorner" /> + <xsd:enumeration value="BottomLeftCorner" /> + <xsd:enumeration value="BottomRightCorner" /> + <xsd:enumeration value="LeftEdge" /> + <xsd:enumeration value="RightEdge" /> + <xsd:enumeration value="TopEdge" /> + <xsd:enumeration value="BottomEdge" /> + </xsd:restriction> + </xsd:simpleType> +</xsd:schema> \ No newline at end of file Property changes on: trunk/perceptioncrash/data/gui/Falagard.xsd ___________________________________________________________________ Name: svn:executable + * Added: trunk/perceptioncrash/data/gui/Font.xsd =================================================================== --- trunk/perceptioncrash/data/gui/Font.xsd (rev 0) +++ trunk/perceptioncrash/data/gui/Font.xsd 2006-05-24 21:40:13 UTC (rev 63) @@ -0,0 +1,49 @@ +<?xml version="1.0" ?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> + <xsd:element name="Font" type="FontType" /> + + <xsd:complexType name="FontType"> + <xsd:sequence> + <xsd:element name="Mapping" type="MapType" maxOccurs="unbounded" minOccurs="0" /> + <xsd:element name="GlyphSet" type="GlyphSetType" maxOccurs="unbounded" minOccurs="0" /> + <xsd:element name="GlyphRange" type="GlyphRangeType" maxOccurs="unbounded" minOccurs="0" /> + <xsd:element name="Glyph" type="GlyphType" maxOccurs="unbounded" minOccurs="0" /> + </xsd:sequence> + <xsd:attributeGroup ref="FontAttrs" /> + </xsd:complexType> + <xsd:complexType name="MapType"> + <xsd:attribute name="Codepoint" type="xsd:nonNegativeInteger" use="required" /> + <xsd:attribute name="Image" type="xsd:string" use="required" /> + <xsd:attribute name="HorzAdvance" type="xsd:integer" use="optional" default="-1" /> + </xsd:complexType> + <xsd:complexType name="GlyphType"> + <xsd:attribute name="Codepoint" type="xsd:nonNegativeInteger" use="required" /> + </xsd:complexType> + <xsd:complexType name="GlyphRangeType"> + <xsd:attribute name="StartCodepoint" type="xsd:nonNegativeInteger" use="required" /> + <xsd:attribute name="EndCodepoint" type="xsd:nonNegativeInteger" use="required" /> + </xsd:complexType> + <xsd:complexType name="GlyphSetType"> + <xsd:attribute name="Glyphs" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:attributeGroup name="FontAttrs"> + <xsd:attribute name="Name" type="xsd:string" use="required" /> + <xsd:attribute name="Filename" type="xsd:string" use="required" /> + <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="Type" use="required"> + <xsd:simpleType> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="Dynamic" /> + <xsd:enumeration value="Static" /> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + <xsd:attribute name="Size" type="xsd:nonNegativeInteger" use="optional" default="12" /> + <xsd:attribute name="FirstCodepoint" type="xsd:nonNegativeInteger" use="optional" default="32" /> + <xsd:attribute name="LastCodepoint" type="xsd:nonNegativeInteger" use="optional" default="127" /> + <xsd:attribute name="NativeHorzRes" type="xsd:nonNegativeInteger" use="optional" default="640" /> + <xsd:attribute name="NativeVertRes" type="xsd:nonNegativeInteger" use="optional" default="480" /> + <xsd:attribute name="AutoScaled" type="xsd:boolean" use="optional" default="false" /> + <xsd:attribute name="AntiAlias" type="xsd:boolean" use="optional" default="true" /> + </xsd:attributeGroup> +</xsd:schema> \ No newline at end of file Added: trunk/perceptioncrash/data/gui/GUILayout.xsd =================================================================== --- trunk/perceptioncrash/data/gui/GUILayout.xsd (rev 0) +++ trunk/perceptioncrash/data/gui/GUILayout.xsd 2006-05-24 21:40:13 UTC (rev 63) @@ -0,0 +1,42 @@ +<?xml version="1.0"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> + + <xsd:element name="GUILayout" type="GUILayoutType"/> + + <xsd:complexType name="GUILayoutType"> + <xsd:sequence> + <xsd:element name="Window" type="WindowType" /> + </xsd:sequence> + <xsd:attribute name="Parent" type="xsd:string" use="optional" default=""/> + </xsd:complexType> + + <xsd:complexType name="WindowType"> + <xsd:sequence> + <xsd:element name="LayoutImport" type="LayoutImportType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="Event" type="EventType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="Window" type="WindowType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + <xsd:attribute name="Type" type="xsd:string" use="required"/> + <xsd:attribute name="Name" type="xsd:string" use="required"/> + </xsd:complexType> + + <xsd:complexType name="PropertyType"> + <xsd:attribute name="Name" type="xsd:string" use="required"/> + <xsd:attribute name="Value" type="xsd:string" use="required"/> + </xsd:complexType> + + <xsd:complexType name="LayoutImportType"> + <xsd:attribute name="Filename" type="xsd:string" use="required"/> + <xsd:attribute name="Prefix" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" /> + </xsd:complexType> + + <xsd:complexType name="EventType"> + <xsd:attribute name="Name" type="xsd:string" use="required"/> + <xsd:attribute name="Function" type="xsd:string" use="required"/> + </xsd:complexType> + +</xsd:schema> + Added: trunk/perceptioncrash/data/gui/GUIScheme.xsd =================================================================== --- trunk/perceptioncrash/data/gui/GUIScheme.xsd (rev 0) +++ trunk/perceptioncrash/data/gui/GUIScheme.xsd 2006-05-24 21:40:13 UTC (rev 63) @@ -0,0 +1,43 @@ +<?xml version="1.0" ?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> + <xsd:element name="GUIScheme" type="SchemeType" /> + <xsd:complexType name="SchemeType"> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="Imageset" type="NamedDataType" /> + <xsd:element name="ImagesetFromImage" type="NamedDataType" /> + <xsd:element name="Font" type="NamedDataType" /> + <xsd:element name="LookNFeel" type="FileDataType" /> + <xsd:element name="WindowSet" type="WindowSetType" /> + <xsd:element name="WindowAlias" type="WindowAliasType" /> + <xsd:element name="FalagardMapping" type="FalagardMapType" /> + </xsd:choice> + <xsd:attribute name="Name" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="WindowSetType"> + <xsd:sequence> + <xsd:element name="WindowFactory" type="WindowFactoryType" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + <xsd:attribute name="Filename" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="FileDataType"> + <xsd:attribute name="Filename" type="xsd:string" use="required" /> + <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" /> + </xsd:complexType> + <xsd:complexType name="NamedDataType"> + <xsd:attribute name="Name" type="xsd:string" use="required" /> + <xsd:attribute name="Filename" type="xsd:string" use="required" /> + <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" /> + </xsd:complexType> + <xsd:complexType name="WindowFactoryType"> + <xsd:attribute name="Name" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="WindowAliasType"> + <xsd:attribute name="Alias" type="xsd:string" use="required" /> + <xsd:attribute name="Target" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="FalagardMapType"> + <xsd:attribute name="WindowType" type="xsd:string" use="required" /> + <xsd:attribute name="TargetType" type="xsd:string" use="required" /> + <xsd:attribute name="LookNFeel" type="xsd:string" use="required" /> + </xsd:complexType> +</xsd:schema> \ No newline at end of file Added: trunk/perceptioncrash/data/gui/Imageset.xsd =================================================================== --- trunk/perceptioncrash/data/gui/Imageset.xsd (rev 0) +++ trunk/perceptioncrash/data/gui/Imageset.xsd 2006-05-24 21:40:13 UTC (rev 63) @@ -0,0 +1,28 @@ +<?xml version="1.0"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> + + <xsd:element name="Imageset" type="ImagesetType"/> + + <xsd:complexType name="ImagesetType"> + <xsd:sequence> + <xsd:element name="Image" type="ImageType" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="Imagefile" type="xsd:string" use="required"/> + <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="Name" type="xsd:string" use="required"/> + <xsd:attribute name="NativeHorzRes" type="xsd:nonNegativeInteger" use="optional" default="640" /> + <xsd:attribute name="NativeVertRes" type="xsd:nonNegativeInteger" use="optional" default="480" /> + <xsd:attribute name="AutoScaled" type="xsd:boolean" use="optional" default="false" /> + </xsd:complexType> + + <xsd:complexType name="ImageType"> + <xsd:attribute name="Name" type="xsd:string" use="required"/> + <xsd:attribute name="XPos" type="xsd:nonNegativeInteger" use="required"/> + <xsd:attribute name="YPos" type="xsd:nonNegativeInteger" use="required"/> + <xsd:attribute name="Width" type="xsd:nonNegativeInteger" use="required"/> + <xsd:attribute name="Height" type="xsd:nonNegativeInteger" use="required"/> + <xsd:attribute name="XOffset" type="xsd:integer" use="optional" default="0"/> + <xsd:attribute name="YOffset" type="xsd:integer" use="optional" default="0"/> + </xsd:complexType> + +</xsd:schema> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sik...@us...> - 2006-05-24 20:11:46
|
Revision: 62 Author: sik0fewl Date: 2006-05-24 13:11:41 -0700 (Wed, 24 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=62&view=rev Log Message: ----------- Don't forget to use the correct case. We don't all use windows, you know :P Also, CEGUI should already be in the include path so I removed the 'CEGUI/' from the includes Modified Paths: -------------- trunk/perceptioncrash/src/Entity.hpp trunk/perceptioncrash/src/MainMenuState.hpp Modified: trunk/perceptioncrash/src/Entity.hpp =================================================================== --- trunk/perceptioncrash/src/Entity.hpp 2006-05-24 19:51:36 UTC (rev 61) +++ trunk/perceptioncrash/src/Entity.hpp 2006-05-24 20:11:41 UTC (rev 62) @@ -1,7 +1,7 @@ #ifndef ENTITY_HPP #define ENTITY_HPP -#include "ogreentity.h" +#include <OgreEntity.h> class Entity : public Ogre::Entity @@ -17,4 +17,4 @@ }; -#endif /* ENTITY_HPP */ \ No newline at end of file +#endif /* ENTITY_HPP */ Modified: trunk/perceptioncrash/src/MainMenuState.hpp =================================================================== --- trunk/perceptioncrash/src/MainMenuState.hpp 2006-05-24 19:51:36 UTC (rev 61) +++ trunk/perceptioncrash/src/MainMenuState.hpp 2006-05-24 20:11:41 UTC (rev 62) @@ -2,14 +2,14 @@ #define MAIN_MENU_STATE_HPP #include <Ogre.h> -#include <CEGUI/CEGUIImageset.h> -#include <CEGUI/CEGUISystem.h> -#include <CEGUI/CEGUILogger.h> -#include <CEGUI/CEGUISchemeManager.h> -#include <CEGUI/CEGUIWindowManager.h> -#include <CEGUI/CEGUIWindow.h> -#include "OgreCEGUIRenderer.h" -#include "OgreCEGUIResourceProvider.h" +#include <CEGUIImageset.h> +#include <CEGUISystem.h> +#include <CEGUILogger.h> +#include <CEGUISchemeManager.h> +#include <CEGUIWindowManager.h> +#include <CEGUIWindow.h> +#include <OgreCEGUIRenderer.h> +#include <OgreCEGUIResourceProvider.h> #include "GameState.hpp" #include "InputController.hpp" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <mac...@us...> - 2006-05-24 19:52:07
|
Revision: 61 Author: machaira Date: 2006-05-24 12:51:36 -0700 (Wed, 24 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=61&view=rev Log Message: ----------- Added MainMenuState and changed logic to implement it, added start of code for quest system and Entity class. Modified Paths: -------------- trunk/perceptioncrash/contrib/VC++Project/perceptioncrash/perceptioncrash.vcproj trunk/perceptioncrash/src/GameManager.cpp trunk/perceptioncrash/src/IntroState.cpp trunk/perceptioncrash/src/KeyboardMouseInputController.cpp trunk/perceptioncrash/src/PlayState.cpp Added Paths: ----------- trunk/perceptioncrash/data/fonts/bluehighway-10.font trunk/perceptioncrash/data/fonts/bluehighway-12.font trunk/perceptioncrash/data/fonts/bluehighway-8.font trunk/perceptioncrash/data/gui/TaharezLook.imageset trunk/perceptioncrash/data/gui/TaharezLook.looknfeel trunk/perceptioncrash/data/gui/TaharezLook.tga trunk/perceptioncrash/data/gui/TaharezLookSkin.scheme trunk/perceptioncrash/data/gui/TaharezLookWidgetAliases.scheme trunk/perceptioncrash/data/gui/mainmenu.xml trunk/perceptioncrash/src/Entity.cpp trunk/perceptioncrash/src/Entity.hpp trunk/perceptioncrash/src/MainMenuState.cpp trunk/perceptioncrash/src/MainMenuState.hpp trunk/perceptioncrash/src/Quest.cpp trunk/perceptioncrash/src/Quest.hpp trunk/perceptioncrash/src/QuestLogState.cpp trunk/perceptioncrash/src/QuestLogState.hpp trunk/perceptioncrash/src/QuestManager.cpp trunk/perceptioncrash/src/QuestManager.hpp Modified: trunk/perceptioncrash/contrib/VC++Project/perceptioncrash/perceptioncrash.vcproj =================================================================== --- trunk/perceptioncrash/contrib/VC++Project/perceptioncrash/perceptioncrash.vcproj 2006-05-23 23:04:31 UTC (rev 60) +++ trunk/perceptioncrash/contrib/VC++Project/perceptioncrash/perceptioncrash.vcproj 2006-05-24 19:51:36 UTC (rev 61) @@ -39,7 +39,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="include;"$(OGRE_HOME)\include";"$(OGRE_HOME)\include\CEGUI";"$(OGRE_HOME)\samples\include";C:\boost_1_33_1" + AdditionalIncludeDirectories="include;"$(OGRE_HOME)\include";"$(OGRE_HOME)\samples\include";C:\boost_1_33_1" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS" MinimalRebuild="true" ExceptionHandling="1" @@ -195,6 +195,10 @@ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > <File + RelativePath="..\..\..\src\Entity.cpp" + > + </File> + <File RelativePath="..\..\..\src\GameManager.cpp" > </File> @@ -207,7 +211,7 @@ > </File> <File - RelativePath="..\..\..\src\KeyboardMap.cpp" + RelativePath="..\..\..\src\KeyboardMouseInputController.cpp" > </File> <File @@ -215,6 +219,10 @@ > </File> <File + RelativePath="..\..\..\src\MainMenuState.cpp" + > + </File> + <File RelativePath="..\..\..\src\PauseState.cpp" > </File> @@ -222,6 +230,18 @@ RelativePath="..\..\..\src\PlayState.cpp" > </File> + <File + RelativePath="..\..\..\src\Quest.cpp" + > + </File> + <File + RelativePath="..\..\..\src\QuestLogState.cpp" + > + </File> + <File + RelativePath="..\..\..\src\QuestManager.cpp" + > + </File> </Filter> <Filter Name="Header Files" @@ -229,6 +249,14 @@ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" > <File + RelativePath="..\..\..\src\Entity.hpp" + > + </File> + <File + RelativePath="..\..\..\src\Factory.hpp" + > + </File> + <File RelativePath="..\..\..\src\GameManager.hpp" > </File> @@ -237,6 +265,10 @@ > </File> <File + RelativePath="..\..\..\src\InputController.hpp" + > + </File> + <File RelativePath="..\..\..\src\InputManager.hpp" > </File> @@ -245,10 +277,14 @@ > </File> <File - RelativePath="..\..\..\src\KeyboardMap.hpp" + RelativePath="..\..\..\src\KeyboardMouseInputController.hpp" > </File> <File + RelativePath="..\..\..\src\MainMenuState.hpp" + > + </File> + <File RelativePath="..\..\..\src\PauseState.hpp" > </File> @@ -256,6 +292,18 @@ RelativePath="..\..\..\src\PlayState.hpp" > </File> + <File + RelativePath="..\..\..\src\Quest.hpp" + > + </File> + <File + RelativePath="..\..\..\src\QuestLogState.hpp" + > + </File> + <File + RelativePath="..\..\..\src\QuestManager.hpp" + > + </File> </Filter> <Filter Name="Resource Files" Added: trunk/perceptioncrash/data/fonts/bluehighway-10.font =================================================================== --- trunk/perceptioncrash/data/fonts/bluehighway-10.font (rev 0) +++ trunk/perceptioncrash/data/fonts/bluehighway-10.font 2006-05-24 19:51:36 UTC (rev 61) @@ -0,0 +1,2 @@ +<?xml version="1.0" ?> +<Font Name="BlueHighway-10" Filename="bluehigh.ttf" Type="Dynamic" Size="10" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="false" AntiAlias="true" /> Added: trunk/perceptioncrash/data/fonts/bluehighway-12.font =================================================================== --- trunk/perceptioncrash/data/fonts/bluehighway-12.font (rev 0) +++ trunk/perceptioncrash/data/fonts/bluehighway-12.font 2006-05-24 19:51:36 UTC (rev 61) @@ -0,0 +1,2 @@ +<?xml version="1.0" ?> +<Font Name="BlueHighway-12" Filename="bluehigh.ttf" Type="Dynamic" Size="12" NativeHorzRes="800" NativeVertRes="600" AutoScaled="true"/> Added: trunk/perceptioncrash/data/fonts/bluehighway-8.font =================================================================== --- trunk/perceptioncrash/data/fonts/bluehighway-8.font (rev 0) +++ trunk/perceptioncrash/data/fonts/bluehighway-8.font 2006-05-24 19:51:36 UTC (rev 61) @@ -0,0 +1,2 @@ +<?xml version="1.0" ?> +<Font Name="BlueHighway-8" Filename="bluehigh.ttf" Type="Dynamic" Size="8" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="true" AntiAlias="true" /> Added: trunk/perceptioncrash/data/gui/TaharezLook.imageset =================================================================== --- trunk/perceptioncrash/data/gui/TaharezLook.imageset (rev 0) +++ trunk/perceptioncrash/data/gui/TaharezLook.imageset 2006-05-24 19:51:36 UTC (rev 61) @@ -0,0 +1,233 @@ +<?xml version="1.0" ?> +<Imageset Name="TaharezLook" Imagefile="TaharezLook.tga" NativeHorzRes="800" NativeVertRes="600" AutoScaled="true"> + <Image Name="ClientBrush" XPos="2" YPos="2" Width="64" Height="64" /> + <Image Name="WindowLeftEdge" XPos="6" YPos="95" Width="1" Height="22" XOffset="4" /> + <Image Name="WindowRightEdge" XPos="34" YPos="95" Width="1" Height="22" XOffset="-5" /> + <Image Name="WindowTopEdge" XPos="9" YPos="68" Width="23" Height="1" /> + <Image Name="WindowBottomEdge" XPos="9" YPos="143" Width="23" Height="1" /> + <Image Name="WindowTopLeft" XPos="2" YPos="68" Width="5" Height="24" /> + <Image Name="WindowTopRight" XPos="34" YPos="68" Width="5" Height="24" /> + <Image Name="WindowBottomLeft" XPos="2" YPos="120" Width="5" Height="24" /> + <Image Name="WindowBottomRight" XPos="34" YPos="120" Width="5" Height="24" /> + <Image Name="ButtonLeftNormal" XPos="68" YPos="20" Width="12" Height="16" /> + <Image Name="ButtonMiddleNormal" XPos="82" YPos="20" Width="12" Height="16" /> + <Image Name="ButtonRightNormal" XPos="96" YPos="20" Width="12" Height="16" /> + <Image Name="ButtonLeftPushed" XPos="68" YPos="38" Width="12" Height="16" /> + <Image Name="ButtonMiddlePushed" XPos="82" YPos="38" Width="12" Height="16" /> + <Image Name="ButtonRightPushed" XPos="96" YPos="38" Width="12" Height="16" /> + <Image Name="ButtonLeftHighlight" XPos="68" YPos="56" Width="12" Height="16" /> + <Image Name="ButtonMiddleHighlight" XPos="82" YPos="56" Width="12" Height="16" /> + <Image Name="ButtonRightHighlight" XPos="96" YPos="56" Width="12" Height="16" /> + <Image Name="CheckboxNormal" XPos="110" YPos="2" Width="12" Height="12" /> + <Image Name="CheckboxHover" XPos="110" YPos="30" Width="12" Height="12" /> + <Image Name="CheckboxMark" XPos="110" YPos="16" Width="12" Height="12" /> + <Image Name="RadioButtonNormal" XPos="124" YPos="2" Width="12" Height="12" /> + <Image Name="RadioButtonHover" XPos="124" YPos="30" Width="12" Height="12" /> + <Image Name="RadioButtonMark" XPos="124" YPos="16" Width="12" Height="12" /> + <Image Name="TitlebarLeft" XPos="68" YPos="2" Width="8" Height="16" /> + <Image Name="TitlebarMiddle" XPos="78" YPos="2" Width="8" Height="16" /> + <Image Name="TitlebarRight" XPos="88" YPos="2" Width="8" Height="16" /> + <Image Name="NewTitlebarLeft" XPos="61" YPos="127" Width="13" Height="16" /> + <Image Name="NewTitlebarMiddle" XPos="77" YPos="127" Width="12" Height="16" /> + <Image Name="NewTitlebarRight" XPos="92" YPos="127" Width="12" Height="16" /> + <Image Name="SysAreaMiddle" XPos="107" YPos="127" Width="12" Height="16" /> + <Image Name="SysAreaRight" XPos="122" YPos="127" Width="13" Height="16" /> + <Image Name="StaticLeft" XPos="41" YPos="89" Width="6" Height="6" /> + <Image Name="StaticRight" XPos="63" YPos="89" Width="6" Height="6" /> + <Image Name="StaticTop" XPos="52" YPos="78" Width="6" Height="6" /> + <Image Name="StaticBottom" XPos="52" YPos="100" Width="6" Height="6" /> + <Image Name="StaticTopLeft" XPos="41" YPos="78" Width="6" Height="6" /> + <Image Name="StaticTopRight" XPos="63" YPos="78" Width="6" Height="6" /> + <Image Name="StaticBottomLeft" XPos="41" YPos="100" Width="6" Height="6" /> + <Image Name="StaticBottomRight" XPos="63" YPos="100" Width="6" Height="6" /> + <Image Name="StaticBackdrop" XPos="52" YPos="89" Width="6" Height="6" /> + <Image Name="ProgressBarLeft" XPos="71" YPos="74" Width="7" Height="12" /> + <Image Name="ProgressBarMiddle" XPos="80" YPos="74" Width="6" Height="12" /> + <Image Name="ProgressBarRight" XPos="88" YPos="74" Width="6" Height="12" /> + <Image Name="ProgressBarDimSegment" XPos="96" YPos="74" Width="8" Height="12" /> + <Image Name="ProgressBarLitSegment" XPos="106" YPos="74" Width="8" Height="12" /> + <Image Name="EditBoxLeft" XPos="41" YPos="108" Width="4" Height="18" /> + <Image Name="EditBoxMiddle" XPos="47" YPos="108" Width="4" Height="18" /> + <Image Name="EditBoxRight" XPos="53" YPos="108" Width="4" Height="18" /> + <Image Name="EditBoxCarat" XPos="60" YPos="108" Width="4" Height="18" /> + <Image Name="SpinnerUpNormal" XPos="68" YPos="110" Width="10" Height="6" /> + <Image Name="SpinnerDownNormal" XPos="68" YPos="118" Width="10" Height="6" /> + <Image Name="SpinnerUpHover" XPos="82" YPos="110" Width="10" Height="6" /> + <Image Name="SpinnerDownHover" XPos="82" YPos="118" Width="10" Height="6" /> + <Image Name="TextSelectionBrush" XPos="8" YPos="70" Width="16" Height="16" /> + <Image Name="VertScrollTop" XPos="182" YPos="2" Width="20" Height="8" /> + <Image Name="VertScrollMiddle" XPos="182" YPos="12" Width="20" Height="8" /> + <Image Name="VertScrollBottom" XPos="182" YPos="22" Width="20" Height="8" /> + <Image Name="VertScrollBarSegment" XPos="206" YPos="2" Width="4" Height="10" /> + <Image Name="VertScrollThumbNormal" XPos="214" YPos="2" Width="8" Height="24" /> + <Image Name="VertScrollThumbHover" XPos="224" YPos="2" Width="8" Height="24" /> + <Image Name="VertScrollUpNormal" XPos="196" YPos="32" Width="12" Height="12" /> + <Image Name="VertScrollDownNormal" XPos="182" YPos="32" Width="12" Height="12" /> + <Image Name="VertScrollUpHover" XPos="196" YPos="46" Width="12" Height="12" /> + <Image Name="VertScrollDownHover" XPos="182" YPos="46" Width="12" Height="12" /> + <Image Name="MiniVertScrollBarSegment" XPos="207" YPos="60" Width="4" Height="10" /> + <Image Name="MiniVertScrollThumbNormal" XPos="214" YPos="59" Width="7" Height="22" /> + <Image Name="MiniVertScrollThumbTopNormal" XPos="214" YPos="59" Width="7" Height="5" /> + <Image Name="MiniVertScrollThumbMiddleNormal" XPos="214" YPos="65" Width="7" Height="5" /> + <Image Name="MiniVertScrollThumbBottomNormal" XPos="214" YPos="76" Width="7" Height="5" /> + <Image Name="MiniVertScrollThumbTopHover" XPos="223" YPos="59" Width="7" Height="5" /> + <Image Name="MiniVertScrollThumbMiddleHover" XPos="223" YPos="65" Width="7" Height="5" /> + <Image Name="MiniVertScrollThumbBottomHover" XPos="223" YPos="76" Width="7" Height="5" /> + <Image Name="MiniVertScrollThumbHover" XPos="223" YPos="59" Width="7" Height="22" /> + <Image Name="MiniVertScrollUpNormal" XPos="194" YPos="60" Width="10" Height="9" /> + <Image Name="MiniVertScrollDownNormal" XPos="182" YPos="59" Width="10" Height="9" /> + <Image Name="MiniVertScrollUpHover" XPos="194" YPos="70" Width="10" Height="9" /> + <Image Name="MiniVertScrollDownHover" XPos="182" YPos="69" Width="10" Height="9" /> + <Image Name="VertSliderBody" XPos="234" YPos="2" Width="9" Height="48" /> + <Image Name="VertSliderThumbNormal" XPos="217" YPos="28" Width="15" Height="6" /> + <Image Name="VertSliderThumbHover" XPos="217" YPos="36" Width="15" Height="6" /> + <Image Name="MiniHorzScrollBarSegment" XPos="244" YPos="80" Width="10" Height="4" /> + <Image Name="MiniHorzScrollThumbNormal" XPos="233" YPos="87" Width="22" Height="7" /> + <Image Name="MiniHorzScrollThumbLeftNormal" XPos="233" YPos="87" Width="5" Height="7" /> + <Image Name="MiniHorzScrollThumbMiddleNormal" XPos="239" YPos="87" Width="5" Height="7" /> + <Image Name="MiniHorzScrollThumbRightNormal" XPos="250" YPos="87" Width="5" Height="7" /> + <Image Name="MiniHorzScrollThumbHover" XPos="233" YPos="96" Width="22" Height="7" /> + <Image Name="MiniHorzScrollThumbLeftHover" XPos="233" YPos="96" Width="5" Height="7" /> + <Image Name="MiniHorzScrollThumbMiddleHover" XPos="239" YPos="96" Width="5" Height="7" /> + <Image Name="MiniHorzScrollThumbRightHover" XPos="250" YPos="96" Width="5" Height="7" /> + <Image Name="MiniHorzScrollLeftNormal" XPos="246" YPos="55" Width="9" Height="10" /> + <Image Name="MiniHorzScrollRightNormal" XPos="245" YPos="67" Width="9" Height="10" /> + <Image Name="MiniHorzScrollLeftHover" XPos="236" YPos="55" Width="9" Height="10" /> + <Image Name="MiniHorzScrollRightHover" XPos="235" YPos="67" Width="9" Height="10" /> + <Image Name="ListboxLeft" XPos="41" YPos="89" Width="7" Height="6" /> + <Image Name="ListboxRight" XPos="62" YPos="89" Width="7" Height="6" /> + <Image Name="ListboxTop" XPos="52" YPos="78" Width="6" Height="7" /> + <Image Name="ListboxBottom" XPos="52" YPos="99" Width="6" Height="7" /> + <Image Name="ListboxTopLeft" XPos="41" YPos="78" Width="7" Height="7" /> + <Image Name="ListboxTopRight" XPos="62" YPos="78" Width="7" Height="7" /> + <Image Name="ListboxBottomLeft" XPos="41" YPos="99" Width="7" Height="7" /> + <Image Name="ListboxBottomRight" XPos="62" YPos="99" Width="7" Height="7" /> + <Image Name="ListboxBackdrop" XPos="52" YPos="89" Width="6" Height="6" /> + <Image Name="ListboxSelectionBrush" XPos="8" YPos="70" Width="16" Height="16" /> + <Image Name="ComboboxEditLeft" XPos="138" YPos="2" Width="8" Height="16" /> + <Image Name="ComboboxEditMiddle" XPos="148" YPos="2" Width="8" Height="16" /> + <Image Name="ComboboxListButtonNormal" XPos="158" YPos="2" Width="16" Height="16" /> + <Image Name="ComboboxListButtonHover" XPos="158" YPos="20" Width="16" Height="16" /> + <Image Name="ComboboxListLeft" XPos="138" YPos="48" Width="8" Height="8" /> + <Image Name="ComboboxListRight" XPos="158" YPos="48" Width="8" Height="8" /> + <Image Name="ComboboxListTop" XPos="148" YPos="48" Width="8" Height="8" /> + <Image Name="ComboboxListBottom" XPos="148" YPos="58" Width="8" Height="8" /> + <Image Name="ComboboxListTopLeft" XPos="138" YPos="38" Width="8" Height="8" /> + <Image Name="ComboboxListTopRight" XPos="158" YPos="38" Width="8" Height="8" /> + <Image Name="ComboboxListBottomLeft" XPos="138" YPos="58" Width="8" Height="8" /> + <Image Name="ComboboxListBottomRight" XPos="158" YPos="58" Width="8" Height="8" /> + <Image Name="ComboboxListBackdrop" XPos="148" YPos="48" Width="8" Height="8" /> + <Image Name="ComboboxSelectionBrush" XPos="8" YPos="70" Width="16" Height="16" /> + <Image Name="ComboboxDividerLeft" XPos="138" YPos="68" Width="14" Height="1" /> + <Image Name="ComboboxDividerMiddle" XPos="154" YPos="68" Width="8" Height="1" /> + <Image Name="ComboboxDividerRight" XPos="164" YPos="68" Width="14" Height="1" /> + <Image Name="HeaderBarBackdropNormal" XPos="230" YPos="163" Width="10" Height="12" /> + <Image Name="HeaderBarBackdropHover" XPos="230" YPos="163" Width="10" Height="12" /> + <Image Name="HeaderBarSplitterNormal" XPos="225" YPos="92" Width="3" Height="16" /> + <Image Name="HeaderBarSplitterHover" XPos="200" YPos="92" Width="3" Height="16" /> + <Image Name="HeaderBarSortUp" XPos="233" YPos="178" Width="8" Height="8" /> + <Image Name="HeaderBarSortDown" XPos="244" YPos="178" Width="8" Height="8" /> + <Image Name="MultiListLeft" XPos="170" YPos="92" Width="7" Height="6" /> + <Image Name="MultiListRight" XPos="191" YPos="92" Width="7" Height="6" /> + <Image Name="MultiListTop" XPos="181" YPos="81" Width="6" Height="7" /> + <Image Name="MultiListBottom" XPos="181" YPos="102" Width="6" Height="7" /> + <Image Name="MultiListTopLeft" XPos="170" YPos="81" Width="7" Height="7" /> + <Image Name="MultiListTopRight" XPos="191" YPos="81" Width="7" Height="7" /> + <Image Name="MultiListBottomLeft" XPos="170" YPos="102" Width="7" Height="7" /> + <Image Name="MultiListBottomRight" XPos="191" YPos="102" Width="7" Height="7" /> + <Image Name="MultiListBackdrop" XPos="181" YPos="92" Width="6" Height="6" /> + <Image Name="MultiListSelectionBrush" XPos="9" YPos="71" Width="14" Height="14" /> + <Image Name="AltProgressLeft" XPos="71" YPos="88" Width="8" Height="12" /> + <Image Name="AltProgressMiddle" XPos="81" YPos="88" Width="8" Height="12" /> + <Image Name="AltProgressRight" XPos="91" YPos="88" Width="8" Height="12" /> + <Image Name="AltProgressQuarter" XPos="102" YPos="89" Width="3" Height="4" /> + <Image Name="AltProgressHalf" XPos="109" YPos="89" Width="4" Height="5" /> + <Image Name="AltProgressLight1" XPos="100" YPos="97" Width="4" Height="8" /> + <Image Name="AltProgressLight2" XPos="106" YPos="97" Width="4" Height="8" /> + <Image Name="AltProgressLight3" XPos="112" YPos="97" Width="4" Height="8" /> + <Image Name="AltProgressLight4" XPos="118" YPos="97" Width="4" Height="8" /> + <Image Name="AltProgressLight5" XPos="124" YPos="97" Width="4" Height="8" /> + <Image Name="AltProgressLight6" XPos="130" YPos="97" Width="4" Height="8" /> + <Image Name="AltProgressLight7" XPos="136" YPos="97" Width="4" Height="8" /> + <Image Name="AltProgressLight8" XPos="142" YPos="97" Width="4" Height="8" /> + <Image Name="AltProgressLight9" XPos="148" YPos="97" Width="4" Height="8" /> + <Image Name="AltProgressLight10" XPos="154" YPos="97" Width="4" Height="8" /> + <Image Name="CloseButtonNormal" XPos="41" YPos="128" Width="16" Height="16" /> + <Image Name="CloseButtonHover" XPos="41" YPos="146" Width="16" Height="16" /> + <Image Name="CloseButtonPressed" XPos="41" YPos="164" Width="16" Height="16" /> + <Image Name="NewCloseButtonNormal" XPos="90" YPos="146" Width="10" Height="10" /> + <Image Name="NewCloseButtonHover" XPos="90" YPos="146" Width="10" Height="10" /> + <Image Name="NewCloseButtonPressed" XPos="90" YPos="146" Width="10" Height="10" /> + <Image Name="MultiLineEditboxLeft" XPos="41" YPos="89" Width="6" Height="6" /> + <Image Name="MultiLineEditboxRight" XPos="63" YPos="89" Width="6" Height="6" /> + <Image Name="MultiLineEditboxTop" XPos="52" YPos="78" Width="6" Height="6" /> + <Image Name="MultiLineEditboxBottom" XPos="52" YPos="100" Width="6" Height="6" /> + <Image Name="MultiLineEditboxTopLeft" XPos="41" YPos="78" Width="6" Height="6" /> + <Image Name="MultiLineEditboxTopRight" XPos="63" YPos="78" Width="6" Height="6" /> + <Image Name="MultiLineEditboxBottomLeft" XPos="41" YPos="100" Width="6" Height="6" /> + <Image Name="MultiLineEditboxBottomRight" XPos="63" YPos="100" Width="6" Height="6" /> + <Image Name="MultiLineEditboxBackdrop" XPos="52" YPos="89" Width="6" Height="6" /> + <Image Name="MultiLineEditboxSelectionBrush" XPos="9" YPos="71" Width="14" Height="14" /> + <Image Name="MouseTarget" XPos="182" YPos="127" Width="17" Height="17" XOffset="-8" YOffset="-8" /> + <Image Name="MouseArrow" XPos="138" YPos="127" Width="31" Height="25" XOffset="0" YOffset="0" /> + <Image Name="MouseMoveCursor" XPos="201" YPos="127" Width="18" Height="18" XOffset="-8" YOffset="-8" /> + <Image Name="MouseNoSoCursor" XPos="221" YPos="127" Width="8" Height="18" XOffset="-3" YOffset="-8" /> + <Image Name="MouseEsWeCursor" XPos="182" YPos="150" Width="18" Height="8" XOffset="-8" YOffset="-3" /> + <Image Name="MouseNeSwCursor" XPos="201" YPos="147" Width="14" Height="14" XOffset="-7" YOffset="-7" /> + <Image Name="MouseNwSeCursor" XPos="230" YPos="126" Width="14" Height="14" XOffset="-7" YOffset="-7" /> + <Image Name="MouseTextBar" XPos="173" YPos="127" Width="7" Height="18" XOffset="-2" YOffset="-9" /> + <Image Name="TabControlButtonPaneFiller" XPos="197" YPos="201" Width="7" Height="1" /> + <Image Name="TabPaneLeft" XPos="41" YPos="89" Width="7" Height="6" /> + <Image Name="TabPaneRight" XPos="62" YPos="89" Width="7" Height="6" /> + <Image Name="TabPaneLower" XPos="52" YPos="99" Width="6" Height="7" /> + <Image Name="TabPaneLowerLeft" XPos="41" YPos="99" Width="7" Height="7" /> + <Image Name="TabPaneLowerRight" XPos="62" YPos="99" Width="7" Height="7" /> + <Image Name="TabPaneMiddle" XPos="52" YPos="89" Width="6" Height="6" /> + <Image Name="TabButtonLeftNormal" XPos="41" YPos="89" Width="7" Height="6" /> + <Image Name="TabButtonRightNormal" XPos="62" YPos="89" Width="7" Height="6" /> + <Image Name="TabButtonUpperNormal" XPos="52" YPos="78" Width="6" Height="7" /> + <Image Name="TabButtonLowerNormal" XPos="52" YPos="99" Width="6" Height="7" /> + <Image Name="TabButtonUpperLeftNormal" XPos="41" YPos="78" Width="7" Height="7" /> + <Image Name="TabButtonUpperRightNormal" XPos="62" YPos="78" Width="7" Height="7" /> + <Image Name="TabButtonLowerLeftNormal" XPos="41" YPos="99" Width="7" Height="7" /> + <Image Name="TabButtonLowerRightNormal" XPos="187" YPos="195" Width="7" Height="7" /> + <Image Name="TabButtonMiddleNormal" XPos="52" YPos="89" Width="6" Height="6" /> + <Image Name="TabButtonLeftSelected" XPos="41" YPos="89" Width="7" Height="6" /> + <Image Name="TabButtonRightSelected" XPos="62" YPos="89" Width="7" Height="6" /> + <Image Name="TabButtonUpperSelected" XPos="52" YPos="78" Width="6" Height="7" /> + <Image Name="TabButtonLowerSelected" XPos="52" YPos="89" Width="6" Height="6" /> + <Image Name="TabButtonUpperLeftSelected" XPos="41" YPos="78" Width="7" Height="7" /> + <Image Name="TabButtonUpperRightSelected" XPos="62" YPos="78" Width="7" Height="7" /> + <Image Name="TabButtonLowerLeftSelected" XPos="41" YPos="99" Width="7" Height="7" /> + <Image Name="TabButtonLowerRightSelected" XPos="62" YPos="99" Width="7" Height="7" /> + <Image Name="TabButtonMiddleSelected" XPos="52" YPos="89" Width="6" Height="6" /> + <Image Name="TooltipTopLeft" XPos="61" YPos="160" Width="4" Height="4" /> + <Image Name="TooltipTopRight" XPos="85" YPos="160" Width="5" Height="4" /> + <Image Name="TooltipBottomLeft" XPos="61" YPos="184" Width="4" Height="5" /> + <Image Name="TooltipBottomRight" XPos="85" YPos="184" Width="5" Height="5" /> + <Image Name="TooltipLeftEdge" XPos="61" YPos="171" Width="4" Height="6" /> + <Image Name="TooltipRightEdge" XPos="85" YPos="171" Width="5" Height="6" /> + <Image Name="TooltipTopEdge" XPos="72" YPos="160" Width="6" Height="4" /> + <Image Name="TooltipBottomEdge" XPos="72" YPos="184" Width="6" Height="5" /> + <Image Name="TooltipMiddle" XPos="72" YPos="171" Width="6" Height="6" /> + <Image Name="MenuTopLeft" XPos="166" YPos="204" Width="2" Height="2" /> + <Image Name="MenuTopRight" XPos="175" YPos="204" Width="3" Height="2" /> + <Image Name="MenuBottomLeft" XPos="166" YPos="213" Width="2" Height="3" /> + <Image Name="MenuBottomRight" XPos="175" YPos="213" Width="3" Height="3" /> + <Image Name="MenuLeft" XPos="166" YPos="209" Width="2" Height="1" /> + <Image Name="MenuRight" XPos="175" YPos="209" Width="3" Height="1" /> + <Image Name="MenuTop" XPos="171" YPos="204" Width="1" Height="2" /> + <Image Name="MenuBottom" XPos="171" YPos="213" Width="1" Height="3" /> + <Image Name="MenuMiddle" XPos="171" YPos="209" Width="1" Height="1" /> + <Image Name="PopupMenuFrameTopLeft" XPos="186" YPos="204" Width="2" Height="2" /> + <Image Name="PopupMenuFrameTopRight" XPos="195" YPos="204" Width="4" Height="2" /> + <Image Name="PopupMenuFrameBottomLeft" XPos="186" YPos="213" Width="2" Height="4" /> + <Image Name="PopupMenuFrameBottomRight" XPos="195" YPos="213" Width="4" Height="4" /> + <Image Name="PopupMenuFrameLeft" XPos="186" YPos="209" Width="2" Height="1" /> + <Image Name="PopupMenuFrameRight" XPos="195" YPos="209" Width="4" Height="1" /> + <Image Name="PopupMenuFrameTop" XPos="191" YPos="204" Width="1" Height="2" /> + <Image Name="PopupMenuFrameBottom" XPos="191" YPos="213" Width="1" Height="4" /> + <Image Name="PopupMenuMiddle" XPos="191" YPos="209" Width="1" Height="1" /> + <Image Name="PopupMenuArrowRight" XPos="179" YPos="204" Width="5" Height="5" /> + <Image Name="PopupMenuArrowLeft" XPos="179" YPos="210" Width="5" Height="5" /> +</Imageset> Added: trunk/perceptioncrash/data/gui/TaharezLook.looknfeel =================================================================== --- trunk/perceptioncrash/data/gui/TaharezLook.looknfeel (rev 0) +++ trunk/perceptioncrash/data/gui/TaharezLook.looknfeel 2006-05-24 19:51:36 UTC (rev 61) @@ -0,0 +1,3546 @@ +<?xml version="1.0" ?> +<Falagard> + <!-- + *************************************************** + TaharezLook/Button + *************************************************** + --> + <WidgetLook name="TaharezLook/Button"> + <PropertyDefinition name="VertLabelFormatting" initialValue="CentreAligned" /> + <PropertyDefinition name="HorzLabelFormatting" initialValue="CentreAligned" /> + <ImagerySection name="label"> + <TextComponent> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim> + </Area> + <VertFormatProperty name="VertLabelFormatting" /> + <HorzFormatProperty name="HorzLabelFormatting" /> + </TextComponent> + </ImagerySection> + <ImagerySection name="normal"> + <FrameComponent> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="TaharezLook" image="ButtonLeftNormal" /> + <Image type="RightEdge" imageset="TaharezLook" image="ButtonRightNormal" /> + <Image type="Background" imageset="TaharezLook" image="ButtonMiddleNormal" /> + </FrameComponent> + </ImagerySection> + <ImagerySection name="hover"> + <FrameComponent> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="TaharezLook" image="ButtonLeftHighlight" /> + <Image type="RightEdge" imageset="TaharezLook" image="ButtonRightHighlight" /> + <Image type="Background" imageset="TaharezLook" image="ButtonMiddleHighlight" /> + </FrameComponent> + </ImagerySection> + <ImagerySection name="pushed"> + <FrameComponent> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="TaharezLook" image="ButtonLeftPushed" /> + <Image type="RightEdge" imageset="TaharezLook" image="ButtonRightPushed" /> + <Image type="Background" imageset="TaharezLook" image="ButtonMiddlePushed" /> + </FrameComponent> + </ImagerySection> + <StateImagery name="Normal"> + <Layer> + <Section section="normal" /> + <Section section="label"> + <ColourProperty name="NormalTextColour" /> + </Section> + </Layer> + </StateImagery> + <StateImagery name="Hover"> + <Layer> + <Section section="hover" /> + <Section section="label"> + <ColourProperty name="HoverTextColour" /> + </Section> + </Layer> + </StateImagery> + <StateImagery name="Pushed"> + <Layer> + <Section section="pushed" /> + <Section section="label"> + <ColourProperty name="PushedTextColour" /> + </Section> + </Layer> + </StateImagery> + <StateImagery name="Disabled"> + <Layer> + <Section section="normal"> + <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" /> + </Section> + <Section section="label"> + <ColourProperty name="DisabledTextColour" /> + </Section> + </Layer> + </StateImagery> + </WidgetLook> + + <!-- + *************************************************** + TaharezLook/RadioButton + *************************************************** + --> + <WidgetLook name="TaharezLook/RadioButton"> + <ImagerySection name="label"> + <TextComponent> + <Area> + <Dim type="LeftEdge" > + <ImageDim imageset="TaharezLook" image="RadioButtonNormal" dimension="Width"> + <DimOperator op="Add"> + <AbsoluteDim value="3" /> + </DimOperator> + </ImageDim> + </Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="RightEdge" ><UnifiedDim scale="1" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim> + </Area> + <VertFormat type="CentreAligned" /> + <HorzFormat type="LeftAligned" /> + </TextComponent> + </ImagerySection> + <ImagerySection name="normal"> + <ImageryComponent> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim> + </Area> + <Image imageset="TaharezLook" image="RadioButtonNormal" /> + <VertFormat type="CentreAligned" /> + <HorzFormat type="LeftAligned" /> + </ImageryComponent> + </ImagerySection> + <ImagerySection name="hover"> + <ImageryComponent> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim> + </Area> + <Image imageset="TaharezLook" image="RadioButtonHover" /> + <VertFormat type="CentreAligned" /> + <HorzFormat type="LeftAligned" /> + </ImageryComponent> + </ImagerySection> + <ImagerySection name="select_mark"> + <ImageryComponent> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim> + </Area> + <Image imageset="TaharezLook" image="RadioButtonMark" /> + <VertFormat type="CentreAligned" /> + <HorzFormat type="LeftAligned" /> + </ImageryComponent> + </ImagerySection> + <StateImagery name="Normal"> + <Layer> + <Section section="normal" /> + <Section section="label"> + <ColourProperty name="NormalTextColour" /> + </Section> + </Layer> + </StateImagery> + <StateImagery name="Hover"> + <Layer> + <Section section="hover" /> + <Section section="label"> + <ColourProperty name="HoverTextColour" /> + </Section> + </Layer> + </StateImagery> + <StateImagery name="Disabled"> + <Layer> + <Section section="normal"> + <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" /> + </Section> + <Section section="label"> + <ColourProperty name="DisabledTextColour" /> + </Section> + </Layer> + </StateImagery> + <StateImagery name="SelectedNormal"> + <Layer> + <Section section="normal" /> + <Section section="select_mark" /> + <Section section="label"> + <ColourProperty name="NormalTextColour" /> + </Section> + </Layer> + </StateImagery> + <StateImagery name="SelectedHover"> + <Layer> + <Section section="hover" /> + <Section section="select_mark" /> + <Section section="label"> + <ColourProperty name="HoverTextColour" /> + </Section> + </Layer> + </StateImagery> + <StateImagery name="SelectedDisabled"> + <Layer> + <Section section="normal"> + <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" /> + </Section> + <Section section="select_mark"> + <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" /> + </Section> + <Section section="label"> + <ColourProperty name="DisabledTextColour" /> + </Section> + </Layer> + </StateImagery> + </WidgetLook> + + <!-- + *************************************************** + TaharezLook/Checkbox + *************************************************** + --> + <WidgetLook name="TaharezLook/Checkbox"> + <ImagerySection name="label"> + <TextComponent> + <Area> + <Dim type="LeftEdge" > + <ImageDim imageset="TaharezLook" image="CheckboxNormal" dimension="Width"> + <DimOperator op="Add"> + <AbsoluteDim value="3" /> + </DimOperator> + </ImageDim> + </Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="RightEdge" ><UnifiedDim scale="1" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim> + </Area> + <VertFormat type="CentreAligned" /> + <HorzFormat type="LeftAligned" /> + </TextComponent> + </ImagerySection> + <ImagerySection name="normal"> + <ImageryComponent> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim> + </Area> + <Image imageset="TaharezLook" image="CheckboxNormal" /> + <VertFormat type="CentreAligned" /> + <HorzFormat type="LeftAligned" /> + </ImageryComponent> + </ImagerySection> + <ImagerySection name="hover"> + <ImageryComponent> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim> + </Area> + <Image imageset="TaharezLook" image="CheckboxHover" /> + <VertFormat type="CentreAligned" /> + <HorzFormat type="LeftAligned" /> + </ImageryComponent> + </ImagerySection> + <ImagerySection name="select_mark"> + <ImageryComponent> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim> + </Area> + <Image imageset="TaharezLook" image="CheckboxMark" /> + <VertFormat type="CentreAligned" /> + <HorzFormat type="LeftAligned" /> + </ImageryComponent> + </ImagerySection> + <StateImagery name="Normal"> + <Layer> + <Section section="normal" /> + <Section section="label"> + <ColourProperty name="NormalTextColour" /> + </Section> + </Layer> + </StateImagery> + <StateImagery name="Hover"> + <Layer> + <Section section="hover" /> + <Section section="label"> + <ColourProperty name="HoverTextColour" /> + </Section> + </Layer> + </StateImagery> + <StateImagery name="Disabled"> + <Layer> + <Section section="normal"> + <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" /> + </Section> + <Section section="label"> + <ColourProperty name="DisabledTextColour" /> + </Section> + </Layer> + </StateImagery> + <StateImagery name="SelectedNormal"> + <Layer> + <Section section="normal" /> + <Section section="select_mark" /> + <Section section="label"> + <ColourProperty name="NormalTextColour" /> + </Section> + </Layer> + </StateImagery> + <StateImagery name="SelectedHover"> + <Layer> + <Section section="hover" /> + <Section section="select_mark" /> + <Section section="label"> + <ColourProperty name="HoverTextColour" /> + </Section> + </Layer> + </StateImagery> + <StateImagery name="SelectedDisabled"> + <Layer> + <Section section="normal"> + <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" /> + </Section> + <Section section="select_mark"> + <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" /> + </Section> + <Section section="label"> + <ColourProperty name="DisabledTextColour" /> + </Section> + </Layer> + </StateImagery> + </WidgetLook> + + <!-- + *************************************************** + TaharezLook/Editbox + *************************************************** + --> + <WidgetLook name="TaharezLook/Editbox"> + <Property name="MouseCursorImage" value="set:TaharezLook image:MouseTextBar" /> + <NamedArea name="TextArea"> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="5" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="5" /></Dim> + <Dim type="RightEdge" ><UnifiedDim scale="1.0" offset="-5" type="RightEdge" /></Dim> + <Dim type="BottomEdge" ><UnifiedDim scale="1.0" offset="-5" type="BottomEdge" /></Dim> + </Area> + </NamedArea> + <ImagerySection name="container_normal"> + <FrameComponent> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="TaharezLook" image="EditBoxLeft" /> + <Image type="RightEdge" imageset="TaharezLook" image="EditBoxRight" /> + <Image type="Background" imageset="TaharezLook" image="EditBoxMiddle" /> + </FrameComponent> + </ImagerySection> + <ImagerySection name="selection"> + <ImageryComponent> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="RightEdge" ><UnifiedDim scale="1.0" type="RightEdge" /></Dim> + <Dim type="BottomEdge" ><UnifiedDim scale="1.0" type="BottomEdge" /></Dim> + </Area> + <Image imageset="TaharezLook" image="TextSelectionBrush" /> + <VertFormat type="Stretched" /> + <HorzFormat type="Stretched" /> + </ImageryComponent> + </ImagerySection> + <ImagerySection name="Carat"> + <ImageryComponent> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="Width" ><ImageDim imageset="TaharezLook" image="EditBoxCarat" dimension="Width" /></Dim> + <Dim type="BottomEdge" ><UnifiedDim scale="1.0" type="BottomEdge" /></Dim> + </Area> + <Image imageset="TaharezLook" image="EditBoxCarat" /> + <VertFormat type="Stretched" /> + <HorzFormat type="Stretched" /> + </ImageryComponent> + </ImagerySection> + <StateImagery name="Enabled"> + <Layer> + <Section section="container_normal" /> + </Layer> + </StateImagery> + <StateImagery name="ReadOnly"> + <Layer> + <Section section="container_normal" /> + </Layer> + </StateImagery> + <StateImagery name="Disabled"> + <Layer> + <Section section="container_normal"> + <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" /> + </Section> + </Layer> + </StateImagery> + <StateImagery name="ActiveSelection"> + <Layer> + <Section section="selection"> + <ColourProperty name="ActiveSelectionColour" /> + </Section> + </Layer> + </StateImagery> + <StateImagery name="InactiveSelection"> + <Layer> + <Section section="selection"> + <ColourProperty name="InactiveSelectionColour" /> + </Section> + </Layer> + </StateImagery> + </WidgetLook> + + <!-- + *************************************************** + TaharezLook/Titlebar + *************************************************** + --> + <WidgetLook name="TaharezLook/Titlebar"> + <Property name="CaptionColour" value="FFFFFFFF" /> + <ImagerySection name="main"> + <ImageryComponent> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="Width" ><UnifiedDim scale="1.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image imageset="TaharezLook" image="NewTitlebarLeft" /> + <VertFormat type="Stretched" /> + </ImageryComponent> + <ImageryComponent> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="RightEdge" > + <UnifiedDim scale="1" type="RightEdge"> + <DimOperator op="Subtract"> + <ImageDim imageset="TaharezLook" image="SysAreaRight" dimension="Width"> + <DimOperator op="Add"> + <ImageDim imageset="TaharezLook" image="SysAreaMiddle" dimension="Width" /> + </DimOperator> + </ImageDim> + </DimOperator> + </UnifiedDim> + </Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image imageset="TaharezLook" image="NewTitlebarRight" /> + <VertFormat type="Stretched" /> + <HorzFormat type="RightAligned" /> + </ImageryComponent> + <ImageryComponent> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="RightEdge" > + <UnifiedDim scale="1" type="RightEdge"> + <DimOperator op="Subtract"> + <ImageDim imageset="TaharezLook" image="SysAreaRight" dimension="Width" /> + </DimOperator> + </UnifiedDim> + </Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image imageset="TaharezLook" image="SysAreaMiddle" /> + <VertFormat type="Stretched" /> + <HorzFormat type="RightAligned" /> + </ImageryComponent> + <ImageryComponent> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="Width" ><UnifiedDim scale="1.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image imageset="TaharezLook" image="SysAreaRight" /> + <VertFormat type="Stretched" /> + <HorzFormat type="RightAligned" /> + </ImageryComponent> + <ImageryComponent> + <Area> + <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="NewTitlebarLeft" dimension="Width" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="RightEdge" > + <UnifiedDim scale="1" type="RightEdge"> + <DimOperator op="Subtract"> + <ImageDim imageset="TaharezLook" image="SysAreaRight" dimension="Width"> + <DimOperator op="Add"> + <ImageDim imageset="TaharezLook" image="SysAreaMiddle" dimension="Width"> + <DimOperator op="Add"> + <ImageDim imageset="TaharezLook" image="NewTitlebarRight" dimension="Width" /> + </DimOperator> + </ImageDim> + </DimOperator> + </ImageDim> + </DimOperator> + </UnifiedDim> + </Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image imageset="TaharezLook" image="NewTitlebarMiddle" /> + <VertFormat type="Stretched" /> + <HorzFormat type="Stretched" /> + </ImageryComponent> + </ImagerySection> + <ImagerySection name="caption"> + <TextComponent> + <Area> + <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="NewTitlebarLeft" dimension="Width" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="Width" ><UnifiedDim scale="1" offset="-75" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim> + </Area> + <ColourProperty name="CaptionColour" /> + <VertFormat type="CentreAligned" /> + </TextComponent> + </ImagerySection> + <StateImagery name="Active"> + <Layer> + <Section section="main" /> + <Section section="caption" /> + </Layer> + </StateImagery> + <StateImagery name="Inactive"> + <Layer> + <Section section="main" /> + <Section section="caption" /> + </Layer> + </StateImagery> + <StateImagery name="Disabled"> + <Layer> + <Section section="main"> + <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" /> + </Section> + <Section section="caption"> + <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" /> + </Section> + </Layer> + </StateImagery> + </WidgetLook> + + <!-- + *************************************************** + TaharezLook/FrameWindow + *************************************************** + --> + <WidgetLook name="TaharezLook/FrameWindow"> + <Property name="NSSizingCursorImage" value="set:TaharezLook image:MouseNoSoCursor" /> + <Property name="EWSizingCursorImage" value="set:TaharezLook image:MouseEsWeCursor" /> + <Property name="NWSESizingCursorImage" value="set:TaharezLook image:MouseNwSeCursor" /> + <Property name="NESWSizingCursorImage" value="set:TaharezLook image:MouseNeSwCursor" /> + <NamedArea name="ClientWithTitleWithFrame"> + <Area> + <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="WindowTopLeft" dimension="Width" /></Dim> + <Dim type="TopEdge" ><WidgetDim widget="__auto_titlebar__" dimension="BottomEdge" /></Dim> + <Dim type="RightEdge" > + <UnifiedDim scale="1" type="RightEdge"> + <DimOperator op="Subtract"> + <ImageDim imageset="TaharezLook" image="WindowTopRight" dimension="Width" /> + </DimOperator> + </UnifiedDim> + </Dim> + <Dim type="BottomEdge" > + <UnifiedDim scale="1" type="BottomEdge"> + <DimOperator op="Subtract"> + <ImageDim imageset="TaharezLook" image="WindowBottomEdge" dimension="Height" /> + </DimOperator> + </UnifiedDim> + </Dim> + </Area> + </NamedArea> + <NamedArea name="ClientWithTitleNoFrame"> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><WidgetDim widget="__auto_titlebar__" dimension="BottomEdge" /></Dim> + <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim> + <Dim type="BottomEdge" ><WidgetDim dimension="BottomEdge" /></Dim> + </Area> + </NamedArea> + <NamedArea name="ClientNoTitleWithFrame"> + <Area> + <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="WindowTopLeft" dimension="Width" /></Dim> + <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="WindowTopEdge" dimension="Height" /></Dim> + <Dim type="RightEdge" > + <UnifiedDim scale="1" type="RightEdge"> + <DimOperator op="Subtract"> + <ImageDim imageset="TaharezLook" image="WindowTopRight" dimension="Width" /> + </DimOperator> + </UnifiedDim> + </Dim> + <Dim type="BottomEdge" > + <UnifiedDim scale="1" type="BottomEdge"> + <DimOperator op="Subtract"> + <ImageDim imageset="TaharezLook" image="WindowBottomEdge" dimension="Height" /> + </DimOperator> + </UnifiedDim> + </Dim> + </Area> + </NamedArea> + <NamedArea name="ClientNoTitleNoFrame"> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim> + </Area> + </NamedArea> + <Child type="TaharezLook/Titlebar" nameSuffix="__auto_titlebar__"> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim> + <Dim type="Height" ><FontDim type="LineSpacing" padding="8" /></Dim> + </Area> + <Property name="AlwaysOnTop" value="False" /> + </Child> + <Child type="TaharezLook/SystemButton" nameSuffix="__auto_closebutton__"> + <Area> + <Dim type="LeftEdge" > + <UnifiedDim scale="1" type="LeftEdge"> + <DimOperator op="Subtract"> + <ImageDim imageset="TaharezLook" image="SysAreaRight" dimension="Width"> + <DimOperator op="Add"> + <ImageDim imageset="TaharezLook" image="SysAreaMiddle" dimension="Width" /> + </DimOperator> + </ImageDim> + </DimOperator> + </UnifiedDim> + </Dim> + <Dim type="TopEdge" > + <AbsoluteDim value="0.5"> + <DimOperator op="Multiply"> + <WidgetDim widget="__auto_titlebar__" dimension="Height"> + <DimOperator op="Subtract"> + <ImageDim imageset="TaharezLook" image="NewCloseButtonNormal" dimension="Width" /> + </DimOperator> + </WidgetDim> + </DimOperator> + </AbsoluteDim> + </Dim> + <Dim type="Width" ><ImageDim imageset="TaharezLook" image="NewCloseButtonNormal" dimension="Width" /></Dim> + <Dim type="Height" ><ImageDim imageset="TaharezLook" image="NewCloseButtonNormal" dimension="Width" /></Dim> + </Area> + <Property name="AlwaysOnTop" value="True" /> + <Property name="UseStandardImagery" value="False" /> + <Property name="NormalImage" value="set:TaharezLook image:NewCloseButtonNormal" /> + <Property name="HoverImage" value="set:TaharezLook image:NewCloseButtonHover" /> + <Property name="PushedImage" value="set:TaharezLook image:NewCloseButtonPressed" /> + </Child> + <ImagerySection name="withtitle_frame"> + <FrameComponent> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><WidgetDim widget="__auto_titlebar__" dimension="BottomEdge" /></Dim> + <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim> + <Dim type="BottomEdge" ><UnifiedDim scale="1" type="BottomEdge" /></Dim> + </Area> + <Image type="BottomLeftCorner" imageset="TaharezLook" image="WindowBottomLeft" /> + <Image type="BottomRightCorner" imageset="TaharezLook" image="WindowBottomRight" /> + <Image type="LeftEdge" imageset="TaharezLook" image="WindowLeftEdge" /> + <Image type="RightEdge" imageset="TaharezLook" image="WindowRightEdge" /> + <Image type="BottomEdge" imageset="TaharezLook" image="WindowBottomEdge" /> + <Image type="Background" imageset="TaharezLook" image="ClientBrush" /> + <VertFormat type="Tiled" /> + <HorzFormat type="Tiled" /> + </FrameComponent> + </ImagerySection> + <ImagerySection name="notitle_frame"> + <FrameComponent> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim> + </Area> + <Image type="TopLeftCorner" imageset="TaharezLook" image="WindowTopLeft" /> + <Image type="TopRightCorner" imageset="TaharezLook" image="WindowTopRight" /> + <Image type="BottomLeftCorner" imageset="TaharezLook" image="WindowBottomLeft" /> + <Image type="BottomRightCorner" imageset="TaharezLook" image="WindowBottomRight" /> + <Image type="LeftEdge" imageset="TaharezLook" image="WindowLeftEdge" /> + <Image type="RightEdge" imageset="TaharezLook" image="WindowRightEdge" /> + <Image type="BottomEdge" imageset="TaharezLook" image="WindowBottomEdge" /> + ... [truncated message content] |
|
From: <xs...@us...> - 2006-05-23 23:04:37
|
Revision: 60 Author: xsdwx Date: 2006-05-23 16:04:31 -0700 (Tue, 23 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=60&view=rev Log Message: ----------- -Changed the InputController interface and implementation around. -Entities should now store a pointer to what button they need input from. -REMOVED update() from InputControllers. -renamed removeInputController to destroyInputController to match createInputController. -Added some hard-coded input buttons to GameManager.cpp Modified Paths: -------------- trunk/perceptioncrash/src/GameManager.cpp trunk/perceptioncrash/src/InputController.hpp trunk/perceptioncrash/src/InputManager.cpp trunk/perceptioncrash/src/InputManager.hpp trunk/perceptioncrash/src/KeyboardMouseInputController.cpp trunk/perceptioncrash/src/KeyboardMouseInputController.hpp Modified: trunk/perceptioncrash/src/GameManager.cpp =================================================================== --- trunk/perceptioncrash/src/GameManager.cpp 2006-05-22 23:39:47 UTC (rev 59) +++ trunk/perceptioncrash/src/GameManager.cpp 2006-05-23 23:04:31 UTC (rev 60) @@ -5,6 +5,9 @@ #include "InputManager.hpp" #include "GameState.hpp" +// TODO Temporary! See message below +#include "KeyboardMouseInputController.hpp" + template<> GameManager* Ogre::Singleton<GameManager>::ms_Singleton = 0; GameManager::GameManager() @@ -44,10 +47,18 @@ mInputManager = new InputManager(mRoot->getAutoCreatedWindow()); mInputController = mInputManager->createController("default"); mInputController->addEventListener(this); - //mInputManager->getEventProcessor()->addKeyListener(this); - //mInputManager->getEventProcessor()->addMouseMotionListener(this); + // TODO Temporary! This will be configured normally with XML configuration file + KeyboardMouseInputController* kbnm = dynamic_cast<KeyboardMouseInputController*>(mInputController); + if ( kbnm ) + { + kbnm->createKeyboardInputButton("select", Ogre::KC_SPACE); + kbnm->createKeyboardInputButton("pause", Ogre::KC_P); + kbnm->createKeyboardInputButton("back", Ogre::KC_ESCAPE); + kbnm->createKeyboardInputButton("move_down", Ogre::KC_DOWN); + } + mDebugPanelOverlay = Ogre::OverlayManager::getSingleton().getByName("Core/DebugOverlay"); changeState(state); @@ -208,9 +219,6 @@ bool GameManager::frameStarted(const Ogre::FrameEvent& evt) { - // update controllers - mInputManager->updateAllControllers(); - // call frameStarted of current state return mStates.back()->frameStarted(evt); } Modified: trunk/perceptioncrash/src/InputController.hpp =================================================================== --- trunk/perceptioncrash/src/InputController.hpp 2006-05-22 23:39:47 UTC (rev 59) +++ trunk/perceptioncrash/src/InputController.hpp 2006-05-23 23:04:31 UTC (rev 60) @@ -6,16 +6,17 @@ class InputControllerListener; class InputControllerEvent; +class InputButton; class InputController { public: virtual ~InputController() { } - + typedef std::string Button; - - virtual bool isButtonDown(Button button) = 0; + virtual InputButton* getInputButton(const Button& button) = 0; + virtual void addEventListener(InputControllerListener* l) { /// @todo Check to make sure 'l' isn't already registered @@ -29,11 +30,7 @@ icl->erase(std::remove(icl->begin(), icl->end(), l)); } - // For controllers that need to update there state every frame - virtual void update() { } - protected: - std::map<Button, bool> mButtonStates; std::vector<InputControllerListener*> mInputControllerListeners; }; @@ -48,15 +45,27 @@ class InputControllerEvent { public: - InputControllerEvent(InputController::Button& button) + InputControllerEvent(const InputController::Button& button) { mButton = button; } - InputController::Button getButton() + const InputController::Button& getButton() const { return mButton; } private: InputController::Button mButton; }; +class InputButton { + public: + InputButton() : mDown(false) { } + bool isDown() const + { return mDown; } + void setDown(bool down) + { mDown = down; } + + protected: + bool mDown; +}; + #endif /* PC_INPUT_CONTROLLER_HPP */ Modified: trunk/perceptioncrash/src/InputManager.cpp =================================================================== --- trunk/perceptioncrash/src/InputManager.cpp 2006-05-22 23:39:47 UTC (rev 59) +++ trunk/perceptioncrash/src/InputManager.cpp 2006-05-23 23:04:31 UTC (rev 60) @@ -49,7 +49,7 @@ } void -InputManager::removeController(std::string name) +InputManager::destroyController(std::string name) { std::map<std::string, InputController*>::iterator iter = mControllers.find(name); if ( iter != mControllers.end() ) @@ -69,13 +69,3 @@ throw std::runtime_error("Controller '" + name + "' does not exist"); } - -void -InputManager::updateAllControllers() -{ - std::map<std::string, InputController*>::iterator i; - for (i = mControllers.begin(); i != mControllers.end(); ++i) - { - i->second->update(); - } -} Modified: trunk/perceptioncrash/src/InputManager.hpp =================================================================== --- trunk/perceptioncrash/src/InputManager.hpp 2006-05-22 23:39:47 UTC (rev 59) +++ trunk/perceptioncrash/src/InputManager.hpp 2006-05-23 23:04:31 UTC (rev 60) @@ -21,9 +21,8 @@ { return mEventProcessor; } InputController* createController(std::string name); - void removeController(std::string name); + void destroyController(std::string name); InputController* getController(std::string name); - void updateAllControllers(); private: Ogre::EventProcessor* mEventProcessor; Modified: trunk/perceptioncrash/src/KeyboardMouseInputController.cpp =================================================================== --- trunk/perceptioncrash/src/KeyboardMouseInputController.cpp 2006-05-22 23:39:47 UTC (rev 59) +++ trunk/perceptioncrash/src/KeyboardMouseInputController.cpp 2006-05-23 23:04:31 UTC (rev 60) @@ -26,17 +26,62 @@ KeyboardMouseInputController::~KeyboardMouseInputController() { + std::map<Button, KeyboardInputButton*>::iterator i; + for ( i = mKeyboardButtons.begin(); i != mKeyboardButtons.end(); ++i ) + { + delete i->second; + } + + std::map<Button, MouseInputButton*>::iterator j; + for ( j = mMouseButtons.begin(); j != mMouseButtons.end(); ++j ) + { + delete j->second; + } + InputManager* inputManager = InputManager::getSingletonPtr(); inputManager->getEventProcessor()->removeKeyListener(this); inputManager->getEventProcessor()->removeMouseMotionListener(this); } -bool -KeyboardMouseInputController::isButtonDown(Button button) +InputButton* +KeyboardMouseInputController::getInputButton(const Button& button) { - return mButtonStates[button]; + if ( mKeyboardButtons.find(button) != mKeyboardButtons.end() ) + { + return mKeyboardButtons[button]; + } + else if ( mMouseButtons.find(button) != mMouseButtons.end() ) + { + return mMouseButtons[button]; + } + + throw std::runtime_error("InputButton '" + button + "' does not exist"); } +InputButton* +KeyboardMouseInputController::createKeyboardInputButton(const Button& button, int keycode) +{ + if ( mMouseButtons.find(button) == mMouseButtons.end() && + mKeyboardButtons.find(button) == mKeyboardButtons.end() ) + { + return mKeyboardButtons[button] = new KeyboardInputButton(keycode); + } + + throw std::runtime_error("InputButton '" + button + "' already exists"); +} + +InputButton* +KeyboardMouseInputController::createMouseInputButton(const Button& button, int buttoncode) +{ + if ( mMouseButtons.find(button) == mMouseButtons.end() && + mKeyboardButtons.find(button) == mKeyboardButtons.end() ) + { + return mMouseButtons[button] = new MouseInputButton(buttoncode); + } + + throw std::runtime_error("InputButton '" + button + "' already exists"); +} + void KeyboardMouseInputController::keyClicked(Ogre::KeyEvent* e) { @@ -46,9 +91,9 @@ KeyboardMouseInputController::keyPressed(Ogre::KeyEvent* e) { /// @todo less code repetition in these event functions - - std::vector<Button> pressed; + /*std::vector<Button> pressed; + // Build a list of pushed buttons (single keys can map to more than one // button) and update button states for (std::multimap<int, Button>::iterator i = mKeyboardMap.begin(); @@ -69,13 +114,29 @@ { (*j)->buttonPressed(&event); } + }*/ + + std::map<Button, KeyboardInputButton*>::iterator i; + for (i = mKeyboardButtons.begin(); i != mKeyboardButtons.end(); ++i) + { + if ( e->getKey() == i->second->getKeyCode() ) + { + i->second->setDown(true); + + InputControllerEvent event(i->first); + std::vector<InputControllerListener*>::iterator j; + for (j = mInputControllerListeners.begin(); j != mInputControllerListeners.end(); j++) + { + (*j)->buttonPressed(&event); + } + } } } void KeyboardMouseInputController::keyReleased(Ogre::KeyEvent* e) { - std::vector<Button> released; + /*std::vector<Button> released; // Build a list of pushed buttons (single keys can map to more than one // button) and update button states @@ -97,6 +158,22 @@ { (*j)->buttonReleased(&event); } + }*/ + + std::map<Button, KeyboardInputButton*>::iterator i; + for (i = mKeyboardButtons.begin(); i != mKeyboardButtons.end(); ++i) + { + if ( e->getKey() == i->second->getKeyCode() ) + { + i->second->setDown(false); + + InputControllerEvent event(i->first); + std::vector<InputControllerListener*>::iterator j; + for (j = mInputControllerListeners.begin(); j != mInputControllerListeners.end(); j++) + { + (*j)->buttonReleased(&event); + } + } } } @@ -118,7 +195,7 @@ void KeyboardMouseInputController::mousePressed(Ogre::MouseEvent* e) { - std::vector<Button> pressed; + /*std::vector<Button> pressed; // Build a list of pushed buttons (a single mouse button can map to more // than one button) and update button states @@ -140,13 +217,29 @@ { (*j)->buttonPressed(&event); } + }*/ + + std::map<Button, MouseInputButton*>::iterator i; + for (i = mMouseButtons.begin(); i != mMouseButtons.end(); ++i) + { + if ( e->getButtonID() == i->second->getButtonCode() ) + { + i->second->setDown(true); + + InputControllerEvent event(i->first); + std::vector<InputControllerListener*>::iterator j; + for (j = mInputControllerListeners.begin(); j != mInputControllerListeners.end(); j++) + { + (*j)->buttonPressed(&event); + } + } } } void KeyboardMouseInputController::mouseReleased(Ogre::MouseEvent* e) { - std::vector<Button> released; + /*std::vector<Button> released; // Build a list of pushed buttons (a single mouse button can map to more // than one button) and update button states @@ -168,6 +261,22 @@ { (*j)->buttonReleased(&event); } + }*/ + + std::map<Button, MouseInputButton*>::iterator i; + for (i = mMouseButtons.begin(); i != mMouseButtons.end(); ++i) + { + if ( e->getButtonID() == i->second->getButtonCode() ) + { + i->second->setDown(false); + + InputControllerEvent event(i->first); + std::vector<InputControllerListener*>::iterator j; + for (j = mInputControllerListeners.begin(); j != mInputControllerListeners.end(); j++) + { + (*j)->buttonReleased(&event); + } + } } } Modified: trunk/perceptioncrash/src/KeyboardMouseInputController.hpp =================================================================== --- trunk/perceptioncrash/src/KeyboardMouseInputController.hpp 2006-05-22 23:39:47 UTC (rev 59) +++ trunk/perceptioncrash/src/KeyboardMouseInputController.hpp 2006-05-23 23:04:31 UTC (rev 60) @@ -8,6 +8,9 @@ #include "InputController.hpp" #include "Factory.hpp" +class KeyboardInputButton; +class MouseInputButton; + class KeyboardMouseInputController : public InputController, public Ogre::KeyListener, public Ogre::MouseListener, @@ -17,9 +20,11 @@ KeyboardMouseInputController(); KeyboardMouseInputController(TiXmlElement* node); ~KeyboardMouseInputController(); - - bool isButtonDown(Button button); + InputButton* getInputButton(const Button& button); + InputButton* createKeyboardInputButton(const Button& button, int keycode); + InputButton* createMouseInputButton(const Button& button, int buttoncode); + protected: /** Ogre::KeyListener keyClicked event */ void keyClicked(Ogre::KeyEvent* e); @@ -47,9 +52,36 @@ void mouseDragMoved(Ogre::MouseEvent* e); private: - std::multimap<int, Button> mKeyboardMap; - std::multimap<int, Button> mMouseMap; + std::map<Button, KeyboardInputButton*> mKeyboardButtons; + std::map<Button, MouseInputButton*> mMouseButtons; }; +class KeyboardInputButton : public InputButton +{ + public: + KeyboardInputButton(int keycode) : mKeyCode(keycode) { } + void changeKey(int key) + { mKeyCode = key; } + int getKeyCode() const + { return mKeyCode; } + + private: + int mKeyCode; +}; + +class MouseInputButton : public InputButton +{ + public: + MouseInputButton(int buttoncode) : mButtonCode(buttoncode) { } + + void changeButtonCode(int button) + { mButtonCode = button; } + int getButtonCode() const + { return mButtonCode; } + + private: + int mButtonCode; +}; + #endif /* PC_KEYBOARD_MOUSE_INPUT_CONTROLLER_HPP */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sik...@us...> - 2006-05-22 23:40:00
|
Revision: 59 Author: sik0fewl Date: 2006-05-22 16:39:47 -0700 (Mon, 22 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=59&view=rev Log Message: ----------- Abstract Factory class. Still needs some work. Modified Paths: -------------- trunk/perceptioncrash/src/KeyboardMouseInputController.cpp trunk/perceptioncrash/src/KeyboardMouseInputController.hpp Added Paths: ----------- trunk/perceptioncrash/src/Factory.hpp Added: trunk/perceptioncrash/src/Factory.hpp =================================================================== --- trunk/perceptioncrash/src/Factory.hpp (rev 0) +++ trunk/perceptioncrash/src/Factory.hpp 2006-05-22 23:39:47 UTC (rev 59) @@ -0,0 +1,61 @@ +#ifndef PC_FACTORY_HPP +#define PC_FACTORY_HPP + +#include <map> +#include <string> +#include <stdexcept> + +#include "tinyxml/tinyxml.h" + +template <typename T> +class Factory +{ + public: + typedef T*(*CreatorFuncPtr)(); + + private: + typedef std::map<std::string, CreatorFuncPtr> CreatorMap; + CreatorMap creators; + + public: + void register_(std::string const &id, CreatorFuncPtr creator) + { + creators.insert(std::make_pair(id, creator)); + } + + T* create(std::string const &id) + { + typename CreatorMap::iterator i = creators.find(id); + + if (i != creators.end()) + return i->second(); + else + throw std::runtime_error("Factory for '" + id + "' does not exist"); + } +}; + +template <typename T> Factory<T>& factory() +{ + static Factory<T> factory_; + return factory_; +} + +template <typename T, typename U> T* +new_creator() +{ + return new U; +} + +template <typename T, typename U> +struct RegisterFactory +{ + typedef Factory<T> FactoryType; + + RegisterFactory(std::string const &id) + { + factory<T>().register_(id, static_cast<T* (*)()>(&new_creator<T, U>)); + } +}; + + +#endif /* PC_FACTORY_HPP */ Property changes on: trunk/perceptioncrash/src/Factory.hpp ___________________________________________________________________ Name: svn:keywords + Id Name: svn:eol-style + native Modified: trunk/perceptioncrash/src/KeyboardMouseInputController.cpp =================================================================== --- trunk/perceptioncrash/src/KeyboardMouseInputController.cpp 2006-05-22 08:22:17 UTC (rev 58) +++ trunk/perceptioncrash/src/KeyboardMouseInputController.cpp 2006-05-22 23:39:47 UTC (rev 59) @@ -1,7 +1,13 @@ #include <Ogre.h> +#include <iostream> + #include "KeyboardMouseInputController.hpp" +namespace { + RegisterFactory<InputController, KeyboardMouseInputController> KeyboardMouseInputControllerFactory("KeyboardMouseInputController"); +} + KeyboardMouseInputController::KeyboardMouseInputController() { /// @todo this can be implemented with events(current) or unbuffered input. @@ -9,9 +15,13 @@ InputManager* inputManager = InputManager::getSingletonPtr(); inputManager->getEventProcessor()->addKeyListener(this); inputManager->getEventProcessor()->addMouseMotionListener(this); +} - /// @todo Remove this. This is just for testing. - mKeyboardMap.insert(std::pair<int, Button>(Ogre::KC_SPACE, "select")); +KeyboardMouseInputController::KeyboardMouseInputController(TiXmlElement* node) +{ + KeyboardMouseInputController(); + + // create from xml node } KeyboardMouseInputController::~KeyboardMouseInputController() Modified: trunk/perceptioncrash/src/KeyboardMouseInputController.hpp =================================================================== --- trunk/perceptioncrash/src/KeyboardMouseInputController.hpp 2006-05-22 08:22:17 UTC (rev 58) +++ trunk/perceptioncrash/src/KeyboardMouseInputController.hpp 2006-05-22 23:39:47 UTC (rev 59) @@ -6,6 +6,7 @@ #include "InputManager.hpp" #include "InputController.hpp" +#include "Factory.hpp" class KeyboardMouseInputController : public InputController, public Ogre::KeyListener, @@ -14,6 +15,7 @@ { public: KeyboardMouseInputController(); + KeyboardMouseInputController(TiXmlElement* node); ~KeyboardMouseInputController(); bool isButtonDown(Button button); @@ -49,4 +51,5 @@ std::multimap<int, Button> mMouseMap; }; + #endif /* PC_KEYBOARD_MOUSE_INPUT_CONTROLLER_HPP */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sik...@us...> - 2006-05-22 08:22:33
|
Revision: 58 Author: sik0fewl Date: 2006-05-22 01:22:17 -0700 (Mon, 22 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=58&view=rev Log Message: ----------- New input system - Mouse motion events still don't work - buttons still need to be mapped. We'll need to discuss this a bit, I think Modified Paths: -------------- trunk/perceptioncrash/src/GameManager.cpp trunk/perceptioncrash/src/GameManager.hpp trunk/perceptioncrash/src/GameState.hpp trunk/perceptioncrash/src/InputController.hpp trunk/perceptioncrash/src/InputManager.cpp trunk/perceptioncrash/src/IntroState.cpp trunk/perceptioncrash/src/IntroState.hpp trunk/perceptioncrash/src/PauseState.cpp trunk/perceptioncrash/src/PauseState.hpp trunk/perceptioncrash/src/PlayState.cpp trunk/perceptioncrash/src/PlayState.hpp Added Paths: ----------- trunk/perceptioncrash/src/KeyboardMouseInputController.cpp trunk/perceptioncrash/src/KeyboardMouseInputController.hpp Removed Paths: ------------- trunk/perceptioncrash/src/InputController.cpp Modified: trunk/perceptioncrash/src/GameManager.cpp =================================================================== --- trunk/perceptioncrash/src/GameManager.cpp 2006-05-21 19:22:25 UTC (rev 57) +++ trunk/perceptioncrash/src/GameManager.cpp 2006-05-22 08:22:17 UTC (rev 58) @@ -42,8 +42,10 @@ mRoot->addFrameListener(this); mInputManager = new InputManager(mRoot->getAutoCreatedWindow()); - mInputManager->getEventProcessor()->addKeyListener(this); - mInputManager->getEventProcessor()->addMouseMotionListener(this); + mInputController = mInputManager->createController("default"); + mInputController->addEventListener(this); + //mInputManager->getEventProcessor()->addKeyListener(this); + //mInputManager->getEventProcessor()->addMouseMotionListener(this); mDebugPanelOverlay = Ogre::OverlayManager::getSingleton().getByName("Core/DebugOverlay"); @@ -163,30 +165,23 @@ } void -GameManager::keyClicked(Ogre::KeyEvent* e) +GameManager::buttonPressed(InputControllerEvent* e) { - // call keyClicked of current state - mStates.back()->keyClicked(e); -} - -void -GameManager::keyPressed(Ogre::KeyEvent* e) -{ // Stateless code: - if (e->getKey() == Ogre::KC_F12) + if (e->getButton() == "toggle_fps") { toggleDebugPanelOverlay(); } - // call keyPressed of current state - mStates.back()->keyPressed(e); + // call buttonPressed of current state + mStates.back()->buttonPressed(e); } void -GameManager::keyReleased(Ogre::KeyEvent* e) +GameManager::buttonReleased(InputControllerEvent* e) { - // call keyReleased of current state - mStates.back()->keyReleased(e); + // call buttonReleased of current state + mStates.back()->buttonReleased(e); } void @@ -213,6 +208,9 @@ bool GameManager::frameStarted(const Ogre::FrameEvent& evt) { + // update controllers + mInputManager->updateAllControllers(); + // call frameStarted of current state return mStates.back()->frameStarted(evt); } Modified: trunk/perceptioncrash/src/GameManager.hpp =================================================================== --- trunk/perceptioncrash/src/GameManager.hpp 2006-05-21 19:22:25 UTC (rev 57) +++ trunk/perceptioncrash/src/GameManager.hpp 2006-05-22 08:22:17 UTC (rev 58) @@ -7,14 +7,14 @@ #include <OgreSingleton.h> #include "InputManager.hpp" +#include "InputController.hpp" class GameState; /** Main game class. */ class GameManager : public Ogre::FrameListener, - public Ogre::KeyListener, - public Ogre::MouseMotionListener, + public InputControllerListener, public Ogre::Singleton<GameManager> { public: @@ -93,24 +93,24 @@ static GameManager* getSingletonPtr(void); protected: - /** OGRE Root */ + /** Ogre Root */ Ogre::Root* mRoot; /** Render window */ Ogre::RenderWindow* mRenderWindow; /** Input manager */ InputManager* mInputManager; + /** Controller */ + InputController* mInputController; /** Setup resource locations */ void setupResources(void); /** Configure OGRE */ bool configure(void); - /** Ogre::KeyListener keyClicked event */ - void keyClicked(Ogre::KeyEvent* e); /** Ogre::KeyListener keyPressed event */ - void keyPressed(Ogre::KeyEvent* e); + void buttonPressed(InputControllerEvent* e); /** Ogre::KeyListener keyReleased event */ - void keyReleased(Ogre::KeyEvent* e); + void buttonReleased(InputControllerEvent* e); /** Ogre::MouseMotionListener mouseMoved event */ void mouseMoved(Ogre::MouseEvent* e); Modified: trunk/perceptioncrash/src/GameState.hpp =================================================================== --- trunk/perceptioncrash/src/GameState.hpp 2006-05-21 19:22:25 UTC (rev 57) +++ trunk/perceptioncrash/src/GameState.hpp 2006-05-22 08:22:17 UTC (rev 58) @@ -16,9 +16,8 @@ virtual void pause() = 0; virtual void resume() = 0; - virtual void keyClicked(Ogre::KeyEvent* e) { } - virtual void keyPressed(Ogre::KeyEvent* e) { } - virtual void keyReleased(Ogre::KeyEvent* e) { } + virtual void buttonPressed(InputControllerEvent* e) { } + virtual void buttonReleased(InputControllerEvent* e) { } virtual void mouseMoved(Ogre::MouseEvent* e) { } virtual void mouseDragged(Ogre::MouseEvent* e) { } Deleted: trunk/perceptioncrash/src/InputController.cpp =================================================================== --- trunk/perceptioncrash/src/InputController.cpp 2006-05-21 19:22:25 UTC (rev 57) +++ trunk/perceptioncrash/src/InputController.cpp 2006-05-22 08:22:17 UTC (rev 58) @@ -1,79 +0,0 @@ -#include "InputController.hpp" -#include "InputManager.hpp" - -InputController::~InputController() -{ - std::map<std::string, InputControllerButton*>::iterator i; - for (i = mButtons.begin(); i != mButtons.end(); ++i) - { - delete i->second; - } -} - -void -InputController::update() -{ - Ogre::InputReader* inpReader = InputManager::getSingleton().getInputDevice(); - inpReader->capture(); - - std::map<std::string, InputControllerButton*>::iterator i; - for (i = mButtons.begin(); i != mButtons.end(); ++i) - { - if ( i->second->getButtonType() == BT_KEYBOARD ) - { - i->second->setDown( inpReader->isKeyDown(static_cast<Ogre::KeyCode>(i->second->getButton())) ); - } - else if ( i->second->getButtonType() == BT_MOUSE ) - { - i->second->setDown( inpReader->getMouseButton(i->second->getButton()) ); - } - } -} -InputControllerButton* -InputController::registerButton(std::string name, int button, int type) -{ - if ( mButtons.find(name) == mButtons.end() ) - { - return mButtons[name] = new InputControllerButton(button, type); - } - - return 0; -} - -void -InputController::unregisterButton(std::string name) -{ - std::map<std::string, InputControllerButton*>::iterator i = mButtons.find(name); - if ( i != mButtons.end() ) - { - delete i->second; - mButtons.erase(i); - } -} - -InputControllerButton* -InputController::getButton(std::string name) -{ - std::map<std::string, InputControllerButton*>::iterator i = mButtons.find(name); - if ( i != mButtons.end() ) - { - return i->second; - } - - return 0; -} - -InputControllerButton* -InputController::getButton(int button) -{ - std::map<std::string, InputControllerButton*>::iterator i; - for (i = mButtons.begin(); i != mButtons.end(); ++i) - { - if ( i->second->getButton() == button ) - { - return i->second; - } - } - - return 0; -} Modified: trunk/perceptioncrash/src/InputController.hpp =================================================================== --- trunk/perceptioncrash/src/InputController.hpp 2006-05-21 19:22:25 UTC (rev 57) +++ trunk/perceptioncrash/src/InputController.hpp 2006-05-22 08:22:17 UTC (rev 58) @@ -4,51 +4,59 @@ #include <map> #include <string> -enum BUTTON_TYPE -{ - BT_KEYBOARD = 0, - BT_MOUSE -}; +class InputControllerListener; +class InputControllerEvent; -class InputControllerButton +class InputController { public: - InputControllerButton(int button, int type) - : mDown(false), mButton(button), mButtonType(type) { } + virtual ~InputController() { } + + typedef std::string Button; + + virtual bool isButtonDown(Button button) = 0; - bool isDown() const - { return mDown; } - void setDown(bool value) - { mDown = value; } + virtual void addEventListener(InputControllerListener* l) + { + /// @todo Check to make sure 'l' isn't already registered + mInputControllerListeners.push_back(l); + } - int getButton() const - { return mButton; } - int getButtonType() const - { return mButtonType; } + virtual void removeEventListener(InputControllerListener* l) + { + /// @todo throw exception if listener isn't in list + std::vector<InputControllerListener*>* icl = &mInputControllerListeners; + icl->erase(std::remove(icl->begin(), icl->end(), l)); + } - private: - bool mDown; + // For controllers that need to update there state every frame + virtual void update() { } - int mButton; - int mButtonType; + protected: + std::map<Button, bool> mButtonStates; + std::vector<InputControllerListener*> mInputControllerListeners; }; -class InputController +class InputControllerListener { public: - InputController() { } - ~InputController(); + virtual ~InputControllerListener() { } + virtual void buttonPressed(InputControllerEvent* e) = 0; + virtual void buttonReleased(InputControllerEvent* e) = 0; +}; - void update(); +class InputControllerEvent +{ + public: + InputControllerEvent(InputController::Button& button) + { mButton = button; } - InputControllerButton* registerButton(std::string name, int button, int type = 0); - void unregisterButton(std::string name); + InputController::Button getButton() + { return mButton; } - InputControllerButton* getButton(std::string name); - InputControllerButton* getButton(int button); - private: - std::map<std::string, InputControllerButton*> mButtons; + InputController::Button mButton; }; + #endif /* PC_INPUT_CONTROLLER_HPP */ Modified: trunk/perceptioncrash/src/InputManager.cpp =================================================================== --- trunk/perceptioncrash/src/InputManager.cpp 2006-05-21 19:22:25 UTC (rev 57) +++ trunk/perceptioncrash/src/InputManager.cpp 2006-05-22 08:22:17 UTC (rev 58) @@ -1,3 +1,5 @@ +#include <stdexcept> + #include <OgreEventProcessor.h> #include <OgrePlatformManager.h> @@ -2,2 +4,3 @@ #include "InputManager.hpp" +#include "KeyboardMouseInputController.hpp" @@ -39,11 +42,10 @@ { if ( mControllers.find(name) == mControllers.end() ) { - return mControllers[name] = new InputController(); + return mControllers[name] = new KeyboardMouseInputController(); } - // Name collision, return - return 0; + throw std::runtime_error("Controller '" + name + "' already exists"); } void @@ -65,7 +67,7 @@ return mControllers[name]; } - return 0; + throw std::runtime_error("Controller '" + name + "' does not exist"); } void Modified: trunk/perceptioncrash/src/IntroState.cpp =================================================================== --- trunk/perceptioncrash/src/IntroState.cpp 2006-05-21 19:22:25 UTC (rev 57) +++ trunk/perceptioncrash/src/IntroState.cpp 2006-05-22 08:22:17 UTC (rev 58) @@ -1,5 +1,4 @@ #include <Ogre.h> -#include <OgreKeyEvent.h> #include "IntroState.hpp" #include "PlayState.hpp" @@ -9,7 +8,6 @@ void IntroState::enter() { - mInputDevice = InputManager::getSingletonPtr()->getInputDevice(); mRoot = Ogre::Root::getSingletonPtr(); mSceneMgr = mRoot->createSceneManager(Ogre::ST_GENERIC); @@ -22,14 +20,6 @@ mLogoOverlay->show(); mExitGame = false; - - mInputController = InputManager::getSingletonPtr()->createController("default"); - if ( !mInputController ) - mInputController = InputManager::getSingletonPtr()->getController("default"); - - mButton_StartGame = mInputController->registerButton("start_game", Ogre::KC_A); - if ( !mButton_StartGame ) - mButton_StartGame = mInputController->getButton("start_game"); } void @@ -55,38 +45,27 @@ } void -IntroState::keyClicked(Ogre::KeyEvent* e) +IntroState::buttonPressed(InputControllerEvent* e) { -} - -void -IntroState::keyPressed(Ogre::KeyEvent* e) -{ - if (e->getKey() == Ogre::KC_SPACE) + if (e->getButton() == "select") { changeState(PlayState::getInstance()); } - if (e->getKey() == Ogre::KC_ESCAPE) + if (e->getButton() == "back") { mExitGame = true; } } void -IntroState::keyReleased(Ogre::KeyEvent* e) +IntroState::buttonReleased(InputControllerEvent* e) { } bool IntroState::frameStarted(const Ogre::FrameEvent& evt) { - InputManager::getSingletonPtr()->updateAllControllers(); - if ( mButton_StartGame->isDown() ) - { - Ogre::LogManager::getSingleton().logMessage("start_game is down"); - } - return true; } Modified: trunk/perceptioncrash/src/IntroState.hpp =================================================================== --- trunk/perceptioncrash/src/IntroState.hpp 2006-05-21 19:22:25 UTC (rev 57) +++ trunk/perceptioncrash/src/IntroState.hpp 2006-05-22 08:22:17 UTC (rev 58) @@ -4,6 +4,7 @@ #include <Ogre.h> #include "GameState.hpp" +#include "InputController.hpp" class IntroState : public GameState { @@ -14,9 +15,8 @@ void pause(); void resume(); - void keyClicked(Ogre::KeyEvent* e); - void keyPressed(Ogre::KeyEvent* e); - void keyReleased(Ogre::KeyEvent* e); + void buttonPressed(InputControllerEvent* e); + void buttonReleased(InputControllerEvent* e); bool frameStarted(const Ogre::FrameEvent& evt); bool frameEnded(const Ogre::FrameEvent& evt); @@ -29,14 +29,10 @@ Ogre::Root *mRoot; Ogre::SceneManager* mSceneMgr; Ogre::Viewport* mViewport; - Ogre::InputReader* mInputDevice; Ogre::Camera* mCamera; InputController* mInputController; - InputControllerButton* mButton_StartGame; - // This is temporary and should probably be replaced with some CEGUI stuff - // It currently just shows the Core/DebugOverlay overlay Ogre::Overlay* mLogoOverlay; bool mExitGame; Added: trunk/perceptioncrash/src/KeyboardMouseInputController.cpp =================================================================== --- trunk/perceptioncrash/src/KeyboardMouseInputController.cpp (rev 0) +++ trunk/perceptioncrash/src/KeyboardMouseInputController.cpp 2006-05-22 08:22:17 UTC (rev 58) @@ -0,0 +1,177 @@ +#include <Ogre.h> + +#include "KeyboardMouseInputController.hpp" + +KeyboardMouseInputController::KeyboardMouseInputController() +{ + /// @todo this can be implemented with events(current) or unbuffered input. + /// which is better? + InputManager* inputManager = InputManager::getSingletonPtr(); + inputManager->getEventProcessor()->addKeyListener(this); + inputManager->getEventProcessor()->addMouseMotionListener(this); + + /// @todo Remove this. This is just for testing. + mKeyboardMap.insert(std::pair<int, Button>(Ogre::KC_SPACE, "select")); +} + +KeyboardMouseInputController::~KeyboardMouseInputController() +{ + InputManager* inputManager = InputManager::getSingletonPtr(); + inputManager->getEventProcessor()->removeKeyListener(this); + inputManager->getEventProcessor()->removeMouseMotionListener(this); +} + +bool +KeyboardMouseInputController::isButtonDown(Button button) +{ + return mButtonStates[button]; +} + +void +KeyboardMouseInputController::keyClicked(Ogre::KeyEvent* e) +{ +} + +void +KeyboardMouseInputController::keyPressed(Ogre::KeyEvent* e) +{ + /// @todo less code repetition in these event functions + + std::vector<Button> pressed; + + // Build a list of pushed buttons (single keys can map to more than one + // button) and update button states + for (std::multimap<int, Button>::iterator i = mKeyboardMap.begin(); + i != mKeyboardMap.end(); + i++) + { + mButtonStates[i->second] = true; + pressed.push_back(i->second); + } + + // Fire events + for (std::vector<Button>::iterator i = pressed.begin(); i != pressed.end(); i++) + { + InputControllerEvent event(*i); + for (std::vector<InputControllerListener*>::iterator j = mInputControllerListeners.begin(); + j != mInputControllerListeners.end(); + j++) + { + (*j)->buttonPressed(&event); + } + } +} + +void +KeyboardMouseInputController::keyReleased(Ogre::KeyEvent* e) +{ + std::vector<Button> released; + + // Build a list of pushed buttons (single keys can map to more than one + // button) and update button states + for (std::multimap<int, Button>::iterator i = mKeyboardMap.begin(); + i != mKeyboardMap.end(); + i++) + { + mButtonStates[i->second] = false; + released.push_back(i->second); + } + + // Fire events + for (std::vector<Button>::iterator i = released.begin(); i != released.end(); i++) + { + InputControllerEvent event(*i); + for (std::vector<InputControllerListener*>::iterator j = mInputControllerListeners.begin(); + j != mInputControllerListeners.end(); + j++) + { + (*j)->buttonReleased(&event); + } + } +} + +void +KeyboardMouseInputController::mouseClicked(Ogre::MouseEvent* e) +{ +} + +void +KeyboardMouseInputController::mouseEntered(Ogre::MouseEvent* e) +{ +} + +void +KeyboardMouseInputController::mouseExited(Ogre::MouseEvent* e) +{ +} + +void +KeyboardMouseInputController::mousePressed(Ogre::MouseEvent* e) +{ + std::vector<Button> pressed; + + // Build a list of pushed buttons (a single mouse button can map to more + // than one button) and update button states + for (std::multimap<int, Button>::iterator i = mMouseMap.begin(); + i != mMouseMap.end(); + i++) + { + mButtonStates[i->second] = true; + pressed.push_back(i->second); + } + + // Fire events + for (std::vector<Button>::iterator i = pressed.begin(); i != pressed.end(); i++) + { + InputControllerEvent event(*i); + for (std::vector<InputControllerListener*>::iterator j = mInputControllerListeners.begin(); + j != mInputControllerListeners.end(); + j++) + { + (*j)->buttonPressed(&event); + } + } +} + +void +KeyboardMouseInputController::mouseReleased(Ogre::MouseEvent* e) +{ + std::vector<Button> released; + + // Build a list of pushed buttons (a single mouse button can map to more + // than one button) and update button states + for (std::multimap<int, Button>::iterator i = mMouseMap.begin(); + i != mMouseMap.end(); + i++) + { + mButtonStates[i->second] = false; + released.push_back(i->second); + } + + // Fire events + for (std::vector<Button>::iterator i = released.begin(); i != released.end(); i++) + { + InputControllerEvent event(*i); + for (std::vector<InputControllerListener*>::iterator j = mInputControllerListeners.begin(); + j != mInputControllerListeners.end(); + j++) + { + (*j)->buttonReleased(&event); + } + } +} + +void +KeyboardMouseInputController::mouseMoved(Ogre::MouseEvent* e) +{ +} + +void +KeyboardMouseInputController::mouseDragged(Ogre::MouseEvent* e) +{ +} + +void +KeyboardMouseInputController::mouseDragMoved(Ogre::MouseEvent* e) +{ +} Property changes on: trunk/perceptioncrash/src/KeyboardMouseInputController.cpp ___________________________________________________________________ Name: svn:keywords + Id Name: svn:eol-style + native Added: trunk/perceptioncrash/src/KeyboardMouseInputController.hpp =================================================================== --- trunk/perceptioncrash/src/KeyboardMouseInputController.hpp (rev 0) +++ trunk/perceptioncrash/src/KeyboardMouseInputController.hpp 2006-05-22 08:22:17 UTC (rev 58) @@ -0,0 +1,52 @@ +#ifndef PC_KEYBOARD_MOUSE_INPUT_CONTROLLER_HPP +#define PC_KEYBOARD_MOUSE_INPUT_CONTROLLER_HPP + +#include <OgreEventListeners.h> +#include <OgreKeyEvent.h> + +#include "InputManager.hpp" +#include "InputController.hpp" + +class KeyboardMouseInputController : public InputController, + public Ogre::KeyListener, + public Ogre::MouseListener, + public Ogre::MouseMotionListener +{ + public: + KeyboardMouseInputController(); + ~KeyboardMouseInputController(); + + bool isButtonDown(Button button); + + protected: + /** Ogre::KeyListener keyClicked event */ + void keyClicked(Ogre::KeyEvent* e); + /** Ogre::KeyListener keyPressed event */ + void keyPressed(Ogre::KeyEvent* e); + /** Ogre::KeyListener keyReleased event */ + void keyReleased(Ogre::KeyEvent* e); + + /** Ogre::MouseListener mouseClicked event */ + void mouseClicked(Ogre::MouseEvent* e); + /** Ogre::MouseListener mouseEntered event */ + void mouseEntered(Ogre::MouseEvent* e); + /** Ogre::MouseListener mouseExited event */ + void mouseExited(Ogre::MouseEvent* e); + /** Ogre::MouseListener mousePressed event */ + void mousePressed(Ogre::MouseEvent* e); + /** Ogre::MouseListener mouseReleased event */ + void mouseReleased(Ogre::MouseEvent* e); + + /** Ogre::MouseMotionListener mouseMoved event */ + void mouseMoved(Ogre::MouseEvent* e); + /** Ogre::MouseMotionListener mouseDragged event */ + void mouseDragged(Ogre::MouseEvent* e); + /** Ogre::MouseMotionListener mouseDragMoved event */ + void mouseDragMoved(Ogre::MouseEvent* e); + + private: + std::multimap<int, Button> mKeyboardMap; + std::multimap<int, Button> mMouseMap; +}; + +#endif /* PC_KEYBOARD_MOUSE_INPUT_CONTROLLER_HPP */ Property changes on: trunk/perceptioncrash/src/KeyboardMouseInputController.hpp ___________________________________________________________________ Name: svn:keywords + Id Name: svn:eol-style + native Modified: trunk/perceptioncrash/src/PauseState.cpp =================================================================== --- trunk/perceptioncrash/src/PauseState.cpp 2006-05-21 19:22:25 UTC (rev 57) +++ trunk/perceptioncrash/src/PauseState.cpp 2006-05-22 08:22:17 UTC (rev 58) @@ -8,7 +8,6 @@ void PauseState::enter() { - mInputDevice = InputManager::getSingletonPtr()->getInputDevice(); mRoot = Ogre::Root::getSingletonPtr(); mViewport = mRoot->getAutoCreatedWindow()->getViewport(0); @@ -31,21 +30,16 @@ } void -PauseState::keyClicked(Ogre::KeyEvent* e) +PauseState::buttonPressed(InputControllerEvent* e) { -} - -void -PauseState::keyPressed(Ogre::KeyEvent* e) -{ - if (e->getKey() == Ogre::KC_P) + if (e->getButton() == "pause") { popState(); } } void -PauseState::keyReleased(Ogre::KeyEvent* e) +PauseState::buttonReleased(InputControllerEvent* e) { } Modified: trunk/perceptioncrash/src/PauseState.hpp =================================================================== --- trunk/perceptioncrash/src/PauseState.hpp 2006-05-21 19:22:25 UTC (rev 57) +++ trunk/perceptioncrash/src/PauseState.hpp 2006-05-22 08:22:17 UTC (rev 58) @@ -14,9 +14,8 @@ void pause(); void resume(); - void keyClicked(Ogre::KeyEvent* e); - void keyPressed(Ogre::KeyEvent* e); - void keyReleased(Ogre::KeyEvent* e); + void buttonPressed(InputControllerEvent* e); + void buttonReleased(InputControllerEvent* e); bool frameStarted(const Ogre::FrameEvent& evt); bool frameEnded(const Ogre::FrameEvent& evt); @@ -28,7 +27,7 @@ Ogre::Root *mRoot; Ogre::SceneManager* mSceneMgr; Ogre::Viewport* mViewport; - Ogre::InputReader* mInputDevice; + InputController* mInputController; Ogre::Camera* mCamera; private: Modified: trunk/perceptioncrash/src/PlayState.cpp =================================================================== --- trunk/perceptioncrash/src/PlayState.cpp 2006-05-21 19:22:25 UTC (rev 57) +++ trunk/perceptioncrash/src/PlayState.cpp 2006-05-22 08:22:17 UTC (rev 58) @@ -25,6 +25,8 @@ mCamera->setAspectRatio(Ogre::Real(mViewport->getActualWidth()) / Ogre::Real(mViewport->getActualHeight())); + mInputController = InputManager::getSingleton().getController("default"); + Ogre::ResourceGroupManager* rgm = Ogre::ResourceGroupManager::getSingletonPtr(); rgm->setWorldResourceGroupName("PlayStateResources"); rgm->linkWorldGeometryToResourceGroup(rgm->getWorldResourceGroupName(), @@ -74,29 +76,24 @@ } void -PlayState::keyClicked(Ogre::KeyEvent* e) +PlayState::buttonPressed(InputControllerEvent* e) { - if (e->getKey() == Ogre::KC_DOWN) + if (e->getButton() == "pause") { - mCamera->setPosition(mCamera->getPosition() - Ogre::Vector3(0, 1, 0)); - } -} - -void -PlayState::keyPressed(Ogre::KeyEvent* e) -{ - if (e->getKey() == Ogre::KC_P) - { pushState(PauseState::getInstance()); } - else if (e->getKey() == Ogre::KC_ESCAPE) + else if (e->getButton() == "back") { changeState(IntroState::getInstance()); } + else if (e->getButton() == "move_down") + { + mCamera->setPosition(mCamera->getPosition() - Ogre::Vector3(0, 1, 0)); + } } void -PlayState::keyReleased(Ogre::KeyEvent* e) +PlayState::buttonReleased(InputControllerEvent* e) { } Modified: trunk/perceptioncrash/src/PlayState.hpp =================================================================== --- trunk/perceptioncrash/src/PlayState.hpp 2006-05-21 19:22:25 UTC (rev 57) +++ trunk/perceptioncrash/src/PlayState.hpp 2006-05-22 08:22:17 UTC (rev 58) @@ -14,9 +14,8 @@ void pause(); void resume(); - void keyClicked(Ogre::KeyEvent* e); - void keyPressed(Ogre::KeyEvent* e); - void keyReleased(Ogre::KeyEvent* e); + void buttonPressed(InputControllerEvent* e); + void buttonReleased(InputControllerEvent* e); void mouseMoved(Ogre::MouseEvent* e); void mouseDragged(Ogre::MouseEvent* e); @@ -36,6 +35,7 @@ Ogre::Viewport* mViewport; Ogre::Camera* mCamera; Ogre::Overlay* mLogoOverlay; + InputController* mInputController; private: static PlayState mPlayState; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <xs...@us...> - 2006-05-21 19:22:37
|
Revision: 57 Author: xsdwx Date: 2006-05-21 12:22:25 -0700 (Sun, 21 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=57&view=rev Log Message: ----------- Added InputController.hpp and InputController.cpp from last revision (sorry) Added Paths: ----------- trunk/perceptioncrash/src/InputController.cpp trunk/perceptioncrash/src/InputController.hpp Added: trunk/perceptioncrash/src/InputController.cpp =================================================================== --- trunk/perceptioncrash/src/InputController.cpp (rev 0) +++ trunk/perceptioncrash/src/InputController.cpp 2006-05-21 19:22:25 UTC (rev 57) @@ -0,0 +1,79 @@ +#include "InputController.hpp" +#include "InputManager.hpp" + +InputController::~InputController() +{ + std::map<std::string, InputControllerButton*>::iterator i; + for (i = mButtons.begin(); i != mButtons.end(); ++i) + { + delete i->second; + } +} + +void +InputController::update() +{ + Ogre::InputReader* inpReader = InputManager::getSingleton().getInputDevice(); + inpReader->capture(); + + std::map<std::string, InputControllerButton*>::iterator i; + for (i = mButtons.begin(); i != mButtons.end(); ++i) + { + if ( i->second->getButtonType() == BT_KEYBOARD ) + { + i->second->setDown( inpReader->isKeyDown(static_cast<Ogre::KeyCode>(i->second->getButton())) ); + } + else if ( i->second->getButtonType() == BT_MOUSE ) + { + i->second->setDown( inpReader->getMouseButton(i->second->getButton()) ); + } + } +} +InputControllerButton* +InputController::registerButton(std::string name, int button, int type) +{ + if ( mButtons.find(name) == mButtons.end() ) + { + return mButtons[name] = new InputControllerButton(button, type); + } + + return 0; +} + +void +InputController::unregisterButton(std::string name) +{ + std::map<std::string, InputControllerButton*>::iterator i = mButtons.find(name); + if ( i != mButtons.end() ) + { + delete i->second; + mButtons.erase(i); + } +} + +InputControllerButton* +InputController::getButton(std::string name) +{ + std::map<std::string, InputControllerButton*>::iterator i = mButtons.find(name); + if ( i != mButtons.end() ) + { + return i->second; + } + + return 0; +} + +InputControllerButton* +InputController::getButton(int button) +{ + std::map<std::string, InputControllerButton*>::iterator i; + for (i = mButtons.begin(); i != mButtons.end(); ++i) + { + if ( i->second->getButton() == button ) + { + return i->second; + } + } + + return 0; +} Added: trunk/perceptioncrash/src/InputController.hpp =================================================================== --- trunk/perceptioncrash/src/InputController.hpp (rev 0) +++ trunk/perceptioncrash/src/InputController.hpp 2006-05-21 19:22:25 UTC (rev 57) @@ -0,0 +1,54 @@ +#ifndef PC_INPUT_CONTROLLER_HPP +#define PC_INPUT_CONTROLLER_HPP + +#include <map> +#include <string> + +enum BUTTON_TYPE +{ + BT_KEYBOARD = 0, + BT_MOUSE +}; + +class InputControllerButton +{ + public: + InputControllerButton(int button, int type) + : mDown(false), mButton(button), mButtonType(type) { } + + bool isDown() const + { return mDown; } + void setDown(bool value) + { mDown = value; } + + int getButton() const + { return mButton; } + int getButtonType() const + { return mButtonType; } + + private: + bool mDown; + + int mButton; + int mButtonType; +}; + +class InputController +{ + public: + InputController() { } + ~InputController(); + + void update(); + + InputControllerButton* registerButton(std::string name, int button, int type = 0); + void unregisterButton(std::string name); + + InputControllerButton* getButton(std::string name); + InputControllerButton* getButton(int button); + + private: + std::map<std::string, InputControllerButton*> mButtons; +}; + +#endif /* PC_INPUT_CONTROLLER_HPP */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <xs...@us...> - 2006-05-21 19:02:08
|
Revision: 56 Author: xsdwx Date: 2006-05-21 12:01:41 -0700 (Sun, 21 May 2006) ViewCVS: http://svn.sourceforge.net/perceptioncrash/?rev=56&view=rev Log Message: ----------- -Game manager now logs correctly-Did some house cleaning-Started InputController class-Added some test code for InputControllerThe InputController seems buggy Modified Paths: -------------- trunk/perceptioncrash/src/GameManager.cpp trunk/perceptioncrash/src/GameManager.hpp trunk/perceptioncrash/src/InputManager.cpp trunk/perceptioncrash/src/InputManager.hpp trunk/perceptioncrash/src/IntroState.cpp trunk/perceptioncrash/src/IntroState.hpp trunk/perceptioncrash/src/PauseState.hpp trunk/perceptioncrash/src/PlayState.cpp trunk/perceptioncrash/src/PlayState.hpp Modified: trunk/perceptioncrash/src/GameManager.cpp =================================================================== --- trunk/perceptioncrash/src/GameManager.cpp 2006-05-21 18:45:39 UTC (rev 55) +++ trunk/perceptioncrash/src/GameManager.cpp 2006-05-21 19:01:41 UTC (rev 56) @@ -32,7 +32,7 @@ void GameManager::start(GameState* state) { - mRoot = new Ogre::Root(); + mRoot = new Ogre::Root("plugins.cfg", "ogre.cfg", "ogre.log"); setupResources(); @@ -174,9 +174,9 @@ { // Stateless code: if (e->getKey() == Ogre::KC_F12) - { - toggleDebugPanelOverlay(); - } + { + toggleDebugPanelOverlay(); + } // call keyPressed of current state mStates.back()->keyPressed(e); Modified: trunk/perceptioncrash/src/GameManager.hpp =================================================================== --- trunk/perceptioncrash/src/GameManager.hpp 2006-05-21 18:45:39 UTC (rev 55) +++ trunk/perceptioncrash/src/GameManager.hpp 2006-05-21 19:01:41 UTC (rev 56) @@ -33,7 +33,7 @@ void start(GameState* state); /** Change state to the specified state. - * + * * This exits the current state, pops it, pushes the new state and enters * it * @@ -42,7 +42,7 @@ void changeState(GameState* state); /** Push new state onto state stack - * + * * This pauses the current state, pushes the new state onto the game state * stack and enters it * @@ -51,7 +51,7 @@ void pushState(GameState* state); /** Pop current state off of state stack - * + * * This exits the current state, pops it off the state stack and resumes * the previous state (if any) */ @@ -59,7 +59,7 @@ /** Override standard Ogre::Singleton retrieval. - * + * * @remarks * * Why do we do this? Well, it's because the Singleton implementation is in @@ -67,16 +67,16 @@ * This is needed for the Singleton template to work, but we actually only * want it compiled into the implementation of the class based on the * Singleton, not all of them. If we don't change this, we get link errors - * when trying to use the Singleton-based class from an outside dll. + * when trying to use the Singleton-based class from an outside dll. * * This method just delegates to the template version anyway, but the * implementation stays in this single compilation unit, preventing link - * errors. + * errors. */ static GameManager& getSingleton(void); /** Override standard Ogre::Singleton retrieval. - * + * * @remarks * * Why do we do this? Well, it's because the Singleton implementation is in @@ -84,11 +84,11 @@ * This is needed for the Singleton template to work, but we actually only * want it compiled into the implementation of the class based on the * Singleton, not all of them. If we don't change this, we get link errors - * when trying to use the Singleton-based class from an outside dll. + * when trying to use the Singleton-based class from an outside dll. * * This method just delegates to the template version anyway, but the * implementation stays in this single compilation unit, preventing link - * errors. + * errors. */ static GameManager* getSingletonPtr(void); Modified: trunk/perceptioncrash/src/InputManager.cpp =================================================================== --- trunk/perceptioncrash/src/InputManager.cpp 2006-05-21 18:45:39 UTC (rev 55) +++ trunk/perceptioncrash/src/InputManager.cpp 2006-05-21 19:01:41 UTC (rev 56) @@ -33,3 +33,47 @@ assert(ms_Singleton); return *ms_Singleton; } + +InputController* +InputManager::createController(std::string name) +{ + if ( mControllers.find(name) == mControllers.end() ) + { + return mControllers[name] = new InputController(); + } + + // Name collision, return + return 0; +} + +void +InputManager::removeController(std::string name) +{ + std::map<std::string, InputController*>::iterator iter = mControllers.find(name); + if ( iter != mControllers.end() ) + { + delete iter->second; + mControllers.erase(iter); + } +} + +InputController* +InputManager::getController(std::string name) +{ + if ( mControllers.find(name) != mControllers.end() ) + { + return mControllers[name]; + } + + return 0; +} + +void +InputManager::updateAllControllers() +{ + std::map<std::string, InputController*>::iterator i; + for (i = mControllers.begin(); i != mControllers.end(); ++i) + { + i->second->update(); + } +} Modified: trunk/perceptioncrash/src/InputManager.hpp =================================================================== --- trunk/perceptioncrash/src/InputManager.hpp 2006-05-21 18:45:39 UTC (rev 55) +++ trunk/perceptioncrash/src/InputManager.hpp 2006-05-21 19:01:41 UTC (rev 56) @@ -4,23 +4,32 @@ #include <OgreSingleton.h> #include <OgreInput.h> +#include "InputController.hpp" + class InputManager : public Ogre::Singleton<InputManager> { public: InputManager(Ogre::RenderWindow* rwindow); virtual ~InputManager(); + static InputManager& getSingleton(void); + static InputManager* getSingletonPtr(void); + Ogre::InputReader* getInputDevice() const { return mInputDevice; } Ogre::EventProcessor* getEventProcessor() const { return mEventProcessor; } - static InputManager& getSingleton(void); - static InputManager* getSingletonPtr(void); + InputController* createController(std::string name); + void removeController(std::string name); + InputController* getController(std::string name); + void updateAllControllers(); private: Ogre::EventProcessor* mEventProcessor; Ogre::InputReader* mInputDevice; + + std::map<std::string, InputController*> mControllers; }; #endif /* PC_INPUT_MANAGER_HPP */ Modified: trunk/perceptioncrash/src/IntroState.cpp =================================================================== --- trunk/perceptioncrash/src/IntroState.cpp 2006-05-21 18:45:39 UTC (rev 55) +++ trunk/perceptioncrash/src/IntroState.cpp 2006-05-21 19:01:41 UTC (rev 56) @@ -13,15 +13,23 @@ mRoot = Ogre::Root::getSingletonPtr(); mSceneMgr = mRoot->createSceneManager(Ogre::ST_GENERIC); - mCamera = mSceneMgr->createCamera("IntroCamera"); - mViewport = mRoot->getAutoCreatedWindow()->addViewport(mCamera); + mCamera = mSceneMgr->createCamera("IntroCamera"); + mViewport = mRoot->getAutoCreatedWindow()->addViewport(mCamera); mViewport->setBackgroundColour( Ogre::ColourValue(0.0, 0.0, 0.0) ); mLogoOverlay = Ogre::OverlayManager::getSingleton().getByName("Overlays/Logo/LogoLargeGreenGlow"); - if (mLogoOverlay) + if (mLogoOverlay) mLogoOverlay->show(); - mExitGame = false; + mExitGame = false; + + mInputController = InputManager::getSingletonPtr()->createController("default"); + if ( !mInputController ) + mInputController = InputManager::getSingletonPtr()->getController("default"); + + mButton_StartGame = mInputController->registerButton("start_game", Ogre::KC_A); + if ( !mButton_StartGame ) + mButton_StartGame = mInputController->getButton("start_game"); } void @@ -30,9 +38,10 @@ if (mLogoOverlay) mLogoOverlay->hide(); - mSceneMgr->clearScene(); - mSceneMgr->destroyAllCameras(); + mSceneMgr->clearScene(); + mSceneMgr->destroyAllCameras(); mRoot->getAutoCreatedWindow()->removeAllViewports(); + mRoot->destroySceneManager(mSceneMgr); } void @@ -54,14 +63,14 @@ IntroState::keyPressed(Ogre::KeyEvent* e) { if (e->getKey() == Ogre::KC_SPACE) - { - changeState(PlayState::getInstance()); - } + { + changeState(PlayState::getInstance()); + } if (e->getKey() == Ogre::KC_ESCAPE) - { - mExitGame = true; - } + { + mExitGame = true; + } } void @@ -72,14 +81,20 @@ bool IntroState::frameStarted(const Ogre::FrameEvent& evt) { - return true; + InputManager::getSingletonPtr()->updateAllControllers(); + if ( mButton_StartGame->isDown() ) + { + Ogre::LogManager::getSingleton().logMessage("start_game is down"); + } + + return true; } bool IntroState::frameEnded(const Ogre::FrameEvent& evt) { - if (mExitGame) - return false; + if (mExitGame) + return false; - return true; + return true; } Modified: trunk/perceptioncrash/src/IntroState.hpp =================================================================== --- trunk/perceptioncrash/src/IntroState.hpp 2006-05-21 18:45:39 UTC (rev 55) +++ trunk/perceptioncrash/src/IntroState.hpp 2006-05-21 19:01:41 UTC (rev 56) @@ -7,7 +7,7 @@ class IntroState : public GameState { -public: + public: void enter(); void exit(); @@ -23,7 +23,7 @@ static IntroState* getInstance() { return &mIntroState; } -protected: + protected: IntroState() { } Ogre::Root *mRoot; @@ -32,13 +32,16 @@ Ogre::InputReader* mInputDevice; Ogre::Camera* mCamera; + InputController* mInputController; + InputControllerButton* mButton_StartGame; + // This is temporary and should probably be replaced with some CEGUI stuff // It currently just shows the Core/DebugOverlay overlay Ogre::Overlay* mLogoOverlay; bool mExitGame; -private: + private: static IntroState mIntroState; }; Modified: trunk/perceptioncrash/src/PauseState.hpp =================================================================== --- trunk/perceptioncrash/src/PauseState.hpp 2006-05-21 18:45:39 UTC (rev 55) +++ trunk/perceptioncrash/src/PauseState.hpp 2006-05-21 19:01:41 UTC (rev 56) @@ -7,7 +7,7 @@ class PauseState : public GameState { -public: + public: void enter(); void exit(); @@ -21,8 +21,8 @@ bool frameEnded(const Ogre::FrameEvent& evt); static PauseState* getInstance() { return &mPauseState; } - -protected: + + protected: PauseState() { } Ogre::Root *mRoot; @@ -30,8 +30,8 @@ Ogre::Viewport* mViewport; Ogre::InputReader* mInputDevice; Ogre::Camera* mCamera; - -private: + + private: static PauseState mPauseState; }; Modified: trunk/perceptioncrash/src/PlayState.cpp =================================================================== --- trunk/perceptioncrash/src/PlayState.cpp 2006-05-21 18:45:39 UTC (rev 55) +++ trunk/perceptioncrash/src/PlayState.cpp 2006-05-21 19:01:41 UTC (rev 56) @@ -33,7 +33,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); + //rgm->loadResourceGroup(rgm->getWorldResourceGroupName(), false, true); mSceneMgr->setAmbientLight(Ogre::ColourValue(1, 1, 1)); @@ -44,7 +44,7 @@ mCamera->setFixedYawAxis(true, Ogre::Vector3::UNIT_Z); mLogoOverlay = Ogre::OverlayManager::getSingleton().getByName("Overlays/Logo/LogoCornerGreenGlow"); - if (mLogoOverlay) + if (mLogoOverlay) mLogoOverlay->show(); } @@ -59,6 +59,7 @@ mSceneMgr->clearScene(); mSceneMgr->destroyAllCameras(); mRoot->getAutoCreatedWindow()->removeAllViewports(); + mRoot->destroySceneManager(mSceneMgr); } void Modified: trunk/perceptioncrash/src/PlayState.hpp =================================================================== --- trunk/perceptioncrash/src/PlayState.hpp 2006-05-21 18:45:39 UTC (rev 55) +++ trunk/perceptioncrash/src/PlayState.hpp 2006-05-21 19:01:41 UTC (rev 56) @@ -7,7 +7,7 @@ class PlayState : public GameState { -public: + public: void enter(); void exit(); @@ -28,7 +28,7 @@ static PlayState* getInstance() { return &mPlayState; } -protected: + protected: PlayState() { } Ogre::Root *mRoot; @@ -37,7 +37,7 @@ Ogre::Camera* mCamera; Ogre::Overlay* mLogoOverlay; -private: + private: static PlayState mPlayState; }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |