You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(11) |
Apr
(47) |
May
(14) |
Jun
|
Jul
(73) |
Aug
(4) |
Sep
(2) |
Oct
(60) |
Nov
(48) |
Dec
(66) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
(1) |
Mar
(27) |
Apr
(82) |
May
(89) |
Jun
(91) |
Jul
(44) |
Aug
(53) |
Sep
(113) |
Oct
(20) |
Nov
(37) |
Dec
(10) |
2008 |
Jan
|
Feb
(2) |
Mar
|
Apr
(2) |
May
(21) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2009 |
Jan
(76) |
Feb
(89) |
Mar
(52) |
Apr
(11) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(27) |
2010 |
Jan
(11) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(9) |
Sep
|
Oct
|
Nov
|
Dec
(14) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
(11) |
Oct
(3) |
Nov
|
Dec
|
2013 |
Jan
(4) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <eg...@us...> - 2007-05-20 21:28:42
|
Revision: 501 http://svn.sourceforge.net/opengate/?rev=501&view=rev Author: egore Date: 2007-05-20 14:28:41 -0700 (Sun, 20 May 2007) Log Message: ----------- add commodity manager (possibly memleaking) Modified Paths: -------------- branches/ogsector/data/equipment.xml branches/ogsector/src/Entity.h branches/ogsector/src/EntityManager.cpp branches/ogsector/src/EntityManager.h branches/ogsector/src/GameStateManager.cpp branches/ogsector/src/GameStateManager.h Added Paths: ----------- branches/ogsector/data/commodities.xml Added: branches/ogsector/data/commodities.xml =================================================================== --- branches/ogsector/data/commodities.xml (rev 0) +++ branches/ogsector/data/commodities.xml 2007-05-20 21:28:41 UTC (rev 501) @@ -0,0 +1,5 @@ +<?xml version="1.0"?> + +<commodities> + <Resource id="1" location="../../trunk/data/commodities/aluminium.xml"/> +</commodities> Modified: branches/ogsector/data/equipment.xml =================================================================== --- branches/ogsector/data/equipment.xml 2007-05-20 21:27:12 UTC (rev 500) +++ branches/ogsector/data/equipment.xml 2007-05-20 21:28:41 UTC (rev 501) @@ -1,5 +1,6 @@ <?xml version="1.0"?> -<capacitor> - <Resource id="1" location="../../trunk/data/capacitors/s_c_15.xml"/> -</capacitor> +<equipment> + <Resource id="1" location="../../trunk/data/capacitors/s_c_15.xml" /> + <Resource id="2" location="../../trunk/data/ECMs/ghost.xml" /> +</equipment> Modified: branches/ogsector/src/Entity.h =================================================================== --- branches/ogsector/src/Entity.h 2007-05-20 21:27:12 UTC (rev 500) +++ branches/ogsector/src/Entity.h 2007-05-20 21:28:41 UTC (rev 501) @@ -21,8 +21,8 @@ #ifndef _OPENGATE_ENTITY_H #define _OPENGATE_ENTITY_H +#include <set> #include <string> -#include <vector> namespace OpenGate{ @@ -72,8 +72,9 @@ std::string className_; + /*! A unique ID to find this object \todo maybe push to a string and merge with Commodity.commodityID_ */ int id_; - + /*! The required tech level to interact with this object */ int techLevel_; /*! The mass of this entity. */ long mass_; @@ -93,23 +94,37 @@ class EquipmentTemplate : public EntityTemplate{ public: + inline void setDescription( const std::string & description ) { description_ = description; } + inline std::string description( ) const { return description_; } + + inline void setManufacturer( const std::string & manufacturer ) { manufacturer_ = manufacturer; } + inline std::string manufacturer( ) const { return manufacturer_; } + inline void setSize( short size ){ size_ = size; } inline short size( ) const { return size_; } + inline void setProductionCenters( const std::set < std::string > & productionCenter ) { productionCenter_ = productionCenter; } + inline std::set < std::string> productionCenters( ) const { return productionCenter_; } + + inline void setRequieredComponents( const std::set < Commodity * > & requieredComponents ) { requieredComponents_ = requieredComponents; } + inline std::set < Commodity * > requieredComponents( ) const { return requieredComponents_; } + protected: - EquipmentTemplate(): EntityTemplate() { + EquipmentTemplate(): EntityTemplate(), description_( "none" ), manufacturer_( "unkown" ) { size_ = 0; } - std::string _description; - // TODO: Company* _manufacturer; - // TODO: std::vector<char*> _productioncenter; - + /*! A rather long description of this component */ + std::string description_; + /*! Name of the company that produces this equipment */ + std::string manufacturer_; /*! The amount of slots necessary to plug in such a device. */ short size_; + /*! The places where this part of equipment is built */ + std::set < std::string > productionCenter_; + /*! The components required to build this equipment part */ + std::set < Commodity * > requieredComponents_; - std::vector<Commodity> _requierd_component[]; - }; /*! @@ -210,28 +225,37 @@ class Commodity : public EntityTemplate{ public: - Commodity(): EntityTemplate(), id_( "unknown" ) { + Commodity(): EntityTemplate(), commodityID_( "unknown" ) { meltingPoint_ = 0; + size_ = 0; graviticSig_ = 0.0; } - inline void setProductionCenters( const std::vector<std::string> & productionCenter ) { productionCenter_ = productionCenter; } - inline std::vector<std::string> productionCenters( ) const { return productionCenter_; } + inline void setProductionCenters( const std::set < std::string > & productionCenters ) { productionCenters_ = productionCenters; } + inline std::set < std::string > productionCenters( ) const { return productionCenters_; } - inline void setId( const std::string & id ) { id_ = id; } - inline std::string id( ) const { return id_; } - inline void setMeltingPoint( int meltingPoint ){ meltingPoint_ = meltingPoint; } inline int meltingPoint( ) const { return meltingPoint_; } inline void setGraviticSig( double graviticSig ){ graviticSig_ = graviticSig; } inline double graviticSig( ) const { return graviticSig_; } + inline void setCommodityID( const std::string & commodityID ) { commodityID_ = commodityID; } + inline std::string commodityID( ) const { return commodityID_; } + + inline void setSize( short size ){ size_ = size; } + inline short size( ) const { return size_; } + protected: - std::vector<std::string> productionCenter_; - std::string id_; - + /*! A list of all stations that produce this commodity */ + std::set < std::string > productionCenters_; + /*! The unique name of this commodity \todo check if that can be merged with EntityTemlpate.id_ */ + std::string commodityID_; + /*! The specific melting point of this commodity */ int meltingPoint_; + /*! The size this commodity requires in cargo unit (1 size = 1 cargo unit)*/ + short size_; + /*! The specific atomic wheight of this commodity */ double graviticSig_; }; Modified: branches/ogsector/src/EntityManager.cpp =================================================================== --- branches/ogsector/src/EntityManager.cpp 2007-05-20 21:27:12 UTC (rev 500) +++ branches/ogsector/src/EntityManager.cpp 2007-05-20 21:28:41 UTC (rev 501) @@ -67,6 +67,26 @@ } } +template<> EquipmentManager * Ogre::Singleton< EquipmentManager >::ms_Singleton = 0; + +EquipmentManager::EquipmentManager(): EntityManager(){ +} + +EquipmentManager::~EquipmentManager() { +} + +EquipmentManager & EquipmentManager::getSingleton( ){ + assert( ms_Singleton ); + return ( *ms_Singleton ); +} + +EquipmentManager * EquipmentManager::getSingletonPtr( ){ + if ( ms_Singleton == NULL ){ + LogManager::getSingleton().fatal( "CommodityManager not initialized." ); + } + return ms_Singleton; +} + EntityTemplate * EquipmentManager::loadAndCreate( int id, const std::string & fileName ){ TiXmlDocument doc( fileName ); @@ -161,6 +181,28 @@ //! \todo Add logic for things other than capacitors and ECMs } + // Production Data + std::set < std::string > productionCenters; + for ( pElem = hRoot.FirstChild( "production-center" ).Element(); pElem != 0; pElem = pElem->NextSiblingElement() ) { + productionCenters.insert( pElem->FirstChild()->Value() ); //!< \todo check return value! + } + entity->setProductionCenters( productionCenters ); + CommodityManager* commodityMgr = CommodityManager::getSingletonPtr(); + if ( !commodityMgr ) { + log_->fatal( "Cannot find the commodity manager, no production data available" ); + return NULL; + } + std::set < Commodity * > commodities; + for ( pElem = hRoot.FirstChild( "required-component" ).Element(); pElem != 0; pElem = pElem->NextSiblingElement() ) { + Commodity *commodity = commodityMgr->findByName ( pElem->FirstChild()->Value() ); //!< \todo check return value! + if ( commodity ) { + commodities.insert( commodity ); + } else { + log_->warn( fileName + " has unsatisfied commodities." ); + } + } + entity->setRequieredComponents( commodities ); + if ( templatesByName_.count( entity->name() ) == 0 ){ entity->setID( id ); templatesByName_[ entity->name() ] = entity; @@ -170,19 +212,111 @@ log_->info( std::string( "Loaded " ) + equipmentType + std::string( ": ") + entity->factionName() + "/" + entity->name() ); } else { log_->warn( std::string( "Equipment with name: " ) + entity->factionName() + "/" + entity->name() + - " allready loaded" ); + " already loaded" ); } return entity; } -template<> EquipmentManager * Ogre::Singleton< EquipmentManager >::ms_Singleton = 0; +template<> CommodityManager * Ogre::Singleton< CommodityManager >::ms_Singleton = 0; -EquipmentManager::EquipmentManager(): EntityManager(){ +CommodityManager::CommodityManager(): EntityManager(){ } -EquipmentManager::~EquipmentManager() { +CommodityManager::~CommodityManager() { } +CommodityManager & CommodityManager::getSingleton( ){ + assert( ms_Singleton ); + return ( *ms_Singleton ); } +CommodityManager * CommodityManager::getSingletonPtr( ){ + if ( ms_Singleton == NULL ){ + LogManager::getSingleton().fatal( "CommodityManager not initialized." ); + } + return ms_Singleton; +} +EntityTemplate * CommodityManager::loadAndCreate( int id, const std::string & fileName ){ + + TiXmlDocument doc( fileName ); + bool loadOkay = doc.LoadFile(); + + if ( !loadOkay ) { + log_->fatal( std::string( "Failed to load commodity file: " + fileName ) ); + return NULL; + } + + TiXmlHandle docHandle( &doc ); + TiXmlElement* pElem; + TiXmlNode* pNode; + TiXmlHandle hRoot( 0 ); + + //** block: equipment; + pElem = docHandle.FirstChildElement().Element(); + hRoot = TiXmlHandle( pElem ); + + if ( !pElem ) { + log_->fatal( fileName + " cannot read first node." ); + return NULL; + } + + if ( strcmp( "component", pElem->Value() ) != 0 ){ + log_->fatal( fileName + " is no commodity description" ); + return NULL; + } + + Commodity *entity = new Commodity; + + // Naming + pElem = hRoot.ChildElement( "name_en", 0 ).Element(); + if ( pElem ) { + entity->setName( pElem->FirstChild()->Value() ); + } else { + log_->fatal( fileName + " has no name (mandatory)." ); + return NULL; + } + + // Generic Data + pElem = hRoot.ChildElement( "class", 0 ).Element(); + if ( pElem ) entity->setClassName( pElem->FirstChild()->Value() ); + pElem = hRoot.ChildElement( "techlevel", 0 ).Element(); + if ( pElem ) entity->setTechLevel( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "size", 0 ).Element(); + if ( pElem ) entity->setSize( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "mass", 0 ).Element(); + if ( pElem ) entity->setMass( toInt( pElem->FirstChild()->Value() ) ); + + // Specific Data + pElem = hRoot.ChildElement( "id", 0 ).Element(); + if ( pElem ) entity->setCommodityID( pElem->FirstChild()->Value() ); + pElem = hRoot.ChildElement( "melting-point", 0 ).Element(); + if ( pElem ) entity->setMeltingPoint( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "gravitic-sig", 0 ).Element(); + if ( pElem ) entity->setGraviticSig( toFloat( pElem->FirstChild()->Value() ) ); + + // Production Data + std::set < std::string > productionCenters; + for ( pElem = hRoot.FirstChild( "production-center" ).Element(); pElem != 0; pElem = pElem->NextSiblingElement() ) { + productionCenters.insert( pElem->FirstChild()->Value() ); //!< \todo check return value! + } + entity->setProductionCenters( productionCenters ); + //! \todo Add required components + + if ( templatesByName_.count( entity->name() ) == 0 ){ + entity->setID( id ); + templatesByName_[ entity->name() ] = entity; + templatesByID_[ id ] = entity; + + factions_.insert( entity->factionName() ); + log_->info( std::string( "Loaded Commodity: " ) + entity->factionName() + "/" + entity->name() ); + } else { + log_->warn( std::string( "Equipment with name: " ) + entity->factionName() + "/" + entity->name() + + " allready loaded" ); + } + return entity; +} + +} + + Modified: branches/ogsector/src/EntityManager.h =================================================================== --- branches/ogsector/src/EntityManager.h 2007-05-20 21:27:12 UTC (rev 500) +++ branches/ogsector/src/EntityManager.h 2007-05-20 21:28:41 UTC (rev 501) @@ -92,6 +92,40 @@ }; +/*! + * \brief This class is able to load equipment (reactors, engines, guns, etc.) + * from XML files. + * \author Christoph Brill <eg...@us...> + */ +class CommodityManager : public Ogre::Singleton< CommodityManager >, public EntityManager{ +public: + + /*! Get the single instance of the EquipmentManager */ + static CommodityManager & getSingleton( ); + + /*! Get the pointer to single instance of the EquipmentManager */ + static CommodityManager * getSingletonPtr( ); + + /*! Constructor */ + CommodityManager(); + + /*! Destructor that free's all loaded vessels */ + virtual ~CommodityManager(); + + virtual EntityTemplate * loadAndCreate( int id, const std::string & filename ); + + /*! This returns a commodity by it's given name \remarks The commodity needs to be loaded before \param commodityName The name of a commodity */ + Commodity * findByName( const std::string & commodityName ){ + if ( templatesByName_.count( commodityName ) ){ + return static_cast<Commodity *>(templatesByName_[ commodityName ]); + } else { + log_->fatal( std::string( "Unknown commodity with name :" ) + commodityName ); + return NULL; + } + } + +}; + } // namespace OpenGate #endif //_OPENGATE_ENTITYMANAGER_H Modified: branches/ogsector/src/GameStateManager.cpp =================================================================== --- branches/ogsector/src/GameStateManager.cpp 2007-05-20 21:27:12 UTC (rev 500) +++ branches/ogsector/src/GameStateManager.cpp 2007-05-20 21:28:41 UTC (rev 501) @@ -310,6 +310,9 @@ vesselManager_ = new VesselManager( ); vesselManager_->load( resourcePaths_, "ships.xml" ); + commodityManager_ = new CommodityManager( ); + commodityManager_->load( resourcePaths_, "commodities.xml" ); + equipmentManager_ = new EquipmentManager( ); equipmentManager_->load( resourcePaths_, "equipment.xml" ); Modified: branches/ogsector/src/GameStateManager.h =================================================================== --- branches/ogsector/src/GameStateManager.h 2007-05-20 21:27:12 UTC (rev 500) +++ branches/ogsector/src/GameStateManager.h 2007-05-20 21:28:41 UTC (rev 501) @@ -33,6 +33,7 @@ class VesselManager; class ConfigDialog; class EquipmentManager; +class CommodityManager; /*! * \brief The class defines the gamestate manager. @@ -44,7 +45,8 @@ class GameStateManager : public GameStateListener { public: - /*! \brief Holds information about the states in order to manage them properly and provide access. */ + /*! \brief Holds information about the states in order to manage them properly + * and provide access. */ typedef struct { std::string name; GameState * state; @@ -62,7 +64,11 @@ /*! Store a game state to manage. */ void manageGameState( const std::string & stateName, GameState * state ); - /*! Start game state. This is used to start the game state manager functioning with a particular state. This function also does the main game loop and takes care of the Windows message pump.*/ + /*! \brief Start game state. + * + * This is used to start the game state manager functioning with a particular + * state. This function also does the main game loop and takes care of the + * Windows message pump.*/ void start( GameState * state ); /*! capture network, called every frame. */ @@ -105,6 +111,7 @@ LogManager * log_; VesselManager * vesselManager_; EquipmentManager * equipmentManager_; + CommodityManager * commodityManager_; std::set < std::string > resourcePaths_; std::vector< GameState * > stateStack_; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2007-05-20 21:27:10
|
Revision: 500 http://svn.sourceforge.net/opengate/?rev=500&view=rev Author: egore Date: 2007-05-20 14:27:12 -0700 (Sun, 20 May 2007) Log Message: ----------- also for this one Modified Paths: -------------- trunk/data/commodities/aluminium.xml Modified: trunk/data/commodities/aluminium.xml =================================================================== --- trunk/data/commodities/aluminium.xml 2007-05-20 21:26:57 UTC (rev 499) +++ trunk/data/commodities/aluminium.xml 2007-05-20 21:27:12 UTC (rev 500) @@ -1,26 +1,30 @@ <?xml version="1.0"?> +<!DOCTYPE equipment SYSTEM "http://opengate.sourceforge.net/opengate.dtd"> <component type="Mineable"> - <!-- Name --> + <!-- Naming --> <name_de>Aluminium</name_de> <name_en>Aluminium</name_en> - <!-- Class --> + <!-- Generic Data --> <class_de>Metall</class_de> <class_en>metal</class_en> + <techlevel>0</techlevel> + <size>1</size> + <mass>2702</mass> + <!-- Additional Data --> + <description>TODO</description> <image>aluminium.jpg</image> <model>aluminium.blend</model> + <mesh>aluminium.mesh</mesh> + <!-- Specific data --> + <id>Al</id> + <melting-point>660</melting-point> + <gravitic-sig>2.7</gravitic-sig> + <!-- Production Data --> <production-center>Mined</production-center> - - <!-- Generic Data --> - <techlevel>0</techlevel> - <id>Al</id> - <mass>2702</mass> - <size>1</size> - <melting-point>660</melting-point> - <gravitic-sig>2.7</gravitic-sig> </component> \ 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: <eg...@us...> - 2007-05-20 21:26:59
|
Revision: 499 http://svn.sourceforge.net/opengate/?rev=499&view=rev Author: egore Date: 2007-05-20 14:26:57 -0700 (Sun, 20 May 2007) Log Message: ----------- use same parameter order Modified Paths: -------------- trunk/data/ECMs/ghost.xml trunk/data/capacitors/s_c_15.xml Modified: trunk/data/ECMs/ghost.xml =================================================================== --- trunk/data/ECMs/ghost.xml 2007-05-20 21:26:30 UTC (rev 498) +++ trunk/data/ECMs/ghost.xml 2007-05-20 21:26:57 UTC (rev 499) @@ -1,25 +1,32 @@ <?xml version="1.0"?> -<!DOCTYPE equipment SYSTEM "opengate.dtd"> +<!DOCTYPE equipment SYSTEM "http://opengate.sourceforge.net/opengate.dtd"> <equipment type="ECM"> <!-- Naming --> + <faction>Tauseti</faction> <name>Ghost</name> - <class>Radar Jammer</class> - <faction>Solrain</faction> - <description>TODO</description> - <!-- Production Data --> - <manufacturer>Amananth</manufacturer> - <production-center>Amananth</production-center> - <!-- Generic Data --> + <class>Radar Jammer</class> <techlevel>8</techlevel> <size>1</size> <mass>30</mass> + <!-- Additional Data --> + <description>TODO</description> + <image>ghost.jpg</image> + <model>ghost.blend</model> + <mesh>ghost.mesh</mesh> + + <!-- Specific data --> <sensorlevel>3</sensorlevel> <power>970000</power> + + <!-- Production Data --> + <manufacturer>Amananth</manufacturer> + <production-center>Amananth</production-center> + <!-- Building Data --> <required-component>Antimony</required-component> <required-component>RAM</required-component> <required-component>CPU</required-component> Modified: trunk/data/capacitors/s_c_15.xml =================================================================== --- trunk/data/capacitors/s_c_15.xml 2007-05-20 21:26:30 UTC (rev 498) +++ trunk/data/capacitors/s_c_15.xml 2007-05-20 21:26:57 UTC (rev 499) @@ -3,28 +3,31 @@ <equipment type="Capacitor"> <!-- Naming --> + <faction>Tauseti</faction> <name>S-C-15</name> + + <!-- Generic Data --> <class>Energy Storage Device</class> - <faction>Solrain</faction> + <techlevel>0</techlevel> + <size>1</size> + <mass>1000</mass> + + <!-- Additional Data --> <description>The S-C-15 is Solrain's stock equipment capacitor, and is basically a modified Mantra. All Solrain pilots are given this as part of their starter package. TRI subsidizes production of this model, and therefore it cannot be legally traded or sold for much value.</description> <image>s_c_15.jpg</image> <model>s_c_15.blend</model> + <mesh>s_c_15.mesh</mesh> + <!-- Specific data --> + <efficiency>80</efficiency> + <capacity>1100000</capacity> + <!-- Production Data --> - <manufacturer>T&P Systems</manufacturer> + <manufacturer>T&P Systems</manufacturer> <production-center>Solrain Core</production-center> <production-center>Solrain Wake</production-center> <production-center>Solrain Cornea</production-center> - - <!-- Generic Data --> - <techlevel>0</techlevel> - <size>1</size> - <mass>1000</mass> - <!-- Specific data --> - <efficiency>80</efficiency> - <capacity>1100000</capacity> - <!-- Building Data --> <required-component>Aluminium</required-component> <required-component>Lithium</required-component> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2007-05-20 21:26:28
|
Revision: 498 http://svn.sourceforge.net/opengate/?rev=498&view=rev Author: egore Date: 2007-05-20 14:26:30 -0700 (Sun, 20 May 2007) Log Message: ----------- fix whitespace readd dtd Modified Paths: -------------- trunk/data/ships/tauseti/lady_kickstart/lady_kickstart.xml Modified: trunk/data/ships/tauseti/lady_kickstart/lady_kickstart.xml =================================================================== --- trunk/data/ships/tauseti/lady_kickstart/lady_kickstart.xml 2007-05-20 21:25:56 UTC (rev 497) +++ trunk/data/ships/tauseti/lady_kickstart/lady_kickstart.xml 2007-05-20 21:26:30 UTC (rev 498) @@ -1,4 +1,5 @@ <?xml version="1.0"?> +<!DOCTYPE equipment SYSTEM "http://opengate.sourceforge.net/opengate.dtd"> <ship> <!-- Naming --> @@ -11,7 +12,7 @@ <size>12.2</size> <mass>8500</mass> - <!-- Sizes --> + <!-- Sizes --> <capacitorsize>1</capacitorsize> <ecmsize>1</ecmsize> <engines>1</engines> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2007-05-20 21:25:55
|
Revision: 497 http://svn.sourceforge.net/opengate/?rev=497&view=rev Author: egore Date: 2007-05-20 14:25:56 -0700 (Sun, 20 May 2007) Log Message: ----------- outdated, will be updated soon Modified Paths: -------------- trunk/doc/coding-style.txt Modified: trunk/doc/coding-style.txt =================================================================== --- trunk/doc/coding-style.txt 2007-05-20 20:55:35 UTC (rev 496) +++ trunk/doc/coding-style.txt 2007-05-20 21:25:56 UTC (rev 497) @@ -29,9 +29,37 @@ This is way better. So: always use braces to show where a block of code begins and where it ends. +2.) use tabs instead of spaces where usefull -2.) document the tricky parts +It's good style to use tabs for most indentions. Especially it is helpfull to +use tabs at the beginning of each line. For example +void main() { + return; +} + +is a bad one, while this + +void main() { + return; +} + +is a good one. You don't need to follow the rule preciseley, but that way +everyone can indent the code as he likes. To don't mess up formatting we +recommend to use spaces for indention that needs to be fixed. The example + +void main(int a, int b, int c, int d, int e, + int f, int g) { + return; +} + +shows that the line "int f, ..." start with spaces. That way the command +arguments are placed exactly where they are now. If you have a tab in front +of you funtion, add the tab in the next line and then start with spaces. + + +3.) document the tricky parts + I'll be reviewing the code that will be added to the repository. If it does something tricky, comment on it. Tell why you have done it this way. Tell how it works in a few sentences. I'll not tolerate code that is doing "magic". I @@ -39,7 +67,7 @@ the game... unless it is documented. -3.) use doxygen +4.) use doxygen I recommend documenting the source using doxygen. I know, it's bloating the code and might even be annoying, but: It will help others, like me :-) So I @@ -49,7 +77,7 @@ [1] http://www.stack.nl/~dimitri/doxygen/docblocks.html [2] http://www.stack.nl/~dimitri/doxygen/commands.html -4.) code example +5.) code example class Test { public: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spo...@us...> - 2007-05-20 20:55:33
|
Revision: 496 http://svn.sourceforge.net/opengate/?rev=496&view=rev Author: spom_spom Date: 2007-05-20 13:55:35 -0700 (Sun, 20 May 2007) Log Message: ----------- win compatibility commit Modified Paths: -------------- branches/ogsector/win32/ogsectorclient/ogsectorclient.cbp branches/ogsector/win32/ogsectorclient/ogsectorclient.exe Modified: branches/ogsector/win32/ogsectorclient/ogsectorclient.cbp =================================================================== --- branches/ogsector/win32/ogsectorclient/ogsectorclient.cbp 2007-05-20 20:42:09 UTC (rev 495) +++ branches/ogsector/win32/ogsectorclient/ogsectorclient.cbp 2007-05-20 20:55:35 UTC (rev 496) @@ -55,10 +55,16 @@ <Add directory="C:\OgreSDK\lib" /> <Add directory="C:\OgreSDK\bin\Release" /> </Linker> + <Unit filename="..\..\src\ConfigDialog.cpp" /> + <Unit filename="..\..\src\ConfigDialog.h" /> <Unit filename="..\..\src\Console.cpp" /> <Unit filename="..\..\src\Console.h" /> <Unit filename="..\..\src\DockedState.cpp" /> <Unit filename="..\..\src\DockedState.h" /> + <Unit filename="..\..\src\Entity.cpp" /> + <Unit filename="..\..\src\Entity.h" /> + <Unit filename="..\..\src\EntityManager.cpp" /> + <Unit filename="..\..\src\EntityManager.h" /> <Unit filename="..\..\src\GameState.cpp" /> <Unit filename="..\..\src\GameState.h" /> <Unit filename="..\..\src\GameStateManager.cpp" /> Modified: branches/ogsector/win32/ogsectorclient/ogsectorclient.exe =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spo...@us...> - 2007-05-20 20:42:10
|
Revision: 495 http://svn.sourceforge.net/opengate/?rev=495&view=rev Author: spom_spom Date: 2007-05-20 13:42:09 -0700 (Sun, 20 May 2007) Log Message: ----------- Add support for global configuration dialog (Press ESC). Atm. you can just quit the game, Also the looknfeel need improvement. Modified Paths: -------------- branches/ogsector/data/gui/layouts/opengateDocked.layout branches/ogsector/data/gui/schemes/opengate/opengate.imageset branches/ogsector/data/gui/schemes/opengate/opengate.png branches/ogsector/data/gui/schemes/opengate/opengate.scheme branches/ogsector/data/gui/schemes/opengate/opengateButtons.looknfeel branches/ogsector/src/DockedState.cpp branches/ogsector/src/DockedState.h branches/ogsector/src/GameState.h branches/ogsector/src/GameStateManager.cpp branches/ogsector/src/GameStateManager.h branches/ogsector/src/Makefile.am branches/ogsector/src/ShipConfigDialog.cpp branches/ogsector/src/UnDockedState.cpp branches/ogsector/src/UnDockedState.h branches/ogsector/src/opengateclient.cpp Added Paths: ----------- branches/ogsector/data/gui/layouts/dialogs/ConfigDialog.layout branches/ogsector/data/gui/schemes/opengate/textures/configMain.png branches/ogsector/src/ConfigDialog.cpp branches/ogsector/src/ConfigDialog.h Added: branches/ogsector/data/gui/layouts/dialogs/ConfigDialog.layout =================================================================== --- branches/ogsector/data/gui/layouts/dialogs/ConfigDialog.layout (rev 0) +++ branches/ogsector/data/gui/layouts/dialogs/ConfigDialog.layout 2007-05-20 20:42:09 UTC (rev 495) @@ -0,0 +1,69 @@ +<?xml version="1.0" ?> +<GUILayout> + <Window Type="opengate/StaticImage" Name="Config/Main"> + <Property Name="UnifiedPosition" Value="{{0.0,0},{0.0,0}}" /> + <Property Name="UnifiedSize" Value="{{1.0,0},{1.0,0}}" /> +<!-- <Property Name="UnifiedPosition" Value="{{0.0,23},{0.0,5}}" /> --> +<!-- <Property Name="UnifiedSize" Value="{{1.0,-46},{1.0,-10}}" /> --> + <Property Name="Alpha" Value="1" /> + + <Window Type="opengate/StaticImage" Name="Config/MainWindow"> + <Property Name="UnifiedPosition" Value="{{0.5,-202},{0.0,10}}" /> + <Property Name="UnifiedSize" Value="{{0.0,405},{0.0, 705}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:ConfigMainWindow image:full_image" /> + <Window Type="opengate/StaticImage" Name="Config/MainFrame"> + <Property Name="UnifiedPosition" Value="{{0.0,60},{0.0,109}}" /> + <Property Name="UnifiedSize" Value="{{1.0,-98},{1.0,-115}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Window Type="opengate/Button" Name="Config/ConnectButton"> + <Property Name="UnifiedPosition" Value="{{0.0,10},{0.0,10}}" /> + <Property Name="UnifiedSize" Value="{{0.0,80},{0.0, 48}}" /> + <Property Name="Disabled" Value="true" /> + <Property Name="Text" Value="Connect" /> + </Window> + <Window Type="opengate/Button" Name="Config/GraphicButton"> + <Property Name="UnifiedPosition" Value="{{0.0,10},{0.0,60}}" /> + <Property Name="UnifiedSize" Value="{{0.0,80},{0.0, 48}}" /> + <Property Name="Disabled" Value="true" /> + <Property Name="Text" Value="Graphic" /> + </Window> + <Window Type="opengate/Button" Name="Config/SoundButton"> + <Property Name="UnifiedPosition" Value="{{0.0,10},{0.0,110}}" /> + <Property Name="UnifiedSize" Value="{{0.0,80},{0.0, 48}}" /> + <Property Name="Disabled" Value="true" /> + <Property Name="Text" Value="Sound" /> + </Window> + <Window Type="opengate/Button" Name="Config/ControlsButton"> + <Property Name="UnifiedPosition" Value="{{0.0,10},{0.0,160}}" /> + <Property Name="UnifiedSize" Value="{{0.0,80},{0.0, 48}}" /> + <Property Name="Disabled" Value="true" /> + <Property Name="Text" Value="Controls" /> + </Window> + <Window Type="opengate/Button" Name="Config/CreditsButton"> + <Property Name="UnifiedPosition" Value="{{0.0,10},{0.0,210}}" /> + <Property Name="UnifiedSize" Value="{{0.0,80},{0.0, 48}}" /> + <Property Name="Disabled" Value="true" /> + <Property Name="Text" Value="Credits" /> + </Window> + <Window Type="opengate/Button" Name="Config/QuitButton"> + <Property Name="UnifiedPosition" Value="{{0.0,10},{0.0,260}" /> + <Property Name="UnifiedSize" Value="{{0.0,80},{0.0, 48}}" /> + <Property Name="Text" Value="Quit Opengate" /> + </Window> + <Window Type="opengate/Button" Name="Config/BackButton"> + <Property Name="UnifiedPosition" Value="{{0.0,10},{1.0,-38}" /> + <Property Name="UnifiedSize" Value="{{0.0,80},{0.0, 24}}" /> + <Property Name="Text" Value="Back" /> + </Window> + <Window Type="opengate/StaticImage" Name="Config/SubFrame"> + <Property Name="UnifiedPosition" Value="{{0.0,100},{0.0,10}}" /> + <Property Name="UnifiedSize" Value="{{1.0,-110},{1.0, -20}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + </Window> + </Window> + </Window> + </Window> +</GUILayout> Modified: branches/ogsector/data/gui/layouts/opengateDocked.layout =================================================================== --- branches/ogsector/data/gui/layouts/opengateDocked.layout 2007-05-20 19:41:21 UTC (rev 494) +++ branches/ogsector/data/gui/layouts/opengateDocked.layout 2007-05-20 20:42:09 UTC (rev 495) @@ -183,6 +183,10 @@ <Property Name="Image" Value="set:MainWindowTopLeft image:full_image" /> </Window> + <Window Type="opengate/RoundConfigButton" Name="Docked/MainWindow/ConfigButton"> + <Property Name="UnifiedPosition" Value="{{0.0,35},{0.0,75}}" /> + <Property Name="UnifiedSize" Value="{{0.0,18},{0.0,18}}" /> + </Window> <Window Type="opengate/GreyButtonUp" Name="Docked/MainWindow/ConsoleMinButton"> <Property Name="UnifiedPosition" Value="{{0.0,+74},{0.0,+49}}" /> <Property Name="UnifiedSize" Value="{{0.0,13},{0.0,13}}" /> Modified: branches/ogsector/data/gui/schemes/opengate/opengate.imageset =================================================================== --- branches/ogsector/data/gui/schemes/opengate/opengate.imageset 2007-05-20 19:41:21 UTC (rev 494) +++ branches/ogsector/data/gui/schemes/opengate/opengate.imageset 2007-05-20 20:42:09 UTC (rev 495) @@ -34,10 +34,17 @@ <Image Name="GreyButtonDownNormal" XPos="409" YPos="65" Width="13" Height="13" /> <Image Name="GreyButtonDownHover" XPos="424" YPos="65" Width="13" Height="13" /> <Image Name="GreyButtonDownPushed" XPos="439" YPos="65" Width="13" Height="13" /> + <Image Name="RoundConfigButtonNormal" XPos="372" YPos="92" Width="18" Height="18" /> + <Image Name="RoundConfigButtonHover" XPos="391" YPos="92" Width="18" Height="18" /> + <Image Name="RoundConfigButtonPushed" XPos="410" YPos="92" Width="18" Height="18" /> + <Image Name="RoundHelpButtonNormal" XPos="372" YPos="111" Width="18" Height="18" /> + <Image Name="RoundHelpButtonHover" XPos="391" YPos="111" Width="18" Height="18" /> + <Image Name="RoundHelpButtonPushed" XPos="410" YPos="111" Width="18" Height="18" /> <Image Name="ConsoleMouseTextBar" XPos="313" YPos="89" Width="5" Height="14" /> <Image Name="ConsoleMouseEditBoxCarat" XPos="308" YPos="89" Width="1" Height="14" /> + <Image Name="AltProgressLeft" XPos="10" YPos="10" Width="10" Height="10" /> <Image Name="AltProgressMiddle" XPos="20" YPos="10" Width="10" Height="10" /> <Image Name="AltProgressRight" XPos="30" YPos="10" Width="10" Height="10" /> Modified: branches/ogsector/data/gui/schemes/opengate/opengate.png =================================================================== (Binary files differ) Modified: branches/ogsector/data/gui/schemes/opengate/opengate.scheme =================================================================== --- branches/ogsector/data/gui/schemes/opengate/opengate.scheme 2007-05-20 19:41:21 UTC (rev 494) +++ branches/ogsector/data/gui/schemes/opengate/opengate.scheme 2007-05-20 20:42:09 UTC (rev 495) @@ -17,6 +17,7 @@ <ImagesetFromImage Name="MainConsoleFrameHorizontalMiddle" Filename="textures/mainConsoleFrameHorizontalMiddle.png" /> <ImagesetFromImage Name="MainConsoleFrameVerticalSide" Filename="textures/mainConsoleFrameVerticalSide.png" /> <ImagesetFromImage Name="MainConsoleFrameVerticalMiddle" Filename="textures/mainConsoleFrameVerticalMiddle.png" /> + <ImagesetFromImage Name="ConfigMainWindow" Filename="textures/configMain.png" /> <Font Name="BlueHighway-12" Filename="BlueHighway-12.font" /> <Font Name="BlueHighway-10" Filename="BlueHighway-10.font" /> @@ -78,6 +79,16 @@ Renderer="Falagard/SystemButton" LookNFeel="opengate/GreyButtonDown" /> <FalagardMapping + WindowType="opengate/RoundConfigButton" + TargetType="CEGUI/PushButton" + Renderer="Falagard/SystemButton" + LookNFeel="opengate/RoundConfigButton" /> + <FalagardMapping + WindowType="opengate/RoundHelpButton" + TargetType="CEGUI/PushButton" + Renderer="Falagard/SystemButton" + LookNFeel="opengate/RoundHelpButton" /> + <FalagardMapping WindowType="opengate/ConsoleScrollButtonUp" TargetType="CEGUI/PushButton" Renderer="Falagard/SystemButton" Modified: branches/ogsector/data/gui/schemes/opengate/opengateButtons.looknfeel =================================================================== --- branches/ogsector/data/gui/schemes/opengate/opengateButtons.looknfeel 2007-05-20 19:41:21 UTC (rev 494) +++ branches/ogsector/data/gui/schemes/opengate/opengateButtons.looknfeel 2007-05-20 20:42:09 UTC (rev 495) @@ -145,8 +145,6 @@ </Layer> </StateImagery> </WidgetLook> - - <!-- *************************************************** opengate/HorizontalScrollLeftThumb @@ -396,9 +394,133 @@ </Layer> </StateImagery> </WidgetLook> + <!-- + *************************************************** + opengate/RoundConfigButton + *************************************************** + --> + <WidgetLook name="opengate/RoundConfigButton"> + <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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="RoundConfigButtonNormal" /> + </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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="RoundConfigButtonHover" /> + </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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="RoundConfigButtonPushed" /> + </FrameComponent> + </ImagerySection> + <StateImagery name="Normal"> + <Layer> + <Section section="normal" /> + </Layer> + </StateImagery> + <StateImagery name="Hover"> + <Layer> + <Section section="hover" /> + </Layer> + </StateImagery> + <StateImagery name="Pushed"> + <Layer> + <Section section="pushed" /> + </Layer> + </StateImagery> + <StateImagery name="Disabled"> + <Layer> + <Section section="normal"> + <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" /> + </Section> + </Layer> + </StateImagery> + </WidgetLook> <!-- *************************************************** + opengate/RoundHelpButton + *************************************************** + --> + <WidgetLook name="opengate/RoundHelpButton"> + <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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="RoundHelpButtonNormal" /> + </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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="RoundHelpButtonHover" /> + </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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="RoundHelpButtonPushed" /> + </FrameComponent> + </ImagerySection> + <StateImagery name="Normal"> + <Layer> + <Section section="normal" /> + </Layer> + </StateImagery> + <StateImagery name="Hover"> + <Layer> + <Section section="hover" /> + </Layer> + </StateImagery> + <StateImagery name="Pushed"> + <Layer> + <Section section="pushed" /> + </Layer> + </StateImagery> + <StateImagery name="Disabled"> + <Layer> + <Section section="normal"> + <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" /> + </Section> + </Layer> + </StateImagery> + </WidgetLook> + <!-- + *************************************************** opengate/ConsoleScrollButtonUp *************************************************** --> Added: branches/ogsector/data/gui/schemes/opengate/textures/configMain.png =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/schemes/opengate/textures/configMain.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/src/ConfigDialog.cpp =================================================================== --- branches/ogsector/src/ConfigDialog.cpp (rev 0) +++ branches/ogsector/src/ConfigDialog.cpp 2007-05-20 20:42:09 UTC (rev 495) @@ -0,0 +1,66 @@ +/*************************************************************************** + * Copyright (C) 2006-2007 by OpenGate development team * + * spo...@us... * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include "ConfigDialog.h" +#include "common.h" +#include "GameStateManager.h" +#include <CEGUI/elements/CEGUIPushButton.h> + +namespace OpenGate{ + +ConfigDialog::ConfigDialog( DeviceInfo * devices ) + : rootWindow_( CEGUI::WindowManager::getSingleton().loadWindowLayout( "dialogs/ConfigDialog.layout" ) ), + devices_( devices ) { + setupEventHandlers(); + hide(); +} + +ConfigDialog::~ConfigDialog(){ + if ( devices_->guiSystem ){ + if ( devices_->guiSystem->getGUISheet() ){ + devices_->guiSystem->getGUISheet()->removeChildWindow( rootWindow_ ); + } + } + CEGUI::WindowManager::getSingleton().destroyWindow( rootWindow_ ); +} + +void ConfigDialog::show( ){ + visible_ = true; + rootWindow_->show(); + rootWindow_->moveToFront(); +} + +void ConfigDialog::hide( ){ + visible_ = false; + rootWindow_->hide(); +} + +void ConfigDialog::setupEventHandlers(){ + CEGUI::WindowManager& wmgr = CEGUI::WindowManager::getSingleton(); + + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"Config/QuitButton" ), + CEGUI::PushButton::EventClicked, ConfigDialog::handleQuitButton ); +} + +bool ConfigDialog::handleQuitButton( const CEGUI::EventArgs & e ){ + devices_->gameStateRoot->shutdown(); +} + +} // namespace OpenGate Added: branches/ogsector/src/ConfigDialog.h =================================================================== --- branches/ogsector/src/ConfigDialog.h (rev 0) +++ branches/ogsector/src/ConfigDialog.h 2007-05-20 20:42:09 UTC (rev 495) @@ -0,0 +1,60 @@ +/*************************************************************************** + * Copyright (C) 2006-2007 by OpenGate development team * + * spo...@us... * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef _OPENGATE_CONFIGDIALOG__H +#define _OPENGATE_CONFIGDIALOG__H + +#include "GameState.h" +#include <CEGUIWindow.h> + +namespace OpenGate{ + +class ConfigDialog { +public: + ConfigDialog( DeviceInfo * devices ); + ~ConfigDialog(); + + /*! This method is used to show the configuration dialog. */ + void show( ); + + /*! This method is used to hide the configuration dialog. */ + void hide( ); + + inline bool isVisible() const { return visible_; } + + virtual void setupEventHandlers(); + + bool handleQuitButton( const CEGUI::EventArgs & e ); + + bool handleBackButton( const CEGUI::EventArgs & e ); + + CEGUI::Window * rootWindow() { return rootWindow_; } + +protected: + + DeviceInfo * devices_; + + bool visible_; + CEGUI::Window * rootWindow_; +}; + +} //namespace OpenGate + +#endif // _OPENGATE_CONFIGDIALOG__H Modified: branches/ogsector/src/DockedState.cpp =================================================================== --- branches/ogsector/src/DockedState.cpp 2007-05-20 19:41:21 UTC (rev 494) +++ branches/ogsector/src/DockedState.cpp 2007-05-20 20:42:09 UTC (rev 495) @@ -119,9 +119,15 @@ Ogre::Viewport * vp = devices_->renderWindow->addViewport( sceneMgr_->getCamera( "StationCamera" ), 0, 0.0, 0.0, 1.0f, 1.0f ); vp->setBackgroundColour( Ogre::ColourValue( 0, 0, 0) ); minimiseConsole( ); + + CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"Config/BackButton" )->subscribeEvent( + CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber( &DockedState::handleConfigBackButton, this ) ) ; } void DockedState::exit(){ + CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"Config/BackButton" )->removeEvent( + CEGUI::PushButton::EventClicked ); + log_->info("Exiting dockstate"); overlayRootWindow_->hide(); devices_->console->stop(); @@ -142,7 +148,7 @@ bool DockedState::keyPressed( const OIS::KeyEvent & e ){ //** ESCAPE leads to shutdown; - if ( e.key == OIS::KC_ESCAPE) { shutdown(); } + if ( e.key == OIS::KC_ESCAPE) { switchConfigDialog( ); } if ( e.key == 70 ){ // 70 == Roll if ( !consoleMax_ ){ @@ -182,6 +188,8 @@ BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"Docked/MainWindow/Quit" ), CEGUI::PushButton::EventClicked, DockedState::handleQuit ); + BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"Docked/MainWindow/ConfigButton" ), + CEGUI::PushButton::EventClicked, DockedState::handleConfigButton ); BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"Docked/MainWindow/Launch" ), CEGUI::PushButton::EventClicked, DockedState::handleLaunch ); BIND_CEGUI_EVENT( wmgr.getWindow( (CEGUI::utf8*)"Docked/MainWindow/ShipConfigButton" ), @@ -194,26 +202,13 @@ wmgr.getWindow( (CEGUI::utf8*)"Docked/MainWindow/ConsoleBackground" )->subscribeEvent( CEGUI::Window::EventSized, CEGUI::Event::Subscriber(&Console::handleResize, devices_->console ) ) ; - -// wmgr.getWindow( (CEGUI::utf8*)"Docked/MainWindow/ConsoleFrame" )->subscribeEvent( -// CEGUI::Window::EventSized, CEGUI::Event::Subscriber(&Console::handleResize, devices_->console ) ) ; } -bool DockedState::handleQuit( const CEGUI::EventArgs & e ){ - shutdown(); +bool DockedState::switchConfigDialog( ){ + devices_->gameStateRoot->switchConfigDialog( ); return true; } -bool DockedState::handleLaunch( const CEGUI::EventArgs & e ){ - parent_->start( parent_->findByName( "UnDockedState" ) ); - return true; -} - -bool DockedState::handleShipConfigButton( const CEGUI::EventArgs & e ){ - if ( shipConfigDialog_ ) shipConfigDialog_->setVisible( !shipConfigDialog_->isVisible() ); - return true; -} - bool DockedState::maximiseConsole( ){ CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"Docked/MainWindow/ConsoleFrame")-> setHeight(CEGUI::UDim( 0.8, 4.0 )); @@ -232,7 +227,4 @@ return true; } -bool DockedState::handleMaximiseConsole( const CEGUI::EventArgs & e ){ maximiseConsole(); return true; } -bool DockedState::handleMinimiseConsole( const CEGUI::EventArgs & e ){ minimiseConsole(); return true; } - } // namespace OpenGate Modified: branches/ogsector/src/DockedState.h =================================================================== --- branches/ogsector/src/DockedState.h 2007-05-20 19:41:21 UTC (rev 494) +++ branches/ogsector/src/DockedState.h 2007-05-20 20:42:09 UTC (rev 495) @@ -72,18 +72,27 @@ bool maximiseConsole( ); bool minimiseConsole( ); + bool switchConfigDialog( ); - bool handleShipConfigButton( const CEGUI::EventArgs & e ); - bool handleLaunch( const CEGUI::EventArgs & e ); - bool handleQuit( const CEGUI::EventArgs & e ); - bool handleMinimiseConsole( const CEGUI::EventArgs & e ); - bool handleMaximiseConsole( const CEGUI::EventArgs & e ); - protected: DockedState(); virtual ~DockedState(){} - CEGUI::Window * overlayRootWindow_; + inline bool handleQuit( const CEGUI::EventArgs & e ){ shutdown(); return true; } + inline bool handleLaunch( const CEGUI::EventArgs & e ){ + parent_->start( parent_->findByName( "UnDockedState" ) ); + return true; + } + inline bool handleShipConfigButton( const CEGUI::EventArgs & e ){ + if ( shipConfigDialog_ ) shipConfigDialog_->setVisible( !shipConfigDialog_->isVisible() ); + return true; + } + + inline bool handleMaximiseConsole( const CEGUI::EventArgs & e ){ return maximiseConsole(); } + inline bool handleMinimiseConsole( const CEGUI::EventArgs & e ){ return minimiseConsole(); } + inline bool handleConfigBackButton( const CEGUI::EventArgs & e ){ return switchConfigDialog(); } + inline bool handleConfigButton( const CEGUI::EventArgs & e ){ return switchConfigDialog(); } + Ogre::SceneManager * sceneMgr_; ShipConfigDialog * shipConfigDialog_; Modified: branches/ogsector/src/GameState.h =================================================================== --- branches/ogsector/src/GameState.h 2007-05-20 19:41:21 UTC (rev 494) +++ branches/ogsector/src/GameState.h 2007-05-20 20:42:09 UTC (rev 495) @@ -175,6 +175,8 @@ } } + CEGUI::Window * rootWindow() { return overlayRootWindow_; } + protected: /*! Constructor: This should be a private member of an inherited class. */ GameState() {}; @@ -206,6 +208,9 @@ DeviceInfo * devices_; LogManager * log_; + + CEGUI::Window * overlayRootWindow_; + }; #define DECLARE_GAMESTATE_CLASS(T) \ Modified: branches/ogsector/src/GameStateManager.cpp =================================================================== --- branches/ogsector/src/GameStateManager.cpp 2007-05-20 19:41:21 UTC (rev 494) +++ branches/ogsector/src/GameStateManager.cpp 2007-05-20 20:42:09 UTC (rev 495) @@ -29,6 +29,7 @@ #include "InputManager.h" #include "VesselManager.h" #include "UnDockedState.h" +#include "ConfigDialog.h" #include "EntityManager.h" #include <OgreFrameListener.h> @@ -48,6 +49,7 @@ devices_.console = NULL; vesselManager_ = NULL; + configDialog_ = NULL; //** without any gamestate, shutdown immediately; shutdownRequest_ = true; @@ -73,6 +75,8 @@ // // devices_.ogreRoot->renderOneFrame( ); // //} //** end just for test purposes + + configDialog_ = new ConfigDialog( &devices_ ); } GameStateManager::~GameStateManager( ){ @@ -112,6 +116,15 @@ // if ( devices_.ogreRoot ) delete devices_.ogreRoot; } +void GameStateManager::switchConfigDialog( ){ + if ( configDialog_->isVisible() ) { + configDialog_->hide(); + } else{ + configDialog_->show(); + } +} + + void GameStateManager::manageGameState( const std::string & stateName, GameState * state ){ StateInfo newStateInfo; newStateInfo.name = stateName; @@ -217,6 +230,7 @@ if ( !stateStack_.empty() ) { cleanup_( stateStack_.back() ); stateStack_.back()->exit(); + stateStack_.back()->rootWindow()->removeChildWindow( configDialog_->rootWindow() ); stateStack_.pop_back(); } @@ -224,6 +238,7 @@ stateStack_.push_back( state ); init_( state ); stateStack_.back()->enter(); + stateStack_.back()->rootWindow()->addChildWindow( configDialog_->rootWindow() ); } bool GameStateManager::pushGameState( GameState * state ){ Modified: branches/ogsector/src/GameStateManager.h =================================================================== --- branches/ogsector/src/GameStateManager.h 2007-05-20 19:41:21 UTC (rev 494) +++ branches/ogsector/src/GameStateManager.h 2007-05-20 20:42:09 UTC (rev 495) @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2007 by OpenGate development team * + * Copyright (C) 2006-2007 by OpenGate development team * * spo...@us... * * * * This program is free software; you can redistribute it and/or modify * @@ -31,6 +31,7 @@ class LogManager; class InputManager; class VesselManager; +class ConfigDialog; class EquipmentManager; /*! @@ -55,6 +56,9 @@ /*! Destructor that cleans up the states before the instance dies. */ ~GameStateManager(); + ConfigDialog * configDialog() { return configDialog_; } + void switchConfigDialog( ); + /*! Store a game state to manage. */ void manageGameState( const std::string & stateName, GameState * state ); @@ -109,6 +113,8 @@ DeviceInfo devices_; /*! If this is set to true, the game state manager prepares to exit. */ bool shutdownRequest_; + + ConfigDialog * configDialog_; }; } // namespace OpenGate Modified: branches/ogsector/src/Makefile.am =================================================================== --- branches/ogsector/src/Makefile.am 2007-05-20 19:41:21 UTC (rev 494) +++ branches/ogsector/src/Makefile.am 2007-05-20 20:42:09 UTC (rev 495) @@ -16,6 +16,8 @@ tinyxml/tinyxmlparser.cpp \ Console.h \ Console.cpp \ + ConfigDialog.h \ + ConfigDialog.cpp \ Entity.h \ Entity.cpp \ EntityManager.h \ Modified: branches/ogsector/src/ShipConfigDialog.cpp =================================================================== --- branches/ogsector/src/ShipConfigDialog.cpp 2007-05-20 19:41:21 UTC (rev 494) +++ branches/ogsector/src/ShipConfigDialog.cpp 2007-05-20 20:42:09 UTC (rev 495) @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006 by OpenGate development team * + * Copyright (C) 2006-2007 by OpenGate development team * * spo...@us... * * * * This program is free software; you can redistribute it and/or modify * Modified: branches/ogsector/src/UnDockedState.cpp =================================================================== --- branches/ogsector/src/UnDockedState.cpp 2007-05-20 19:41:21 UTC (rev 494) +++ branches/ogsector/src/UnDockedState.cpp 2007-05-20 20:42:09 UTC (rev 495) @@ -24,16 +24,20 @@ #include "networkClient.h" #include "InputManager.h" #include "Console.h" +#include "ConfigDialog.h" #include <iostream> #include <OgreTextAreaOverlayElement.h> #include <OgreFontManager.h> +#include <CEGUI/elements/CEGUIPushButton.h> + namespace OpenGate{ UnDockedState::UnDockedState( ){ consoleMax_ = false; + configMode_ = false; overlayRootWindow_ = NULL; } @@ -179,9 +183,15 @@ } minimiseConsole( ); + + CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"Config/BackButton" )->subscribeEvent( + CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&UnDockedState::handleConfigBackButton, this ) ) ; } void UnDockedState::exit(){ + CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"Config/BackButton" )->removeEvent( + CEGUI::PushButton::EventClicked ) ; + log_->info("Exiting dockstate"); if ( overlayRootWindow_ ) overlayRootWindow_->hide(); if ( devices_->console ) devices_->console->stop(); @@ -198,6 +208,20 @@ sector_->destructAvatar( ); } +bool UnDockedState::switchConfigDialog( ){ + devices_->gameStateRoot->switchConfigDialog( ); + configMode_ = devices_->gameStateRoot->configDialog()->isVisible(); + + if ( configMode_ ){ + hudOverlay_->hide( ); + Ogre::OverlayManager::getSingleton().getByName( "Radar" )->hide(); + } else { + hudOverlay_->show( ); + Ogre::OverlayManager::getSingleton().getByName( "Radar" )->show(); + } + return true; +} + void UnDockedState::setupEventHandlers( ){ CEGUI::WindowManager& wmgr = CEGUI::WindowManager::getSingleton(); @@ -245,18 +269,20 @@ bool UnDockedState::keyPressed( const OIS::KeyEvent & e ){ // std::cout << "UnDockedState: " << e.key << " " << (char)e.key<< std::endl; - //** ESCAPE leads to shutdown; - if ( e.key == OIS::KC_ESCAPE) { shutdown(); } + if ( e.key == OIS::KC_ESCAPE) { + switchConfigDialog(); + } - if ( e.key == 70 ){ // 70 == Roll - if ( !consoleMax_ ){ - maximiseConsole(); - } else { - minimiseConsole(); + if ( !chatMode_ && !configMode_ ){ + + if ( e.key == 70 ){ // 70 == Roll + if ( !consoleMax_ ){ + maximiseConsole(); + } else { + minimiseConsole(); + } } - } - if ( !chatMode_ ){ if ( e.key == OIS::KC_RETURN) { CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ConsoleEdit")->activate(); // hudOverlay_->getChild( overlayName_ + "/ChatIn" )->show( ); @@ -363,173 +389,191 @@ } bool UnDockedState::keyReleased( const OIS::KeyEvent & e ){ - if ( sector_->avatar() != NULL ){ - // Avatar release break - if ( e.key == OIS::KC_NUMPAD3 ) { sector_->avatar()->setBreakPressed( false ); } - - // Avatar release afterburner - if ( e.key == OIS::KC_NUMPAD9 ) { sector_->avatar()->setAfterburnerPressed( false ); } - } + if (!configMode_){ + if ( sector_->avatar() != NULL ){ + // Avatar release break + if ( e.key == OIS::KC_NUMPAD3 ) { sector_->avatar()->setBreakPressed( false ); } + + // Avatar release afterburner + if ( e.key == OIS::KC_NUMPAD9 ) { sector_->avatar()->setAfterburnerPressed( false ); } + } + } return true; } bool UnDockedState::mouseMoved( const OIS::MouseEvent & e ){ - mousePointer_->setLeft( mousePointer_->getLeft( ) + e.state.X.rel ); - mousePointer_->setTop( mousePointer_->getTop( ) + e.state.Y.rel ); - - Ogre::Real mousePointerWidth = mousePointer_->getWidth(); - Ogre::Real mousePointerHeight = mousePointer_->getHeight(); - if ( mousePointer_->getLeft( ) < -mousePointerWidth ) mousePointer_->setLeft( -mousePointerWidth ); - if ( mousePointer_->getTop( ) < -mousePointerHeight ) mousePointer_->setTop( -mousePointerHeight ); - - if ( mousePointer_->getLeft( ) > windowsWidth_-mousePointerWidth ) mousePointer_->setLeft( windowsWidth_- - mousePointerWidth ); - if ( mousePointer_->getTop( ) > windowsHeight_-mousePointerHeight ) mousePointer_->setTop( windowsHeight_- - mousePointerHeight ); - - if ( sector_->avatar() != NULL ){ -// std::cout << "X" << e.state.X.abs << " " << e.state.X.rel << " " << mousePointer_->getLeft( ) << std::endl; -// std::cout << "Y" << e.state.Y.abs << " " << e.state.Y.rel << " " << mousePointer_->getTop( ) << std::endl; -// std::cout << "Z" << e.state.Z.abs << " " << e.state.Z.rel<< std::endl; -// return true; - - int relativToMidPointX = (int)rint( (mousePointer_->getLeft( ) + mousePointerWidth) - windowsHalfWidth_ ); - int relativToMidPointY = (int)rint( (mousePointer_->getTop( ) + mousePointerHeight) - windowsHalfHeight_ ); - - int minActiveZonePercent = 5; - int maxActiveZonePercent = 90; - - double minRadius = ( windowsHeight_ / 2.0 ) * minActiveZonePercent / 100; - double maxRadius = ( windowsHeight_ / 2.0 ) * maxActiveZonePercent / 100; - - Ogre::Real yaw = 0, pitch = 0; - if ( relativToMidPointX < 0 ) { - yaw = (relativToMidPointX+minRadius) / (maxRadius - minRadius); - } else { - yaw = (relativToMidPointX-minRadius) / (maxRadius - minRadius); - } - if ( relativToMidPointY < 0 ) { - pitch = (relativToMidPointY + minRadius) / (maxRadius - minRadius); - } else { - pitch = (relativToMidPointY - minRadius) / (maxRadius - minRadius); - } - - if ( fabs( relativToMidPointX ) < minRadius ) yaw = 0.0; - if ( fabs( relativToMidPointY ) < minRadius ) pitch = 0.0; - - yaw = min( yaw, 1.0f ); yaw = max( yaw, -1.0f ); - pitch = min( pitch, 1.0f ); pitch = max( pitch, -1.0f ); + if (!configMode_){ + mousePointer_->setLeft( mousePointer_->getLeft( ) + e.state.X.rel ); + mousePointer_->setTop( mousePointer_->getTop( ) + e.state.Y.rel ); - // std::cout << ( String("Mouse rel: ") + StringConverter::toString( e.state.X.rel ) + - // String(" ") + StringConverter::toString( e.state.Y.rel ) + - // String(" abs: ") + StringConverter::toString( e.state.X.abs ) + - // String(" ") + StringConverter::toString( e.state.Y.abs ) + - // String(" relMid: ") + StringConverter::toString( relativToMidPointX ) + - // String(" ") + StringConverter::toString( relativToMidPointY ) + - // String(" yaw: ") + StringConverter::toString( yaw ) + - // String(" pitch ") + StringConverter::toString( pitch ) ) << std::endl; + Ogre::Real mousePointerWidth = mousePointer_->getWidth(); + Ogre::Real mousePointerHeight = mousePointer_->getHeight(); + if ( mousePointer_->getLeft( ) < -mousePointerWidth ) mousePointer_->setLeft( -mousePointerWidth ); + if ( mousePointer_->getTop( ) < -mousePointerHeight ) mousePointer_->setTop( -mousePointerHeight ); - sector_->avatar()->setScaledYaw( -yaw ); - sector_->avatar()->setScaledPitch( -pitch ); - } // if avatar; - - if ( e.state.Z.rel < -10 ){ // mouse wheel up - setTarget( sector_->nextTarget() ); - } else if ( e.state.Z.rel > 10 ) { - setTarget( sector_->prevTarget() ); + if ( mousePointer_->getLeft( ) > windowsWidth_-mousePointerWidth ) mousePointer_->setLeft( windowsWidth_- + mousePointerWidth ); + if ( mousePointer_->getTop( ) > windowsHeight_-mousePointerHeight ) mousePointer_->setTop( windowsHeight_- + mousePointerHeight ); + + if ( sector_->avatar() != NULL ){ + // std::cout << "X" << e.state.X.abs << " " << e.state.X.rel << " " << mousePointer_->getLeft( ) << std::endl; + // std::cout << "Y" << e.state.Y.abs << " " << e.state.Y.rel << " " << mousePointer_->getTop( ) << std::endl; + // std::cout << "Z" << e.state.Z.abs << " " << e.state.Z.rel<< std::endl; + // return true; + + int relativToMidPointX = (int)rint( (mousePointer_->getLeft( ) + mousePointerWidth) - windowsHalfWidth_ ); + int relativToMidPointY = (int)rint( (mousePointer_->getTop( ) + mousePointerHeight) - windowsHalfHeight_ ); + + int minActiveZonePercent = 5; + int maxActiveZonePercent = 90; + + double minRadius = ( windowsHeight_ / 2.0 ) * minActiveZonePercent / 100; + double maxRadius = ( windowsHeight_ / 2.0 ) * maxActiveZonePercent / 100; + + Ogre::Real yaw = 0, pitch = 0; + if ( relativToMidPointX < 0 ) { + yaw = (relativToMidPointX+minRadius) / (maxRadius - minRadius); + } else { + yaw = (relativToMidPointX-minRadius) / (maxRadius - minRadius); + } + if ( relativToMidPointY < 0 ) { + pitch = (relativToMidPointY + minRadius) / (maxRadius - minRadius); + } else { + pitch = (relativToMidPointY - minRadius) / (maxRadius - minRadius); + } + + if ( fabs( relativToMidPointX ) < minRadius ) yaw = 0.0; + if ( fabs( relativToMidPointY ) < minRadius ) pitch = 0.0; + + yaw = min( yaw, 1.0f ); yaw = max( yaw, -1.0f ); + pitch = min( pitch, 1.0f ); pitch = max( pitch, -1.0f ); + + // std::cout << ( String("Mouse rel: ") + StringConverter::toString( e.state.X.rel ) + + // String(" ") + StringConverter::toString( e.state.Y.rel ) + + // String(" abs: ") + StringConverter::toString( e.state.X.abs ) + + // String(" ") + StringConverter::toString( e.state.Y.abs ) + + // String(" relMid: ") + StringConverter::toString( relativToMidPointX ) + + // String(" ") + StringConverter::toString( relativToMidPointY ) + + // String(" yaw: ") + StringConverter::toString( yaw ) + + // String(" pitch ") + StringConverter::toString( pitch ) ) << std::endl; + + sector_->avatar()->setScaledYaw( -yaw ); + sector_->avatar()->setScaledPitch( -pitch ); + } // if avatar; + + if ( e.state.Z.rel < -10 ){ // mouse wheel up + setTarget( sector_->nextTarget() ); + } else if ( e.state.Z.rel > 10 ) { + setTarget( sector_->prevTarget() ); + } + } else { + CEGUI::System::getSingleton().injectMouseMove( e.state.X.rel,e.state.Y.rel ); } - return true; } -bool UnDockedState::mousePressed( const OIS::MouseEvent &e , OIS::MouseButtonID button ){ - if ( sector_->avatar() != NULL ){ - // std::cout << "Mouse Button: " << button << std::endl; - if ( button == 0){ - sector_->avatar()->setFirePressed( true ); +bool UnDockedState::mousePressed( const OIS::MouseEvent &e , OIS::MouseButtonID id ){ + if ( !configMode_ ){ + if ( sector_->avatar() != NULL ){ + // std::cout << "Mouse Button: " << id << std::endl; + if ( id == 0){ + sector_->avatar()->setFirePressed( true ); + } } + } else { + CEGUI::System::getSingleton().injectMouseButtonDown( convertOgreButtonToCegui( id ) ); } return true; } -bool UnDockedState::mouseReleased( const OIS::MouseEvent &e , OIS::MouseButtonID button ){ - if ( sector_->avatar() != NULL ){ - // std::cout << "Mouse Button: " << button << std::endl; - if ( button == 0){ - sector_->avatar()->setFirePressed( false); +bool UnDockedState::mouseReleased( const OIS::MouseEvent &e , OIS::MouseButtonID id ){ + if ( !configMode_ ){ + if ( sector_->avatar() != NULL ){ + // std::cout << "Mouse Button: " << id << std::endl; + if ( id == 0){ + sector_->avatar()->setFirePressed( false); + } } + } else{ + CEGUI::System::getSingleton().injectMouseButtonUp( convertOgreButtonToCegui( id ) ); } return true; } bool UnDockedState::axisMoved( const OIS::JoyStickEvent & e, int axis ){ - if ( sector_->avatar() != NULL ){ - //** axis definition for my MS Sidewinder FF2 - int joyStickAxisX = 0; - int joyStickAxisY = 1; - int joyStickAxisZ = 5; - int throwSliderAxis = 6; - double axisScale = 32768; - - //** deadzone; - int minActiveZonePercent = 10; - int maxActiveZonePercent = 95; - - double minRadius = ( axisScale ) * minActiveZonePercent / 100; - double maxRadius = ( axisScale ) * maxActiveZonePercent / 100; - - Ogre::Real yaw = (e.state.mAxes[ joyStickAxisX ].abs) / (maxRadius); - Ogre::Real pitch = (e.state.mAxes[ joyStickAxisY ].abs) / (maxRadius); - Ogre::Real roll = (e.state.mAxes[ joyStickAxisZ ].abs) / (maxRadius); - Ogre::Real thrust = ( -e.state.mAxes[ throwSliderAxis ].abs + axisScale ) / (maxRadius*2); - - yaw = min( yaw, 1.0f ); yaw = max( yaw, -1.0f ); - pitch = min( pitch, 1.0f ); pitch = max( pitch, -1.0f ); - roll = min( roll, 1.0f ); roll = max( roll, -1.0f ); - thrust = min( thrust, 1.0f ); thrust = max( thrust, 0.0f ); - - if ( fabs( e.state.mAxes[ joyStickAxisX ].abs ) < minRadius ) yaw = 0.0; - if ( fabs( e.state.mAxes[ joyStickAxisY ].abs ) < minRadius ) pitch = 0.0; - if ( fabs( e.state.mAxes[ joyStickAxisZ ].abs ) < minRadius ) roll = 0.0; - if ( fabs( -e.state.mAxes[ throwSliderAxis ].abs + axisScale ) < minRadius ) thrust = 0.0; - - //** little deadzone ; - // window_->setDebugText( "Joy Axis: X: " + StringConverter::toString( e.state.mAxes[ joyStickAxisX ].abs ) + - // " Y: " + StringConverter::toString( e.state.mAxes[ joyStickAxisY ].abs ) + - // " Z: " + StringConverter::toString( e.state.mAxes[ joyStickAxisZ ].abs ) + - // " T: " + StringConverter::toString( e.state.mAxes[ throwSliderAxis ].abs ) + - // " yaw: " + StringConverter::toString(yaw) + - // " pitch: " + StringConverter::toString(pitch) + - // " roll: " + StringConverter::toString(roll) + - // " thrust: " + StringConverter::toString(thrust) ); - - sector_->avatar()->setScaledYaw( -yaw ); - sector_->avatar()->setScaledPitch( pitch ); - sector_->avatar()->setScaledRoll( -roll ); - sector_->avatar()->setThrustPercent( thrust * 100. ); - } // if avatar + if ( !configMode_ ){ + if ( sector_->avatar() != NULL ){ + //** axis definition for my MS Sidewinder FF2 + int joyStickAxisX = 0; + int joyStickAxisY = 1; + int joyStickAxisZ = 5; + int throwSliderAxis = 6; + double axisScale = 32768; + + //** deadzone; + int minActiveZonePercent = 10; + int maxActiveZonePercent = 95; + + double minRadius = ( axisScale ) * minActiveZonePercent / 100; + double maxRadius = ( axisScale ) * maxActiveZonePercent / 100; + + Ogre::Real yaw = (e.state.mAxes[ joyStickAxisX ].abs) / (maxRadius); + Ogre::Real pitch = (e.state.mAxes[ joyStickAxisY ].abs) / (maxRadius); + Ogre::Real roll = (e.state.mAxes[ joyStickAxisZ ].abs) / (maxRadius); + Ogre::Real thrust = ( -e.state.mAxes[ throwSliderAxis ].abs + axisScale ) / (maxRadius*2); + + yaw = min( yaw, 1.0f ); yaw = max( yaw, -1.0f ); + pitch = min( pitch, 1.0f ); pitch = max( pitch, -1.0f ); + roll = min( roll, 1.0f ); roll = max( roll, -1.0f ); + thrust = min( thrust, 1.0f ); thrust = max( thrust, 0.0f ); + + if ( fabs( e.state.mAxes[ joyStickAxisX ].abs ) < minRadius ) yaw = 0.0; + if ( fabs( e.state.mAxes[ joyStickAxisY ].abs ) < minRadius ) pitch = 0.0; + if ( fabs( e.state.mAxes[ joyStickAxisZ ].abs ) < minRadius ) roll = 0.0; + if ( fabs( -e.state.mAxes[ throwSliderAxis ].abs + axisScale ) < minRadius ) thrust = 0.0; + + //** little deadzone ; + // window_->setDebugText( "Joy Axis: X: " + StringConverter::toString( e.state.mAxes[ joyStickAxisX ].abs ) + + // " Y: " + StringConverter::toString( e.state.mAxes[ joyStickAxisY ].abs ) + + // " Z: " + StringConverter::toString( e.state.mAxes[ joyStickAxisZ ].abs ) + + // " T: " + StringConverter::toString( e.state.mAxes[ throwSliderAxis ].abs ) + + // " yaw: " + StringConverter::toString(yaw) + + // " pitch: " + StringConverter::toString(pitch) + + // " roll: " + StringConverter::toString(roll) + + // " thrust: " + StringConverter::toString(thrust) ); + + sector_->avatar()->setScaledYaw( -yaw ); + sector_->avatar()->setScaledPitch( pitch ); + sector_->avatar()->setScaledRoll( -roll ); + sector_->avatar()->setThrustPercent( thrust * 100. ); + } // if avatar + } return true; } bool UnDockedState::buttonPressed( const OIS::JoyStickEvent & e , int button){ - // window_->setDebugText( "Joy: " + toStr( button ) ); - - if ( sector_->avatar() != NULL ){ - if ( button == 0){ - sector_->avatar()->setFirePressed( true ); - } - } // if avatar_ + if ( !configMode_ ){ + // window_->setDebugText( "Joy: " + toStr( button ) ); + if ( sector_->avatar() != NULL ){ + if ( button == 0){ + sector_->avatar()->setFirePressed( true ); + } + } // if avatar_ + } return true; } bool UnDockedState::buttonReleased( const OIS::JoyStickEvent & e , int button){ - // window_->setDebugText( "Joy: " + toStr( button ) ); - if ( sector_->avatar() != NULL ){ - - if ( button == 0){ - sector_->avatar()->setFirePressed( false ); - } - } // if avatar_ + if ( !configMode_ ){ + // window_->setDebugText( "Joy: " + toStr( button ) ); + if ( sector_->avatar() != NULL ){ + + if ( button == 0){ + sector_->avatar()->setFirePressed( false ); + } + } // if avatar_ + } return true; } @@ -917,9 +961,6 @@ return true; } -bool UnDockedState::handleMaximiseConsole( const CEGUI::EventArgs & e ){ maximiseConsole(); return true; } -bool UnDockedState::handleMinimiseConsole( const CEGUI::EventArgs & e ){ minimiseConsole(); return true; } - void UnDockedState::spawnAI( const std::string & name ){ sector_->spawnAiObject( name ); } Modified: branches/ogsector/src/UnDockedState.h =================================================================== --- branches/ogsector/src/UnDockedState.h 2007-05-20 19:41:21 UTC (rev 494) +++ branches/ogsector/src/UnDockedState.h 2007-05-20 20:42:09 UTC (rev 495) @@ -51,6 +51,8 @@ void exit(); + bool switchConfigDialog( ); + virtual void setupEventHandlers(); virtual bool frameStarted( const Ogre::FrameEvent & evt ); @@ -76,9 +78,6 @@ bool maximiseConsole( ); bool minimiseConsole( ); - bool handleMinimiseConsole( const CEGUI::EventArgs & e ); - bool handleMaximiseConsole( const CEGUI::EventArgs & e ); - SectorObject * target( ) { return target_; } Sector * sector( ) { return sector_; } @@ -89,12 +88,15 @@ UnDockedState( ); virtual ~UnDockedState( ){} + inline bool handleMaximiseConsole( const CEGUI::EventArgs & e ){ maximiseConsole(); return true; } + inline bool handleMinimiseConsole( const CEGUI::EventArgs & e ){ minimiseConsole(); return true; } + inline bool handleConfigBackButton( const CEGUI::EventArgs & e ){ return switchConfigDialog( ); } + void toggleNextCamera_( ); void updateCamera_( ); void updateHUD_( ); void updateRadar_( ); - CEGUI::Window * overlayRootWindow_; Ogre::RenderWindow * window_; Ogre::Root * root_; Ogre::SceneManager * sceneMgr_; @@ -133,6 +135,7 @@ std::string chatString_; bool chatMode_; + bool configMode_; bool consoleMax_; bool duelistPilot_; bool duelistTarget_; Modified: branches/ogsector/src/opengateclient.cpp =================================================================== --- branches/ogsector/src/opengateclient.cpp 2007-05-20 19:41:21 UTC (rev 494) +++ branches/ogsector/src/opengateclient.cpp 2007-05-20 20:42:09 UTC (rev 495) @@ -38,8 +38,9 @@ log->setLogFile( "OpenGate.log" ); log->setChatLogFile( "OpenGateChat.log" ); log->info("Starting up"); -#ifdef PACKAGE_STRING - log->info(PACKAGE_STRING); + +#ifdef PACKAGE_STRING + log->info(PACKAGE_STRING); #endif std::string username = "testuser"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2007-05-20 19:41:19
|
Revision: 494 http://svn.sourceforge.net/opengate/?rev=494&view=rev Author: egore Date: 2007-05-20 12:41:21 -0700 (Sun, 20 May 2007) Log Message: ----------- now we're able to load ECMs, too Modified Paths: -------------- branches/ogsector/src/EntityManager.cpp Modified: branches/ogsector/src/EntityManager.cpp =================================================================== --- branches/ogsector/src/EntityManager.cpp 2007-05-20 19:30:35 UTC (rev 493) +++ branches/ogsector/src/EntityManager.cpp 2007-05-20 19:41:21 UTC (rev 494) @@ -96,9 +96,30 @@ return NULL; } - // FIXME: we can only load capacitors by now - Capacitor *entity = new Capacitor(); + EquipmentTemplate *entity = 0; + bool isCapacitor = false, isECM = false; //!< \todo Check if that is really necessary, seems hackish. should be somehow done in subclasses or something + std::string equipmentType = pElem->Attribute("type"); + /*! \TODO add check, if type was found */ +#if 0 + if ( equipmentType ) { + log_->fatal( fileName + " has no type of equipment defined" ); + return NULL; + } +#endif + // Found capacitor + if ( strcmp( "Capacitor", equipmentType.c_str() ) == 0 ){ + entity = new Capacitor(); + isCapacitor = true; + } else if ( strcmp( "ECM", equipmentType.c_str() ) == 0 ){ + entity = new ECM(); + isECM = true; + } else { + //! \todo Add logic for things other than capacitor and ECMs + log_->warn( fileName + " has unknown equipment type (mandatory)." ); + return NULL; + } + // Naming pElem = hRoot.ChildElement( "faction", 0 ).Element(); if ( pElem ) { @@ -125,11 +146,20 @@ pElem = hRoot.ChildElement( "mass", 0 ).Element(); if ( pElem ) entity->setMass( toInt( pElem->FirstChild()->Value() ) ); - // Specific Data - pElem = hRoot.ChildElement( "efficiency", 0 ).Element(); - if ( pElem ) entity->setEfficiency( toInt( pElem->FirstChild()->Value() ) ); - pElem = hRoot.ChildElement( "capacity", 0 ).Element(); - if ( pElem ) entity->setCapacity( toInt( pElem->FirstChild()->Value() ) ); + // Specific Data + if ( isCapacitor ) { + pElem = hRoot.ChildElement( "efficiency", 0 ).Element(); + if ( pElem ) static_cast<Capacitor*>(entity)->setEfficiency( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "capacity", 0 ).Element(); + if ( pElem ) static_cast<Capacitor*>(entity)->setCapacity( toInt( pElem->FirstChild()->Value() ) ); + } else if ( isECM ) { + pElem = hRoot.ChildElement( "sensorlevel", 0 ).Element(); + if ( pElem ) static_cast<ECM*>(entity)->setSensorLevel( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "power", 0 ).Element(); + if ( pElem ) static_cast<ECM*>(entity)->setPowerConsumption( toInt( pElem->FirstChild()->Value() ) ); + } else { + //! \todo Add logic for things other than capacitors and ECMs + } if ( templatesByName_.count( entity->name() ) == 0 ){ entity->setID( id ); @@ -137,7 +167,7 @@ templatesByID_[ id ] = entity; factions_.insert( entity->factionName() ); - log_->info( std::string( "Loaded: " ) + entity->factionName() + "/" + entity->name() ); + log_->info( std::string( "Loaded " ) + equipmentType + std::string( ": ") + entity->factionName() + "/" + entity->name() ); } else { log_->warn( std::string( "Equipment with name: " ) + entity->factionName() + "/" + entity->name() + " allready loaded" ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2007-05-20 19:30:37
|
Revision: 493 http://svn.sourceforge.net/opengate/?rev=493&view=rev Author: egore Date: 2007-05-20 12:30:35 -0700 (Sun, 20 May 2007) Log Message: ----------- Move ghost around (sourceforge sucks, we cannot use svn move) Added Paths: ----------- trunk/data/ECMs/ghost.wings trunk/data/ECMs/ghost.xml Removed Paths: ------------- trunk/data/ECMs/Ghost/ Added: trunk/data/ECMs/ghost.wings =================================================================== (Binary files differ) Property changes on: trunk/data/ECMs/ghost.wings ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/data/ECMs/ghost.xml =================================================================== --- trunk/data/ECMs/ghost.xml (rev 0) +++ trunk/data/ECMs/ghost.xml 2007-05-20 19:30:35 UTC (rev 493) @@ -0,0 +1,28 @@ +<?xml version="1.0"?> +<!DOCTYPE equipment SYSTEM "opengate.dtd"> + +<equipment type="ECM"> + <!-- Naming --> + <name>Ghost</name> + <class>Radar Jammer</class> + <faction>Solrain</faction> + <description>TODO</description> + + <!-- Production Data --> + <manufacturer>Amananth</manufacturer> + <production-center>Amananth</production-center> + + <!-- Generic Data --> + <techlevel>8</techlevel> + <size>1</size> + <mass>30</mass> + + <sensorlevel>3</sensorlevel> + <power>970000</power> + + <required-component>Antimony</required-component> + <required-component>RAM</required-component> + <required-component>CPU</required-component> + <required-component>Magnetics</required-component> + +</equipment> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2007-05-20 19:13:42
|
Revision: 492 http://svn.sourceforge.net/opengate/?rev=492&view=rev Author: egore Date: 2007-05-20 12:13:41 -0700 (Sun, 20 May 2007) Log Message: ----------- Add an entity manager that is able to load "everything" (at a later point of development) Subclass EntityManager into the VesselManager Add an equipment manager that is currently able to load capacitors Modified Paths: -------------- branches/ogsector/src/Entity.h branches/ogsector/src/GameStateManager.cpp branches/ogsector/src/GameStateManager.h branches/ogsector/src/Makefile.in branches/ogsector/src/Sector.cpp branches/ogsector/src/VesselManager.cpp branches/ogsector/src/VesselManager.h Added Paths: ----------- branches/ogsector/src/EntityManager.cpp branches/ogsector/src/EntityManager.h branches/ogsector/src/VesselTemplate.h Modified: branches/ogsector/src/Entity.h =================================================================== --- branches/ogsector/src/Entity.h 2007-05-20 16:51:58 UTC (rev 491) +++ branches/ogsector/src/Entity.h 2007-05-20 19:13:41 UTC (rev 492) @@ -49,6 +49,9 @@ inline void setClassName( const std::string & name ) { className_ = name; } inline std::string className( ) const { return className_; } + inline void setID( int id ){ id_ = id; } + inline int id( ) const { return id_; } + inline void setTechLevel( int level ){ techLevel_ = level; } inline int techLevel( ) const { return techLevel_; } @@ -58,6 +61,7 @@ protected: EntityTemplate(): factionName_( "unknown" ), name_( "unknown" ), className_( "unknown" ) { + id_ = 0; techLevel_ = 0; mass_ = 0; } @@ -68,6 +72,8 @@ std::string className_; + int id_; + int techLevel_; /*! The mass of this entity. */ long mass_; Added: branches/ogsector/src/EntityManager.cpp =================================================================== --- branches/ogsector/src/EntityManager.cpp (rev 0) +++ branches/ogsector/src/EntityManager.cpp 2007-05-20 19:13:41 UTC (rev 492) @@ -0,0 +1,158 @@ +/*************************************************************************** + * Copyright (C) 2006-2007 by OpenGate development team * + * eg...@us... * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include "EntityManager.h" +#include "tinyxml/tinyxml.h" + +namespace OpenGate { + +EntityManager::~EntityManager(){ + for ( std::map< int, EntityTemplate * >::iterator it = templatesByID_.begin(); it != templatesByID_.end(); it ++ ){ + delete it->second; + } + templatesByID_.end(); +} + +void EntityManager::load( const std::set < std::string > & resourcePaths, const std::string & resourceName ){ + + for ( std::set < std::string >::iterator it = resourcePaths.begin(); it != resourcePaths.end(); it ++ ){ + std::string resourceFile( (*it) + "/" + resourceName ); + + TiXmlDocument doc( resourceFile ); + bool loadOkay = doc.LoadFile(); + + std::map < int, std::string > entities; + + if ( loadOkay ) { + log_->info( std::string( "open resource file: ") + resourceFile ); + TiXmlHandle docHandle( &doc ); + TiXmlElement* pElem; + TiXmlHandle hRoot( 0 ); + + pElem = docHandle.FirstChildElement().Element(); + hRoot = TiXmlHandle( pElem ); + + if ( pElem ) { + for ( pElem = hRoot.FirstChild( "Resource" ).Element(); pElem != 0; pElem = pElem->NextSiblingElement() ) { + log_->info( std::string( "Found ressource: " ) + pElem->Attribute("location") ); + entities[ toInt( pElem->Attribute("id") ) ] = pElem->Attribute("location"); + } + } else { + log_->fatal( resourceFile + " cannot read first node." ); + } + } else { + // log_->info( resourceFile + " cannot open resourceFile." ); + } + + for ( std::map < int, std::string >::iterator it = entities.begin(); it != entities.end(); it ++ ){ + loadAndCreate( it->first, it->second ); + } + } +} + +EntityTemplate * EquipmentManager::loadAndCreate( int id, const std::string & fileName ){ + + TiXmlDocument doc( fileName ); + bool loadOkay = doc.LoadFile(); + + if ( !loadOkay ) { + log_->fatal( std::string( "Failed to load file: " + fileName ) ); + return NULL; + } + + TiXmlHandle docHandle( &doc ); + TiXmlElement* pElem; + TiXmlNode* pNode; + TiXmlHandle hRoot( 0 ); + + //** block: equipment; + pElem = docHandle.FirstChildElement().Element(); + hRoot = TiXmlHandle( pElem ); + + if ( !pElem ) { + log_->fatal( fileName + " cannot read first node." ); + return NULL; + } + + if ( strcmp( "equipment", pElem->Value() ) != 0 ){ + log_->fatal( fileName + " is no equipment description" ); + return NULL; + } + + // FIXME: we can only load capacitors by now + Capacitor *entity = new Capacitor(); + + // Naming + pElem = hRoot.ChildElement( "faction", 0 ).Element(); + if ( pElem ) { + entity->setFactionName( pElem->FirstChild()->Value() ); + } else { + log_->fatal( fileName + " has no mandatory factionname (mandatory)." ); + return NULL; + } + pElem = hRoot.ChildElement( "name", 0 ).Element(); + if ( pElem ) { + entity->setName( pElem->FirstChild()->Value() ); + } else { + log_->fatal( fileName + " has no name (mandatory)." ); + return NULL; + } + + // Generic Data + pElem = hRoot.ChildElement( "class", 0 ).Element(); + if ( pElem ) entity->setClassName( pElem->FirstChild()->Value() ); + pElem = hRoot.ChildElement( "techlevel", 0 ).Element(); + if ( pElem ) entity->setTechLevel( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "size", 0 ).Element(); + if ( pElem ) entity->setSize( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "mass", 0 ).Element(); + if ( pElem ) entity->setMass( toInt( pElem->FirstChild()->Value() ) ); + + // Specific Data + pElem = hRoot.ChildElement( "efficiency", 0 ).Element(); + if ( pElem ) entity->setEfficiency( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "capacity", 0 ).Element(); + if ( pElem ) entity->setCapacity( toInt( pElem->FirstChild()->Value() ) ); + + if ( templatesByName_.count( entity->name() ) == 0 ){ + entity->setID( id ); + templatesByName_[ entity->name() ] = entity; + templatesByID_[ id ] = entity; + + factions_.insert( entity->factionName() ); + log_->info( std::string( "Loaded: " ) + entity->factionName() + "/" + entity->name() ); + } else { + log_->warn( std::string( "Equipment with name: " ) + entity->factionName() + "/" + entity->name() + + " allready loaded" ); + } + return entity; +} + +template<> EquipmentManager * Ogre::Singleton< EquipmentManager >::ms_Singleton = 0; + +EquipmentManager::EquipmentManager(): EntityManager(){ +} + +EquipmentManager::~EquipmentManager() { +} + +} + + Property changes on: branches/ogsector/src/EntityManager.cpp ___________________________________________________________________ Name: svn:mime-type + text/x-c++src Name: svn:eol-style + native Added: branches/ogsector/src/EntityManager.h =================================================================== --- branches/ogsector/src/EntityManager.h (rev 0) +++ branches/ogsector/src/EntityManager.h 2007-05-20 19:13:41 UTC (rev 492) @@ -0,0 +1,98 @@ +/*************************************************************************** + * Copyright (C) 2006-2007 by OpenGate development team * + * eg...@us... * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef _OPENGATE_ENTITYMANAGER_H +#define _OPENGATE_ENTITYMANAGER_H + +#include "LogManager.h" +#include "Entity.h" + +namespace OpenGate { + +/*! + * \brief This class is the generic class that all extend that like to load + * something from an XML file. + * \author Christoph Brill <eg...@us...> + */ +class EntityManager{ +public: + /*! \brief This method loads equipment and stores it in an interal storage. + * + * The file we load from does not contain the definitions itself, but the + * places where we find the definition files. The loading from the definition + * files is done by loadAndCreate(). + * \param resourcePaths An array of all available resource paths + * \param resourceName The name of the file to load the equipment from */ + void load( const std::set < std::string > & resourcePaths, const std::string & resourceName ); + + inline std::set < std::string > factionNames( ) const { return factions_; } + +protected: + + /*! \brief This loads enities from there definition files, called from load() + * \param id The id of the entity in the places-file + * \param filename The filename we load from the places-file. It's the + * filename of the defintion file. + */ + virtual EntityTemplate * loadAndCreate( int id, const std::string & filename ) = 0; + + EntityManager() { + log_ = LogManager::getSingletonPtr(); + } + + virtual ~EntityManager(); + + LogManager *log_; + + std::map < std::string, EntityTemplate * > templatesByName_; + + std::map < int, EntityTemplate * > templatesByID_; + + std::set < std::string > factions_; +}; + +/*! + * \brief This class is able to load equipment (reactors, engines, guns, etc.) + * from XML files. + * \author Christoph Brill <eg...@us...> + */ +class EquipmentManager : public Ogre::Singleton< EquipmentManager >, public EntityManager{ +public: + + /*! Get the single instance of the EquipmentManager */ + static EquipmentManager & getSingleton( ); + + /*! Get the pointer to single instance of the EquipmentManager */ + static EquipmentManager * getSingletonPtr( ); + + /*! Constructor */ + EquipmentManager(); + + /*! Destructor that free's all loaded vessels */ + virtual ~EquipmentManager(); + + virtual EntityTemplate * loadAndCreate( int id, const std::string & filename ); + +}; + +} // namespace OpenGate + +#endif //_OPENGATE_ENTITYMANAGER_H + Property changes on: branches/ogsector/src/EntityManager.h ___________________________________________________________________ Name: svn:mime-type + text/x-c++hdr Name: svn:eol-style + native Modified: branches/ogsector/src/GameStateManager.cpp =================================================================== --- branches/ogsector/src/GameStateManager.cpp 2007-05-20 16:51:58 UTC (rev 491) +++ branches/ogsector/src/GameStateManager.cpp 2007-05-20 19:13:41 UTC (rev 492) @@ -29,6 +29,7 @@ #include "InputManager.h" #include "VesselManager.h" #include "UnDockedState.h" +#include "EntityManager.h" #include <OgreFrameListener.h> namespace OpenGate { @@ -292,8 +293,11 @@ devices_.console->addCommand( "/ai", &GameStateManager::CMD_spawnAi, "[name] Spawn ai subject. /ai help show all available ships." ); vesselManager_ = new VesselManager( ); - vesselManager_->loadVessels( resourcePaths_, "ships.xml" ); + vesselManager_->load( resourcePaths_, "ships.xml" ); + equipmentManager_ = new EquipmentManager( ); + equipmentManager_->load( resourcePaths_, "equipment.xml" ); + devices_.gameStateRoot = this; return true; Modified: branches/ogsector/src/GameStateManager.h =================================================================== --- branches/ogsector/src/GameStateManager.h 2007-05-20 16:51:58 UTC (rev 491) +++ branches/ogsector/src/GameStateManager.h 2007-05-20 19:13:41 UTC (rev 492) @@ -31,6 +31,7 @@ class LogManager; class InputManager; class VesselManager; +class EquipmentManager; /*! * \brief The class defines the gamestate manager. @@ -99,6 +100,7 @@ LogManager * log_; VesselManager * vesselManager_; + EquipmentManager * equipmentManager_; std::set < std::string > resourcePaths_; std::vector< GameState * > stateStack_; Modified: branches/ogsector/src/Makefile.in =================================================================== --- branches/ogsector/src/Makefile.in 2007-05-20 16:51:58 UTC (rev 491) +++ branches/ogsector/src/Makefile.in 2007-05-20 19:13:41 UTC (rev 492) @@ -51,7 +51,8 @@ am_opengateclient_OBJECTS = opengateclient.$(OBJEXT) common.$(OBJEXT) \ networkClient.$(OBJEXT) tinyxml.$(OBJEXT) \ tinyxmlerror.$(OBJEXT) tinyxmlparser.$(OBJEXT) \ - Console.$(OBJEXT) LogManager.$(OBJEXT) InputManager.$(OBJEXT) \ + Console.$(OBJEXT) Entity.$(OBJEXT) EntityManager.$(OBJEXT) \ + LogManager.$(OBJEXT) InputManager.$(OBJEXT) \ VesselManager.$(OBJEXT) GameStateManager.$(OBJEXT) \ GameState.$(OBJEXT) DockedState.$(OBJEXT) \ ShipConfigDialog.$(OBJEXT) UnDockedState.$(OBJEXT) \ @@ -191,12 +192,17 @@ tinyxml/tinyxmlparser.cpp \ Console.h \ Console.cpp \ + Entity.h \ + Entity.cpp \ + EntityManager.h \ + EntityManager.cpp \ LogManager.h \ LogManager.cpp \ InputManager.h \ InputManager.cpp \ VesselManager.h \ VesselManager.cpp \ + VesselTemplate.h \ GameStateManager.h \ GameStateManager.cpp \ GameState.h \ @@ -306,6 +312,8 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Console.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DockedState.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Entity.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EntityManager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GameState.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GameStateManager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InputManager.Po@am__quote@ Modified: branches/ogsector/src/Sector.cpp =================================================================== --- branches/ogsector/src/Sector.cpp 2007-05-20 16:51:58 UTC (rev 491) +++ branches/ogsector/src/Sector.cpp 2007-05-20 19:13:41 UTC (rev 492) @@ -616,7 +616,7 @@ if ( obj ) { log_->info( std::string( "Send register " ) + obj->name() ); MessageBodyShipRegister msg( obj->userID(), obj->childID(), obj->name(), obj->mainNode()->getPosition(), - obj->vesselBluePrint()->vesselID() ); + obj->vesselBluePrint()->id() ); network_->send( msg ); } Modified: branches/ogsector/src/VesselManager.cpp =================================================================== --- branches/ogsector/src/VesselManager.cpp 2007-05-20 16:51:58 UTC (rev 491) +++ branches/ogsector/src/VesselManager.cpp 2007-05-20 19:13:41 UTC (rev 492) @@ -27,179 +27,132 @@ template<> VesselManager * Ogre::Singleton< VesselManager >::ms_Singleton = 0; -VesselManager::VesselManager(){ - log_ = LogManager::getSingletonPtr(); +VesselManager::VesselManager(): EntityManager(){ } VesselManager::~VesselManager(){ - for ( std::map< int, Vessel * >::iterator it = vesselID_.begin(); it != vesselID_.end(); it ++ ){ - delete it->second; - } - vesselID_.end(); } -void VesselManager::loadVessels( const std::set < std::string > & resourcePaths, const std::string & resourceName ){ +EntityTemplate * VesselManager::loadAndCreate( int vesselID, const std::string & fileName ){ - for ( std::set < std::string >::iterator it = resourcePaths.begin(); it != resourcePaths.end(); it ++ ){ - std::string shipResourceFile( (*it) + "/" + resourceName ); - - TiXmlDocument doc( shipResourceFile ); - bool loadOkay = doc.LoadFile(); - - std::map < int, std::string > ships; - - if ( loadOkay ) { - log_->info( std::string( "open resource file for ships: ") + shipResourceFile ); - TiXmlHandle docHandle( &doc ); - TiXmlElement* pElem; - TiXmlHandle hRoot( 0 ); - - //** block: Ships; - pElem = docHandle.FirstChildElement().Element(); - hRoot = TiXmlHandle( pElem ); - - if ( pElem ) { - for ( pElem = hRoot.FirstChild( "Resource" ).Element(); pElem != 0; pElem = pElem->NextSiblingElement() ) { - log_->info( std::string( "Found ressource: " ) + pElem->Attribute("location") ); - ships[ toInt( pElem->Attribute("id") ) ] = pElem->Attribute("location"); - } - } else { - log_->fatal( shipResourceFile + " cannot read first node." ); - } - } else { - // log_->info( shipResourceFile + " cannot open shipResourceFile." ); - } - - for ( std::map < int, std::string >::iterator it = ships.begin(); it != ships.end(); it ++ ){ - loadAndCreateVessel( it->first, it->second ); - } - } -} - -Vessel * VesselManager::loadAndCreateVessel( int vesselID, const std::string & fileName ){ - TiXmlDocument doc( fileName ); bool loadOkay = doc.LoadFile(); - if ( loadOkay ) { + if ( !loadOkay ) { + log_->fatal( std::string( "Failed to load file: " + fileName ) ); + return NULL; + } - TiXmlHandle docHandle( &doc ); - TiXmlElement* pElem; - TiXmlNode* pNode; - TiXmlHandle hRoot( 0 ); + TiXmlHandle docHandle( &doc ); + TiXmlElement* pElem; + TiXmlNode* pNode; + TiXmlHandle hRoot( 0 ); - //** block: Ship; - pElem = docHandle.FirstChildElement().Element(); - hRoot = TiXmlHandle( pElem ); + //** block: Ship; + pElem = docHandle.FirstChildElement().Element(); + hRoot = TiXmlHandle( pElem ); - if ( !pElem ) { - log_->fatal( fileName + " cannot read first node." ); - return NULL; - } + if ( !pElem ) { + log_->fatal( fileName + " cannot read first node." ); + return NULL; + } - if ( strcmp( "ship", pElem->Value() ) == 0 ){ + if ( strcmp( "ship", pElem->Value() ) != 0 ){ + log_->fatal( fileName + " is no ship description" ); + return NULL; + } - Vessel *vessel = new Vessel(); + Vessel *vessel = new Vessel(); - pElem = hRoot.ChildElement( "faction", 0 ).Element(); - if ( pElem ) { - vessel->setFactionName( pElem->FirstChild()->Value() ); + pElem = hRoot.ChildElement( "faction", 0 ).Element(); + if ( pElem ) { + vessel->setFactionName( pElem->FirstChild()->Value() ); } else { - log_->fatal( fileName + " has no mandatory factionname (mandatory)." ); - return NULL; + log_->fatal( fileName + " has no mandatory factionname (mandatory)." ); + return NULL; } - pElem = hRoot.ChildElement( "name", 0 ).Element(); - if ( pElem ) { - vessel->setName( pElem->FirstChild()->Value() ); - } else { - log_->fatal( fileName + " has no name (mandatory)." ); - return NULL; - } + pElem = hRoot.ChildElement( "name", 0 ).Element(); + if ( pElem ) { + vessel->setName( pElem->FirstChild()->Value() ); + } else { + log_->fatal( fileName + " has no name (mandatory)." ); + return NULL; + } - pElem = hRoot.ChildElement( "class", 0 ).Element(); - if ( pElem ) vessel->setClassName( pElem->FirstChild()->Value() ); + pElem = hRoot.ChildElement( "class", 0 ).Element(); + if ( pElem ) vessel->setClassName( pElem->FirstChild()->Value() ); - pElem = hRoot.ChildElement( "techlevel", 0 ).Element(); - if ( pElem ) vessel->setTechLevel( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "techlevel", 0 ).Element(); + if ( pElem ) vessel->setTechLevel( toInt( pElem->FirstChild()->Value() ) ); - pElem = hRoot.ChildElement( "size", 0 ).Element(); - if ( pElem ) vessel->setBaseSize( toInt( pElem->FirstChild()->Value() ) ); - pElem = hRoot.ChildElement( "baseyaw", 0 ).Element(); - if ( pElem ) vessel->setBaseYaw( toFloat( pElem->FirstChild()->Value() ) ); - pElem = hRoot.ChildElement( "mass", 0 ).Element(); - if ( pElem ) vessel->setMass( toInt( pElem->FirstChild()->Value() ) ); - pElem = hRoot.ChildElement( "armor", 0 ).Element(); - if ( pElem ) vessel->setArmor( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "size", 0 ).Element(); + if ( pElem ) vessel->setBaseSize( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "baseyaw", 0 ).Element(); + if ( pElem ) vessel->setBaseYaw( toFloat( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "mass", 0 ).Element(); + if ( pElem ) vessel->setMass( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "armor", 0 ).Element(); + if ( pElem ) vessel->setArmor( toInt( pElem->FirstChild()->Value() ) ); - pElem = hRoot.ChildElement( "yaw", 0 ).Element(); - if ( pElem ) vessel->setYaw( toFloat( pElem->FirstChild()->Value() ) ); - pElem = hRoot.ChildElement( "pitch", 0 ).Element(); - if ( pElem ) vessel->setPitch( toFloat( pElem->FirstChild()->Value() ) ); - pElem = hRoot.ChildElement( "roll", 0 ).Element(); - if ( pElem ) vessel->setRoll( toFloat( pElem->FirstChild()->Value() ) ); - pElem = hRoot.ChildElement( "dragfactor", 0 ).Element(); - if ( pElem ) vessel->setDragFactor( toFloat( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "yaw", 0 ).Element(); + if ( pElem ) vessel->setYaw( toFloat( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "pitch", 0 ).Element(); + if ( pElem ) vessel->setPitch( toFloat( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "roll", 0 ).Element(); + if ( pElem ) vessel->setRoll( toFloat( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "dragfactor", 0 ).Element(); + if ( pElem ) vessel->setDragFactor( toFloat( pElem->FirstChild()->Value() ) ); - pElem = hRoot.ChildElement( "guns", 0 ).Element(); - if ( pElem ) vessel->setAmountGunHardPoints( toInt( pElem->FirstChild()->Value() ) ); - pElem = hRoot.ChildElement( "engines", 0 ).Element(); - if ( pElem ) vessel->setAmountEngines( toInt( pElem->FirstChild()->Value() ) ); - pElem = hRoot.ChildElement( "modx", 0 ).Element(); - if ( pElem ) vessel->setAmountModX( toInt( pElem->FirstChild()->Value() ) ); - pElem = hRoot.ChildElement( "missiles", 0 ).Element(); - if ( pElem ) vessel->setAmountMissiles( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "guns", 0 ).Element(); + if ( pElem ) vessel->setAmountGunHardPoints( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "engines", 0 ).Element(); + if ( pElem ) vessel->setAmountEngines( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "modx", 0 ).Element(); + if ( pElem ) vessel->setAmountModX( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "missiles", 0 ).Element(); + if ( pElem ) vessel->setAmountMissiles( toInt( pElem->FirstChild()->Value() ) ); - pElem = hRoot.ChildElement( "cargocapacity", 0 ).Element(); - if ( pElem ) vessel->setCargoSize( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "cargocapacity", 0 ).Element(); + if ( pElem ) vessel->setCargoSize( toInt( pElem->FirstChild()->Value() ) ); - pElem = hRoot.ChildElement( "capacitorsize", 0 ).Element(); - if ( pElem ) vessel->setCapacitorSize( toInt( pElem->FirstChild()->Value() ) ); - pElem = hRoot.ChildElement( "powerplantsize", 0 ).Element(); - if ( pElem ) vessel->setPowerPlantSize( toInt( pElem->FirstChild()->Value() ) ); - pElem = hRoot.ChildElement( "enginesize", 0 ).Element(); - if ( pElem ) vessel->setEngineSize( toInt( pElem->FirstChild()->Value() ) ); - pElem = hRoot.ChildElement( "radarsize", 0 ).Element(); - if ( pElem ) vessel->setRadarSize( toInt( pElem->FirstChild()->Value() ) ); - pElem = hRoot.ChildElement( "shieldsize", 0 ).Element(); - if ( pElem ) vessel->setShieldSize( toInt( pElem->FirstChild()->Value() ) ); - pElem = hRoot.ChildElement( "ecmsize", 0 ).Element(); - if ( pElem ) vessel->setEcmSize( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "capacitorsize", 0 ).Element(); + if ( pElem ) vessel->setCapacitorSize( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "powerplantsize", 0 ).Element(); + if ( pElem ) vessel->setPowerPlantSize( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "enginesize", 0 ).Element(); + if ( pElem ) vessel->setEngineSize( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "radarsize", 0 ).Element(); + if ( pElem ) vessel->setRadarSize( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "shieldsize", 0 ).Element(); + if ( pElem ) vessel->setShieldSize( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "ecmsize", 0 ).Element(); + if ( pElem ) vessel->setEcmSize( toInt( pElem->FirstChild()->Value() ) ); - pElem = hRoot.ChildElement( "mesh", 0 ).Element(); - if ( pElem ) { - std::string meshName( pElem->FirstChild()->Value() ); - if ( meshName.find( "/", 0 ) != std::string::npos ){ - vessel->setMesh( meshName, false ); - } else { - vessel->setMesh( meshName, true ); - } - } else { - log_->fatal( fileName + " has no mesh entry" ); - return NULL; - } - - if ( vessels_.count( vessel->name() ) == 0 ){ - vessel->setVesselID( vesselID ); - vessels_[ vessel->name() ] = vessel; - vesselID_[ vesselID ] = vessel; - - factions_.insert( vessel->factionName() ); - log_->info( std::string( "Loaded: " ) + vessel->factionName() + "/" + vessel->name() ); - } else { - log_->warn( std::string( "Ship with name: " ) + vessel->factionName() + "/" + vessel->name() + - " allready loaded" ); - } - - return vessel; + pElem = hRoot.ChildElement( "mesh", 0 ).Element(); + if ( pElem ) { + std::string meshName( pElem->FirstChild()->Value() ); + if ( meshName.find( "/", 0 ) != std::string::npos ){ + vessel->setMesh( meshName, false ); } else { - log_->fatal( fileName + " is no ship description" ); - return NULL; + vessel->setMesh( meshName, true ); } } else { - log_->fatal( std::string( "Failed to load file: " + fileName ) ); + log_->fatal( fileName + " has no mesh entry" ); return NULL; } - return NULL; + + if ( templatesByName_.count( vessel->name() ) == 0 ){ + vessel->setID( vesselID ); + templatesByName_[ vessel->name() ] = vessel; + templatesByID_[ vesselID ] = vessel; + + factions_.insert( vessel->factionName() ); + log_->info( std::string( "Loaded: " ) + vessel->factionName() + "/" + vessel->name() ); + } else { + log_->warn( std::string( "Ship with name: " ) + vessel->factionName() + "/" + vessel->name() + + " allready loaded" ); + } + return vessel; } VesselManager & VesselManager::getSingleton( ){ Modified: branches/ogsector/src/VesselManager.h =================================================================== --- branches/ogsector/src/VesselManager.h 2007-05-20 16:51:58 UTC (rev 491) +++ branches/ogsector/src/VesselManager.h 2007-05-20 19:13:41 UTC (rev 492) @@ -22,174 +22,15 @@ #define VESSELMANAGER__H #include <OgreSingleton.h> -#include <OgreMesh.h> -#include <OgreMeshManager.h> -#include <iostream> -#include <map> #include "LogManager.h" #include "Entity.h" +#include "VesselTemplate.h" +#include "EntityManager.h" namespace OpenGate{ /*! - * \brief This class defines a vessel. - * - * A vessel in opengate is that thing, that the user needs to fly around in - * space. Others might call it "starship", "spaceshit" or something like that. - * A vessel has several properties. It has a weight, a yaw-. a roll- and a - * pitch-latency. It also has a drag factor and many properties more. Each - * vessel must have these options. The data of a vessel is loaded from an XML - * document. This is more or less a logical storage for the vessel, not more and - * not less. - * \todo Check how to load the XML data into a vessel. My first approach was that - * a vessel was passed the name of the XML document and it load everything - * from that file. The better approach would be to create something like - * an XMLManager, that is able to load a vessel by it's name. - * \todo See how to attach objects (capacitory, power plants, weapons) to the - * vessel. - * \author Carsten <spo...@us...> - */ -class Vessel : public EntityTemplate{ -public: - - /*! Constructor creating a dummy vessel */ - Vessel(): EntityTemplate(){ - - vesselID_ = 0; - - vesselSize_ = 10.0; - vesselArmor_ = 1.0; - vesselYaw_ = 0; - - yaw_ = 1.0; - pitch_ = 1.0; - roll_ = 1.0; - dragFactor_ = 1.0; - - amountGunHardPoints_ = 0; - amountEngines_ = 0; - amountModX_ = 0; - amountMissiles_ = 0; - - shieldSize_ = 0; - radarSize_ = 0; - engineSize_ = 0; - capacitorSize_ = 0; - powerPlantSize_ = 0; - cargoSize_ = 0; - ecmSize_ = 0; - - } - - /*! Desctructor */ - ~Vessel(){} - - inline void setVesselID( int id ){ vesselID_ = id; } - inline int vesselID( ) const { return vesselID_; } - - inline void setBaseSize( float vesselSize ){ vesselSize_ = vesselSize; } - inline float baseSize( ) const { return vesselSize_; } - - inline void setBaseYaw( float vesselYaw ){ vesselYaw_ = vesselYaw; } - inline float baseYaw( ) const { return vesselYaw_; } - - inline void setArmor( float vesselArmor ){ vesselArmor_ = vesselArmor; } - inline float armor( ) const { return vesselArmor_; } - - inline void setYaw( float yaw ){ - yaw_ = yaw; if ( yaw_ < 1.0 ) yaw_ = 1000.0 * ( 180.0 * yaw_ ) / 3.141592 ; - } - inline float yaw( ) const { return yaw_; } - - inline void setPitch( float pitch ){ - pitch_ = pitch; if ( pitch_ < 1.0 ) pitch_ = 1000.0 * ( 180.0 * pitch_ ) / 3.141592 ; - } - inline float pitch( ) const { return pitch_; } - - inline void setRoll( float roll ){ - roll_ = roll; if ( roll_ < 1.0 ) roll_ = 1000.0 * ( 180.0 * roll_ ) / 3.141592 ; - } - inline float roll( ) const { return roll_; } - - inline void setDragFactor( float drag ){ dragFactor_ = drag; } - inline float dragFactor( ) const { return dragFactor_; } - - inline void setAmountGunHardPoints( int amount ){ amountGunHardPoints_ = amount; } - inline int amountGunHardPoints( ) const { return amountGunHardPoints_; } - - inline void setAmountEngines( int amount ){ amountEngines_ = amount; } - inline int amountEngines( ) const { return amountEngines_; } - - inline void setAmountModX( int amount ){ amountModX_ = amount; } - inline int amountModX( ) const { return amountModX_; } - - inline void setAmountMissiles( int amount ){ amountMissiles_ = amount; } - inline int amountMissiles( ) const { return amountMissiles_; } - - inline void setShieldSize( int size ){ shieldSize_ = size; } - inline int shieldSize( ) const { return shieldSize_; } - - inline void setRadarSize( int size ){ radarSize_ = size; } - inline int radarSize( ) const { return radarSize_; } - - inline void setEngineSize( int size ){ engineSize_ = size; } - inline int engineSize( ) const { return engineSize_; } - - inline void setCapacitorSize( int size ){ capacitorSize_ = size; } - inline int capacitorSize( ) const { return capacitorSize_; } - - inline void setPowerPlantSize( int size ){ powerPlantSize_ = size; } - inline int powerPlantSize( ) const { return powerPlantSize_; } - - inline void setCargoSize( int size ){ cargoSize_ = size; } - inline int cargoSize( ) const { return cargoSize_; } - - inline void setEcmSize( int size ){ ecmSize_ = size; } - inline int ecmSize( ) const { return ecmSize_; } - - void setMesh( const std::string & meshName, bool genPath = true ){ - std::string fileName; - if ( genPath ){ - fileName = std::string("ships") + PATHSEPARATOR + factionName_ + PATHSEPARATOR + name_ + PATHSEPARATOR + meshName; - } else { - fileName = meshName; - } - pMesh_ = Ogre::MeshManager::getSingleton().load( fileName, "General" ); - // pMesh_ = Ogre::MeshManager::getSingleton().load( meshName, "../../trunk/data/ships/octavius/apteryx/" ); - } - Ogre::MeshPtr & meshPtr( ){ return pMesh_; } - -protected: - int vesselID_; - - float vesselSize_; - float vesselArmor_; - float vesselYaw_; - - float yaw_; - float pitch_; - float roll_; - float dragFactor_; - - int amountEngines_; - int amountGunHardPoints_; - int amountModX_; - int amountMissiles_; - - int cargoSize_; - - int capacitorSize_; - int powerPlantSize_; - int shieldSize_; - int radarSize_; - int engineSize_; - int ecmSize_; - - Ogre::MeshPtr pMesh_; -}; - -/*! * \brief This singleton class is able to load a vessel by it's name * * The vessel manager is a class to handle access to all vessels. This way a @@ -203,7 +44,7 @@ * similar. * \author Carsten <spo...@us...> */ -class VesselManager : public Ogre::Singleton< VesselManager >{ +class VesselManager : public Ogre::Singleton< VesselManager >, public EntityManager{ public: /*! Get the single instance of the VesselManager */ @@ -216,29 +57,24 @@ VesselManager(); /*! Destructor that free's all loaded vessels */ - ~VesselManager(); + virtual ~VesselManager(); - /*! This method loads vessels and stores them in an interal storage - * \param resourcePaths An array of all available resource paths - * \param resourceName The name of the file to load the vessels from */ - void loadVessels( const std::set < std::string > & resourcePaths, const std::string & resourceName ); + virtual EntityTemplate * loadAndCreate( int id, const std::string & filename ); - Vessel * loadAndCreateVessel( int vesselID, const std::string & filename ); - /*! This returns a vessel by it's given unique ID \remarks The vessel needs to be loaded before \param vesselID The unique ID of a vessel */ Vessel * vessel( int vesselID ){ - if ( vesselID_.count( vesselID ) ){ - return vesselID_[ vesselID ]; + if ( templatesByID_.count( vesselID ) ){ + return static_cast<Vessel *>(templatesByID_[ vesselID ]); } else { log_->fatal( std::string( "Requested vessel information for ID: " ) + toStr( vesselID ) + ( "unknown" ) ); return NULL; } } - /*! This returns a vessel by it's given name \remarks The vessel needs to be loaded before \param vesselID The name of a vessel */ + /*! This returns a vessel by it's given name \remarks The vessel needs to be loaded before \param vesselName The name of a vessel */ Vessel * vessel( const std::string & vesselName ){ - if ( vessels_.count( vesselName ) ){ - return vessels_[ vesselName ]; + if ( templatesByName_.count( vesselName ) ){ + return static_cast<Vessel *>(templatesByName_[ vesselName ]); } else { log_->fatal( std::string( "Unknown vessel with name :" ) + vesselName ); return NULL; @@ -249,21 +85,14 @@ std::set < Vessel * > factionVessels( const std::string & factionName ){ std::set < Vessel * > vessels; - for ( std::map < std::string, Vessel * >::iterator it = vessels_.begin(); it != vessels_.end(); it ++ ){ - if ( it->second->factionName() == factionName || factionName == "All" ){ - vessels.insert( it->second ); + for ( std::map < std::string, EntityTemplate * >::iterator it = templatesByName_.begin(); it != templatesByName_.end(); it ++ ){ + if ( static_cast<Vessel *>(it->second)->factionName() == factionName || factionName == "All" ){ + vessels.insert( static_cast<Vessel *>(it->second) ); } } return vessels; } - inline std::set < std::string > factionNames( ) const { return factions_; } - -protected: - LogManager *log_; - std::map < std::string, Vessel * > vessels_; - std::map < int, Vessel * > vesselID_; - std::set < std::string > factions_; }; } //namespace OpenGate{ Added: branches/ogsector/src/VesselTemplate.h =================================================================== --- branches/ogsector/src/VesselTemplate.h (rev 0) +++ branches/ogsector/src/VesselTemplate.h 2007-05-20 19:13:41 UTC (rev 492) @@ -0,0 +1,184 @@ +/*************************************************************************** + * Copyright (C) 2006-2007 by OpenGate development team * + * spo...@us... * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef _OPENGATE_VESSEL__H +#define _OPENGATE_VESSEL__H + +#include "OgreMesh.h" +#include "OgreMeshManager.h" + +#include "Entity.h" + +namespace OpenGate{ + +/*! + * \brief This class defines a vessel. + * + * A vessel in opengate is that thing, that the user needs to fly around in + * space. Others might call it "starship", "spaceshit" or something like that. + * A vessel has several properties. It has a weight, a yaw-. a roll- and a + * pitch-latency. It also has a drag factor and many properties more. Each + * vessel must have these options. The data of a vessel is loaded from an XML + * document. This is more or less a logical storage for the vessel, not more and + * not less. + * \todo Check how to load the XML data into a vessel. My first approach was that + * a vessel was passed the name of the XML document and it load everything + * from that file. The better approach would be to create something like + * an XMLManager, that is able to load a vessel by it's name. + * \todo See how to attach objects (capacitory, power plants, weapons) to the + * vessel. + * \author Carsten <spo...@us...> + */ +class Vessel : public EntityTemplate{ +public: + + /*! Constructor creating a dummy vessel */ + Vessel(): EntityTemplate(){ + + vesselSize_ = 10.0; + vesselArmor_ = 1.0; + vesselYaw_ = 0; + + yaw_ = 1.0; + pitch_ = 1.0; + roll_ = 1.0; + dragFactor_ = 1.0; + + amountGunHardPoints_ = 0; + amountEngines_ = 0; + amountModX_ = 0; + amountMissiles_ = 0; + + shieldSize_ = 0; + radarSize_ = 0; + engineSize_ = 0; + capacitorSize_ = 0; + powerPlantSize_ = 0; + cargoSize_ = 0; + ecmSize_ = 0; + + } + + /*! Desctructor */ + ~Vessel(){} + + inline void setBaseSize( float vesselSize ){ vesselSize_ = vesselSize; } + inline float baseSize( ) const { return vesselSize_; } + + inline void setBaseYaw( float vesselYaw ){ vesselYaw_ = vesselYaw; } + inline float baseYaw( ) const { return vesselYaw_; } + + inline void setArmor( float vesselArmor ){ vesselArmor_ = vesselArmor; } + inline float armor( ) const { return vesselArmor_; } + + inline void setYaw( float yaw ){ + yaw_ = yaw; if ( yaw_ < 1.0 ) yaw_ = 1000.0 * ( 180.0 * yaw_ ) / 3.141592 ; + } + inline float yaw( ) const { return yaw_; } + + inline void setPitch( float pitch ){ + pitch_ = pitch; if ( pitch_ < 1.0 ) pitch_ = 1000.0 * ( 180.0 * pitch_ ) / 3.141592 ; + } + inline float pitch( ) const { return pitch_; } + + inline void setRoll( float roll ){ + roll_ = roll; if ( roll_ < 1.0 ) roll_ = 1000.0 * ( 180.0 * roll_ ) / 3.141592 ; + } + inline float roll( ) const { return roll_; } + + inline void setDragFactor( float drag ){ dragFactor_ = drag; } + inline float dragFactor( ) const { return dragFactor_; } + + inline void setAmountGunHardPoints( int amount ){ amountGunHardPoints_ = amount; } + inline int amountGunHardPoints( ) const { return amountGunHardPoints_; } + + inline void setAmountEngines( int amount ){ amountEngines_ = amount; } + inline int amountEngines( ) const { return amountEngines_; } + + inline void setAmountModX( int amount ){ amountModX_ = amount; } + inline int amountModX( ) const { return amountModX_; } + + inline void setAmountMissiles( int amount ){ amountMissiles_ = amount; } + inline int amountMissiles( ) const { return amountMissiles_; } + + inline void setShieldSize( int size ){ shieldSize_ = size; } + inline int shieldSize( ) const { return shieldSize_; } + + inline void setRadarSize( int size ){ radarSize_ = size; } + inline int radarSize( ) const { return radarSize_; } + + inline void setEngineSize( int size ){ engineSize_ = size; } + inline int engineSize( ) const { return engineSize_; } + + inline void setCapacitorSize( int size ){ capacitorSize_ = size; } + inline int capacitorSize( ) const { return capacitorSize_; } + + inline void setPowerPlantSize( int size ){ powerPlantSize_ = size; } + inline int powerPlantSize( ) const { return powerPlantSize_; } + + inline void setCargoSize( int size ){ cargoSize_ = size; } + inline int cargoSize( ) const { return cargoSize_; } + + inline void setEcmSize( int size ){ ecmSize_ = size; } + inline int ecmSize( ) const { return ecmSize_; } + + void setMesh( const std::string & meshName, bool genPath = true ){ + std::string fileName; + if ( genPath ){ + fileName = std::string("ships") + PATHSEPARATOR + factionName_ + PATHSEPARATOR + name_ + PATHSEPARATOR + meshName; + } else { + fileName = meshName; + } + pMesh_ = Ogre::MeshManager::getSingleton().load( fileName, "General" ); + // pMesh_ = Ogre::MeshManager::getSingleton().load( meshName, "../../trunk/data/ships/octavius/apteryx/" ); + } + Ogre::MeshPtr & meshPtr( ){ return pMesh_; } + +protected: + + float vesselSize_; + float vesselArmor_; + float vesselYaw_; + + float yaw_; + float pitch_; + float roll_; + float dragFactor_; + + int amountEngines_; + int amountGunHardPoints_; + int amountModX_; + int amountMissiles_; + + int cargoSize_; + + int capacitorSize_; + int powerPlantSize_; + int shieldSize_; + int radarSize_; + int engineSize_; + int ecmSize_; + + Ogre::MeshPtr pMesh_; +}; + +} + +#endif //_OPENGATE_VESSEL__H Property changes on: branches/ogsector/src/VesselTemplate.h ___________________________________________________________________ Name: svn:mime-type + text/x-c++hdr Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2007-05-20 16:51:57
|
Revision: 491 http://svn.sourceforge.net/opengate/?rev=491&view=rev Author: egore Date: 2007-05-20 09:51:58 -0700 (Sun, 20 May 2007) Log Message: ----------- Add file with handles to equipment (like ships.xml) Added Paths: ----------- branches/ogsector/data/equipment.xml Added: branches/ogsector/data/equipment.xml =================================================================== --- branches/ogsector/data/equipment.xml (rev 0) +++ branches/ogsector/data/equipment.xml 2007-05-20 16:51:58 UTC (rev 491) @@ -0,0 +1,5 @@ +<?xml version="1.0"?> + +<capacitor> + <Resource id="1" location="../../trunk/data/capacitors/s_c_15.xml"/> +</capacitor> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2007-05-20 16:40:26
|
Revision: 490 http://svn.sourceforge.net/opengate/?rev=490&view=rev Author: egore Date: 2007-05-20 09:40:27 -0700 (Sun, 20 May 2007) Log Message: ----------- Forgot to add Entity.{cpp|h} to the build system Modified Paths: -------------- branches/ogsector/src/Entity.h branches/ogsector/src/Makefile.am Modified: branches/ogsector/src/Entity.h =================================================================== --- branches/ogsector/src/Entity.h 2007-05-20 16:19:27 UTC (rev 489) +++ branches/ogsector/src/Entity.h 2007-05-20 16:40:27 UTC (rev 490) @@ -21,6 +21,9 @@ #ifndef _OPENGATE_ENTITY_H #define _OPENGATE_ENTITY_H +#include <string> +#include <vector> + namespace OpenGate{ class Commodity; Modified: branches/ogsector/src/Makefile.am =================================================================== --- branches/ogsector/src/Makefile.am 2007-05-20 16:19:27 UTC (rev 489) +++ branches/ogsector/src/Makefile.am 2007-05-20 16:40:27 UTC (rev 490) @@ -16,12 +16,17 @@ tinyxml/tinyxmlparser.cpp \ Console.h \ Console.cpp \ + Entity.h \ + Entity.cpp \ + EntityManager.h \ + EntityManager.cpp \ LogManager.h \ LogManager.cpp \ InputManager.h \ InputManager.cpp \ VesselManager.h \ VesselManager.cpp \ + VesselTemplate.h \ GameStateManager.h \ GameStateManager.cpp \ GameState.h \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2007-05-20 16:19:34
|
Revision: 489 http://svn.sourceforge.net/opengate/?rev=489&view=rev Author: egore Date: 2007-05-20 09:19:27 -0700 (Sun, 20 May 2007) Log Message: ----------- Add a few equipment parts that can be plugged into a vessel Add a generic stucture that all objects (after loading them from XML files) end in Modified Paths: -------------- branches/ogsector/src/VesselManager.h Added Paths: ----------- branches/ogsector/src/Entity.cpp branches/ogsector/src/Entity.h Added: branches/ogsector/src/Entity.cpp =================================================================== --- branches/ogsector/src/Entity.cpp (rev 0) +++ branches/ogsector/src/Entity.cpp 2007-05-20 16:19:27 UTC (rev 489) @@ -0,0 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006-2007 by OpenGate development team * + * eg...@us... * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include "Entity.h" + Property changes on: branches/ogsector/src/Entity.cpp ___________________________________________________________________ Name: svn:mime-type + text/x-c++src Name: svn:eol-style + native Added: branches/ogsector/src/Entity.h =================================================================== --- branches/ogsector/src/Entity.h (rev 0) +++ branches/ogsector/src/Entity.h 2007-05-20 16:19:27 UTC (rev 489) @@ -0,0 +1,232 @@ +/*************************************************************************** + * Copyright (C) 2006-2007 by OpenGate development team * + * eg...@us... * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef _OPENGATE_ENTITY_H +#define _OPENGATE_ENTITY_H + +namespace OpenGate{ + +class Commodity; + +/*! + * \brief This class definies the basic structure of all entity templates. + * + * Opengate is able to load information about so called entities from XML files. + * These information are loaded into so called templates. These aren't "real" + * entities, but it's like a blueprint to construct an entity from. Every entity + * in Opengate is a child of this base entity template. + * \author Christoph Brill <eg...@us...> + */ +class EntityTemplate{ +public: + + inline void setFactionName( const std::string & name ) { factionName_ = name; } + inline std::string factionName( ) const { return factionName_; } + + inline void setName( const std::string & name ) { name_ = name; } + inline std::string name( ) const { return name_; } + + inline void setClassName( const std::string & name ) { className_ = name; } + inline std::string className( ) const { return className_; } + + inline void setTechLevel( int level ){ techLevel_ = level; } + inline int techLevel( ) const { return techLevel_; } + + inline void setMass( long mass ){ mass_ = mass; } + inline long mass( ) const { return mass_; } + +protected: + + EntityTemplate(): factionName_( "unknown" ), name_( "unknown" ), className_( "unknown" ) { + techLevel_ = 0; + mass_ = 0; + } + + std::string factionName_; + + std::string name_; + + std::string className_; + + int techLevel_; + /*! The mass of this entity. */ + long mass_; + +}; + +/** + * \brief This abstract class defines the basics for Eqiupment that is plugged + * into a vessel. + * + * So if you plug in an engine (which is a child class of this) you plug in an + * equipment part. It has power consumption, a size, etc. This class only + * defines whatever is common for all equipments parts (i.e. size). + * + * \author Christoph Brill <eg...@us...> + */ +class EquipmentTemplate : public EntityTemplate{ +public: + + inline void setSize( short size ){ size_ = size; } + inline short size( ) const { return size_; } + +protected: + EquipmentTemplate(): EntityTemplate() { + size_ = 0; + } + + std::string _description; + // TODO: Company* _manufacturer; + // TODO: std::vector<char*> _productioncenter; + + /*! The amount of slots necessary to plug in such a device. */ + short size_; + + std::vector<Commodity> _requierd_component[]; + +}; + +/*! + * \brief This class stores the basical information of a capactitor + * + * This class, like all other equipment classes, is filled by loading the + * information from an XML file. It defines the details for a capacitor, which + * is a component that is plugged into the ship. + * \author Christoph Brill <eg...@us...> + */ +class Capacitor : public EquipmentTemplate{ +public: + + Capacitor(): EquipmentTemplate() { + efficiency_ = 0; + capacity_ = 0; + } + + inline void setEfficiency( long efficiency ) { efficiency_ = efficiency; } + inline long efficiency( ) { return efficiency_; } + + inline void setCapacity( long capacity ) { capacity_ = capacity; } + inline long capacity( ) { return capacity_; } + +private: + /*! Stores the efficiency of a capacitor */ + long efficiency_; + /*! Stores the capacity of a capacitor */ + long capacity_; +}; + +/*! + * \brief This class stores the basical information of an ECM (Evasion and Counter Measures) + * + * This class, like all other equipment classes, is filled by loading the + * information from an XML file. It defines the details for a ECM, which + * is a component that is plugged into the ship. + * \author Christoph Brill <eg...@us...> + */ +class ECM : public EquipmentTemplate{ +public: + + ECM(): EquipmentTemplate() { + sensorLevel_ = 0; + powerConsumption_ = 0; + } + + inline void setSensorLevel( short sensorLevel ) { sensorLevel_ = sensorLevel; } + inline short sensorLevel( ) { return sensorLevel_; } + + inline void setPowerConsumption( long powerConsumption ) { powerConsumption_ = powerConsumption; } + inline long powerConsumption( ) { return powerConsumption_; } + +private: + /*! Stores the sensorlevel of this ECM */ + short sensorLevel_; + /*! Stores the power consumption of this ECM */ + long powerConsumption_; +}; + +/*! + * \brief This class stores the basical information of an engine + * + * This class, like all other equipment classes, is filled by loading the + * information from an XML file. It defines the details for an engine, which + * is a component that is plugged into the ship. + * \author Christoph Brill <eg...@us...> + */ +class Engine : public EquipmentTemplate { +public: + + Engine(): EquipmentTemplate() { + efficiency_ = 0.0; + maxThrust_ = 0; + } + + inline void setEfficiency( double efficiency ) { efficiency_ = efficiency; } + inline double efficiency( ) { return efficiency_; } + + inline void setMaxThrust( long maxThrust ) { maxThrust_ = maxThrust; } + inline long maxThrust( ) { return maxThrust_; } + +private: + /*! Stores the efficiency of this engine */ + double efficiency_; + /*! Stores the maximum thrust of this engine */ + long maxThrust_; +}; + +/*! + * \brief This class defines a commodity (goods, ore, etc. to build stuff from) + * + * This class is handled like equipment. But since it's not plugable into a + * ship it's a seperate class. This stores some information about a commodity, + * like its mass, its melting point, etc. + * \author Christoph Brill <eg...@us...> + */ +class Commodity : public EntityTemplate{ +public: + + Commodity(): EntityTemplate(), id_( "unknown" ) { + meltingPoint_ = 0; + graviticSig_ = 0.0; + } + + inline void setProductionCenters( const std::vector<std::string> & productionCenter ) { productionCenter_ = productionCenter; } + inline std::vector<std::string> productionCenters( ) const { return productionCenter_; } + + inline void setId( const std::string & id ) { id_ = id; } + inline std::string id( ) const { return id_; } + + inline void setMeltingPoint( int meltingPoint ){ meltingPoint_ = meltingPoint; } + inline int meltingPoint( ) const { return meltingPoint_; } + + inline void setGraviticSig( double graviticSig ){ graviticSig_ = graviticSig; } + inline double graviticSig( ) const { return graviticSig_; } + +protected: + std::vector<std::string> productionCenter_; + std::string id_; + + int meltingPoint_; + double graviticSig_; +}; + +} // namespace OpenGate + +#endif //_OPENGATE_ENTITY_H + Property changes on: branches/ogsector/src/Entity.h ___________________________________________________________________ Name: svn:mime-type + text/x-c++hdr Name: svn:eol-style + native Modified: branches/ogsector/src/VesselManager.h =================================================================== --- branches/ogsector/src/VesselManager.h 2007-05-20 14:56:59 UTC (rev 488) +++ branches/ogsector/src/VesselManager.h 2007-05-20 16:19:27 UTC (rev 489) @@ -28,6 +28,7 @@ #include <map> #include "LogManager.h" +#include "Entity.h" namespace OpenGate{ @@ -49,17 +50,15 @@ * vessel. * \author Carsten <spo...@us...> */ -class Vessel{ +class Vessel : public EntityTemplate{ public: /*! Constructor creating a dummy vessel */ - Vessel(): factionName_( "unknown" ), name_( "unknown" ), className_( "unknown" ){ + Vessel(): EntityTemplate(){ vesselID_ = 0; - techLevel_ = 0; vesselSize_ = 10.0; - vesselMass_ = 1.0; vesselArmor_ = 1.0; vesselYaw_ = 0; @@ -86,30 +85,15 @@ /*! Desctructor */ ~Vessel(){} - inline void setFactionName( const std::string & name ) { factionName_ = name; } - inline std::string factionName( ) const { return factionName_; } - - inline void setName( const std::string & name ) { name_ = name; } - inline std::string name( ) const { return name_; } - - inline void setClassName( const std::string & name ) { className_ = name; } - inline std::string className( ) const { return className_; } - inline void setVesselID( int id ){ vesselID_ = id; } inline int vesselID( ) const { return vesselID_; } - inline void setTechLevel( int level ){ techLevel_ = level; } - inline int techLevel( ) const { return techLevel_; } - inline void setBaseSize( float vesselSize ){ vesselSize_ = vesselSize; } inline float baseSize( ) const { return vesselSize_; } inline void setBaseYaw( float vesselYaw ){ vesselYaw_ = vesselYaw; } inline float baseYaw( ) const { return vesselYaw_; } - inline void setMass( float vesselMass ){ vesselMass_ = vesselMass; } - inline float mass( ) const { return vesselMass_; } - inline void setArmor( float vesselArmor ){ vesselArmor_ = vesselArmor; } inline float armor( ) const { return vesselArmor_; } @@ -177,14 +161,9 @@ Ogre::MeshPtr & meshPtr( ){ return pMesh_; } protected: - std::string factionName_; - std::string name_; - std::string className_; - int techLevel_; int vesselID_; float vesselSize_; - float vesselMass_; float vesselArmor_; float vesselYaw_; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ult...@us...> - 2007-05-20 14:57:18
|
Revision: 488 http://svn.sourceforge.net/opengate/?rev=488&view=rev Author: ultrasick Date: 2007-05-20 07:56:59 -0700 (Sun, 20 May 2007) Log Message: ----------- used modifiers where they where reasonable but also reverted some changes. The modifier settings caused some wanted sharp edges to become round. btw: the usage of modifiers didn't affect the required RAM at all. It's about 32 MB Modified Paths: -------------- trunk/data/power_plants/contender_xl.blend Modified: trunk/data/power_plants/contender_xl.blend =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ult...@us...> - 2007-05-20 01:25:56
|
Revision: 487 http://svn.sourceforge.net/opengate/?rev=487&view=rev Author: ultrasick Date: 2007-05-19 18:25:58 -0700 (Sat, 19 May 2007) Log Message: ----------- removed textures again. they looked totaly horrible Modified Paths: -------------- trunk/data/stations/tauseti/tauseti_wake.blend Modified: trunk/data/stations/tauseti/tauseti_wake.blend =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ult...@us...> - 2007-05-19 22:32:34
|
Revision: 486 http://svn.sourceforge.net/opengate/?rev=486&view=rev Author: ultrasick Date: 2007-05-19 15:32:10 -0700 (Sat, 19 May 2007) Log Message: ----------- first 2 faces are textured. I hope you like the style Modified Paths: -------------- trunk/data/stations/tauseti/tauseti_wake.blend Modified: trunk/data/stations/tauseti/tauseti_wake.blend =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2007-05-19 20:21:59
|
Revision: 485 http://svn.sourceforge.net/opengate/?rev=485&view=rev Author: egore Date: 2007-05-19 13:22:01 -0700 (Sat, 19 May 2007) Log Message: ----------- Use the blender modifiers so that I can open that file on my system (with 512 mb ram only), too. Modified Paths: -------------- trunk/data/power_plants/contender_xl.blend Modified: trunk/data/power_plants/contender_xl.blend =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2007-05-19 17:14:00
|
Revision: 484 http://svn.sourceforge.net/opengate/?rev=484&view=rev Author: egore Date: 2007-05-19 10:14:00 -0700 (Sat, 19 May 2007) Log Message: ----------- [Bugfix] Remove some bogus faces [Bugfix] Disable double sided faces Modified Paths: -------------- trunk/data/stations/tauseti/tauseti_core.blend trunk/data/stations/tauseti/tauseti_wake.blend Modified: trunk/data/stations/tauseti/tauseti_core.blend =================================================================== (Binary files differ) Modified: trunk/data/stations/tauseti/tauseti_wake.blend =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2007-05-19 17:04:03
|
Revision: 483 http://svn.sourceforge.net/opengate/?rev=483&view=rev Author: egore Date: 2007-05-19 10:04:02 -0700 (Sat, 19 May 2007) Log Message: ----------- Add Tauseti Core (some issues remain, but all in all looks good) Added Paths: ----------- trunk/data/stations/tauseti/tauseti_core.blend Added: trunk/data/stations/tauseti/tauseti_core.blend =================================================================== (Binary files differ) Property changes on: trunk/data/stations/tauseti/tauseti_core.blend ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spo...@us...> - 2007-05-19 16:40:35
|
Revision: 482 http://svn.sourceforge.net/opengate/?rev=482&view=rev Author: spom_spom Date: 2007-05-19 09:40:34 -0700 (Sat, 19 May 2007) Log Message: ----------- win compatibility commit Modified Paths: -------------- branches/ogsector/src/opengateclient.cpp branches/ogsector/win32/ogsectorclient/ogsectorclient.cbp branches/ogsector/win32/ogsectorclient/ogsectorclient.exe Modified: branches/ogsector/src/opengateclient.cpp =================================================================== --- branches/ogsector/src/opengateclient.cpp 2007-05-19 16:05:05 UTC (rev 481) +++ branches/ogsector/src/opengateclient.cpp 2007-05-19 16:40:34 UTC (rev 482) @@ -38,7 +38,9 @@ log->setLogFile( "OpenGate.log" ); log->setChatLogFile( "OpenGateChat.log" ); log->info("Starting up"); - log->info(PACKAGE_STRING); +#ifdef PACKAGE_STRING + log->info(PACKAGE_STRING); +#endif std::string username = "testuser"; std::string hostname = "localhost"; @@ -61,15 +63,15 @@ asio::io_service io_service; OpenGate::NetworkClient nw( io_service, hostname ); - + if ( nw.online() ){ // //** waiting for userid; asio::thread t( boost::bind( & asio::io_service::run, & io_service ) ); - + while( nw.online() && nw.userID() == 0 ){ myMSleep( 100 ); } - + log->info( std::string( "Userid: " + toStr(nw.userID() ) ) ); log->info( std::string( "Login user: " + username + " to: " + nw.hostname() ) ); nw.login( username ); @@ -77,7 +79,7 @@ nw.setUserName( username ); log->info( "Offline mode." ); } - + try { OpenGate::GameStateManager gameStateMgr( nw, dialog ); OpenGate::DockedState::create( &gameStateMgr, "DockedState" ); @@ -86,7 +88,7 @@ } catch( Ogre::Exception& e ) { #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 - MessageBox( NULL, e.getFullDescription().c_str(), + MessageBox( NULL, e.getFullDescription().c_str(), "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL); #else log->fatal( std::string("An exception has occured: ") + e.getFullDescription().c_str() ); Modified: branches/ogsector/win32/ogsectorclient/ogsectorclient.cbp =================================================================== --- branches/ogsector/win32/ogsectorclient/ogsectorclient.cbp 2007-05-19 16:05:05 UTC (rev 481) +++ branches/ogsector/win32/ogsectorclient/ogsectorclient.cbp 2007-05-19 16:40:34 UTC (rev 482) @@ -55,6 +55,8 @@ <Add directory="C:\OgreSDK\lib" /> <Add directory="C:\OgreSDK\bin\Release" /> </Linker> + <Unit filename="..\..\src\Console.cpp" /> + <Unit filename="..\..\src\Console.h" /> <Unit filename="..\..\src\DockedState.cpp" /> <Unit filename="..\..\src\DockedState.h" /> <Unit filename="..\..\src\GameState.cpp" /> @@ -80,8 +82,6 @@ <Unit filename="..\..\src\networkClient.cpp" /> <Unit filename="..\..\src\networkClient.h" /> <Unit filename="..\..\src\networkProtocol.h" /> - <Unit filename="..\..\src\ogconsole.cpp" /> - <Unit filename="..\..\src\ogconsole.h" /> <Unit filename="..\..\src\opengateclient.cpp" /> <Unit filename="..\..\src\tinyxml\tinyxml.cpp" /> <Unit filename="..\..\src\tinyxml\tinyxml.h" /> Modified: branches/ogsector/win32/ogsectorclient/ogsectorclient.exe =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spo...@us...> - 2007-05-19 16:05:04
|
Revision: 481 http://svn.sourceforge.net/opengate/?rev=481&view=rev Author: spom_spom Date: 2007-05-19 09:05:05 -0700 (Sat, 19 May 2007) Log Message: ----------- Forgot some pics Added Paths: ----------- branches/ogsector/data/gui/schemes/opengate/textures/mainConsoleFrameBottomLeft.png branches/ogsector/data/gui/schemes/opengate/textures/mainConsoleFrameBottomRight.png branches/ogsector/data/gui/schemes/opengate/textures/mainConsoleFrameHorizontalMiddle.png branches/ogsector/data/gui/schemes/opengate/textures/mainConsoleFrameHorizontalSide.png branches/ogsector/data/gui/schemes/opengate/textures/mainConsoleFrameVerticalMiddle.png branches/ogsector/data/gui/schemes/opengate/textures/mainConsoleFrameVerticalSide.png Added: branches/ogsector/data/gui/schemes/opengate/textures/mainConsoleFrameBottomLeft.png =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/schemes/opengate/textures/mainConsoleFrameBottomLeft.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/data/gui/schemes/opengate/textures/mainConsoleFrameBottomRight.png =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/schemes/opengate/textures/mainConsoleFrameBottomRight.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/data/gui/schemes/opengate/textures/mainConsoleFrameHorizontalMiddle.png =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/schemes/opengate/textures/mainConsoleFrameHorizontalMiddle.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/data/gui/schemes/opengate/textures/mainConsoleFrameHorizontalSide.png =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/schemes/opengate/textures/mainConsoleFrameHorizontalSide.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/data/gui/schemes/opengate/textures/mainConsoleFrameVerticalMiddle.png =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/schemes/opengate/textures/mainConsoleFrameVerticalMiddle.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/data/gui/schemes/opengate/textures/mainConsoleFrameVerticalSide.png =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/schemes/opengate/textures/mainConsoleFrameVerticalSide.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spo...@us...> - 2007-05-19 15:46:19
|
Revision: 480 http://svn.sourceforge.net/opengate/?rev=480&view=rev Author: spom_spom Date: 2007-05-19 08:46:19 -0700 (Sat, 19 May 2007) Log Message: ----------- Improved console, add console commands: /quit /help /time /ai. Removed F12 for spawn use /ai instead. Modified Paths: -------------- branches/ogsector/ToDo branches/ogsector/data/gui/layouts/dialogs/ShipConfigDialog.layout branches/ogsector/data/gui/layouts/opengateDocked.layout branches/ogsector/data/gui/schemes/opengate/opengate.imageset branches/ogsector/data/gui/schemes/opengate/opengate.png branches/ogsector/data/gui/schemes/opengate/opengate.scheme branches/ogsector/data/gui/schemes/opengate/opengateButtons.looknfeel branches/ogsector/data/gui/schemes/opengate/opengateScroll.looknfeel branches/ogsector/data/gui/schemes/opengate/opengateStatic.looknfeel branches/ogsector/data/simpleHUD.overlay branches/ogsector/runServer.sh branches/ogsector/src/DockedState.cpp branches/ogsector/src/DockedState.h branches/ogsector/src/GameState.h branches/ogsector/src/GameStateManager.cpp branches/ogsector/src/GameStateManager.h branches/ogsector/src/LogManager.cpp branches/ogsector/src/LogManager.h branches/ogsector/src/Makefile.am branches/ogsector/src/Makefile.in branches/ogsector/src/Sector.cpp branches/ogsector/src/Sector.h branches/ogsector/src/SectorObjects.cpp branches/ogsector/src/ShipConfigDialog.cpp branches/ogsector/src/ShipConfigDialog.h branches/ogsector/src/UnDockedState.cpp branches/ogsector/src/UnDockedState.h branches/ogsector/src/VesselManager.h branches/ogsector/src/common.cpp branches/ogsector/src/common.h branches/ogsector/src/networkClient.cpp branches/ogsector/src/networkServer.cpp branches/ogsector/src/networkServer.h branches/ogsector/src/opengateserver.cpp Added Paths: ----------- branches/ogsector/data/gui/layouts/opengateConsole.layout branches/ogsector/data/gui/layouts/opengateUnDocked.layout branches/ogsector/data/gui/schemes/opengate/opengateLists.looknfeel branches/ogsector/src/Console.cpp branches/ogsector/src/Console.h Removed Paths: ------------- branches/ogsector/data/gui/schemes/opengate/textures/scrollbar/ branches/ogsector/src/ogconsole.cpp branches/ogsector/src/ogconsole.h Modified: branches/ogsector/ToDo =================================================================== --- branches/ogsector/ToDo 2007-05-19 12:21:50 UTC (rev 479) +++ branches/ogsector/ToDo 2007-05-19 15:46:19 UTC (rev 480) @@ -146,4 +146,8 @@ - Spieler kann sich mit geeignetem Scanner eine eigene Datenbank von Astro erstellen die ingame abgerufen werden kann, f\xFCr jeden neuen Eintrag gibt es exp(nach Mission/Seltenheit/Gefahrenbereich) - das erleichtert das Leben (kein Papierkram) und sorgt f\xFCr spielerentropie - -Leuchtfeuer, manuel und als sectorobject \ No newline at end of file + -Leuchtfeuer, manuel und als sectorobject + + -Fire: Funke, Brand, Leuchtfeuer, Phoenix, Fl\xE4chenbrand, Feuerball, Hephaistos, Vulkanus, Hitze, Flamme, Sonne, Plasma, Hestia = (griech.) G\xF6ttin des Herdfeuers, Loki = (germ.) Gott des Feuers, Pele = (polyn.) G\xF6ttin der Vulkane und des Feuers, Asche + + -Wave: Brandung,Tsunami,Kr\xE4usel, Rayleigh waves, Love wave, Gicht, Monsterwelle, Aegir = (germ.) Gott des Meeres,Poseidon = (griech.) Gott des Wassers und Meeres, Sedna = (innuit) G\xF6ttin des Meeres, Woge, Brecher, D\xFCnung, Seegang, See, Wellenschlag, Ebbe, Flut, Str\xF6mung, leises Pl\xE4tschern, Modified: branches/ogsector/data/gui/layouts/dialogs/ShipConfigDialog.layout =================================================================== --- branches/ogsector/data/gui/layouts/dialogs/ShipConfigDialog.layout 2007-05-19 12:21:50 UTC (rev 479) +++ branches/ogsector/data/gui/layouts/dialogs/ShipConfigDialog.layout 2007-05-19 15:46:19 UTC (rev 480) @@ -1,7 +1,7 @@ <?xml version="1.0" ?> <GUILayout> <Window Type="opengate/FrameWindow" Name="ShipConfigDialog"> - <Property Name="UnifiedPosition" Value="{{0.15,0},{0.1,0}}" /> + <Property Name="UnifiedPosition" Value="{{0.15,0},{0.15,0}}" /> <Property Name="UnifiedSize" Value="{{0.7,0},{0.7,0}}" /> <Property Name="SizingEnabled" Value="false" /> @@ -52,11 +52,11 @@ <Property Name="UnifiedSize" Value="{{0.4,0},{ 0.4,0}}" /> <Property Name="Alpha" Value="1.0" /> </Window> - <Window Type="opengate/HorizontalScrollbarLeftThumb" Name="ShipConfigDialog/PrevShip"> + <Window Type="opengate/HorizontalScrollLeftButton" Name="ShipConfigDialog/PrevShip"> <Property Name="UnifiedPosition" Value="{{0.1,0},{0.7,+10}}" /> <Property Name="UnifiedSize" Value="{{0.0,56},{ 0.0,14}}" /> </Window> - <Window Type="opengate/HorizontalScrollbarRightThumb" Name="ShipConfigDialog/NextShip"> + <Window Type="opengate/HorizontalScrollRightButton" Name="ShipConfigDialog/NextShip"> <Property Name="UnifiedPosition" Value="{{0.5,-56},{0.7,+10}}" /> <Property Name="UnifiedSize" Value="{{0.0,56},{ 0.0,14}}" /> </Window> Added: branches/ogsector/data/gui/layouts/opengateConsole.layout =================================================================== --- branches/ogsector/data/gui/layouts/opengateConsole.layout (rev 0) +++ branches/ogsector/data/gui/layouts/opengateConsole.layout 2007-05-19 15:46:19 UTC (rev 480) @@ -0,0 +1,15 @@ +<?xml version="1.0" ?> +<GUILayout> + <Window Type="DefaultWindow" Name="Console"> + <Property Name="UnifiedPosition" Value="{{0.0,+100},{0.0,21}}" /> + <Property Name="UnifiedSize" Value="{{1.0,-453},{0.0,50}}" /> + <Window Type="opengate/ConsoleListbox" Name="ConsoleList" > + <Property Name="UnifiedPosition" Value="{{0.0,0},{0.0,0}}" /> + <Property Name="UnifiedSize" Value="{{1.0,0},{1.0,-20}}" /> + </Window> + <Window Type="opengate/ConsoleEditbox" Name="ConsoleEdit" > + <Property Name="UnifiedPosition" Value="{{0.0,0},{1.0,-24}}" /> + <Property Name="UnifiedSize" Value="{{1.0,0},{0.0,20}}" /> + </Window> + </Window> +</GUILayout> Modified: branches/ogsector/data/gui/layouts/opengateDocked.layout =================================================================== --- branches/ogsector/data/gui/layouts/opengateDocked.layout 2007-05-19 12:21:50 UTC (rev 479) +++ branches/ogsector/data/gui/layouts/opengateDocked.layout 2007-05-19 15:46:19 UTC (rev 480) @@ -7,12 +7,103 @@ <!-- <Property Name="UnifiedSize" Value="{{1.0,-46},{1.0,-10}}" /> --> <Property Name="Alpha" Value="1" /> - <Window Type="opengate/StaticImage" Name="Docked/MainWindow/TopLeft"> - <Property Name="UnifiedPosition" Value="{{0.0,25},{0.0,10}}" /> - <Property Name="UnifiedSize" Value="{{0.0,62},{0.0,374}}" /> - <Property Name="BackgroundEnabled" Value="False" /> - <Property Name="FrameEnabled" Value="False" /> - <Property Name="Image" Value="set:MainWindowTopLeft image:full_image" /> + <Window Type="DefaultWindow" Name="Docked/MainWindow/ConsoleFrame"> + <Property Name="UnifiedPosition" Value="{{0.0,62},{0.0,10}}" /> + <Property Name="UnifiedSize" Value="{{1.0,-370},{0.0,100}}" /> + <Window Type="opengate/StaticImage" Name="Docked/MainWindow/ConsoleBackground"> + <Property Name="UnifiedPosition" Value="{{0.0,9},{0.0,9}}" /> + <Property Name="UnifiedSize" Value="{{1.0,-18},{1.0,-16}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="false" /> + <Property Name="Image" Value="set:opengate image:ConsoleBackground50" /> + </Window> + <Window Type="opengate/StaticImage" Name="Docked/MainWindow/ConsoleFrameTopLeftHS"> + <Property Name="UnifiedPosition" Value="{{0.0,+21},{0.0,0}}" /> + <Property Name="UnifiedSize" Value="{{0.0,9},{0.0,16}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:MainConsoleFrameHorizontalSide image:full_image" /> + </Window> + <Window Type="opengate/StaticImage" Name="Docked/MainWindow/ConsoleFrameTop"> + <Property Name="UnifiedPosition" Value="{{0.0,+29},{0.0,0}}" /> + <Property Name="UnifiedSize" Value="{{1.0,-55},{0.0,16}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:MainConsoleFrameHorizontalMiddle image:full_image" /> + </Window> + <Window Type="opengate/StaticImage" Name="Docked/MainWindow/ConsoleFrameTopRightHS"> + <Property Name="UnifiedPosition" Value="{{1.0,-26},{0.0,0}}" /> + <Property Name="UnifiedSize" Value="{{0.0,9},{0.0,16}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:MainConsoleFrameHorizontalSide image:full_image" /> + </Window> + + <Window Type="opengate/StaticImage" Name="ConsoleFrameBottomLeft"> + <Property Name="UnifiedPosition" Value="{{0.0,0},{1.0,-27}}" /> + <Property Name="UnifiedSize" Value="{{0.0,17},{0.0,27}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:MainConsoleFrameBottomLeft image:full_image" /> + </Window> + <Window Type="opengate/StaticImage" Name="Docked/MainWindow/ConsoleFrameBottomLeftHS"> + <Property Name="UnifiedPosition" Value="{{0.0,+17},{1.0,-16}}" /> + <Property Name="UnifiedSize" Value="{{0.0,9},{0.0,16}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:MainConsoleFrameHorizontalSide image:full_image" /> + </Window> + <Window Type="opengate/StaticImage" Name="Docked/MainWindow/ConsoleFrameBottom"> + <Property Name="UnifiedPosition" Value="{{0.0,+26},{1.0,-16}}" /> + <Property Name="UnifiedSize" Value="{{1.0,-52},{0.0,16}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:MainConsoleFrameHorizontalMiddle image:full_image" /> + </Window> + <Window Type="opengate/StaticImage" Name="Docked/MainWindow/ConsoleFrameBottomRightHS"> + <Property Name="UnifiedPosition" Value="{{1.0,-26},{1.0,-16}}" /> + <Property Name="UnifiedSize" Value="{{0.0,9},{0.0,16}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:MainConsoleFrameHorizontalSide image:full_image" /> + </Window> + <Window Type="opengate/StaticImage" Name="Docked/MainWindow/ConsoleFrameBottomRight"> + <Property Name="UnifiedPosition" Value="{{1.0,-17},{1.0,-27}}" /> + <Property Name="UnifiedSize" Value="{{0.0,17},{0.0,27}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:MainConsoleFrameBottomRight image:full_image" /> + </Window> + + <Window Type="opengate/StaticImage" Name="Docked/MainWindow/ConsoleFrameLeft"> + <Property Name="UnifiedPosition" Value="{{0.0,0},{0.0,+84}}" /> + <Property Name="UnifiedSize" Value="{{0.0,16},{1.0,-115}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:MainConsoleFrameVerticalMiddle image:full_image" /> + </Window> + <Window Type="opengate/StaticImage" Name="Docked/MainWindow/ConsoleFrameBottomLeftVS"> + <Property Name="UnifiedPosition" Value="{{0.0,0},{1.0,-36}}" /> + <Property Name="UnifiedSize" Value="{{0.0,16},{0.0,9}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:MainConsoleFrameVerticalSide image:full_image" /> + </Window> + + <Window Type="opengate/StaticImage" Name="Docked/MainWindow/ConsoleFrameBottomRightVS"> + <Property Name="UnifiedPosition" Value="{{1.0,-15},{1.0,-36}}" /> + <Property Name="UnifiedSize" Value="{{0.0,16},{0.0,9}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:MainConsoleFrameVerticalSide image:full_image" /> + </Window> + <Window Type="opengate/StaticImage" Name="Docked/MainWindow/ConsoleFrameRight"> + <Property Name="UnifiedPosition" Value="{{1.0,-16},{0.0,+49}}" /> + <Property Name="UnifiedSize" Value="{{0.0,16},{1.0,-85}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:MainConsoleFrameVerticalMiddle image:full_image" /> + </Window> </Window> <Window Type="opengate/StaticImage" Name="Docked/MainWindow/LeftRedLineTop"> <Property Name="UnifiedPosition" Value="{{0.0,40},{0.0,384}}" /> @@ -36,15 +127,15 @@ <Property Name="Image" Value="set:MainWindowRedLineBottom image:full_image" /> </Window> <Window Type="opengate/StaticImage" Name="Docked/MainWindow/RightRedLineTop"> - <Property Name="UnifiedPosition" Value="{{1.0,-68},{0.0,132}}" /> + <Property Name="UnifiedPosition" Value="{{1.0,-68},{0.0,126}}" /> <Property Name="UnifiedSize" Value="{{0.0,44},{0.0, 22}}" /> <Property Name="BackgroundEnabled" Value="False" /> <Property Name="FrameEnabled" Value="False" /> <Property Name="Image" Value="set:MainWindowRedLineTop image:full_image" /> </Window> <Window Type="opengate/StaticImage" Name="Docked/MainWindow/RightLine"> - <Property Name="UnifiedPosition" Value="{{1.0,-47},{0.0,132}}" /> - <Property Name="UnifiedSize" Value="{{0.0,4},{1.0,-197}}" /> + <Property Name="UnifiedPosition" Value="{{1.0,-47},{0.0,126}}" /> + <Property Name="UnifiedSize" Value="{{0.0,4},{1.0,-191}}" /> <Property Name="BackgroundEnabled" Value="False" /> <Property Name="FrameEnabled" Value="False" /> <Property Name="Image" Value="set:MainWindowRedLine image:full_image" /> @@ -57,8 +148,8 @@ <Property Name="Image" Value="set:MainWindowRedLineBottom image:full_image" /> </Window> <Window Type="opengate/StaticImage" Name="Docked/MainWindow/BottomMiddle"> - <Property Name="UnifiedPosition" Value="{{0.0,108},{1.0,-64}}" /> - <Property Name="UnifiedSize" Value="{{1.0,-291},{0.0,59}}" /> + <Property Name="UnifiedPosition" Value="{{0.0,119},{1.0,-64}}" /> + <Property Name="UnifiedSize" Value="{{1.0,-304},{0.0,59}}" /> <Property Name="BackgroundEnabled" Value="False" /> <Property Name="FrameEnabled" Value="False" /> <Property Name="Image" Value="set:MainWindowBottomMiddle image:full_image" /> @@ -78,13 +169,29 @@ <Property Name="Image" Value="set:MainWindowBottomRight image:full_image" /> </Window> <Window Type="opengate/StaticImage" Name="Docked/MainWindow/TopRight"> - <Property Name="UnifiedPosition" Value="{{1.0,-326},{0.0,10}}" /> + <Property Name="UnifiedPosition" Value="{{1.0,-326},{0.0,4}}" /> <Property Name="UnifiedSize" Value="{{0.0,301},{0.0,122}}" /> <Property Name="BackgroundEnabled" Value="False" /> <Property Name="FrameEnabled" Value="False" /> <Property Name="Image" Value="set:MainWindowTopRight image:full_image" /> </Window> + <Window Type="opengate/StaticImage" Name="Docked/MainWindow/TopLeft"> + <Property Name="UnifiedPosition" Value="{{0.0,25},{0.0,10}}" /> + <Property Name="UnifiedSize" Value="{{0.0,62},{0.0,374}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:MainWindowTopLeft image:full_image" /> + </Window> + <Window Type="opengate/GreyButtonUp" Name="Docked/MainWindow/ConsoleMinButton"> + <Property Name="UnifiedPosition" Value="{{0.0,+74},{0.0,+49}}" /> + <Property Name="UnifiedSize" Value="{{0.0,13},{0.0,13}}" /> + </Window> + <Window Type="opengate/GreyButtonDown" Name="Docked/MainWindow/ConsoleLargeButton"> + <Property Name="UnifiedPosition" Value="{{0.0,+74},{0.0,+49}}" /> + <Property Name="UnifiedSize" Value="{{0.0,13},{0.0,13}}" /> + </Window> + <Window Type="opengate/Button" Name="Docked/MainWindow/ShipConfigButton"> <Property Name="UnifiedPosition" Value="{{0.125,0},{1.0,-88}}" /> <Property Name="UnifiedSize" Value="{{0.0,100},{0.0,24}}" /> Added: branches/ogsector/data/gui/layouts/opengateUnDocked.layout =================================================================== --- branches/ogsector/data/gui/layouts/opengateUnDocked.layout (rev 0) +++ branches/ogsector/data/gui/layouts/opengateUnDocked.layout 2007-05-19 15:46:19 UTC (rev 480) @@ -0,0 +1,21 @@ +<?xml version="1.0" ?> +<GUILayout> + <Window Type="DefaultWindow" Name="UnDocked/MainWindow"> + <Property Name="UnifiedPosition" Value="{{0.0,0},{0.0,0}}" /> + <Property Name="UnifiedSize" Value="{{1.0,0},{1.0,0}}" /> +<!-- <Property Name="UnifiedPosition" Value="{{0.0,23},{0.0,5}}" /> --> +<!-- <Property Name="UnifiedSize" Value="{{1.0,-46},{1.0,-10}}" /> --> + <Property Name="Alpha" Value="1" /> + <Window Type="DefaultWindow" Name="UnDocked/MainWindow/ConsoleFrame"> + <Property Name="UnifiedPosition" Value="{{0.0,62},{0.0,10}}" /> + <Property Name="UnifiedSize" Value="{{1.0,-370},{0.0,100}}" /> + <Window Type="opengate/StaticImage" Name="UnDocked/MainWindow/ConsoleBackground"> + <Property Name="UnifiedPosition" Value="{{0.0,9},{0.0,9}}" /> + <Property Name="UnifiedSize" Value="{{1.0,-18},{1.0,-16}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:opengate image:ConsoleBackground50" /> + </Window> + </Window> + </Window> +</GUILayout> Modified: branches/ogsector/data/gui/schemes/opengate/opengate.imageset =================================================================== --- branches/ogsector/data/gui/schemes/opengate/opengate.imageset 2007-05-19 12:21:50 UTC (rev 479) +++ branches/ogsector/data/gui/schemes/opengate/opengate.imageset 2007-05-19 15:46:19 UTC (rev 480) @@ -1,5 +1,43 @@ <?xml version="1.0" encoding="UTF-8"?> <Imageset Name="opengate" Imagefile="opengate.png"> + <Image Name="Blank" XPos="492" YPos="6" Width="1" Height="1" /> + <Image Name="ConsoleBackground50" XPos="265" YPos="13" Width="10" Height="10" /> + <Image Name="ConsoleLeftEdge50" XPos="256" YPos="34" Width="3" Height="30" /> + <Image Name="ConsoleRightEdge50" XPos="321" YPos="34" Width="3" Height="30" /> + <Image Name="ConsoleTopEdge50" XPos="277" YPos="5" Width="30" Height="3" /> + <Image Name="ConsoleBottomEdge50" XPos="277" YPos="78" Width="30" Height="3" /> + <Image Name="ConsoleTopLeft" XPos="256" YPos="5" Width="3" Height="3" /> + <Image Name="ConsoleTopRight" XPos="321" YPos="5" Width="3" Height="3" /> + <Image Name="ConsoleBottomLeft" XPos="256" YPos="78" Width="3" Height="3" /> + <Image Name="ConsoleBottomRight" XPos="321" YPos="78" Width="3" Height="3" /> + <Image Name="ScrollThumbLeftNormal" XPos="374" YPos="4" Width="56" Height="14" /> + <Image Name="ScrollThumbLeftHover" XPos="374" YPos="19" Width="56" Height="14" /> + <Image Name="ScrollThumbLeftPushed" XPos="374" YPos="34" Width="56" Height="14" /> + <Image Name="ScrollThumbRightNormal" XPos="432" YPos="4" Width="56" Height="14" /> + <Image Name="ScrollThumbRightHover" XPos="432" YPos="19" Width="56" Height="14" /> + <Image Name="ScrollThumbRightPushed" XPos="432" YPos="34" Width="56" Height="14" /> + <Image Name="ScrollThumbUpNormal" XPos="328" YPos="4" Width="14" Height="56" /> + <Image Name="ScrollThumbUpHover" XPos="343" YPos="4" Width="14" Height="56" /> + <Image Name="ScrollThumbUpPushed" XPos="358" YPos="4" Width="14" Height="56" /> + <Image Name="ScrollThumbDownNormal" XPos="328" YPos="62" Width="14" Height="56" /> + <Image Name="ScrollThumbDownHover" XPos="343" YPos="62" Width="14" Height="56" /> + <Image Name="ScrollThumbDownPushed" XPos="358" YPos="62" Width="14" Height="56" /> + <Image Name="ConsoleScrollThumbUpNormal" XPos="376" YPos="50" Width="10" Height="18" /> + <Image Name="ConsoleScrollThumbUpHover" XPos="387" YPos="50" Width="10" Height="18" /> + <Image Name="ConsoleScrollThumbUpPushed" XPos="398" YPos="50" Width="10" Height="18" /> + <Image Name="ConsoleScrollThumbDownNormal" XPos="376" YPos="71" Width="10" Height="18" /> + <Image Name="ConsoleScrollThumbDownHover" XPos="387" YPos="71" Width="10" Height="18" /> + <Image Name="ConsoleScrollThumbDownPushed" XPos="398" YPos="71" Width="10" Height="18" /> + <Image Name="GreyButtonUpNormal" XPos="409" YPos="50" Width="13" Height="13" /> + <Image Name="GreyButtonUpHover" XPos="424" YPos="50" Width="13" Height="13" /> + <Image Name="GreyButtonUpPushed" XPos="439" YPos="50" Width="13" Height="13" /> + <Image Name="GreyButtonDownNormal" XPos="409" YPos="65" Width="13" Height="13" /> + <Image Name="GreyButtonDownHover" XPos="424" YPos="65" Width="13" Height="13" /> + <Image Name="GreyButtonDownPushed" XPos="439" YPos="65" Width="13" Height="13" /> + + <Image Name="ConsoleMouseTextBar" XPos="313" YPos="89" Width="5" Height="14" /> + <Image Name="ConsoleMouseEditBoxCarat" XPos="308" YPos="89" Width="1" Height="14" /> + <Image Name="AltProgressLeft" XPos="10" YPos="10" Width="10" Height="10" /> <Image Name="AltProgressMiddle" XPos="20" YPos="10" Width="10" Height="10" /> <Image Name="AltProgressRight" XPos="30" YPos="10" Width="10" Height="10" /> Modified: branches/ogsector/data/gui/schemes/opengate/opengate.png =================================================================== (Binary files differ) Modified: branches/ogsector/data/gui/schemes/opengate/opengate.scheme =================================================================== --- branches/ogsector/data/gui/schemes/opengate/opengate.scheme 2007-05-19 12:21:50 UTC (rev 479) +++ branches/ogsector/data/gui/schemes/opengate/opengate.scheme 2007-05-19 15:46:19 UTC (rev 480) @@ -11,20 +11,13 @@ <ImagesetFromImage Name="MainWindowRedLine" Filename="textures/mainRedLine.png" /> <ImagesetFromImage Name="MainWindowRedLineTop" Filename="textures/mainRedLineTop.png" /> <ImagesetFromImage Name="MainWindowRedLineBottom" Filename="textures/mainRedLineBottom.png" /> - <ImagesetFromImage Name="HorzScrollThumbLeftNormal" Filename="textures/scrollbar/leftNormal.png" /> - <ImagesetFromImage Name="HorzScrollThumbLeftHover" Filename="textures/scrollbar/leftHover.png" /> - <ImagesetFromImage Name="HorzScrollThumbLeftPushed" Filename="textures/scrollbar/leftPushed.png" /> - <ImagesetFromImage Name="HorzScrollThumbRightNormal" Filename="textures/scrollbar/rightNormal.png" /> - <ImagesetFromImage Name="HorzScrollThumbRightHover" Filename="textures/scrollbar/rightHover.png" /> - <ImagesetFromImage Name="HorzScrollThumbRightPushed" Filename="textures/scrollbar/rightPushed.png" /> - <ImagesetFromImage Name="HorzScrollThumbUpNormal" Filename="textures/scrollbar/upNormal.png" /> - <ImagesetFromImage Name="HorzScrollThumbUpHover" Filename="textures/scrollbar/upHover.png" /> - <ImagesetFromImage Name="HorzScrollThumbUpPushed" Filename="textures/scrollbar/upPushed.png" /> - <ImagesetFromImage Name="HorzScrollThumbDownNormal" Filename="textures/scrollbar/downNormal.png" /> - <ImagesetFromImage Name="HorzScrollThumbDownHover" Filename="textures/scrollbar/downHover.png" /> - <ImagesetFromImage Name="HorzScrollThumbDownPushed" Filename="textures/scrollbar/downPushed.png" /> + <ImagesetFromImage Name="MainConsoleFrameBottomRight" Filename="textures/mainConsoleFrameBottomRight.png" /> + <ImagesetFromImage Name="MainConsoleFrameBottomLeft" Filename="textures/mainConsoleFrameBottomLeft.png" /> + <ImagesetFromImage Name="MainConsoleFrameHorizontalSide" Filename="textures/mainConsoleFrameHorizontalSide.png" /> + <ImagesetFromImage Name="MainConsoleFrameHorizontalMiddle" Filename="textures/mainConsoleFrameHorizontalMiddle.png" /> + <ImagesetFromImage Name="MainConsoleFrameVerticalSide" Filename="textures/mainConsoleFrameVerticalSide.png" /> + <ImagesetFromImage Name="MainConsoleFrameVerticalMiddle" Filename="textures/mainConsoleFrameVerticalMiddle.png" /> - <Font Name="BlueHighway-12" Filename="BlueHighway-12.font" /> <Font Name="BlueHighway-10" Filename="BlueHighway-10.font" /> @@ -32,7 +25,7 @@ <LookNFeel Filename="opengateStatic.looknfeel" /> <LookNFeel Filename="opengateContainers.looknfeel" /> <LookNFeel Filename="opengateScroll.looknfeel" /> -<!-- <LookNFeel Filename="lists.looknfeel" /> --> + <LookNFeel Filename="opengateLists.looknfeel" /> <!-- <LookNFeel Filename="menu.looknfeel" /> --> <!-- <LookNFeel Filename="progress.looknfeel" /> --> <!-- <LookNFeel Filename="targeting.looknfeel" /> --> @@ -63,8 +56,47 @@ WindowType="opengate/SystemButton" TargetType="CEGUI/PushButton" Renderer="Falagard/SystemButton" - LookNFeel="opengate/Button" - /> + LookNFeel="opengate/Button" /> + <FalagardMapping + WindowType="opengate/HorizontalScrollLeftButton" + TargetType="CEGUI/PushButton" + Renderer="Falagard/SystemButton" + LookNFeel="opengate/HorizontalScrollLeftButton" /> + <FalagardMapping + WindowType="opengate/HorizontalScrollRightButton" + TargetType="CEGUI/PushButton" + Renderer="Falagard/SystemButton" + LookNFeel="opengate/HorizontalScrollRightButton" /> + <FalagardMapping + WindowType="opengate/GreyButtonUp" + TargetType="CEGUI/PushButton" + Renderer="Falagard/SystemButton" + LookNFeel="opengate/GreyButtonUp" /> + <FalagardMapping + WindowType="opengate/GreyButtonDown" + TargetType="CEGUI/PushButton" + Renderer="Falagard/SystemButton" + LookNFeel="opengate/GreyButtonDown" /> + <FalagardMapping + WindowType="opengate/ConsoleScrollButtonUp" + TargetType="CEGUI/PushButton" + Renderer="Falagard/SystemButton" + LookNFeel="opengate/ConsoleScrollButtonUp" /> + <FalagardMapping + WindowType="opengate/ConsoleScrollButtonDown" + TargetType="CEGUI/PushButton" + Renderer="Falagard/SystemButton" + LookNFeel="opengate/ConsoleScrollButtonDown" /> + <FalagardMapping + WindowType="opengate/Editbox" + TargetType="CEGUI/Editbox" + Renderer="Falagard/Editbox" + LookNFeel="opengate/Editbox"/> + <FalagardMapping + WindowType="opengate/ConsoleEditbox" + TargetType="CEGUI/Editbox" + Renderer="Falagard/Editbox" + LookNFeel="opengate/ConsoleEditbox"/> <!-- opengateContainers.looknfeel --> @@ -82,15 +114,33 @@ opengateScroll.looknfeel --> <FalagardMapping - WindowType="opengate/HorizontalScrollbarLeftThumb" + WindowType="opengate/ConsoleHorizontalScrollbarThumb" TargetType="CEGUI/Thumb" Renderer="Falagard/Button" - LookNFeel="opengate/HorizontalScrollbarLeftThumb" /> + LookNFeel="opengate/ConsoleHorizontalScrollbarThumb" /> <FalagardMapping - WindowType="opengate/HorizontalScrollbarRightThumb" + WindowType="opengate/ConsoleHorizontalScrollbar" + TargetType="CEGUI/Scrollbar" + Renderer="Falagard/Scrollbar" + LookNFeel="opengate/ConsoleHorizontalScrollbar"/> + <FalagardMapping + WindowType="opengate/ConsoleVerticalScrollbarThumb" TargetType="CEGUI/Thumb" Renderer="Falagard/Button" - LookNFeel="opengate/HorizontalScrollbarRightThumb" /> + LookNFeel="opengate/ConsoleVerticalScrollbarThumb"/> + <FalagardMapping + WindowType="opengate/ConsoleVerticalScrollbar" + TargetType="CEGUI/Scrollbar" + Renderer="Falagard/Scrollbar" + LookNFeel="opengate/ConsoleVerticalScrollbar"/> + <!-- + opengateLists.looknfeel + --> + <FalagardMapping + WindowType="opengate/ConsoleListbox" + TargetType="CEGUI/Listbox" + Renderer="Falagard/Listbox" + LookNFeel="opengate/ConsoleListbox"/> </GUIScheme> <!-- <FalagardMapping --> @@ -106,12 +156,6 @@ <!-- LookNFeel="SleekSpace/Checkbox" --> <!-- /> --> <!-- <FalagardMapping --> -<!-- WindowType="SleekSpace/Editbox" --> -<!-- TargetType="CEGUI/Editbox" --> -<!-- Renderer="Falagard/Editbox" --> -<!-- LookNFeel="SleekSpace/Editbox" --> -<!-- /> --> -<!-- <FalagardMapping --> <!-- WindowType="SleekSpace/MultiLineEditbox" --> <!-- TargetType="CEGUI/MultiLineEditbox" --> <!-- Renderer="Falagard/MultiLineEditbox" --> @@ -128,12 +172,6 @@ lists.looknfeel --> <!-- <FalagardMapping --> -<!-- WindowType="SleekSpace/Listbox" --> -<!-- TargetType="CEGUI/Listbox" --> -<!-- Renderer="Falagard/Listbox" --> -<!-- LookNFeel="SleekSpace/Listbox" --> -<!-- /> --> -<!-- <FalagardMapping --> <!-- WindowType="SleekSpace/ListHeader" --> <!-- TargetType="CEGUI/ListHeader" --> <!-- Renderer="Falagard/ListHeader" --> Modified: branches/ogsector/data/gui/schemes/opengate/opengateButtons.looknfeel =================================================================== --- branches/ogsector/data/gui/schemes/opengate/opengateButtons.looknfeel 2007-05-19 12:21:50 UTC (rev 479) +++ branches/ogsector/data/gui/schemes/opengate/opengateButtons.looknfeel 2007-05-19 15:46:19 UTC (rev 480) @@ -145,5 +145,625 @@ </Layer> </StateImagery> </WidgetLook> + + + <!-- + *************************************************** + opengate/HorizontalScrollLeftThumb + *************************************************** + --> + <WidgetLook name="opengate/HorizontalScrollLeftButton"> + <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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="ScrollThumbLeftNormal" /> + </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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="ScrollThumbLeftHover" /> + </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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="ScrollThumbLeftPushed" /> + </FrameComponent> + </ImagerySection> + <StateImagery name="Normal"> + <Layer> + <Section section="normal" /> + </Layer> + </StateImagery> + <StateImagery name="Hover"> + <Layer> + <Section section="hover" /> + </Layer> + </StateImagery> + <StateImagery name="Pushed"> + <Layer> + <Section section="pushed" /> + </Layer> + </StateImagery> + <StateImagery name="Disabled"> + <Layer> + <Section section="normal"> + <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" /> + </Section> + </Layer> + </StateImagery> + </WidgetLook> + <!-- + *************************************************** + opengate/ConsoleHorizontalScrollRightThumb + *************************************************** + --> + <WidgetLook name="opengate/HorizontalScrollRightButton"> + <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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="RightEdge" imageset="opengate" image="ScrollThumbRightNormal" /> + </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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="RightEdge" imageset="opengate" image="ScrollThumbRightHover" /> + </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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="RightEdge" imageset="opengate" image="ScrollThumbRightPushed" /> + </FrameComponent> + </ImagerySection> + <StateImagery name="Normal"> + <Layer> + <Section section="normal" /> + </Layer> + </StateImagery> + <StateImagery name="Hover"> + <Layer> + <Section section="hover" /> + </Layer> + </StateImagery> + <StateImagery name="Pushed"> + <Layer> + <Section section="pushed" /> + </Layer> + </StateImagery> + <StateImagery name="Disabled"> + <Layer> + <Section section="normal"> + <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" /> + </Section> + </Layer> + </StateImagery> + </WidgetLook> + <!-- + *************************************************** + opengate/GreyButtonUp + *************************************************** + --> + <WidgetLook name="opengate/GreyButtonUp"> + <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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="GreyButtonUpNormal" /> + </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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="GreyButtonUpHover" /> + </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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="GreyButtonUpPushed" /> + </FrameComponent> + </ImagerySection> + <StateImagery name="Normal"> + <Layer> + <Section section="normal" /> + </Layer> + </StateImagery> + <StateImagery name="Hover"> + <Layer> + <Section section="hover" /> + </Layer> + </StateImagery> + <StateImagery name="Pushed"> + <Layer> + <Section section="pushed" /> + </Layer> + </StateImagery> + <StateImagery name="Disabled"> + <Layer> + <Section section="normal"> + <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" /> + </Section> + </Layer> + </StateImagery> + </WidgetLook> + + <!-- + *************************************************** + opengate/GreyButtonDown + *************************************************** + --> + <WidgetLook name="opengate/GreyButtonDown"> + <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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="GreyButtonDownNormal" /> + </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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="GreyButtonDownHover" /> + </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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="GreyButtonDownPushed" /> + </FrameComponent> + </ImagerySection> + <StateImagery name="Normal"> + <Layer> + <Section section="normal" /> + </Layer> + </StateImagery> + <StateImagery name="Hover"> + <Layer> + <Section section="hover" /> + </Layer> + </StateImagery> + <StateImagery name="Pushed"> + <Layer> + <Section section="pushed" /> + </Layer> + </StateImagery> + <StateImagery name="Disabled"> + <Layer> + <Section section="normal"> + <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" /> + </Section> + </Layer> + </StateImagery> + </WidgetLook> + + <!-- + *************************************************** + opengate/ConsoleScrollButtonUp + *************************************************** + --> + <WidgetLook name="opengate/ConsoleScrollButtonUp"> + <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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="ConsoleScrollThumbUpNormal" /> + </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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="ConsoleScrollThumbUpHover" /> + </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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="ConsoleScrollThumbUpPushed" /> + </FrameComponent> + </ImagerySection> + <StateImagery name="Normal"> + <Layer> + <Section section="normal" /> + </Layer> + </StateImagery> + <StateImagery name="Hover"> + <Layer> + <Section section="hover" /> + </Layer> + </StateImagery> + <StateImagery name="Pushed"> + <Layer> + <Section section="pushed" /> + </Layer> + </StateImagery> + <StateImagery name="Disabled"> + <Layer> + <Section section="normal"> + <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" /> + </Section> + </Layer> + </StateImagery> + </WidgetLook> + + <!-- + *************************************************** + opengate/ConsoleScrollButtonDown + *************************************************** + --> + <WidgetLook name="opengate/ConsoleScrollButtonDown"> + <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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="ConsoleScrollThumbDownNormal" /> + </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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="ConsoleScrollThumbDownHover" /> + </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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="ConsoleScrollThumbDownPushed" /> + </FrameComponent> + </ImagerySection> + <StateImagery name="Normal"> + <Layer> + <Section section="normal" /> + </Layer> + </StateImagery> + <StateImagery name="Hover"> + <Layer> + <Section section="hover" /> + </Layer> + </StateImagery> + <StateImagery name="Pushed"> + <Layer> + <Section section="pushed" /> + </Layer> + </StateImagery> + <StateImagery name="Disabled"> + <Layer> + <Section section="normal"> + <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" /> + </Section> + </Layer> + </StateImagery> + </WidgetLook> + + <!-- + *************************************************** + opengate/ConsoleButtonDown + *************************************************** + --> + <WidgetLook name="opengate/ConsoleButtonDown"> + <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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="ConsoleScrollThumbDownNormal" /> + </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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="ConsoleScrollThumbDownHover" /> + </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.0" type="Width" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim> + </Area> + <Image type="LeftEdge" imageset="opengate" image="ConsoleScrollThumbDownPushed" /> + </FrameComponent> + </ImagerySection> + <StateImagery name="Normal"> + <Layer> + <Section section="normal" /> + </Layer> + </StateImagery> + <StateImagery name="Hover"> + <Layer> + <Section section="hover" /> + </Layer> + </StateImagery> + <StateImagery name="Pushed"> + <Layer> + <Section section="pushed" /> + </Layer> + </StateImagery> + <StateImagery name="Disabled"> + <Layer> + <Section section="normal"> + <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" /> + </Section> + </Layer> + </StateImagery> + </WidgetLook> + <!-- + *************************************************** + opengate/ConsoleEditbox + *************************************************** + --> + <WidgetLook name="opengate/ConsoleEditbox"> + <PropertyDefinition name="NormalTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" /> + <PropertyDefinition name="SelectedTextColour" initialValue="FF000000" redrawOnWrite="true" /> + <PropertyDefinition name="ActiveSelectionColour" initialValue="FF607FFF" redrawOnWrite="true" /> + <PropertyDefinition name="InactiveSelectionColour" initialValue="FF808080" redrawOnWrite="true" /> + <Property name="MouseCursorImage" value="set:opengate image:ConsoleMouseTextBar" /> + <NamedArea name="TextArea"> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="5" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="3" /></Dim> + <Dim type="RightEdge" ><UnifiedDim scale="1.0" offset="-5" type="RightEdge" /></Dim> + <Dim type="BottomEdge" ><UnifiedDim scale="1.0" offset="-3" 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="opengate" image="EditBoxLeft" /> --> +<!-- <Image type="RightEdge" imageset="opengate" image="EditBoxRight" /> --> +<!-- <Image type="Background" imageset="opengate" image="ConsoleBackground50" /> --> + </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="opengate" 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="opengate" image="ConsoleMouseEditBoxCarat" dimension="Width" /></Dim> + <Dim type="BottomEdge" ><UnifiedDim scale="1.0" type="BottomEdge" /></Dim> + </Area> + <Image imageset="opengate" image="ConsoleMouseEditBoxCarat" /> + <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> + <!-- + *************************************************** + opengate/Editbox + *************************************************** + --> + <WidgetLook name="opengate/Editbox"> + <PropertyDefinition name="NormalTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" /> + <PropertyDefinition name="SelectedTextColour" initialValue="FF000000" redrawOnWrite="true" /> + <PropertyDefinition name="ActiveSelectionColour" initialValue="FF607FFF" redrawOnWrite="true" /> + <PropertyDefinition name="InactiveSelectionColour" initialValue="FF808080" redrawOnWrite="true" /> + <Property name="MouseCursorImage" value="set:opengate image:MouseTextBar" /> + <NamedArea name="TextArea"> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="5" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="3" /></Dim> + <Dim type="RightEdge" ><UnifiedDim scale="1.0" offset="-5" type="RightEdge" /></Dim> + <Dim type="BottomEdge" ><UnifiedDim scale="1.0" offset="-3" 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="opengate" image="EditBoxLeft" /> + <Image type="RightEdge" imageset="opengate" image="EditBoxRight" /> + <Image type="Background" imageset="opengate" 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="opengate" 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="opengate" image="EditBoxCarat" dimension="Width" /></Dim> + <Dim type="BottomEdge" ><UnifiedDim scale="1.0" type="BottomEdge" /></Dim> + </Area> + <Image imageset="opengate" 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> </Falagard> Added: branches/ogsector/data/gui/schemes/opengate/opengateLists.looknfeel =================================================================== --- branches/ogsector/data/gui/schemes/opengate/opengateLists.looknfeel (rev 0) +++ branches/ogsector/data/gui/schemes/opengate/opengateLists.looknfeel 2007-05-19 15:46:19 UTC (rev 480) @@ -0,0 +1,139 @@ +<?xml version="1.0" ?> +<Falagard> + <!-- + *************************************************** + opengate/Listbox + *************************************************** + --> + <WidgetLook name="opengate/ConsoleListbox"> + <NamedArea name="ItemRenderingArea"> + <Area> + <Dim type="LeftEdge" ><ImageDim imageset="opengate" image="ListboxLeft" dimension="Width" /></Dim> + <Dim type="TopEdge" ><ImageDim imageset="opengate" image="ListboxTop" dimension="Height" /></Dim> + <Dim type="RightEdge" > + <UnifiedDim scale="1" type="RightEdge"> + <DimOperator op="Subtract"> + <ImageDim imageset="opengate" image="ListboxRight" dimension="Width" /> + </DimOperator> + </UnifiedDim> + </Dim> + <Dim type="BottomEdge" > + <UnifiedDim scale="1" type="BottomEdge"> + <DimOperator op="Subtract"> + <ImageDim imageset="opengate" image="ListboxBottom" dimension="Height" /> + </DimOperator> + </UnifiedDim> + </Dim> + </Area> + </NamedArea> + <NamedArea name="ItemRenderingAreaHScroll"> + <Area> + <Dim type="LeftEdge" ><ImageDim imageset="opengate" image="ListboxLeft" dimension="Width" /></Dim> + <Dim type="TopEdge" ><ImageDim imageset="opengate" image="ListboxTop" dimension="Height" /></Dim> + <Dim type="RightEdge" > + <UnifiedDim scale="1" type="RightEdge"> + <DimOperator op="Subtract"> + <ImageDim imageset="opengate" image="ListboxRight" dimension="Width" /> + </DimOperator> + </UnifiedDim> + </Dim> + <Dim type="BottomEdge" > + <UnifiedDim scale="1" type="BottomEdge"> + <DimOperator op="Subtract"> + <WidgetDim widget="__auto_hscrollbar__" dimension="Height" /> + </DimOperator> + </UnifiedDim> + </Dim> + </Area> + </NamedArea> + <NamedArea name="ItemRenderingAreaVScroll"> + <Area> + <Dim type="LeftEdge" ><ImageDim imageset="opengate" image="ListboxLeft" dimension="Width" /></Dim> + <Dim type="TopEdge" ><ImageDim imageset="opengate" image="ListboxTop" dimension="Height" /></Dim> + <Dim type="RightEdge" > + <UnifiedDim scale="1" type="RightEdge"> + <DimOperator op="Subtract"> + <WidgetDim widget="__auto_vscrollbar__" dimension="Width" /> + </DimOperator> + </UnifiedDim> + </Dim> + <Dim type="BottomEdge" > + <UnifiedDim scale="1" type="BottomEdge"> + <DimOperator op="Subtract"> + <ImageDim imageset="opengate" image="ListboxBottom" dimension="Height" /> + </DimOperator> + </UnifiedDim> + </Dim> + </Area> + </NamedArea> + <NamedArea name="ItemRenderingAreaHVScroll"> + <Area> + <Dim type="LeftEdge" ><ImageDim imageset="opengate" image="ListboxLeft" dimension="Width" /></Dim> + <Dim type="TopEdge" ><ImageDim imageset="opengate" image="ListboxTop" dimension="Height" /></Dim> + <Dim type="RightEdge" > + <UnifiedDim scale="1" type="RightEdge"> + <DimOperator op="Subtract"> + <WidgetDim widget="__auto_vscrollbar__" dimension="Width" /> + </DimOperator> + </UnifiedDim> + </Dim> + <Dim type="BottomEdge" > + <UnifiedDim scale="1" type="BottomEdge"> + <DimOperator op="Subtract"> + <WidgetDim widget="__auto_hscrollbar__" dimension="Height" /> + </DimOperator> + </UnifiedDim> + </Dim> + </Area> + </NamedArea> + <Child type="opengate/ConsoleHorizontalScrollbar" nameSuffix="__auto_hscrollbar__"> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="Width" ><UnifiedDim scale="1" offset="-12" type="Width" /></Dim> + <Dim type="Height" ><AbsoluteDim value="12" /></Dim> + </Area> + <VertAlignment type="BottomAligned" /> + </Child> + <Child type="opengate/ConsoleVerticalScrollbar" nameSuffix="__auto_vscrollbar__"> + <Area> + <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim> + <Dim type="Width" ><AbsoluteDim value="12" /></Dim> + <Dim type="Height" ><UnifiedDim scale="1" offset="-12" type="Height" /></Dim> + </Area> + <HorzAlignment type="RightAligned" /> + </Child> + <ImagerySection name="main"> + <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="opengate" image="ConsoleTopLeft" /> --> +<!-- <Image type="TopRightCorner" imageset="opengate" image="ConsoleTopRight" /> --> +<!-- <Image type="BottomLeftCorner" imageset="opengate" image="ConsoleBottomLeft" /> --> +<!-- <Image type="BottomRightCorner" imageset="opengate" image="ConsoleBottomRight" /> --> +<!-- <Image type="LeftEdge" imageset="opengate" image="ConsoleLeftEdge50" /> --> +<!-- <Image type="RightEdge" imageset="opengate" image="ConsoleRightEdge50" /> --> +<!-- <Image type="TopEdge" imageset="opengate" image="ConsoleTopEdge50" /> --> +<!-- <Image type="BottomEdge" imageset="opengate" image="ConsoleBottomEdge50" /> --> +<!-- <Image type="Background" imageset="opengate" image="Co... [truncated message content] |
From: <eg...@us...> - 2007-05-19 12:21:48
|
Revision: 479 http://svn.sourceforge.net/opengate/?rev=479&view=rev Author: egore Date: 2007-05-19 05:21:50 -0700 (Sat, 19 May 2007) Log Message: ----------- Test of another squid ... I'm not sure which one is better. But attempt 1 was missing some things. Added Paths: ----------- trunk/data/ships/squadrok/squid/squid_attempt2.blend Added: trunk/data/ships/squadrok/squid/squid_attempt2.blend =================================================================== (Binary files differ) Property changes on: trunk/data/ships/squadrok/squid/squid_attempt2.blend ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2007-05-19 11:20:28
|
Revision: 478 http://svn.sourceforge.net/opengate/?rev=478&view=rev Author: egore Date: 2007-05-19 04:20:29 -0700 (Sat, 19 May 2007) Log Message: ----------- Fix namespace bug I introduced yesterday Modified Paths: -------------- branches/ogsector/src/openALSoundManager.cpp branches/ogsector/src/testopenalmanager.cpp Modified: branches/ogsector/src/openALSoundManager.cpp =================================================================== --- branches/ogsector/src/openALSoundManager.cpp 2007-05-18 02:23:45 UTC (rev 477) +++ branches/ogsector/src/openALSoundManager.cpp 2007-05-19 11:20:29 UTC (rev 478) @@ -21,6 +21,8 @@ #include "openALSoundManager.h" #include <iostream> +namespace OpenGate{ + OpenALSoundManager::OpenALSoundManager( int maxBuffers, int maxSources ) : maxBuffers_( maxBuffers ), maxSources_( maxSources ){ @@ -294,3 +296,4 @@ if ( checkOpenALError( "setListenerOrientation::alListenerfv:AL_ORIENTATION" ) ) return false; } +} // namespace OpenGate Modified: branches/ogsector/src/testopenalmanager.cpp =================================================================== --- branches/ogsector/src/testopenalmanager.cpp 2007-05-18 02:23:45 UTC (rev 477) +++ branches/ogsector/src/testopenalmanager.cpp 2007-05-19 11:20:29 UTC (rev 478) @@ -25,7 +25,7 @@ std::cout << "Simple Sound Manager test application !" << std::endl; - OpenALSoundManager * soundMgr = new OpenALSoundManager( ); + OpenGate::OpenALSoundManager * soundMgr = new OpenGate::OpenALSoundManager( ); std::cout << soundMgr->listAvailableDevices() << std::endl; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ult...@us...> - 2007-05-18 02:23:44
|
Revision: 477 http://svn.sourceforge.net/opengate/?rev=477&view=rev Author: ultrasick Date: 2007-05-17 19:23:45 -0700 (Thu, 17 May 2007) Log Message: ----------- uploaded a intro movie, probably I will upload an opengate splash/loading screen in a few days or so Added Paths: ----------- trunk/data/intros/ trunk/data/intros/open_source.avi trunk/templates/data/intros/ trunk/templates/data/intros/open_source.blend trunk/templates/data/intros/radarping.aup trunk/templates/data/intros/radarping_data/ trunk/templates/data/intros/radarping_data/e00/ trunk/templates/data/intros/radarping_data/e00/d00/ trunk/templates/data/intros/radarping_data/e00/d00/e0000506.au trunk/templates/data/intros/radarping_data/e00/d00/e000067a.au trunk/templates/data/intros/radarping_data/e00/d00/e0000696.au trunk/templates/data/intros/radarping_data/e00/d00/e0000876.au trunk/templates/data/intros/radarping_data/e00/d00/e0000895.au trunk/templates/data/intros/radarping_data/e00/d00/e0000ee0.au Added: trunk/data/intros/open_source.avi =================================================================== (Binary files differ) Property changes on: trunk/data/intros/open_source.avi ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/templates/data/intros/open_source.blend =================================================================== (Binary files differ) Property changes on: trunk/templates/data/intros/open_source.blend ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/templates/data/intros/radarping.aup =================================================================== --- trunk/templates/data/intros/radarping.aup (rev 0) +++ trunk/templates/data/intros/radarping.aup 2007-05-18 02:23:45 UTC (rev 477) @@ -0,0 +1,58 @@ +<?xml version="1.0" standalone="no" ?> +<!DOCTYPE project PUBLIC "-//audacityproject-1.3.0//DTD//EN" "http://audacity.sourceforge.net/xml/audacityproject-1.3.0.dtd" > +<project xmlns="http://audacity.sourceforge.net/xml/" projname="radarping_data" version="1.3.0" audacityversion="1.3.2-beta" sel0="0.0000000000" sel1="0.0000000000" vpos="0" h="0.0000000000" zoom="178.0015059778" rate="8000"> + <tags title="" artist="" album="" track="-1" year="" genre="-1" comments="" id3v2="1"/> + <wavetrack name="radarping" channel="2" linked="0" offset="0.00000000" rate="8000" gain="1" pan="0"> + <waveclip offset="0.23000038"> + <sequence maxsamples="262144" sampleformat="262159" numsamples="14519"> + <waveblock start="0"> + <simpleblockfile filename="e0000696.au" len="14400" min="-0.986301" max="1" rms="0.093837"/> + </waveblock> + <waveblock start="14400"> + <simpleblockfile filename="e0000ee0.au" len="119" min="-0.027397" max="0.013699" rms="0.000608"/> + </waveblock> + </sequence> + <envelope numpoints="0"/> + </waveclip> + </wavetrack> + <wavetrack name="radarping" channel="2" linked="0" offset="0.00000000" rate="8000" gain="1" pan="0"> + <waveclip offset="2.23000026"> + <sequence maxsamples="262144" sampleformat="262159" numsamples="14519"> + <waveblock start="0"> + <simpleblockfile filename="e0000876.au" len="14519" min="-0.986301" max="1" rms="0.093837"/> + </waveblock> + </sequence> + <envelope numpoints="0"/> + </waveclip> + </wavetrack> + <wavetrack name="radarping" channel="2" linked="0" offset="0.00000000" rate="8000" gain="1" pan="0"> + <waveclip offset="4.22999994"> + <sequence maxsamples="262144" sampleformat="262159" numsamples="14519"> + <waveblock start="0"> + <simpleblockfile filename="e0000506.au" len="14519" min="-0.986301" max="1" rms="0.093837"/> + </waveblock> + </sequence> + <envelope numpoints="0"/> + </waveclip> + </wavetrack> + <wavetrack name="rauschen" channel="2" linked="0" offset="0.00000000" rate="8000" gain="1" pan="0"> + <waveclip offset="0.00000000"> + <sequence maxsamples="262144" sampleformat="262159" numsamples="64359"> + <waveblock start="0"> + <simpleblockfile filename="e000067a.au" len="64359" min="-0.008912" max="0.008913" rms="0.005108"/> + </waveblock> + </sequence> + <envelope numpoints="0"/> + </waveclip> + </wavetrack> + <wavetrack name="radarping" channel="2" linked="0" offset="0.00000000" rate="8000" gain="1" pan="0"> + <waveclip offset="6.23000076"> + <sequence maxsamples="262144" sampleformat="262159" numsamples="14519"> + <waveblock start="0"> + <simpleblockfile filename="e0000895.au" len="14519" min="-0.986301" max="1" rms="0.093837"/> + </waveblock> + </sequence> + <envelope numpoints="0"/> + </waveclip> + </wavetrack> +</project> Property changes on: trunk/templates/data/intros/radarping.aup ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/templates/data/intros/radarping_data/e00/d00/e0000506.au =================================================================== (Binary files differ) Property changes on: trunk/templates/data/intros/radarping_data/e00/d00/e0000506.au ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/templates/data/intros/radarping_data/e00/d00/e000067a.au =================================================================== (Binary files differ) Property changes on: trunk/templates/data/intros/radarping_data/e00/d00/e000067a.au ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/templates/data/intros/radarping_data/e00/d00/e0000696.au =================================================================== (Binary files differ) Property changes on: trunk/templates/data/intros/radarping_data/e00/d00/e0000696.au ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/templates/data/intros/radarping_data/e00/d00/e0000876.au =================================================================== (Binary files differ) Property changes on: trunk/templates/data/intros/radarping_data/e00/d00/e0000876.au ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/templates/data/intros/radarping_data/e00/d00/e0000895.au =================================================================== (Binary files differ) Property changes on: trunk/templates/data/intros/radarping_data/e00/d00/e0000895.au ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/templates/data/intros/radarping_data/e00/d00/e0000ee0.au =================================================================== (Binary files differ) Property changes on: trunk/templates/data/intros/radarping_data/e00/d00/e0000ee0.au ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |