From: <spo...@us...> - 2007-06-04 23:14:31
|
Revision: 532 http://svn.sourceforge.net/opengate/?rev=532&view=rev Author: spom_spom Date: 2007-06-04 16:14:31 -0700 (Mon, 04 Jun 2007) Log Message: ----------- consider new xml format Modified Paths: -------------- branches/ogsector/ToDo branches/ogsector/data/commodities.xml branches/ogsector/data/equipment.xml branches/ogsector/data/gui/layouts/dialogs/MarketDialog.layout branches/ogsector/ogre.cfg branches/ogsector/resources.cfg branches/ogsector/src/DeviceManager.cpp branches/ogsector/src/DeviceManager.h branches/ogsector/src/Entity.cpp branches/ogsector/src/Entity.h branches/ogsector/src/EntityManager.cpp branches/ogsector/src/EntityManager.h branches/ogsector/win32/ogsectorclient/commodities.xml branches/ogsector/win32/ogsectorclient/resources.cfg Added Paths: ----------- branches/ogsector/win32/ogsectorclient/equipment.xml Modified: branches/ogsector/ToDo =================================================================== --- branches/ogsector/ToDo 2007-06-04 22:43:21 UTC (rev 531) +++ branches/ogsector/ToDo 2007-06-04 23:14:31 UTC (rev 532) @@ -148,6 +148,6 @@ -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 + -Fire: "Spark, " 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, irrlicht - -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, + -Wave: "Frizzle, " 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, crystal Modified: branches/ogsector/data/commodities.xml =================================================================== --- branches/ogsector/data/commodities.xml 2007-06-04 22:43:21 UTC (rev 531) +++ branches/ogsector/data/commodities.xml 2007-06-04 23:14:31 UTC (rev 532) @@ -2,22 +2,31 @@ <commodities> <Resource id="1" location="../../trunk/data/commodities/aluminium.xml"/> - <Resource id="2" location="../../trunk/data/commodities/antimony.xml"/> - <Resource id="3" location="../../trunk/data/commodities/barium.xml"/> - <Resource id="4" location="../../trunk/data/commodities/cesium.xml"/> - <Resource id="5" location="../../trunk/data/commodities/chemicals.xml"/> - <Resource id="6" location="../../trunk/data/commodities/chromium.xml"/> - <Resource id="7" location="../../trunk/data/commodities/copper.xml"/> - <Resource id="8" location="../../trunk/data/commodities/cpu.xml"/> - <Resource id="9" location="../../trunk/data/commodities/fuel_cells.xml"/> - <Resource id="10" location="../../trunk/data/commodities/gold.xml"/> - <Resource id="11" location="../../trunk/data/commodities/helium.xml"/> - <Resource id="12" location="../../trunk/data/commodities/iron.xml"/> - <Resource id="12" location="../../trunk/data/commodities/laser_components.xml"/> - <Resource id="13" location="../../trunk/data/commodities/medical_supplies.xml"/> - <Resource id="14" location="../../trunk/data/commodities/nitrogen.xml"/> - <Resource id="15" location="../../trunk/data/commodities/octavia_light.xml"/> - <Resource id="16" location="../../trunk/data/commodities/rubber.xml"/> - <Resource id="17" location="../../trunk/data/commodities/xenon.xml"/> - <Resource id="18" location="../../trunk/data/commodities/ice.xml"/> + <Resource id="2" location="../../trunk/data/commodities/ammunition.xml"/> + <Resource id="3" location="../../trunk/data/commodities/antimony.xml"/> + <Resource id="4" location="../../trunk/data/commodities/armor.xml"/> + <Resource id="5" location="../../trunk/data/commodities/barium.xml"/> + <Resource id="6" location="../../trunk/data/commodities/cesium.xml"/> + <Resource id="7" location="../../trunk/data/commodities/chemicals.xml"/> + <Resource id="8" location="../../trunk/data/commodities/chromium.xml"/> + <Resource id="9" location="../../trunk/data/commodities/conflux_biomass.xml"/> + <Resource id="10" location="../../trunk/data/commodities/copper.xml"/> + <Resource id="11" location="../../trunk/data/commodities/cpu.xml"/> + <Resource id="12" location="../../trunk/data/commodities/fuel_cells.xml"/> + <Resource id="13" location="../../trunk/data/commodities/gold.xml"/> + <Resource id="14" location="../../trunk/data/commodities/helium.xml"/> + <Resource id="15" location="../../trunk/data/commodities/ice.xml"/> + <Resource id="16" location="../../trunk/data/commodities/iron.xml"/> + <Resource id="17" location="../../trunk/data/commodities/laser_components.xml"/> + <Resource id="18" location="../../trunk/data/commodities/magnetic_components.xml"/> + <Resource id="19" location="../../trunk/data/commodities/manufactured_foods.xml"/> + <Resource id="20" location="../../trunk/data/commodities/medical_supplies.xml"/> + <Resource id="21" location="../../trunk/data/commodities/nitrogen.xml"/> + <Resource id="22" location="../../trunk/data/commodities/octavia_light.xml"/> + <Resource id="23" location="../../trunk/data/commodities/organic_foods.xml"/> + <Resource id="24" location="../../trunk/data/commodities/plutonium.xml"/> + <Resource id="26" location="../../trunk/data/commodities/rubber.xml"/> + <Resource id="27" location="../../trunk/data/commodities/tauseti_flashback.xml"/> + <Resource id="28" location="../../trunk/data/commodities/water.xml"/> + <Resource id="29" location="../../trunk/data/commodities/xenon.xml"/> </commodities> Modified: branches/ogsector/data/equipment.xml =================================================================== --- branches/ogsector/data/equipment.xml 2007-06-04 22:43:21 UTC (rev 531) +++ branches/ogsector/data/equipment.xml 2007-06-04 23:14:31 UTC (rev 532) @@ -1,7 +1,30 @@ <?xml version="1.0"?> <equipment> - <Resource id="1" location="../../trunk/data/capacitors/s_c_15.xml" /> - <Resource id="2" location="../../trunk/data/ECMs/ghost.xml" /> - <Resource id="3" location="../../trunk/data/capacitors/deepol.xml" /> + <Resource id="1" location="../../trunk/data/engines/money.xml" /> + <Resource id="2" location="../../trunk/data/engines/t-e-15.xml" /> + <Resource id="3" location="../../trunk/data/power_plants/contender.xml" /> + <Resource id="4" location="../../trunk/data/power_plants/contender_xl.xml" /> + <Resource id="5" location="../../trunk/data/power_plants/contender_xpr.xml" /> + <Resource id="6" location="../../trunk/data/power_plants/gatherer.xml" /> + <Resource id="7" location="../../trunk/data/power_plants/spud.xml" /> + <Resource id="8" location="../../trunk/data/capacitors/deepol.xml" /> + <Resource id="9" location="../../trunk/data/capacitors/mantra.xml" /> + <Resource id="10" location="../../trunk/data/capacitors/outlet.xml" /> + <Resource id="12" location="../../trunk/data/capacitors/sponge.xml" /> + <Resource id="13" location="../../trunk/data/capacitors/summoner.xml" /> + <Resource id="14" location="../../trunk/data/capacitors/t-c-15.xml" /> + <Resource id="15" location="../../trunk/data/capacitors/tank.xml" /> + <Resource id="16" location="../../trunk/data/ECMs/ghost.xml" /> + <Resource id="17" location="../../trunk/data/radars/cyclops.xml" /> + <Resource id="18" location="../../trunk/data/radars/hall_monitor.xml" /> + <Resource id="19" location="../../trunk/data/radars/outlook.xml" /> + <Resource id="20" location="../../trunk/data/radars/t-r-9.xml" /> + <Resource id="21" location="../../trunk/data/shields/alpaa.xml" /> + <Resource id="22" location="../../trunk/data/shields/flatiron.xml" /> + <Resource id="23" location="../../trunk/data/shields/himelea.xml" /> + <Resource id="24" location="../../trunk/data/shields/kydango.xml" /> + <Resource id="25" location="../../trunk/data/shields/pod.xml" /> + <Resource id="26" location="../../trunk/data/shields/shelter.xml" /> + <Resource id="27" location="../../trunk/data/shields/t-s-13.xml" /> </equipment> Modified: branches/ogsector/data/gui/layouts/dialogs/MarketDialog.layout =================================================================== --- branches/ogsector/data/gui/layouts/dialogs/MarketDialog.layout 2007-06-04 22:43:21 UTC (rev 531) +++ branches/ogsector/data/gui/layouts/dialogs/MarketDialog.layout 2007-06-04 23:14:31 UTC (rev 532) @@ -146,6 +146,7 @@ <Window Type="opengate/EmptyButton" Name="MarketItemDetailedView/Decrease100"> <Property Name="UnifiedPosition" Value="{{0.0, 0},{1.0, -24}}" /> <Property Name="UnifiedSize" Value="{{0.0, 22},{0.0, 17}}" /> + <Property Name="Visible" Value="False" /> <Property Name="NormalImage" Value="set:opengate image:MarketDecrease100Normal" /> <Property Name="HoverImage" Value="set:opengate image:MarketDecrease100Hover" /> <Property Name="PushedImage" Value="set:opengate image:MarketDecrease100Pushed" /> @@ -153,6 +154,7 @@ <Window Type="opengate/EmptyButton" Name="MarketItemDetailedView/Decrease10"> <Property Name="UnifiedPosition" Value="{{0.0, 25},{1.0, -24}}" /> <Property Name="UnifiedSize" Value="{{0.0, 22},{0.0, 17}}" /> + <Property Name="Visible" Value="False" /> <Property Name="NormalImage" Value="set:opengate image:MarketDecrease10Normal" /> <Property Name="HoverImage" Value="set:opengate image:MarketDecrease10Hover" /> <Property Name="PushedImage" Value="set:opengate image:MarketDecrease10Pushed" /> @@ -186,6 +188,7 @@ <Window Type="opengate/EmptyButton" Name="MarketItemDetailedView/Increase10"> <Property Name="UnifiedPosition" Value="{{0.0, 145},{1.0, -24}}" /> <Property Name="UnifiedSize" Value="{{0.0, 22},{0.0, 17}}" /> + <Property Name="Visible" Value="False" /> <Property Name="NormalImage" Value="set:opengate image:MarketIncrease10Normal" /> <Property Name="HoverImage" Value="set:opengate image:MarketIncrease10Hover" /> <Property Name="PushedImage" Value="set:opengate image:MarketIncrease10Pushed" /> @@ -193,6 +196,7 @@ <Window Type="opengate/EmptyButton" Name="MarketItemDetailedView/Increase100"> <Property Name="UnifiedPosition" Value="{{0.0, 170},{1.0, -24}}" /> <Property Name="UnifiedSize" Value="{{0.0, 22},{0.0, 17}}" /> + <Property Name="Visible" Value="False" /> <Property Name="NormalImage" Value="set:opengate image:MarketIncrease100Normal" /> <Property Name="HoverImage" Value="set:opengate image:MarketIncrease100Hover" /> <Property Name="PushedImage" Value="set:opengate image:MarketIncrease100Pushed" /> Modified: branches/ogsector/ogre.cfg =================================================================== --- branches/ogsector/ogre.cfg 2007-06-04 22:43:21 UTC (rev 531) +++ branches/ogsector/ogre.cfg 2007-06-04 23:14:31 UTC (rev 532) @@ -5,4 +5,4 @@ Full Screen=No RTT Preferred Mode=FBO Refresh Rate=Not applicable -Video Mode=800 x 600 +Video Mode=1024 x 768 Modified: branches/ogsector/resources.cfg =================================================================== --- branches/ogsector/resources.cfg 2007-06-04 22:43:21 UTC (rev 531) +++ branches/ogsector/resources.cfg 2007-06-04 23:14:31 UTC (rev 532) @@ -23,6 +23,11 @@ FileSystem=../../trunk/data/ FileSystem=../../trunk/data/commodities FileSystem=../../trunk/data/capacitors +FileSystem=../../trunk/data/engines +FileSystem=../../trunk/data/radars +FileSystem=../../trunk/data/shields +FileSystem=../../trunk/data/ECMs +FileSystem=../../trunk/data/power_plants FileSystem=../../trunk/data/ships/octavius/apteryx FileSystem=../../trunk/data/ships/quantar/storm FileSystem=../../trunk/data/ships/tauseti/lady_kickstart Modified: branches/ogsector/src/DeviceManager.cpp =================================================================== --- branches/ogsector/src/DeviceManager.cpp 2007-06-04 22:43:21 UTC (rev 531) +++ branches/ogsector/src/DeviceManager.cpp 2007-06-04 23:14:31 UTC (rev 532) @@ -34,7 +34,7 @@ network = NULL; gameStateRoot = NULL; avatar = NULL; - + languageSuffix_ = "en"; } DeviceManager::~DeviceManager( ) { Modified: branches/ogsector/src/DeviceManager.h =================================================================== --- branches/ogsector/src/DeviceManager.h 2007-06-04 22:43:21 UTC (rev 531) +++ branches/ogsector/src/DeviceManager.h 2007-06-04 23:14:31 UTC (rev 532) @@ -61,7 +61,22 @@ void setGlobalKeyModifier( GlobalKeyModifier modifier ){ modifier_ = modifier; } GlobalKeyModifier globalKeyModifier( ) const { return modifier_; } - + + std::string languageSuffix() const { return languageSuffix_; } + std::string className( int id ) const { return "unknown"; } + std::string factionName( int id ) const { + switch( id ){ + case 1: return "Neutral"; + case 2: return "Tauseti"; + case 3: return "Octavius"; + case 4: return "Quantar"; + case 5: return "Squadrok"; + case 6: return "Hyperial"; + case 7: return "Amanath"; + } + return "unknown"; + } + Ogre::Root * ogreRoot; Ogre::RenderWindow * renderWindow; CEGUI::OgreCEGUIRenderer * guiRenderer; @@ -74,6 +89,7 @@ protected: GlobalKeyModifier modifier_; + std::string languageSuffix_; }; } //namespace OpenGate Modified: branches/ogsector/src/Entity.cpp =================================================================== --- branches/ogsector/src/Entity.cpp 2007-06-04 22:43:21 UTC (rev 531) +++ branches/ogsector/src/Entity.cpp 2007-06-04 23:14:31 UTC (rev 532) @@ -23,6 +23,7 @@ #include <OgreException.h> #include <OgreCEGUITexture.h> #include <CEGUIImageset.h> +#include <CEGUIExceptions.h> #include <CEGUIBase.h> #include "DeviceManager.h" @@ -36,13 +37,9 @@ if ( imageName != "unknown" ){ try { texture = dynamic_cast< CEGUI::OgreCEGUIRenderer * >( DeviceManager::getSingleton().guiRenderer )->createTexture( imageName, "General"); - } catch( Ogre::Exception & e ){ - LogManager::getSingleton().warn( e.what() ); - fail = true; - } catch( ... ){ - LogManager::getSingleton().warn( "unknown exception occured while create texture: " + imageName ); - fail = true; - } + } catch( CEGUI::Exception & e ){ + LogManager::getSingleton().warn( e.getMessage().c_str() ); fail = true; + } } else { fail = true; } Modified: branches/ogsector/src/Entity.h =================================================================== --- branches/ogsector/src/Entity.h 2007-06-04 22:43:21 UTC (rev 531) +++ branches/ogsector/src/Entity.h 2007-06-04 23:14:31 UTC (rev 532) @@ -51,8 +51,8 @@ description_("Please fill in description"), imageFileName_("unknown"), ceguiImageName_( "unknownEntityImageset") { id_ = 0; techLevel_ = 0; - mass_ = 0; - size_ = 0; + mass_ = 1; + size_ = 1; rtti_ = ENTITY; } @@ -91,6 +91,14 @@ void loadImage( const std::string & imageName ); + inline void setProductionCenters( const std::set < std::string > & productionCenters ) { + productionCenters_ = productionCenters; } + inline std::set < std::string > productionCenters( ) const { return productionCenters_; } + + inline void setRequieredComponents( const std::set < Commodity * > & requieredComponents ) { + requieredComponents_ = requieredComponents; } + inline std::set < Commodity * > requieredComponents( ) const { return requieredComponents_; } + protected: std::string factionName_; @@ -101,6 +109,12 @@ std::string imageFileName_; std::string ceguiImageName_; + /*! The places where this part of equipment is built */ + std::set < std::string > productionCenters_; + + /*! The components required to build this equipment part */ + std::set < Commodity * > requieredComponents_; + /*! 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 */ @@ -131,28 +145,102 @@ inline void setManufacturer( const std::string & manufacturer ) { manufacturer_ = manufacturer; } inline std::string manufacturer( ) const { return manufacturer_; } - inline void setProductionCenters( const std::set < std::string > & productionCenter ) { productionCenter_ = productionCenter; } - inline std::set < std::string> productionCenters( ) const { return productionCenter_; } + /*! Sets the Efficiency of this Equipment between 0(min) and 1(max) */ + inline void setEfficiency( double efficiency ) { efficiency_ = efficiency; } + inline double efficiency( ) const { return efficiency_; } - inline void setRequieredComponents( const std::set < Commodity * > & requieredComponents ) { requieredComponents_ = requieredComponents; } - inline std::set < Commodity * > requieredComponents( ) const { return requieredComponents_; } + inline void setPowerConsumption( double powerConsumption ) { powerConsumption_ = powerConsumption; } + virtual inline double powerConsumption( ) { return powerConsumption_; } protected: Equipment() : Entity(), manufacturer_( "unkown" ) { size_ = 0; + efficiency_ = 1.0; + powerConsumption_ = 0.0; } virtual ~Equipment() { } /*! Name of the company that produces this equipment */ std::string manufacturer_; - /*! 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_; + + /*! Stores the efficiency of this equipment */ + double efficiency_; + + /*! Stores the power consumption of this equipment */ + double powerConsumption_; }; /*! + * \brief This class stores the basical information of a PowerPlant + * + * This class, like all other equipment classes, is filled by loading the + * information from an XML file. It defines the details for a PowerPlant, which + * is a component that is plugged into the ship. + * \author Christoph Brill <eg...@us...> + */ +class PowerPlant : public Equipment { +public: + PowerPlant() : Equipment(){ + rtti_ = POWERPLANT; + powerOutput_ = 0.0; + } + void setPowerOutput( double power ) { powerOutput_ = power; } + double powerOutput( ) const { return powerOutput_; } + +protected: + double powerOutput_; +}; + +/*! + * \brief This class stores the basical information of a Shield + * + * This class, like all other equipment classes, is filled by loading the + * information from an XML file. It defines the details for a shield, which + * is a component that is plugged into the ship. + * \author Christoph Brill <eg...@us...> + */ +class Shield : public Equipment { +public: + Shield() : Equipment(){ + rtti_ = SHIELD; + } + + void setMaximumDeflection( double deflection ){ setMaximumDeflection_ = deflection; } + double maximumDeflection( ) const { return setMaximumDeflection_; } + + void setRegenerationRate( double regenRate ){ regenerationRate_ = regenRate; } + double regenerationRate( ) const { return regenerationRate_; } + + double powerConsumption( ) const { return regenerationRate_ / efficiency_; } + +protected: + double regenerationRate_; + double setMaximumDeflection_; + +}; + +/*! + * \brief This class stores the basical information of a radar + * + * This class, like all other equipment classes, is filled by loading the + * information from an XML file. It defines the details for a radar, which + * is a component that is plugged into the ship. + * \author Christoph Brill <eg...@us...> + */ +class Radar : public Equipment { +public: + Radar() : Equipment(){ + rtti_ = RADAR; + } + void setMaximumRange( double range ){ range_ = range; } + double maximumRange() const{ return range_; } + +protected: + double range_; +}; + +/*! * \brief This class stores the basical information of a capactitor * * This class, like all other equipment classes, is filled by loading the @@ -164,20 +252,14 @@ public: Capacitor() : Equipment() { - efficiency_ = 0; + rtti_ = CAPACITOR; capacity_ = 0; - rtti_ = CAPACITOR; } - 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_; }; @@ -194,22 +276,16 @@ public: Ecm() : Equipment() { + rtti_ = ECM; sensorLevel_ = 0; - powerConsumption_ = 0; - rtti_ = ECM; } 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_; }; /*! @@ -224,20 +300,16 @@ public: Engine(): Equipment() { - efficiency_ = 0.0; + rtti_ = ENGINE; maxThrust_ = 0; - rtti_ = ENGINE; } - inline void setEfficiency( double efficiency ) { efficiency_ = efficiency; } - inline double efficiency( ) { return efficiency_; } - inline void setMaxThrust( long maxThrust ) { maxThrust_ = maxThrust; } inline long maxThrust( ) { return maxThrust_; } + double powerConsumption( ) const { return ( maxThrust_ / 1000 ) / efficiency_; } + private: - /*! Stores the efficiency of this engine */ - double efficiency_; /*! Stores the maximum thrust of this engine */ long maxThrust_; }; @@ -254,15 +326,11 @@ public: Commodity(): Entity(), commodityID_( "unknownID" ) { + rtti_ = COMMODITY; meltingPoint_ = 0; - size_ = 0; graviticSig_ = 0.0; - rtti_ = COMMODITY; } - inline void setProductionCenters( const std::set < std::string > & productionCenters ) { productionCenters_ = productionCenters; } - inline std::set < std::string > productionCenters( ) const { return productionCenters_; } - inline void setMeltingPoint( int meltingPoint ){ meltingPoint_ = meltingPoint; } inline int meltingPoint( ) const { return meltingPoint_; } @@ -273,8 +341,6 @@ inline std::string commodityID( ) const { return commodityID_; } protected: - /*! 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 */ Modified: branches/ogsector/src/EntityManager.cpp =================================================================== --- branches/ogsector/src/EntityManager.cpp 2007-06-04 22:43:21 UTC (rev 531) +++ branches/ogsector/src/EntityManager.cpp 2007-06-04 23:14:31 UTC (rev 532) @@ -19,6 +19,7 @@ ***************************************************************************/ #include "EntityManager.h" +#include "DeviceManager.h" #include "tinyxml/tinyxml.h" namespace OpenGate { @@ -46,21 +47,21 @@ TiXmlElement* pElem; TiXmlHandle hRoot( 0 ); - pElem = docHandle.FirstChildElement().Element(); + 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"); - } + + 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." ); + 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 ); } @@ -89,19 +90,20 @@ Entity * EquipmentManager::loadAndCreate( int id, const std::string & fileName ){ + log_->info( "Read equipment: " + fileName ); + TiXmlDocument doc( fileName ); bool loadOkay = doc.LoadFile(); if ( !loadOkay ) { - log_->fatal( std::string( "Failed to load file: " + fileName ) ); + log_->fatal( std::string( "Failed to load equipment file: " + fileName ) ); return NULL; } TiXmlHandle docHandle( &doc ); - TiXmlElement* pElem; + TiXmlElement *pElem; TiXmlHandle hRoot( 0 ); - //** block: equipment; pElem = docHandle.FirstChildElement().Element(); hRoot = TiXmlHandle( pElem ); @@ -110,81 +112,148 @@ return NULL; } - if ( strcmp( "equipment", pElem->Value() ) != 0 ){ + if ( strcmp( "equipment", pElem->Value() ) != 0 && strcmp( "container", pElem->Value() ) != 0 ) { log_->fatal( fileName + " is no equipment description" ); return NULL; } - Equipment * entity = 0; - std::string equipmentType = pElem->Attribute("type"); +// Equipment * entity = 0; +// std::string equipmentType = pElem->Attribute("type"); - if ( equipmentType == "Engine" ) entity = new Engine(); - else if ( equipmentType == "ECM" ) entity = new Ecm(); - else if ( equipmentType == "Capacitor" ) entity = new Capacitor(); - else { - log_->fatal( fileName + " has no type of equipment defined" ); + +// if ( equipmentType == "Engine" ) entity = new Engine(); +// else if ( equipmentType == "ECM" ) entity = new Ecm(); +// else if ( equipmentType == "Capacitor" ) entity = new Capacitor(); +// else { +// log_->fatal( fileName + " has no type of equipment defined" ); +// return NULL; +// } + + + Entity * entity; + + //** Mandatory elements; + pElem = hRoot.ChildElement( "category_id", 0 ).Element(); + if ( !pElem ) { //** fallback + pElem = hRoot.ChildElement( "categorie_id", 0 ).Element(); + } + + if ( pElem ) { + int category = toInt( pElem->FirstChild()->Value() ); + + switch( category ){ + case 1: entity = new Commodity(); break; + case 2: entity = new PowerPlant(); break; + case 4: entity = new Capacitor(); break; + case 6: entity = new Engine(); break; + case 7: entity = new Shield(); break; + case 8: entity = new Radar(); break; + default: + log_->fatal( fileName + " category_id " + toStr( category ) + " unknown." ); + return NULL; + } + } else { + log_->fatal( fileName + " has no category_id (mandatory)." ); return NULL; } //** Mandatory elements; - pElem = hRoot.ChildElement( "name", 0 ).Element(); + pElem = hRoot.ChildElement( "name_" + DeviceManager::getSingleton().languageSuffix(), 0 ).Element(); + if ( !pElem ){ //** fallback to english + pElem = hRoot.ChildElement( "name_en", 0 ).Element(); + } if ( pElem ) { entity->setName( pElem->FirstChild()->Value() ); } else { - log_->fatal( fileName + " has no name (mandatory)." ); + log_->fatal( fileName + " has no name_en (mandatory)." ); return NULL; } - pElem = hRoot.ChildElement( "faction", 0 ).Element(); + + pElem = hRoot.ChildElement( "faction_id", 0 ).Element(); if ( pElem ) { - entity->setFactionName( pElem->FirstChild()->Value() ); + entity->setFactionName( DeviceManager::getSingleton().factionName( toInt( pElem->FirstChild()->Value() ) ) ); } else { - log_->fatal( fileName + " has no factionname (mandatory)." ); + log_->fatal( fileName + " has no faction_id (mandatory)." ); return NULL; } + //** Image name for the entity is derived from filename; + std::string basename( fileName.substr( fileName.rfind( "/" ) + 1 ) ); + entity->setImageName( basename.substr( 0, basename.find( ".xml" ) ) + ".png" ); + //** Generic elements - pElem = hRoot.ChildElement( "class", 0 ).Element(); - if ( pElem ) entity->setClassName( pElem->FirstChild()->Value() ); + pElem = hRoot.ChildElement( "class_id", 0 ).Element(); + if ( pElem ) entity->setClassName( DeviceManager::getSingleton().className( toInt( pElem->FirstChild()->Value() ) ) ); pElem = hRoot.ChildElement( "techlevel", 0 ).Element(); if ( pElem ) entity->setTechLevel( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "required_rank", 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() ) ); - pElem = hRoot.ChildElement( "description", 0 ).Element(); - if ( pElem ) entity->setDescription( pElem->FirstChild()->Value() ); + double efficiency = 1.0; + pElem = hRoot.ChildElement( "efficiency", 0 ).Element(); + if ( pElem ) { + efficiency = toDouble( pElem->FirstChild()->Value() ); + if ( efficiency > 1 ) efficiency /= 100; + } - pElem = hRoot.ChildElement( "image", 0 ).Element(); - if ( pElem ) entity->setImageName( pElem->FirstChild()->Value() ); + double powerConsumption = 0.0; + pElem = hRoot.ChildElement( "power_input", 0 ).Element(); + if ( pElem ) powerConsumption = toDouble( pElem->FirstChild()->Value() ); + pElem = hRoot.ChildElement( "description_" + DeviceManager::getSingleton().languageSuffix(), 0 ).Element(); + if ( !pElem ){ //** fallback to english + pElem = hRoot.ChildElement( "description_en", 0 ).Element(); + } + if ( pElem ) entity->setDescription( pElem->FirstChild()->Value() ); //** Specific elements; switch ( entity->entityType() ){ case POWERPLANT: + pElem = hRoot.ChildElement( "power_output", 0 ).Element(); + if ( pElem ) dynamic_cast< PowerPlant * >( entity )->setPowerOutput( toDouble( pElem->FirstChild()->Value() ) ); break; case ENGINE: + dynamic_cast< Engine * >( entity )->setEfficiency( efficiency ); break; case RADAR: + dynamic_cast< Radar * >( entity )->setEfficiency( efficiency ); + dynamic_cast< Radar * >( entity )->setPowerConsumption( powerConsumption ); + + pElem = hRoot.ChildElement( "maximum_range", 0 ).Element(); + if ( pElem ) dynamic_cast< Radar * >( entity )->setMaximumRange( toDouble( pElem->FirstChild()->Value() ) ); + break; case ECM: + dynamic_cast< Ecm * >( entity )->setPowerConsumption( powerConsumption ); + pElem = hRoot.ChildElement( "sensorlevel", 0 ).Element(); - if ( pElem ) static_cast<Ecm*>(entity)->setSensorLevel( toInt( pElem->FirstChild()->Value() ) ); + if ( pElem ) dynamic_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() ) ); + if ( pElem ) dynamic_cast< Ecm * >( entity )->setPowerConsumption( toInt( pElem->FirstChild()->Value() ) ); break; case CAPACITOR: - pElem = hRoot.ChildElement( "efficiency", 0 ).Element(); - if ( pElem ) static_cast<Capacitor*>(entity)->setEfficiency( toInt( pElem->FirstChild()->Value() ) ); + dynamic_cast< Capacitor * >( entity )->setEfficiency( efficiency ); pElem = hRoot.ChildElement( "capacity", 0 ).Element(); - if ( pElem ) static_cast<Capacitor*>(entity)->setCapacity( toInt( pElem->FirstChild()->Value() ) ); + if ( pElem ) dynamic_cast< Capacitor * >( entity )->setCapacity( toInt( pElem->FirstChild()->Value() ) ); break; case SHIELD: + dynamic_cast< Shield * >( entity )->setEfficiency( efficiency ); + + pElem = hRoot.ChildElement( "regeneration_rate", 0 ).Element(); + if ( pElem ) dynamic_cast< Shield * >( entity )->setRegenerationRate( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "maximum_deflection", 0 ).Element(); + if ( pElem ) dynamic_cast< Shield * >( entity )->setMaximumDeflection( toInt( pElem->FirstChild()->Value() ) ); + break; case GUN: break; @@ -196,7 +265,6 @@ break; } - //** Additonal elements; //** Production Data; std::set < std::string > productionCenters; for ( pElem = hRoot.FirstChild( "production-center" ).Element(); pElem != 0; pElem = pElem->NextSiblingElement() ) { @@ -226,7 +294,6 @@ templatesByID_[ id ] = entity; factions_.insert( entity->factionName() ); - log_->info( std::string( "Loaded " ) + equipmentType + std::string( ": ") + entity->factionName() + "/" + entity->name() ); } else { log_->warn( std::string( "Equipment with name: " ) + entity->factionName() + "/" + entity->name() + " already loaded" ); @@ -256,6 +323,8 @@ Entity * CommodityManager::loadAndCreate( int id, const std::string & fileName ){ + log_->info( "Read commodity: " + fileName ); + TiXmlDocument doc( fileName ); bool loadOkay = doc.LoadFile(); @@ -265,10 +334,9 @@ } TiXmlHandle docHandle( &doc ); - TiXmlElement* pElem; + TiXmlElement * pElem; TiXmlHandle hRoot( 0 ); - //** block: equipment; pElem = docHandle.FirstChildElement().Element(); hRoot = TiXmlHandle( pElem ); @@ -277,39 +345,64 @@ return NULL; } - if ( strcmp( "component", pElem->Value() ) != 0 ){ + if ( strcmp( "component", pElem->Value() ) != 0 && strcmp( "container", pElem->Value() ) != 0 ){ log_->fatal( fileName + " is no commodity description" ); return NULL; } - Commodity *entity = new Commodity; + Commodity *entity; - // Naming - pElem = hRoot.ChildElement( "name_en", 0 ).Element(); + //** Mandatory elements; + pElem = hRoot.ChildElement( "category_id", 0 ).Element(); + if ( !pElem ) { //** fallback + pElem = hRoot.ChildElement( "categorie_id", 0 ).Element(); + } if ( pElem ) { + if ( toInt( pElem->FirstChild()->Value() ) == 1 ){ + entity = new Commodity; + } else { + log_->warn( fileName + " category_id is not 1, so I set them to 1." ); + entity = new Commodity; + } + } else { + log_->fatal( fileName + " has no category_id (mandatory)." ); + return NULL; + } + + pElem = hRoot.ChildElement( "name_" + DeviceManager::getSingleton().languageSuffix(), 0 ).Element(); + if ( !pElem ){ + //** Fallback to english + pElem = hRoot.ChildElement( "name_en", 0 ).Element(); + } + if ( pElem ) { entity->setName( pElem->FirstChild()->Value() ); } else { - log_->fatal( fileName + " has no name (mandatory)." ); + log_->fatal( fileName + " has no name_en (mandatory)." ); return NULL; } - // Generic Data - pElem = hRoot.ChildElement( "class", 0 ).Element(); - if ( pElem ) entity->setClassName( pElem->FirstChild()->Value() ); + //** Image name for the entity is derived from filename; + std::string basename( fileName.substr( fileName.rfind( "/" ) + 1 ) ); + entity->setImageName( basename.substr( 0, basename.find( ".xml" ) ) + ".png" ); + + //** Generic data + pElem = hRoot.ChildElement( "class_id", 0 ).Element(); + if ( pElem ) entity->setClassName( DeviceManager::getSingleton().className( toInt( 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() ) ); - // Additional Data - pElem = hRoot.ChildElement( "description_en", 0 ).Element(); + //** Additional Data + pElem = hRoot.ChildElement( "description_" + DeviceManager::getSingleton().languageSuffix(), 0 ).Element(); if ( pElem ) entity->setDescription( pElem->FirstChild()->Value() ); - pElem = hRoot.ChildElement( "image", 0 ).Element(); - if ( pElem ) entity->setImageName( pElem->FirstChild()->Value() ); - - // Specific Data + + //** Specific Data pElem = hRoot.ChildElement( "id", 0 ).Element(); if ( pElem ) entity->setCommodityID( pElem->FirstChild()->Value() ); pElem = hRoot.ChildElement( "melting-point", 0 ).Element(); @@ -317,7 +410,7 @@ pElem = hRoot.ChildElement( "gravitic-sig", 0 ).Element(); if ( pElem ) entity->setGraviticSig( toFloat( pElem->FirstChild()->Value() ) ); - // Production Data + //** 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! @@ -331,7 +424,7 @@ templatesByID_[ id ] = entity; factions_.insert( entity->factionName() ); - log_->info( std::string( "Loaded Commodity: " ) + entity->factionName() + "/" + entity->name() ); +// log_->info( std::string( "Loaded Commodity: " ) + entity->factionName() + "/" + entity->name() ); } else { log_->warn( std::string( "Equipment with name: " ) + entity->factionName() + "/" + entity->name() + " allready loaded" ); Modified: branches/ogsector/src/EntityManager.h =================================================================== --- branches/ogsector/src/EntityManager.h 2007-06-04 22:43:21 UTC (rev 531) +++ branches/ogsector/src/EntityManager.h 2007-06-04 23:14:31 UTC (rev 532) @@ -122,7 +122,8 @@ virtual Entity * loadAndCreate( int id, const std::string & filename ); std::vector < Entity * > allByCategory( const std::string & category ){ - EntityType rtti = categoryType( category ); + EntityType rtti; + if ( category != "All" ) rtti = categoryType( category ); std::vector < Entity * > items; for ( std::map < std::string, Entity * >::iterator it = templatesByName_.begin(); it != templatesByName_.end(); it ++ ){ if ( ( category == "All" ) || ( it->second->entityType() == rtti ) ){ Modified: branches/ogsector/win32/ogsectorclient/commodities.xml =================================================================== --- branches/ogsector/win32/ogsectorclient/commodities.xml 2007-06-04 22:43:21 UTC (rev 531) +++ branches/ogsector/win32/ogsectorclient/commodities.xml 2007-06-04 23:14:31 UTC (rev 532) @@ -1,23 +1,32 @@ <?xml version="1.0"?> <commodities> - <Resource id="1" location="../../../../trunk/data/commodities/aluminium.xml"/> - <Resource id="2" location="../../../../trunk/data/commodities/antimony.xml"/> - <Resource id="3" location="../../../../trunk/data/commodities/barium.xml"/> - <Resource id="4" location="../../../../trunk/data/commodities/cesium.xml"/> - <Resource id="5" location="../../../../trunk/data/commodities/chemicals.xml"/> - <Resource id="6" location="../../../../trunk/data/commodities/chromium.xml"/> - <Resource id="7" location="../../../../trunk/data/commodities/copper.xml"/> - <Resource id="8" location="../../../../trunk/data/commodities/cpu.xml"/> - <Resource id="9" location="../../../../trunk/data/commodities/fuel_cells.xml"/> - <Resource id="10" location="../../../../trunk/data/commodities/gold.xml"/> - <Resource id="11" location="../../../../trunk/data/commodities/helium.xml"/> - <Resource id="12" location="../../../../trunk/data/commodities/iron.xml"/> - <Resource id="12" location="../../../../trunk/data/commodities/laser_components.xml"/> - <Resource id="13" location="../../../../trunk/data/commodities/medical_supplies.xml"/> - <Resource id="14" location="../../../../trunk/data/commodities/nitrogen.xml"/> - <Resource id="15" location="../../../../trunk/data/commodities/octavia_light.xml"/> - <Resource id="16" location="../../../../trunk/data/commodities/rubber.xml"/> - <Resource id="17" location="../../../../trunk/data/commodities/xenon.xml"/> - <Resource id="18" location="../../../../trunk/data/commodities/ice.xml"/> + <Resource id="1" location="../../../../trunk/data/commodities/aluminium.xml"/> + <Resource id="2" location="../../../../trunk/data/commodities/ammunition.xml"/> + <Resource id="3" location="../../../../trunk/data/commodities/antimony.xml"/> + <Resource id="4" location="../../../../trunk/data/commodities/armor.xml"/> + <Resource id="5" location="../../../../trunk/data/commodities/barium.xml"/> + <Resource id="6" location="../../../../trunk/data/commodities/cesium.xml"/> + <Resource id="7" location="../../../../trunk/data/commodities/chemicals.xml"/> + <Resource id="8" location="../../../../trunk/data/commodities/chromium.xml"/> + <Resource id="9" location="../../../../trunk/data/commodities/conflux_biomass.xml"/> + <Resource id="10" location="../../../../trunk/data/commodities/copper.xml"/> + <Resource id="11" location="../../../../trunk/data/commodities/cpu.xml"/> + <Resource id="12" location="../../../../trunk/data/commodities/fuel_cells.xml"/> + <Resource id="13" location="../../../../trunk/data/commodities/gold.xml"/> + <Resource id="14" location="../../../../trunk/data/commodities/helium.xml"/> + <Resource id="15" location="../../../../trunk/data/commodities/ice.xml"/> + <Resource id="16" location="../../../../trunk/data/commodities/iron.xml"/> + <Resource id="17" location="../../../../trunk/data/commodities/laser_components.xml"/> + <Resource id="18" location="../../../../trunk/data/commodities/magnetic_components.xml"/> + <Resource id="19" location="../../../../trunk/data/commodities/manufactured_foods.xml"/> + <Resource id="20" location="../../../../trunk/data/commodities/medical_supplies.xml"/> + <Resource id="21" location="../../../../trunk/data/commodities/nitrogen.xml"/> + <Resource id="22" location="../../../../trunk/data/commodities/octavia_light.xml"/> + <Resource id="23" location="../../../../trunk/data/commodities/organic_foods.xml"/> + <Resource id="24" location="../../../../trunk/data/commodities/plutonium.xml"/> + <Resource id="26" location="../../../../trunk/data/commodities/rubber.xml"/> + <Resource id="27" location="../../../../trunk/data/commodities/tauseti_flashback.xml"/> + <Resource id="28" location="../../../../trunk/data/commodities/water.xml"/> + <Resource id="29" location="../../../../trunk/data/commodities/xenon.xml"/> </commodities> Added: branches/ogsector/win32/ogsectorclient/equipment.xml =================================================================== --- branches/ogsector/win32/ogsectorclient/equipment.xml (rev 0) +++ branches/ogsector/win32/ogsectorclient/equipment.xml 2007-06-04 23:14:31 UTC (rev 532) @@ -0,0 +1,30 @@ +<?xml version="1.0"?> + +<equipment> + <Resource id="1" location="../../../../trunk/data/engines/money.xml" /> + <Resource id="2" location="../../../../trunk/data/engines/t-e-15.xml" /> + <Resource id="3" location="../../../../trunk/data/power_plants/contender.xml" /> + <Resource id="4" location="../../../../trunk/data/power_plants/contender_xl.xml" /> + <Resource id="5" location="../../../../trunk/data/power_plants/contender_xpr.xml" /> + <Resource id="6" location="../../../../trunk/data/power_plants/gatherer.xml" /> + <Resource id="7" location="../../../../trunk/data/power_plants/spud.xml" /> + <Resource id="8" location="../../../../trunk/data/capacitors/deepol.xml" /> + <Resource id="9" location="../../../../trunk/data/capacitors/mantra.xml" /> + <Resource id="10" location="../../../../trunk/data/capacitors/outlet.xml" /> + <Resource id="12" location="../../../../trunk/data/capacitors/sponge.xml" /> + <Resource id="13" location="../../../../trunk/data/capacitors/summoner.xml" /> + <Resource id="14" location="../../../../trunk/data/capacitors/t-c-15.xml" /> + <Resource id="15" location="../../../../trunk/data/capacitors/tank.xml" /> + <Resource id="16" location="../../../../trunk/data/ECMs/ghost.xml" /> + <Resource id="17" location="../../../../trunk/data/radars/cyclops.xml" /> + <Resource id="18" location="../../../../trunk/data/radars/hall_monitor.xml" /> + <Resource id="19" location="../../../../trunk/data/radars/outlook.xml" /> + <Resource id="20" location="../../../../trunk/data/radars/t-r-9.xml" /> + <Resource id="21" location="../../../../trunk/data/shields/alpaa.xml" /> + <Resource id="22" location="../../../../trunk/data/shields/flatiron.xml" /> + <Resource id="23" location="../../../../trunk/data/shields/himelea.xml" /> + <Resource id="24" location="../../../../trunk/data/shields/kydango.xml" /> + <Resource id="25" location="../../../../trunk/data/shields/pod.xml" /> + <Resource id="26" location="../../../../trunk/data/shields/shelter.xml" /> + <Resource id="27" location="../../../../trunk/data/shields/t-s-13.xml" /> +</equipment> Modified: branches/ogsector/win32/ogsectorclient/resources.cfg =================================================================== --- branches/ogsector/win32/ogsectorclient/resources.cfg 2007-06-04 22:43:21 UTC (rev 531) +++ branches/ogsector/win32/ogsectorclient/resources.cfg 2007-06-04 23:14:31 UTC (rev 532) @@ -18,3 +18,9 @@ FileSystem=../../../../trunk/data/ships/octavius/apteryx FileSystem=../../../../trunk/data/ships/quantar/storm FileSystem=../../../../trunk/data/ships/tauseti/lady_kickstart +FileSystem=../../../../trunk/data/capacitors +FileSystem=../..././../trunk/data/engines +FileSystem=../../../../trunk/data/radars +FileSystem=../../../../trunk/data/shields +FileSystem=../../../../trunk/data/ECMs +FileSystem=../../../../trunk/data/power_plants This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spo...@us...> - 2007-06-06 16:59:51
|
Revision: 538 http://svn.sourceforge.net/opengate/?rev=538&view=rev Author: spom_spom Date: 2007-06-06 09:59:51 -0700 (Wed, 06 Jun 2007) Log Message: ----------- Add support for new image fileformat Modified Paths: -------------- branches/ogsector/data/equipment.xml branches/ogsector/data/gui/layouts/dialogs/MarketDialog.layout branches/ogsector/data/gui/layouts/dialogs/MarketItemShortDialog.layout branches/ogsector/data/gui/schemes/opengate/opengate.imageset branches/ogsector/data/gui/schemes/opengate/opengate.png branches/ogsector/src/Avatar.cpp branches/ogsector/src/Console.cpp branches/ogsector/src/DeviceManager.h branches/ogsector/src/Entity.cpp branches/ogsector/src/Entity.h branches/ogsector/src/EntityManager.cpp branches/ogsector/src/MarketDialog.cpp branches/ogsector/src/VesselManager.cpp branches/ogsector/win32/ogsectorclient/equipment.xml Modified: branches/ogsector/data/equipment.xml =================================================================== --- branches/ogsector/data/equipment.xml 2007-06-06 02:57:17 UTC (rev 537) +++ branches/ogsector/data/equipment.xml 2007-06-06 16:59:51 UTC (rev 538) @@ -27,4 +27,6 @@ <Resource id="25" location="../../trunk/data/shields/pod.xml" /> <Resource id="26" location="../../trunk/data/shields/shelter.xml" /> <Resource id="27" location="../../trunk/data/shields/t-s-13.xml" /> + <Resource id="28" location="../../trunk/data/power_plants/t-p-16.xml" /> + <Resource id="29" location="../../trunk/data/radars/night_watchman.xml" /> </equipment> Modified: branches/ogsector/data/gui/layouts/dialogs/MarketDialog.layout =================================================================== --- branches/ogsector/data/gui/layouts/dialogs/MarketDialog.layout 2007-06-06 02:57:17 UTC (rev 537) +++ branches/ogsector/data/gui/layouts/dialogs/MarketDialog.layout 2007-06-06 16:59:51 UTC (rev 538) @@ -45,13 +45,13 @@ </Window> <Window Type="opengate/StaticGreenImage" Name="MarketItemDetailedView/Image"> <!-- Filled within game --> - <Property Name="UnifiedPosition" Value="{{0.0, 20},{0.5, -120}}" /> - <Property Name="UnifiedSize" Value="{{0.0, 250},{0.0, 240}}" /> + <Property Name="UnifiedPosition" Value="{{0.0, 20},{0.5, -145}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 290},{0.0, 290}}" /> <Property Name="BackgroundEnabled" Value="False" /> <Property Name="FrameEnabled" Value="False" /> </Window> <Window Type="opengate/StaticGreenImage" Name="MarketItemDetailedView/TextFrame"> - <Property Name="UnifiedPosition" Value="{{0.0, 290},{0.5, -120}}" /> + <Property Name="UnifiedPosition" Value="{{0.0, 330},{0.5, -120}}" /> <Property Name="UnifiedSize" Value="{{0.0, 250},{0.0, 240}}" /> <Property Name="BackgroundEnabled" Value="False" /> <Property Name="FrameEnabled" Value="False" /> @@ -438,63 +438,133 @@ <Property Name="UnifiedPosition" Value="{{0,10},{0.0,27}}" /> <Property Name="UnifiedSize" Value="{{1.0,-20},{0.0,30}}" /> <Property Name="Text" Value="Commodities" /> - <Window Type="opengate/StaticImage" Name="CategorieCom"> + <Window Type="opengate/StaticImage" Name="CategorieCommodityIcon"> <Property Name="UnifiedPosition" Value="{{0.0,+10},{0.5,-7}}" /> <Property Name="UnifiedSize" Value="{{0.0,15},{0.0,15}}" /> <Property Name="BackgroundEnabled" Value="False" /> <Property Name="FrameEnabled" Value="False" /> - <Property Name="Image" Value="set:opengate image:IconCommoditiesNormal" /> + <Property Name="Image" Value="set:opengate image:IconCommodityNormal" /> </Window> </Window> <Window Type="opengate/MarketButton" Name="CategoriePowerPlants"> <Property Name="UnifiedPosition" Value="{{0,10},{0.0,56}}" /> <Property Name="UnifiedSize" Value="{{1.0,-20},{0.0,30}}" /> <Property Name="Text" Value="Power Plants" /> + <Window Type="opengate/StaticImage" Name="CategoriePowerplantIcon"> + <Property Name="UnifiedPosition" Value="{{0.0,+10},{0.5,-7}}" /> + <Property Name="UnifiedSize" Value="{{0.0,15},{0.0,15}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:opengate image:IconPowerplantNormal" /> + </Window> </Window> <Window Type="opengate/MarketButton" Name="CategorieEngines"> <Property Name="UnifiedPosition" Value="{{0,10},{0.0,85}}" /> <Property Name="UnifiedSize" Value="{{1.0,-20},{0.0,30}}" /> <Property Name="Text" Value="Engines" /> + <Window Type="opengate/StaticImage" Name="CategorieEngineIcon"> + <Property Name="UnifiedPosition" Value="{{0.0,+10},{0.5,-7}}" /> + <Property Name="UnifiedSize" Value="{{0.0,15},{0.0,15}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:opengate image:IconEngineNormal" /> + </Window> </Window> <Window Type="opengate/MarketButton" Name="CategorieRadars"> <Property Name="UnifiedPosition" Value="{{0,10},{0.0,114}}" /> <Property Name="UnifiedSize" Value="{{1.0,-20},{0.0,30}}" /> <Property Name="Text" Value="Radars" /> + <Window Type="opengate/StaticImage" Name="CategorieRadarIcon"> + <Property Name="UnifiedPosition" Value="{{0.0,+10},{0.5,-7}}" /> + <Property Name="UnifiedSize" Value="{{0.0,15},{0.0,15}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:opengate image:IconRadarNormal" /> + </Window> </Window> <Window Type="opengate/MarketButton" Name="CategorieECM"> <Property Name="UnifiedPosition" Value="{{0,10},{0.0,143}}" /> <Property Name="UnifiedSize" Value="{{1.0,-20},{0.0,30}}" /> <Property Name="Text" Value="ECM" /> + <Window Type="opengate/StaticImage" Name="CategorieECMIcon"> + <Property Name="UnifiedPosition" Value="{{0.0,+10},{0.5,-7}}" /> + <Property Name="UnifiedSize" Value="{{0.0,15},{0.0,15}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:opengate image:IconECMNormal" /> + </Window> </Window> <Window Type="opengate/MarketButton" Name="CategorieCapacitors"> <Property Name="UnifiedPosition" Value="{{0,10},{0.0,172}}" /> <Property Name="UnifiedSize" Value="{{1.0,-20},{0.0,30}}" /> <Property Name="Text" Value="Capacitors" /> + <Window Type="opengate/StaticImage" Name="CategorieCapacitorIcon"> + <Property Name="UnifiedPosition" Value="{{0.0,+10},{0.5,-7}}" /> + <Property Name="UnifiedSize" Value="{{0.0,15},{0.0,15}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:opengate image:IconCapacitorNormal" /> + </Window> </Window> <Window Type="opengate/MarketButton" Name="CategorieShields"> <Property Name="UnifiedPosition" Value="{{0,10},{0.0,201}}" /> <Property Name="UnifiedSize" Value="{{1.0,-20},{0.0,30}}" /> <Property Name="Text" Value="Shields" /> + <Window Type="opengate/StaticImage" Name="CategorieShieldIcon"> + <Property Name="UnifiedPosition" Value="{{0.0,+10},{0.5,-7}}" /> + <Property Name="UnifiedSize" Value="{{0.0,15},{0.0,15}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:opengate image:IconShieldNormal" /> + </Window> </Window> <Window Type="opengate/MarketButton" Name="CategorieGuns"> <Property Name="UnifiedPosition" Value="{{0,10},{0.0,230}}" /> <Property Name="UnifiedSize" Value="{{1.0,-20},{0.0,30}}" /> <Property Name="Text" Value="Guns" /> + <Window Type="opengate/StaticImage" Name="CategorieGunIcon"> + <Property Name="UnifiedPosition" Value="{{0.0,+10},{0.5,-7}}" /> + <Property Name="UnifiedSize" Value="{{0.0,15},{0.0,15}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:opengate image:IconGunNormal" /> + </Window> </Window> <Window Type="opengate/MarketButton" Name="CategorieMissiles"> <Property Name="UnifiedPosition" Value="{{0,10},{0.0,259}}" /> <Property Name="UnifiedSize" Value="{{1.0,-20},{0.0,30}}" /> <Property Name="Text" Value="Missiles" /> + <Window Type="opengate/StaticImage" Name="CategorieMissileIcon"> + <Property Name="UnifiedPosition" Value="{{0.0,+10},{0.5,-7}}" /> + <Property Name="UnifiedSize" Value="{{0.0,15},{0.0,15}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:opengate image:IconMissileNormal" /> + </Window> </Window> <Window Type="opengate/MarketButton" Name="CategorieMODx"> <Property Name="UnifiedPosition" Value="{{0,10},{0.0,288}}" /> <Property Name="UnifiedSize" Value="{{1.0,-20},{0.0,30}}" /> <Property Name="Text" Value="MODx" /> + <Window Type="opengate/StaticImage" Name="CategorieMODxIcon"> + <Property Name="UnifiedPosition" Value="{{0.0,+10},{0.5,-7}}" /> + <Property Name="UnifiedSize" Value="{{0.0,15},{0.0,15}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:opengate image:IconMODxNormal" /> + </Window> </Window> <Window Type="opengate/MarketButton" Name="CategorieAll"> <Property Name="UnifiedPosition" Value="{{0,10},{0.0,317}}" /> <Property Name="UnifiedSize" Value="{{1.0,-20},{0.0,30}}" /> <Property Name="Text" Value="All" /> + <Window Type="opengate/StaticImage" Name="CategorieStorageIcon"> + <Property Name="UnifiedPosition" Value="{{0.0,+10},{0.5,-7}}" /> + <Property Name="UnifiedSize" Value="{{0.0,15},{0.0,15}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:opengate image:IconStorageNormal" /> + </Window> </Window> </Window> <!-- ********************* --> Modified: branches/ogsector/data/gui/layouts/dialogs/MarketItemShortDialog.layout =================================================================== --- branches/ogsector/data/gui/layouts/dialogs/MarketItemShortDialog.layout 2007-06-06 02:57:17 UTC (rev 537) +++ branches/ogsector/data/gui/layouts/dialogs/MarketItemShortDialog.layout 2007-06-06 16:59:51 UTC (rev 538) @@ -6,8 +6,8 @@ <Property Name="AlwaysOnTop" Value="true" /> <Property Name="Text" Value="ItemName" /> <Window Type="opengate/StaticGreenImage" Name="MarketShortItemImage"> - <Property Name="UnifiedPosition" Value="{{0.0,12},{0.0,15}}" /> - <Property Name="UnifiedSize" Value="{{1.0,-30},{1.0,-40}}" /> + <Property Name="UnifiedPosition" Value="{{0.0,12},{0.0,7}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 76},{0.0, 76}}" /> <Property Name="BackgroundEnabled" Value="False" /> <Property Name="FrameEnabled" Value="false" /> <Property Name="MousePassThroughEnabled" Value="true" /> Modified: branches/ogsector/data/gui/schemes/opengate/opengate.imageset =================================================================== --- branches/ogsector/data/gui/schemes/opengate/opengate.imageset 2007-06-06 02:57:17 UTC (rev 537) +++ branches/ogsector/data/gui/schemes/opengate/opengate.imageset 2007-06-06 16:59:51 UTC (rev 538) @@ -65,12 +65,80 @@ <Image Name="StaticBlueBottom" XPos="410" YPos="175" Width="6" Height="6" /> <Image Name="StaticBlueBottomRight" XPos="424" YPos="175" Width="6" Height="6" /> - <Image Name="IconCommoditiesNormal" XPos="414" YPos="229" Width="15" Height="15" /> - <Image Name="IconCommoditiesHover" XPos="414" YPos="245" Width="15" Height="15" /> - <Image Name="IconCommoditiesNeutral" XPos="414" YPos="261" Width="15" Height="15" /> - <Image Name="IconCommoditiesOct" XPos="430" YPos="229" Width="15" Height="15" /> - <Image Name="IconCommoditiesTau" XPos="430" YPos="245" Width="15" Height="15" /> - <Image Name="IconCommoditiesQua" XPos="430" YPos="261" Width="15" Height="15" /> + <Image Name="IconCommodityNormal" XPos="142" YPos="256" Width="15" Height="15" /> + <Image Name="IconCommodityHover" XPos="142" YPos="272" Width="15" Height="15" /> + <Image Name="IconCommodity0" XPos="142" YPos="288" Width="15" Height="15" /> + <Image Name="IconCommodity1" XPos="142" YPos="288" Width="15" Height="15" /> + <Image Name="IconCommodity2" XPos="142" YPos="304" Width="15" Height="15" /> + <Image Name="IconCommodity3" XPos="142" YPos="320" Width="15" Height="15" /> + <Image Name="IconCommodity4" XPos="142" YPos="336" Width="15" Height="15" /> + <Image Name="IconPowerplantNormal" XPos="158" YPos="256" Width="15" Height="15" /> + <Image Name="IconPowerplantHover" XPos="158" YPos="272" Width="15" Height="15" /> + <Image Name="IconPowerplant0" XPos="158" YPos="288" Width="15" Height="15" /> + <Image Name="IconPowerplant1" XPos="158" YPos="288" Width="15" Height="15" /> + <Image Name="IconPowerplant2" XPos="158" YPos="304" Width="15" Height="15" /> + <Image Name="IconPowerplant3" XPos="158" YPos="320" Width="15" Height="15" /> + <Image Name="IconPowerplant4" XPos="158" YPos="336" Width="15" Height="15" /> + <Image Name="IconEngineNormal" XPos="174" YPos="256" Width="16" Height="15" /> + <Image Name="IconEngineHover" XPos="174" YPos="272" Width="16" Height="15" /> + <Image Name="IconEngine0" XPos="174" YPos="288" Width="15" Height="15" /> + <Image Name="IconEngine1" XPos="174" YPos="288" Width="15" Height="15" /> + <Image Name="IconEngine2" XPos="174" YPos="304" Width="15" Height="15" /> + <Image Name="IconEngine3" XPos="174" YPos="320" Width="15" Height="15" /> + <Image Name="IconEngine4" XPos="174" YPos="336" Width="15" Height="15" /> + <Image Name="IconRadarNormal" XPos="190" YPos="256" Width="15" Height="15" /> + <Image Name="IconRadarHover" XPos="190" YPos="272" Width="15" Height="15" /> + <Image Name="IconRadar0" XPos="190" YPos="288" Width="15" Height="15" /> + <Image Name="IconRadar1" XPos="190" YPos="288" Width="15" Height="15" /> + <Image Name="IconRadar2" XPos="190" YPos="304" Width="15" Height="15" /> + <Image Name="IconRadar3" XPos="190" YPos="320" Width="15" Height="15" /> + <Image Name="IconRadar4" XPos="190" YPos="336" Width="15" Height="15" /> + <Image Name="IconECMNormal" XPos="206" YPos="256" Width="15" Height="15" /> + <Image Name="IconECMHover" XPos="206" YPos="272" Width="15" Height="15" /> + <Image Name="IconECM0" XPos="206" YPos="288" Width="15" Height="15" /> + <Image Name="IconECM1" XPos="206" YPos="288" Width="15" Height="15" /> + <Image Name="IconECM2" XPos="206" YPos="304" Width="15" Height="15" /> + <Image Name="IconECM3" XPos="206" YPos="320" Width="15" Height="15" /> + <Image Name="IconECM4" XPos="206" YPos="336" Width="15" Height="15" /> + <Image Name="IconCapacitorNormal" XPos="222" YPos="256" Width="15" Height="15" /> + <Image Name="IconCapacitorHover" XPos="222" YPos="272" Width="15" Height="15" /> + <Image Name="IconCapacitor0" XPos="222" YPos="288" Width="15" Height="15" /> + <Image Name="IconCapacitor1" XPos="222" YPos="288" Width="15" Height="15" /> + <Image Name="IconCapacitor2" XPos="222" YPos="304" Width="15" Height="15" /> + <Image Name="IconCapacitor3" XPos="222" YPos="320" Width="15" Height="15" /> + <Image Name="IconCapacitor4" XPos="222" YPos="336" Width="15" Height="15" /> + <Image Name="IconShieldNormal" XPos="238" YPos="256" Width="15" Height="15" /> + <Image Name="IconShieldHover" XPos="238" YPos="272" Width="15" Height="15" /> + <Image Name="IconShield0" XPos="238" YPos="288" Width="15" Height="15" /> + <Image Name="IconShield1" XPos="238" YPos="288" Width="15" Height="15" /> + <Image Name="IconShield2" XPos="238" YPos="304" Width="15" Height="15" /> + <Image Name="IconShield3" XPos="228" YPos="320" Width="15" Height="15" /> + <Image Name="IconShield4" XPos="238" YPos="336" Width="15" Height="15" /> + <Image Name="IconGunNormal" XPos="254" YPos="256" Width="15" Height="15" /> + <Image Name="IconGunHover" XPos="254" YPos="272" Width="15" Height="15" /> + <Image Name="IconGun0" XPos="254" YPos="288" Width="15" Height="15" /> + <Image Name="IconGun1" XPos="254" YPos="288" Width="15" Height="15" /> + <Image Name="IconGun2" XPos="254" YPos="304" Width="15" Height="15" /> + <Image Name="IconGun3" XPos="254" YPos="320" Width="15" Height="15" /> + <Image Name="IconGun4" XPos="254" YPos="336" Width="15" Height="15" /> + <Image Name="IconMissileNormal" XPos="270" YPos="256" Width="15" Height="15" /> + <Image Name="IconMissileHover" XPos="270" YPos="272" Width="15" Height="15" /> + <Image Name="IconMissile0" XPos="270" YPos="288" Width="15" Height="15" /> + <Image Name="IconMissile1" XPos="270" YPos="288" Width="15" Height="15" /> + <Image Name="IconMissile2" XPos="270" YPos="304" Width="15" Height="15" /> + <Image Name="IconMissile3" XPos="270" YPos="320" Width="15" Height="15" /> + <Image Name="IconMissile4" XPos="270" YPos="336" Width="15" Height="15" /> + <Image Name="IconMODxNormal" XPos="286" YPos="256" Width="15" Height="15" /> + <Image Name="IconMODxHover" XPos="286" YPos="272" Width="15" Height="15" /> + <Image Name="IconMODx0" XPos="286" YPos="288" Width="15" Height="15" /> + <Image Name="IconMODx1" XPos="286" YPos="288" Width="15" Height="15" /> + <Image Name="IconMODx2" XPos="286" YPos="304" Width="15" Height="15" /> + <Image Name="IconMODx3" XPos="286" YPos="320" Width="15" Height="15" /> + <Image Name="IconMODx4" XPos="286" YPos="336" Width="15" Height="15" /> + + <Image Name="IconStorageNormal" XPos="410" YPos="256" Width="15" Height="15" /> + <Image Name="IconStorageHover" XPos="426" YPos="256" Width="15" Height="15" /> + <Image Name="IconSize1" XPos="473" YPos="223" Width="12" Height="26" /> <Image Name="IconSize2" XPos="460" YPos="223" Width="12" Height="26" /> <Image Name="IconSize3" XPos="447" YPos="223" Width="12" Height="26" /> Modified: branches/ogsector/data/gui/schemes/opengate/opengate.png =================================================================== (Binary files differ) Modified: branches/ogsector/src/Avatar.cpp =================================================================== --- branches/ogsector/src/Avatar.cpp 2007-06-06 02:57:17 UTC (rev 537) +++ branches/ogsector/src/Avatar.cpp 2007-06-06 16:59:51 UTC (rev 538) @@ -43,7 +43,7 @@ if ( items.size() > 0 ){ for ( std::list< std::deque< Entity * > >::iterator it = floorCargo_.begin(); it != floorCargo_.end(); it ++ ){ if ( (*it)[ 0 ]->id() == items[ 0 ]->id() ){ - for ( int i = 0; i < items.size(); i ++ ) { + for ( unsigned int i = 0; i < items.size(); i ++ ) { if ( ( maxCargoHold_ - cargoHold_ ) >= items[ i ]->size() ){ (*it).push_back( items[ i ] ); cargoHold_ += items[ i ]->size(); @@ -56,7 +56,7 @@ } std::deque< Entity * > newItem; - for ( int i = 0; i < items.size(); i ++ ) { + for ( unsigned int i = 0; i < items.size(); i ++ ) { if ( ( maxCargoHold_ - cargoHold_ ) >= items[ i ]->size() ){ newItem.push_back( items[ i ] ); cargoHold_ += items[ i ]->size(); Modified: branches/ogsector/src/Console.cpp =================================================================== --- branches/ogsector/src/Console.cpp 2007-06-06 02:57:17 UTC (rev 537) +++ branches/ogsector/src/Console.cpp 2007-06-06 16:59:51 UTC (rev 538) @@ -94,6 +94,7 @@ rootWindow_->setHeight( we.window->getParent()->getHeight() + CEGUI::UDim( 0, we.window->getHeight().asAbsolute( 0 ) -3) ); listBox_->ensureItemIsVisible( listBox_->getItemCount( ) ); + return true; } bool Console::handleEditTextAccepted( const CEGUI::EventArgs & args ){ @@ -123,8 +124,6 @@ if ( e.key == OIS::KC_LCONTROL) { devices_->setGlobalKeyModifier( KEY_LCONTROL ); } - - return true; } Modified: branches/ogsector/src/DeviceManager.h =================================================================== --- branches/ogsector/src/DeviceManager.h 2007-06-06 02:57:17 UTC (rev 537) +++ branches/ogsector/src/DeviceManager.h 2007-06-06 16:59:51 UTC (rev 538) @@ -30,6 +30,8 @@ namespace OpenGate{ +enum EntityType{ENTITY,VESSEL,COMMODITY,POWERPLANT,ENGINE,RADAR,ECM,CAPACITOR,SHIELD,GUN,MISSILE,MODX}; + /*! * \brief This is a storage to handle current status of several things * @@ -66,16 +68,29 @@ std::string className( int id ) const { return "unknown"; } std::string factionName( int id ) const { switch( id ){ - case 1: return "Neutral"; - case 2: return "Tauseti"; - case 3: return "Octavius"; - case 4: return "Quantar"; - case 5: return "Squadrok"; - case 6: return "Hyperial"; - case 7: return "Amanath"; + case 0: return "neutral"; + case 1: return "neutral"; + case 2: return "tauseti"; + case 3: return "octavius"; + case 4: return "quantar"; + case 5: return "squadrok"; + case 6: return "hyperial"; + case 7: return "amanath"; } return "unknown"; } + std::string categoryName( EntityType rtti ) const { + switch( rtti ){ + case COMMODITY: return "Commodity"; + case POWERPLANT: return "Powerplant"; + case CAPACITOR: return "Capacitor"; + case ENGINE: return "Engine"; + case SHIELD: return "Shield"; + case RADAR: return "Radar"; + default: return "unknown"; + } + return "unknown"; + } Ogre::Root * ogreRoot; Ogre::RenderWindow * renderWindow; Modified: branches/ogsector/src/Entity.cpp =================================================================== --- branches/ogsector/src/Entity.cpp 2007-06-06 02:57:17 UTC (rev 537) +++ branches/ogsector/src/Entity.cpp 2007-06-06 16:59:51 UTC (rev 538) @@ -30,34 +30,70 @@ namespace OpenGate{ -void Entity::loadImage( const std::string & imageName ){ +Entity::Entity() + : name_( "unknown" ), className_( "unknown" ), + description_("Please fill in description"), imageFileName_("unknown"), ceguiImageName_( "unknownEntityImageset") { + id_ = 0; + techLevel_ = 0; + mass_ = 1; + size_ = 1; + rtti_ = ENTITY; + factionID_ = 1; + setFactionName_( DeviceManager::getSingleton().factionName( factionID_ ) ); +} + +void Entity::setFactionID( int id ){ + factionID_ = id; + setFactionName_( DeviceManager::getSingleton().factionName( factionID_ ) ); +} + +void Entity::setImageName( const std::string & imageFileName ) { + imageFileName_ = imageFileName; + + bool haveSmall = true; + haveSmall = initialiseImage( imageFileName + "_76x76.png", imageFileName + "Small" ); + if ( haveSmall ){ + ceguiSmallImageName_ = ceguiImageName_; + } + + if ( !initialiseImage( imageFileName + "_290x290.png", imageFileName ) ){ + //**fallback + initialiseImage( imageFileName + ".png", imageFileName, true ); + } + + if ( !haveSmall ) ceguiSmallImageName_ = ceguiImageName_; + +} + + +bool Entity::initialiseImage( const std::string & imageName, const std::string & targetName, bool verbose ){ bool fail = false; CEGUI::Texture * texture; if ( imageName != "unknown" ){ + try { texture = dynamic_cast< CEGUI::OgreCEGUIRenderer * >( DeviceManager::getSingleton().guiRenderer )->createTexture( imageName, "General"); } catch( CEGUI::Exception & e ){ - LogManager::getSingleton().warn( e.getMessage().c_str() ); fail = true; + if ( verbose ) LogManager::getSingleton().warn( e.getMessage().c_str() ); + fail = true; } } else { fail = true; } if ( !fail ){ - std::vector < std::string> subs( getSubstrings( name_ ) ); - std::string noBlankName; - for ( int i = 0; i < subs.size(); i ++ ) noBlankName += subs[i]; - CEGUI::Imageset * imageSet = CEGUI::ImagesetManager::getSingleton().createImageset( noBlankName, texture ); - imageSet->defineImage( noBlankName, CEGUI::Point(0.0f, 0.0f), + CEGUI::Imageset * imageSet = CEGUI::ImagesetManager::getSingleton().createImageset( targetName, texture ); + imageSet->defineImage( targetName, CEGUI::Point(0.0f, 0.0f), CEGUI::Size( texture->getWidth(), texture->getHeight() ), CEGUI::Point(0.0f,0.0f)); - ceguiImageName_ = "set:" + noBlankName + " image:" + noBlankName; + ceguiImageName_ = "set:" + targetName + " image:" + targetName; } else { //** fallback image // ceguiImageName_ = "set:" + name_ + " image:full_image"; } // image_ = new CEGUI::Texture(); + return !fail; } } // namespace OpenGate Modified: branches/ogsector/src/Entity.h =================================================================== --- branches/ogsector/src/Entity.h 2007-06-06 02:57:17 UTC (rev 537) +++ branches/ogsector/src/Entity.h 2007-06-06 16:59:51 UTC (rev 538) @@ -26,6 +26,7 @@ #include <string> #include "LogManager.h" +#include "DeviceManager.h" namespace OpenGate{ @@ -41,28 +42,20 @@ * \author Christoph Brill <eg...@us...> */ -enum EntityType{ENTITY,VESSEL,COMMODITY,POWERPLANT,ENGINE,RADAR,ECM,CAPACITOR,SHIELD,GUN,MISSILE,MODX}; - class Entity{ public: - Entity() - : factionName_( "unknown" ), name_( "unknown" ), className_( "unknown" ), - description_("Please fill in description"), imageFileName_("unknown"), ceguiImageName_( "unknownEntityImageset") { - id_ = 0; - techLevel_ = 0; - mass_ = 1; - size_ = 1; - rtti_ = ENTITY; - } + Entity(); virtual ~Entity(){ } virtual EntityType entityType() const { return rtti_; } - inline void setFactionName( const std::string & name ) { factionName_ = name; } inline std::string factionName( ) const { return factionName_; } + void setFactionID( int id ); + inline int factionID( ) const { return factionID_; } + inline void setName( const std::string & name ) { name_ = name; } inline std::string name( ) const { return name_; } @@ -84,12 +77,13 @@ inline void setDescription( const std::string & description ){ description_ = description; } inline std::string description( ) const { return description_; } - inline void setImageName( const std::string & imageFileName ) { imageFileName_ = imageFileName; loadImage(imageFileName_); } + void setImageName( const std::string & imageFileName ); inline std::string imageName() const { return imageFileName_; } inline std::string ceguiImageName() const { return ceguiImageName_; } + inline std::string ceguiSmallImageName() const { return ceguiSmallImageName_; } - void loadImage( const std::string & imageName ); + bool initialiseImage( const std::string & imageName, const std::string & targetName, bool verbose = false ); inline void setProductionCenters( const std::set < std::string > & productionCenters ) { productionCenters_ = productionCenters; } @@ -100,15 +94,20 @@ inline std::set < Commodity * > requieredComponents( ) const { return requieredComponents_; } protected: + inline void setFactionName_( const std::string & name ) { factionName_ = name; } - std::string factionName_; std::string name_; std::string className_; /*! A rather long description of this component */ std::string description_; + std::string factionName_; + int factionID_; + std::string imageFileName_; + std::string ceguiSmallImageName_; std::string ceguiImageName_; + /*! The places where this part of equipment is built */ std::set < std::string > productionCenters_; Modified: branches/ogsector/src/EntityManager.cpp =================================================================== --- branches/ogsector/src/EntityManager.cpp 2007-06-06 02:57:17 UTC (rev 537) +++ branches/ogsector/src/EntityManager.cpp 2007-06-06 16:59:51 UTC (rev 538) @@ -171,7 +171,7 @@ pElem = hRoot.ChildElement( "faction_id", 0 ).Element(); if ( pElem ) { - entity->setFactionName( DeviceManager::getSingleton().factionName( toInt( pElem->FirstChild()->Value() ) ) ); + entity->setFactionID( toInt( pElem->FirstChild()->Value() ) ); } else { log_->fatal( fileName + " has no faction_id (mandatory)." ); return NULL; @@ -179,7 +179,7 @@ //** Image name for the entity is derived from filename; std::string basename( fileName.substr( fileName.rfind( "/" ) + 1 ) ); - entity->setImageName( basename.substr( 0, basename.find( ".xml" ) ) + ".png" ); + entity->setImageName( basename.substr( 0, basename.find( ".xml" ) ) ); //** Generic elements pElem = hRoot.ChildElement( "class_id", 0 ).Element(); @@ -212,7 +212,13 @@ if ( !pElem ){ //** fallback to english pElem = hRoot.ChildElement( "description_en", 0 ).Element(); } - if ( pElem ) entity->setDescription( pElem->FirstChild()->Value() ); + if ( !pElem ){ //** fallback to english + pElem = hRoot.ChildElement( "description_en", 0 ).Element(); + } + if ( pElem ) { + std::cout << entity->description() << std::endl; + entity->setDescription( pElem->FirstChild()->Value() ); + } //** Specific elements; switch ( entity->entityType() ){ @@ -383,7 +389,7 @@ //** Image name for the entity is derived from filename; std::string basename( fileName.substr( fileName.rfind( "/" ) + 1 ) ); - entity->setImageName( basename.substr( 0, basename.find( ".xml" ) ) + ".png" ); + entity->setImageName( basename.substr( 0, basename.find( ".xml" ) ) ); //** Generic data pElem = hRoot.ChildElement( "class_id", 0 ).Element(); @@ -398,6 +404,9 @@ pElem = hRoot.ChildElement( "mass", 0 ).Element(); if ( pElem ) entity->setMass( toInt( pElem->FirstChild()->Value() ) ); + pElem = hRoot.ChildElement( "faction_id", 0 ).Element(); + if ( pElem ) entity->setFactionID( toInt( pElem->FirstChild()->Value() ) ); + //** Additional Data pElem = hRoot.ChildElement( "description_" + DeviceManager::getSingleton().languageSuffix(), 0 ).Element(); if ( pElem ) entity->setDescription( pElem->FirstChild()->Value() ); Modified: branches/ogsector/src/MarketDialog.cpp =================================================================== --- branches/ogsector/src/MarketDialog.cpp 2007-06-06 02:57:17 UTC (rev 537) +++ branches/ogsector/src/MarketDialog.cpp 2007-06-06 16:59:51 UTC (rev 538) @@ -306,12 +306,17 @@ CEGUI::String textPrice( "" ); CEGUI::String image( "" ); CEGUI::String icon( "" ); + CEGUI::String categoryIcon( "" ); if ( item ){ name = item->name(); textAmount = CEGUI::String( toStr( amount ) ); textPrice = CEGUI::String( "c" + toStr( price ) ); - image = item->ceguiImageName(); + image = item->ceguiSmallImageName(); icon = CEGUI::String("set:opengate image:IconSize" + toStr( item->size() ) ); + categoryIcon = CEGUI::String("set:opengate image:Icon" + + DeviceManager::getSingleton().categoryName( item->entityType() ) + + toStr( item->factionID() ) ); + std::cout <<categoryIcon<< std::endl; } win->setUserData( item ); win->setProperty( "Text", name ); @@ -323,6 +328,9 @@ ->setProperty("Image", image ); CEGUI::WindowManager::getSingleton().getWindow( win->getName() + "MarketShortItemSizeIcon" ) ->setProperty("Image", icon ); + CEGUI::WindowManager::getSingleton().getWindow( win->getName() + "MarketShortItemTypIcon" ) + ->setProperty("Image", categoryIcon ); + } void MarketDialog::updateSortIcons(){ @@ -448,6 +456,7 @@ CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ItemDescription/Mass/Label")->show(); CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ItemDescription/Text")->show(); } + return true; } bool MarketDialog::handleMarketItemMouseLeaves( const CEGUI::EventArgs & e ){ @@ -480,6 +489,7 @@ } updateInventView(); updateMarketView(); + return true; } bool MarketDialog::handleInventItemClicked( const CEGUI::EventArgs & e ){ @@ -501,6 +511,7 @@ } updateInventView(); updateMarketView(); + return true; } void MarketDialog::fillMarketItemDetailedView( CEGUI::Window * itemWindow ){ @@ -558,6 +569,7 @@ CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"MarketWindow")->show(); CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"InventoryWindow")->show(); updateInventView(); + return true; } bool MarketDialog::handleMarketItemViewAcceptButton( const CEGUI::EventArgs & e ){ @@ -570,6 +582,17 @@ if ( item ){ int amount = toInt( dynamic_cast< CEGUI::Editbox * >( CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/Amount" ) )->getText( ).c_str() ); + int size = toInt( CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/TextFrame/Size/Text" ) + ->getText( ).c_str() ); + + if ( buyMode_ ){ + amount = min( amount, (int)floor( + ( toInt( CEGUI::WindowManager::getSingleton().getWindow( "InventoryFloorSize/Text" )->getText( ).c_str() ) - + toInt( CEGUI::WindowManager::getSingleton().getWindow( "InventoryShipCargo/Text" )->getText( ).c_str() ) ) / size ) ); + } else { + amount = min( amount, toInt( CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/TextFrame/Amount/Text" )->getText().c_str() ) ); + } + if ( amount > 0 ){ if ( buyMode_ ){ buyItems( item, amount ); @@ -580,6 +603,7 @@ } updateInventView(); + return true; } bool MarketDialog::handleMarketItemChangeAmount( const CEGUI::EventArgs & e ){ @@ -617,16 +641,19 @@ CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/AcceptButton" )->hide(); CEGUI::WindowManager::getSingleton().getWindow( "MarketItemDetailedView/AcceptButton/Highlight" )->hide(); } + return true; } bool MarketDialog::buyItems( Entity * item , int amount ){ std::vector < Entity * > items( amount, item ); DeviceManager::getSingleton().avatar->addCargoToFloor( items ); + return true; } bool MarketDialog::sellItems( Entity * item , int amount ){ std::vector < Entity * > items( amount, item ); DeviceManager::getSingleton().avatar->delCargoToFloor( items ); + return true; } } // namespace OpenGate Modified: branches/ogsector/src/VesselManager.cpp =================================================================== --- branches/ogsector/src/VesselManager.cpp 2007-06-06 02:57:17 UTC (rev 537) +++ branches/ogsector/src/VesselManager.cpp 2007-06-06 16:59:51 UTC (rev 538) @@ -45,7 +45,6 @@ TiXmlHandle docHandle( &doc ); TiXmlElement* pElem; -// TiXmlNode* pNode; TiXmlHandle hRoot( 0 ); //** block: Ship; @@ -64,11 +63,11 @@ Vessel *vessel = new Vessel(); - pElem = hRoot.ChildElement( "faction", 0 ).Element(); + pElem = hRoot.ChildElement( "faction_id", 0 ).Element(); if ( pElem ) { - vessel->setFactionName( pElem->FirstChild()->Value() ); + vessel->setFactionID( toInt( pElem->FirstChild()->Value() ) ); } else { - log_->fatal( fileName + " has no mandatory factionname (mandatory)." ); + log_->fatal( fileName + " has no mandatory faction_id (mandatory)." ); return NULL; } pElem = hRoot.ChildElement( "name", 0 ).Element(); Modified: branches/ogsector/win32/ogsectorclient/equipment.xml =================================================================== --- branches/ogsector/win32/ogsectorclient/equipment.xml 2007-06-06 02:57:17 UTC (rev 537) +++ branches/ogsector/win32/ogsectorclient/equipment.xml 2007-06-06 16:59:51 UTC (rev 538) @@ -27,4 +27,6 @@ <Resource id="25" location="../../../../trunk/data/shields/pod.xml" /> <Resource id="26" location="../../../../trunk/data/shields/shelter.xml" /> <Resource id="27" location="../../../../trunk/data/shields/t-s-13.xml" /> + <Resource id="28" location="../../../../trunk/data/power_plants/t-p-16.xml" /> + <Resource id="29" location="../../../../trunk/data/radars/night_watchman.xml" /> </equipment> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spo...@us...> - 2007-06-06 20:00:39
|
Revision: 544 http://svn.sourceforge.net/opengate/?rev=544&view=rev Author: spom_spom Date: 2007-06-06 13:00:40 -0700 (Wed, 06 Jun 2007) Log Message: ----------- removed: equipment.xml, commodities.xml, ship.xml the resources will be collect automatically Modified Paths: -------------- branches/ogsector/resources.cfg branches/ogsector/src/BaseDialog.h branches/ogsector/src/DeviceManager.h branches/ogsector/src/EntityManager.cpp branches/ogsector/src/EntityManager.h branches/ogsector/src/GameStateManager.cpp branches/ogsector/src/MarketDialog.cpp branches/ogsector/src/VesselManager.cpp branches/ogsector/src/VesselManager.h Removed Paths: ------------- branches/ogsector/data/commodities.xml branches/ogsector/data/equipment.xml branches/ogsector/data/ships.xml branches/ogsector/win32/ogsectorclient/commodities.xml branches/ogsector/win32/ogsectorclient/equipment.xml branches/ogsector/win32/ogsectorclient/ships.xml Deleted: branches/ogsector/data/commodities.xml =================================================================== --- branches/ogsector/data/commodities.xml 2007-06-06 19:04:27 UTC (rev 543) +++ branches/ogsector/data/commodities.xml 2007-06-06 20:00:40 UTC (rev 544) @@ -1,32 +0,0 @@ -<?xml version="1.0"?> - -<commodities> - <Resource id="1" location="../../trunk/data/commodities/aluminium.xml"/> - <Resource id="2" location="../../trunk/data/commodities/ammunition.xml"/> - <Resource id="3" location="../../trunk/data/commodities/antimony.xml"/> - <Resource id="4" location="../../trunk/data/commodities/armor.xml"/> - <Resource id="5" location="../../trunk/data/commodities/barium.xml"/> - <Resource id="6" location="../../trunk/data/commodities/cesium.xml"/> - <Resource id="7" location="../../trunk/data/commodities/chemicals.xml"/> - <Resource id="8" location="../../trunk/data/commodities/chromium.xml"/> - <Resource id="9" location="../../trunk/data/commodities/conflux_biomass.xml"/> - <Resource id="10" location="../../trunk/data/commodities/copper.xml"/> - <Resource id="11" location="../../trunk/data/commodities/cpu.xml"/> - <Resource id="12" location="../../trunk/data/commodities/fuel_cells.xml"/> - <Resource id="13" location="../../trunk/data/commodities/gold.xml"/> - <Resource id="14" location="../../trunk/data/commodities/helium.xml"/> - <Resource id="15" location="../../trunk/data/commodities/ice.xml"/> - <Resource id="16" location="../../trunk/data/commodities/iron.xml"/> - <Resource id="17" location="../../trunk/data/commodities/laser_components.xml"/> - <Resource id="18" location="../../trunk/data/commodities/magnetic_components.xml"/> - <Resource id="19" location="../../trunk/data/commodities/manufactured_foods.xml"/> - <Resource id="20" location="../../trunk/data/commodities/medical_supplies.xml"/> - <Resource id="21" location="../../trunk/data/commodities/nitrogen.xml"/> - <Resource id="22" location="../../trunk/data/commodities/octavia_light.xml"/> - <Resource id="23" location="../../trunk/data/commodities/organic_foods.xml"/> - <Resource id="24" location="../../trunk/data/commodities/plutonium.xml"/> - <Resource id="26" location="../../trunk/data/commodities/rubber.xml"/> - <Resource id="27" location="../../trunk/data/commodities/tauseti_flashback.xml"/> - <Resource id="28" location="../../trunk/data/commodities/water.xml"/> - <Resource id="29" location="../../trunk/data/commodities/xenon.xml"/> -</commodities> Deleted: branches/ogsector/data/equipment.xml =================================================================== --- branches/ogsector/data/equipment.xml 2007-06-06 19:04:27 UTC (rev 543) +++ branches/ogsector/data/equipment.xml 2007-06-06 20:00:40 UTC (rev 544) @@ -1,32 +0,0 @@ -<?xml version="1.0"?> - -<equipment> - <Resource id="1" location="../../trunk/data/engines/money.xml" /> - <Resource id="2" location="../../trunk/data/engines/t-e-15.xml" /> - <Resource id="3" location="../../trunk/data/power_plants/contender.xml" /> - <Resource id="4" location="../../trunk/data/power_plants/contender_xl.xml" /> - <Resource id="5" location="../../trunk/data/power_plants/contender_xpr.xml" /> - <Resource id="6" location="../../trunk/data/power_plants/gatherer.xml" /> - <Resource id="7" location="../../trunk/data/power_plants/spud.xml" /> - <Resource id="8" location="../../trunk/data/capacitors/deepol.xml" /> - <Resource id="9" location="../../trunk/data/capacitors/mantra.xml" /> - <Resource id="10" location="../../trunk/data/capacitors/outlet.xml" /> - <Resource id="12" location="../../trunk/data/capacitors/sponge.xml" /> - <Resource id="13" location="../../trunk/data/capacitors/summoner.xml" /> - <Resource id="14" location="../../trunk/data/capacitors/t-c-15.xml" /> - <Resource id="15" location="../../trunk/data/capacitors/tank.xml" /> - <Resource id="16" location="../../trunk/data/ECMs/ghost.xml" /> - <Resource id="17" location="../../trunk/data/radars/cyclops.xml" /> - <Resource id="18" location="../../trunk/data/radars/hall_monitor.xml" /> - <Resource id="19" location="../../trunk/data/radars/outlook.xml" /> - <Resource id="20" location="../../trunk/data/radars/t-r-9.xml" /> - <Resource id="21" location="../../trunk/data/shields/alpaa.xml" /> - <Resource id="22" location="../../trunk/data/shields/flatiron.xml" /> - <Resource id="23" location="../../trunk/data/shields/himelea.xml" /> - <Resource id="24" location="../../trunk/data/shields/kydango.xml" /> - <Resource id="25" location="../../trunk/data/shields/pod.xml" /> - <Resource id="26" location="../../trunk/data/shields/shelter.xml" /> - <Resource id="27" location="../../trunk/data/shields/t-s-13.xml" /> - <Resource id="28" location="../../trunk/data/power_plants/t-p-16.xml" /> - <Resource id="29" location="../../trunk/data/radars/night_watchman.xml" /> -</equipment> Deleted: branches/ogsector/data/ships.xml =================================================================== --- branches/ogsector/data/ships.xml 2007-06-06 19:04:27 UTC (rev 543) +++ branches/ogsector/data/ships.xml 2007-06-06 20:00:40 UTC (rev 544) @@ -1,8 +0,0 @@ -<?xml version="1.0"?> - -<ships> - <Resource id="1" location="./data/ships/squadrok/squid/squid.xml"/> - <Resource id="2" location="../../trunk/data/ships/octavius/apteryx/apteryx.xml" /> - <Resource id="3" location="../../trunk/data/ships/quantar/storm/storm.xml" /> - <Resource id="4" location="../../trunk/data/ships/tauseti/lady_kickstart/lady_kickstart.xml" /> -</ships> Modified: branches/ogsector/resources.cfg =================================================================== --- branches/ogsector/resources.cfg 2007-06-06 19:04:27 UTC (rev 543) +++ branches/ogsector/resources.cfg 2007-06-06 20:00:40 UTC (rev 544) @@ -4,6 +4,21 @@ # Resource locations to be added to the default path [General] +FileSystem=../../trunk/data/ +FileSystem=../../trunk/data/commodities +FileSystem=../../trunk/data/capacitors +FileSystem=../../trunk/data/engines +FileSystem=../../trunk/data/radars +FileSystem=../../trunk/data/shields +FileSystem=../../trunk/data/ECMs +FileSystem=../../trunk/data/power_plants +FileSystem=../../trunk/data/ships/octavius/apteryx +FileSystem=../../trunk/data/ships/quantar/storm +FileSystem=../../trunk/data/ships/tauseti/lady_kickstart +FileSystem=../../trunk/data/stations/tauseti +#FileSystem=../../trunk/data/GUI +#FileSystem=../../trunk/data/client/data1.x/ +#FileSystem=../../trunk/data/client/data1.x/GUI FileSystem=./data FileSystem=./data/materials FileSystem=./data/textures @@ -20,18 +35,4 @@ FileSystem=./data/MediaFromOgre #FileSystem=./data/MediaFromOgre/AdvancedMaterials/ # -FileSystem=../../trunk/data/ -FileSystem=../../trunk/data/commodities -FileSystem=../../trunk/data/capacitors -FileSystem=../../trunk/data/engines -FileSystem=../../trunk/data/radars -FileSystem=../../trunk/data/shields -FileSystem=../../trunk/data/ECMs -FileSystem=../../trunk/data/power_plants -FileSystem=../../trunk/data/ships/octavius/apteryx -FileSystem=../../trunk/data/ships/quantar/storm -FileSystem=../../trunk/data/ships/tauseti/lady_kickstart -FileSystem=../../trunk/data/stations/tauseti -#FileSystem=../../trunk/data/GUI -#FileSystem=../../trunk/data/client/data1.x/ -#FileSystem=../../trunk/data/client/data1.x/GUI + Modified: branches/ogsector/src/BaseDialog.h =================================================================== --- branches/ogsector/src/BaseDialog.h 2007-06-06 19:04:27 UTC (rev 543) +++ branches/ogsector/src/BaseDialog.h 2007-06-06 20:00:40 UTC (rev 544) @@ -65,8 +65,8 @@ protected: + CEGUI::Window * rootWindow_; DeviceManager * devices_; - CEGUI::Window * rootWindow_; bool visible_; Modified: branches/ogsector/src/DeviceManager.h =================================================================== --- branches/ogsector/src/DeviceManager.h 2007-06-06 19:04:27 UTC (rev 543) +++ branches/ogsector/src/DeviceManager.h 2007-06-06 20:00:40 UTC (rev 544) @@ -69,13 +69,12 @@ std::string factionName( int id ) const { switch( id ){ case 0: return "neutral"; - case 1: return "neutral"; - case 2: return "tauseti"; + case 1: return "tauseti"; + case 2: return "quantar"; case 3: return "octavius"; - case 4: return "quantar"; - case 5: return "squadrok"; + case 4: return "squadrok"; + case 5: return "amanath"; case 6: return "hyperial"; - case 7: return "amanath"; } return "unknown"; } Modified: branches/ogsector/src/EntityManager.cpp =================================================================== --- branches/ogsector/src/EntityManager.cpp 2007-06-06 19:04:27 UTC (rev 543) +++ branches/ogsector/src/EntityManager.cpp 2007-06-06 20:00:40 UTC (rev 544) @@ -21,6 +21,10 @@ #include "EntityManager.h" #include "DeviceManager.h" #include "tinyxml/tinyxml.h" +#include <OgreArchive.h> +#include <OgreArchiveManager.h> +#include <OgreFileSystem.h> +#include <OgreSharedPtr.h> namespace OpenGate { @@ -33,39 +37,48 @@ 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 ); + Ogre::FileSystemArchive * pArch = new Ogre::FileSystemArchive( (*resourcePaths.begin()) + "/" + resourceName, "FileSystem" ); - TiXmlDocument doc( resourceFile ); - bool loadOkay = doc.LoadFile(); + Ogre::StringVectorPtr files = pArch->find( "*.xml", true, false); + for ( int i = 0; i < (*files).size(); i ++ ){ + log_->info( std::string( "Found ressource: " ) + (*files)[ i ] ); + loadAndCreate( (*resourcePaths.begin()) + "/" + resourceName + "/" + (*files)[ i ] ); + } - std::map < int, std::string > entities; + delete pArch; +// for ( std::set < std::string >::iterator it = resourcePaths.begin(); it != resourcePaths.end(); it ++ ){ +// std::string resourceFile( (*it) + "/" + resourceName ); - if ( loadOkay ) { - log_->info( std::string( "open resource file: ") + resourceFile ); - TiXmlHandle docHandle( &doc ); - TiXmlElement* pElem; - TiXmlHandle hRoot( 0 ); +// TiXmlDocument doc( resourceFile ); +// bool loadOkay = doc.LoadFile(); - pElem = docHandle.FirstChildElement().Element(); - hRoot = TiXmlHandle( pElem ); +// 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." ); - } +// 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 ); - } - } +// for ( std::map < int, std::string >::iterator it = entities.begin(); it != entities.end(); it ++ ){ +// loadAndCreate( it->first, it->second ); +// } +// } } template<> EquipmentManager * Ogre::Singleton< EquipmentManager >::ms_Singleton = 0; @@ -88,9 +101,9 @@ return ms_Singleton; } -Entity * EquipmentManager::loadAndCreate( int id, const std::string & fileName ){ +Entity * EquipmentManager::loadAndCreate( const std::string & fileName ){ - log_->info( "Read equipment: " + fileName ); + log_->info( "Read equipment: " + fileName ); TiXmlDocument doc( fileName ); bool loadOkay = doc.LoadFile(); @@ -169,6 +182,15 @@ return NULL; } + pElem = hRoot.ChildElement( "object_id", 0 ).Element(); + if ( pElem ) { + entity->setID( toInt( pElem->FirstChild()->Value() ) ); + } else { + log_->fatal( fileName + " has no object_id (mandatory)." ); + return NULL; + } + + pElem = hRoot.ChildElement( "faction_id", 0 ).Element(); if ( pElem ) { entity->setFactionID( toInt( pElem->FirstChild()->Value() ) ); @@ -295,9 +317,8 @@ entity->setRequieredComponents( commodities ); if ( templatesByName_.count( entity->name() ) == 0 ){ - entity->setID( id ); templatesByName_[ entity->name() ] = entity; - templatesByID_[ id ] = entity; + templatesByID_[ entity->id() ] = entity; factions_.insert( entity->factionName() ); } else { @@ -327,7 +348,7 @@ return ms_Singleton; } -Entity * CommodityManager::loadAndCreate( int id, const std::string & fileName ){ +Entity * CommodityManager::loadAndCreate( const std::string & fileName ){ log_->info( "Read commodity: " + fileName ); @@ -387,6 +408,15 @@ return NULL; } + pElem = hRoot.ChildElement( "object_id", 0 ).Element(); + if ( pElem ) { + entity->setID( toInt( pElem->FirstChild()->Value() ) ); + } else { + log_->fatal( fileName + " has no object_id (mandatory)." ); + return NULL; + } + + //** Image name for the entity is derived from filename; std::string basename( fileName.substr( fileName.rfind( "/" ) + 1 ) ); entity->setImageName( basename.substr( 0, basename.find( ".xml" ) ) ); @@ -428,9 +458,8 @@ //! \todo Add required components if ( templatesByName_.count( entity->name() ) == 0 ){ - entity->setID( id ); templatesByName_[ entity->name() ] = entity; - templatesByID_[ id ] = entity; + templatesByID_[ entity->id() ] = entity; factions_.insert( entity->factionName() ); // log_->info( std::string( "Loaded Commodity: " ) + entity->factionName() + "/" + entity->name() ); Modified: branches/ogsector/src/EntityManager.h =================================================================== --- branches/ogsector/src/EntityManager.h 2007-06-06 19:04:27 UTC (rev 543) +++ branches/ogsector/src/EntityManager.h 2007-06-06 20:00:40 UTC (rev 544) @@ -82,7 +82,7 @@ * \param filename The filename we load from the places-file. It's the * filename of the defintion file. */ - virtual Entity * loadAndCreate( int id, const std::string & filename ) = 0; + virtual Entity * loadAndCreate( const std::string & filename ) = 0; EntityManager() { log_ = LogManager::getSingletonPtr(); @@ -119,7 +119,7 @@ /*! Destructor that free's all loaded vessels */ virtual ~EquipmentManager(); - virtual Entity * loadAndCreate( int id, const std::string & filename ); + virtual Entity * loadAndCreate( const std::string & filename ); std::vector < Entity * > allByCategory( const std::string & category ){ EntityType rtti; @@ -155,7 +155,7 @@ /*! Destructor that free's all loaded vessels */ virtual ~CommodityManager(); - virtual Entity * loadAndCreate( int id, const std::string & filename ); + virtual Entity * loadAndCreate( 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 ){ Modified: branches/ogsector/src/GameStateManager.cpp =================================================================== --- branches/ogsector/src/GameStateManager.cpp 2007-06-06 19:04:27 UTC (rev 543) +++ branches/ogsector/src/GameStateManager.cpp 2007-06-06 20:00:40 UTC (rev 544) @@ -316,13 +316,17 @@ devices_.console->addCommand( "/ai", &GameStateManager::CMD_spawnAi, "[name] Spawn ai subject. /ai help show all available ships." ); vesselManager_ = new VesselManager( ); - vesselManager_->load( resourcePaths_, "ships.xml" ); + vesselManager_->load( resourcePaths_, "ships" ); commodityManager_ = new CommodityManager( ); - commodityManager_->load( resourcePaths_, "commodities.xml" ); + commodityManager_->load( resourcePaths_, "commodities" ); equipmentManager_ = new EquipmentManager( ); - equipmentManager_->load( resourcePaths_, "equipment.xml" ); + equipmentManager_->load( resourcePaths_, "engines" ); + equipmentManager_->load( resourcePaths_, "capacitors" ); + equipmentManager_->load( resourcePaths_, "radars" ); + equipmentManager_->load( resourcePaths_, "shields" ); + equipmentManager_->load( resourcePaths_, "power_plants" ); devices_.gameStateRoot = this; Modified: branches/ogsector/src/MarketDialog.cpp =================================================================== --- branches/ogsector/src/MarketDialog.cpp 2007-06-06 19:04:27 UTC (rev 543) +++ branches/ogsector/src/MarketDialog.cpp 2007-06-06 20:00:40 UTC (rev 544) @@ -316,7 +316,6 @@ categoryIcon = CEGUI::String("set:opengate image:Icon" + DeviceManager::getSingleton().categoryName( item->entityType() ) + toStr( item->factionID() ) ); - std::cout <<categoryIcon<< std::endl; } win->setUserData( item ); win->setProperty( "Text", name ); Modified: branches/ogsector/src/VesselManager.cpp =================================================================== --- branches/ogsector/src/VesselManager.cpp 2007-06-06 19:04:27 UTC (rev 543) +++ branches/ogsector/src/VesselManager.cpp 2007-06-06 20:00:40 UTC (rev 544) @@ -33,7 +33,7 @@ VesselManager::~VesselManager(){ } -Entity * VesselManager::loadAndCreate( int vesselID, const std::string & fileName ){ +Entity * VesselManager::loadAndCreate( const std::string & fileName ){ TiXmlDocument doc( fileName ); bool loadOkay = doc.LoadFile(); @@ -77,6 +77,13 @@ log_->fatal( fileName + " has no name (mandatory)." ); return NULL; } + pElem = hRoot.ChildElement( "object_id", 0 ).Element(); + if ( pElem ) { + vessel->setID( toInt( pElem->FirstChild()->Value() ) ); + } else { + log_->fatal( fileName + " has no object_id (mandatory)." ); + return NULL; + } pElem = hRoot.ChildElement( "class", 0 ).Element(); if ( pElem ) vessel->setClassName( pElem->FirstChild()->Value() ); @@ -141,9 +148,8 @@ } if ( templatesByName_.count( vessel->name() ) == 0 ){ - vessel->setID( vesselID ); templatesByName_[ vessel->name() ] = vessel; - templatesByID_[ vesselID ] = vessel; + templatesByID_[ vessel->id() ] = vessel; factions_.insert( vessel->factionName() ); log_->info( std::string( "Loaded: " ) + vessel->factionName() + "/" + vessel->name() ); Modified: branches/ogsector/src/VesselManager.h =================================================================== --- branches/ogsector/src/VesselManager.h 2007-06-06 19:04:27 UTC (rev 543) +++ branches/ogsector/src/VesselManager.h 2007-06-06 20:00:40 UTC (rev 544) @@ -59,7 +59,7 @@ /*! Destructor that free's all loaded vessels */ virtual ~VesselManager(); - virtual Entity * loadAndCreate( int id, const std::string & filename ); + virtual Entity * loadAndCreate( 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 ){ Deleted: branches/ogsector/win32/ogsectorclient/commodities.xml =================================================================== --- branches/ogsector/win32/ogsectorclient/commodities.xml 2007-06-06 19:04:27 UTC (rev 543) +++ branches/ogsector/win32/ogsectorclient/commodities.xml 2007-06-06 20:00:40 UTC (rev 544) @@ -1,32 +0,0 @@ -<?xml version="1.0"?> - -<commodities> - <Resource id="1" location="../../../../trunk/data/commodities/aluminium.xml"/> - <Resource id="2" location="../../../../trunk/data/commodities/ammunition.xml"/> - <Resource id="3" location="../../../../trunk/data/commodities/antimony.xml"/> - <Resource id="4" location="../../../../trunk/data/commodities/armor.xml"/> - <Resource id="5" location="../../../../trunk/data/commodities/barium.xml"/> - <Resource id="6" location="../../../../trunk/data/commodities/cesium.xml"/> - <Resource id="7" location="../../../../trunk/data/commodities/chemicals.xml"/> - <Resource id="8" location="../../../../trunk/data/commodities/chromium.xml"/> - <Resource id="9" location="../../../../trunk/data/commodities/conflux_biomass.xml"/> - <Resource id="10" location="../../../../trunk/data/commodities/copper.xml"/> - <Resource id="11" location="../../../../trunk/data/commodities/cpu.xml"/> - <Resource id="12" location="../../../../trunk/data/commodities/fuel_cells.xml"/> - <Resource id="13" location="../../../../trunk/data/commodities/gold.xml"/> - <Resource id="14" location="../../../../trunk/data/commodities/helium.xml"/> - <Resource id="15" location="../../../../trunk/data/commodities/ice.xml"/> - <Resource id="16" location="../../../../trunk/data/commodities/iron.xml"/> - <Resource id="17" location="../../../../trunk/data/commodities/laser_components.xml"/> - <Resource id="18" location="../../../../trunk/data/commodities/magnetic_components.xml"/> - <Resource id="19" location="../../../../trunk/data/commodities/manufactured_foods.xml"/> - <Resource id="20" location="../../../../trunk/data/commodities/medical_supplies.xml"/> - <Resource id="21" location="../../../../trunk/data/commodities/nitrogen.xml"/> - <Resource id="22" location="../../../../trunk/data/commodities/octavia_light.xml"/> - <Resource id="23" location="../../../../trunk/data/commodities/organic_foods.xml"/> - <Resource id="24" location="../../../../trunk/data/commodities/plutonium.xml"/> - <Resource id="26" location="../../../../trunk/data/commodities/rubber.xml"/> - <Resource id="27" location="../../../../trunk/data/commodities/tauseti_flashback.xml"/> - <Resource id="28" location="../../../../trunk/data/commodities/water.xml"/> - <Resource id="29" location="../../../../trunk/data/commodities/xenon.xml"/> -</commodities> Deleted: branches/ogsector/win32/ogsectorclient/equipment.xml =================================================================== --- branches/ogsector/win32/ogsectorclient/equipment.xml 2007-06-06 19:04:27 UTC (rev 543) +++ branches/ogsector/win32/ogsectorclient/equipment.xml 2007-06-06 20:00:40 UTC (rev 544) @@ -1,32 +0,0 @@ -<?xml version="1.0"?> - -<equipment> - <Resource id="1" location="../../../../trunk/data/engines/money.xml" /> - <Resource id="2" location="../../../../trunk/data/engines/t-e-15.xml" /> - <Resource id="3" location="../../../../trunk/data/power_plants/contender.xml" /> - <Resource id="4" location="../../../../trunk/data/power_plants/contender_xl.xml" /> - <Resource id="5" location="../../../../trunk/data/power_plants/contender_xpr.xml" /> - <Resource id="6" location="../../../../trunk/data/power_plants/gatherer.xml" /> - <Resource id="7" location="../../../../trunk/data/power_plants/spud.xml" /> - <Resource id="8" location="../../../../trunk/data/capacitors/deepol.xml" /> - <Resource id="9" location="../../../../trunk/data/capacitors/mantra.xml" /> - <Resource id="10" location="../../../../trunk/data/capacitors/outlet.xml" /> - <Resource id="12" location="../../../../trunk/data/capacitors/sponge.xml" /> - <Resource id="13" location="../../../../trunk/data/capacitors/summoner.xml" /> - <Resource id="14" location="../../../../trunk/data/capacitors/t-c-15.xml" /> - <Resource id="15" location="../../../../trunk/data/capacitors/tank.xml" /> - <Resource id="16" location="../../../../trunk/data/ECMs/ghost.xml" /> - <Resource id="17" location="../../../../trunk/data/radars/cyclops.xml" /> - <Resource id="18" location="../../../../trunk/data/radars/hall_monitor.xml" /> - <Resource id="19" location="../../../../trunk/data/radars/outlook.xml" /> - <Resource id="20" location="../../../../trunk/data/radars/t-r-9.xml" /> - <Resource id="21" location="../../../../trunk/data/shields/alpaa.xml" /> - <Resource id="22" location="../../../../trunk/data/shields/flatiron.xml" /> - <Resource id="23" location="../../../../trunk/data/shields/himelea.xml" /> - <Resource id="24" location="../../../../trunk/data/shields/kydango.xml" /> - <Resource id="25" location="../../../../trunk/data/shields/pod.xml" /> - <Resource id="26" location="../../../../trunk/data/shields/shelter.xml" /> - <Resource id="27" location="../../../../trunk/data/shields/t-s-13.xml" /> - <Resource id="28" location="../../../../trunk/data/power_plants/t-p-16.xml" /> - <Resource id="29" location="../../../../trunk/data/radars/night_watchman.xml" /> -</equipment> Deleted: branches/ogsector/win32/ogsectorclient/ships.xml =================================================================== --- branches/ogsector/win32/ogsectorclient/ships.xml 2007-06-06 19:04:27 UTC (rev 543) +++ branches/ogsector/win32/ogsectorclient/ships.xml 2007-06-06 20:00:40 UTC (rev 544) @@ -1,8 +0,0 @@ -<?xml version="1.0"?> - -<ships> - <Resource id="1" location="../../data/ships/squadrok/squid/squid.xml"/> - <Resource id="2" location="../../../../trunk/data/ships/octavius/apteryx/apteryx.xml" /> - <Resource id="3" location="../../../../trunk/data/ships/quantar/storm/storm.xml" /> - <Resource id="4" location="../../../../trunk/data/ships/tauseti/lady_kickstart/lady_kickstart.xml" /> -</ships> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spo...@us...> - 2007-06-12 17:12:22
|
Revision: 552 http://svn.sourceforge.net/opengate/?rev=552&view=rev Author: spom_spom Date: 2007-06-12 10:12:12 -0700 (Tue, 12 Jun 2007) Log Message: ----------- Add very basic ship configuratoin dialog. Its just quite ugly. Modified Paths: -------------- branches/ogsector/configure.ac branches/ogsector/data/gui/layouts/dialogs/MarketDialog.layout branches/ogsector/data/gui/layouts/dialogs/MarketItemShortDialog.layout branches/ogsector/data/gui/layouts/dialogs/ShipConfigDialog.layout branches/ogsector/data/gui/schemes/opengate/opengate.imageset branches/ogsector/data/gui/schemes/opengate/opengate.png branches/ogsector/src/Avatar.cpp branches/ogsector/src/Avatar.h branches/ogsector/src/BaseDialog.cpp branches/ogsector/src/BaseDialog.h branches/ogsector/src/DeviceManager.h branches/ogsector/src/DockedState.cpp branches/ogsector/src/DockedState.h branches/ogsector/src/Entity.cpp branches/ogsector/src/Entity.h branches/ogsector/src/EntityManager.cpp branches/ogsector/src/EntityManager.h branches/ogsector/src/GameStateManager.cpp branches/ogsector/src/Makefile.am branches/ogsector/src/Makefile.in branches/ogsector/src/MarketDialog.cpp branches/ogsector/src/MarketDialog.h branches/ogsector/src/Sector.cpp branches/ogsector/src/SectorObjects.cpp branches/ogsector/src/SectorObjects.h branches/ogsector/src/ShipConfigDialog.cpp branches/ogsector/src/ShipConfigDialog.h branches/ogsector/src/UnDockedState.cpp branches/ogsector/src/Vessel.h Added Paths: ----------- branches/ogsector/data/gui/layouts/dialogs/ShipConfigEquipmentButton.layout branches/ogsector/src/Vessel.cpp Modified: branches/ogsector/configure.ac =================================================================== --- branches/ogsector/configure.ac 2007-06-12 03:50:11 UTC (rev 551) +++ branches/ogsector/configure.ac 2007-06-12 17:12:12 UTC (rev 552) @@ -51,7 +51,7 @@ AC_SUBST(AM_CXXFLAGS, "$AM_CXXFLAGS $freealut_CFLAGS") AC_SUBST(AM_LDFLAGS, "$AM_LDFLAGS $freealut_LIBS") -AC_SUBST([CXXFLAGS], ["${CXXFLAGS} -I$OGSECTOR_EXTERNALS_PATH/include"]) +AC_SUBST([CXXFLAGS], ["${CXXFLAGS} -Wall -I$OGSECTOR_EXTERNALS_PATH/include"]) AC_SUBST([CXXFLAGS], ["${CXXFLAGS} -I$OGSECTOR_EXTERNALS_PATH/ogreopcode/include"]) AC_SUBST([CXXFLAGS], ["${CXXFLAGS} -I$OGSECTOR_EXTERNALS_PATH/ogreopcode/opcode132"]) AC_SUBST([LDFLAGS], ["${LDFLAGS} -L$OGSECTOR_EXTERNALS_PATH/lib/ -lOpcode -lOgreOpcode"]) Modified: branches/ogsector/data/gui/layouts/dialogs/MarketDialog.layout =================================================================== --- branches/ogsector/data/gui/layouts/dialogs/MarketDialog.layout 2007-06-12 03:50:11 UTC (rev 551) +++ branches/ogsector/data/gui/layouts/dialogs/MarketDialog.layout 2007-06-12 17:12:12 UTC (rev 552) @@ -51,8 +51,8 @@ <Property Name="FrameEnabled" Value="False" /> </Window> <Window Type="opengate/StaticGreenImage" Name="MarketItemDetailedView/TextFrame"> - <Property Name="UnifiedPosition" Value="{{0.0, 330},{0.5, -120}}" /> - <Property Name="UnifiedSize" Value="{{0.0, 250},{0.0, 240}}" /> + <Property Name="UnifiedPosition" Value="{{0.0, 330},{0.5, -145}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 250},{0.0, 290}}" /> <Property Name="BackgroundEnabled" Value="False" /> <Property Name="FrameEnabled" Value="False" /> <Window Type="opengate/StaticLabel" Name="MarketItemDetailedView/TextFrame/Name"> @@ -82,8 +82,47 @@ <Property Name="UnifiedSize" Value="{{1.0, -100},{1.0, 0}}" /> </Window> </Window> + <Window Type="opengate/StaticLabel" Name="MarketItemDetailedView/EquipmentSpecs"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{0.0, 100}}" /> + <Property Name="UnifiedSize" Value="{{1.0, 0},{1.0, -80}}" /> + <Window Type="opengate/StaticLabel" Name="MarketItemDetailedView/EquipmentSpecs1a"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{0.0, 0}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 100},{0.0, 20}}" /> + </Window> + <Window Type="opengate/StaticLabel" Name="MarketItemDetailedView/EquipmentSpecs1b"> + <Property Name="UnifiedPosition" Value="{{0.0, 100},{0.0, 0}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 50},{0.0, 20}}" /> + </Window> + + <Window Type="opengate/StaticLabel" Name="MarketItemDetailedView/EquipmentSpecs2a"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{0.0, 20}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 100},{0.0, 20}}" /> + </Window> + <Window Type="opengate/StaticLabel" Name="MarketItemDetailedView/EquipmentSpecs2b"> + <Property Name="UnifiedPosition" Value="{{0.0, 100},{0.0, 20}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 50},{0.0, 20}}" /> + </Window> + + <Window Type="opengate/StaticLabel" Name="MarketItemDetailedView/EquipmentSpecs3a"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{0.0, 40}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 100},{0.0, 20}}" /> + </Window> + <Window Type="opengate/StaticLabel" Name="MarketItemDetailedView/EquipmentSpecs3b"> + <Property Name="UnifiedPosition" Value="{{0.0, 100},{0.0, 40}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 50},{0.0, 20}}" /> + </Window> + + <Window Type="opengate/StaticLabel" Name="MarketItemDetailedView/EquipmentSpecs4a"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{0.0, 60}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 100},{0.0, 20}}" /> + </Window> + <Window Type="opengate/StaticLabel" Name="MarketItemDetailedView/EquipmentSpecs4b"> + <Property Name="UnifiedPosition" Value="{{0.0, 100},{0.0, 60}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 50},{0.0, 20}}" /> + </Window> + </Window> <Window Type="opengate/StaticLabel" Name="MarketItemDetailedView/TextFrame/Amount"> - <Property Name="UnifiedPosition" Value="{{0.0, 0},{0.0, 70}}" /> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{1.0, -60}}" /> <Property Name="UnifiedSize" Value="{{1.0, 0},{0.0, 20}}" /> <Property Name="Text" Value="Amount available:" /> <Window Type="opengate/StaticLabel" Name="MarketItemDetailedView/TextFrame/Amount/Text"> @@ -92,7 +131,7 @@ </Window> </Window> <Window Type="opengate/StaticLabel" Name="MarketItemDetailedView/TextFrame/Price"> - <Property Name="UnifiedPosition" Value="{{0.0, 0},{0.0, 100}}" /> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{1.0, -40}}" /> <Property Name="UnifiedSize" Value="{{1.0, 0},{0.0, 20}}" /> <Property Name="Text" Value="Cost with tax:" /> <Window Type="opengate/StaticLabel" Name="MarketItemDetailedView/TextFrame/Price/Text"> Modified: branches/ogsector/data/gui/layouts/dialogs/MarketItemShortDialog.layout =================================================================== --- branches/ogsector/data/gui/layouts/dialogs/MarketItemShortDialog.layout 2007-06-12 03:50:11 UTC (rev 551) +++ branches/ogsector/data/gui/layouts/dialogs/MarketItemShortDialog.layout 2007-06-12 17:12:12 UTC (rev 552) @@ -17,7 +17,7 @@ <Property Name="UnifiedSize" Value="{{0.0, 12},{0.0, 12}}" /> <Property Name="BackgroundEnabled" Value="False" /> <Property Name="FrameEnabled" Value="false" /> - <Property Name="Image" Value="set:opengate image:IconCommoditiesNeutral" /> + <Property Name="Image" Value="set:opengate image:IconCommodity0" /> <Property Name="MousePassThroughEnabled" Value="true" /> </Window> <Window Type="opengate/StaticGreenImage" Name="MarketShortItemSizeIcon"> Modified: branches/ogsector/data/gui/layouts/dialogs/ShipConfigDialog.layout =================================================================== --- branches/ogsector/data/gui/layouts/dialogs/ShipConfigDialog.layout 2007-06-12 03:50:11 UTC (rev 551) +++ branches/ogsector/data/gui/layouts/dialogs/ShipConfigDialog.layout 2007-06-12 17:12:12 UTC (rev 552) @@ -1,75 +1,340 @@ <?xml version="1.0" ?> <GUILayout> - <Window Type="opengate/FrameWindow" Name="ShipConfigDialog"> - <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" /> + <Window Type="opengate/StaticGreenImage" Name="ShipConfigDialog"> + <!-- <Property Name="MousePassThroughEnabled" Value="True" /> --> + <Property Name="UnifiedPosition" Value="{{0.0,100},{0.0,115}}" /> + <Property Name="UnifiedSize" Value="{{1.0,-167},{1.0,-217}}" /> +<!-- *** --> +<!-- *** Left part ship selection *** --> +<!-- *** --> + <Window Type="opengate/StaticGreenImage" Name="ShipSelection"> + <Property Name="UnifiedPosition" Value="{{0.0, 10},{0.0, 10}}" /> + <Property Name="UnifiedSize" Value="{{0.5, -50},{1.0, -20}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> +<!-- *** Start frame *** --> + <Window Type="opengate/StaticGreenImage" Name="ShipSelection/TopLeft"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{0.0, 0}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 31},{0.0, 31}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="RiseOnClick" Value="False" /> + <Property Name="Image" Value="set:opengate image:StaticGreenTopLeft"/> + </Window> + <Window Type="opengate/StaticGreenImage" Name="ShipSelection/Top"> + <Property Name="UnifiedPosition" Value="{{0.0, 31},{ 0.0, 0}}" /> + <Property Name="UnifiedSize" Value="{{1.0, -31},{ 0.0, 31}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="RiseOnClick" Value="False" /> + <Property Name="Image" Value="set:opengate image:StaticGreenTop"/> + </Window> + <Window Type="opengate/StaticGreenImage" Name="ShipSelection/Right"> + <Property Name="UnifiedPosition" Value="{{1.0, -1},{ 0.0, 0}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 1},{ 1.0, 0}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="RiseOnClick" Value="False" /> + <Property Name="Image" Value="set:opengate image:StaticGreenVertLine"/> + </Window> + <Window Type="opengate/StaticGreenImage" Name="ShipSelection/Bottom"> + <Property Name="UnifiedPosition" Value="{{0.0, 31},{ 1.0, -31}}" /> + <Property Name="UnifiedSize" Value="{{1.0, -32},{ 0.0, 31}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="RiseOnClick" Value="False" /> + <Property Name="Image" Value="set:opengate image:StaticGreenBottom"/> + </Window> + <Window Type="opengate/StaticGreenImage" Name="ShipSelection/BottomLeft"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{ 1.0, -31}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 31},{ 0.0, 31}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="RiseOnClick" Value="False" /> + <Property Name="Image" Value="set:opengate image:StaticGreenBottomLeft"/> + </Window> + <Window Type="opengate/StaticGreenImage" Name="ShipSelection/Left"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{ 0.0, 31}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 31},{ 1.0, -62}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="RiseOnClick" Value="False" /> + <Property Name="Image" Value="set:opengate image:StaticGreenLeft"/> + </Window> + <Window Type="opengate/StaticGreenImage" Name="ShipSelection/Background"> + <Property Name="UnifiedPosition" Value="{{0.0, 31},{ 0.0, 31}}" /> + <Property Name="UnifiedSize" Value="{{1.0, -32},{ 1.0, -62}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="RiseOnClick" Value="False" /> + <Property Name="Image" Value="set:opengate image:StaticGreenBackdrop"/> + </Window> +<!-- *** End frame *** --> + <Window Type="opengate/StaticGreenImage" Name="ShipConfigDialog/ShipView"> + <Property Name="UnifiedPosition" Value="{{0.0, 31},{0.0, 31}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 200},{0.0, 150}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + </Window> + <Window Type="opengate/EmptyButton" Name="ShipConfigDialog/PrevShip"> + <Property Name="UnifiedPosition" Value="{{0.0, 31},{0.0, 190}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 56},{0.0, 14}}" /> + <Property Name="NormalImage" Value="set:opengate image:ScrollThumbLeftNormal" /> + <Property Name="HoverImage" Value="set:opengate image:ScrollThumbLeftHover" /> + <Property Name="PushedImage" Value="set:opengate image:ScrollThumbLeftPushed" /> + </Window> + <Window Type="opengate/EmptyButton" Name="ShipConfigDialog/NextShip"> + <Property Name="UnifiedPosition" Value="{{0.0, 175},{0.0, 190}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 56},{0.0, 14}}" /> + <Property Name="NormalImage" Value="set:opengate image:ScrollThumbRightNormal" /> + <Property Name="HoverImage" Value="set:opengate image:ScrollThumbRightHover" /> + <Property Name="PushedImage" Value="set:opengate image:ScrollThumbRightPushed" /> + </Window> + <Window Type="opengate/Button" Name="ShipConfigDialog/SelectOctavius"> + <Property Name="UnifiedPosition" Value="{{0.0, 260},{0.0, 10}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 100},{0.0, 24}}" /> + <Property Name="Text" Value="Octavius" /> + <Property Name="Disabled" Value="true" /> + </Window> + <Window Type="opengate/Button" Name="ShipConfigDialog/SelectQuanter"> + <Property Name="UnifiedPosition" Value="{{0.0, 260},{0.0, 36}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 100},{0.0, 24}}" /> + <Property Name="Text" Value="Quantar" /> + <Property Name="Disabled" Value="true" /> + </Window> + <Window Type="opengate/Button" Name="ShipConfigDialog/SelectTauseti"> + <Property Name="UnifiedPosition" Value="{{0.0, 260},{0.0, 62}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 100},{0.0, 24}}" /> + <Property Name="Text" Value="Tauseti" /> + <Property Name="Disabled" Value="true" /> + </Window> + <Window Type="opengate/Button" Name="ShipConfigDialog/SelectSquadrok"> + <Property Name="UnifiedPosition" Value="{{0.0, 260},{0.0, 88}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 100},{0.0, 24}}" /> + <Property Name="Text" Value="Squadrok" /> + <Property Name="Disabled" Value="true" /> + </Window> + <Window Type="opengate/Button" Name="ShipConfigDialog/SelectAll"> + <Property Name="UnifiedPosition" Value="{{0.0, 260},{0.0, 120}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 100},{0.0, 24}}" /> + <Property Name="Text" Value="All" /> + <Property Name="Disabled" Value="true" /> + </Window> + <Window Type="opengate/Button" Name="ShipConfigDialog/SelectShip"> + <Property Name="UnifiedPosition" Value="{{0.0, 260},{0.0, 154}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 100},{0.0, 24}}" /> + <Property Name="Text" Value="Select" /> + </Window> + <Window Type="opengate/StaticGreenImage" Name="ShipConfigDialog/MiddleLine"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{ 0.0, 220}}" /> + <Property Name="UnifiedSize" Value="{{1.0, 0},{ 0.0, 1}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="RiseOnClick" Value="False" /> + <Property Name="Image" Value="set:opengate image:StaticGreenHorizLine"/> + </Window> +<!-- *** --> +<!-- *** Ship selection bottom part *** --> +<!-- *** --> + <Window Type="opengate/EmptyButton" Name="ShipConfigDialog/SelectGun"> + <Property Name="UnifiedPosition" Value="{{0.0, 10},{0.0, 300}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 100},{0.0, 24}}" /> + <Property Name="Font" Value="BlueHighway-16" /> + <Property Name="Text" Value="Guns" /> + <Property Name="Disabled" Value="True" /> +<!-- <Property Name="HorizontalAlignment" Value="Left" /> --> + </Window> + <Window Type="opengate/EmptyButton" Name="ShipConfigDialog/SelectMissile"> + <Property Name="UnifiedPosition" Value="{{0.0, 10},{0.0, 330}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 100},{0.0, 24}}" /> + <Property Name="Font" Value="BlueHighway-16" /> + <Property Name="Text" Value="Missiles" /> + <Property Name="Disabled" Value="True" /> + </Window> + <Window Type="opengate/EmptyButton" Name="ShipConfigDialog/SelectEquipment"> + <Property Name="UnifiedPosition" Value="{{0.0, 10},{0.0, 360}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 100},{0.0, 24}}" /> + <Property Name="Font" Value="BlueHighway-16" /> + <Property Name="Text" Value="Equipment" /> + </Window> + <Window Type="opengate/EmptyButton" Name="ShipConfigDialog/SelectMODx"> + <Property Name="UnifiedPosition" Value="{{0.0, 10},{0.0, 390}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 100},{0.0, 24}}" /> + <Property Name="Font" Value="BlueHighway-16" /> + <Property Name="Text" Value="MODx" /> + <Property Name="Disabled" Value="True" /> + </Window> -<!-- <Property Name="HorizontalAlignment" Value="Centre" /> --> -<!-- <Property Name="VerticalAlignment" Value="Centre" /> --> - <Property Name="Alpha" Value="0.7" /> - <Property Name="Text" Value="Ship Configurator" /> - <Window Type="opengate/FrameWindow" Name="ShipConfigDialog/ShipStats"> - <Property Name="UnifiedPosition" Value="{{0.7,0},{0.0,22}}" /> - <Property Name="UnifiedSize" Value="{{0.3,0},{1.0,-22}}" /> - <Property Name="SizingEnabled" Value="false" /> - <Property Name="TitlebarEnabled" Value="false" /> - <Property Name="CloseButtonEnabled" Value="false" /> - <Property Name="Alpha" Value="0.7" /> </Window> - <Window Type="opengate/Button" Name="ShipConfigDialog/SelectOctavius"> - <Property Name="UnifiedPosition" Value="{{0.55,0.0},{0.3,0}}" /> - <Property Name="UnifiedSize" Value="{{0.0,100},{0.0,24}}" /> - <Property Name="Text" Value="Octavius" /> - <Property Name="Disabled" Value="true" /> +<!-- *** --> +<!-- *** Right part ship configuration *** --> +<!-- *** --> + <Window Type="opengate/StaticGreenImage" Name="ShipConfiguration"> + <Property Name="UnifiedPosition" Value="{{0.5, -30},{0.0, 10}}" /> + <Property Name="UnifiedSize" Value="{{0.5, 19},{1.0, -20}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> +<!-- *** Start frame *** --> + <Window Type="opengate/StaticGreenImage" Name="ShipConfiguration/Top"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{ 0.0, 0}}" /> + <Property Name="UnifiedSize" Value="{{1.0, -31},{ 0.0, 31}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:opengate image:StaticGreenTop"/> + <Property Name="RiseOnClick" Value="False" /> + </Window> + <Window Type="opengate/StaticGreenImage" Name="ShipConfiguration/TopRight"> + <Property Name="UnifiedPosition" Value="{{1.0, -31},{0.0, 0}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 31},{0.0, 31}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="RiseOnClick" Value="False" /> + <Property Name="Image" Value="set:opengate image:StaticGreenTopRight"/> + </Window> + <Window Type="opengate/StaticGreenImage" Name="ShipConfiguration/Right"> + <Property Name="UnifiedPosition" Value="{{1.0, -31},{ 0.0, 31}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 31},{ 1.0, -62}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="RiseOnClick" Value="False" /> + <Property Name="Image" Value="set:opengate image:StaticGreenRight"/> + </Window> + <Window Type="opengate/StaticGreenImage" Name="ShipConfiguration/BottomRight"> + <Property Name="UnifiedPosition" Value="{{1.0, -31},{ 1.0, -31}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 31},{ 0.0, 31}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="RiseOnClick" Value="False" /> + <Property Name="Image" Value="set:opengate image:StaticGreenBottomRight"/> + </Window> + <Window Type="opengate/StaticGreenImage" Name="ShipConfiguration/Bottom"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{1.0, -31}}" /> + <Property Name="UnifiedSize" Value="{{1.0, -31},{0.0, 31}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="RiseOnClick" Value="False" /> + <Property Name="Image" Value="set:opengate image:StaticGreenBottom"/> + </Window> + <Window Type="opengate/StaticGreenImage" Name="ShipConfiguration/Left"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{0.0, 0}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 1},{1.0, 0}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="RiseOnClick" Value="False" /> + <Property Name="Image" Value="set:opengate image:StaticGreenVertLine"/> + </Window> + <Window Type="opengate/StaticGreenImage" Name="ShipConfiguration/Background"> + <Property Name="UnifiedPosition" Value="{{0.0, 1},{0.0, 31}}" /> + <Property Name="UnifiedSize" Value="{{1.0, -32},{1.0, -62}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="RiseOnClick" Value="False" /> + <Property Name="Image" Value="set:opengate image:StaticGreenBackdrop"/> + </Window> +<!-- *** End frame *** --> + <Window Type="opengate/StaticGreenImage" Name="ShipConfiguration/EquipmentWindow"> + <Property Name="UnifiedPosition" Value="{{0.0, 15},{0.0, 5}}" /> + <Property Name="UnifiedSize" Value="{{0.6, 0},{1.0, -5}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="MousePassThroughEnabled" Value="True" /> + </Window> + <Window Type="opengate/StaticGreenImage" Name="ShipConfiguration/PowerGrid"> + <Property Name="UnifiedPosition" Value="{{0.6, 15},{0.0, 10}}" /> + <Property Name="UnifiedSize" Value="{{0.4, -25},{1.0, -20}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="True" /> + <Window Type="opengate/StaticGreenImage" Name="ShipConfiguration/PowerGrid/Icons"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{0.0, 31}}" /> + <Property Name="UnifiedSize" Value="{{1.0, -50},{1.0, -62}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Window Type="opengate/StaticGreenImage" Name="ShipConfiguration/PowerGrid/Icons/Engine"> + <Property Name="UnifiedPosition" Value="{{0.0, 30},{0.0, 37}}" /> + <Property Name="UnifiedSize" Value="{{1.0, -30},{0.0, 40}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Window Type="opengate/EmptyButton" Name="ShipConfiguration/PowerGrid/Icons/Engine/Decrease"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{0.5, -10}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 8},{0.0, 20}}" /> + <Property Name="NormalImage" Value="set:opengate image:ShipConfigEquipmentPrevItemNormal" /> + <Property Name="HoverImage" Value="set:opengate image:ShipConfigEquipmentPrevItemHover" /> + </Window> + <Window Type="opengate/StaticLabel" Name="ShipConfiguration/PowerGrid/Icons/Engine/TrustPercent"> + <Property Name="UnifiedPosition" Value="{{0.0, 12},{0.0, 5}}" /> + <Property Name="UnifiedSize" Value="{{1.0, -40},{0.0, 15}}" /> + <Property Name="Text" Value="100%" /> + </Window> + <Window Type="opengate/StaticLabel" Name="ShipConfiguration/PowerGrid/Icons/Engine/Speed"> + <Property Name="UnifiedPosition" Value="{{0.0, 12},{0.0, 20}}" /> + <Property Name="UnifiedSize" Value="{{1.0, -40},{0.0, 15}}" /> + <Property Name="Text" Value="V000" /> + </Window> + <Window Type="opengate/EmptyButton" Name="ShipConfiguration/PowerGrid/Icons/Engine/Increase"> + <Property Name="UnifiedPosition" Value="{{1.0, -25},{0.5, -10}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 8},{0.0, 20}}" /> + <Property Name="NormalImage" Value="set:opengate image:ShipConfigEquipmentNextItemNormal" /> + <Property Name="HoverImage" Value="set:opengate image:ShipConfigEquipmentNextItemHover" /> + </Window> + </Window> + </Window> + <Window Type="opengate/StaticGreenImage" Name="ShipConfiguration/PowerGrid/Values"> + <Property Name="UnifiedPosition" Value="{{1.0, -50},{0.0, 31}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 50},{1.0, -62}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Window Type="opengate/StaticLabel" Name="ShipConfiguration/PowerGrid/Values/PowerPlantOut"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{0.0, 10}}" /> + <Property Name="UnifiedSize" Value="{{1.0, 0},{0.0, 20}}" /> + <Property Name="Text" Value="0" /> + </Window> + <Window Type="opengate/StaticLabel" Name="ShipConfiguration/PowerGrid/Values/EngineIn"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{0.0, 50}}" /> + <Property Name="UnifiedSize" Value="{{1.0, 0},{0.0, 20}}" /> + <Property Name="Text" Value="0" /> + </Window> + <Window Type="opengate/StaticLabel" Name="ShipConfiguration/PowerGrid/Values/EngineOut"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{0.0, 70}}" /> + <Property Name="UnifiedSize" Value="{{1.0, 0},{0.0, 20}}" /> + <Property Name="Text" Value="0" /> + </Window> + <Window Type="opengate/StaticLabel" Name="ShipConfiguration/PowerGrid/Values/RadarIn"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{0.0, 110}}" /> + <Property Name="UnifiedSize" Value="{{1.0, 0},{0.0, 20}}" /> + <Property Name="Text" Value="0" /> + </Window> + <Window Type="opengate/StaticLabel" Name="ShipConfiguration/PowerGrid/Values/RadarOut"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{0.0, 130}}" /> + <Property Name="UnifiedSize" Value="{{1.0, 0},{0.0, 20}}" /> + <Property Name="Text" Value="0" /> + </Window> + <Window Type="opengate/StaticLabel" Name="ShipConfiguration/PowerGrid/Values/EcmIn"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{0.0, 170}}" /> + <Property Name="UnifiedSize" Value="{{1.0, 0},{0.0, 20}}" /> + <Property Name="Text" Value="0" /> + </Window> + <Window Type="opengate/StaticLabel" Name="ShipConfiguration/PowerGrid/Values/EcmOut"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{0.0, 190}}" /> + <Property Name="UnifiedSize" Value="{{1.0, 0},{0.0, 20}}" /> + <Property Name="Text" Value="0" /> + </Window> + <Window Type="opengate/StaticLabel" Name="ShipConfiguration/PowerGrid/Values/ShieldIn"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{0.0, 230}}" /> + <Property Name="UnifiedSize" Value="{{1.0, 0},{0.0, 20}}" /> + <Property Name="Text" Value="0" /> + </Window> + <Window Type="opengate/StaticLabel" Name="ShipConfiguration/PowerGrid/Values/ShieldOut"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{0.0, 250}}" /> + <Property Name="UnifiedSize" Value="{{1.0, 0},{0.0, 20}}" /> + <Property Name="Text" Value="0" /> + </Window> + <Window Type="opengate/StaticLabel" Name="ShipConfiguration/PowerGrid/Values/Remain"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{1.0, -30}}" /> + <Property Name="UnifiedSize" Value="{{1.0, 0},{0.0, 20}}" /> + <Property Name="Text" Value="0" /> + </Window> + </Window> + </Window> </Window> - <Window Type="opengate/Button" Name="ShipConfigDialog/SelectQuanter"> - <Property Name="UnifiedPosition" Value="{{0.55,0.0},{0.3,+26}}" /> - <Property Name="UnifiedSize" Value="{{0.0,100},{0.0,24}}" /> - <Property Name="Text" Value="Quantar" /> - <Property Name="Disabled" Value="true" /> - </Window> - <Window Type="opengate/Button" Name="ShipConfigDialog/SelectTauseti"> - <Property Name="UnifiedPosition" Value="{{0.55,0.0},{0.3,+52}}" /> - <Property Name="UnifiedSize" Value="{{0.0,100},{0.0,24}}" /> - <Property Name="Text" Value="Tauseti" /> - <Property Name="Disabled" Value="true" /> </Window> - <Window Type="opengate/Button" Name="ShipConfigDialog/SelectSquadrok"> - <Property Name="UnifiedPosition" Value="{{0.55,0.0},{0.3,+78}}" /> - <Property Name="UnifiedSize" Value="{{0.0,100},{0.0,24}}" /> - <Property Name="Text" Value="Squadrok" /> - <Property Name="Disabled" Value="true" /> - </Window> - <Window Type="opengate/Button" Name="ShipConfigDialog/SelectAll"> - <Property Name="UnifiedPosition" Value="{{0.55,0.0},{0.3,+110}}" /> - <Property Name="UnifiedSize" Value="{{0.0,100},{0.0,24}}" /> - <Property Name="Text" Value="All" /> - <Property Name="Disabled" Value="true" /> - </Window> - <Window Type="opengate/StaticImage" Name="ShipConfigDialog/ShipView"> - <Property Name="UnifiedPosition" Value="{{0.1,0},{0.3,0}}" /> - <Property Name="UnifiedSize" Value="{{0.4,0},{ 0.4,0}}" /> - <Property Name="Alpha" Value="1.0" /> - </Window> - <Window Type="opengate/EmptyButton" Name="ShipConfigDialog/PrevShip"> - <Property Name="UnifiedPosition" Value="{{0.1,0},{0.7,+10}}" /> - <Property Name="UnifiedSize" Value="{{0.0,56},{ 0.0,14}}" /> - <Property Name="NormalImage" Value="set:opengate image:ScrollThumbLeftNormal" /> - <Property Name="HoverImage" Value="set:opengate image:ScrollThumbLeftHover" /> - <Property Name="PushedImage" Value="set:opengate image:ScrollThumbLeftPushed" /> - </Window> - <Window Type="opengate/EmptyButton" Name="ShipConfigDialog/NextShip"> - <Property Name="UnifiedPosition" Value="{{0.5,-56},{0.7,+10}}" /> - <Property Name="UnifiedSize" Value="{{0.0,56},{ 0.0,14}}" /> - <Property Name="NormalImage" Value="set:opengate image:ScrollThumbRightNormal" /> - <Property Name="HoverImage" Value="set:opengate image:ScrollThumbRightHover" /> - <Property Name="PushedImage" Value="set:opengate image:ScrollThumbRightPushed" /> - </Window> - <Window Type="opengate/Button" Name="ShipConfigDialog/SelectShip"> - <Property Name="UnifiedPosition" Value="{{0.0,+10},{1,-34}}" /> - <Property Name="UnifiedSize" Value="{{0.0,100},{0.0,24}}" /> - <Property Name="Text" Value="Select" /> - </Window> - </Window> </GUILayout> Added: branches/ogsector/data/gui/layouts/dialogs/ShipConfigEquipmentButton.layout =================================================================== --- branches/ogsector/data/gui/layouts/dialogs/ShipConfigEquipmentButton.layout (rev 0) +++ branches/ogsector/data/gui/layouts/dialogs/ShipConfigEquipmentButton.layout 2007-06-12 17:12:12 UTC (rev 552) @@ -0,0 +1,97 @@ +<?xml version="1.0" ?> +<GUILayout> + <Window Type="opengate/StaticGreenImage" Name="ShipConfigEquipmentItem"> + <Property Name="UnifiedPosition" Value="{{0.0, 10},{0.0, 10}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 131},{0.0, 120}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Window Type="opengate/EmptyButton" Name="ShipConfigEquipmentButton"> + <Property Name="UnifiedPosition" Value="{{0.0, 9},{0.0, 0}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 121},{0.0, 106}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="NormalImage" Value="set:opengate image:ShipConfigEquipmentItemWindowNormal" /> + <Property Name="HoverImage" Value="set:opengate image:ShipConfigEquipmentItemWindowHover" /> + <Property Name="PushedImage" Value="set:opengate image:ShipConfigEquipmentItemWindowHover" /> + <Property Name="RiseOnClick" Value="False" /> + <Window Type="opengate/StaticGreenImage" Name="ShipConfigEquipmentButton/Image"> + <Property Name="UnifiedPosition" Value="{{0.5, -38},{0.0, 7}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 76},{0.0, 76}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="RiseOnClick" Value="False" /> + <Property Name="MousePassThroughEnabled" Value="True" /> + </Window> + <Window Type="opengate/StaticGreenImage" Name="ShipConfigEquipmentButton/CategoryIcon"> + <Property Name="UnifiedPosition" Value="{{1.0, -15},{0.0, 3}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 12},{0.0, 12}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="RiseOnClick" Value="False" /> + <Property Name="MousePassThroughEnabled" Value="True" /> + </Window> + <Window Type="opengate/StaticLabel" Name="ShipConfigEquipmentButton/Name"> + <Property Name="UnifiedPosition" Value="{{0.0, 2},{1.0, -13}}" /> + <Property Name="UnifiedSize" Value="{{1.0, -4},{0.0, 12}}" /> + <Property Name="Text" Value="Label" /> + <Property Name="Font" Value="BlueHighway-10" /> + <Property Name="RiseOnClick" Value="False" /> + <Property Name="MousePassThroughEnabled" Value="True" /> + </Window> + <Window Type="opengate/EmptyButton" Name="ShipConfigEquipmentButton/PrevItem"> + <Property Name="UnifiedPosition" Value="{{0.0, 4},{0.5, -10}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 11},{0.0, 21}}" /> + <Property Name="RiseOnClick" Value="False" /> + <Property Name="NormalImage" Value="set:opengate image:ShipConfigEquipmentPrevItemNormal" /> + <Property Name="HoverImage" Value="set:opengate image:ShipConfigEquipmentPrevItemHover" /> + </Window> + <Window Type="opengate/EmptyButton" Name="ShipConfigEquipmentButton/NextItem"> + <Property Name="UnifiedPosition" Value="{{1.0, -15},{0.5, -10}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 11},{0.0, 21}}" /> + <Property Name="Font" Value="BlueHighway-10" /> + <Property Name="RiseOnClick" Value="False" /> + <Property Name="NormalImage" Value="set:opengate image:ShipConfigEquipmentNextItemNormal" /> + <Property Name="HoverImage" Value="set:opengate image:ShipConfigEquipmentNextItemHover" /> + </Window> + </Window> + <Window Type="opengate/EmptyButton" Name="ShipConfigEquipmentItem/Load"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{0.0, 0}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 28},{0.0, 21}}" /> + <Property Name="NormalImage" Value="set:opengate image:ShipConfigEquipmentLoadBlue" /> + <Property Name="HoverImage" Value="set:opengate image:ShipConfigEquipmentLoadGreen" /> + <Property Name="PushedImage" Value="set:opengate image:ShipConfigEquipmentLoadRed" /> + <Window Type="opengate/StaticImage" Name="ShipConfigEquipmentItem/Load/Arrow"> + <Property Name="UnifiedPosition" Value="{{0.5, -6},{0.5, -7}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 14},{0.0, 12}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:opengate image:ShipConfigEquipmentLeftArrow" /> + <Property Name="AlwaysOnTop" Value="True" /> + <Property Name="MousePassThroughEnabled" Value="True" /> + </Window> + </Window> + <Window Type="opengate/EmptyButton" Name="ShipConfigEquipmentItem/UnLoad"> + <Property Name="UnifiedPosition" Value="{{0.0, 0},{0.0, 0}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 28},{0.0, 21}}" /> + <Property Name="NormalImage" Value="set:opengate image:ShipConfigEquipmentLoadRed" /> + <Property Name="HoverImage" Value="set:opengate image:ShipConfigEquipmentLoadGreen" /> + <Property Name="PushedImage" Value="set:opengate image:ShipConfigEquipmentLoadBlue" /> + <Property Name="AlwaysOnTop" Value="True" /> + <Property Name="Visible" Value="False" /> + <Window Type="opengate/StaticImage" Name="ShipConfigEquipmentItem/UnLoad/Arrow"> + <Property Name="UnifiedPosition" Value="{{0.5, -6},{0.5, -7}}" /> + <Property Name="UnifiedSize" Value="{{0.0, 14},{0.0, 12}}" /> + <Property Name="BackgroundEnabled" Value="False" /> + <Property Name="FrameEnabled" Value="False" /> + <Property Name="Image" Value="set:opengate image:ShipConfigEquipmentRightArrow" /> + <Property Name="MousePassThroughEnabled" Value="True" /> + </Window> + </Window> + <Window Type="opengate/StaticLabel" Name="ShipConfigEquipmentButton/Label"> + <Property Name="UnifiedPosition" Value="{{0.0, 40},{1.0, -14}}" /> + <Property Name="UnifiedSize" Value="{{1.0, -40},{0.0, 12}}" /> + <Property Name="Text" Value="Label" /> + <Property Name="Font" Value="BlueHighway-10" /> + </Window> + </Window> +</GUILayout> Modified: branches/ogsector/data/gui/schemes/opengate/opengate.imageset =================================================================== --- branches/ogsector/data/gui/schemes/opengate/opengate.imageset 2007-06-12 03:50:11 UTC (rev 551) +++ branches/ogsector/data/gui/schemes/opengate/opengate.imageset 2007-06-12 17:12:12 UTC (rev 552) @@ -135,7 +135,6 @@ <Image Name="IconMODx2" XPos="286" YPos="304" Width="15" Height="15" /> <Image Name="IconMODx3" XPos="286" YPos="320" Width="15" Height="15" /> <Image Name="IconMODx4" XPos="286" YPos="336" Width="15" Height="15" /> - <Image Name="IconStorageNormal" XPos="410" YPos="256" Width="15" Height="15" /> <Image Name="IconStorageHover" XPos="426" YPos="256" Width="15" Height="15" /> @@ -201,8 +200,20 @@ <Image Name="MarketSellAllHover" XPos="454" YPos="193" Width="22" Height="17" /> <Image Name="MarketSellAllPushed" XPos="477" YPos="193" Width="22" Height="17" /> + <Image Name="ShipConfigEquipmentItemWindowNormal" XPos="1" YPos="405" Width="121" Height="106" /> + <Image Name="ShipConfigEquipmentItemWindowHover" XPos="123" YPos="405" Width="121" Height="106" /> + <Image Name="ShipConfigEquipmentLoadBlue" XPos="245" YPos="405" Width="28" Height="21" /> + <Image Name="ShipConfigEquipmentLoadGreen" XPos="245" YPos="426" Width="28" Height="21" /> + <Image Name="ShipConfigEquipmentLoadRed" XPos="245" YPos="447" Width="28" Height="21" /> + <Image Name="ShipConfigEquipmentRightArrow" XPos="245" YPos="468" Width="14" Height="12" /> + <Image Name="ShipConfigEquipmentLeftArrow" XPos="245" YPos="481" Width="14" Height="12" /> + <Image Name="ShipConfigEquipmentPrevItemNormal" XPos="274" YPos="405" Width="11" Height="21" /> + <Image Name="ShipConfigEquipmentPrevItemHover" XPos="274" YPos="427" Width="11" Height="21" /> + <Image Name="ShipConfigEquipmentNextItemNormal" XPos="286" YPos="405" Width="11" Height="21" /> + <Image Name="ShipConfigEquipmentNextItemHover" XPos="286" YPos="427" Width="11" Height="21" /> + <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/src/Avatar.cpp =================================================================== --- branches/ogsector/src/Avatar.cpp 2007-06-12 03:50:11 UTC (rev 551) +++ branches/ogsector/src/Avatar.cpp 2007-06-12 17:12:12 UTC (rev 552) @@ -24,7 +24,6 @@ namespace OpenGate{ Avatar::Avatar( const std::string & name, int ID ): name_( name ), id_( ID ) { - setVessel( *VesselManager::getSingleton().vessel( "apteryx" ) ); cargoHold_ = 0; } @@ -33,9 +32,6 @@ void Avatar::setVessel( Vessel & vessel ){ vessel_ = & vessel; - std::cout << "setVessel " << vessel_->name() << " " << vessel_->allEquipmentMaximumSize() - << " " << vessel_->cargoSize() << std::endl; - maxCargoHold_ = vessel_->allEquipmentMaximumSize() + vessel_->cargoSize(); } @@ -84,5 +80,55 @@ } } } + +bool Avatar::loadItem( Entity * item ){ + + std::vector < Entity * > items; items.push_back( item ); + + switch( item->entityType() ){ + case POWERPLANT: + if ( vessel_->setPowerPlant( dynamic_cast< PowerPlant *>(item) ) ){ delCargoToFloor( items ); return true; } + break; + case ENGINE: + if ( vessel_->setEngine( dynamic_cast< Engine * >(item) ) ){ delCargoToFloor( items ); return true; } + break; + case RADAR: + if ( vessel_->setRadar( dynamic_cast< Radar * >(item) ) ){ delCargoToFloor( items ); return true; } + break; + case ECM: + if ( vessel_->setEcm( dynamic_cast< Ecm * >(item) ) ){ delCargoToFloor( items ); return true; } + break; + case SHIELD: + if ( vessel_->setShield( dynamic_cast< Shield * >(item) ) ){ delCargoToFloor( items ); return true; } + break; + case CAPACITOR: + if ( vessel_->setCapacitor( dynamic_cast< Capacitor * >(item) ) ){ delCargoToFloor( items ); return true; } + break; + } + return false; +} + +bool Avatar::unLoadItem( Entity * item ){ + + switch( item->entityType() ){ + case POWERPLANT: vessel_->setPowerPlant( NULL ); + break; + case ENGINE: vessel_->setEngine( NULL ); + break; + case RADAR: vessel_->setRadar( NULL ); + break; + case ECM: vessel_->setEcm( NULL ); + break; + case SHIELD: vessel_->setShield( NULL ); + break; + case CAPACITOR: vessel_->setCapacitor( NULL ); + break; + } + + std::vector < Entity * > items; items.push_back( item ); + addCargoToFloor( items ); + return true; +} + } // namespace OpenGate{ Modified: branches/ogsector/src/Avatar.h =================================================================== --- branches/ogsector/src/Avatar.h 2007-06-12 03:50:11 UTC (rev 551) +++ branches/ogsector/src/Avatar.h 2007-06-12 17:12:12 UTC (rev 552) @@ -44,7 +44,7 @@ int userID() const { return id_; } void setVessel( Vessel & vessel ); - Vessel & vessel() { return *vessel_; } + Vessel * vessel() { return vessel_; } void addCargoToFloor( const std::vector < Entity * > & item ); void delCargoToFloor( const std::vector < Entity * > & item ); @@ -54,6 +54,9 @@ std::list< std::deque < Entity * > > * floorCargo() { return & floorCargo_; } + bool loadItem( Entity * item ); + bool unLoadItem( Entity * item ); + protected: std::string name_; int id_; Modified: branches/ogsector/src/BaseDialog.cpp =================================================================== --- branches/ogsector/src/BaseDialog.cpp 2007-06-12 03:50:11 UTC (rev 551) +++ branches/ogsector/src/BaseDialog.cpp 2007-06-12 17:12:12 UTC (rev 552) @@ -21,10 +21,33 @@ #include "BaseDialog.h" #include "DeviceManager.h" +#include <OgreRenderWindow.h> + #include <CEGUIWindowManager.h> namespace OpenGate{ +void renameClonedWindows( const CEGUI::Window * parent, const CEGUI::String & namePrefix) { + // std::cout << parent->getName() << ": " << parent->getChildCount() << std::endl; + + for ( int i = 0; i < parent->getChildCount(); i ++ ){ + // std::cout << i << "accessing: "<< parent->getName() << std::endl; + CEGUI::Window * child = parent->getChildAtIdx( i ); + child->rename( namePrefix + child->getName() ); + renameClonedWindows( child, namePrefix ); + } +} + +float windowHeight( const CEGUI::Window * child ){ + if ( child->getParent() ) return child->getHeight().asAbsolute( windowHeight( child->getParent() ) ); + return child->getHeight().asAbsolute( DeviceManager::getSingleton().renderWindow->getHeight() ); +} + +float windowWidth( const CEGUI::Window * child ){ + if ( child->getParent() ) return child->getWidth().asAbsolute( windowWidth( child->getParent() ) ); + return child->getWidth().asAbsolute( DeviceManager::getSingleton().renderWindow->getWidth() ); +} + BaseDialog::BaseDialog( const std::string & layout ) : rootWindow_( CEGUI::WindowManager::getSingleton().loadWindowLayout( layout ) ), devices_( DeviceManager::getSingletonPtr() ), visible_( false ) { Modified: branches/ogsector/src/BaseDialog.h =================================================================== --- branches/ogsector/src/BaseDialog.h 2007-06-12 03:50:11 UTC (rev 551) +++ branches/ogsector/src/BaseDialog.h 2007-06-12 17:12:12 UTC (rev 552) @@ -32,6 +32,10 @@ namespace OpenGate{ +void renameClonedWindows( const CEGUI::Window * parent, const CEGUI::String & namePrefix ); +float windowHeight( const CEGUI::Window * child ); +float windowWidth( const CEGUI::Window * child ); + /*! * \brief This is a base class for dialogs * Modified: branches/ogsector/src/DeviceManager.h =================================================================== --- branches/ogsector/src/DeviceManager.h 2007-06-12 03:50:11 UTC (rev 551) +++ branches/ogsector/src/DeviceManager.h 2007-06-12 17:12:12 UTC (rev 552) @@ -30,7 +30,7 @@ namespace OpenGate{ -enum EntityType{ENTITY,VESSEL,COMMODITY,POWERPLANT,ENGINE,RADAR,ECM,CAPACITOR,SHIELD,GUN,MISSILE,MODX}; +enum EntityType{NONE,ENTITY,VESSEL,COMMODITY,POWERPLANT,ENGINE,RADAR,ECM,CAPACITOR,SHIELD,GUN,MISSILE,MODX}; /*! * \brief This is a storage to handle current status of several things @@ -86,7 +86,11 @@ case ENGINE: return "Engine"; case SHIELD: return "Shield"; case RADAR: return "Radar"; - default: return "unknown"; + case ECM: return "ECM"; + case GUN: return "GUN"; + case MISSILE: return "MISSILE"; + case MODX: return "MODx"; + default: return "unknown"; } return "unknown"; } Modified: branches/ogsector/src/DockedState.cpp =================================================================== --- branches/ogsector/src/DockedState.cpp 2007-06-12 03:50:11 UTC (rev 551) +++ branches/ogsector/src/DockedState.cpp 2007-06-12 17:12:12 UTC (rev 552) @@ -20,6 +20,8 @@ #include "DockedState.h" #include "Console.h" +#include "Avatar.h" +#include "Vessel.h" #include <OgreCEGUITexture.h> #include <CEGUI/elements/CEGUIPushButton.h> @@ -198,6 +200,31 @@ CEGUI::Window::EventSized, CEGUI::Event::Subscriber(&Console::handleResize, devices_->console ) ) ; } +bool DockedState::handleLaunch( const CEGUI::EventArgs & e ){ + if ( !devices_->avatar->vessel()->powerPlant() ) { + log_->warn( "You have to equip a power plant first." ); + return true; + } + if ( !devices_->avatar->vessel()->engine() ) { + log_->warn( "You have to equip an engine first." ); + return true; + } + + parent_->start( parent_->findByName( "UnDockedState" ) ); + return true; +} + +bool DockedState::handleShipConfigButton( const CEGUI::EventArgs & e ){ + if ( shipConfigDialog_ ) shipConfigDialog_->setVisible( !shipConfigDialog_->isVisible() ); + if ( marketDialog_ ) marketDialog_->hide(); + return true; +} +bool DockedState::handleMarketButton( const CEGUI::EventArgs & e ){ + if ( marketDialog_ ) marketDialog_->setVisible( !marketDialog_->isVisible() ); + if ( shipConfigDialog_ ) shipConfigDialog_->hide(); + return true; +} + bool DockedState::switchConfigDialog( ){ devices_->gameStateRoot->switchConfigDialog( ); return true; Modified: branches/ogsector/src/DockedState.h =================================================================== --- branches/ogsector/src/DockedState.h 2007-06-12 03:50:11 UTC (rev 551) +++ branches/ogsector/src/DockedState.h 2007-06-12 17:12:12 UTC (rev 552) @@ -80,19 +80,10 @@ virtual ~DockedState(){} 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 handleMarketButton( const CEGUI::EventArgs & e ){ - if ( marketDialog_ ) marketDialog_->setVisible( !marketDialog_->isVisible() ); - return true; - } - + bool handleLaunch( const CEGUI::EventArgs & e ); + bool handleShipConfigButton( const CEGUI::EventArgs & e ); + bool handleMarketButton( const CEGUI::EventArgs & e ); + 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(); } Modified: branches/ogsector/src/Entity.cpp =================================================================== --- branches/ogsector/src/Entity.cpp 2007-06-12 03:50:11 UTC (rev 551) +++ branches/ogsector/src/Entity.cpp 2007-06-12 17:12:12 UTC (rev 552) @@ -39,6 +39,7 @@ size_ = 1; rtti_ = ENTITY; factionID_ = 1; + imageInitialised_ = false; setFactionName_( DeviceManager::getSingleton().factionName( factionID_ ) ); } @@ -47,18 +48,17 @@ setFactionName_( DeviceManager::getSingleton().factionName( factionID_ ) ); } -void Entity::setImageName( const std::string & imageFileName ) { - imageFileName_ = imageFileName; - +void Entity::loadImages_( ) { + imageInitialised_ = true; bool haveSmall = true; - haveSmall = initialiseImage( imageFileName + "_76x76.png", imageFileName + "Small" ); + haveSmall = initialiseImage( imageFileName_ + "_76x76.png", imageFileName_ + "Small" ); if ( haveSmall ){ ceguiSmallImageName_ = ceguiImageName_; } - if ( !initialiseImage( imageFileName + "_290x290.png", imageFileName ) ){ + if ( !initialiseImage( imageFileName_ + "_290x290.png", imageFileName_ ) ){ //**fallback - initialiseImage( imageFileName + ".png", imageFileName, true ); + initialiseImage( imageFileName_ + ".png", imageFileName_, true ); } if ( !haveSmall ) ceguiSmallImageName_ = ceguiImageName_; Modified: branches/ogsector/src/Entity.h =================================================================== --- branches/ogsector/src/Entity.h 2007-06-12 03:50:11 UTC (rev 551) +++ branches/ogsector/src/Entity.h 2007-06-12 17:12:12 UTC (rev 552) @@ -77,11 +77,10 @@ inline void setDescription( const std::string & description ){ description_ = description; } inline std::string description( ) const { return description_; } - void setImageName( const std::string & imageFileName ); - + inline void setImageName( const std::string & imageFileName ) { imageFileName_ = imageFileName; } inline std::string imageName() const { return imageFileName_; } - inline std::string ceguiImageName() const { return ceguiImageName_; } - inline std::string ceguiSmallImageName() const { return ceguiSmallImageName_; } + inline std::string ceguiImageName() { if ( !imageInitialised_ ) loadImages_(); return ceguiImageName_; } + inline std::string ceguiSmallImageName() { if ( !imageInitialised_ ) loadImages_(); return ceguiSmallImageName_; } bool initialiseImage( const std::string & imageName, const std::string & targetName, bool verbose = false ); @@ -95,6 +94,7 @@ protected: inline void setFactionName_( const std::string & name ) { factionName_ = name; } + void loadImages_( ); std::string name_; std::string className_; @@ -107,6 +107,7 @@ std::string imageFileName_; std::string ceguiSmallImageName_; std::string ceguiImageName_; + bool imageInitialised_; /*! The places where this part of equipment is built */ std::set < std::string > productionCenters_; @@ -192,31 +193,29 @@ }; /*! - * \brief This class stores the basical information of a Shield + * \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 a shield, which + * 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 Shield : public Equipment { +class Engine : public Equipment { public: - Shield() : Equipment(){ - rtti_ = SHIELD; + + Engine() : Equipment() { + rtti_ = ENGINE; + maxThrust_ = 0.0; } - void setMaximumDeflection( double deflection ){ setMaximumDeflection_ = deflection; } - double maximumDeflection( ) const { return setMaximumDeflection_; } + inline void setMaxThrust( double maxThrust ) { maxThrust_ = maxThrust; } + inline double maxThrust( ) { return maxThrust_; } - void setRegenerationRate( double regenRate ){ regenerationRate_ = regenRate; } - double regenerationRate( ) const { return regenerationRate_; } + double powerConsumption( ) const { return ( maxThrust_ / 1000 ) / efficiency_; } - double powerConsumption( ) const { return regenerationRate_ / efficiency_; } - -protected: - double regenerationRate_; - double setMaximumDeflection_; - +private: + /*! Stores the maximum thrust of this engine */ + double maxThrust_; }; /*! @@ -232,87 +231,90 @@ Radar() : Equipment(){ rtti_ = RADAR; } - void setMaximumRange( double range ){ range_ = range; } - double maximumRange() const{ return range_; } + void setMaxRange( double range ){ range_ = range; } + double maxRange() const{ return range_; } protected: double range_; }; /*! - * \brief This class stores the basical information of a capactitor + * \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... [truncated message content] |
From: <spo...@us...> - 2007-06-17 13:51:31
|
Revision: 564 http://svn.sourceforge.net/opengate/?rev=564&view=rev Author: spom_spom Date: 2007-06-17 06:51:31 -0700 (Sun, 17 Jun 2007) Log Message: ----------- litte code renovation Modified Paths: -------------- branches/ogsector/data/gui/schemes/opengate/BlueHighway-10.font branches/ogsector/data/gui/schemes/opengate/BlueHighway-12.font branches/ogsector/data/gui/schemes/opengate/BlueHighway-14.font branches/ogsector/data/gui/schemes/opengate/BlueHighway-16.font branches/ogsector/data/gui/schemes/opengate/BlueHighway-18.font branches/ogsector/data/gui/schemes/opengate/BlueHighway-8.font branches/ogsector/data/gui/schemes/opengate/opengate.imageset branches/ogsector/data/gui/schemes/opengate/opengate.png branches/ogsector/src/DeviceManager.cpp branches/ogsector/src/DeviceManager.h branches/ogsector/src/Entity.cpp branches/ogsector/src/Entity.h branches/ogsector/src/EntityManager.cpp branches/ogsector/src/GameStateManager.cpp branches/ogsector/src/MarketDialog.cpp branches/ogsector/src/OpcodeWrapper.h branches/ogsector/src/Sector.cpp branches/ogsector/src/Sector.h branches/ogsector/src/SectorObjects.cpp branches/ogsector/src/SectorObjects.h branches/ogsector/src/ShipConfigDialog.cpp branches/ogsector/src/ShipConfigDialog.h branches/ogsector/src/UnDockedState.cpp branches/ogsector/src/Vessel.cpp branches/ogsector/src/Vessel.h branches/ogsector/src/VesselManager.cpp branches/ogsector/src/common.h branches/ogsector/src/networkProtocol.h branches/ogsector/src/networkServer.cpp branches/ogsector/src/networkServerUser.h Removed Paths: ------------- branches/ogsector/data/ships/squadrok/squid/ Modified: branches/ogsector/data/gui/schemes/opengate/BlueHighway-10.font =================================================================== --- branches/ogsector/data/gui/schemes/opengate/BlueHighway-10.font 2007-06-17 13:48:07 UTC (rev 563) +++ branches/ogsector/data/gui/schemes/opengate/BlueHighway-10.font 2007-06-17 13:51:31 UTC (rev 564) @@ -1,2 +1,2 @@ <?xml version="1.0" ?> -<Font Name="BlueHighway-10" Filename="BlueHighway.ttf" Type="FreeType" Size="10" NativeHorzRes="800" NativeVertRes="600" AutoScaled="false" /> +<Font Name="BlueHighway-10" Filename="BlueHighway.ttf" Type="FreeType" Size="10" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="true" /> Modified: branches/ogsector/data/gui/schemes/opengate/BlueHighway-12.font =================================================================== --- branches/ogsector/data/gui/schemes/opengate/BlueHighway-12.font 2007-06-17 13:48:07 UTC (rev 563) +++ branches/ogsector/data/gui/schemes/opengate/BlueHighway-12.font 2007-06-17 13:51:31 UTC (rev 564) @@ -1,2 +1,2 @@ <?xml version="1.0" ?> -<Font Name="BlueHighway-12" Filename="BlueHighway.ttf" Type="FreeType" Size="12" NativeHorzRes="800" NativeVertRes="600" AutoScaled="false" /> +<Font Name="BlueHighway-12" Filename="BlueHighway.ttf" Type="FreeType" Size="12" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="true" /> Modified: branches/ogsector/data/gui/schemes/opengate/BlueHighway-14.font =================================================================== --- branches/ogsector/data/gui/schemes/opengate/BlueHighway-14.font 2007-06-17 13:48:07 UTC (rev 563) +++ branches/ogsector/data/gui/schemes/opengate/BlueHighway-14.font 2007-06-17 13:51:31 UTC (rev 564) @@ -1,2 +1,2 @@ <?xml version="1.0" ?> -<Font Name="BlueHighway-14" Filename="BlueHighway.ttf" Type="FreeType" Size="14" NativeHorzRes="800" NativeVertRes="600" AutoScaled="false" /> +<Font Name="BlueHighway-14" Filename="BlueHighway.ttf" Type="FreeType" Size="14" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="true" /> Modified: branches/ogsector/data/gui/schemes/opengate/BlueHighway-16.font =================================================================== --- branches/ogsector/data/gui/schemes/opengate/BlueHighway-16.font 2007-06-17 13:48:07 UTC (rev 563) +++ branches/ogsector/data/gui/schemes/opengate/BlueHighway-16.font 2007-06-17 13:51:31 UTC (rev 564) @@ -1,2 +1,2 @@ <?xml version="1.0" ?> -<Font Name="BlueHighway-16" Filename="BlueHighway.ttf" Type="FreeType" Size="16" NativeHorzRes="800" NativeVertRes="600" AutoScaled="false" /> +<Font Name="BlueHighway-16" Filename="BlueHighway.ttf" Type="FreeType" Size="16" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="true" /> Modified: branches/ogsector/data/gui/schemes/opengate/BlueHighway-18.font =================================================================== --- branches/ogsector/data/gui/schemes/opengate/BlueHighway-18.font 2007-06-17 13:48:07 UTC (rev 563) +++ branches/ogsector/data/gui/schemes/opengate/BlueHighway-18.font 2007-06-17 13:51:31 UTC (rev 564) @@ -1,2 +1,2 @@ <?xml version="1.0" ?> -<Font Name="BlueHighway-18" Filename="BlueHighway.ttf" Type="FreeType" Size="18" NativeHorzRes="800" NativeVertRes="600" AutoScaled="false" /> +<Font Name="BlueHighway-18" Filename="BlueHighway.ttf" Type="FreeType" Size="18" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="true" /> Modified: branches/ogsector/data/gui/schemes/opengate/BlueHighway-8.font =================================================================== --- branches/ogsector/data/gui/schemes/opengate/BlueHighway-8.font 2007-06-17 13:48:07 UTC (rev 563) +++ branches/ogsector/data/gui/schemes/opengate/BlueHighway-8.font 2007-06-17 13:51:31 UTC (rev 564) @@ -1,2 +1,2 @@ <?xml version="1.0" ?> -<Font Name="BlueHighway-8" Filename="BlueHighway.ttf" Type="FreeType" Size="8" NativeHorzRes="800" NativeVertRes="600" AutoScaled="false" /> +<Font Name="BlueHighway-8" Filename="BlueHighway.ttf" Type="FreeType" Size="8" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="true" /> Modified: branches/ogsector/data/gui/schemes/opengate/opengate.imageset =================================================================== --- branches/ogsector/data/gui/schemes/opengate/opengate.imageset 2007-06-17 13:48:07 UTC (rev 563) +++ branches/ogsector/data/gui/schemes/opengate/opengate.imageset 2007-06-17 13:51:31 UTC (rev 564) @@ -68,75 +68,65 @@ <Image Name="IconCommodityNormal" XPos="142" YPos="256" Width="15" Height="15" /> <Image Name="IconCommodityHover" XPos="142" YPos="272" Width="15" Height="15" /> <Image Name="IconCommodity0" XPos="142" YPos="288" Width="15" Height="15" /> - <Image Name="IconCommodity1" XPos="142" YPos="288" Width="15" Height="15" /> - <Image Name="IconCommodity2" XPos="142" YPos="304" Width="15" Height="15" /> - <Image Name="IconCommodity3" XPos="142" YPos="320" Width="15" Height="15" /> - <Image Name="IconCommodity4" XPos="142" YPos="336" Width="15" Height="15" /> + <Image Name="IconCommodity1" XPos="142" YPos="304" Width="15" Height="15" /> + <Image Name="IconCommodity2" XPos="142" YPos="320" Width="15" Height="15" /> + <Image Name="IconCommodity3" XPos="142" YPos="336" Width="15" Height="15" /> <Image Name="IconPowerplantNormal" XPos="158" YPos="256" Width="15" Height="15" /> <Image Name="IconPowerplantHover" XPos="158" YPos="272" Width="15" Height="15" /> <Image Name="IconPowerplant0" XPos="158" YPos="288" Width="15" Height="15" /> - <Image Name="IconPowerplant1" XPos="158" YPos="288" Width="15" Height="15" /> - <Image Name="IconPowerplant2" XPos="158" YPos="304" Width="15" Height="15" /> - <Image Name="IconPowerplant3" XPos="158" YPos="320" Width="15" Height="15" /> - <Image Name="IconPowerplant4" XPos="158" YPos="336" Width="15" Height="15" /> + <Image Name="IconPowerplant1" XPos="158" YPos="304" Width="15" Height="15" /> + <Image Name="IconPowerplant2" XPos="158" YPos="320" Width="15" Height="15" /> + <Image Name="IconPowerplant3" XPos="158" YPos="336" Width="15" Height="15" /> <Image Name="IconEngineNormal" XPos="174" YPos="256" Width="16" Height="15" /> <Image Name="IconEngineHover" XPos="174" YPos="272" Width="16" Height="15" /> <Image Name="IconEngine0" XPos="174" YPos="288" Width="15" Height="15" /> - <Image Name="IconEngine1" XPos="174" YPos="288" Width="15" Height="15" /> - <Image Name="IconEngine2" XPos="174" YPos="304" Width="15" Height="15" /> - <Image Name="IconEngine3" XPos="174" YPos="320" Width="15" Height="15" /> - <Image Name="IconEngine4" XPos="174" YPos="336" Width="15" Height="15" /> + <Image Name="IconEngine1" XPos="174" YPos="304" Width="15" Height="15" /> + <Image Name="IconEngine2" XPos="174" YPos="320" Width="15" Height="15" /> + <Image Name="IconEngine3" XPos="174" YPos="336" Width="15" Height="15" /> <Image Name="IconRadarNormal" XPos="190" YPos="256" Width="15" Height="15" /> <Image Name="IconRadarHover" XPos="190" YPos="272" Width="15" Height="15" /> <Image Name="IconRadar0" XPos="190" YPos="288" Width="15" Height="15" /> - <Image Name="IconRadar1" XPos="190" YPos="288" Width="15" Height="15" /> - <Image Name="IconRadar2" XPos="190" YPos="304" Width="15" Height="15" /> - <Image Name="IconRadar3" XPos="190" YPos="320" Width="15" Height="15" /> - <Image Name="IconRadar4" XPos="190" YPos="336" Width="15" Height="15" /> + <Image Name="IconRadar1" XPos="190" YPos="304" Width="15" Height="15" /> + <Image Name="IconRadar2" XPos="190" YPos="320" Width="15" Height="15" /> + <Image Name="IconRadar3" XPos="190" YPos="336" Width="15" Height="15" /> <Image Name="IconECMNormal" XPos="206" YPos="256" Width="15" Height="15" /> <Image Name="IconECMHover" XPos="206" YPos="272" Width="15" Height="15" /> <Image Name="IconECM0" XPos="206" YPos="288" Width="15" Height="15" /> - <Image Name="IconECM1" XPos="206" YPos="288" Width="15" Height="15" /> - <Image Name="IconECM2" XPos="206" YPos="304" Width="15" Height="15" /> - <Image Name="IconECM3" XPos="206" YPos="320" Width="15" Height="15" /> - <Image Name="IconECM4" XPos="206" YPos="336" Width="15" Height="15" /> + <Image Name="IconECM1" XPos="206" YPos="304" Width="15" Height="15" /> + <Image Name="IconECM2" XPos="206" YPos="320" Width="15" Height="15" /> + <Image Name="IconECM3" XPos="206" YPos="336" Width="15" Height="15" /> <Image Name="IconCapacitorNormal" XPos="222" YPos="256" Width="15" Height="15" /> <Image Name="IconCapacitorHover" XPos="222" YPos="272" Width="15" Height="15" /> <Image Name="IconCapacitor0" XPos="222" YPos="288" Width="15" Height="15" /> - <Image Name="IconCapacitor1" XPos="222" YPos="288" Width="15" Height="15" /> - <Image Name="IconCapacitor2" XPos="222" YPos="304" Width="15" Height="15" /> - <Image Name="IconCapacitor3" XPos="222" YPos="320" Width="15" Height="15" /> - <Image Name="IconCapacitor4" XPos="222" YPos="336" Width="15" Height="15" /> + <Image Name="IconCapacitor1" XPos="222" YPos="304" Width="15" Height="15" /> + <Image Name="IconCapacitor2" XPos="222" YPos="320" Width="15" Height="15" /> + <Image Name="IconCapacitor3" XPos="222" YPos="336" Width="15" Height="15" /> <Image Name="IconShieldNormal" XPos="238" YPos="256" Width="15" Height="15" /> <Image Name="IconShieldHover" XPos="238" YPos="272" Width="15" Height="15" /> <Image Name="IconShield0" XPos="238" YPos="288" Width="15" Height="15" /> - <Image Name="IconShield1" XPos="238" YPos="288" Width="15" Height="15" /> - <Image Name="IconShield2" XPos="238" YPos="304" Width="15" Height="15" /> - <Image Name="IconShield3" XPos="228" YPos="320" Width="15" Height="15" /> - <Image Name="IconShield4" XPos="238" YPos="336" Width="15" Height="15" /> + <Image Name="IconShield1" XPos="238" YPos="304" Width="15" Height="15" /> + <Image Name="IconShield2" XPos="238" YPos="320" Width="15" Height="15" /> + <Image Name="IconShield3" XPos="238" YPos="336" Width="15" Height="15" /> <Image Name="IconGunNormal" XPos="254" YPos="256" Width="15" Height="15" /> <Image Name="IconGunHover" XPos="254" YPos="272" Width="15" Height="15" /> <Image Name="IconGun0" XPos="254" YPos="288" Width="15" Height="15" /> - <Image Name="IconGun1" XPos="254" YPos="288" Width="15" Height="15" /> - <Image Name="IconGun2" XPos="254" YPos="304" Width="15" Height="15" /> - <Image Name="IconGun3" XPos="254" YPos="320" Width="15" Height="15" /> - <Image Name="IconGun4" XPos="254" YPos="336" Width="15" Height="15" /> + <Image Name="IconGun1" XPos="254" YPos="304" Width="15" Height="15" /> + <Image Name="IconGun2" XPos="254" YPos="320" Width="15" Height="15" /> + <Image Name="IconGun3" XPos="254" YPos="336" Width="15" Height="15" /> <Image Name="IconMissileNormal" XPos="270" YPos="256" Width="15" Height="15" /> <Image Name="IconMissileHover" XPos="270" YPos="272" Width="15" Height="15" /> <Image Name="IconMissile0" XPos="270" YPos="288" Width="15" Height="15" /> - <Image Name="IconMissile1" XPos="270" YPos="288" Width="15" Height="15" /> - <Image Name="IconMissile2" XPos="270" YPos="304" Width="15" Height="15" /> - <Image Name="IconMissile3" XPos="270" YPos="320" Width="15" Height="15" /> - <Image Name="IconMissile4" XPos="270" YPos="336" Width="15" Height="15" /> + <Image Name="IconMissile1" XPos="270" YPos="304" Width="15" Height="15" /> + <Image Name="IconMissile2" XPos="270" YPos="320" Width="15" Height="15" /> + <Image Name="IconMissile3" XPos="270" YPos="336" Width="15" Height="15" /> <Image Name="IconMODxNormal" XPos="286" YPos="256" Width="15" Height="15" /> <Image Name="IconMODxHover" XPos="286" YPos="272" Width="15" Height="15" /> <Image Name="IconMODx0" XPos="286" YPos="288" Width="15" Height="15" /> - <Image Name="IconMODx1" XPos="286" YPos="288" Width="15" Height="15" /> - <Image Name="IconMODx2" XPos="286" YPos="304" Width="15" Height="15" /> - <Image Name="IconMODx3" XPos="286" YPos="320" Width="15" Height="15" /> - <Image Name="IconMODx4" XPos="286" YPos="336" Width="15" Height="15" /> - <Image Name="IconStorageNormal" XPos="410" YPos="256" Width="15" Height="15" /> - <Image Name="IconStorageHover" XPos="426" YPos="256" Width="15" Height="15" /> + <Image Name="IconMODx1" XPos="286" YPos="304" Width="15" Height="15" /> + <Image Name="IconMODx2" XPos="286" YPos="320" Width="15" Height="15" /> + <Image Name="IconMODx3" XPos="286" YPos="336" Width="15" Height="15" /> + <Image Name="IconStorageNormal" XPos="410" YPos="256" Width="15" Height="15" /> + <Image Name="IconStorageHover" XPos="426" YPos="256" Width="15" Height="15" /> <Image Name="IconSize1" XPos="473" YPos="223" Width="12" Height="26" /> <Image Name="IconSize2" XPos="460" YPos="223" Width="12" Height="26" /> Modified: branches/ogsector/data/gui/schemes/opengate/opengate.png =================================================================== (Binary files differ) Modified: branches/ogsector/src/DeviceManager.cpp =================================================================== --- branches/ogsector/src/DeviceManager.cpp 2007-06-17 13:48:07 UTC (rev 563) +++ branches/ogsector/src/DeviceManager.cpp 2007-06-17 13:51:31 UTC (rev 564) @@ -18,13 +18,19 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ +#include "tinyxml/tinyxml.h" #include "DeviceManager.h" +#include "LogManager.h" +#include <OgreArchiveManager.h> +#include <OgreFileSystem.h> namespace OpenGate{ template<> DeviceManager * Ogre::Singleton< DeviceManager >::ms_Singleton = 0; DeviceManager::DeviceManager( ) : modifier_( KEY_NONE ){ + log_ = LogManager::getSingletonPtr(); + ogreRoot = NULL; renderWindow = NULL; inputManager = NULL; @@ -40,6 +46,64 @@ DeviceManager::~DeviceManager( ) { } +std::string DeviceManager::factionName( int id ) { + if ( factionIDs_.count( id ) ){ + return factionIDs_[ id ]; + } + return "unknown"; +} + +void DeviceManager::loadGlobalIDs(const std::set < std::string > & resourcePaths, const std::string & fileName ){ + + Ogre::FileSystemArchive * pArch = new Ogre::FileSystemArchive( (*resourcePaths.begin()), "FileSystem" ); + Ogre::StringVectorPtr file = pArch->find( fileName, true, false); + + std::string fileFullName( fileName ); + if ( (*file).size() > 0 ){ + fileFullName = (*resourcePaths.begin() ) + "/" + (*file)[ 0 ] ; + } + + for ( unsigned int i = 0; i < (*file).size(); i ++ ){ + log_->info( std::string( "Found ressource: " ) + (*resourcePaths.begin() ) + "/" + (*file)[ i ] ); + } + delete pArch; + + TiXmlDocument doc( fileFullName ); + bool loadOkay = doc.LoadFile(); + + if ( !loadOkay ) { + log_->fatal( std::string( "Failed to load id file: " + fileName ) ); + return; + } + + TiXmlHandle docHandle( &doc ); + TiXmlElement *pElem, *pElemId, *pElemName; + TiXmlHandle hRoot( 0 ); + + pElem = docHandle.FirstChildElement().Element(); + hRoot = TiXmlHandle( pElem ); + + if ( !pElem ) { + log_->fatal( fileName + " cannot read first node." ); + return; + } + + if ( strcmp( "container", pElem->Value() ) != 0 ) { + log_->fatal( fileName + " is no container description" ); + return; + } + + for ( pElem = hRoot.FirstChild( "faction" ).Element(); pElem != 0; pElem = pElem->NextSiblingElement() ) { + pElemId = pElem->FirstChildElement( "faction_id" ); + pElemName = pElem->FirstChildElement( "name_en" ); + if ( pElemId && pElemName ) { + factionIDs_[ toInt( pElemId->FirstChild()->Value() ) ] = pElemName->FirstChild()->Value(); + } + } +} + + + DeviceManager & DeviceManager::getSingleton( ){ assert( ms_Singleton ); return ( *ms_Singleton ); Modified: branches/ogsector/src/DeviceManager.h =================================================================== --- branches/ogsector/src/DeviceManager.h 2007-06-17 13:48:07 UTC (rev 563) +++ branches/ogsector/src/DeviceManager.h 2007-06-17 13:51:31 UTC (rev 564) @@ -66,18 +66,11 @@ std::string languageSuffix() const { return languageSuffix_; } std::string className( int id ) const { return "unknown"; } - std::string factionName( int id ) const { - switch( id ){ - case 0: return "neutral"; - case 1: return "tauseti"; - case 2: return "quantar"; - case 3: return "octavius"; - case 4: return "squadrok"; - case 5: return "amanath"; - case 6: return "hyperial"; - } - return "unknown"; - } + + void loadGlobalIDs(const std::set < std::string > & resourcePaths, const std::string & fileName ); + + std::string factionName( int id ); + std::string categoryName( EntityType rtti ) const { switch( rtti ){ case COMMODITY: return "Commodity"; @@ -106,8 +99,12 @@ Avatar * avatar; protected: + LogManager * log_; + GlobalKeyModifier modifier_; std::string languageSuffix_; + + std::map< int, std::string > factionIDs_; }; } //namespace OpenGate Modified: branches/ogsector/src/Entity.cpp =================================================================== --- branches/ogsector/src/Entity.cpp 2007-06-17 13:48:07 UTC (rev 563) +++ branches/ogsector/src/Entity.cpp 2007-06-17 13:51:31 UTC (rev 564) @@ -51,6 +51,9 @@ void Entity::loadImages_( ) { imageInitialised_ = true; bool haveSmall = true; + + if ( imageFileName_ == "unknown" ) imageFileName_ = name_; + haveSmall = initialiseImage( imageFileName_ + "_76x76.png", imageFileName_ + "Small" ); if ( haveSmall ){ ceguiSmallImageName_ = ceguiImageName_; @@ -68,31 +71,30 @@ bool Entity::initialiseImage( const std::string & imageName, const std::string & targetName, bool verbose ){ bool fail = false; - CEGUI::Texture * texture; + CEGUI::Texture * texture = NULL; - if ( imageName != "unknown" ){ - - try { - texture = dynamic_cast< CEGUI::OgreCEGUIRenderer * >( DeviceManager::getSingleton().guiRenderer )->createTexture( imageName, "General"); - } catch( CEGUI::Exception & e ){ - if ( verbose ) LogManager::getSingleton().warn( e.getMessage().c_str() ); - fail = true; - } - } else { + try { + texture = dynamic_cast< CEGUI::OgreCEGUIRenderer * >( DeviceManager::getSingleton().guiRenderer )->createTexture( imageName, "General"); + } catch( CEGUI::Exception & e ){ + if ( verbose ) LogManager::getSingleton().warn( e.getMessage().c_str() ); fail = true; + } catch( Ogre::Exception & e ){ + if ( verbose ) LogManager::getSingleton().warn( e.what() ); + fail = true; + } catch( ... ){ + if ( verbose ) LogManager::getSingleton().warn( "Unknown exception" ); } - if ( !fail ){ + if ( !fail && texture ){ CEGUI::Imageset * imageSet = CEGUI::ImagesetManager::getSingleton().createImageset( targetName, texture ); imageSet->defineImage( targetName, CEGUI::Point(0.0f, 0.0f), CEGUI::Size( texture->getWidth(), texture->getHeight() ), CEGUI::Point(0.0f,0.0f)); - + ceguiImageName_ = "set:" + targetName + " image:" + targetName; } else { - //** fallback image - // ceguiImageName_ = "set:" + name_ + " image:full_image"; + //** fallback image; + ceguiImageName_ = "set:" + targetName + " image:" + targetName; } - // image_ = new CEGUI::Texture(); return !fail; } Modified: branches/ogsector/src/Entity.h =================================================================== --- branches/ogsector/src/Entity.h 2007-06-17 13:48:07 UTC (rev 563) +++ branches/ogsector/src/Entity.h 2007-06-17 13:51:31 UTC (rev 564) @@ -69,7 +69,7 @@ inline int techLevel( ) const { return techLevel_; } inline void setMass( long mass ){ mass_ = mass; } - inline long mass( ) const { return mass_; } + inline Uint32 mass( ) const { return mass_; } inline void setSize( int size ){ size_ = size; } inline int size( ) const { return size_; } @@ -120,7 +120,7 @@ /*! The required tech level to interact with this object */ int techLevel_; /*! The mass of this entity. */ - long mass_; + Uint32 mass_; /*! The amount of slots necessary to plug in such a device. */ int size_; @@ -149,14 +149,18 @@ inline void setEfficiency( double efficiency ) { efficiency_ = efficiency; } inline double efficiency( ) const { return efficiency_; } - inline void setPowerConsumption( double powerConsumption ) { powerConsumption_ = powerConsumption; } - virtual inline double powerConsumption( ) { return powerConsumption_; } + inline void setPowerConsumption( Uint32 powerConsumption ) { + powerConsumption_ = powerConsumption; + //** if input power is < 1000, then input is scaled in kW + if ( powerConsumption_ < 1e3 ) powerConsumption_ *= 1000; + } + virtual inline Uint32 powerConsumption( ) { return powerConsumption_; } protected: Equipment() : Entity(), manufacturer_( "unkown" ) { size_ = 0; efficiency_ = 1.0; - powerConsumption_ = 0.0; + powerConsumption_ = 0; } virtual ~Equipment() { } @@ -168,7 +172,7 @@ double efficiency_; /*! Stores the power consumption of this equipment */ - double powerConsumption_; + Uint32 powerConsumption_; }; /*! @@ -183,13 +187,17 @@ public: PowerPlant() : Equipment(){ rtti_ = POWERPLANT; - powerOutput_ = 0.0; + powerOutput_ = 0; } - void setPowerOutput( double power ) { powerOutput_ = power; } - double powerOutput( ) const { return powerOutput_; } + inline void setPowerOutput( Uint32 power ) { + powerOutput_ = power; + //** if input power is < 100kW, then input is scaled in kW + if ( powerOutput_ < 1e5 ) powerOutput_ *= 1000; + } + inline Uint32 powerOutput( ) const { return powerOutput_; } protected: - double powerOutput_; + Uint32 powerOutput_; }; /*! @@ -205,17 +213,21 @@ Engine() : Equipment() { rtti_ = ENGINE; - maxThrust_ = 0.0; + maxThrust_ = 0; } - inline void setMaxThrust( double maxThrust ) { maxThrust_ = maxThrust; } - inline double maxThrust( ) { return maxThrust_; } + inline void setMaxThrust( Uint32 maxThrust ) { + maxThrust_ = maxThrust; + //** if input thrust is < 100kN, then input is scaled in kN + if ( maxThrust_ < 1e5 ) maxThrust_ *= 1000; + } + inline Uint32 maxThrust( ) { return maxThrust_; } - double powerConsumption( ) const { return ( maxThrust_ / 1000 ) / efficiency_; } + virtual Uint32 powerConsumption( ) const { return (Uint32)rint(( (float)maxThrust_ / efficiency_ )); } private: /*! Stores the maximum thrust of this engine */ - double maxThrust_; + Uint32 maxThrust_; }; /*! @@ -231,11 +243,11 @@ Radar() : Equipment(){ rtti_ = RADAR; } - void setMaxRange( double range ){ range_ = range; } - double maxRange() const{ return range_; } + inline void setMaxRange( Uint32 range ){ range_ = range; } + inline Uint32 maxRange() const{ return range_; } protected: - double range_; + Uint32 range_; }; /*! @@ -276,18 +288,25 @@ rtti_ = SHIELD; } - void setMaxDeflection( double deflection ){ setMaximumDeflection_ = deflection; } - double maxDeflection( ) const { return setMaximumDeflection_; } + inline void setMaxDeflection( Uint32 deflection ){ + setMaximumDeflection_ = deflection; + //** if input deflection is < 100kJ, then input is scaled in kJ + if ( setMaximumDeflection_ < 1e5 ) setMaximumDeflection_ *= 1000; + } + inline Uint32 maxDeflection( ) const { return setMaximumDeflection_; } - void setRegenerationRate( double regenRate ){ regenerationRate_ = regenRate; } - double regenerationRate( ) const { return regenerationRate_; } + inline void setRegenerationRate( Uint32 regenRate ){ + regenerationRate_ = regenRate; + //** if input regeneration rate is < 10kJ, then input is scaled in kJ + if ( regenerationRate_ < 1e4 ) regenerationRate_ *= 1000; + } + inline Uint32 regenerationRate( ) const { return regenerationRate_; } - double powerConsumption( ) const { return regenerationRate_ / efficiency_; } + inline Uint32 powerConsumption( ) const { return (Uint32) rint( regenerationRate_ / efficiency_ ); } protected: - double regenerationRate_; - double setMaximumDeflection_; - + Uint32 regenerationRate_; + Uint32 setMaximumDeflection_; }; /*! @@ -306,12 +325,16 @@ capacity_ = 0; } - inline void setCapacity( long capacity ) { capacity_ = capacity; } - inline long capacity( ) { return capacity_; } + inline void setCapacity( Uint32 capacity ) { + capacity_ = capacity; + //** if input capacity is < 100kJ, then input is scaled in kJ + if ( capacity_ < 1e5 ) capacity_ *= 1000; + } + inline Uint32 capacity( ) { return capacity_; } private: /*! Stores the capacity of a capacitor */ - long capacity_; + Uint32 capacity_; }; Modified: branches/ogsector/src/EntityManager.cpp =================================================================== --- branches/ogsector/src/EntityManager.cpp 2007-06-17 13:48:07 UTC (rev 563) +++ branches/ogsector/src/EntityManager.cpp 2007-06-17 13:51:31 UTC (rev 564) @@ -46,39 +46,6 @@ } delete pArch; -// 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 ); -// } -// } } template<> EquipmentManager * Ogre::Singleton< EquipmentManager >::ms_Singleton = 0; @@ -286,9 +253,9 @@ if ( efficiency > 1 ) efficiency /= 100; } - double powerConsumption = 0.0; + Uint32 powerConsumption = 0; pElem = hRoot.ChildElement( "power_input", 0 ).Element(); - if ( pElem ) powerConsumption = toDouble( pElem->FirstChild()->Value() ); + if ( pElem ) powerConsumption = toInt( pElem->FirstChild()->Value() ); pElem = hRoot.ChildElement( "description_" + DeviceManager::getSingleton().languageSuffix(), 0 ).Element(); if ( !pElem ){ //** fallback to english @@ -306,12 +273,12 @@ switch ( entity->entityType() ){ case POWERPLANT: pElem = hRoot.ChildElement( "power_output", 0 ).Element(); - if ( pElem ) dynamic_cast< PowerPlant * >( entity )->setPowerOutput( toDouble( pElem->FirstChild()->Value() ) ); + if ( pElem ) dynamic_cast< PowerPlant * >( entity )->setPowerOutput( toInt( pElem->FirstChild()->Value() ) ); break; case ENGINE: dynamic_cast< Engine * >( entity )->setEfficiency( efficiency ); pElem = hRoot.ChildElement( "maximum_thrust", 0 ).Element(); - if ( pElem ) dynamic_cast< Engine * >( entity )->setMaxThrust( toDouble( pElem->FirstChild()->Value() ) ); + if ( pElem ) dynamic_cast< Engine * >( entity )->setMaxThrust( toInt( pElem->FirstChild()->Value() ) ); break; case RADAR: @@ -319,7 +286,7 @@ dynamic_cast< Radar * >( entity )->setPowerConsumption( powerConsumption ); pElem = hRoot.ChildElement( "maximum_range", 0 ).Element(); - if ( pElem ) dynamic_cast< Radar * >( entity )->setMaxRange( toDouble( pElem->FirstChild()->Value() ) ); + if ( pElem ) dynamic_cast< Radar * >( entity )->setMaxRange( toInt( pElem->FirstChild()->Value() ) ); break; case ECM: Modified: branches/ogsector/src/GameStateManager.cpp =================================================================== --- branches/ogsector/src/GameStateManager.cpp 2007-06-17 13:48:07 UTC (rev 563) +++ branches/ogsector/src/GameStateManager.cpp 2007-06-17 13:51:31 UTC (rev 564) @@ -315,6 +315,8 @@ devices_.console->addCommand( "/time", &GameStateManager::CMD_printTime, "Show current system time" ); devices_.console->addCommand( "/ai", &GameStateManager::CMD_spawnAi, "[name] Spawn ai subject. /ai help show all available ships." ); + devices_.loadGlobalIDs( resourcePaths_, "ids.xml" ); + vesselManager_ = new VesselManager( ); vesselManager_->load( resourcePaths_, "ships" ); @@ -419,7 +421,7 @@ } void GameStateManager::CMD_spawnAi( const std::vector < std::string > & argv ){ - std::string aiName = "squid"; + std::string aiName = "Squid"; if ( argv.size() > 1 ){ aiName = argv[ 1 ]; } Modified: branches/ogsector/src/MarketDialog.cpp =================================================================== --- branches/ogsector/src/MarketDialog.cpp 2007-06-17 13:48:07 UTC (rev 563) +++ branches/ogsector/src/MarketDialog.cpp 2007-06-17 13:51:31 UTC (rev 564) @@ -554,7 +554,7 @@ switch( item->entityType() ){ case POWERPLANT: - str1a = "Wattage:"; str1b = toStr( dynamic_cast< PowerPlant *>(item)->powerOutput() ) + "K"; + str1a = "Wattage:"; str1b = toStr( dynamic_cast< PowerPlant *>(item)->powerOutput()/1000 ) + "K"; break; case ENGINE: str1a = "Efficiency:" ; str1b = toStr( dynamic_cast< Engine *>(item)->efficiency() ); @@ -562,19 +562,19 @@ break; case RADAR: str1a = "Max. range:" ; str1b = toStr( dynamic_cast< Radar *>(item)->maxRange() ); - str2a = "Power:" ; str2b = toStr( dynamic_cast< Radar *>(item)->powerConsumption() ) + "K"; + str2a = "Power:" ; str2b = toStr( dynamic_cast< Radar *>(item)->powerConsumption()/1000 ) + "K"; break; case ECM: - str1a = "Power:" ; str1b = toStr( dynamic_cast< Engine *>(item)->powerConsumption() ) + "K"; + str1a = "Power:" ; str1b = toStr( dynamic_cast< Engine *>(item)->powerConsumption()/1000 ) + "K"; break; case SHIELD: str1a = "Efficiency:" ; str1b = toStr( dynamic_cast< Shield *>(item)->efficiency() ); - str2a = "Max. Damage:" ; str2b = toStr( dynamic_cast< Shield *>(item)->maxDeflection() ) + "K"; + str2a = "Max. Damage:" ; str2b = toStr( dynamic_cast< Shield *>(item)->maxDeflection()/1000 ) + "K"; str3a = "Recharge:" ; str3b = toStr( dynamic_cast< Shield *>(item)->regenerationRate() / 1000) + "K"; break; case CAPACITOR: str1a = "Efficiency:" ; str1b = toStr( dynamic_cast< Capacitor *>( item )->efficiency() ); - str2a = "Max. Power:" ; str2b = toStr( dynamic_cast< Capacitor *>( item )->capacity() ) + "K"; + str2a = "Max. Power:" ; str2b = toStr( dynamic_cast< Capacitor *>( item )->capacity()/1000 ) + "K"; break; default: break; Modified: branches/ogsector/src/OpcodeWrapper.h =================================================================== --- branches/ogsector/src/OpcodeWrapper.h 2007-06-17 13:48:07 UTC (rev 563) +++ branches/ogsector/src/OpcodeWrapper.h 2007-06-17 13:51:31 UTC (rev 564) @@ -36,7 +36,6 @@ class SectorObject; class Projectile; - class OpcodeCollisionDetection : public Ogre::Singleton< OpcodeCollisionDetection >{ public: OpcodeCollisionDetection( Ogre::SceneManager * sceneMgr ); Modified: branches/ogsector/src/Sector.cpp =================================================================== --- branches/ogsector/src/Sector.cpp 2007-06-17 13:48:07 UTC (rev 563) +++ branches/ogsector/src/Sector.cpp 2007-06-17 13:51:31 UTC (rev 564) @@ -351,10 +351,9 @@ radarMap->removeChild( obj->dotB()->getName() ); } - for ( std::map< long, SectorObjectMoveableAi * >::iterator it = localAiObjects_.begin(); - it != localAiObjects_.end(); it ++ ){ + for ( std::map< long, SectorObjectMoveableAi * >::iterator it = localAiObjects_.begin(); it != localAiObjects_.end(); it ++ ){ if ( it->second->target() == obj ){ - log_->warn( std::string( "ai object target: " ) + it->second->name() + " loose target." ); + log_->warn( std::string( "ai object target: " ) + it->second->name() + " loose target." ); it->second->setTarget( NULL ); } } @@ -421,7 +420,7 @@ obj->mainNode()->setPosition( Ogre::Math::RangeRandom( xmin, xmax ), Ogre::Math::RangeRandom( ymin, ymax ), Ogre::Math::RangeRandom( zmin, zmax ) ); - obj->setThrustPercent( 100 ); + obj->setThrust( obj->maxThrust() ); // obj->mainNode()->setPosition( 0.0f, 0.0f, 200.0f); @@ -572,27 +571,27 @@ } } -void Sector::sendVesselMovement( SectorObjectMoveable * obj ){ +void Sector::sendVesselMovement( SectorObjectMoveableLocal * obj ){ if ( obj ){ MessageBodyShipMovement msg( obj->childID(), obj->mainNode()->getPosition(), - obj->velDirection(), + obj->velocity(), obj->mainNode()->getOrientation(), - obj->thrustPercent(), + obj->thrust(), obj->scaledYaw(), obj->scaledPitch(), obj->scaledRoll(), - obj->incNetSequence() ); + 0 ); network_->send( msg ); } } -void Sector::sendVesselRegister( SectorObjectMoveable * obj ){ +void Sector::sendVesselRegister( SectorObjectMoveableLocal * obj ){ if ( obj ) { log_->info( std::string( "Send register " ) + obj->name() + " id:" + toStr( obj->vessel()->id() ) ); MessageBodyShipRegister msg( obj->userID(), obj->childID(), obj->name(), obj->mainNode()->getPosition(), - obj->vessel()->id() ); + obj->vessel()->id(), obj->mass(), obj->maxShield(), obj->maxThrust() ); network_->send( msg ); } @@ -606,6 +605,9 @@ SectorObjectMoveable * obj = createMoveableObject( msg.name(), msg.senderID(), msg.childID(), *VesselManager::getSingleton().vessel( msg.vesselID() ) ); obj->mainNode()->setPosition( msg.position() ); + obj->setMass( msg.mass() ); + obj->setMaxShield( msg.maxShield() ); + } else { log_->info( "Create ai object " + msg.name()+ " " + toStr( msg.senderID() ) + " " + toStr( (int)msg.childID() ) + " " + toStr( msg.vesselID() ) ); @@ -684,14 +686,9 @@ } -void Sector::sendVesselStatus( SectorObjectMoveable * obj ){ +void Sector::sendVesselStatus( SectorObjectMoveableLocal * obj ){ if ( obj ){ - MessageBodyShipStatus msg( obj->childID(), - obj->shieldPercent(), - obj->armorPercent(), - obj->firePressed(), - obj->afterburnerPressed(), - obj->breakPressed() ); + MessageBodyShipStatus msg( obj->childID(), obj->shield(), obj->armor(), 0, 0, 0 ); network_->send( msg ); } } @@ -744,7 +741,6 @@ for ( std::map< long, SectorObjectMoveable * >::iterator i = movableObjects_.begin(); i != movableObjects_.end(); i++){ std::cerr << "\t" << i->first << " " << i->second->name() << " " << std::endl; } - } } } Modified: branches/ogsector/src/Sector.h =================================================================== --- branches/ogsector/src/Sector.h 2007-06-17 13:48:07 UTC (rev 563) +++ branches/ogsector/src/Sector.h 2007-06-17 13:51:31 UTC (rev 564) @@ -44,12 +44,8 @@ UnDockedState * listener( ){ return listener_; } - void setNetwork( NetworkClient * network ){ network_ = network; } - void update( Ogre::Real elapsedTime ); - LogManager * log() { return log_; } - void createStaticObject( const Ogre::String & meshname, const Ogre::String & objectname, const Ogre::Vector3 & pos, Ogre::Real targetSize, Ogre::Degree yaw ); @@ -72,6 +68,7 @@ void createCircle( ); void selectNextTarget( SectorObject * obj = NULL ); + void selectPrevTarget( SectorObject * obj = NULL ); inline SectorObject * firstTarget( ){ return *itTarget_; } @@ -83,16 +80,16 @@ void sendAllVesselInfos( ); void sendAllVesselMovements( ); - void sendVesselRegister( SectorObjectMoveable * obj ); + void sendVesselRegister( SectorObjectMoveableLocal * obj ); void receiveVesselRegister( const MessageBodyShipRegister & msg ); void sendVesselDeRegister( SectorObjectMoveable * obj ); void receiveVesselDeRegister( const MessageBodyShipDeRegister & msg ); - void sendVesselMovement( SectorObjectMoveable * obj ); + void sendVesselMovement( SectorObjectMoveableLocal * obj ); void receiveVesselMovement( const std::vector < MessageBodyShipMovement * > & movements ); - void sendVesselStatus( SectorObjectMoveable * obj ); + void sendVesselStatus( SectorObjectMoveableLocal * obj ); void receiveVesselStatus( const MessageBodyShipStatus & msg ); void sendVesselAmmoHit( const Projectile & projectile, BaseObject * victim ); Modified: branches/ogsector/src/SectorObjects.cpp =================================================================== --- branches/ogsector/src/SectorObjects.cpp 2007-06-17 13:48:07 UTC (rev 563) +++ branches/ogsector/src/SectorObjects.cpp 2007-06-17 13:51:31 UTC (rev 564) @@ -119,9 +119,8 @@ lifeTime_ = 0.0; oldTime_ = 0.0; - // damage_ = 250.0; - damage_ = (9000.0 + 5700.0) / 4.01; - vel_ = speed * -direction.zAxis().normalisedCopy() + parent->velDirection(); + damage_ = 5000 * 1000; + vel_ = speed * -direction.zAxis().normalisedCopy() + parent->velocity(); } Projectile::~Projectile() { @@ -180,7 +179,6 @@ // return true; // } // } - } return true; } @@ -247,7 +245,7 @@ baseYaw( Ogre::Degree( vessel_->baseYaw() ) ); setBaseSize( vessel_->baseSize() ); - if ( vessel_->factionName() == "squadrok" ){ + if ( vessel_->factionID() == 4 ){ thrusterParticles_ = NULL; thrusterBbs_ = sceneMgr_->createBillboardSet( name_ + "thrust_BBS" ); @@ -269,7 +267,7 @@ } explosion_ = NULL; - setThrustPercent( 0.0 ); + setThrust( 0 ); updateThruster(); } @@ -294,12 +292,68 @@ // Projectile globalisieren. } +bool SectorObjectMoveable::update( Ogre::Real elapsedTime ){ + if ( elapsedTime < 0.001 ) return true; + + lifeTime_ += elapsedTime; + lastFrameCount_ ++; + + Ogre::Real rotFric = rotFriction(); + if ( !isChild() ){ + mainNode_->yaw( Ogre::Degree( yaw_ * ( vessel_->yaw() * rotFric ) * elapsedTime ) ); + mainNode_->pitch( Ogre::Degree( pitch_ * ( vessel_->pitch() * rotFric ) * elapsedTime ) ); + mainNode_->roll( Ogre::Degree( roll_ * ( vessel_->roll() * rotFric ) * elapsedTime ) ); + } else { + mainNode_->yaw( Ogre::Degree( yaw_ * ( vessel_->yaw() * rotFric ) * elapsedTime ), Ogre::Node::TS_PARENT ); + mainNode_->pitch( Ogre::Degree( pitch_ * ( vessel_->pitch() * rotFric ) * elapsedTime ), Ogre::Node::TS_PARENT ); + mainNode_->roll( Ogre::Degree( roll_ * ( vessel_->roll() * rotFric ) * elapsedTime ), Ogre::Node::TS_PARENT ); + } + + // mainNode_->rotate( interpolateRot_, Ogre::Node::TS_PARENT ); + + //** friction = drag * v^2; + Ogre::Real friction = ethernalDensity_ * vessel_->dragFactor() * speed() * speed(); + + Ogre::Vector3 trustDir( mainNode_->getOrientation().zAxis() ); + Ogre::Vector3 flightDir( vel_ ); flightDir.normalise(); + + //** thrust = mass * acc; + if ( mass_ > 0 ){ + acc_ = ( - trustDir * thrust() - flightDir * friction ) / mass_; + } else { + std::cerr << "mass: " << mass_ << std::endl; + } + + if ( breakPressed_ == true ) { + if ( speed() > 0 ) { + acc_ -= flightDir * 4.0; + } + } + + //** v = a * t; + vel_ += acc_ * elapsedTime; + mainNode_->translate( ( vel_ + interpolateVel_ ) * elapsedTime ); + + for ( std::set < Projectile * >::iterator it = projectiles_.begin(); it != projectiles_.end();){ + if ( !(*it)->update( elapsedTime ) ) { + delete *it; + projectiles_.erase( it++ ); + } else ++it; + } + + //** snap quaternion + Ogre::Quaternion rnd( mainNode_->getOrientation() ); + mainNode_->setOrientation( round( rnd.w, 5 ), round( rnd.x, 5 ), round( rnd.y, 5 ), round( rnd.z, 5 ) ); + + return true; +} + void SectorObjectMoveable::setFlightProperties( const MessageBodyShipMovement & msg ){ if ( forceMovement_ ){ mainNode_->setPosition( msg.position() ); mainNode_->setOrientation( msg.orientation() ); vel_ = msg.velocity(); - setThrustPercent( msg.thrust() ); + setThrust( msg.thrust() ); setScaledYaw( msg.yaw() ); setScaledPitch( msg.pitch() ); setScaledRoll( msg.roll() ); @@ -327,7 +381,7 @@ setScaledPitch( msg.pitch() ); vel_ = msg.velocity(); - setThrustPercent( msg.thrust() ); + setThrust( msg.thrust() ); Ogre::Vector3 srcP = mainNode_->getPosition( ); Ogre::Quaternion srcQ = mainNode_->getOrientation( ); @@ -389,12 +443,12 @@ } void SectorObjectMoveable::setStatus( const MessageBodyShipStatus & msg ){ - setFirePressed( msg.firePressed() ); - setAfterburnerPressed( msg.afterburnerPressed() ); - setBreakPressed( msg.breakPressed() ); +// setFirePressed( msg.firePressed() ); +// setAfterburnerPressed( msg.afterburnerPressed() ); +// setBreakPressed( msg.breakPressed() ); - setShieldPercent( msg.shield() ); - setArmorPercent( msg.armor() ); + setShield( msg.shield() ); + setArmor( msg.armor() ); statusChanged_ = false; } @@ -425,130 +479,15 @@ } } -void SectorObjectMoveable::hitByAmmo( float damage ){ - shield_ -= damage; - - if ( shield_ < 0 ){ - armor_ += shield_; - shield_ = 0.0; - armor_ = max( 0.0f, armor_ ); - } - statusChanged_ = true; -} - -bool SectorObjectMoveable::update( Ogre::Real elapsedTime ){ - if ( elapsedTime < 0.001 ) return true; - - lifeTime_ += elapsedTime; - lastFrameCount_ ++; - - Ogre::Real rotFric = rotFriction(); - if ( !isChild() ){ - mainNode_->yaw( Ogre::Degree( yaw_ * ( vessel_->yaw() * rotFric ) * elapsedTime ) ); - mainNode_->pitch( Ogre::Degree( pitch_ * ( vessel_->pitch() * rotFric ) * elapsedTime ) ); - mainNode_->roll( Ogre::Degree( roll_ * ( vessel_->roll() * rotFric ) * elapsedTime ) ); - } else { - mainNode_->yaw( Ogre::Degree( yaw_ * ( vessel_->yaw() * rotFric ) * elapsedTime ), Ogre::Node::TS_PARENT ) ; - mainNode_->pitch( Ogre::Degree( pitch_ * ( vessel_->pitch() * rotFric ) * elapsedTime ), Ogre::Node::TS_PARENT ); - mainNode_->roll( Ogre::Degree( roll_ * ( vessel_->roll() * rotFric ) * elapsedTime ), Ogre::Node::TS_PARENT ); - } - - // mainNode_->rotate( interpolateRot_, Ogre::Node::TS_PARENT ); - - //** friction = drag * v^2; - Ogre::Real friction = ethernalDensity_ * vessel_->dragFactor() * velocity() * velocity(); - - Ogre::Vector3 trustDir( mainNode_->getOrientation().zAxis() ); - Ogre::Vector3 flightDir( vel_ ); flightDir.normalise(); - - updatePowerGrid( elapsedTime ); - - //** thrust = mass * acc; - if ( mass_ > 0 ){ - acc_ = ( - trustDir * thrust() - flightDir * friction ) / mass_; - } else { - std::cerr << "mass: " << mass_ << std::endl; - } - - if ( breakPressed_ == true ) { - if ( velocity() > 0 ) { - acc_ -= flightDir * 4.0; - } - } - - //** v = a * t; - vel_ += acc_ * elapsedTime; - mainNode_->translate( ( vel_ + interpolateVel_ )* elapsedTime ); - - for ( std::set < Projectile * >::iterator it = projectiles_.begin(); it != projectiles_.end();){ - if ( !(*it)->update( elapsedTime ) ) { - delete *it; - projectiles_.erase( it++ ); - } else ++it; - } - - //** object died - if ( armor_ <= 0 || deathSequence_ ) { - return deathSequence( elapsedTime ); - } - - fire( elapsedTime ); - - //** snap quaternion - Ogre::Quaternion rnd( mainNode_->getOrientation() ); - mainNode_->setOrientation( round( rnd.w, 5 ), round( rnd.x, 5 ), round( rnd.y, 5 ), round( rnd.z, 5 ) ); - - return true; -} - -bool SectorObjectMoveable::updatePowerGrid( Ogre::Real elapsedTime ){ - double powerLine = 0.0; - if ( vessel_->powerPlant() ) powerLine = vessel_->powerPlant()->powerOutput(); - - double engineIn = 0.0; - if ( vessel_->engine() ) { - engineIn = vessel_->engine()->powerConsumption() * percentageThrust_ / 100; - engineIn = min( engineIn, powerLine ); - thrust_ = engineIn * 1000 * vessel_->engine()->efficiency(); - } else { - thrust_ = 0.0; - } - powerLine -= engineIn; - powerLine = max( 0.0, powerLine ); - - double shieldIn = 0; - if ( vessel_->shield() ){ - shieldIn = min( vessel_->shield()->powerConsumption(), powerLine ); - shield_ += shieldIn * vessel_->shield()->efficiency() * elapsedTime; - shield_ = min( shield_, maxShield() ); - } - - powerLine -= shieldIn; - powerLine = max( 0.0, powerLine ); - - if ( vessel_->capacitor() ){ - capacity_ += powerLine * vessel_->capacitor()->efficiency() * elapsedTime; - capacity_ = min( (long)capacity_, vessel_->capacitor()->capacity() ); - } - return true; -} - void SectorObjectMoveable::inititializeVesselStats_(){ - mass_ = vessel_->totalMass(); - shield_ = maxShield(); - capacity_ = maxCapacity(); armor_ = maxArmor(); - yaw_ = 0; roll_ = 0; pitch_ = 0; - ammoSpeed_ = 1000; - velocity_ = 0.0; acceleration_ = 0.0; - percentageThrust_ = 0.0; shotsFired_ = 0; //** increase this value to add some fog-friction; ethernalDensity_ = 1.0; @@ -556,7 +495,7 @@ afterburnerPressed_ = false; flashfire_ = false; firePressed_ = false; - fireDelay_ = 0; + vel_ = Ogre::Vector3( 0.0, 0.0, 0.0 ); interpolateRot_ = Ogre::Quaternion( 1.0, 0.0, 0.0, 0.0 ); @@ -577,14 +516,15 @@ void SectorObjectMoveable::updateThruster(){ if ( thrusterParticles_ ){ int nEmits = thrusterParticles_->getNumEmitters( ); - Ogre::Real thrust = thrustPercent(); + Ogre::Real thrustRate = 0; + if ( maxThrust() > 0 ) thrustRate = thrust() / maxThrust(); for ( int i = 0; i < nEmits; i ++ ){ Ogre::ParticleEmitter * pEmit; pEmit = thrusterParticles_->getEmitter( i ); - pEmit->setTimeToLive( thrust / 3000.0 ); - pEmit->setEmissionRate( thrust * 10.0 ); - pEmit->setParticleVelocity( thrust * 5.0 ); + pEmit->setTimeToLive( thrustRate / 3000.0 ); + pEmit->setEmissionRate( thrustRate * 10.0 ); + pEmit->setParticleVelocity( thrustRate * 5.0 ); if ( afterburnerPressed_ ) { pEmit->setColour( Ogre::ColourValue::Blue, Ogre::ColourValue::Red); @@ -595,15 +535,79 @@ } } -void SectorObjectMoveable::fire( Ogre::Real elapsedTime ){ +bool SectorObjectMoveable::deathSequence( Ogre::Real elapsedTime ){ + if ( !deathSequence_ ){ + setVisible( false ); + setSelectable( false ); + sector_->selectNextTarget( this ); + LogManager::getSingleton().info( name_ + " destroyed." ); + if ( !explosion_ ){ + explosion_ = sceneMgr_->createParticleSystem( name_ + "ExplosionSystem", "OpenGate/ExplosionStart" ); + mainNode_->attachObject( explosion_ ); + } + explosion_->getEmitter( 0 )->setEnabled( true ); + explodeSequenceTime_ = explosion_->getEmitter( 0 )->getDuration() + explosion_->getEmitter( 0 )->getMaxTimeToLive(); + + if ( thrusterBbs_ ) thrusterBbs_->setVisible( false ); + thrust_ = 0; + updateThruster(); + deathSequence_ = true; + } + + explodeSequenceTime_ -= elapsedTime; + + if ( explodeSequenceTime_ > 0 || projectiles_.size() > 0 ) { + return true; + } else { + if ( explosion_ ) explosion_->getEmitter( 0 )->setEnabled( false ); + return false; + } +} + +SectorObjectMoveableLocal::SectorObjectMoveableLocal( const Ogre::String & name, Sector * sector, long userID, int childID, + Vessel * vessel ) + : SectorObjectMoveable( name, sector, userID, childID, vessel ){ + + setMass( vessel_->totalMass() ); + + maxThrust_ = 0; + if ( vessel_->engine() ){ + maxThrust_ = vessel_->engine()->maxThrust(); + } + + maxShield_ = 0; + if ( vessel_->shield() ) maxShield_ = vessel_->shield()->maxDeflection(); + shield_ = maxShield_; +} + +bool SectorObjectMoveableLocal::update( Ogre::Real elapsedTime ){ + SectorObjectMoveable::update( elapsedTime ); + + //** object died + if ( armor_ <= 0 || deathSequence_ ) { + return deathSequence( elapsedTime ); + } + + if ( statusChanged_ ){ + sector_->sendVesselStatus( this ); + statusChanged_ = false; + lastShieldSend_ = shield_; + }; + + fire( elapsedTime ); + return true; +} + +void SectorObjectMoveableLocal::fire( Ogre::Real elapsedTime ){ + Ogre::Real delayTime = 0.2; fireDelay_ -= elapsedTime; if ( fireDelay_ <= 0 ){ - Ogre::Real damage = 500.0; + Uint32 damage = 500000; if ( firePressed_ ){ if ( capacity_ > damage ){ projectiles_.insert( new Projectile( this, shotsFired_, ammoSpeed_ ) ); @@ -626,41 +630,56 @@ } } -bool SectorObjectMoveable::deathSequence( Ogre::Real elapsedTime ){ - if ( !deathSequence_ ){ - setVisible( false ); - setSelectable( false ); - sector_->selectNextTarget( this ); - LogManager::getSingleton().info( name_ + " destroyed." ); +void SectorObjectMoveableLocal::hitByAmmo( Uint32 damage ){ - if ( !explosion_ ){ - explosion_ = sceneMgr_->createParticleSystem( name_ + "ExplosionSystem", "OpenGate/ExplosionStart" ); - mainNode_->attachObject( explosion_ ); - } - explosion_->getEmitter( 0 )->setEnabled( true ); - explodeSequenceTime_ = explosion_->getEmitter( 0 )->getDuration() + explosion_->getEmitter( 0 )->getMaxTimeToLive(); + shield_ -= damage; - - if ( thrusterBbs_ ) thrusterBbs_->setVisible( false ); - percentageThrust_ = 0; - updateThruster(); - deathSequence_ = true; + if ( shield_ < 0 ){ + armor_ += shield_; + shield_ = 0; + armor_ = max( 0, armor_); } + statusChanged_ = true; +} - explodeSequenceTime_ -= elapsedTime; +bool SectorObjectMoveableLocal::updatePowerGrid( Ogre::Real elapsedTime ){ + Uint32 powerLine = 0; + if ( vessel_->powerPlant() ) powerLine = vessel_->powerPlant()->powerOutput(); - if ( explodeSequenceTime_ > 0 || projectiles_.size() > 0 ) { - return true; + Uint32 engineIn = 0; + if ( vessel_->engine() ) { + engineIn = (Uint32)rint( vessel_->engine()->powerConsumption() * thrustRate_ ); + engineIn = min( engineIn, powerLine ); + thrust_ = (Uint32)rint( engineIn * vessel_->engine()->efficiency() ); } else { - if ( explosion_ ) explosion_->getEmitter( 0 )->setEnabled( false ); - return false; + thrust_ = 0; } + powerLine -= engineIn; + powerLine = max( 0, powerLine ); + + Uint32 shieldIn = 0; + if ( vessel_->shield() ){ + shieldIn = min( vessel_->shield()->powerConsumption(), powerLine ); + shield_ += (Uint32)rint( shieldIn * vessel_->shield()->efficiency() * elapsedTime ); + shield_ = min( shield_, maxShield() ); + + if ( (float)( shield_ - lastShieldSend_ ) / (float)maxShield() > 0.01 ) statusChanged_ = true; + } + + powerLine -= shieldIn; + powerLine = max( 0, powerLine ); + + if ( vessel_->capacitor() ){ + capacity_ += (Uint32)rint( (Ogre::Real)powerLine * vessel_->capacitor()->efficiency() * elapsedTime ); + capacity_ = min( capacity_, vessel_->capacitor()->capacity() ); + } + return true; } SectorObjectMoveableAi::SectorObjectMoveableAi( const Ogre::String & name, Sector * sector, long userID, int childID, Vessel * vessel ) - : SectorObjectMoveable( name, sector, userID, childID, vessel ){ + : SectorObjectMoveableLocal( name, sector, userID, childID, vessel ){ } bool SectorObjectMoveableAi::update( Ogre::Real elapsedTime ){ @@ -709,18 +728,22 @@ // searchTarget; } - if ( statusChanged_ ){ - sector_->sendVesselStatus( this ); - statusChanged_ = false; - }; - - return SectorObjectMoveable::update( elapsedTime ); + return SectorObjectMoveableLocal::update( elapsedTime ); } -SectorObjectAvatar::SectorObjectAvatar( const Ogre::String & name, Sector * sector, long userID, - Vessel * vessel ) - : SectorObjectMoveable( name, sector, userID, 0, vessel ) { +SectorObjectAvatar::SectorObjectAvatar( const Ogre::String & name, Sector * sector, long userID, Vessel * vessel ) + : SectorObjectMoveableLocal( name, sector, userID, 0, vessel ) { + ammoSpeed_ = 1000; + + thrustRate_ = 0; + + maxCapacity_ = 0; + if ( vessel_->capacitor() ) maxCapacity_ = vessel_->capacitor()->capacity(); + capacity_ = maxCapacity_; + + fireDelay_ = 0; + targetArrow_ = NULL; flightArrow_ = NULL; forceMovement_ = false; @@ -779,19 +802,17 @@ } bool SectorObjectAvatar::update( Ogre::Real elapsedTime ){ - if ( statusChanged_ ){ - sector_->sendVesselStatus( this ); - statusChanged_ = false; - }; - return SectorObjectMoveable::update( elapsedTime ); + updatePowerGrid( elapsedTime ); + + return SectorObjectMoveableLocal::update( elapsedTime ); } void SectorObjectAvatar::reset( ){ deathSequence_ = false; mainNode_->showBoundingBox( false ); - setShieldPercent( 100 ); - setArmorPercent( 100 ); - setThrustPercent( 0.0 ); + setShield( maxShield() ); + setArmor( maxArmor() ); + setThrust( 0 ); } bool SectorObjectAvatar::deathSequence( Ogre::Real elapsedTime ){ Modified: branches/ogsector/src/SectorObjects.h =================================================================== --- branches/ogsector/src/SectorObjects.h 2007-06-17 13:48:07 UTC (rev 563) +++ branches/ogsector/src/SectorObjects.h 2007-06-17 13:51:31 UTC (rev 564) @@ -66,11 +66,11 @@ virtual bool update( Ogre::Real elapsedTime ) = 0; - virtual void hitByAmmo( float damage ){} + virtual void hitByAmmo( Uint32 damage ){} Sector * sector( ) { return sector_; } - virtual Ogre::Vector3 velDirection() const = 0; + virtual Ogre::Vector3 velocity() const = 0; bool selectable() const { return selectable_ ;} @@ -100,7 +100,7 @@ virtual void collide( BaseObject * object ); - inline Ogre::Real damage( ) const { return damage_; } + inline Uint32 damage( ) const { return damage_; } virtual bool update( Ogre::Real elapsedTime ); @@ -108,7 +108,7 @@ BaseObject & parent( ) const { return *parent_; } - Ogre::Vector3 velDirection() const { return vel_; } + Ogre::Vector3 velocity() const { return vel_; } protected: BaseObject * parent_; @@ -119,7 +119,7 @@ Ogre::Real maxLiveTime_; Ogre::Real oldTime_; - Ogre::Real damage_; + Uint32 damage_; }; class SectorObject : public BaseObject { @@ -151,7 +151,7 @@ bool isOnRadar() const { return isOnRadar_; } void onRadar( bool onradar ) { isOnRadar_ = onradar; } - virtual Ogre::Vector3 velDirection() const { return Ogre::Vector3(0.0, 0.0, 0.0 ); } + virtual Ogre::Vector3 velocity() const { return Ogre::Vector3(0.0, 0.0, 0.0 ); } Ogre::OverlayElement * dotA() { return dotA_; } Ogre::OverlayElement * dotB() { return dotB_; } @@ -168,152 +168,133 @@ double baseSize_; }; +/*! Base class for movable objects, instances are only used for foreign player objects. */ + class SectorObjectMoveable : public SectorObject { public: SectorObjectMoveable( const Ogre::String & name, Sector * sector, int userID, int childID, Vessel * vessel ); virtual ~SectorObjectMoveable(); + /*! Returns a handle to the actual vessel */ Vessel * vessel(){ return vessel_; } inline virtual long getTypeID() const { return SECTOROBJECTMOVABLE_RTTI; } + virtual bool update( Ogre::Real elapsedTime ); + + /*! Change visibility - Useful for 1st person view and death sequence */ + inline void setVisible( bool visible ) { mainNodeEntity_->setVisible( visible ); } + + /*! Apply movement from net.*/ void setFlightProperties( const MessageBodyShipMovement & msg ); + /*! Apply status from net.*/ void setStatus( const MessageBodyShipStatus & msg ); + /*! Decide what happen if this object collide with another. */ virtual void collide( BaseObject * object ); - virtual bool update( Ogre::Real elapsedTime ); - virtual bool updatePowerGrid( Ogre::Real elapsedTime ); - - virtual void hitByAmmo( float damage ); - + /*! Set relative yaw, between 0 and 1. */ + inline void setScaledYaw( float rot ){ yaw_ = rot; } inline Ogre::Real scaledYaw() const { return yaw_; } - inline void setScaledYaw( float rot ){ yaw_ = rot; } + /*! Set relative pitch, between 0 and 1. */ + inline void setScaledPitch( float rot ){ pitch_ = rot; } inline Ogre::Real scaledPitch() const { return pitch_; } - inline void setScaledPitch( float rot ){ pitch_ = rot; } + /*! Set relative roll, between 0 and 1. */ + inline void setScaledRoll( float rot ){ roll_ = rot; } inline Ogre::Real scaledRoll() const { return roll_; } - inline void setScaledRoll( float rot ){ roll_ = rot; } - Ogre::Real rotFriction(){ return 0.4 + ( 0.6 * ( 100.0 - percentageThrust_ )/ 100.0 ); } + /*! Calculate friction factor for yaw, pitch, roll, friction increase by thrust */ + inline Ogre::Real rotFriction(){ return 0.4 + ( 0.6 * ( 1.0 - thrustRate() ) ); } - // Change visibility - Useful for 1st person view - inline void setVisible( bool visible ) { mainNodeEntity_->setVisible( visible ); } + /*! Update visual feedback for thrusters */ + void updateThruster(); + /*! Set the current thrust */ + inline void setThrust( Uint32 thrust ) { thrust_ = thrust; updateThruster(); } - inline void setThrustPercent( Ogre::Real thrust ) { - percentageThrust_ = min( thrust, Ogre::Real( 100.0 ) ); - percentageThrust_ = max( Ogre::Real( 0.0 ), thrust ); - updateThruster(); - } + /*! Return the current thrust */ + virtual inline Uint32 thrust() const { return thrust_; } - inline Ogre::Real maxThrust() const { return vessel_->maxThrust(); } - inline Ogre::Real thrustRate() const { - if ( maxThrust() > 1e-4 ) return ( thrust() / maxThrust() ); else return 0.0; ... [truncated message content] |
From: <spo...@us...> - 2007-06-17 21:32:56
|
Revision: 565 http://svn.sourceforge.net/opengate/?rev=565&view=rev Author: spom_spom Date: 2007-06-17 14:32:55 -0700 (Sun, 17 Jun 2007) Log Message: ----------- Fixed some net issues and add grey skybox Modified Paths: -------------- branches/ogsector/data/materials/simpleSkybox.material branches/ogsector/data/povray/buildSkyBox.sh branches/ogsector/data/simpleSkybox.zip branches/ogsector/src/GameStateManager.cpp branches/ogsector/src/Sector.cpp branches/ogsector/src/Sector.h branches/ogsector/src/SectorObjects.cpp branches/ogsector/src/SectorObjects.h branches/ogsector/src/networkProtocol.h branches/ogsector/src/networkServerUser.cpp Modified: branches/ogsector/data/materials/simpleSkybox.material =================================================================== --- branches/ogsector/data/materials/simpleSkybox.material 2007-06-17 13:51:31 UTC (rev 564) +++ branches/ogsector/data/materials/simpleSkybox.material 2007-06-17 21:32:55 UTC (rev 565) @@ -37,3 +37,20 @@ } } } +material OpenGate/SimpleSkyBox3 +{ + technique + { + pass + { + lighting off + depth_write off + + texture_unit + { + cubic_texture skybox3.png separateUV + tex_address_mode clamp + } + } + } +} Modified: branches/ogsector/data/povray/buildSkyBox.sh =================================================================== --- branches/ogsector/data/povray/buildSkyBox.sh 2007-06-17 13:51:31 UTC (rev 564) +++ branches/ogsector/data/povray/buildSkyBox.sh 2007-06-17 21:32:55 UTC (rev 565) @@ -6,7 +6,7 @@ RESOLUTION=512 for POVFILE in $ALLPOVFILES; do OUT=${POVFILE%.pov} - OUTNAME=$OUT'_'$RESOLUTION + OUTNAME=$OUT for i in 0 1 2 3 4 5; do Modified: branches/ogsector/data/simpleSkybox.zip =================================================================== (Binary files differ) Modified: branches/ogsector/src/GameStateManager.cpp =================================================================== --- branches/ogsector/src/GameStateManager.cpp 2007-06-17 13:51:31 UTC (rev 564) +++ branches/ogsector/src/GameStateManager.cpp 2007-06-17 21:32:55 UTC (rev 565) @@ -197,18 +197,20 @@ MessageBodyChat msg( &msgs[ i ][ 0 ] ); log_->chat( devices_.network->userName( msg.senderID() ), msg.message() ); } break; - case PROTO_SHIPREGISTER: + case PROTO_SHIP_REGISTER: if ( sector ) sector->receiveVesselRegister( &msgs[ i ][ 0 ] ); break; - case PROTO_SHIPDEREGISTER: + case PROTO_SHIP_DEREGISTER: if ( sector ) sector->receiveVesselDeRegister( &msgs[ i ][ 0 ] ); break; - case PROTO_SHIPSTATUS: + case PROTO_SHIP_STATUS: if ( sector ) sector->receiveVesselStatus( &msgs[ i ][ 0 ] ); break; - case PROTO_SHIPMOVEMENT:{ + case PROTO_SHIP_MOVEMENT:{ //** we handle that in sum, so we can ignore dups because of packet loss MessageBodyShipMovement *msg = new MessageBodyShipMovement( &msgs[ i ][ 0 ] ); movements.push_back( msg ); } break; - case PROTO_SHIPAMMOHIT: + case PROTO_SHIP_PROJECTILEFIRED: + if ( sector ) sector->receiveProjectile( &msgs[ i ][ 0 ] ); break; + case PROTO_SHIP_AMMOHIT: if ( sector ) sector->receiveVesselAmmoHit( &msgs[ i ][ 0 ] ); break; default: std::cerr << "PROTO type unknown: " << msgs[ i ][ 0 ] << " " << msgs[ i ].size() << std::endl; Modified: branches/ogsector/src/Sector.cpp =================================================================== --- branches/ogsector/src/Sector.cpp 2007-06-17 13:51:31 UTC (rev 564) +++ branches/ogsector/src/Sector.cpp 2007-06-17 21:32:55 UTC (rev 565) @@ -71,7 +71,7 @@ collsionDetection_ = new OpcodeCollisionDetection( sceneMgr_ ); //** Create a skybox; - sceneMgr_->setSkyBox( true, "OpenGate/SimpleSkyBox1" ); + sceneMgr_->setSkyBox( true, "OpenGate/SimpleSkyBox3" ); //*** starfield test 1 // Ogre::ManualObject* myManualObject = sceneMgr_->createManualObject("manual1"); @@ -607,6 +607,7 @@ obj->mainNode()->setPosition( msg.position() ); obj->setMass( msg.mass() ); obj->setMaxShield( msg.maxShield() ); + obj->setMaxThrust( msg.maxThrust() ); } else { log_->info( "Create ai object " + msg.name()+ " " + toStr( msg.senderID() ) + " " + @@ -745,4 +746,27 @@ } } +void Sector::sendProjectile( const Projectile & projectile ){ + if ( network_->online() ){ + MessageBodyShipProjectileFired msg( projectile.parent().childID(), projectile.shotCount(), + projectile.position(), projectile.velocity(), + projectile.damage(), projectile.liveTime() ); + network_->send( msg ); + } +} + +void Sector::receiveProjectile( const MessageBodyShipProjectileFired & msg ){ + if ( msg.senderID() != network_->userID() ){ + + std::map< long, SectorObjectMoveable * >::iterator it; + if ( ( it = movableObjects_.find( createGlobalID( msg.senderID(), msg.childID() ) ) ) != movableObjects_.end() ){ + Projectile * pro = new Projectile( it->second, msg.shotCount(), msg.velocity().length(), msg.damage(), msg.liveTime() ); + it->second->addProjectile( pro ); + } else { + log_->warn( "Unknown shooter" ); + } + } +} + + } // namespace OpenGate Modified: branches/ogsector/src/Sector.h =================================================================== --- branches/ogsector/src/Sector.h 2007-06-17 13:51:31 UTC (rev 564) +++ branches/ogsector/src/Sector.h 2007-06-17 21:32:55 UTC (rev 565) @@ -95,6 +95,9 @@ void sendVesselAmmoHit( const Projectile & projectile, BaseObject * victim ); void receiveVesselAmmoHit( const MessageBodyShipAmmoHit & msg ); + void sendProjectile( const Projectile & projectile ); + void receiveProjectile( const MessageBodyShipProjectileFired & msg ); + protected: Ogre::SceneManager * sceneMgr_; NetworkClient * network_; Modified: branches/ogsector/src/SectorObjects.cpp =================================================================== --- branches/ogsector/src/SectorObjects.cpp 2007-06-17 13:51:31 UTC (rev 564) +++ branches/ogsector/src/SectorObjects.cpp 2007-06-17 21:32:55 UTC (rev 565) @@ -48,8 +48,9 @@ sceneMgr_->getRootSceneNode()->removeAndDestroyChild( mainNode_->getName() ); } -Projectile::Projectile( BaseObject * parent, long shotCounter, Ogre::Real speed ) - : BaseObject( parent->name() + "_" + toStr( shotCounter ), parent->sector() ), parent_( parent ) { +Projectile::Projectile( BaseObject * parent, long shotCounter, Ogre::Real speed, Uint32 damage, Ogre::Real liveTime ) + : BaseObject( parent->name() + "_" + toStr( shotCounter ), parent->sector() ), parent_( parent ), + shotCount_( shotCounter), damage_( damage ), maxLiveTime_( liveTime ){ selectable_ = false; Ogre::String bulletName( name_ + "_" + toStr( shotCounter ) ); @@ -115,11 +116,9 @@ // mainNode_->setOrientation( direction ); - maxLiveTime_ = 1.4; lifeTime_ = 0.0; oldTime_ = 0.0; - damage_ = 5000 * 1000; vel_ = speed * -direction.zAxis().normalisedCopy() + parent->velocity(); } @@ -517,7 +516,7 @@ if ( thrusterParticles_ ){ int nEmits = thrusterParticles_->getNumEmitters( ); Ogre::Real thrustRate = 0; - if ( maxThrust() > 0 ) thrustRate = thrust() / maxThrust(); + if ( maxThrust() > 0 ) thrustRate = (float)thrust_ / maxThrust_ * 100; for ( int i = 0; i < nEmits; i ++ ){ Ogre::ParticleEmitter * pEmit; @@ -565,6 +564,10 @@ } } +void SectorObjectMoveable::addProjectile( Projectile * pro ){ + projectiles_.insert( pro ); +} + SectorObjectMoveableLocal::SectorObjectMoveableLocal( const Ogre::String & name, Sector * sector, long userID, int childID, Vessel * vessel ) : SectorObjectMoveable( name, sector, userID, childID, vessel ){ @@ -607,10 +610,14 @@ if ( fireDelay_ <= 0 ){ - Uint32 damage = 500000; + Uint32 damage = 1000000; + Ogre::Real liveTime = 1.4; if ( firePressed_ ){ if ( capacity_ > damage ){ - projectiles_.insert( new Projectile( this, shotsFired_, ammoSpeed_ ) ); + Projectile * pro = new Projectile( this, shotsFired_, ammoSpeed_, damage, liveTime ); + addProjectile( pro ); + sector_->sendProjectile( *pro ); + fireDelay_ = delayTime; shotsFired_++; capacity_ -= damage; Modified: branches/ogsector/src/SectorObjects.h =================================================================== --- branches/ogsector/src/SectorObjects.h 2007-06-17 13:51:31 UTC (rev 564) +++ branches/ogsector/src/SectorObjects.h 2007-06-17 21:32:55 UTC (rev 565) @@ -92,7 +92,7 @@ class Projectile : public BaseObject { public: - Projectile( BaseObject * parent, long shotCount, Ogre::Real speed ); + Projectile( BaseObject * parent, long shotCount, Ogre::Real speed, Uint32 damage, Ogre::Real liveTime ); virtual ~Projectile(); @@ -109,9 +109,16 @@ BaseObject & parent( ) const { return *parent_; } Ogre::Vector3 velocity() const { return vel_; } + Ogre::Vector3 position() const { return Ogre::Vector3( mainNode_->getPosition() ); } + Ogre::Real liveTime() const { return maxLiveTime_; } + + Uint16 shotCount() const { return shotCount_; } + protected: BaseObject * parent_; + Uint16 shotCount_; + Uint32 damage_; // Ogre::BillboardChain * chain_; Ogre::BillboardSet * bbs_; // Ogre::ManualObject * bullet_; @@ -119,7 +126,6 @@ Ogre::Real maxLiveTime_; Ogre::Real oldTime_; - Uint32 damage_; }; class SectorObject : public BaseObject { @@ -278,6 +284,8 @@ /*! The Object is death, starts a sequence for the explosion. */ virtual bool deathSequence( Ogre::Real elapsedTime ); + void addProjectile( Projectile * pro ); + protected: void inititializeVesselStats_(); Modified: branches/ogsector/src/networkProtocol.h =================================================================== --- branches/ogsector/src/networkProtocol.h 2007-06-17 13:51:31 UTC (rev 564) +++ branches/ogsector/src/networkProtocol.h 2007-06-17 21:32:55 UTC (rev 565) @@ -40,12 +40,13 @@ #define PROTO_DISCONNECT 5 #define PROTO_CONNECTION_REFUSED 6 #define PROTO_CHAT 7 -#define PROTO_SHIPBASE 10 -#define PROTO_SHIPREGISTER 11 -#define PROTO_SHIPDEREGISTER 12 -#define PROTO_SHIPSTATUS 13 -#define PROTO_SHIPMOVEMENT 14 -#define PROTO_SHIPAMMOHIT 15 +#define PROTO_SHIP_BASE 10 +#define PROTO_SHIP_REGISTER 11 +#define PROTO_SHIP_DEREGISTER 12 +#define PROTO_SHIP_STATUS 13 +#define PROTO_SHIP_MOVEMENT 14 +#define PROTO_SHIP_AMMOHIT 15 +#define PROTO_SHIP_PROJECTILEFIRED 16 #define PROTO_TEST 255 #define CONNECTION_REFUSED_USER_ALREADY_EXIST 1 @@ -277,7 +278,7 @@ public: MessageBodyShipBase( Uint8 childID ) : MessageBodyBase(), childID_( childID ){ - type_ = (Uint8)PROTO_SHIPBASE; + type_ = (Uint8)PROTO_SHIP_BASE; } MessageBodyShipBase( const char * data ) : MessageBodyBase( data ){ @@ -308,7 +309,7 @@ : MessageBodyShipBase( childID ), name_( name ), pos_( pos ), vesselID_( vesselID ), mass_( mass ), maxShield_( maxShield ), maxThrust_( maxThrust ){ senderID_ = senderID; - type_ = (Uint8)PROTO_SHIPREGISTER; + type_ = (Uint8)PROTO_SHIP_REGISTER; } MessageBodyShipRegister( const char * data ) : MessageBodyShipBase( data ){ @@ -367,7 +368,7 @@ public: MessageBodyShipDeRegister( const Uint32 senderID, const Uint8 childID ): MessageBodyShipBase( childID ){ senderID_ = senderID; - type_ = (Uint8)PROTO_SHIPDEREGISTER; + type_ = (Uint8)PROTO_SHIP_DEREGISTER; } MessageBodyShipDeRegister( const char * data ) : MessageBodyShipBase( data ){ } @@ -393,7 +394,7 @@ Uint32 thrust, float yaw, float pitch, float roll, int seq ) : MessageBodyShipBase( childID ), pos_( pos ), vel_( vel ), orient_( orient ), thrust_( thrust ), yaw_( yaw ), pitch_( pitch ), roll_( roll ), seqNr_( seq ) { - type_ = (Uint8)PROTO_SHIPMOVEMENT; + type_ = (Uint8)PROTO_SHIP_MOVEMENT; } MessageBodyShipMovement( const char * data ) : MessageBodyShipBase( data ){ @@ -465,7 +466,7 @@ MessageBodyShipStatus( Uint8 childID, Uint32 shield, Uint32 armor, bool fire, bool afterburner, bool breakPressed ) : MessageBodyShipBase( childID ), shield_( shield ), armor_( armor ), fire_( fire ), afterburner_( afterburner ), break_( breakPressed ) { - type_ = (Uint8)PROTO_SHIPSTATUS; + type_ = (Uint8)PROTO_SHIP_STATUS; } MessageBodyShipStatus( const char * data ) : MessageBodyShipBase( data ){ @@ -511,11 +512,54 @@ bool break_; }; +class MessageBodyShipProjectileFired : public MessageBodyShipBase { +public: + MessageBodyShipProjectileFired( Uint8 childID, Uint16 shotCount, const Ogre::Vector3 & pos, + const Ogre::Vector3 & vel, Uint32 damage, Ogre::Real liveTime ) + : MessageBodyShipBase( childID ), shotCount_( shotCount ), pos_( pos ), + vel_( vel ), damage_( damage ), liveTime_( liveTime ) { + type_ = (Uint8)PROTO_SHIP_PROJECTILEFIRED; + } + MessageBodyShipProjectileFired( const char * data ) + : MessageBodyShipBase( data ){ + int count = MessageBodyShipBase::dataSize(); + readFromData( shotCount_, data, count ); + readFromData( pos_, data, count ); + readFromData( vel_, data, count ); + readFromData( damage_, data, count ); + readFromData( liveTime_, data, count ); + } + + ~MessageBodyShipProjectileFired( ){} + + void createOutStream() { + MessageBodyShipBase::createOutStream(); + writeToOut( out_, shotCount_ ); + writeToOut( out_, pos_ ); + writeToOut( out_, vel_ ); + writeToOut( out_, damage_ ); + writeToOut( out_, liveTime_ ); + } + + Uint16 shotCount() const { return shotCount_ ; } + Ogre::Vector3 position() const { return pos_; } + Ogre::Vector3 velocity() const { return vel_; } + Uint32 damage() const { return damage_; } + Ogre::Real liveTime() const { return liveTime_; } + +protected: + Uint16 shotCount_; + Ogre::Vector3 pos_; + Ogre::Vector3 vel_; + Uint32 damage_; + Ogre::Real liveTime_; +}; + class MessageBodyShipAmmoHit : public MessageBodyShipBase { public: MessageBodyShipAmmoHit( Uint8 childID, Uint32 targetID, Uint8 targetChildID, Uint32 damage ) : MessageBodyShipBase( childID ), targetID_( targetID ), targetChildID_( targetChildID ), damage_( damage ) { - type_ = (Uint8)PROTO_SHIPAMMOHIT; + type_ = (Uint8)PROTO_SHIP_AMMOHIT; } MessageBodyShipAmmoHit( const char * data ) Modified: branches/ogsector/src/networkServerUser.cpp =================================================================== --- branches/ogsector/src/networkServerUser.cpp 2007-06-17 13:51:31 UTC (rev 564) +++ branches/ogsector/src/networkServerUser.cpp 2007-06-17 21:32:55 UTC (rev 565) @@ -132,21 +132,21 @@ MessageBodyChat msg( readMsg_.body() ); server_->receiveChat( this, msg ); } break; - case PROTO_SHIPREGISTER:{ + case PROTO_SHIP_REGISTER:{ MessageBodyShipRegister msg( readMsg_.body() ); server_->receiveShipRegister( this, msg ); } break; - case PROTO_SHIPDEREGISTER:{ + case PROTO_SHIP_DEREGISTER:{ MessageBodyShipDeRegister msg( readMsg_.body() ); server_->receiveShipDeRegister( this, msg ); } break; - case PROTO_SHIPSTATUS:{ + case PROTO_SHIP_STATUS:{ MessageBodyShipStatus msg( readMsg_.body() ); // if ( msg.childID() > 0 ) // LogManager::getSingleton().fatal( std::string( "PROTO_SHIPSTATUS: " ) + child( msg.childID() )->name() ); sendToRange( msg ); } break; - case PROTO_SHIPMOVEMENT:{ + case PROTO_SHIP_MOVEMENT:{ MessageBodyShipMovement msg( readMsg_.body() ); child( msg.childID() )->setPosition( msg.position() ); // if ( msg.childID() > 0 ) @@ -154,10 +154,14 @@ // " " + toStr( msg.position() ) ); sendToRange( msg ); } break; - case PROTO_SHIPAMMOHIT:{ + case PROTO_SHIP_AMMOHIT:{ MessageBodyShipAmmoHit msg( readMsg_.body() ); sendToRange( msg ); } break; + case PROTO_SHIP_PROJECTILEFIRED:{ + MessageBodyShipProjectileFired msg( readMsg_.body() ); + sendToRange( msg ); + } break; default: LogManager::getSingleton().fatal( std::string( "PROTO_UNKNOWN: " ) + toStr( (int)base.type() ) ); break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spo...@us...> - 2007-06-19 14:12:01
|
Revision: 580 http://svn.sourceforge.net/opengate/?rev=580&view=rev Author: spom_spom Date: 2007-06-19 07:12:03 -0700 (Tue, 19 Jun 2007) Log Message: ----------- changed gui filestructure, so we can use the CELayoutEditor Modified Paths: -------------- branches/ogsector/data/gui/layouts/dialogs/ConfigDialog.layout branches/ogsector/data/gui/layouts/opengateDocked.layout branches/ogsector/resources.cfg branches/ogsector/src/GameStateManager.cpp branches/ogsector/src/SectorObjects.cpp branches/ogsector/src/SectorObjects.h branches/ogsector/src/UnDockedState.cpp Added Paths: ----------- branches/ogsector/data/gui/Falagard.xsd branches/ogsector/data/gui/Falagard.xsx branches/ogsector/data/gui/GUIScheme.xsd branches/ogsector/data/gui/Imageset.xsd branches/ogsector/data/gui/fonts/ branches/ogsector/data/gui/fonts/BlueHighway-10.font branches/ogsector/data/gui/fonts/BlueHighway-12.font branches/ogsector/data/gui/fonts/BlueHighway-14.font branches/ogsector/data/gui/fonts/BlueHighway-16.font branches/ogsector/data/gui/fonts/BlueHighway-18.font branches/ogsector/data/gui/fonts/BlueHighway-8.font branches/ogsector/data/gui/fonts/BlueHighway.ttf branches/ogsector/data/gui/imagesets/ branches/ogsector/data/gui/imagesets/configMain.tga branches/ogsector/data/gui/imagesets/defaultHUD.imageset branches/ogsector/data/gui/imagesets/defaultHUD.tga branches/ogsector/data/gui/imagesets/mainBottomLeft.tga branches/ogsector/data/gui/imagesets/mainBottomMiddle.tga branches/ogsector/data/gui/imagesets/mainBottomRight.tga branches/ogsector/data/gui/imagesets/mainConsoleFrameBottomLeft.tga branches/ogsector/data/gui/imagesets/mainConsoleFrameBottomRight.tga branches/ogsector/data/gui/imagesets/mainConsoleFrameHorizontalMiddle.tga branches/ogsector/data/gui/imagesets/mainConsoleFrameHorizontalSide.tga branches/ogsector/data/gui/imagesets/mainConsoleFrameVerticalMiddle.tga branches/ogsector/data/gui/imagesets/mainConsoleFrameVerticalSide.tga branches/ogsector/data/gui/imagesets/mainLeftLogo90.tga branches/ogsector/data/gui/imagesets/mainRedLine.tga branches/ogsector/data/gui/imagesets/mainRedLineBottom.tga branches/ogsector/data/gui/imagesets/mainRedLineTop.tga branches/ogsector/data/gui/imagesets/mainTopLeft.tga branches/ogsector/data/gui/imagesets/mainTopRight.tga branches/ogsector/data/gui/imagesets/opengate.imageset branches/ogsector/data/gui/imagesets/opengate.tga branches/ogsector/data/gui/looknfeel/ branches/ogsector/data/gui/looknfeel/opengate.looknfeel branches/ogsector/data/gui/looknfeel/opengateButtons.looknfeel branches/ogsector/data/gui/looknfeel/opengateContainers.looknfeel branches/ogsector/data/gui/looknfeel/opengateLists.looknfeel branches/ogsector/data/gui/looknfeel/opengateScroll.looknfeel branches/ogsector/data/gui/looknfeel/opengateStatic.looknfeel branches/ogsector/data/gui/schemes/opengate.scheme Removed Paths: ------------- branches/ogsector/data/gui/schemes/opengate/ Added: branches/ogsector/data/gui/Falagard.xsd =================================================================== --- branches/ogsector/data/gui/Falagard.xsd (rev 0) +++ branches/ogsector/data/gui/Falagard.xsd 2007-06-19 14:12:03 UTC (rev 580) @@ -0,0 +1,383 @@ +<?xml version="1.0" ?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> + <xsd:element name="Falagard" type="falagardSpecificationType" /> + <xsd:complexType name="falagardSpecificationType"> + <xsd:sequence> + <xsd:element name="WidgetLook" type="widgetLookType" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="widgetLookType"> + <xsd:sequence> + <xsd:element name="PropertyDefinition" type="propertyDefinitionType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="PropertyLinkDefinition" type="propertyLinkDefinitionType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="Property" type="propertyType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="NamedArea" type="namedAreaType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="Child" type="widgetComponentType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="ImagerySection" type="imagerySectionType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="StateImagery" type="stateType" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="propertyDefinitionType"> + <xsd:attribute name="type" type="propertyTypeEnum" use="optional" default="Generic" /> + <xsd:attribute name="name" type="xsd:string" use="required" /> + <xsd:attribute name="initialValue" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="layoutOnWrite" type="xsd:boolean" use="optional" default="false" /> + <xsd:attribute name="redrawOnWrite" type="xsd:boolean" use="optional" default="false" /> + </xsd:complexType> + <xsd:complexType name="propertyLinkDefinitionType"> + <xsd:attribute name="type" type="propertyTypeEnum" use="optional" default="Generic" /> + <xsd:attribute name="name" type="xsd:string" use="required" /> + <xsd:attribute name="widget" type="xsd:string" use="required" /> + <xsd:attribute name="targetProperty" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="initialValue" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="layoutOnWrite" type="xsd:boolean" use="optional" default="false" /> + <xsd:attribute name="redrawOnWrite" type="xsd:boolean" use="optional" default="false" /> + </xsd:complexType> + <xsd:complexType name="namedAreaType"> + <xsd:sequence> + <xsd:element name="Area" type="componentAreaType" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="stateType"> + <xsd:sequence> + <xsd:element name="Layer" type="layerType" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + <xsd:attribute name="clipped" type="xsd:boolean" use="optional" default="true" /> + </xsd:complexType> + <xsd:complexType name="layerType"> + <xsd:sequence> + <xsd:element name="Section" type="sectionSpecType" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + <xsd:attribute name="priority" type="xsd:integer" use="optional" default="0" /> + </xsd:complexType> + <xsd:complexType name="sectionSpecType"> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element name="Colours" type="colourRectType" /> + <xsd:element name="ColourProperty" type="settingByPropertyType" /> + <xsd:element name="ColourRectProperty" type="settingByPropertyType" /> + </xsd:choice> + <xsd:attribute name="look" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="section" type="xsd:string" use="required" /> + <xsd:attribute name="controlProperty" type="xsd:string" use="optional" default="" /> + </xsd:complexType> + <xsd:complexType name="imagerySectionType"> + <xsd:sequence> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element name="Colours" type="colourRectType" /> + <xsd:element name="ColourProperty" type="settingByPropertyType" /> + <xsd:element name="ColourRectProperty" type="settingByPropertyType" /> + </xsd:choice> + <xsd:element name="FrameComponent" type="frameComponentType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="ImageryComponent" type="imageryComponentType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="TextComponent" type="textComponentType" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="frameComponentType"> + <xsd:sequence> + <xsd:element name="Area" type="componentAreaType" /> + <xsd:element name="Image" type="frameImageType" minOccurs="0" maxOccurs="9" /> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element name="Colours" type="colourRectType" /> + <xsd:element name="ColourProperty" type="settingByPropertyType" /> + <xsd:element name="ColourRectProperty" type="settingByPropertyType" /> + </xsd:choice> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element name="VertFormat" type="vertFormatType" /> + <xsd:element name="VertFormatProperty" type="settingByPropertyType" /> + </xsd:choice> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element name="HorzFormat" type="horzFormatType" /> + <xsd:element name="HorzFormatProperty" type="settingByPropertyType" /> + </xsd:choice> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="textComponentType"> + <xsd:sequence> + <xsd:element name="Area" type="componentAreaType" /> + <xsd:element name="Text" type="textStringType" minOccurs="0" maxOccurs="1" /> + <xsd:element name="TextProperty" type="textPropertyType" minOccurs="0" maxOccurs="1" /> + <xsd:element name="FontProperty" type="fontPropertyType" minOccurs="0" maxOccurs="1" /> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element name="Colours" type="colourRectType" /> + <xsd:element name="ColourProperty" type="settingByPropertyType" /> + <xsd:element name="ColourRectProperty" type="settingByPropertyType" /> + </xsd:choice> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element name="VertFormat" type="vertTextFormatType" /> + <xsd:element name="VertFormatProperty" type="settingByPropertyType" /> + </xsd:choice> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element name="HorzFormat" type="horzTextFormatType" /> + <xsd:element name="HorzFormatProperty" type="settingByPropertyType" /> + </xsd:choice> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="imageryComponentType"> + <xsd:sequence> + <xsd:element name="Area" type="componentAreaType" /> + <xsd:choice> + <xsd:element name="Image" type="imageType" /> + <xsd:element name="ImageProperty" type="settingByPropertyType" /> + </xsd:choice> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element name="Colours" type="colourRectType" /> + <xsd:element name="ColourProperty" type="settingByPropertyType" /> + <xsd:element name="ColourRectProperty" type="settingByPropertyType" /> + </xsd:choice> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element name="VertFormat" type="vertFormatType" /> + <xsd:element name="VertFormatProperty" type="settingByPropertyType" /> + </xsd:choice> + <xsd:choice minOccurs="0" maxOccurs="1"> + <xsd:element name="HorzFormat" type="horzFormatType" /> + <xsd:element name="HorzFormatProperty" type="settingByPropertyType" /> + </xsd:choice> + </xsd:sequence> + </xsd:complexType> + <xsd:complexType name="widgetComponentType"> + <xsd:sequence> + <xsd:element name="Area" type="componentAreaType" /> + <xsd:element name="VertAlignment" type="vertAlignmentType" minOccurs="0" maxOccurs="1" /> + <xsd:element name="HorzAlignment" type="horzAlignmentType" minOccurs="0" maxOccurs="1" /> + <xsd:element name="Property" type="propertyType" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + <xsd:attribute name="type" type="xsd:string" use="required" /> + <xsd:attribute name="nameSuffix" type="xsd:string" use="required" /> + <xsd:attribute name="renderer" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="look" type="xsd:string" use="optional" default="" /> + </xsd:complexType> + <xsd:complexType name="horzFormatType"> + <xsd:attribute name="type" type="horzFormatEnum" use="required" /> + </xsd:complexType> + <xsd:complexType name="vertFormatType"> + <xsd:attribute name="type" type="vertFormatEnum" use="required" /> + </xsd:complexType> + <xsd:complexType name="horzTextFormatType"> + <xsd:attribute name="type" type="horzTextFormatEnum" use="required" /> + </xsd:complexType> + <xsd:complexType name="vertTextFormatType"> + <xsd:attribute name="type" type="vertTextFormatEnum" use="required" /> + </xsd:complexType> + <xsd:complexType name="horzAlignmentType"> + <xsd:attribute name="type" type="horzAlignmentEnum" use="required" /> + </xsd:complexType> + <xsd:complexType name="vertAlignmentType"> + <xsd:attribute name="type" type="vertAlignmentEnum" use="required" /> + </xsd:complexType> + <xsd:complexType name="propertyType"> + <xsd:attribute name="name" type="xsd:string" use="required" /> + <xsd:attribute name="value" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="imageType"> + <xsd:attribute name="imageset" type="xsd:string" use="required" /> + <xsd:attribute name="image" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="frameImageType"> + <xsd:attribute name="type" type="frameImageComponentEnum" use="required" /> + <xsd:attribute name="imageset" type="xsd:string" use="required" /> + <xsd:attribute name="image" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="componentAreaType"> + <xsd:choice> + <xsd:sequence> + <xsd:element name="Dim" type="dimensionType" minOccurs="4" maxOccurs="4" /> + </xsd:sequence> + <xsd:element name="AreaProperty" type="settingByPropertyType" /> + </xsd:choice> + </xsd:complexType> + <xsd:complexType name="dimensionType"> + <xsd:choice> + <xsd:element name="UnifiedDim" type="unifiedDimType" /> + <xsd:element name="AbsoluteDim" type="absoluteDimType" /> + <xsd:element name="ImageDim" type="imageDimType" /> + <xsd:element name="WidgetDim" type="widgetDimType" /> + <xsd:element name="FontDim" type="fontDimType" /> + <xsd:element name="PropertyDim" type="propertyDimType" /> + </xsd:choice> + <xsd:attribute name="type" type="dimensionTypeEnum" use="required" /> + </xsd:complexType> + <xsd:complexType name="fontDimType"> + <xsd:sequence> + <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" /> + </xsd:sequence> + <xsd:attribute name="widget" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="font" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="string" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="type" type="fontMetricTypeEnum" use="required" /> + <xsd:attribute name="padding" type="xsd:decimal" use="optional" default="0" /> + </xsd:complexType> + <xsd:complexType name="propertyDimType"> + <xsd:sequence> + <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" /> + </xsd:sequence> + <xsd:attribute name="widget" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="unifiedDimType"> + <xsd:sequence> + <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" /> + </xsd:sequence> + <xsd:attribute name="scale" type="xsd:decimal" use="optional" default="0" /> + <xsd:attribute name="offset" type="xsd:integer" use="optional" default="0" /> + <xsd:attribute name="type" type="dimensionTypeEnum" use="required" /> + </xsd:complexType> + <xsd:complexType name="absoluteDimType"> + <xsd:sequence> + <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" /> + </xsd:sequence> + <xsd:attribute name="value" type="xsd:decimal" use="optional" default="0" /> + </xsd:complexType> + <xsd:complexType name="imageDimType"> + <xsd:sequence> + <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" /> + </xsd:sequence> + <xsd:attribute name="imageset" type="xsd:string" use="required" /> + <xsd:attribute name="image" type="xsd:string" use="required" /> + <xsd:attribute name="dimension" type="dimensionTypeEnum" use="required" /> + </xsd:complexType> + <xsd:complexType name="widgetDimType"> + <xsd:sequence> + <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" /> + </xsd:sequence> + <xsd:attribute name="widget" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="dimension" type="dimensionTypeEnum" use="required" /> + </xsd:complexType> + <xsd:complexType name="settingByPropertyType"> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="colourRectType"> + <xsd:attribute name="topLeft" type="colourValType" use="required" /> + <xsd:attribute name="topRight" type="colourValType" use="required" /> + <xsd:attribute name="bottomLeft" type="colourValType" use="required" /> + <xsd:attribute name="bottomRight" type="colourValType" use="required" /> + </xsd:complexType> + <xsd:simpleType name="colourValType"> + <xsd:restriction base="xsd:string"> + <xsd:pattern value="[a-fA-F0-9]{8}" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:complexType name="textStringType"> + <xsd:attribute name="string" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="font" type="xsd:string" use="optional" default="" /> + </xsd:complexType> + <xsd:complexType name="textPropertyType"> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="fontPropertyType"> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="dimensionOperatorType"> + <xsd:choice> + <xsd:element name="UnifiedDim" type="unifiedDimType" /> + <xsd:element name="AbsoluteDim" type="absoluteDimType" /> + <xsd:element name="ImageDim" type="imageDimType" /> + <xsd:element name="WidgetDim" type="widgetDimType" /> + <xsd:element name="FontDim" type="fontDimType" /> + <xsd:element name="PropertyDim" type="propertyDimType" /> + </xsd:choice> + <xsd:attribute name="op" type="dimensionOperatorEnum" use="required" /> + </xsd:complexType> + <xsd:simpleType name="dimensionTypeEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="LeftEdge" /> + <xsd:enumeration value="TopEdge" /> + <xsd:enumeration value="RightEdge" /> + <xsd:enumeration value="BottomEdge" /> + <xsd:enumeration value="XPosition" /> + <xsd:enumeration value="YPosition" /> + <xsd:enumeration value="Width" /> + <xsd:enumeration value="Height" /> + <xsd:enumeration value="XOffset" /> + <xsd:enumeration value="YOffset" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="vertFormatEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="TopAligned" /> + <xsd:enumeration value="CentreAligned" /> + <xsd:enumeration value="BottomAligned" /> + <xsd:enumeration value="Stretched" /> + <xsd:enumeration value="Tiled" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="horzFormatEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="LeftAligned" /> + <xsd:enumeration value="CentreAligned" /> + <xsd:enumeration value="RightAligned" /> + <xsd:enumeration value="Stretched" /> + <xsd:enumeration value="Tiled" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="vertAlignmentEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="TopAligned" /> + <xsd:enumeration value="CentreAligned" /> + <xsd:enumeration value="BottomAligned" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="horzAlignmentEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="LeftAligned" /> + <xsd:enumeration value="CentreAligned" /> + <xsd:enumeration value="RightAligned" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="horzTextFormatEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="LeftAligned" /> + <xsd:enumeration value="RightAligned" /> + <xsd:enumeration value="CentreAligned" /> + <xsd:enumeration value="Justified" /> + <xsd:enumeration value="WordWrapLeftAligned" /> + <xsd:enumeration value="WordWrapRightAligned" /> + <xsd:enumeration value="WordWrapCentreAligned" /> + <xsd:enumeration value="WordWrapJustified" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="vertTextFormatEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="TopAligned" /> + <xsd:enumeration value="BottomAligned" /> + <xsd:enumeration value="CentreAligned" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="propertyTypeEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="Generic" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="fontMetricTypeEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="LineSpacing" /> + <xsd:enumeration value="Baseline" /> + <xsd:enumeration value="HorzExtent" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="dimensionOperatorEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="Noop" /> + <xsd:enumeration value="Add" /> + <xsd:enumeration value="Subtract" /> + <xsd:enumeration value="Multiply" /> + <xsd:enumeration value="Divide" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="frameImageComponentEnum"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="Background" /> + <xsd:enumeration value="TopLeftCorner" /> + <xsd:enumeration value="TopRightCorner" /> + <xsd:enumeration value="BottomLeftCorner" /> + <xsd:enumeration value="BottomRightCorner" /> + <xsd:enumeration value="LeftEdge" /> + <xsd:enumeration value="RightEdge" /> + <xsd:enumeration value="TopEdge" /> + <xsd:enumeration value="BottomEdge" /> + </xsd:restriction> + </xsd:simpleType> +</xsd:schema> Added: branches/ogsector/data/gui/Falagard.xsx =================================================================== --- branches/ogsector/data/gui/Falagard.xsx (rev 0) +++ branches/ogsector/data/gui/Falagard.xsx 2007-06-19 14:12:03 UTC (rev 580) @@ -0,0 +1,3 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--This file is auto-generated by the XML Schema Designer. It holds layout information for components on the designer surface.--> +<XSDDesignerLayout /> \ No newline at end of file Added: branches/ogsector/data/gui/GUIScheme.xsd =================================================================== --- branches/ogsector/data/gui/GUIScheme.xsd (rev 0) +++ branches/ogsector/data/gui/GUIScheme.xsd 2007-06-19 14:12:03 UTC (rev 580) @@ -0,0 +1,54 @@ +<?xml version="1.0" ?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> + <xsd:element name="GUIScheme" type="SchemeType" /> + <xsd:complexType name="SchemeType"> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="Imageset" type="NamedDataType" /> + <xsd:element name="ImagesetFromImage" type="NamedDataType" /> + <xsd:element name="Font" type="NamedDataType" /> + <xsd:element name="LookNFeel" type="FileDataType" /> + <xsd:element name="WindowSet" type="WindowSetType" /> + <xsd:element name="WindowRendererSet" type="WindowRendererSetType" /> + <xsd:element name="WindowAlias" type="WindowAliasType" /> + <xsd:element name="FalagardMapping" type="FalagardMapType" /> + </xsd:choice> + <xsd:attribute name="Name" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="WindowSetType"> + <xsd:sequence> + <xsd:element name="WindowFactory" type="WindowFactoryType" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + <xsd:attribute name="Filename" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="WindowRendererSetType"> + <xsd:sequence> + <xsd:element name="WindowRendererFactory" type="WindowRendererFactoryType" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + <xsd:attribute name="Filename" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="FileDataType"> + <xsd:attribute name="Filename" type="xsd:string" use="required" /> + <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" /> + </xsd:complexType> + <xsd:complexType name="NamedDataType"> + <xsd:attribute name="Name" type="xsd:string" use="required" /> + <xsd:attribute name="Filename" type="xsd:string" use="required" /> + <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" /> + </xsd:complexType> + <xsd:complexType name="WindowFactoryType"> + <xsd:attribute name="Name" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="WindowRendererFactoryType"> + <xsd:attribute name="Name" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="WindowAliasType"> + <xsd:attribute name="Alias" type="xsd:string" use="required" /> + <xsd:attribute name="Target" type="xsd:string" use="required" /> + </xsd:complexType> + <xsd:complexType name="FalagardMapType"> + <xsd:attribute name="WindowType" type="xsd:string" use="required" /> + <xsd:attribute name="TargetType" type="xsd:string" use="required" /> + <xsd:attribute name="Renderer" type="xsd:string" use="required" /> + <xsd:attribute name="LookNFeel" type="xsd:string" use="required" /> + </xsd:complexType> +</xsd:schema> Added: branches/ogsector/data/gui/Imageset.xsd =================================================================== --- branches/ogsector/data/gui/Imageset.xsd (rev 0) +++ branches/ogsector/data/gui/Imageset.xsd 2007-06-19 14:12:03 UTC (rev 580) @@ -0,0 +1,28 @@ +<?xml version="1.0"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> + + <xsd:element name="Imageset" type="ImagesetType"/> + + <xsd:complexType name="ImagesetType"> + <xsd:sequence> + <xsd:element name="Image" type="ImageType" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="Imagefile" type="xsd:string" use="required"/> + <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="Name" type="xsd:string" use="required"/> + <xsd:attribute name="NativeHorzRes" type="xsd:nonNegativeInteger" use="optional" default="640" /> + <xsd:attribute name="NativeVertRes" type="xsd:nonNegativeInteger" use="optional" default="480" /> + <xsd:attribute name="AutoScaled" type="xsd:boolean" use="optional" default="false" /> + </xsd:complexType> + + <xsd:complexType name="ImageType"> + <xsd:attribute name="Name" type="xsd:string" use="required"/> + <xsd:attribute name="XPos" type="xsd:nonNegativeInteger" use="required"/> + <xsd:attribute name="YPos" type="xsd:nonNegativeInteger" use="required"/> + <xsd:attribute name="Width" type="xsd:nonNegativeInteger" use="required"/> + <xsd:attribute name="Height" type="xsd:nonNegativeInteger" use="required"/> + <xsd:attribute name="XOffset" type="xsd:integer" use="optional" default="0"/> + <xsd:attribute name="YOffset" type="xsd:integer" use="optional" default="0"/> + </xsd:complexType> + +</xsd:schema> Added: branches/ogsector/data/gui/fonts/BlueHighway-10.font =================================================================== --- branches/ogsector/data/gui/fonts/BlueHighway-10.font (rev 0) +++ branches/ogsector/data/gui/fonts/BlueHighway-10.font 2007-06-19 14:12:03 UTC (rev 580) @@ -0,0 +1,2 @@ +<?xml version="1.0" ?> +<Font Name="BlueHighway-10" Filename="BlueHighway.ttf" Type="FreeType" Size="10" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="true" /> Added: branches/ogsector/data/gui/fonts/BlueHighway-12.font =================================================================== --- branches/ogsector/data/gui/fonts/BlueHighway-12.font (rev 0) +++ branches/ogsector/data/gui/fonts/BlueHighway-12.font 2007-06-19 14:12:03 UTC (rev 580) @@ -0,0 +1,2 @@ +<?xml version="1.0" ?> +<Font Name="BlueHighway-12" Filename="BlueHighway.ttf" Type="FreeType" Size="12" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="true" /> Added: branches/ogsector/data/gui/fonts/BlueHighway-14.font =================================================================== --- branches/ogsector/data/gui/fonts/BlueHighway-14.font (rev 0) +++ branches/ogsector/data/gui/fonts/BlueHighway-14.font 2007-06-19 14:12:03 UTC (rev 580) @@ -0,0 +1,2 @@ +<?xml version="1.0" ?> +<Font Name="BlueHighway-14" Filename="BlueHighway.ttf" Type="FreeType" Size="14" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="true" /> Added: branches/ogsector/data/gui/fonts/BlueHighway-16.font =================================================================== --- branches/ogsector/data/gui/fonts/BlueHighway-16.font (rev 0) +++ branches/ogsector/data/gui/fonts/BlueHighway-16.font 2007-06-19 14:12:03 UTC (rev 580) @@ -0,0 +1,2 @@ +<?xml version="1.0" ?> +<Font Name="BlueHighway-16" Filename="BlueHighway.ttf" Type="FreeType" Size="16" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="true" /> Added: branches/ogsector/data/gui/fonts/BlueHighway-18.font =================================================================== --- branches/ogsector/data/gui/fonts/BlueHighway-18.font (rev 0) +++ branches/ogsector/data/gui/fonts/BlueHighway-18.font 2007-06-19 14:12:03 UTC (rev 580) @@ -0,0 +1,2 @@ +<?xml version="1.0" ?> +<Font Name="BlueHighway-18" Filename="BlueHighway.ttf" Type="FreeType" Size="18" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="true" /> Added: branches/ogsector/data/gui/fonts/BlueHighway-8.font =================================================================== --- branches/ogsector/data/gui/fonts/BlueHighway-8.font (rev 0) +++ branches/ogsector/data/gui/fonts/BlueHighway-8.font 2007-06-19 14:12:03 UTC (rev 580) @@ -0,0 +1,2 @@ +<?xml version="1.0" ?> +<Font Name="BlueHighway-8" Filename="BlueHighway.ttf" Type="FreeType" Size="8" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="true" /> Added: branches/ogsector/data/gui/fonts/BlueHighway.ttf =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/fonts/BlueHighway.ttf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/data/gui/imagesets/configMain.tga =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/imagesets/configMain.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/data/gui/imagesets/defaultHUD.imageset =================================================================== --- branches/ogsector/data/gui/imagesets/defaultHUD.imageset (rev 0) +++ branches/ogsector/data/gui/imagesets/defaultHUD.imageset 2007-06-19 14:12:03 UTC (rev 580) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Imageset Name="opengateHUD" Imagefile="defaultHUD.tga"> + <Image Name="FlightCurser" XPos="3" YPos="4" Width="20" Height="20" /> + <Image Name="Center" XPos="0" YPos="30" Width="40" Height="40" /> + <Image Name="TargetCurser" XPos="0" YPos="71" Width="40" Height="40" /> + <Image Name="PilotFlightCurser" XPos="26" YPos="4" Width="20" Height="20" /> + <Image Name="TargetFlightCurser" XPos="45" YPos="71" Width="40" Height="40" /> + <Image Name="GreenShieldLeft" XPos="4" YPos="135" Width="98" Height="280" /> + <Image Name="Velocity" XPos="170" YPos="55" Width="40" Height="146" /> + <Image Name="Capacitor" XPos="213" YPos="55" Width="40" Height="146" /> + <Image Name="CenterUp" XPos="276" YPos="88" Width="162" Height="50" /> + <Image Name="CenterDown" XPos="276" YPos="37" Width="162" Height="50" /> + <Image Name="Thrust" XPos="444" YPos="14" Width="27" Height="124" /> + <Image Name="Fuel" XPos="481" YPos="14" Width="27" Height="124" /> + <Image Name="ArmorRight" XPos="432" YPos="138" Width="39" Height="149" /> + <Image Name="ArmorLeft" XPos="472" YPos="138" Width="39" Height="149" /> + <Image Name="ShieldLeft" XPos="334" YPos="139" Width="48" Height="160" /> + <Image Name="ShieldRight" XPos="384" YPos="139" Width="48" Height="160" /> +</Imageset> Added: branches/ogsector/data/gui/imagesets/defaultHUD.tga =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/imagesets/defaultHUD.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/data/gui/imagesets/mainBottomLeft.tga =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/imagesets/mainBottomLeft.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/data/gui/imagesets/mainBottomMiddle.tga =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/imagesets/mainBottomMiddle.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/data/gui/imagesets/mainBottomRight.tga =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/imagesets/mainBottomRight.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/data/gui/imagesets/mainConsoleFrameBottomLeft.tga =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/imagesets/mainConsoleFrameBottomLeft.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/data/gui/imagesets/mainConsoleFrameBottomRight.tga =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/imagesets/mainConsoleFrameBottomRight.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/data/gui/imagesets/mainConsoleFrameHorizontalMiddle.tga =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/imagesets/mainConsoleFrameHorizontalMiddle.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/data/gui/imagesets/mainConsoleFrameHorizontalSide.tga =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/imagesets/mainConsoleFrameHorizontalSide.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/data/gui/imagesets/mainConsoleFrameVerticalMiddle.tga =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/imagesets/mainConsoleFrameVerticalMiddle.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/data/gui/imagesets/mainConsoleFrameVerticalSide.tga =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/imagesets/mainConsoleFrameVerticalSide.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/data/gui/imagesets/mainLeftLogo90.tga =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/imagesets/mainLeftLogo90.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/data/gui/imagesets/mainRedLine.tga =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/imagesets/mainRedLine.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/data/gui/imagesets/mainRedLineBottom.tga =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/imagesets/mainRedLineBottom.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/data/gui/imagesets/mainRedLineTop.tga =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/imagesets/mainRedLineTop.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/data/gui/imagesets/mainTopLeft.tga =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/imagesets/mainTopLeft.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/data/gui/imagesets/mainTopRight.tga =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/gui/imagesets/mainTopRight.tga ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/data/gui/imagesets/opengate.imageset =================================================================== --- branches/ogsector/data/gui/imagesets/opengate.imageset (rev 0) +++ branches/ogsector/data/gui/imagesets/opengate.imageset 2007-06-19 14:12:03 UTC (rev 580) @@ -0,0 +1,428 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Imageset Name="opengate" Imagefile="opengate.tga"> + <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="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="StaticGreenTopLeft" XPos="301" YPos="151" Width="31" Height="31" /> + <Image Name="StaticGreenTop" XPos="340" YPos="151" Width="20" Height="31" /> + <Image Name="StaticGreenTopRight" XPos="369" YPos="151" Width="31" Height="31" /> + <Image Name="StaticGreenLeft" XPos="301" YPos="185" Width="31" Height="20" /> + <Image Name="StaticGreenBackdrop" XPos="350" YPos="200" Width="2" Height="2" /> + <Image Name="StaticGreenRight" XPos="369" YPos="185" Width="31" Height="20" /> + <Image Name="StaticGreenBottomLeft" XPos="302" YPos="219" Width="31" Height="31" /> + <Image Name="StaticGreenBottom" XPos="335" YPos="219" Width="20" Height="31" /> + <Image Name="StaticGreenBottomRight" XPos="369" YPos="219" Width="31" Height="31" /> + <Image Name="StaticGreenHorizLine" XPos="340" YPos="151" Width="20" Height="1" /> + <Image Name="StaticGreenVertLine" XPos="301" YPos="185" Width="1" Height="20" /> + + <Image Name="StaticBlueTopLeft" XPos="400" YPos="151" Width="6" Height="6" /> + <Image Name="StaticBlueTop" XPos="410" YPos="151" Width="6" Height="6" /> + <Image Name="StaticBlueTopRight" XPos="424" YPos="151" Width="6" Height="6" /> + <Image Name="StaticBlueLeft" XPos="400" YPos="161" Width="6" Height="6" /> + <Image Name="StaticBlueBackdrop" XPos="411" YPos="162" Width="2" Height="2" /> + <Image Name="StaticBlueRight" XPos="424" YPos="161" Width="6" Height="6" /> + <Image Name="StaticBlueBottomLeft" XPos="400" YPos="175" Width="6" Height="6" /> + <Image Name="StaticBlueBottom" XPos="410" YPos="175" Width="6" Height="6" /> + <Image Name="StaticBlueBottomRight" XPos="424" YPos="175" Width="6" Height="6" /> + + <Image Name="IconCommodityNormal" XPos="142" YPos="256" Width="15" Height="15" /> + <Image Name="IconCommodityHover" XPos="142" YPos="272" Width="15" Height="15" /> + <Image Name="IconCommodity0" XPos="142" YPos="288" Width="15" Height="15" /> + <Image Name="IconCommodity1" XPos="142" YPos="304" Width="15" Height="15" /> + <Image Name="IconCommodity2" XPos="142" YPos="320" Width="15" Height="15" /> + <Image Name="IconCommodity3" XPos="142" YPos="336" Width="15" Height="15" /> + <Image Name="IconPowerplantNormal" XPos="158" YPos="256" Width="15" Height="15" /> + <Image Name="IconPowerplantHover" XPos="158" YPos="272" Width="15" Height="15" /> + <Image Name="IconPowerplant0" XPos="158" YPos="288" Width="15" Height="15" /> + <Image Name="IconPowerplant1" XPos="158" YPos="304" Width="15" Height="15" /> + <Image Name="IconPowerplant2" XPos="158" YPos="320" Width="15" Height="15" /> + <Image Name="IconPowerplant3" XPos="158" YPos="336" Width="15" Height="15" /> + <Image Name="IconEngineNormal" XPos="174" YPos="256" Width="16" Height="15" /> + <Image Name="IconEngineHover" XPos="174" YPos="272" Width="16" Height="15" /> + <Image Name="IconEngine0" XPos="174" YPos="288" Width="15" Height="15" /> + <Image Name="IconEngine1" XPos="174" YPos="304" Width="15" Height="15" /> + <Image Name="IconEngine2" XPos="174" YPos="320" Width="15" Height="15" /> + <Image Name="IconEngine3" XPos="174" YPos="336" Width="15" Height="15" /> + <Image Name="IconRadarNormal" XPos="190" YPos="256" Width="15" Height="15" /> + <Image Name="IconRadarHover" XPos="190" YPos="272" Width="15" Height="15" /> + <Image Name="IconRadar0" XPos="190" YPos="288" Width="15" Height="15" /> + <Image Name="IconRadar1" XPos="190" YPos="304" Width="15" Height="15" /> + <Image Name="IconRadar2" XPos="190" YPos="320" Width="15" Height="15" /> + <Image Name="IconRadar3" XPos="190" YPos="336" Width="15" Height="15" /> + <Image Name="IconECMNormal" XPos="206" YPos="256" Width="15" Height="15" /> + <Image Name="IconECMHover" XPos="206" YPos="272" Width="15" Height="15" /> + <Image Name="IconECM0" XPos="206" YPos="288" Width="15" Height="15" /> + <Image Name="IconECM1" XPos="206" YPos="304" Width="15" Height="15" /> + <Image Name="IconECM2" XPos="206" YPos="320" Width="15" Height="15" /> + <Image Name="IconECM3" XPos="206" YPos="336" Width="15" Height="15" /> + <Image Name="IconCapacitorNormal" XPos="222" YPos="256" Width="15" Height="15" /> + <Image Name="IconCapacitorHover" XPos="222" YPos="272" Width="15" Height="15" /> + <Image Name="IconCapacitor0" XPos="222" YPos="288" Width="15" Height="15" /> + <Image Name="IconCapacitor1" XPos="222" YPos="304" Width="15" Height="15" /> + <Image Name="IconCapacitor2" XPos="222" YPos="320" Width="15" Height="15" /> + <Image Name="IconCapacitor3" XPos="222" YPos="336" Width="15" Height="15" /> + <Image Name="IconShieldNormal" XPos="238" YPos="256" Width="15" Height="15" /> + <Image Name="IconShieldHover" XPos="238" YPos="272" Width="15" Height="15" /> + <Image Name="IconShield0" XPos="238" YPos="288" Width="15" Height="15" /> + <Image Name="IconShield1" XPos="238" YPos="304" Width="15" Height="15" /> + <Image Name="IconShield2" XPos="238" YPos="320" Width="15" Height="15" /> + <Image Name="IconShield3" XPos="238" YPos="336" Width="15" Height="15" /> + <Image Name="IconGunNormal" XPos="254" YPos="256" Width="15" Height="15" /> + <Image Name="IconGunHover" XPos="254" YPos="272" Width="15" Height="15" /> + <Image Name="IconGun0" XPos="254" YPos="288" Width="15" Height="15" /> + <Image Name="IconGun1" XPos="254" YPos="304" Width="15" Height="15" /> + <Image Name="IconGun2" XPos="254" YPos="320" Width="15" Height="15" /> + <Image Name="IconGun3" XPos="254" YPos="336" Width="15" Height="15" /> + <Image Name="IconMissileNormal" XPos="270" YPos="256" Width="15" Height="15" /> + <Image Name="IconMissileHover" XPos="270" YPos="272" Width="15" Height="15" /> + <Image Name="IconMissile0" XPos="270" YPos="288" Width="15" Height="15" /> + <Image Name="IconMissile1" XPos="270" YPos="304" Width="15" Height="15" /> + <Image Name="IconMissile2" XPos="270" YPos="320" Width="15" Height="15" /> + <Image Name="IconMissile3" XPos="270" YPos="336" Width="15" Height="15" /> + <Image Name="IconMODxNormal" XPos="286" YPos="256" Width="15" Height="15" /> + <Image Name="IconMODxHover" XPos="286" YPos="272" Width="15" Height="15" /> + <Image Name="IconMODx0" XPos="286" YPos="288" Width="15" Height="15" /> + <Image Name="IconMODx1" XPos="286" YPos="304" Width="15" Height="15" /> + <Image Name="IconMODx2" XPos="286" YPos="320" Width="15" Height="15" /> + <Image Name="IconMODx3" XPos="286" YPos="336" Width="15" Height="15" /> + <Image Name="IconStorageNormal" XPos="410" YPos="256" Width="15" Height="15" /> + <Image Name="IconStorageHover" XPos="426" YPos="256" Width="15" Height="15" /> + + <Image Name="IconSize1" XPos="473" YPos="223" Width="12" Height="26" /> + <Image Name="IconSize2" XPos="460" YPos="223" Width="12" Height="26" /> + <Image Name="IconSize3" XPos="447" YPos="223" Width="12" Height="26" /> + <Image Name="IconSize4" XPos="499" YPos="250" Width="12" Height="26" /> + <Image Name="IconSize5" XPos="486" YPos="250" Width="12" Height="26" /> + <Image Name="IconSize6" XPos="473" YPos="250" Width="12" Height="26" /> + <Image Name="IconSize7" XPos="460" YPos="250" Width="12" Height="26" /> + <Image Name="IconSize8" XPos="447" YPos="250" Width="12" Height="26" /> + + <Image Name="MarketItemShortInfoNormal" XPos="302" YPos="256" Width="98" Height="106" /> + <Image Name="MarketItemShortInfoHover" XPos="302" YPos="364" Width="98" Height="106" /> + + <Image Name="MarketItemSortFrameNormal" XPos="410" YPos="182" Width="16" Height="16" /> + <Image Name="MarketItemSortFrameHover" XPos="410" YPos="199" Width="16" Height="16" /> + <Image Name="MarketItemSortHighlight" XPos="478" YPos="312" Width="16" Height="16" /> + + <Image Name="MarketItemSortAlphaAscendNormal" XPos="410" YPos="278" Width="16" Height="16" /> + <Image Name="MarketItemSortAlphaAscendHover" XPos="410" YPos="295" Width="16" Height="16" /> + <Image Name="MarketItemSortAlphaDescendNormal" XPos="427" YPos="278" Width="16" Height="16" /> + <Image Name="MarketItemSortAlphaDescendHover" XPos="427" YPos="295" Width="16" Height="16" /> + <Image Name="MarketItemSortCostNormal" XPos="444" YPos="278" Width="16" Height="16" /> + <Image Name="MarketItemSortCostHover" XPos="444" YPos="295" Width="16" Height="16" /> + <Image Name="MarketItemSortSizeAscendNormal" XPos="461" YPos="278" Width="16" Height="16" /> + <Image Name="MarketItemSortSizeAscendHover" XPos="461" YPos="295" Width="16" Height="16" /> + <Image Name="MarketItemSortSizeDescendNormal" XPos="478" YPos="278" Width="16" Height="16" /> + <Image Name="MarketItemSortSizeDescendHover" XPos="478" YPos="295" Width="16" Height="16" /> + <Image Name="MarketItemSortRankNormal" XPos="495" YPos="278" Width="16" Height="16" /> + <Image Name="MarketItemSortRankHover" XPos="495" YPos="295" Width="16" Height="16" /> + <Image Name="MarketItemSortAmountAscendNormal" XPos="410" YPos="312" Width="16" Height="16" /> + <Image Name="MarketItemSortAmountAscendHover" XPos="410" YPos="329" Width="16" Height="16" /> + <Image Name="MarketItemSortAmountDescendNormal" XPos="427" YPos="312" Width="16" Height="16" /> + <Image Name="MarketItemSortAmountDescendHover" XPos="427" YPos="329" Width="16" Height="16" /> + <Image Name="MarketItemSortAscendNormal" XPos="444" YPos="312" Width="16" Height="16" /> + <Image Name="MarketItemSortAscendHover" XPos="444" YPos="329" Width="16" Height="16" /> + <Image Name="MarketItemSortDescendNormal" XPos="461" YPos="312" Width="16" Height="16" /> + <Image Name="MarketItemSortDescendHover" XPos="461" YPos="329" Width="16" Height="16" /> + <Image Name="MarketItemSortShowAllNormal" XPos="410" YPos="346" Width="61" Height="16" /> + <Image Name="MarketItemSortShowAllHover" XPos="410" YPos="363" Width="61" Height="16" /> + <Image Name="MarketItemSortShowAllHighlight" XPos="410" YPos="380" Width="61" Height="16" /> + + <Image Name="MarketDecrease1Normal" XPos="431" YPos="85" Width="22" Height="17" /> + <Image Name="MarketDecrease1Hover" XPos="454" YPos="85" Width="22" Height="17" /> + <Image Name="MarketDecrease1Pushed" XPos="477" YPos="85" Width="22" Height="17" /> + <Image Name="MarketDecrease10Normal" XPos="431" YPos="103" Width="22" Height="17" /> + <Image Name="MarketDecrease10Hover" XPos="454" YPos="103" Width="22" Height="17" /> + <Image Name="MarketDecrease10Pushed" XPos="477" YPos="103" Width="22" Height="17" /> + <Image Name="MarketDecrease100Normal" XPos="431" YPos="121" Width="22" Height="17" /> + <Image Name="MarketDecrease100Hover" XPos="454" YPos="121" Width="22" Height="17" /> + <Image Name="MarketDecrease100Pushed" XPos="477" YPos="121" Width="22" Height="17" /> + <Image Name="MarketIncrease1Normal" XPos="431" YPos="139" Width="22" Height="17" /> + <Image Name="MarketIncrease1Hover" XPos="454" YPos="139" Width="22" Height="17" /> + <Image Name="MarketIncrease1Pushed" XPos="477" YPos="139" Width="22" Height="17" /> + <Image Name="MarketIncrease10Normal" XPos="431" YPos="157" Width="22" Height="17" /> + <Image Name="MarketIncrease10Hover" XPos="454" YPos="157" Width="22" Height="17" /> + <Image Name="MarketIncrease10Pushed" XPos="477" YPos="157" Width="22" Height="17" /> + <Image Name="MarketIncrease100Normal" XPos="431" YPos="175" Width="22" Height="17" /> + <Image Name="MarketIncrease100Hover" XPos="454" YPos="175" Width="22" Height="17" /> + <Image Name="MarketIncrease100Pushed" XPos="477" YPos="175" Width="22" Height="17" /> + <Image Name="MarketSellAllNormal" XPos="431" YPos="193" Width="22" Height="17" /> + <Image Name="MarketSellAllHover" XPos="454" YPos="193" Width="22" Height="17" /> + <Image Name="MarketSellAllPushed" XPos="477" YPos="193" Width="22" Height="17" /> + + <Image Name="ShipConfigEquipmentItemWindowNormal" XPos="1" YPos="405" Width="121" Height="106" /> + <Image Name="ShipConfigEquipmentItemWindowHover" XPos="123" YPos="405" Width="121" Height="106" /> + <Image Name="ShipConfigEquipmentLoadBlue" XPos="245" YPos="405" Width="28" Height="21" /> + <Image Name="ShipConfigEquipmentLoadGreen" XPos="245" YPos="426" Width="28" Height="21" /> + <Image Name="ShipConfigEquipmentLoadRed" XPos="245" YPos="447" Width="28" Height="21" /> + <Image Name="ShipConfigEquipmentRightArrow" XPos="245" YPos="468" Width="14" Height="12" /> + <Image Name="ShipConfigEquipmentLeftArrow" XPos="245" YPos="481" Width="14" Height="12" /> + <Image Name="ShipConfigEquipmentPrevItemNormal" XPos="274" YPos="405" Width="11" Height="21" /> + <Image Name="ShipConfigEquipmentPrevItemHover" XPos="274" YPos="427" Width="11" Height="21" /> + <Image Name="ShipConfigEquipmentNextItemNormal" XPos="286" YPos="405" Width="11" Height="21" /> + <Image Name="ShipConfigEquipmentNextItemHover" XPos="286" YPos="427" Width="11" Height="21" /> + + + + <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" /> + <Image Name="AltProgressHalf" XPos="10" YPos="10" Width="10" Height="10" /> + <Image Name="AltProgressLight1" XPos="10" YPos="10" Width="10" Height="10" /> + <Image Name="AltProgressLight10" XPos="10" YPos="10" Width="10" Height="10" /> + <Image Name="AltProgressLight2" XPos="10" YPos="10" Width="10" Height="10" /> + <Image Name="AltProgressLight3" XPos="10" YPos="10" Width="10" Height="10" /> + <Image Name="AltProgressLight4" XPos="10" YPos="10" Width="10" Height="10" /> + <Image Name="AltProgressLight5" XPos="10" YPos="10" Width="10" Height="10" /> + <Image Name="AltProgressLight6" XPos="10" YPos="10" Width="10" Height="10" /> + <Image Name="AltProgressLight7" XPos="10" YPos="10" Width="10" Height="10" /> + <Image Name="AltProgressLight8" XPos="10" YPos="10" Width="10" Height="10" /> + <Image Name="AltProgressLight9" XPos="10" YPos="10" Width="10" Height="10" /> + <Image Name="AltProgressQuarter" XPos="10" YPos="10" Width="10" Height="10" /> + <Image Name="ButtonLeftHighlight" XPos="91" YPos="9" Width="8" Height="26" /> + <Image Name="ButtonMiddleHighlight" XPos="97" YPos="9" Width="5" Height="26" /> + <Image Name="ButtonRightHighlight" XPos="100" YPos="9" Width="8" Height="26" /> + <Image Name="ButtonLeftNormal" XPos="73" YPos="9" Width="8" Height="26" /> + <Image Name="ButtonMiddleNormal" XPos="82" YPos="9" Width="2" Height="26" /> + <Image Name="ButtonRightNormal" XPos="82" YPos="9" Width="8" Height="26" /> + <Image Name="ButtonLeftPushed" XPos="109" YPos="9" Width="8" Height="26" /> + <Image Name="ButtonMiddlePushed" XPos="115" YPos="9" Width="4" Height="26" /> + <Image Name="ButtonRightPushed" XPos="118" YPos="9" Width="8" Height="26" /> + <Image Name="CheckboxHover" XPos="100" YPos="79" Width="12" Height="12" /> + <Image Name="CheckboxMark" XPos="119" YPos="79" Width="12" Height="12" /> + <Image Name="CheckboxNormal" XPos="77" YPos="79" Width="12" Height="12" /> + <Image Name="ClientBrush" XPos="20" YPos="34" Width="29" Height="22" /> + <Image Name="CloseButtonHover" XPos="35" YPos="166" Width="14" Height="14" /> + <Image Name="CloseButtonNormal" XPos="20" YPos="166" Width="14" Height="14" /> + <Image Name="CloseButtonPressed" XPos="50" YPos="166" Width="14" Height="14" /> + <Image Name="ComboboxDividerLeft" XPos="10" YPos="10" Width="10" Height="10" /> + <Image Name="ComboboxDividerMiddle" XPos="20" YPos="10" Width="10" Height="10" /> + <Image Name="ComboboxDividerRight" XPos="30" YPos="10" Width="10" Height="10" /> + <Image Name="ComboboxEditLeft" XPos="153" YPos="11" Width="7" Height="23" /> + <Image Name="ComboboxEditMiddle" XPos="164" YPos="11" Width="8" Height="23" /> +... [truncated message content] |
From: <spo...@us...> - 2007-06-19 14:22:23
|
Revision: 581 http://svn.sourceforge.net/opengate/?rev=581&view=rev Author: spom_spom Date: 2007-06-19 07:22:24 -0700 (Tue, 19 Jun 2007) Log Message: ----------- delete some unused file Modified Paths: -------------- branches/ogsector/win32/ogsectorclient/resources.cfg Added Paths: ----------- branches/ogsector/data/gui/GUILayout.xsd Removed Paths: ------------- branches/ogsector/data/gui/layouts/GUILayout.xsd branches/ogsector/data/gui/schemes/Falagard.xsd branches/ogsector/data/gui/schemes/Falagard.xsx branches/ogsector/data/gui/schemes/Font.xsd branches/ogsector/data/gui/schemes/GUIScheme.xsd branches/ogsector/data/gui/schemes/Imageset.xsd Added: branches/ogsector/data/gui/GUILayout.xsd =================================================================== --- branches/ogsector/data/gui/GUILayout.xsd (rev 0) +++ branches/ogsector/data/gui/GUILayout.xsd 2007-06-19 14:22:24 UTC (rev 581) @@ -0,0 +1,63 @@ +<?xml version="1.0"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> + + <xsd:element name="GUILayout" type="GUILayoutType"/> + + <xsd:complexType name="GUILayoutType"> + <xsd:sequence> + <xsd:element name="Window" type="WindowType" /> + </xsd:sequence> + <xsd:attribute name="Parent" type="xsd:string" use="optional" default=""/> + </xsd:complexType> + + <xsd:complexType name="WindowType"> + <xsd:sequence> + <xsd:element name="LayoutImport" type="LayoutImportType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="Event" type="EventType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="Window" type="WindowType" /> + <xsd:element name="AutoWindow" type="AutoWindowType" /> + </xsd:choice> + <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + <xsd:attribute name="Type" type="xsd:string" use="required"/> + <xsd:attribute name="Name" type="xsd:string" use="optional" default="" /> + </xsd:complexType> + + <xsd:complexType name="AutoWindowType"> + <xsd:sequence> + <xsd:element name="LayoutImport" type="LayoutImportType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:element name="Event" type="EventType" minOccurs="0" maxOccurs="unbounded" /> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="Window" type="WindowType" /> + <xsd:element name="AutoWindow" type="AutoWindowType" /> + </xsd:choice> + <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" /> + </xsd:sequence> + <xsd:attribute name="NameSuffix" type="xsd:string" use="required"/> + </xsd:complexType> + + <xsd:complexType name="PropertyType"> + <xsd:simpleContent> + <xsd:extension base="xsd:string"> + <xsd:attribute name="Name" type="xsd:string" use="required"/> + <xsd:attribute name="Value" type="xsd:string" use="optional"/> + </xsd:extension> + </xsd:simpleContent> + </xsd:complexType> + + <xsd:complexType name="LayoutImportType"> + <xsd:attribute name="Filename" type="xsd:string" use="required"/> + <xsd:attribute name="Prefix" type="xsd:string" use="optional" default="" /> + <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" /> + </xsd:complexType> + + <xsd:complexType name="EventType"> + <xsd:attribute name="Name" type="xsd:string" use="required"/> + <xsd:attribute name="Function" type="xsd:string" use="required"/> + </xsd:complexType> + +</xsd:schema> + Deleted: branches/ogsector/data/gui/layouts/GUILayout.xsd =================================================================== --- branches/ogsector/data/gui/layouts/GUILayout.xsd 2007-06-19 14:12:03 UTC (rev 580) +++ branches/ogsector/data/gui/layouts/GUILayout.xsd 2007-06-19 14:22:24 UTC (rev 581) @@ -1,63 +0,0 @@ -<?xml version="1.0"?> -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> - - <xsd:element name="GUILayout" type="GUILayoutType"/> - - <xsd:complexType name="GUILayoutType"> - <xsd:sequence> - <xsd:element name="Window" type="WindowType" /> - </xsd:sequence> - <xsd:attribute name="Parent" type="xsd:string" use="optional" default=""/> - </xsd:complexType> - - <xsd:complexType name="WindowType"> - <xsd:sequence> - <xsd:element name="LayoutImport" type="LayoutImportType" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element name="Event" type="EventType" minOccurs="0" maxOccurs="unbounded" /> - <xsd:choice minOccurs="0" maxOccurs="unbounded"> - <xsd:element name="Window" type="WindowType" /> - <xsd:element name="AutoWindow" type="AutoWindowType" /> - </xsd:choice> - <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="Type" type="xsd:string" use="required"/> - <xsd:attribute name="Name" type="xsd:string" use="optional" default="" /> - </xsd:complexType> - - <xsd:complexType name="AutoWindowType"> - <xsd:sequence> - <xsd:element name="LayoutImport" type="LayoutImportType" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element name="Event" type="EventType" minOccurs="0" maxOccurs="unbounded" /> - <xsd:choice minOccurs="0" maxOccurs="unbounded"> - <xsd:element name="Window" type="WindowType" /> - <xsd:element name="AutoWindow" type="AutoWindowType" /> - </xsd:choice> - <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="NameSuffix" type="xsd:string" use="required"/> - </xsd:complexType> - - <xsd:complexType name="PropertyType"> - <xsd:simpleContent> - <xsd:extension base="xsd:string"> - <xsd:attribute name="Name" type="xsd:string" use="required"/> - <xsd:attribute name="Value" type="xsd:string" use="optional"/> - </xsd:extension> - </xsd:simpleContent> - </xsd:complexType> - - <xsd:complexType name="LayoutImportType"> - <xsd:attribute name="Filename" type="xsd:string" use="required"/> - <xsd:attribute name="Prefix" type="xsd:string" use="optional" default="" /> - <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" /> - </xsd:complexType> - - <xsd:complexType name="EventType"> - <xsd:attribute name="Name" type="xsd:string" use="required"/> - <xsd:attribute name="Function" type="xsd:string" use="required"/> - </xsd:complexType> - -</xsd:schema> - Deleted: branches/ogsector/data/gui/schemes/Falagard.xsd =================================================================== --- branches/ogsector/data/gui/schemes/Falagard.xsd 2007-06-19 14:12:03 UTC (rev 580) +++ branches/ogsector/data/gui/schemes/Falagard.xsd 2007-06-19 14:22:24 UTC (rev 581) @@ -1,383 +0,0 @@ -<?xml version="1.0" ?> -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> - <xsd:element name="Falagard" type="falagardSpecificationType" /> - <xsd:complexType name="falagardSpecificationType"> - <xsd:sequence> - <xsd:element name="WidgetLook" type="widgetLookType" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - </xsd:complexType> - <xsd:complexType name="widgetLookType"> - <xsd:sequence> - <xsd:element name="PropertyDefinition" type="propertyDefinitionType" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element name="PropertyLinkDefinition" type="propertyLinkDefinitionType" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element name="Property" type="propertyType" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element name="NamedArea" type="namedAreaType" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element name="Child" type="widgetComponentType" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element name="ImagerySection" type="imagerySectionType" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element name="StateImagery" type="stateType" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - <xsd:complexType name="propertyDefinitionType"> - <xsd:attribute name="type" type="propertyTypeEnum" use="optional" default="Generic" /> - <xsd:attribute name="name" type="xsd:string" use="required" /> - <xsd:attribute name="initialValue" type="xsd:string" use="optional" default="" /> - <xsd:attribute name="layoutOnWrite" type="xsd:boolean" use="optional" default="false" /> - <xsd:attribute name="redrawOnWrite" type="xsd:boolean" use="optional" default="false" /> - </xsd:complexType> - <xsd:complexType name="propertyLinkDefinitionType"> - <xsd:attribute name="type" type="propertyTypeEnum" use="optional" default="Generic" /> - <xsd:attribute name="name" type="xsd:string" use="required" /> - <xsd:attribute name="widget" type="xsd:string" use="required" /> - <xsd:attribute name="targetProperty" type="xsd:string" use="optional" default="" /> - <xsd:attribute name="initialValue" type="xsd:string" use="optional" default="" /> - <xsd:attribute name="layoutOnWrite" type="xsd:boolean" use="optional" default="false" /> - <xsd:attribute name="redrawOnWrite" type="xsd:boolean" use="optional" default="false" /> - </xsd:complexType> - <xsd:complexType name="namedAreaType"> - <xsd:sequence> - <xsd:element name="Area" type="componentAreaType" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - <xsd:complexType name="stateType"> - <xsd:sequence> - <xsd:element name="Layer" type="layerType" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - <xsd:attribute name="clipped" type="xsd:boolean" use="optional" default="true" /> - </xsd:complexType> - <xsd:complexType name="layerType"> - <xsd:sequence> - <xsd:element name="Section" type="sectionSpecType" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="priority" type="xsd:integer" use="optional" default="0" /> - </xsd:complexType> - <xsd:complexType name="sectionSpecType"> - <xsd:choice minOccurs="0" maxOccurs="1"> - <xsd:element name="Colours" type="colourRectType" /> - <xsd:element name="ColourProperty" type="settingByPropertyType" /> - <xsd:element name="ColourRectProperty" type="settingByPropertyType" /> - </xsd:choice> - <xsd:attribute name="look" type="xsd:string" use="optional" default="" /> - <xsd:attribute name="section" type="xsd:string" use="required" /> - <xsd:attribute name="controlProperty" type="xsd:string" use="optional" default="" /> - </xsd:complexType> - <xsd:complexType name="imagerySectionType"> - <xsd:sequence> - <xsd:choice minOccurs="0" maxOccurs="1"> - <xsd:element name="Colours" type="colourRectType" /> - <xsd:element name="ColourProperty" type="settingByPropertyType" /> - <xsd:element name="ColourRectProperty" type="settingByPropertyType" /> - </xsd:choice> - <xsd:element name="FrameComponent" type="frameComponentType" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element name="ImageryComponent" type="imageryComponentType" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element name="TextComponent" type="textComponentType" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - <xsd:complexType name="frameComponentType"> - <xsd:sequence> - <xsd:element name="Area" type="componentAreaType" /> - <xsd:element name="Image" type="frameImageType" minOccurs="0" maxOccurs="9" /> - <xsd:choice minOccurs="0" maxOccurs="1"> - <xsd:element name="Colours" type="colourRectType" /> - <xsd:element name="ColourProperty" type="settingByPropertyType" /> - <xsd:element name="ColourRectProperty" type="settingByPropertyType" /> - </xsd:choice> - <xsd:choice minOccurs="0" maxOccurs="1"> - <xsd:element name="VertFormat" type="vertFormatType" /> - <xsd:element name="VertFormatProperty" type="settingByPropertyType" /> - </xsd:choice> - <xsd:choice minOccurs="0" maxOccurs="1"> - <xsd:element name="HorzFormat" type="horzFormatType" /> - <xsd:element name="HorzFormatProperty" type="settingByPropertyType" /> - </xsd:choice> - </xsd:sequence> - </xsd:complexType> - <xsd:complexType name="textComponentType"> - <xsd:sequence> - <xsd:element name="Area" type="componentAreaType" /> - <xsd:element name="Text" type="textStringType" minOccurs="0" maxOccurs="1" /> - <xsd:element name="TextProperty" type="textPropertyType" minOccurs="0" maxOccurs="1" /> - <xsd:element name="FontProperty" type="fontPropertyType" minOccurs="0" maxOccurs="1" /> - <xsd:choice minOccurs="0" maxOccurs="1"> - <xsd:element name="Colours" type="colourRectType" /> - <xsd:element name="ColourProperty" type="settingByPropertyType" /> - <xsd:element name="ColourRectProperty" type="settingByPropertyType" /> - </xsd:choice> - <xsd:choice minOccurs="0" maxOccurs="1"> - <xsd:element name="VertFormat" type="vertTextFormatType" /> - <xsd:element name="VertFormatProperty" type="settingByPropertyType" /> - </xsd:choice> - <xsd:choice minOccurs="0" maxOccurs="1"> - <xsd:element name="HorzFormat" type="horzTextFormatType" /> - <xsd:element name="HorzFormatProperty" type="settingByPropertyType" /> - </xsd:choice> - </xsd:sequence> - </xsd:complexType> - <xsd:complexType name="imageryComponentType"> - <xsd:sequence> - <xsd:element name="Area" type="componentAreaType" /> - <xsd:choice> - <xsd:element name="Image" type="imageType" /> - <xsd:element name="ImageProperty" type="settingByPropertyType" /> - </xsd:choice> - <xsd:choice minOccurs="0" maxOccurs="1"> - <xsd:element name="Colours" type="colourRectType" /> - <xsd:element name="ColourProperty" type="settingByPropertyType" /> - <xsd:element name="ColourRectProperty" type="settingByPropertyType" /> - </xsd:choice> - <xsd:choice minOccurs="0" maxOccurs="1"> - <xsd:element name="VertFormat" type="vertFormatType" /> - <xsd:element name="VertFormatProperty" type="settingByPropertyType" /> - </xsd:choice> - <xsd:choice minOccurs="0" maxOccurs="1"> - <xsd:element name="HorzFormat" type="horzFormatType" /> - <xsd:element name="HorzFormatProperty" type="settingByPropertyType" /> - </xsd:choice> - </xsd:sequence> - </xsd:complexType> - <xsd:complexType name="widgetComponentType"> - <xsd:sequence> - <xsd:element name="Area" type="componentAreaType" /> - <xsd:element name="VertAlignment" type="vertAlignmentType" minOccurs="0" maxOccurs="1" /> - <xsd:element name="HorzAlignment" type="horzAlignmentType" minOccurs="0" maxOccurs="1" /> - <xsd:element name="Property" type="propertyType" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="type" type="xsd:string" use="required" /> - <xsd:attribute name="nameSuffix" type="xsd:string" use="required" /> - <xsd:attribute name="renderer" type="xsd:string" use="optional" default="" /> - <xsd:attribute name="look" type="xsd:string" use="optional" default="" /> - </xsd:complexType> - <xsd:complexType name="horzFormatType"> - <xsd:attribute name="type" type="horzFormatEnum" use="required" /> - </xsd:complexType> - <xsd:complexType name="vertFormatType"> - <xsd:attribute name="type" type="vertFormatEnum" use="required" /> - </xsd:complexType> - <xsd:complexType name="horzTextFormatType"> - <xsd:attribute name="type" type="horzTextFormatEnum" use="required" /> - </xsd:complexType> - <xsd:complexType name="vertTextFormatType"> - <xsd:attribute name="type" type="vertTextFormatEnum" use="required" /> - </xsd:complexType> - <xsd:complexType name="horzAlignmentType"> - <xsd:attribute name="type" type="horzAlignmentEnum" use="required" /> - </xsd:complexType> - <xsd:complexType name="vertAlignmentType"> - <xsd:attribute name="type" type="vertAlignmentEnum" use="required" /> - </xsd:complexType> - <xsd:complexType name="propertyType"> - <xsd:attribute name="name" type="xsd:string" use="required" /> - <xsd:attribute name="value" type="xsd:string" use="required" /> - </xsd:complexType> - <xsd:complexType name="imageType"> - <xsd:attribute name="imageset" type="xsd:string" use="required" /> - <xsd:attribute name="image" type="xsd:string" use="required" /> - </xsd:complexType> - <xsd:complexType name="frameImageType"> - <xsd:attribute name="type" type="frameImageComponentEnum" use="required" /> - <xsd:attribute name="imageset" type="xsd:string" use="required" /> - <xsd:attribute name="image" type="xsd:string" use="required" /> - </xsd:complexType> - <xsd:complexType name="componentAreaType"> - <xsd:choice> - <xsd:sequence> - <xsd:element name="Dim" type="dimensionType" minOccurs="4" maxOccurs="4" /> - </xsd:sequence> - <xsd:element name="AreaProperty" type="settingByPropertyType" /> - </xsd:choice> - </xsd:complexType> - <xsd:complexType name="dimensionType"> - <xsd:choice> - <xsd:element name="UnifiedDim" type="unifiedDimType" /> - <xsd:element name="AbsoluteDim" type="absoluteDimType" /> - <xsd:element name="ImageDim" type="imageDimType" /> - <xsd:element name="WidgetDim" type="widgetDimType" /> - <xsd:element name="FontDim" type="fontDimType" /> - <xsd:element name="PropertyDim" type="propertyDimType" /> - </xsd:choice> - <xsd:attribute name="type" type="dimensionTypeEnum" use="required" /> - </xsd:complexType> - <xsd:complexType name="fontDimType"> - <xsd:sequence> - <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" /> - </xsd:sequence> - <xsd:attribute name="widget" type="xsd:string" use="optional" default="" /> - <xsd:attribute name="font" type="xsd:string" use="optional" default="" /> - <xsd:attribute name="string" type="xsd:string" use="optional" default="" /> - <xsd:attribute name="type" type="fontMetricTypeEnum" use="required" /> - <xsd:attribute name="padding" type="xsd:decimal" use="optional" default="0" /> - </xsd:complexType> - <xsd:complexType name="propertyDimType"> - <xsd:sequence> - <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" /> - </xsd:sequence> - <xsd:attribute name="widget" type="xsd:string" use="optional" default="" /> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - <xsd:complexType name="unifiedDimType"> - <xsd:sequence> - <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" /> - </xsd:sequence> - <xsd:attribute name="scale" type="xsd:decimal" use="optional" default="0" /> - <xsd:attribute name="offset" type="xsd:integer" use="optional" default="0" /> - <xsd:attribute name="type" type="dimensionTypeEnum" use="required" /> - </xsd:complexType> - <xsd:complexType name="absoluteDimType"> - <xsd:sequence> - <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" /> - </xsd:sequence> - <xsd:attribute name="value" type="xsd:decimal" use="optional" default="0" /> - </xsd:complexType> - <xsd:complexType name="imageDimType"> - <xsd:sequence> - <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" /> - </xsd:sequence> - <xsd:attribute name="imageset" type="xsd:string" use="required" /> - <xsd:attribute name="image" type="xsd:string" use="required" /> - <xsd:attribute name="dimension" type="dimensionTypeEnum" use="required" /> - </xsd:complexType> - <xsd:complexType name="widgetDimType"> - <xsd:sequence> - <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" /> - </xsd:sequence> - <xsd:attribute name="widget" type="xsd:string" use="optional" default="" /> - <xsd:attribute name="dimension" type="dimensionTypeEnum" use="required" /> - </xsd:complexType> - <xsd:complexType name="settingByPropertyType"> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - <xsd:complexType name="colourRectType"> - <xsd:attribute name="topLeft" type="colourValType" use="required" /> - <xsd:attribute name="topRight" type="colourValType" use="required" /> - <xsd:attribute name="bottomLeft" type="colourValType" use="required" /> - <xsd:attribute name="bottomRight" type="colourValType" use="required" /> - </xsd:complexType> - <xsd:simpleType name="colourValType"> - <xsd:restriction base="xsd:string"> - <xsd:pattern value="[a-fA-F0-9]{8}" /> - </xsd:restriction> - </xsd:simpleType> - <xsd:complexType name="textStringType"> - <xsd:attribute name="string" type="xsd:string" use="optional" default="" /> - <xsd:attribute name="font" type="xsd:string" use="optional" default="" /> - </xsd:complexType> - <xsd:complexType name="textPropertyType"> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - <xsd:complexType name="fontPropertyType"> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - <xsd:complexType name="dimensionOperatorType"> - <xsd:choice> - <xsd:element name="UnifiedDim" type="unifiedDimType" /> - <xsd:element name="AbsoluteDim" type="absoluteDimType" /> - <xsd:element name="ImageDim" type="imageDimType" /> - <xsd:element name="WidgetDim" type="widgetDimType" /> - <xsd:element name="FontDim" type="fontDimType" /> - <xsd:element name="PropertyDim" type="propertyDimType" /> - </xsd:choice> - <xsd:attribute name="op" type="dimensionOperatorEnum" use="required" /> - </xsd:complexType> - <xsd:simpleType name="dimensionTypeEnum"> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="LeftEdge" /> - <xsd:enumeration value="TopEdge" /> - <xsd:enumeration value="RightEdge" /> - <xsd:enumeration value="BottomEdge" /> - <xsd:enumeration value="XPosition" /> - <xsd:enumeration value="YPosition" /> - <xsd:enumeration value="Width" /> - <xsd:enumeration value="Height" /> - <xsd:enumeration value="XOffset" /> - <xsd:enumeration value="YOffset" /> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="vertFormatEnum"> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="TopAligned" /> - <xsd:enumeration value="CentreAligned" /> - <xsd:enumeration value="BottomAligned" /> - <xsd:enumeration value="Stretched" /> - <xsd:enumeration value="Tiled" /> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="horzFormatEnum"> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="LeftAligned" /> - <xsd:enumeration value="CentreAligned" /> - <xsd:enumeration value="RightAligned" /> - <xsd:enumeration value="Stretched" /> - <xsd:enumeration value="Tiled" /> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="vertAlignmentEnum"> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="TopAligned" /> - <xsd:enumeration value="CentreAligned" /> - <xsd:enumeration value="BottomAligned" /> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="horzAlignmentEnum"> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="LeftAligned" /> - <xsd:enumeration value="CentreAligned" /> - <xsd:enumeration value="RightAligned" /> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="horzTextFormatEnum"> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="LeftAligned" /> - <xsd:enumeration value="RightAligned" /> - <xsd:enumeration value="CentreAligned" /> - <xsd:enumeration value="Justified" /> - <xsd:enumeration value="WordWrapLeftAligned" /> - <xsd:enumeration value="WordWrapRightAligned" /> - <xsd:enumeration value="WordWrapCentreAligned" /> - <xsd:enumeration value="WordWrapJustified" /> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="vertTextFormatEnum"> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="TopAligned" /> - <xsd:enumeration value="BottomAligned" /> - <xsd:enumeration value="CentreAligned" /> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="propertyTypeEnum"> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="Generic" /> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="fontMetricTypeEnum"> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="LineSpacing" /> - <xsd:enumeration value="Baseline" /> - <xsd:enumeration value="HorzExtent" /> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="dimensionOperatorEnum"> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="Noop" /> - <xsd:enumeration value="Add" /> - <xsd:enumeration value="Subtract" /> - <xsd:enumeration value="Multiply" /> - <xsd:enumeration value="Divide" /> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="frameImageComponentEnum"> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="Background" /> - <xsd:enumeration value="TopLeftCorner" /> - <xsd:enumeration value="TopRightCorner" /> - <xsd:enumeration value="BottomLeftCorner" /> - <xsd:enumeration value="BottomRightCorner" /> - <xsd:enumeration value="LeftEdge" /> - <xsd:enumeration value="RightEdge" /> - <xsd:enumeration value="TopEdge" /> - <xsd:enumeration value="BottomEdge" /> - </xsd:restriction> - </xsd:simpleType> -</xsd:schema> Deleted: branches/ogsector/data/gui/schemes/Falagard.xsx =================================================================== --- branches/ogsector/data/gui/schemes/Falagard.xsx 2007-06-19 14:12:03 UTC (rev 580) +++ branches/ogsector/data/gui/schemes/Falagard.xsx 2007-06-19 14:22:24 UTC (rev 581) @@ -1,3 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!--This file is auto-generated by the XML Schema Designer. It holds layout information for components on the designer surface.--> -<XSDDesignerLayout /> \ No newline at end of file Deleted: branches/ogsector/data/gui/schemes/Font.xsd =================================================================== --- branches/ogsector/data/gui/schemes/Font.xsd 2007-06-19 14:12:03 UTC (rev 580) +++ branches/ogsector/data/gui/schemes/Font.xsd 2007-06-19 14:22:24 UTC (rev 581) @@ -1,34 +0,0 @@ -<?xml version="1.0" ?> -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> - <xsd:element name="Font" type="FontType" /> - - <xsd:complexType name="FontType"> - <xsd:sequence> - <xsd:element name="Mapping" type="MapType" maxOccurs="unbounded" minOccurs="0" /> - </xsd:sequence> - <xsd:attributeGroup ref="FontAttrs" /> - </xsd:complexType> - <xsd:complexType name="MapType"> - <xsd:attribute name="Codepoint" type="xsd:nonNegativeInteger" use="required" /> - <xsd:attribute name="Image" type="xsd:string" use="required" /> - <xsd:attribute name="HorzAdvance" type="xsd:integer" use="optional" default="-1" /> - </xsd:complexType> - <xsd:attributeGroup name="FontAttrs"> - <xsd:attribute name="Name" type="xsd:string" use="required" /> - <xsd:attribute name="Filename" type="xsd:string" use="required" /> - <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" /> - <xsd:attribute name="Type" use="required"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="FreeType" /> - <xsd:enumeration value="Pixmap" /> - </xsd:restriction> - </xsd:simpleType> - </xsd:attribute> - <xsd:attribute name="Size" type="xsd:nonNegativeInteger" use="optional" default="12" /> - <xsd:attribute name="NativeHorzRes" type="xsd:nonNegativeInteger" use="optional" default="640" /> - <xsd:attribute name="NativeVertRes" type="xsd:nonNegativeInteger" use="optional" default="480" /> - <xsd:attribute name="AutoScaled" type="xsd:boolean" use="optional" default="false" /> - <xsd:attribute name="AntiAlias" type="xsd:boolean" use="optional" default="true" /> - </xsd:attributeGroup> -</xsd:schema> Deleted: branches/ogsector/data/gui/schemes/GUIScheme.xsd =================================================================== --- branches/ogsector/data/gui/schemes/GUIScheme.xsd 2007-06-19 14:12:03 UTC (rev 580) +++ branches/ogsector/data/gui/schemes/GUIScheme.xsd 2007-06-19 14:22:24 UTC (rev 581) @@ -1,54 +0,0 @@ -<?xml version="1.0" ?> -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> - <xsd:element name="GUIScheme" type="SchemeType" /> - <xsd:complexType name="SchemeType"> - <xsd:choice minOccurs="0" maxOccurs="unbounded"> - <xsd:element name="Imageset" type="NamedDataType" /> - <xsd:element name="ImagesetFromImage" type="NamedDataType" /> - <xsd:element name="Font" type="NamedDataType" /> - <xsd:element name="LookNFeel" type="FileDataType" /> - <xsd:element name="WindowSet" type="WindowSetType" /> - <xsd:element name="WindowRendererSet" type="WindowRendererSetType" /> - <xsd:element name="WindowAlias" type="WindowAliasType" /> - <xsd:element name="FalagardMapping" type="FalagardMapType" /> - </xsd:choice> - <xsd:attribute name="Name" type="xsd:string" use="required" /> - </xsd:complexType> - <xsd:complexType name="WindowSetType"> - <xsd:sequence> - <xsd:element name="WindowFactory" type="WindowFactoryType" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="Filename" type="xsd:string" use="required" /> - </xsd:complexType> - <xsd:complexType name="WindowRendererSetType"> - <xsd:sequence> - <xsd:element name="WindowRendererFactory" type="WindowRendererFactoryType" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="Filename" type="xsd:string" use="required" /> - </xsd:complexType> - <xsd:complexType name="FileDataType"> - <xsd:attribute name="Filename" type="xsd:string" use="required" /> - <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" /> - </xsd:complexType> - <xsd:complexType name="NamedDataType"> - <xsd:attribute name="Name" type="xsd:string" use="required" /> - <xsd:attribute name="Filename" type="xsd:string" use="required" /> - <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" /> - </xsd:complexType> - <xsd:complexType name="WindowFactoryType"> - <xsd:attribute name="Name" type="xsd:string" use="required" /> - </xsd:complexType> - <xsd:complexType name="WindowRendererFactoryType"> - <xsd:attribute name="Name" type="xsd:string" use="required" /> - </xsd:complexType> - <xsd:complexType name="WindowAliasType"> - <xsd:attribute name="Alias" type="xsd:string" use="required" /> - <xsd:attribute name="Target" type="xsd:string" use="required" /> - </xsd:complexType> - <xsd:complexType name="FalagardMapType"> - <xsd:attribute name="WindowType" type="xsd:string" use="required" /> - <xsd:attribute name="TargetType" type="xsd:string" use="required" /> - <xsd:attribute name="Renderer" type="xsd:string" use="required" /> - <xsd:attribute name="LookNFeel" type="xsd:string" use="required" /> - </xsd:complexType> -</xsd:schema> Deleted: branches/ogsector/data/gui/schemes/Imageset.xsd =================================================================== --- branches/ogsector/data/gui/schemes/Imageset.xsd 2007-06-19 14:12:03 UTC (rev 580) +++ branches/ogsector/data/gui/schemes/Imageset.xsd 2007-06-19 14:22:24 UTC (rev 581) @@ -1,28 +0,0 @@ -<?xml version="1.0"?> -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> - - <xsd:element name="Imageset" type="ImagesetType"/> - - <xsd:complexType name="ImagesetType"> - <xsd:sequence> - <xsd:element name="Image" type="ImageType" maxOccurs="unbounded"/> - </xsd:sequence> - <xsd:attribute name="Imagefile" type="xsd:string" use="required"/> - <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" /> - <xsd:attribute name="Name" type="xsd:string" use="required"/> - <xsd:attribute name="NativeHorzRes" type="xsd:nonNegativeInteger" use="optional" default="640" /> - <xsd:attribute name="NativeVertRes" type="xsd:nonNegativeInteger" use="optional" default="480" /> - <xsd:attribute name="AutoScaled" type="xsd:boolean" use="optional" default="false" /> - </xsd:complexType> - - <xsd:complexType name="ImageType"> - <xsd:attribute name="Name" type="xsd:string" use="required"/> - <xsd:attribute name="XPos" type="xsd:nonNegativeInteger" use="required"/> - <xsd:attribute name="YPos" type="xsd:nonNegativeInteger" use="required"/> - <xsd:attribute name="Width" type="xsd:nonNegativeInteger" use="required"/> - <xsd:attribute name="Height" type="xsd:nonNegativeInteger" use="required"/> - <xsd:attribute name="XOffset" type="xsd:integer" use="optional" default="0"/> - <xsd:attribute name="YOffset" type="xsd:integer" use="optional" default="0"/> - </xsd:complexType> - -</xsd:schema> Modified: branches/ogsector/win32/ogsectorclient/resources.cfg =================================================================== --- branches/ogsector/win32/ogsectorclient/resources.cfg 2007-06-19 14:12:03 UTC (rev 580) +++ branches/ogsector/win32/ogsectorclient/resources.cfg 2007-06-19 14:22:24 UTC (rev 581) @@ -9,9 +9,12 @@ Zip=../../data/simpleSkybox.zip FileSystem=../../data/MediaFromOgre FileSystem=../../data/gui +FileSystem=../../data/gui/fonts/ +FileSystem=../../data/gui/layouts/ +FileSystem=../../data/gui/imagesets/ FileSystem=../../data/gui/schemes/ -FileSystem=../../data/gui/schemes/opengate -FileSystem=../../data/gui/layouts/ +FileSystem=../../data/gui/looknfeel/ + Zip=../../data/fonts.zip FileSystem=../../../../trunk/data/ FileSystem=../../../../trunk/data/commodities This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spo...@us...> - 2007-06-19 22:30:48
|
Revision: 583 http://svn.sourceforge.net/opengate/?rev=583&view=rev Author: spom_spom Date: 2007-06-19 15:30:49 -0700 (Tue, 19 Jun 2007) Log Message: ----------- win compatibility commit Modified Paths: -------------- branches/ogsector/src/common.h branches/ogsector/src/opengateclient.cpp branches/ogsector/win32/ogsectorclient/ogsectorclient.exe branches/ogsector/win32/ogsectorclient/resources.cfg Modified: branches/ogsector/src/common.h =================================================================== --- branches/ogsector/src/common.h 2007-06-19 21:59:30 UTC (rev 582) +++ branches/ogsector/src/common.h 2007-06-19 22:30:49 UTC (rev 583) @@ -52,19 +52,22 @@ typedef unsigned char Uint8; typedef unsigned short Uint16; typedef int Uint32; + #ifdef WIN32 -#define PATHSEPARATOR "\\" +#define PATHSEPARATOR "\\" +typedef unsigned int uint; + #include <windows.h> #else #define PATHSEPARATOR "/" #endif #define MAXUSERID 1000000 -#define BIND_CEGUI_EVENT(window, event, method) window->subscribeEvent(event, CEGUI::Event::Subscriber(&method, this)); +#define BIND_CEGUI_EVENT(window, event, method) window->subscribeEvent(event, CEGUI::Event::Subscriber(&method, this)); -// template< typename T > struct CMD_Ptr { -// typedef void (T::*Type)( const std::vector< std::string > &); +// template< typename T > struct CMD_Ptr { +// typedef void (T::*Type)( const std::vector< std::string > &); // }; long createGlobalID( int userId, int childId ); Modified: branches/ogsector/src/opengateclient.cpp =================================================================== --- branches/ogsector/src/opengateclient.cpp 2007-06-19 21:59:30 UTC (rev 582) +++ branches/ogsector/src/opengateclient.cpp 2007-06-19 22:30:49 UTC (rev 583) @@ -83,9 +83,9 @@ try { OpenGate::GameStateManager gameStateMgr( nw, dialog ); -// OpenGate::DockedState::create( &gameStateMgr, "DockedState" ); + OpenGate::DockedState::create( &gameStateMgr, "DockedState" ); OpenGate::UnDockedState::create( &gameStateMgr, "UnDockedState" ); - gameStateMgr.start( gameStateMgr.findByName( "UnDockedState" ) ); + gameStateMgr.start( gameStateMgr.findByName( "DockedState" ) ); } catch( Ogre::Exception& e ) { #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 Modified: branches/ogsector/win32/ogsectorclient/ogsectorclient.exe =================================================================== (Binary files differ) Modified: branches/ogsector/win32/ogsectorclient/resources.cfg =================================================================== --- branches/ogsector/win32/ogsectorclient/resources.cfg 2007-06-19 21:59:30 UTC (rev 582) +++ branches/ogsector/win32/ogsectorclient/resources.cfg 2007-06-19 22:30:49 UTC (rev 583) @@ -17,6 +17,8 @@ Zip=../../data/fonts.zip FileSystem=../../../../trunk/data/ +FileSystem=../../../../trunk/data/misc +FileSystem=../../../../trunk/data/misc/asteroids FileSystem=../../../../trunk/data/commodities FileSystem=../../../../trunk/data/ships/octavius/apteryx FileSystem=../../../../trunk/data/ships/quantar/storm This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2007-07-05 20:21:15
|
Revision: 614 http://svn.sourceforge.net/opengate/?rev=614&view=rev Author: egore Date: 2007-07-05 13:21:18 -0700 (Thu, 05 Jul 2007) Log Message: ----------- Add .svnignore files to hide stuff from svn that does not belong there. To update these files, go into the directory, edit it to your needs and call "svn propset svn:ignore -F .svnignore ." afterwards Also add authentication against the meta server. Also add improved commandline parsing based on getopt. I guess it's good I have to write C++ at work. This helps a lot :-) Modified Paths: -------------- branches/ogsector/configure.ac branches/ogsector/runClient.sh branches/ogsector/src/Makefile.am branches/ogsector/src/Makefile.in branches/ogsector/src/metaserver.cpp branches/ogsector/src/metaserver.h branches/ogsector/src/networkClient.cpp branches/ogsector/src/networkClient.h branches/ogsector/src/opengateclient.cpp Added Paths: ----------- branches/ogsector/.svnignore branches/ogsector/src/.svnignore Property Changed: ---------------- branches/ogsector/ branches/ogsector/src/ Property changes on: branches/ogsector ___________________________________________________________________ Name: svn:ignore + *.log configure Makefile.in config.h Makefile config.status stamp-h1 opengate.depend autom4te.cache Added: branches/ogsector/.svnignore =================================================================== --- branches/ogsector/.svnignore (rev 0) +++ branches/ogsector/.svnignore 2007-07-05 20:21:18 UTC (rev 614) @@ -0,0 +1,9 @@ +*.log +configure +Makefile.in +config.h +Makefile +config.status +stamp-h1 +opengate.depend +autom4te.cache Modified: branches/ogsector/configure.ac =================================================================== --- branches/ogsector/configure.ac 2007-07-05 20:17:15 UTC (rev 613) +++ branches/ogsector/configure.ac 2007-07-05 20:21:18 UTC (rev 614) @@ -54,7 +54,7 @@ AC_SUBST([CXXFLAGS], ["${CXXFLAGS} -Wall -I$OGSECTOR_EXTERNALS_PATH/include"]) AC_SUBST([CXXFLAGS], ["${CXXFLAGS} -I$OGSECTOR_EXTERNALS_PATH/ogreopcode/include"]) AC_SUBST([CXXFLAGS], ["${CXXFLAGS} -I$OGSECTOR_EXTERNALS_PATH/ogreopcode/opcode132"]) -AC_SUBST([LDFLAGS], ["${LDFLAGS} -L$OGSECTOR_EXTERNALS_PATH/lib/ -lOpcode -lOgreOpcode"]) +AC_SUBST([LDFLAGS], ["${LDFLAGS} -L$OGSECTOR_EXTERNALS_PATH/lib/ -lOpcode -lOgreOpcode -lboost_regex"]) #AC_SUBST([CXXFLAGS], ["-g -Wall ${CXXFLAGS}"]) dnl #libopcode Modified: branches/ogsector/runClient.sh =================================================================== --- branches/ogsector/runClient.sh 2007-07-05 20:17:15 UTC (rev 613) +++ branches/ogsector/runClient.sh 2007-07-05 20:21:18 UTC (rev 614) @@ -10,6 +10,4 @@ export LD_LIBRARY_PATH=./externals/lib:$LD_LIBRARY_PATH -echo "starting client for user: $USERNAME and looking for host: $HOSTNAME" - -./src/opengateclient $USERNAME $HOSTNAME --ogreconfig=0 +./src/opengateclient --no-config $* Property changes on: branches/ogsector/src ___________________________________________________________________ Name: svn:ignore + opengateserver .deps Makefile testopenalmanager opengateclient Added: branches/ogsector/src/.svnignore =================================================================== --- branches/ogsector/src/.svnignore (rev 0) +++ branches/ogsector/src/.svnignore 2007-07-05 20:21:18 UTC (rev 614) @@ -0,0 +1,5 @@ +opengateserver +.deps +Makefile +testopenalmanager +opengateclient Modified: branches/ogsector/src/Makefile.am =================================================================== --- branches/ogsector/src/Makefile.am 2007-07-05 20:17:15 UTC (rev 613) +++ branches/ogsector/src/Makefile.am 2007-07-05 20:21:18 UTC (rev 614) @@ -56,7 +56,9 @@ Vessel.h \ Vessel.cpp \ VesselManager.h \ - VesselManager.cpp + VesselManager.cpp \ + metaserver.h \ + metaserver.cpp opengateserver_SOURCES = \ opengateserver.cpp \ Modified: branches/ogsector/src/Makefile.in =================================================================== --- branches/ogsector/src/Makefile.in 2007-07-05 20:17:15 UTC (rev 613) +++ branches/ogsector/src/Makefile.in 2007-07-05 20:21:18 UTC (rev 614) @@ -60,7 +60,7 @@ OpcodeWrapper.$(OBJEXT) Projectile.$(OBJEXT) Sector.$(OBJEXT) \ SectorObjects.$(OBJEXT) ShipConfigDialog.$(OBJEXT) \ UnDockedState.$(OBJEXT) Vessel.$(OBJEXT) \ - VesselManager.$(OBJEXT) + VesselManager.$(OBJEXT) metaserver.$(OBJEXT) opengateclient_OBJECTS = $(am_opengateclient_OBJECTS) opengateclient_LDADD = $(LDADD) am_opengateserver_OBJECTS = opengateserver.$(OBJEXT) common.$(OBJEXT) \ @@ -237,7 +237,9 @@ Vessel.h \ Vessel.cpp \ VesselManager.h \ - VesselManager.cpp + VesselManager.cpp \ + metaserver.h \ + metaserver.cpp opengateserver_SOURCES = \ opengateserver.cpp \ @@ -354,6 +356,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Vessel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VesselManager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/metaserver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/networkClient.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/networkProtocol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/networkServer.Po@am__quote@ Modified: branches/ogsector/src/metaserver.cpp =================================================================== --- branches/ogsector/src/metaserver.cpp 2007-07-05 20:17:15 UTC (rev 613) +++ branches/ogsector/src/metaserver.cpp 2007-07-05 20:21:18 UTC (rev 614) @@ -19,59 +19,63 @@ ***************************************************************************/ #include "metaserver.h" +#include <boost/regex.hpp> namespace OpenGate{ -MetaConnection::MetaConnection( asio::io_service & io_service, const std::string & hostName ) - : io_service_( io_service ), socket_( io_service ), resolver_( io_service ), - hostname_( hostName ) { +MetaConnection::MetaConnection(asio::io_service & io_service) : + io_service_( io_service ), socket_( io_service ), resolver_( io_service ) { + // Get instance to the log manager log_ = LogManager::getSingletonPtr(); + hostname_ = std::string( "opacma.ontheserver.de" ); - try { - asio::ip::tcp::resolver::query query(hostName.c_str(), "http"); - asio::ip::tcp::resolver::iterator endpoint_iterator = resolver_.resolve(query); - asio::ip::tcp::resolver::iterator end; + log_->info( std::string( "Querying " ) + hostname_); - // Try each endpoint until we successfully establish a connection. - asio::error error = asio::error::host_not_found; - while (error && endpoint_iterator != end) - { + asio::error error = asio::error::host_not_found; + try{ + tcp::resolver::query query(hostname_, "http"); + tcp::resolver::iterator endpoint_iterator = resolver_.resolve(query); + tcp::resolver::iterator end; + + while ( error && endpoint_iterator != end ) { socket_.close(); - socket_.connect(*endpoint_iterator++, asio::assign_error(error)); + socket_.connect( *endpoint_iterator++, asio::assign_error( error ) ); } - if (error) - throw error; - } catch ( asio::error & e) { log_->fatal( e.what() ); + } catch ( std::exception & e) { + log_->fatal( std::string( "Exception: " ) + e.what() ); } catch (...) { log_->fatal( "Unkown exception occured while resolving the metaserver" ); } +} +MetaConnection::~MetaConnection() { + // asio doesn't need a cleanup, right? } -#define SCRIPT_PATH "/script/schnittstelle/" +int MetaConnection::login( const std::string & userName, const std::string & passwd ) { -void MetaConnection::login( const std::string & userName, const std::string & passwd ) { + std::cout << userName << ":" << passwd << std::endl; + try { - // Form the request. We specify the "Connection: close" header so that the // server will close the socket after transmitting the response. This will // allow us to treat all data up until the EOF as the content. asio::streambuf request; std::ostream request_stream(&request); - request_stream << "GET " SCRIPT_PATH << "?action=login&username=" <<userName <<"&password=" << passwd << " HTTP/1.0\r\n"; + request_stream << "GET " << "/script/schnittstelle/?action=login&username=" << userName << "&password=" << passwd << " HTTP/1.0\r\n"; request_stream << "Host: " << hostname_ << "\r\n"; request_stream << "Accept: */*\r\n"; request_stream << "Connection: close\r\n\r\n"; // Send the request. - asio::write(socket, request); + asio::write(socket_, request); // Read the response status line. asio::streambuf response; - asio::read_until(socket, response, boost::regex("\r\n")); + asio::read_until(socket_, response, boost::regex("\r\n")); // Check that response is OK. std::istream response_stream(&response); @@ -81,41 +85,65 @@ response_stream >> status_code; std::string status_message; std::getline(response_stream, status_message); - if (!response_stream || http_version.substr(0, 5) != "HTTP/"){ - log_->fatal( "Invalid response from metaserver " ); - return; + if ( !response_stream || http_version.substr(0, 5) != "HTTP/" ) { + std::cout << "Invalid response\n"; + return -1; } - if (status_code != 200){ - log_->fatal( std::string("Response returned with status code ") /* + status_code FIXME: I suck at CPP streams */ ); - return; + if (status_code != 200) { + std::cout << "Response returned with status code " << status_code << "\n"; + return -2; } // Read the response headers, which are terminated by a blank line. - asio::read_until(socket, response, boost::regex("\r\n\r\n")); + asio::read_until(socket_, response, boost::regex("\r\n\r\n")); - // Process the response headers. + // Process the response headers. (to get the crap of the response before reading the body!) std::string header; - while (std::getline(response_stream, header) && header != "\r") - std::cout << header << "\n"; - std::cout << "\n"; + while (std::getline(response_stream, header) && header != "\r"); - // Write whatever content we already have to output. - if (response.size() > 0) - std::cout << &response; + // We got a usefull body. The body is an int, lets use it. + if (response.size() > 0) { + std::ostringstream stream; + stream << &response; + int returncode = toInt( stream.str() ); + switch (returncode) { + case -101: log_->warn ( std::string ("no action given") ); return -3; + case -102: log_->warn ( std::string ("action given but unknown") ); return -3; + case -103: log_->warn ( std::string ("database is not available") ); return -3; + case -8: log_->warn ( std::string ("no username given") ); return -3; + case -9: log_->warn ( std::string ("no password given") ); return -3; + case -10: log_->warn ( std::string ("username doesn't exist") ); return -3; + case -11: log_->warn ( std::string ("password incorrect") ); return -3; + default: + if (returncode > 0) { + return returncode; + } else { + log_->warn ( std::string ("unkown return code for login ") + toStr( returncode ) ); + return -4; + } + } + } + asio::error error = asio::error::eof; // Read until EOF, writing data to output as we go. - asio::error error = asio::error::eof; - while (asio::read(socket, response, + while (asio::read(socket_, response, asio::transfer_at_least(1), asio::assign_error(error))) std::cout << &response; if (error != asio::error::eof) throw error; + } catch ( asio::error & e) { log_->fatal( e.what() ); + return -5; + } catch ( std::exception & e) { + log_->fatal( std::string( "Exception: " ) + e.what() ); + return -5; } catch (...) { - log_->fatal( "Unkown exception occured while resolving the metaserver" ); + log_->fatal( "Unkown exception occured while resolving the server" ); + return -5; } + return 1; } } // namespace OpenGate Modified: branches/ogsector/src/metaserver.h =================================================================== --- branches/ogsector/src/metaserver.h 2007-07-05 20:17:15 UTC (rev 613) +++ branches/ogsector/src/metaserver.h 2007-07-05 20:21:18 UTC (rev 614) @@ -22,27 +22,27 @@ #define _OPENGATE_METASERVER__H #include <asio.hpp> -#include <boost/bind.hpp> - #include "LogManager.h" +using asio::ip::tcp; + namespace OpenGate{ class MetaConnection { public: - MetaConnection( asio::io_service & io_service, const std::string & hostName ); - + MetaConnection(asio::io_service & io_service); ~MetaConnection(); - void login( const std::string & userName, const std::string & passwd ); + int login( const std::string & userName, const std::string & passwd = "" ); + private: - asio::io_service & io_service_; - asio::ip::tcp::socket socket_; - asio::ip::tcp::resolver resolver_; + LogManager *log_; std::string hostname_; - LogManager *log_; + asio::io_service & io_service_; + tcp::socket socket_; + tcp::resolver resolver_; }; Modified: branches/ogsector/src/networkClient.cpp =================================================================== --- branches/ogsector/src/networkClient.cpp 2007-07-05 20:17:15 UTC (rev 613) +++ branches/ogsector/src/networkClient.cpp 2007-07-05 20:21:18 UTC (rev 614) @@ -35,7 +35,7 @@ pingTime_ = 0; userID_ = 0; - log_->info( std::string( "Connecting to " ) + hostname_ + ":" + toStr( 1234 ) ); + log_->info( std::string( "Connecting to " ) + hostname_ + ":" + toStr( (int)OG_PORT ) ); asio::error error = asio::error::host_not_found; try{ @@ -52,6 +52,7 @@ } catch ( std::exception & e) { log_->fatal( std::string( "Exception: " ) + e.what() ); } catch (...) { + log_->fatal( "Unkown exception occured while resolving the server" ); } if ( !error ){ log_->info( "Connected: waiting for userID. " ); Modified: branches/ogsector/src/networkClient.h =================================================================== --- branches/ogsector/src/networkClient.h 2007-07-05 20:17:15 UTC (rev 613) +++ branches/ogsector/src/networkClient.h 2007-07-05 20:21:18 UTC (rev 614) @@ -87,7 +87,7 @@ asio::io_service & io_service_; tcp::socket socket_; - tcp::resolver resolver_; + tcp::resolver resolver_; std::string hostname_; bool online_; Modified: branches/ogsector/src/opengateclient.cpp =================================================================== --- branches/ogsector/src/opengateclient.cpp 2007-07-05 20:17:15 UTC (rev 613) +++ branches/ogsector/src/opengateclient.cpp 2007-07-05 20:21:18 UTC (rev 614) @@ -31,39 +31,99 @@ #include "GameStateManager.h" #include "DockedState.h" #include "UnDockedState.h" +#include "metaserver.h" +#include <getopt.h> int main( int argc, char * argv[ ] ) { + int option_dialog = 1; + std::string username = "testuser"; + std::string hostname = "localhost"; + std::string password = "dummy"; + OpenGate::LogManager *log = new OpenGate::LogManager(); log->setLogFile( "OpenGate.log" ); log->setChatLogFile( "OpenGateChat.log" ); + + while (1) { + static struct option long_options[] = { + /* These options set a flag. */ + {"config", no_argument, &option_dialog, 1}, + {"no-config", no_argument, &option_dialog, 0}, + /* These options don't set a flag. We distinguish them by their indices. */ + {"help", no_argument, 0, 'h'}, + {"username", required_argument, 0, 'u'}, + {"password", required_argument, 0, 'p'}, + {"server", required_argument, 0, 's'}, + {0, 0, 0, 0} + }; + + /* getopt_long stores the option index here. */ + int option_index = 0; + int c = getopt_long (argc, argv, "cnh:u:p:", long_options, &option_index); + + /* Detect the end of the options. */ + if (c == -1) + break; + + switch (c) { + case 0: + // If this option set a flag, do nothing else now + if (long_options[option_index].flag != 0) + break; + printf ("option %s", long_options[option_index].name); + if (optarg) + printf (" with arg %s", optarg); + printf ("\n"); + break; + case 'h': +#ifdef PACKAGE_NAME + std::cout << PACKAGE_NAME << std::endl; +#endif + std::cout << std::endl << "Usage instructions" << std::endl; + std::cout << " -h --help Show this information" << std::endl; + std::cout << " -u name --username=name Set username to 'name'" << std::endl; + std::cout << " -p pass --password=pass Set password to 'pass'" << std::endl; + std::cout << " -s server --server=server Set server hostname to 'server'" << std::endl; + std::cout << std::endl; + std::cout << " -c --config Show config dialog" << std::endl; + std::cout << " -n --no-config Disable config dialog, reuse last settings" << std::endl; + delete log; + return EXIT_SUCCESS; + case 'u': + log->debug ( std::string ("Setting username to ") + optarg); + username = optarg; + break; + case 'p': + log->debug ( std::string ("Setting password to ") + optarg); + password = optarg; + break; + case 's': + log->debug ( std::string ("Setting server to ") + optarg); + hostname = optarg; + break; + case '?': + // getopt_long already printed an error message. + break; + default: + // Fail on unkown options + abort(); + } + } + log->info("Starting up"); #ifdef PACKAGE_STRING log->info(PACKAGE_STRING); #endif - std::string username = "testuser"; - std::string hostname = "localhost"; - std::string password = ""; - bool dialog = true; - if ( argc > 1 ){ - username = argv[ 1 ]; - } - if ( argc > 2 ){ - username = argv[ 1 ]; - hostname = argv[ 2 ]; - } - if ( argc > 3 ){ - std::string dialogStr( argv[ 3 ] ); - if ( dialogStr.find( "--ogreconfig=0", 0 ) != std::string::npos ) dialog = false; - } - log->info( std::string( "User: " + username + " looking for host: " + hostname ) ); asio::io_service io_service; OpenGate::NetworkClient nw( io_service, hostname ); + OpenGate::MetaConnection meta( io_service ); + if (meta.login( username, password ) > 0) { if ( nw.online() ){ // //** waiting for userid; @@ -82,7 +142,7 @@ } try { - OpenGate::GameStateManager gameStateMgr( nw, dialog ); + OpenGate::GameStateManager gameStateMgr( nw, option_dialog ); OpenGate::DockedState::create( &gameStateMgr, "DockedState" ); OpenGate::UnDockedState::create( &gameStateMgr, "UnDockedState" ); gameStateMgr.start( gameStateMgr.findByName( "DockedState" ) ); @@ -95,6 +155,9 @@ log->fatal( std::string("An exception has occured: ") + e.getFullDescription().c_str() ); #endif } + + } + nw.close(); delete log; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spo...@us...> - 2007-07-27 15:55:31
|
Revision: 640 http://opengate.svn.sourceforge.net/opengate/?rev=640&view=rev Author: spom_spom Date: 2007-07-27 08:55:32 -0700 (Fri, 27 Jul 2007) Log Message: ----------- win compatibility commit Modified Paths: -------------- branches/ogsector/src/Sector.cpp branches/ogsector/src/metaserver.cpp branches/ogsector/src/opengateclient.cpp branches/ogsector/win32/ogsectorclient/ogsectorclient.exe branches/ogsector/win32/ogsectorclient/resources.cfg branches/ogsector/win32/ogsectorclient/runClient.bat Modified: branches/ogsector/src/Sector.cpp =================================================================== --- branches/ogsector/src/Sector.cpp 2007-07-27 15:12:58 UTC (rev 639) +++ branches/ogsector/src/Sector.cpp 2007-07-27 15:55:32 UTC (rev 640) @@ -61,7 +61,7 @@ // }; -Sector::Sector( Ogre::SceneManager * sceneMgr, NetworkClient * network ) +Sector::Sector( Ogre::SceneManager * sceneMgr, NetworkClient * network ) : sceneMgr_( sceneMgr ), network_( network ) { log_ = LogManager::getSingletonPtr(); @@ -76,29 +76,29 @@ if ( !collisionDetection_ ) collisionDetection_ = new OpcodeCollisionDetection( sceneMgr_ ); //*** starfield test 1 -// Ogre::ManualObject* myManualObject = sceneMgr_->createManualObject("manual1"); -// Ogre::SceneNode* myManualObjectNode = sceneMgr_->getRootSceneNode()->createChildSceneNode("manual1_node"); - -// Ogre::MaterialPtr myManualObjectMaterial = Ogre::MaterialManager::getSingleton().create("manual1Material","debugger"); -// myManualObjectMaterial->setReceiveShadows( false ); -// myManualObjectMaterial->getTechnique(0)->setLightingEnabled( true ); -// myManualObjectMaterial->getTechnique(0)->getPass(0)->setDiffuse(1.0, 1.0, 1.0, 1.0); -// myManualObjectMaterial->getTechnique(0)->getPass(0)->setAmbient(1.0, 1.0, 1.0); -// myManualObjectMaterial->getTechnique(0)->getPass(0)->setSelfIllumination(1.0, 1.0, 1.0); -// myManualObject->begin("manual1Material", Ogre::RenderOperation::OT_POINT_LIST); +// Ogre::ManualObject* myManualObject = sceneMgr_->createManualObject("manual1"); +// Ogre::SceneNode* myManualObjectNode = sceneMgr_->getRootSceneNode()->createChildSceneNode("manual1_node"); + +// Ogre::MaterialPtr myManualObjectMaterial = Ogre::MaterialManager::getSingleton().create("manual1Material","debugger"); +// myManualObjectMaterial->setReceiveShadows( false ); +// myManualObjectMaterial->getTechnique(0)->setLightingEnabled( true ); +// myManualObjectMaterial->getTechnique(0)->getPass(0)->setDiffuse(1.0, 1.0, 1.0, 1.0); +// myManualObjectMaterial->getTechnique(0)->getPass(0)->setAmbient(1.0, 1.0, 1.0); +// myManualObjectMaterial->getTechnique(0)->getPass(0)->setSelfIllumination(1.0, 1.0, 1.0); +// myManualObject->begin("manual1Material", Ogre::RenderOperation::OT_POINT_LIST); // for ( int i = 0; i < 3000; i ++ ){ // myManualObject->position(Ogre::Vector3(Ogre::Math::RangeRandom(-1,1), // Ogre::Math::RangeRandom(-1,1), // Ogre::Math::RangeRandom(-1,1)).normalisedCopy() * // Ogre::Math::RangeRandom(10000,40000) ); // } -// myManualObject->end(); +// myManualObject->end(); // myManualObjectNode->attachObject(myManualObject); //*** end starfield test 1 //*** starfield test 2 -// starsNode_ = sceneMgr_->getRootSceneNode()->createChildSceneNode("StarfieldNode"); +// starsNode_ = sceneMgr_->getRootSceneNode()->createChildSceneNode("StarfieldNode"); // Ogre::BillboardSet* mySet = sceneMgr_->createBillboardSet("StarfieldNode"); // mySet->setMaterialName( "OpenGate/Star"); // for ( int i = 0; i < 1000; i ++ ){ @@ -115,10 +115,10 @@ if ( 1 ) { planetNode_ = sceneMgr_->getRootSceneNode()->createChildSceneNode( "PlanetNode" ); Ogre::ManualObject * planet = sceneMgr_->createManualObject( "Planet" ); - // planet->setUseIdentityProjection( true ); + // planet->setUseIdentityProjection( true ); // planet->setUseIdentityView( true ); - - planet->begin( "OpenGate/RedPlanet", Ogre::RenderOperation::OT_TRIANGLE_LIST); + + planet->begin( "OpenGate/RedPlanet", Ogre::RenderOperation::OT_TRIANGLE_LIST); planet->position( Ogre::Vector3( -1.0, -1.0, 200.0 ) ); planet->textureCoord( 0, 0 ); planet->position( Ogre::Vector3( 1.0, -1.0, 200.0 ) ); @@ -129,32 +129,33 @@ planet->textureCoord( 0, 1 ); planet->quad( 0, 1, 2, 3 ); planet->end(); - Ogre::AxisAlignedBox aabInf; aabInf.setInfinite(); + Ogre::AxisAlignedBox aabInf; aabInf.setInfinite(); planet->setBoundingBox( aabInf ); planetNode_->attachObject( planet ); planetNode_->scale( 20000, 20000, 1 ); planetNode_->setPosition( Ogre::Vector3( 20000.0, 10000.0, 50000 ) ); } - // Build tangent vectors, all our meshes use only 1 texture coordset + // Build tangent vectors, all our meshes use only 1 texture coordset // Note we can build into VES_TANGENT now (SM2+) - + sceneMgr_->setAmbientLight( Ogre::ColourValue( 0.0, 0.0, 0.0 ) ); - + const Ogre::RenderSystemCapabilities * caps = DeviceManager::getSingleton().ogreRoot->getRenderSystem()->getCapabilities(); + bool mapping = true; if ( !caps->hasCapability( Ogre::RSC_VERTEX_PROGRAM ) ) { - OGRE_EXCEPT(Ogre::Exception::ERR_NOT_IMPLEMENTED, "Your card does not support vertex programs.", - "GameStateManager::GameStateManager"); + log_->warn("Your card does not support vertex programs."); + mapping = false; } if ( !( caps->hasCapability( Ogre::RSC_FRAGMENT_PROGRAM ) || caps->hasCapability( Ogre::RSC_DOT3 ) ) ) { - OGRE_EXCEPT(Ogre::Exception::ERR_NOT_IMPLEMENTED, "Your card does not support dot3 blending or fragment programs.", - "GameStateManager::GameStateManager" ); + log_->warn("Your card does not support dot3 blending or fragment programs." ); + mapping = false; } Ogre::MeshPtr pMesh = Ogre::MeshManager::getSingleton().load( "asteroid01.mesh", - Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, - Ogre::HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY, - Ogre::HardwareBuffer::HBU_STATIC_WRITE_ONLY, + Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, + Ogre::HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY, + Ogre::HardwareBuffer::HBU_STATIC_WRITE_ONLY, true, true); unsigned short src, dest; if ( !pMesh->suggestTangentVectorBuildParams( Ogre::VES_TANGENT, src, dest) ) { @@ -167,7 +168,8 @@ SectorObject *a2 = createStaticObject( "asteroid01.mesh", "astro without bump", Ogre::Vector3( -250, 0, 500 ) ); a2->mainNode()->scale( 20, 20, 20 ); - a1->entity()->setMaterialName("Asteroid/BumpMapping"); + if ( mapping ) a1->entity()->setMaterialName("Asteroid/BumpMapping"); + else { a1->entity()->setMaterialName("Asteroid"); } a2->entity()->setMaterialName("Asteroid"); @@ -180,19 +182,19 @@ } Sector::~Sector( ){ - + for ( std::map< long, SectorObjectMoveable * >::iterator it = movableObjects_.begin(); it != movableObjects_.end();){ // log_->info( "Destructing: " + it->second->name() ); destructMoveableObject( (it++)->second ); // log_->info( "done: " ); } - + for ( std::set< SectorObject * >::iterator it = sectorObjects_.begin(); it != sectorObjects_.end(); ){ // log_->info( "Destructing: " + (*it)->name() ); if ( (*it)->isOnRadar() && radar_ ){ Ogre::Overlay * radar = Ogre::OverlayManager::getSingleton().getByName( "Radar" ); - Ogre::OverlayContainer * radarMap = radar->getChild( "Radar/Map" ); + Ogre::OverlayContainer * radarMap = radar->getChild( "Radar/Map" ); radarMap->removeChild( (*it)->dotA()->getName() ); radarMap->removeChild( (*it)->dotB()->getName() ); } @@ -216,19 +218,19 @@ void Sector::populate( const std::string & fileName ){ TiXmlDocument doc( DeviceManager::getSingleton().findFullFileName( fileName ) ); bool loadOkay = doc.LoadFile(); - + if ( !loadOkay ) { log_->fatal( std::string( "Failed to load sector file: " + fileName ) ); return; } - + TiXmlHandle docHandle( &doc ); TiXmlElement *pElem, *pSubElem; TiXmlHandle hRoot( 0 ); pElem = docHandle.FirstChildElement().Element(); hRoot = TiXmlHandle( pElem ); - + if ( !pElem ) { log_->fatal( fileName + " cannot read first node." ); return; @@ -264,9 +266,9 @@ std::set < Vessel * > vessels( VesselManager::getSingleton().factionVessels( (*factIt) ) ); int vesselCounter = 0; for ( std::set < Vessel * >::iterator it = vessels.begin(); it != vessels.end(); it ++ ){ - SectorObject * obj = createStaticObject( (*it)->meshPtr().get()->getName(), + SectorObject * obj = createStaticObject( (*it)->meshPtr().get()->getName(), (*it)->factionName() + "/" + (*it)->name(), - Ogre::Vector3( -1000.0, 50 * factionCounter, + Ogre::Vector3( -1000.0, 50 * factionCounter, -100.0 + 100 * vesselCounter ) ); obj->setBaseRot( (*it)->baseYaw(), (*it)->basePitch(), (*it)->baseRoll() ); @@ -277,9 +279,9 @@ } } } - - for ( pElem = hRoot.FirstChild( "sectorobject" ).Element(); pElem != 0; + + for ( pElem = hRoot.FirstChild( "sectorobject" ).Element(); pElem != 0; pElem = pElem->NextSiblingElement("sectorobject") ) { std::string name; pSubElem = pElem->FirstChildElement( "name" ); @@ -341,7 +343,7 @@ void Sector::update( Ogre::Real elapsedTime ){ if ( collisionDetection_ ) collisionDetection_->update( elapsedTime ); - + if ( avatar_ ) { if ( planetNode_ ){ Ogre::Vector3 src = planetNode_->getWorldOrientation() * Ogre::Vector3::UNIT_Z; @@ -360,52 +362,52 @@ if ( radar_ ){ Ogre::Overlay * radar = Ogre::OverlayManager::getSingleton().getByName( "Radar" ); - Ogre::OverlayContainer * radarMap = radar->getChild( "Radar/Map" ); - + Ogre::OverlayContainer * radarMap = radar->getChild( "Radar/Map" ); + int dotAWidth = 4; int dotAHeight = 2; float radarRange = 5000; float radarWidth = radarMap->getWidth() * Ogre::OverlayManager::getSingleton().getViewportWidth(); float radarHeight = radarMap->getHeight() * Ogre::OverlayManager::getSingleton().getViewportHeight(); - float xScale = radarRange / ( radarWidth / 2.0 ); - float yScale = radarRange / ( radarHeight / 2.0 ); - + float xScale = radarRange / ( radarWidth / 2.0 ); + float yScale = radarRange / ( radarHeight / 2.0 ); + for ( std::set< SectorObject * >::iterator it = sectorObjects_.begin(); it != sectorObjects_.end(); it++){ - + Ogre::Vector3 relativPosition( (*it)->mainNode()->getPosition( ) - avatar_->mainNode()->getPosition( ) ); Ogre::OverlayElement * dotA = (*it)->dotA(); Ogre::OverlayElement * dotB = (*it)->dotB(); if ( relativPosition.length() < radarRange ){ - - Ogre::Quaternion q; - q.FromAngleAxis( -avatar_->mainNode()->getOrientation( ).getYaw(), Ogre::Vector3::UNIT_Y); + + Ogre::Quaternion q; + q.FromAngleAxis( -avatar_->mainNode()->getOrientation( ).getYaw(), Ogre::Vector3::UNIT_Y); relativPosition = q * relativPosition; // Ogre::Quaternion r( Ogre::Degree(20), Ogre::Vector3::UNIT_Z); // relativPosition = r * relativPosition; // std::cout << relativPosition << std::endl; - Ogre::Plane viewPlane( avatar_->mainNode()->getOrientation().yAxis().normalisedCopy(), + Ogre::Plane viewPlane( avatar_->mainNode()->getOrientation().yAxis().normalisedCopy(), avatar_->mainNode()->getPosition() ); - + float distToPlane = viewPlane.getDistance( (*it)->mainNode()->getPosition( ) ) / yScale; - - dotA->setPosition( radarWidth / 2.0 + relativPosition[ 0 ] / xScale - dotAWidth / 2, - radarHeight / 2.0 + relativPosition[ 2 ] / yScale - dotAHeight / 2 - distToPlane ); - + + dotA->setPosition( radarWidth / 2.0 + relativPosition[ 0 ] / xScale - dotAWidth / 2, + radarHeight / 2.0 + relativPosition[ 2 ] / yScale - dotAHeight / 2 - distToPlane ); + if ( distToPlane < 0 ) distToPlane = 0; - - dotB->setHeight( fabs( distToPlane ) ); - dotB->setPosition( radarWidth / 2.0 + relativPosition[ 0 ] / xScale, + + dotB->setHeight( fabs( distToPlane ) ); + dotB->setPosition( radarWidth / 2.0 + relativPosition[ 0 ] / xScale, - distToPlane + radarHeight / 2.0 + relativPosition[ 2 ] / yScale ); - + if ( (*it)->isOnRadar() == false ){ - radarMap->addChild( dotA ); + radarMap->addChild( dotA ); radarMap->addChild( dotB ); (*it)->onRadar( true ); - } + } } else { // if not in radarrange if ( (*it)->isOnRadar() == true ){ radarMap->removeChild( dotA->getName() ); @@ -447,7 +449,7 @@ } } -SectorObjectMoveable * Sector::createMoveableObject( const Ogre::String & name, int userID, int childID, +SectorObjectMoveable * Sector::createMoveableObject( const Ogre::String & name, int userID, int childID, Vessel & vessel ){ SectorObjectMoveable * obj = new SectorObjectMoveable( name, this, userID, childID, new Vessel( vessel ) ); sectorObjects_.insert( obj ); @@ -462,7 +464,7 @@ if ( obj->isOnRadar() && radar_ ){ Ogre::Overlay * radar = Ogre::OverlayManager::getSingleton().getByName( "Radar" ); - Ogre::OverlayContainer * radarMap = radar->getChild( "Radar/Map" ); + Ogre::OverlayContainer * radarMap = radar->getChild( "Radar/Map" ); radarMap->removeChild( obj->dotA()->getName() ); radarMap->removeChild( obj->dotB()->getName() ); } @@ -517,7 +519,7 @@ } -SectorObjectMoveableAi * Sector::createAiMoveableObject( const Ogre::String & name, int userID, int childID, +SectorObjectMoveableAi * Sector::createAiMoveableObject( const Ogre::String & name, int userID, int childID, Vessel & vessel ){ SectorObjectMoveableAi * obj = new SectorObjectMoveableAi( name, this, userID, childID, new Vessel( vessel ) ); sectorObjects_.insert( obj ); @@ -532,8 +534,8 @@ int childID = 1; while ( localAiObjects_.count( createGlobalID( network_->userID(), childID ) ) ){ childID ++; } - SectorObjectMoveableAi *obj = createAiMoveableObject( network_->userName() + "_Spawn" + toStr( childID ), - network_->userID(), childID, + SectorObjectMoveableAi *obj = createAiMoveableObject( network_->userName() + "_Spawn" + toStr( childID ), + network_->userID(), childID, *VesselManager::getSingleton().vessel( vesselName ) ); if ( avatar_ ) obj->setTarget( avatar_ ); @@ -549,7 +551,7 @@ obj->setThrust( obj->maxThrust() ); // obj->mainNode()->setPosition( 0.0f, 0.0f, 200.0f); - + sendVesselRegister( obj ); sendVesselMovement( obj ); } @@ -563,13 +565,13 @@ avatar_->mainNode()->setPosition( 0.0, 0.0, 500.0 ); avatar_->mainNode()->setOrientation( Ogre::Quaternion( 1.0, 0.0, 0.0, 0.0 ) ); // avatar_->setVelocity( Ogre::Vector3( 0.0, 0.0, -20.0 ) ); - + avatar_->setVisible( false ); sendVesselRegister( avatar_ ); } void Sector::destructAvatarObject( ){ - for ( std::map< long, SectorObjectMoveableAi * >::iterator it = localAiObjects_.begin(); + for ( std::map< long, SectorObjectMoveableAi * >::iterator it = localAiObjects_.begin(); it != localAiObjects_.end(); it ++ ){ if ( it->second->target() == avatar_ ){ @@ -652,22 +654,22 @@ Ogre::Real thickness = 200.0; // Of course this must be less than the radius value. Ogre::Real nSegments = 96; Ogre::Real dPhi = 2.0 * 3.141592 / nSegments; - + circle->begin( "shader/gradient", Ogre::RenderOperation::OT_TRIANGLE_LIST); circle->getSection( 0 )->setCustomParameter( 0, Ogre::Vector4( 23./255, 118./255, 9./255, 0.1 ) ); circle->getSection( 0 )->setCustomParameter( 1, Ogre::Vector4( radius, 0, 0, 0 ) ); - + unsigned point_index = 0; for ( int segment = 0; segment < nSegments; segment++ ) { Ogre::Real theta = segment * dPhi; - circle->position( radius * cos( theta ), + circle->position( radius * cos( theta ), 0, radius * sin( theta ) ); - circle->position( (radius - thickness) * cos( theta ), + circle->position( (radius - thickness) * cos( theta ), 0, (radius - thickness) * sin( theta ) ); - + if ( segment > 0 ){ point_index = (segment+1)*2-1; circle->quad( point_index, point_index-1, point_index-3, point_index-2 ); @@ -676,7 +678,7 @@ } circle->quad( 1, 0, (uint)nSegments*2-2, (uint)nSegments*2-1 ); circle->quad( 1, (uint)nSegments*2-1, (uint)nSegments*2-2, 0 ); - circle->end(); + circle->end(); object->translate( 0, 0, 50); object->pitch( Ogre::Degree( 10 ) ); @@ -694,7 +696,7 @@ Ogre::Real thickness = 4; // Of course this must be less than the radius value. Ogre::Real nSegments = 32; Ogre::Real dPhi = 2.0 * 3.141592 / nSegments; - + unsigned point_index = 0; int nRings = 10; @@ -706,13 +708,13 @@ for ( int segment = 0; segment < nSegments; segment++ ) { Ogre::Real theta = segment * dPhi; - circle->position( radius * cos( theta ), - -radius + i * radius /( nRings / 2.0 ), + circle->position( radius * cos( theta ), + -radius + i * radius /( nRings / 2.0 ), radius * sin( theta ) ); - circle->position( (radius - thickness) * cos( theta ), - -radius + i * radius / ( nRings / 2.0 ), + circle->position( (radius - thickness) * cos( theta ), + -radius + i * radius / ( nRings / 2.0 ), (radius - thickness) * sin( theta ) ); - + if ( segment > 0 ){ point_index = (segment+1)*2-1; circle->quad( point_index, point_index-1, point_index-3, point_index-2 ); @@ -721,9 +723,9 @@ } circle->quad( 1, 0, (uint)nSegments*2-2, (uint)nSegments*2-1 ); circle->quad( 1, (uint)nSegments*2-1, (uint)nSegments*2-2, 0 ); - circle->end(); + circle->end(); } - + object->translate( -2000, -200, -300); object->attachObject( circle ); } @@ -740,7 +742,7 @@ void Sector::sendAllVesselInfos( ){ if ( avatar_ ){ sendVesselStatus( avatar_ ); - + for ( std::map< long, SectorObjectMoveableAi * >::iterator it = localAiObjects_.begin(); it != localAiObjects_.end(); it ++ ){ if ( it->second->target() == avatar_ ){ sendVesselMovement( it->second ); @@ -761,7 +763,7 @@ obj->scaledPitch(), obj->scaledRoll(), 0 ); - + network_->send( msg ); } } @@ -769,7 +771,7 @@ void Sector::sendVesselRegister( SectorObjectMoveableLocal * obj ){ if ( obj ) { log_->info( std::string( "Send register " ) + obj->name() + " id:" + toStr( obj->vessel()->id() ) ); - MessageBodyShipRegister msg( obj->userID(), obj->childID(), obj->name(), obj->mainNode()->getPosition(), + MessageBodyShipRegister msg( obj->userID(), obj->childID(), obj->name(), obj->mainNode()->getPosition(), obj->vessel()->id(), obj->mass(), obj->maxShield(), obj->maxThrust() ); network_->send( msg ); } @@ -777,11 +779,11 @@ } void Sector::receiveVesselRegister( const MessageBodyShipRegister & msg ){ - + if ( !movableObjects_.count( createGlobalID( msg.senderID(), msg.childID() ) ) ){ if ( msg.childID() == 0 ){ log_->info( "Create player object " + msg.name()+ " " + toStr( msg.senderID() ) + " VesselID: " + toStr( msg.vesselID() ) ); - SectorObjectMoveable * obj = createMoveableObject( msg.name(), msg.senderID(), msg.childID(), + SectorObjectMoveable * obj = createMoveableObject( msg.name(), msg.senderID(), msg.childID(), *VesselManager::getSingleton().vessel( msg.vesselID() ) ); obj->mainNode()->setPosition( msg.position() ); obj->setMass( msg.mass() ); @@ -789,23 +791,23 @@ obj->setMaxThrust( msg.maxThrust() ); } else { - log_->info( "Create ai object " + msg.name()+ " " + toStr( msg.senderID() ) + " " + + log_->info( "Create ai object " + msg.name()+ " " + toStr( msg.senderID() ) + " " + toStr( (int)msg.childID() ) + " " + toStr( msg.vesselID() ) ); - - SectorObjectMoveableAi * obj = createAiMoveableObject( msg.name(), msg.senderID(), msg.childID(), + + SectorObjectMoveableAi * obj = createAiMoveableObject( msg.name(), msg.senderID(), msg.childID(), *VesselManager::getSingleton().vessel( msg.vesselID() ) ); obj->mainNode()->setPosition( msg.position() ); - + if ( movableObjects_.count( createGlobalID( msg.senderID(), 0 ) ) ){ log_->info( "ai object target: " + movableObjects_[ createGlobalID( msg.senderID(), 0 ) ]->name() ); obj->setTarget( movableObjects_[ createGlobalID( msg.senderID(), 0 ) ] ); - } + } } sendAllVesselInfos( ); } else { - log_->warn( std::string( "Registering: object allready exist: " ) + + log_->warn( std::string( "Registering: object allready exist: " ) + movableObjects_[ createGlobalID( msg.senderID(), msg.childID() ) ]->name() ); } @@ -827,9 +829,9 @@ SectorObjectMoveable *obj = movableObjects_[ createGlobalID( msg.senderID(), msg.childID() ) ]; destructMoveableObject( obj ); - + } else { - log_->warn( std::string( "Deregistering request for unknown object: " ) + + log_->warn( std::string( "Deregistering request for unknown object: " ) + toStr( msg.senderID() ) + ": " + toStr( (int)msg.childID() ) ); } } @@ -847,7 +849,7 @@ SectorObjectMoveable *obj = movableObjects_[ createGlobalID( msg.senderID(), msg.childID() ) ]; obj->deathSequence( 0.0 ); } else { - log_->warn( std::string( "Died vessel request for unknown object: " ) + + log_->warn( std::string( "Died vessel request for unknown object: " ) + toStr( msg.senderID() ) + ": " + toStr( (int)msg.childID() ) ); } } @@ -858,8 +860,8 @@ //** we sort the movement messaged for ( size_t i = 0; i < movements.size(); i ++ ){ -// LogManager::getSingleton().debug( std::string( "Movement: " ) + -// movableObjects_[ createGlobalID( movements[ i ]->senderID(), movements[ i ]->childID() )]->name() + " " + toStr( movements[ i ]->senderID() ) + " " + toStr( (int)movements[ i ]->childID() ) + +// LogManager::getSingleton().debug( std::string( "Movement: " ) + +// movableObjects_[ createGlobalID( movements[ i ]->senderID(), movements[ i ]->childID() )]->name() + " " + toStr( movements[ i ]->senderID() ) + " " + toStr( (int)movements[ i ]->childID() ) + // " " + toStr( movements[ i ]->position() ) ); if ( movements[ i ]->senderID() != network_->userID() ){ @@ -875,7 +877,7 @@ it->second->setFlightProperties( (*i->second) ); } else { std::cerr << "Requested non existant object for shipmovement: " - << network_->userName( i->second->senderID() ) << " at: " + << network_->userName( i->second->senderID() ) << " at: " << i->second->position() << " this should not happen." << std::endl; } } @@ -947,7 +949,7 @@ void Sector::sendProjectile( const Projectile & projectile ){ if ( network_->online() ){ MessageBodyShipProjectileFired msg( projectile.parent().childID(), projectile.shotCount(), - projectile.position(), projectile.velocity(), + projectile.position(), projectile.velocity(), projectile.damage(), projectile.lifeTime() ); network_->send( msg ); } @@ -959,7 +961,7 @@ std::map< long, SectorObjectMoveable * >::iterator it; if ( ( it = movableObjects_.find( createGlobalID( msg.senderID(), msg.childID() ) ) ) != movableObjects_.end() ){ // Projectile * pro = new Projectile( it->second, msg.shotCount(), msg.velocity().length(), msg.damage(), msg.liveTime() ); -// it->second->addProjectile( pro ); +// it->second->addProjectile( pro ); } else { log_->warn( "Unknown shooter" ); } Modified: branches/ogsector/src/metaserver.cpp =================================================================== --- branches/ogsector/src/metaserver.cpp 2007-07-27 15:12:58 UTC (rev 639) +++ branches/ogsector/src/metaserver.cpp 2007-07-27 15:55:32 UTC (rev 640) @@ -19,9 +19,13 @@ ***************************************************************************/ #include "metaserver.h" -#include <boost/regex.hpp> -#include "config.h" +//#include <boost/regex.hpp> +//#include "config.h" +#ifndef PACKAGE_VERSION +#define PACKAGE_VERSION +#endif + namespace OpenGate{ MetaConnection::MetaConnection(asio::io_service & io_service) : @@ -166,8 +170,14 @@ asio::write(socket_, request); // Read the response status line. - asio::read_until(socket_, response, boost::regex("\r\n")); +#ifdef WIN32 + // we dont have boost:regex within win32, i will fix this later (carsten) +//asio::read_until(socket_, response, "\n"); + #else + asio::read_until(socket_, response, boost::regex("\r\n")); + #endif + // Check that response is OK. std::istream response_stream(&response); std::string http_version; @@ -186,7 +196,12 @@ } // Read the response headers, which are terminated by a blank line. + #ifdef WIN32 + // we dont have boost:regex within win32, i will fix this later (carsten) +//asio::read_until(socket_, response, "\n"); + #else asio::read_until(socket_, response, boost::regex("\r\n\r\n")); + #endif // Process the response headers. (to get the crap of the response before reading the body!) std::string header; Modified: branches/ogsector/src/opengateclient.cpp =================================================================== --- branches/ogsector/src/opengateclient.cpp 2007-07-27 15:12:58 UTC (rev 639) +++ branches/ogsector/src/opengateclient.cpp 2007-07-27 15:55:32 UTC (rev 640) @@ -111,7 +111,9 @@ hostname = optarg; break; case 'v': - log->info ( std::string (PACKAGE_STRING) ); +#ifdef PACKAGE_STRING + log->info ( std::string (PACKAGE_STRING) ); +#endif delete log; return EXIT_SUCCESS; case '?': @@ -125,7 +127,7 @@ abort(); } } - + log->info("Starting up"); #ifdef PACKAGE_STRING @@ -150,15 +152,15 @@ } 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 ); @@ -182,8 +184,8 @@ #endif } - + nw.close(); delete log; Modified: branches/ogsector/win32/ogsectorclient/ogsectorclient.exe =================================================================== (Binary files differ) Modified: branches/ogsector/win32/ogsectorclient/resources.cfg =================================================================== --- branches/ogsector/win32/ogsectorclient/resources.cfg 2007-07-27 15:12:58 UTC (rev 639) +++ branches/ogsector/win32/ogsectorclient/resources.cfg 2007-07-27 15:55:32 UTC (rev 640) @@ -6,6 +6,7 @@ FileSystem=../../data FileSystem=../../data/materials FileSystem=../../data/textures +FileSystem=../../data/asteroids Zip=../../data/simpleSkybox.zip FileSystem=../../data/MediaFromOgre FileSystem=../../data/gui Modified: branches/ogsector/win32/ogsectorclient/runClient.bat =================================================================== --- branches/ogsector/win32/ogsectorclient/runClient.bat 2007-07-27 15:12:58 UTC (rev 639) +++ branches/ogsector/win32/ogsectorclient/runClient.bat 2007-07-27 15:55:32 UTC (rev 640) @@ -1 +1 @@ -ogsectorclient fraps 192.168.1.2 --ogreconfig=1 +ogsectorclient -c This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spo...@us...> - 2007-07-30 20:08:35
|
Revision: 649 http://opengate.svn.sourceforge.net/opengate/?rev=649&view=rev Author: spom_spom Date: 2007-07-30 13:08:38 -0700 (Mon, 30 Jul 2007) Log Message: ----------- win compatibility commit Modified Paths: -------------- branches/ogsector/src/GameStateManager.cpp branches/ogsector/win32/ogsectorclient/ogre.cfg branches/ogsector/win32/ogsectorclient/ogsectorclient.exe branches/ogsector/win32/ogsectorclient/resources.cfg Modified: branches/ogsector/src/GameStateManager.cpp =================================================================== --- branches/ogsector/src/GameStateManager.cpp 2007-07-30 19:58:06 UTC (rev 648) +++ branches/ogsector/src/GameStateManager.cpp 2007-07-30 20:08:38 UTC (rev 649) @@ -59,7 +59,7 @@ //** start for test purposes; // const Ogre::RenderSystemCapabilities * caps = Ogre::Root::getSingleton().getRenderSystem()->getCapabilities(); // if ( !caps->hasCapability( Ogre::RSC_VERTEX_PROGRAM ) ) { -// OGRE_EXCEPT(Ogre::Exception::ERR_NOT_IMPLEMENTED, "Your card does not support vertex programs.", +// OGRE_EXCEPT(Ogre::Exception::ERR_NOT_IMPLEMENTED, "Your card does not support vertex programs.", // "GameStateManager::GameStateManager"); // } // if ( !( caps->hasCapability( Ogre::RSC_FRAGMENT_PROGRAM ) || caps->hasCapability( Ogre::RSC_DOT3 ) ) ) { @@ -67,11 +67,11 @@ // "GameStateManager::GameStateManager" ); // } -// Ogre::SceneManager* sceneMgr = devices_.ogreRoot->createSceneManager(Ogre::ST_GENERIC); -// Ogre::Camera* camera = sceneMgr->createCamera("SimpleCamera"); +// Ogre::SceneManager* sceneMgr = devices_.ogreRoot->createSceneManager(Ogre::ST_GENERIC); +// Ogre::Camera* camera = sceneMgr->createCamera("SimpleCamera"); // Ogre::Viewport* viewPort = devices_.renderWindow->addViewport(camera); // Ogre::FrameListener frameListener; -// devices_.ogreRoot->addFrameListener(&frameListener); +// devices_.ogreRoot->addFrameListener(&frameListener); // camera->setPosition( Ogre::Vector3( 0, 0, 200 ) ); // camera->lookAt( Ogre::Vector3( 0, 0, -300 ) ); // camera->setNearClipDistance( 1 ); @@ -87,9 +87,9 @@ // light->attachObject( l ); // Ogre::MeshPtr pMesh = Ogre::MeshManager::getSingleton().load( "ogrehead.mesh", -// Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, -// Ogre::HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY, -// Ogre::HardwareBuffer::HBU_STATIC_WRITE_ONLY, +// Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, +// Ogre::HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY, +// Ogre::HardwareBuffer::HBU_STATIC_WRITE_ONLY, // true, true); // unsigned short src, dest; // if ( !pMesh->suggestTangentVectorBuildParams( Ogre::VES_TANGENT, src, dest) ) { @@ -100,7 +100,7 @@ // shape->setMaterialName("Examples/BumpMapping/MultiLight"); // mainNode->attachObject( shape ); -// devices_.ogreRoot->startRendering(); +// devices_.ogreRoot->startRendering(); // while( 1 ){ // devices_.ogreRoot->renderOneFrame( ); // } @@ -179,12 +179,12 @@ //hack-mack enterDockedStateHack_ = false; - } + } while ( !shutdownRequest_ ){ devices_.inputManager->capture(); - if ( enterDockedStateHack_ ) start( findByName( "DockedState" ) ); + if ( enterDockedStateHack_ ) start( findByName( "DockedState" ) ); captureNetwork(); @@ -221,13 +221,13 @@ if ( msgs.size() > 0 ) { // LogManager::getSingleton().debug( std::string( "Pullcount: " ) + toStr( msgs.size() ) ); for ( size_t i = 0; i < msgs.size(); i ++ ){ - + // LogManager::getSingleton().debug( std::string( "Pull: " ) + toStr( (int)msgs[ i ][ 0 ] ) ); // if ( msgs[ i ][ 0 ] == PROTO_SHIPMOVEMENT ) { // MessageBodyShipMovement m( &msgs[ i ][ 0 ] ); // std::cout << m << std::endl; // } - + switch ( msgs[ i ][ 0 ] ){ case PROTO_CHAT:{ devices_.network->ping(); @@ -314,7 +314,7 @@ stateStack_.back()->exit(); stateStack_.pop_back(); } - + // resume previous game state or quit if there isn't one if ( !stateStack_.empty() ) { init_( stateStack_.back() ); @@ -365,7 +365,7 @@ devices_.console->addCommand( "/q", &GameStateManager::CMD_shutdown, "Shutting down the client. Shortcut for /quit" ); devices_.console->addCommand( "/quit", &GameStateManager::CMD_shutdown, "Shutting down the client" ); - devices_.console->addCommand( "/help", &GameStateManager::CMD_printHelp, "Show this help" ); + devices_.console->addCommand( "/help", &GameStateManager::CMD_printHelp, "Show this help" ); devices_.console->addCommand( "/time", &GameStateManager::CMD_printTime, "Show current system time" ); devices_.console->addCommand( "/ai", &GameStateManager::CMD_spawnAi, "[name] Spawn ai subject. /ai help show all available ships." ); @@ -461,31 +461,31 @@ unsigned long hWnd; devices_.renderWindow->getCustomAttribute( "WINDOW", &hWnd ); devices_.inputManager->init( hWnd ); - devices_.inputManager->setWindowExtents( devices_.renderWindow->getWidth( ), + devices_.inputManager->setWindowExtents( devices_.renderWindow->getWidth( ), devices_.renderWindow->getHeight( ) ); return true; } -void GameStateManager::CMD_shutdown( const std::vector < std::string > & argv ){ - shutdown(); +void GameStateManager::CMD_shutdown( const std::vector < std::string > & argv ){ + shutdown(); } -void GameStateManager::CMD_printHelp( const std::vector < std::string > & argv ){ - devices_.console->printHelp(); +void GameStateManager::CMD_printHelp( const std::vector < std::string > & argv ){ + devices_.console->printHelp(); } -void GameStateManager::CMD_printTime( const std::vector < std::string > & argv ){ +void GameStateManager::CMD_printTime( const std::vector < std::string > & argv ){ std::time_t now = std::time( 0 ); struct tm * time = localtime( &now ); devices_.console->print( asctime( time ) ); } -void GameStateManager::CMD_spawnAi( const std::vector < std::string > & argv ){ +void GameStateManager::CMD_spawnAi( const std::vector < std::string > & argv ){ std::string aiName = "Squid"; if ( argv.size() > 1 ){ aiName = argv[ 1 ]; } - + bool showHelp = false; if ( aiName != "help" ){ if ( stateStack_.back()->name() == "UnDockedState" ){ @@ -511,4 +511,4 @@ } } -} // namespace OpenGate +} // namespace OpenGate Modified: branches/ogsector/win32/ogsectorclient/ogre.cfg =================================================================== --- branches/ogsector/win32/ogsectorclient/ogre.cfg 2007-07-30 19:58:06 UTC (rev 648) +++ branches/ogsector/win32/ogsectorclient/ogre.cfg 2007-07-30 20:08:38 UTC (rev 649) @@ -1,4 +1,4 @@ -Render System=OpenGL Rendering Subsystem +Render System=Direct3D9 Rendering Subsystem [Direct3D9 Rendering Subsystem] Allow NVPerfHUD=No Modified: branches/ogsector/win32/ogsectorclient/ogsectorclient.exe =================================================================== (Binary files differ) Modified: branches/ogsector/win32/ogsectorclient/resources.cfg =================================================================== --- branches/ogsector/win32/ogsectorclient/resources.cfg 2007-07-30 19:58:06 UTC (rev 648) +++ branches/ogsector/win32/ogsectorclient/resources.cfg 2007-07-30 20:08:38 UTC (rev 649) @@ -29,7 +29,7 @@ FileSystem=../../../../trunk/data/engines FileSystem=../../../../trunk/data/capacitors FileSystem=../../../../trunk/data/radars -FileSystem=../../../../trunk/data/shield +FileSystem=../../../../trunk/data/shields FileSystem=../../../../trunk/data/ECMs FileSystem=../../../../trunk/data/power_plants FileSystem=../../../../trunk/data/guns This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spo...@us...> - 2007-08-06 19:12:55
|
Revision: 653 http://opengate.svn.sourceforge.net/opengate/?rev=653&view=rev Author: spom_spom Date: 2007-08-06 12:12:55 -0700 (Mon, 06 Aug 2007) Log Message: ----------- some small fixes Modified Paths: -------------- branches/ogsector/data/materials/gradientshader.material branches/ogsector/src/Station.cpp branches/ogsector/src/Station.h Modified: branches/ogsector/data/materials/gradientshader.material =================================================================== --- branches/ogsector/data/materials/gradientshader.material 2007-08-05 21:45:05 UTC (rev 652) +++ branches/ogsector/data/materials/gradientshader.material 2007-08-06 19:12:55 UTC (rev 653) @@ -1,4 +1,4 @@ -vertex_program shader/gradientVP cg +vertex_program shader/gradientVP_CG cg { source gradientshader.cg entry_point gradient_vp @@ -11,27 +11,37 @@ } } -fragment_program shader/gradientFP cg +vertex_program shader/gradientVP_Unified unified { + delegate shader/gradientVP_CG +} + +fragment_program shader/gradientFP_CG cg +{ source gradientshader.cg entry_point main_fp - profiles vs_1_1 arbfp1 + profiles ps_1_1 arbfp1 } +vertex_program shader/gradientFP_Unified unified +{ + delegate shader/gradientFP_CG +} + material shader/gradient { technique { pass { - scene_blend alpha_blend - depth_write off - vertex_program_ref shader/gradientVP + scene_blend alpha_blend + depth_write off + vertex_program_ref shader/gradientVP_Unified { param_named_auto customParamColour custom 0 param_named_auto customParamRadius custom 1 } - fragment_program_ref shader/gradientFP + fragment_program_ref shader/gradientFP_Unified { } } Modified: branches/ogsector/src/Station.cpp =================================================================== --- branches/ogsector/src/Station.cpp 2007-08-05 21:45:05 UTC (rev 652) +++ branches/ogsector/src/Station.cpp 2007-08-06 19:12:55 UTC (rev 653) @@ -20,6 +20,8 @@ #include "Station.h" #include "GameStateManager.h" +#include "OpcodeWrapper.h" + #include <OgreString.h> #include <OgreMesh.h> #include <OgreSubMesh.h> @@ -28,73 +30,94 @@ #include <OgreMeshManager.h> #include <OgreSceneManager.h> #include <OgreManualObject.h> -#include <OpcodeWrapper.h> namespace OpenGate{ +void readSubEntity( Ogre::SubEntity * entity, std::vector< Ogre::Vector3 > & verts, + std::vector< Triangle > & tris ){ + + Ogre::VertexData * vd = entity->getSubMesh()->vertexData; + const Ogre::VertexElement * posElem = vd->vertexDeclaration->findElementBySemantic( Ogre::VES_POSITION ); + Ogre::HardwareVertexBufferSharedPtr vbuf = vd->vertexBufferBinding->getBuffer( posElem->getSource() ); + unsigned char * vertex = static_cast< unsigned char * >( vbuf->lock( Ogre::HardwareBuffer::HBL_READ_ONLY ) ); + + float * pReal; + for( uint j = 0; j < vd->vertexCount; ++j, vertex += vbuf->getVertexSize() ){ + posElem->baseVertexPointerToElement( vertex, & pReal); + verts.push_back( Ogre::Vector3( pReal[ 0 ], pReal[ 1 ], pReal[ 2 ] ) ); + } + vbuf->unlock(); + + Ogre::IndexData * index_data = entity->getSubMesh()->indexData; + uint numTris = index_data->indexCount / 3; + Ogre::HardwareIndexBufferSharedPtr ibuf = index_data->indexBuffer; + bool use32bitindexes = (ibuf->getType() == Ogre::HardwareIndexBuffer::IT_32BIT ); + + Uint32 * pLong = static_cast< Uint32 * >( ibuf->lock( Ogre::HardwareBuffer::HBL_READ_ONLY ) ); + Uint16 * pShort = reinterpret_cast< Uint16 * >( pLong ); + + for ( uint k = 0; k < numTris; k++ ) { + tris.push_back( Triangle() ); + if ( use32bitindexes ) { + tris.back().a = pLong[ k * 3 ]; + tris.back().b = pLong[ k * 3 + 1 ]; + tris.back().c = pLong[ k * 3 + 2 ]; + } else { + tris.back().a = pShort[ k * 3 ]; + tris.back().b = pShort[ k * 3 + 1 ]; + tris.back().c = pShort[ k * 3 + 2 ]; + } + } + ibuf->unlock(); +} + std::string Station::meshName( ){ return strCopyToLowerCase( strReplaceBlankToUnderscore( name_ ) ) + ".mesh"; } - StationDockPad::StationDockPad( const std::string & name, Sector * sector, Ogre::SubEntity * dockPad, Ogre::SceneNode * dockPadNode) : BaseObject( name, sector ), dockPadNode_( dockPadNode ){ dockPadManualObject_ = sceneMgr_->createManualObject( name_ + "/ManualObject" ); - //** collect vertex data; - Ogre::VertexData * vd = dockPad->getSubMesh()->vertexData; - const Ogre::VertexElement * posElem = vd->vertexDeclaration->findElementBySemantic( Ogre::VES_POSITION ); - - Ogre::HardwareVertexBufferSharedPtr vbuf = vd->vertexBufferBinding->getBuffer( posElem->getSource() ); - unsigned char * vertex = static_cast< unsigned char * >( vbuf->lock( Ogre::HardwareBuffer::HBL_READ_ONLY ) ); - + std::vector < Ogre::Vector3 > verts; + std::vector < Triangle > tris; + readSubEntity( dockPad, verts, tris ); + dockPadManualObject_->begin( dockPad->getMaterialName(), Ogre::RenderOperation::OT_TRIANGLE_LIST); - float * pReal; Ogre::Real xmin( 9e99 ), xmax( -9e99 ), ymin( 9e99 ), ymax( -9e99 ), zmin( 9e99 ), zmax( -9e99 ); dockPosition_ = Ogre::Vector3::ZERO; - for( uint j = 0; j < vd->vertexCount; ++j, vertex += vbuf->getVertexSize() ){ - posElem->baseVertexPointerToElement( vertex, & pReal); - dockPosition_ += Ogre::Vector3( pReal[ 0 ], pReal[ 1 ], pReal[ 2 ] ); + for( uint i = 0; i < verts.size(); i++ ){ + dockPosition_ += verts[ i ]; - xmin = min( xmin, pReal[ 0 ] ); xmax = max( xmax, pReal[ 0 ] ); - ymin = min( ymin, pReal[ 1 ] ); ymax = max( ymax, pReal[ 1 ] ); - zmin = min( zmin, pReal[ 2 ] ); zmax = max( zmax, pReal[ 2 ] ); + xmin = min( xmin, verts[ i ][ 0 ] ); xmax = max( xmax, verts[ i ][ 0 ] ); + ymin = min( ymin, verts[ i ][ 1 ] ); ymax = max( ymax, verts[ i ][ 1 ] ); + zmin = min( zmin, verts[ i ][ 2 ] ); zmax = max( zmax, verts[ i ][ 2 ] ); - dockPadManualObject_->position( pReal[ 0 ], pReal[ 1 ], pReal[ 2 ] ); + dockPadManualObject_->position( verts[ i ] ); //pReal[ 0 ], pReal[ 1 ], pReal[ 2 ] ); } - vbuf->unlock(); - dockPosition_ /= vd->vertexCount; + dockPosition_ /= verts.size(); radius_ = max( xmax-xmin, ymax-ymin ); radius_ = max( radius_, zmax - zmin ); radius_ /= 2.0; - Ogre::IndexData * index_data = dockPad->getSubMesh()->indexData; - uint numTris = index_data->indexCount / 3; - Ogre::HardwareIndexBufferSharedPtr ibuf = index_data->indexBuffer; - bool use32bitindexes = (ibuf->getType() == Ogre::HardwareIndexBuffer::IT_32BIT ); + dockDirection_ = Ogre::Vector3::ZERO; + for ( uint i = 0; i < tris.size(); i++ ) { + dockPadManualObject_->triangle( tris[ i ].a, tris[ i ].b, tris[ i ].c ); + dockDirection_ += ( ( verts[ tris[ i ].b ] - verts[ tris[ i ].a ] ) + .crossProduct( verts[ tris[ i ].c ] - verts[ tris[ i ].a ] ) ).normalisedCopy(); + } + + dockDirection_ /= tris.size(); - Uint32 * pLong = static_cast< Uint32 * >( ibuf->lock( Ogre::HardwareBuffer::HBL_READ_ONLY ) ); - Uint16 * pShort = reinterpret_cast< Uint16 * >( pLong ); - - if ( use32bitindexes ) { - for ( uint k = 0; k < numTris; k++ ) { - dockPadManualObject_->triangle( pLong[ k*3 ], pLong[ k*3+1 ], pLong[ k*3+2 ] ); - } - } else { - for ( size_t k = 0; k < numTris; k++ ) { - dockPadManualObject_->triangle( pShort[ k*3 ], pShort[ k*3+1 ], pShort[ k*3+2 ] ); - } - } - ibuf->unlock(); dockPadManualObject_->end(); dockPadMesh_ = dockPadManualObject_->convertToMesh( name_ + "/DockPadMesh" ); dockPadEntity_ = sceneMgr_->createEntity( name_ + "/DockPadEntity", dockPadMesh_->getName() ); dockPadNode_->attachObject( dockPadEntity_ ); - dockPadNode_->translate(-0.01, 0.0, 0.0); +// dockPadNode_->translate(-0.01, 0.0, 0.0); collObj_ = OpcodeCollisionDetection::getSingleton().createObject( dockPadEntity_, this, "DockPad" ); } @@ -145,56 +168,23 @@ } else { if ( entity()->getSubEntity( i )->getMaterialName() == "Station/LaunchPad" ){ - launchPadNode_= mainNodeEntityRot_->createChildSceneNode( name_ + "/LaunchPadNode" ); - - Ogre::VertexData * vd = entity()->getSubEntity( i )->getSubMesh()->vertexData; - const Ogre::VertexElement * posElem = vd->vertexDeclaration->findElementBySemantic( Ogre::VES_POSITION ); - - Ogre::HardwareVertexBufferSharedPtr vbuf = vd->vertexBufferBinding->getBuffer( posElem->getSource() ); - unsigned char * vertex = static_cast< unsigned char * >( vbuf->lock( Ogre::HardwareBuffer::HBL_READ_ONLY ) ); - - float * pReal; - std::vector < Ogre::Vector3 > verts; - for( uint j = 0; j < vd->vertexCount; ++j, vertex += vbuf->getVertexSize() ){ - posElem->baseVertexPointerToElement( vertex, & pReal); - verts.push_back( Ogre::Vector3( pReal[ 0 ], pReal[ 1 ], pReal[ 2 ] ) ); - } - vbuf->unlock(); + std::vector < Triangle > tris; + readSubEntity( entity()->getSubEntity( i ), verts, tris ); - Ogre::IndexData * index_data = entity()->getSubEntity( i )->getSubMesh()->indexData; - uint numTris = index_data->indexCount / 3; - Ogre::HardwareIndexBufferSharedPtr ibuf = index_data->indexBuffer; - bool use32bitindexes = (ibuf->getType() == Ogre::HardwareIndexBuffer::IT_32BIT ); - - Uint32 * pLong = static_cast< Uint32 * >( ibuf->lock( Ogre::HardwareBuffer::HBL_READ_ONLY ) ); - Uint16 * pShort = reinterpret_cast< Uint16 * >( pLong ); - - numTris = 6; - Ogre::Vector3 normVector( Ogre::Vector3::ZERO ); - if ( use32bitindexes ) { - for ( uint k = 0; k < numTris; k++ ) { - std::cout << pLong[ k*3 ] << " " << pLong[ k*3+1 ] << " " << pLong[ k*3+2 ] << std::endl; - } - } else { - for ( size_t k = 0; k < numTris; k++ ) { -// std::cout << pShort[ k*3 ] << " " << pShort[ k*3+1 ] << " " << pShort[ k*3+2 ] << std::endl; -// std::cout << p1 << p2 << p3 << std::endl; - Ogre::Vector3 p1( verts[ pShort[ k*3 ] ] ); - Ogre::Vector3 p2( verts[ pShort[ k * 3 + 1 ] ] ); - Ogre::Vector3 p3( verts[ pShort[ k * 3 + 2 ] ] ); - normVector+=( ( p2 - p1 ).crossProduct( p3 - p1 ) ).normalisedCopy(); - } - } - ibuf->unlock(); - normVector /= 6.0; - Ogre::Vector3 launchPadPosition( Ogre::Vector3::ZERO ); - std::cout << verts.size() << std::endl; - for ( int j = 0; j < 18; j ++ ) launchPadPosition += verts[j]; + for ( int j = 0; j < 18; j ++ ) launchPadPosition += verts[ j ]; launchPadPosition /= 18; + + launchPadNode_= mainNodeEntityRot_->createChildSceneNode( name_ + "/LaunchPadNode" ); launchPadNode_->translate( launchPadPosition ); + Ogre::Vector3 normVector( Ogre::Vector3::ZERO ); + for ( int j = 0; j < 6; j ++ ){ + normVector += ( ( verts[ tris[ j ].b ] - verts[ tris[ j ].a ] ) + .crossProduct( verts[ tris[ j ].c ] - verts[ tris[ j ].a ] ) ).normalisedCopy(); + } + normVector /= 6.0; launchPadNode_->setDirection( normVector ); } } @@ -204,7 +194,7 @@ setBaseSize( station_->baseSize() ); if ( dockPad_ ){ - createRings( dockPad_->dockPosition(), dockPad_->radius() ); + createRings( dockPad_->dockPosition(), dockPad_->radius(), dockPad_->dockDirection() ); ringNode_->setVisible( false ); } } Modified: branches/ogsector/src/Station.h =================================================================== --- branches/ogsector/src/Station.h 2007-08-05 21:45:05 UTC (rev 652) +++ branches/ogsector/src/Station.h 2007-08-06 19:12:55 UTC (rev 653) @@ -29,6 +29,11 @@ namespace OpenGate{ +struct Triangle{ + int a, b, c; +}; + +void readSubEntity( Ogre::SubEntity * entity, std::vector< Ogre::Vector3 > & verts, std::vector< Triangle > & tris ); //! /*!*/ class Station : public Entity{ @@ -56,6 +61,8 @@ Ogre::Vector3 dockPosition( ) const { return dockPosition_; } + Ogre::Vector3 dockDirection( ) const { return dockDirection_; } + Ogre::Real radius() const { return radius_; } protected: @@ -65,6 +72,7 @@ Ogre::SceneNode * dockPadNode_; Ogre::Vector3 dockPosition_; + Ogre::Vector3 dockDirection_; Ogre::Real radius_; }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spo...@us...> - 2007-08-11 10:39:28
|
Revision: 658 http://opengate.svn.sourceforge.net/opengate/?rev=658&view=rev Author: spom_spom Date: 2007-08-11 03:39:28 -0700 (Sat, 11 Aug 2007) Log Message: ----------- Fixed annoying bug in gamestatemanger Modified Paths: -------------- branches/ogsector/data/materials/advancedMaterials.program branches/ogsector/src/DockedState.cpp branches/ogsector/src/DockedState.h branches/ogsector/src/GameStateManager.cpp branches/ogsector/src/GameStateManager.h branches/ogsector/src/OpcodeWrapper.cpp branches/ogsector/src/SectorObjects.cpp branches/ogsector/src/SectorObjects.h branches/ogsector/src/Station.cpp branches/ogsector/src/UnDockedState.cpp branches/ogsector/src/UnDockedState.h branches/ogsector/src/opengateclient.cpp Modified: branches/ogsector/data/materials/advancedMaterials.program =================================================================== --- branches/ogsector/data/materials/advancedMaterials.program 2007-08-07 19:00:24 UTC (rev 657) +++ branches/ogsector/data/materials/advancedMaterials.program 2007-08-11 10:39:28 UTC (rev 658) @@ -30,7 +30,7 @@ } // A really basic ambient pass program, support for one texture coodinate set -vertex_program BasicVertexPrograms/AmbientOneTexture cg +vertex_program BasicVertexPrograms/AmbientOneTextureCG cg { source Example_Basic.cg entry_point ambientOneTexture_vp @@ -49,7 +49,7 @@ { source Example_Basic.hlsl entry_point ambientOneTexture_vp - target vs_1_1 + target vs_1_1 arbvp1 default_params { @@ -72,5 +72,5 @@ { delegate BasicVertexPrograms/AmbientOneTextureGLSL delegate BasicVertexPrograms/AmbientOneTextureHLSL - delegate BasicVertexPrograms/AmbientOneTexture + delegate BasicVertexPrograms/AmbientOneTextureCG } \ No newline at end of file Modified: branches/ogsector/src/DockedState.cpp =================================================================== --- branches/ogsector/src/DockedState.cpp 2007-08-07 19:00:24 UTC (rev 657) +++ branches/ogsector/src/DockedState.cpp 2007-08-11 10:39:28 UTC (rev 658) @@ -92,7 +92,6 @@ } void DockedState::enter( ) { - launchUndockedState_ = false; log_->info("Entering dockstate"); resources_->guiRenderer->setTargetSceneManager( sceneMgr_ ); resources_->guiSystem->setGUISheet( overlayRootWindow_ ); @@ -111,6 +110,8 @@ CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"Config/BackButton" )->subscribeEvent( CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber( &DockedState::handleConfigBackButton, this ) ) ; + exitToUndockedState_ = false; + quitAllStates_ = false; } void DockedState::exit(){ @@ -126,19 +127,28 @@ resources_->inputManager->removeMouseListener( "DockedStateMouseListener" ); } +void DockedState::changeToUnDockedState(){ + exitToUndockedState_ = true; +} + bool DockedState::frameStarted( const Ogre::FrameEvent & evt ){ if ( shipConfigDialog_ ) shipConfigDialog_->update( evt.timeSinceLastFrame ); return true; } bool DockedState::frameEnded( const Ogre::FrameEvent & evt ){ - // if ( launchUndockedState_ ) parent_->start( parent_->findByName( "UnDockedState" ) ); + if ( exitToUndockedState_ ){ + parent_->changeGameState( parent_->findByName( "UnDockedState" ) ); + return false; + } else if ( quitAllStates_ ){ + parent_->shutdown(); + return false; + } return true; } bool DockedState::keyPressed( const OIS::KeyEvent & e ){ - //** ESCAPE leads to shutdown; if ( e.key == OIS::KC_ESCAPE) { switchConfigDialog( ); } if ( e.key == 70 ){ // 70 == Roll @@ -149,10 +159,7 @@ } } - if ( e.key == OIS::KC_F4 ){ - parent_->start( parent_->findByName( "UnDockedState" ) ); - return true; - } + if ( e.key == OIS::KC_F4 ){ changeToUnDockedState(); return true; } if ( e.key == OIS::KC_RETURN) { CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ConsoleEdit")->activate(); @@ -212,7 +219,7 @@ return true; } - parent_->start( parent_->findByName( "UnDockedState" ) ); + changeToUnDockedState(); return true; } Modified: branches/ogsector/src/DockedState.h =================================================================== --- branches/ogsector/src/DockedState.h 2007-08-07 19:00:24 UTC (rev 657) +++ branches/ogsector/src/DockedState.h 2007-08-11 10:39:28 UTC (rev 658) @@ -54,6 +54,8 @@ /*! Inherit to supply state exit code. */ virtual void exit( ); + void changeToUnDockedState(); + virtual bool frameStarted( const Ogre::FrameEvent & evt ); virtual bool frameEnded( const Ogre::FrameEvent & evt ); @@ -78,7 +80,7 @@ DockedState(); virtual ~DockedState(){} - inline bool handleQuit( const CEGUI::EventArgs & e ){ shutdown(); return true; } + inline bool handleQuit( const CEGUI::EventArgs & e ){ quitAllStates_ = true; return true;} bool handleLaunch( const CEGUI::EventArgs & e ); bool handleShipConfigButton( const CEGUI::EventArgs & e ); bool handleMarketButton( const CEGUI::EventArgs & e ); @@ -93,7 +95,8 @@ MarketDialog * marketDialog_; bool consoleMax_; - bool launchUndockedState_; + bool exitToUndockedState_; + bool quitAllStates_; }; } // namespace OpenGate Modified: branches/ogsector/src/GameStateManager.cpp =================================================================== --- branches/ogsector/src/GameStateManager.cpp 2007-08-07 19:00:24 UTC (rev 657) +++ branches/ogsector/src/GameStateManager.cpp 2007-08-11 10:39:28 UTC (rev 658) @@ -174,16 +174,11 @@ if ( state ){ shutdownRequest_ = false; changeGameState( state ); - - //hack-mack - enterDockedStateHack_ = false; } while ( !shutdownRequest_ ){ resources_.inputManager->capture(); - if ( enterDockedStateHack_ ) start( findByName( "DockedState" ) ); - captureNetwork(); Ogre::WindowEventUtilities::messagePump(); @@ -191,12 +186,12 @@ #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 { MSG msg; - while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { - if (msg.message == WM_QUIT){ + while ( PeekMessage( & msg, NULL, 0, 0, PM_REMOVE ) ) { + if ( msg.message == WM_QUIT ){ shutdown(); } else { - // TranslateMessage(&msg); - // DispatchMessage(&msg); + // TranslateMessage(&msg); + // DispatchMessage(&msg); } } } @@ -276,16 +271,16 @@ // cleanup the current game state if ( !stateStack_.empty() ) { cleanup_( stateStack_.back() ); - stateStack_.back()->exit(); stateStack_.back()->rootWindow()->removeChildWindow( configDialog_->rootWindow() ); + stateStack_.back()->exit(); stateStack_.pop_back(); } // store and init the new state stateStack_.push_back( state ); - init_( state ); stateStack_.back()->enter(); stateStack_.back()->rootWindow()->addChildWindow( configDialog_->rootWindow() ); + init_( state ); } bool GameStateManager::pushGameState( GameState * state ){ Modified: branches/ogsector/src/GameStateManager.h =================================================================== --- branches/ogsector/src/GameStateManager.h 2007-08-07 19:00:24 UTC (rev 657) +++ branches/ogsector/src/GameStateManager.h 2007-08-11 10:39:28 UTC (rev 658) @@ -97,7 +97,7 @@ /*! This is a special case function to cause a shutdown. */ void shutdown( ); - bool enterDockedStateHack_; +// bool enterDockedStateHack_; protected: Modified: branches/ogsector/src/OpcodeWrapper.cpp =================================================================== --- branches/ogsector/src/OpcodeWrapper.cpp 2007-08-07 19:00:24 UTC (rev 657) +++ branches/ogsector/src/OpcodeWrapper.cpp 2007-08-11 10:39:28 UTC (rev 658) @@ -130,7 +130,7 @@ uint nColl = collideInSectorContext_->rayCheck( ray, rayLength, OgreOpcode::COLLTYPE_EXACT, OgreOpcode::COLLTYPE_ALWAYS_EXACT, rayPickReport ); - std::cout << "checkCollideRay: " << " " << rayLength << " " << nColl <<std::endl; +// std::cout << "checkCollideRay: " << " " << rayLength << " " << nColl <<std::endl; for ( uint i = 0; i < nColl; i ++ ){ OgreOpcode::CollisionObject* col1 = rayPickReport[ i ]->this_object; Modified: branches/ogsector/src/SectorObjects.cpp =================================================================== --- branches/ogsector/src/SectorObjects.cpp 2007-08-07 19:00:24 UTC (rev 657) +++ branches/ogsector/src/SectorObjects.cpp 2007-08-11 10:39:28 UTC (rev 658) @@ -48,6 +48,7 @@ lifeTime_ = 0.0; selectable_ = false; + collObj_ = NULL; } BaseObject::~BaseObject(){ @@ -88,7 +89,7 @@ Ogre::OverlayManager::getSingleton().destroyOverlayElement( "Radar/Map/DotA_" + name_ ); Ogre::OverlayManager::getSingleton().destroyOverlayElement( "Radar/Map/DotB_" + name_ ); - OpcodeCollisionDetection::getSingleton().destroyObject( collObj_ ); + if ( collObj_ ) OpcodeCollisionDetection::getSingleton().destroyObject( collObj_ ); mainNodeEntityRot_->detachObject( entity_ ); sceneMgr_->destroyEntity( entity_ ); @@ -227,12 +228,14 @@ projectiles_.erase( it++ ); } - for ( std::list < GunObject * >::iterator it = activeGuns_.begin(); it != activeGuns_.end(); ){ + for ( std::list < GunObject * >::iterator it = activeGuns_.begin(); it != activeGuns_.end(); it++){ GunObject *gun = (*it); - activeGuns_.remove( *(it++) ); - mainNodeEntityRot_->removeAndDestroyChild( gun->sceneNode()->getName() ); - delete gun; + // activeGuns_.remove( *(it++) ); + mainNodeEntityRot_->removeAndDestroyChild( gun->sceneNode()->getName() ); + delete gun; } + activeGuns_.clear(); + } bool SectorObjectMoveable::update( Ogre::Real elapsedTime ){ @@ -438,6 +441,13 @@ roll_ = 0; pitch_ = 0; + mass_ = 1; + thrust_ = 0; + maxThrust_ = 0; + armor_ = 1; + shield_ = 0; + maxShield_ = 0; + velocity_ = 0.0; acceleration_ = 0.0; shotsFired_ = 0; @@ -468,7 +478,7 @@ void SectorObjectMoveable::updateThruster(){ if ( thrusterParticles_ ){ int nEmits = thrusterParticles_->getNumEmitters( ); - Ogre::Real thrustRate = 0; + Ogre::Real thrustRate = 0.0; if ( maxThrust() > 0 ) thrustRate = (float)thrust_ / maxThrust_ * 100.0; for ( int i = 0; i < nEmits; i ++ ){ @@ -535,6 +545,7 @@ maxShield_ = 0; if ( vessel_->shield() ) maxShield_ = vessel_->shield()->maxDeflection(); shield_ = maxShield_; + lastShieldSend_ = 0; } bool SectorObjectMoveableLocal::update( Ogre::Real elapsedTime ){ Modified: branches/ogsector/src/SectorObjects.h =================================================================== --- branches/ogsector/src/SectorObjects.h 2007-08-07 19:00:24 UTC (rev 657) +++ branches/ogsector/src/SectorObjects.h 2007-08-11 10:39:28 UTC (rev 658) @@ -375,8 +375,6 @@ std::list < GunObject * > activeGuns_; }; - - /*! Movable sector objets which is controled by the client */ class SectorObjectMoveableLocal : public SectorObjectMoveable { public: Modified: branches/ogsector/src/Station.cpp =================================================================== --- branches/ogsector/src/Station.cpp 2007-08-07 19:00:24 UTC (rev 657) +++ branches/ogsector/src/Station.cpp 2007-08-11 10:39:28 UTC (rev 658) @@ -19,6 +19,7 @@ ***************************************************************************/ #include "Station.h" +#include "Sector.h" #include "GameStateManager.h" #include "OpcodeWrapper.h" @@ -75,7 +76,7 @@ return strCopyToLowerCase( strReplaceBlankToUnderscore( name_ ) ) + ".mesh"; } -StationDockPad::StationDockPad( const std::string & name, Sector * sector, Ogre::SubEntity * dockPad, Ogre::SceneNode * dockPadNode) +StationDockPad::StationDockPad( const std::string & name, Sector * sector, Ogre::SubEntity * dockPad, Ogre::SceneNode * dockPadNode ) : BaseObject( name, sector ), dockPadNode_( dockPadNode ){ dockPadManualObject_ = sceneMgr_->createManualObject( name_ + "/ManualObject" ); @@ -138,7 +139,7 @@ void StationDockPad::collide( BaseObject * object ){ std::cout << "StationDockPad::collide" << std::endl; - ResourceManager::getSingleton().gameStateRoot->enterDockedStateHack_ = true; + sector_->listener()->changeToDockedState(); } StationObject::StationObject( Station & station, Sector * sector ) Modified: branches/ogsector/src/UnDockedState.cpp =================================================================== --- branches/ogsector/src/UnDockedState.cpp 2007-08-07 19:00:24 UTC (rev 657) +++ branches/ogsector/src/UnDockedState.cpp 2007-08-11 10:39:28 UTC (rev 658) @@ -238,7 +238,6 @@ // aniso_ = 1; // filtering_ = TFO_BILINEAR; - enterDockedState_ = false; sector_->createAvatarObject( *resources_->avatar ); if ( resources_->console ){ @@ -275,7 +274,8 @@ // Now trigger the pending pass updates Ogre::Pass::processPendingPassUpdates(); }//end_if(m_Root.. - //** end update SceneManager + //** end update SceneManager; + enterDockedState_ = false; } void UnDockedState::exit(){ @@ -304,6 +304,10 @@ // std::cout << "End: " << dumpSceneNodes( sceneMgr_->getRootSceneNode() ) << std::endl; } +void UnDockedState::changeToDockedState(){ + enterDockedState_ = true; +} + bool UnDockedState::switchConfigDialog( ){ resources_->gameStateRoot->switchConfigDialog( ); configMode_ = resources_->gameStateRoot->configDialog()->isVisible(); @@ -332,10 +336,6 @@ } bool UnDockedState::frameStarted( const Ogre::FrameEvent & evt ) { - //** this crashes at shutdown - //** if ( enterDockedState_ ) parent_->start( parent_->findByName( "DockedState" ) ); - if ( enterDockedState_ ) resources_->gameStateRoot->enterDockedStateHack_ = true; - if ( window_->isClosed() ) return false; timeSinceLastSectorUpdate_ += evt.timeSinceLastFrame; @@ -362,6 +362,11 @@ } bool UnDockedState::frameEnded( const Ogre::FrameEvent & evt ){ + if ( enterDockedState_ ) { + parent_->changeGameState( parent_->findByName( "DockedState" ) ); + return false; + } + return true; } @@ -426,8 +431,7 @@ sector_->avatarObject()->setScaledRoll( 0.0 ); } //** selfdestruct and eject; - if ( e.key == OIS::KC_F4 ) { resources_->gameStateRoot->enterDockedStateHack_ = true; } -// if ( e.key == OIS::KC_F4 || enterDockedState_ ) { parent_->start( parent_->findByName( "DockedState" ) ); }// enterDockedState_ = true; } + if ( e.key == OIS::KC_F4 ) { changeToDockedState(); return true; } if ( e.key == OIS::KC_F5 ) { duelistPilot_ = !duelistPilot_; } if ( e.key == OIS::KC_F6 ) { duelistTarget_ = !duelistTarget_; } if ( e.key == OIS::KC_F8 ) { sector_->avatarObject()->deathSequence( 0 ); } @@ -1069,7 +1073,7 @@ overlayRootWindow_->hide(); hudOverlay_->hide(); } else { - enterDockedState_ = true; + changeToDockedState(); } } // if avatar } Modified: branches/ogsector/src/UnDockedState.h =================================================================== --- branches/ogsector/src/UnDockedState.h 2007-08-07 19:00:24 UTC (rev 657) +++ branches/ogsector/src/UnDockedState.h 2007-08-11 10:39:28 UTC (rev 658) @@ -51,6 +51,8 @@ void exit(); + void changeToDockedState(); + bool switchConfigDialog( ); virtual void setupEventHandlers(); Modified: branches/ogsector/src/opengateclient.cpp =================================================================== --- branches/ogsector/src/opengateclient.cpp 2007-08-07 19:00:24 UTC (rev 657) +++ branches/ogsector/src/opengateclient.cpp 2007-08-11 10:39:28 UTC (rev 658) @@ -36,7 +36,7 @@ int main( int argc, char * argv[ ] ) { - int option_dialog = 1; + int option_dialog = 0; int option_version = 0; std::string username = "testuser"; std::string hostname = "localhost"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ult...@us...> - 2007-08-27 18:04:48
|
Revision: 701 http://opengate.svn.sourceforge.net/opengate/?rev=701&view=rev Author: ultrasick Date: 2007-08-27 11:04:51 -0700 (Mon, 27 Aug 2007) Log Message: ----------- "curser"->"cursor" Modified Paths: -------------- branches/ogsector/ToDo branches/ogsector/data/gui/imagesets/cursor.imageset branches/ogsector/data/gui/imagesets/defaultHUD.imageset branches/ogsector/data/gui/layouts/opengateUnDocked.layout branches/ogsector/data/gui/schemes/opengate.scheme branches/ogsector/data/materials/mousePointer.material branches/ogsector/data/materials/simpleHUD.material branches/ogsector/data/simpleHUD.overlay branches/ogsector/src/DockedState.cpp branches/ogsector/src/UnDockedState.cpp branches/ogsector/src/UnDockedState.h Added Paths: ----------- branches/ogsector/data/textures/flightCursor.png Removed Paths: ------------- branches/ogsector/data/textures/flightCurser.png Modified: branches/ogsector/ToDo =================================================================== --- branches/ogsector/ToDo 2007-08-27 17:46:56 UTC (rev 700) +++ branches/ogsector/ToDo 2007-08-27 18:04:51 UTC (rev 701) @@ -30,7 +30,7 @@ - Position, - Speed/MaxSpeed - Acceleration - - Mousecurser + - Mousecursor - Bullseye/VCT-1 (Duelist) - JG-like Radar @@ -47,7 +47,7 @@ - cleaning / refaktoring - integrate in currect OpenGate framework # - add licence header - - mark third persons thingies (mousecurser, skybox) + - mark third persons thingies (mousecursor, skybox) #ALT-TAB - free mousepointer from widget contents - fullscreen switch (probably not supported by ogre) - show Whos online Modified: branches/ogsector/data/gui/imagesets/cursor.imageset =================================================================== --- branches/ogsector/data/gui/imagesets/cursor.imageset 2007-08-27 17:46:56 UTC (rev 700) +++ branches/ogsector/data/gui/imagesets/cursor.imageset 2007-08-27 18:04:51 UTC (rev 701) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<Imageset Name="opengateCurser" Imagefile="cursor.png"> +<Imageset Name="opengateCursor" Imagefile="cursor.png"> <Image Name="Cursor1" XPos="00" YPos="00" Width="21" Height="21" /> <Image Name="Cursor2" XPos="21" YPos="00" Width="21" Height="21" /> <Image Name="Cursor3" XPos="42" YPos="00" Width="21" Height="21" /> Modified: branches/ogsector/data/gui/imagesets/defaultHUD.imageset =================================================================== --- branches/ogsector/data/gui/imagesets/defaultHUD.imageset 2007-08-27 17:46:56 UTC (rev 700) +++ branches/ogsector/data/gui/imagesets/defaultHUD.imageset 2007-08-27 18:04:51 UTC (rev 701) @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <Imageset Name="opengateHUD" Imagefile="defaultHUD.tga"> - <Image Name="FlightCurser" XPos="3" YPos="4" Width="20" Height="20" /> + <Image Name="FlightCursor" XPos="3" YPos="4" Width="20" Height="20" /> <Image Name="Center" XPos="0" YPos="30" Width="40" Height="40" /> - <Image Name="TargetCurser" XPos="0" YPos="71" Width="40" Height="40" /> - <Image Name="PilotFlightCurser" XPos="26" YPos="4" Width="20" Height="20" /> - <Image Name="TargetFlightCurser" XPos="45" YPos="71" Width="40" Height="40" /> + <Image Name="TargetCursor" XPos="0" YPos="71" Width="40" Height="40" /> + <Image Name="PilotFlightCursor" XPos="26" YPos="4" Width="20" Height="20" /> + <Image Name="TargetFlightCursor" XPos="45" YPos="71" Width="40" Height="40" /> <Image Name="GreenShieldLeft" XPos="4" YPos="135" Width="98" Height="280" /> <Image Name="Velocity" XPos="170" YPos="55" Width="40" Height="146" /> <Image Name="Capacitor" XPos="213" YPos="55" Width="40" Height="146" /> Modified: branches/ogsector/data/gui/layouts/opengateUnDocked.layout =================================================================== --- branches/ogsector/data/gui/layouts/opengateUnDocked.layout 2007-08-27 17:46:56 UTC (rev 700) +++ branches/ogsector/data/gui/layouts/opengateUnDocked.layout 2007-08-27 18:04:51 UTC (rev 701) @@ -100,12 +100,12 @@ <Property Name="Image" Value="set:opengateHUD image:Capacitor" /> </Window> </Window> - <Window Type="opengate/StaticImage" Name="HUDFlightCurser"> + <Window Type="opengate/StaticImage" Name="HUDFlightCursor"> <Property Name="UnifiedPosition" Value="{{0.5,-20},{0.5,-20}}" /> <Property Name="UnifiedSize" Value="{{0.0,20},{0.0,20}}" /> <Property Name="BackgroundEnabled" Value="False" /> <Property Name="FrameEnabled" Value="False" /> - <Property Name="Image" Value="set:opengateHUD image:FlightCurser" /> + <Property Name="Image" Value="set:opengateHUD image:FlightCursor" /> </Window> <Window Type="opengate/StaticImage" Name="HUDCenter"> <Property Name="UnifiedPosition" Value="{{0.5,-20},{0.5,-20}}" /> @@ -114,26 +114,26 @@ <Property Name="FrameEnabled" Value="False" /> <Property Name="Image" Value="set:opengateHUD image:Center" /> </Window> - <Window Type="opengate/StaticImage" Name="HUDTargetCurser"> + <Window Type="opengate/StaticImage" Name="HUDTargetCursor"> <Property Name="UnifiedPosition" Value="{{0.0,0},{0.0,0}}" /> <Property Name="UnifiedSize" Value="{{0.0,40},{0.0,40}}" /> <Property Name="BackgroundEnabled" Value="False" /> <Property Name="FrameEnabled" Value="False" /> - <Property Name="Image" Value="set:opengateHUD image:TargetCurser" /> + <Property Name="Image" Value="set:opengateHUD image:TargetCursor" /> </Window> - <Window Type="opengate/StaticImage" Name="HUDPilotFlightCurser"> + <Window Type="opengate/StaticImage" Name="HUDPilotFlightCursor"> <Property Name="UnifiedPosition" Value="{{0.0,0},{0.0,0}}" /> <Property Name="UnifiedSize" Value="{{0.0,20},{0.0,20}}" /> <Property Name="BackgroundEnabled" Value="False" /> <Property Name="FrameEnabled" Value="False" /> - <Property Name="Image" Value="set:opengateHUD image:PilotFlightCurser" /> + <Property Name="Image" Value="set:opengateHUD image:PilotFlightCursor" /> </Window> - <Window Type="opengate/StaticImage" Name="HUDTargetFlightCurser"> + <Window Type="opengate/StaticImage" Name="HUDTargetFlightCursor"> <Property Name="UnifiedPosition" Value="{{0.0,0},{0.0,0}}" /> <Property Name="UnifiedSize" Value="{{0.0,40},{0.0,40}}" /> <Property Name="BackgroundEnabled" Value="False" /> <Property Name="FrameEnabled" Value="False" /> - <Property Name="Image" Value="set:opengateHUD image:TargetFlightCurser" /> + <Property Name="Image" Value="set:opengateHUD image:TargetFlightCursor" /> </Window> <Window Type="opengate/StaticText" Name="HUDVelocityText"> Modified: branches/ogsector/data/gui/schemes/opengate.scheme =================================================================== --- branches/ogsector/data/gui/schemes/opengate.scheme 2007-08-27 17:46:56 UTC (rev 700) +++ branches/ogsector/data/gui/schemes/opengate.scheme 2007-08-27 18:04:51 UTC (rev 701) @@ -1,7 +1,7 @@ <?xml version="1.0" ?> <GUIScheme Name="opengate"> <Imageset Name="opengate" Filename="opengate.imageset" /> - <Imageset Name="opengateCurser" Filename="cursor.imageset" /> + <Imageset Name="opengateCursor" Filename="cursor.imageset" /> <Imageset Name="opengateHUD" Filename="defaultHUD.imageset" /> <ImagesetFromImage Name="MainWindowTopLeft" Filename="mainTopLeft.tga" /> Modified: branches/ogsector/data/materials/mousePointer.material =================================================================== --- branches/ogsector/data/materials/mousePointer.material 2007-08-27 17:46:56 UTC (rev 700) +++ branches/ogsector/data/materials/mousePointer.material 2007-08-27 18:04:51 UTC (rev 701) @@ -1,4 +1,4 @@ -//material OpenGate/FlightCurser +//material OpenGate/FlightCursor //{ // technique // { @@ -10,7 +10,7 @@ // // texture_unit // { -// texture textures/flightCurser.png +// texture textures/flightCursor.png // } // } // } Modified: branches/ogsector/data/materials/simpleHUD.material =================================================================== --- branches/ogsector/data/materials/simpleHUD.material 2007-08-27 17:46:56 UTC (rev 700) +++ branches/ogsector/data/materials/simpleHUD.material 2007-08-27 18:04:51 UTC (rev 701) @@ -15,7 +15,7 @@ } } -material SimpleHUD/FlightCurser +material SimpleHUD/FlightCursor { technique { @@ -27,7 +27,7 @@ texture_unit { - texture textures/flightCurser.png + texture textures/flightCursor.png } } } Modified: branches/ogsector/data/simpleHUD.overlay =================================================================== --- branches/ogsector/data/simpleHUD.overlay 2007-08-27 17:46:56 UTC (rev 700) +++ branches/ogsector/data/simpleHUD.overlay 2007-08-27 18:04:51 UTC (rev 701) @@ -91,14 +91,14 @@ // material SimpleHUD/CenterPointer // } // - container Panel(SimpleHUD/FlightCurser) + container Panel(SimpleHUD/FlightCursor) { metrics_mode pixels top 0 left 0 width 32 height 32 -// material SimpleHUD/FlightCurser +// material SimpleHUD/FlightCursor } // // container Panel(SimpleHUD/TargetPointer) Deleted: branches/ogsector/data/textures/flightCurser.png =================================================================== (Binary files differ) Added: branches/ogsector/data/textures/flightCursor.png =================================================================== (Binary files differ) Property changes on: branches/ogsector/data/textures/flightCursor.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: branches/ogsector/src/DockedState.cpp =================================================================== --- branches/ogsector/src/DockedState.cpp 2007-08-27 17:46:56 UTC (rev 700) +++ branches/ogsector/src/DockedState.cpp 2007-08-27 18:04:51 UTC (rev 701) @@ -54,7 +54,7 @@ overlayRootWindow_ = CEGUI::WindowManager::getSingleton().loadWindowLayout((CEGUI::utf8*)"opengateDocked.layout"); cursorFrame_ = 1; - cursorMaxFrames_ = CEGUI::ImagesetManager::getSingleton().getImageset( "opengateCurser" )->getImageCount(); + cursorMaxFrames_ = CEGUI::ImagesetManager::getSingleton().getImageset( "opengateCursor" )->getImageCount(); lastCursorFrameTime_ = 0.0f; Ogre::SceneNode * backgroundNode = sceneMgr_->getRootSceneNode()->createChildSceneNode( "Background" ); @@ -105,7 +105,7 @@ resources_->inputManager->addKeyListener( this, "DockedStateKeyListener" ); resources_->inputManager->addMouseListener( this, "DockedStateMouseListener" ); - resources_->guiSystem->setDefaultMouseCursor( (CEGUI::utf8*)"opengateCurser", (CEGUI::utf8*)"Cursor1" ); + resources_->guiSystem->setDefaultMouseCursor( (CEGUI::utf8*)"opengateCursor", (CEGUI::utf8*)"Cursor1" ); Ogre::Viewport * vp = resources_->renderWindow->addViewport( sceneMgr_->getCamera( "StationCamera" ), 0, 0.0, 0.0, 1.0f, 1.0f ); vp->setBackgroundColour( Ogre::ColourValue( 0, 0, 0) ); @@ -139,7 +139,7 @@ lastCursorFrameTime_ += evt.timeSinceLastFrame; - // CEGUI::MouseCursor::getSingleton().setImage( (CEGUI::utf8*)"opengateCurser", (CEGUI::utf8*)"Cursor5" ); + // CEGUI::MouseCursor::getSingleton().setImage( (CEGUI::utf8*)"opengateCursor", (CEGUI::utf8*)"Cursor5" ); // resources_->guiSystem->setDefaultMouseCursor( (CEGUI::utf8*)"opengate", (CEGUI::utf8*)"MouseArrow" ); // CEGUI::MouseCursor::getSingleton().setImage( (CEGUI::utf8*)"opengate", (CEGUI::utf8*)"MouseArrow" ); @@ -148,8 +148,8 @@ cursorFrame_ =((cursorFrame_)%cursorMaxFrames_)+1; std::string imageName( "Cursor" + toStr( cursorFrame_ ) ); - if ( CEGUI::ImagesetManager::getSingleton().getImageset( "opengateCurser" )->isImageDefined( imageName ) ){ - resources_->guiSystem->setDefaultMouseCursor( (CEGUI::utf8*)"opengateCurser", imageName); + if ( CEGUI::ImagesetManager::getSingleton().getImageset( "opengateCursor" )->isImageDefined( imageName ) ){ + resources_->guiSystem->setDefaultMouseCursor( (CEGUI::utf8*)"opengateCursor", imageName); } lastCursorFrameTime_ = 0.0; } Modified: branches/ogsector/src/UnDockedState.cpp =================================================================== --- branches/ogsector/src/UnDockedState.cpp 2007-08-27 17:46:56 UTC (rev 700) +++ branches/ogsector/src/UnDockedState.cpp 2007-08-27 18:04:51 UTC (rev 701) @@ -71,20 +71,20 @@ setupEventHandlers(); - targetCurser_ = CEGUI::WindowManager::getSingleton().getWindow( "HUDTargetCurser" ); - targetCurserHalfWidth_ = targetCurser_->getWidth().asAbsolute( 0.0 ) / 2.0; - targetCurserHalfHeight_ = targetCurser_->getHeight().asAbsolute( 0.0 ) / 2.0; - targetCurser_->hide(); + targetCursor_ = CEGUI::WindowManager::getSingleton().getWindow( "HUDTargetCursor" ); + targetCursorHalfWidth_ = targetCursor_->getWidth().asAbsolute( 0.0 ) / 2.0; + targetCursorHalfHeight_ = targetCursor_->getHeight().asAbsolute( 0.0 ) / 2.0; + targetCursor_->hide(); - pilotFlightCurser_ = CEGUI::WindowManager::getSingleton().getWindow( "HUDPilotFlightCurser" ); - pilotFlightCurserHalfWidth_ = pilotFlightCurser_->getWidth().asAbsolute( 0.0 ) / 2.0; - pilotFlightCurserHalfHeight_ = pilotFlightCurser_->getHeight().asAbsolute( 0.0 ) / 2.0; - pilotFlightCurser_->hide(); + pilotFlightCursor_ = CEGUI::WindowManager::getSingleton().getWindow( "HUDPilotFlightCursor" ); + pilotFlightCursorHalfWidth_ = pilotFlightCursor_->getWidth().asAbsolute( 0.0 ) / 2.0; + pilotFlightCursorHalfHeight_ = pilotFlightCursor_->getHeight().asAbsolute( 0.0 ) / 2.0; + pilotFlightCursor_->hide(); - targetFlightCurser_ = CEGUI::WindowManager::getSingleton().getWindow( "HUDTargetFlightCurser" ); - targetFlightCurserHalfWidth_ = targetFlightCurser_->getWidth().asAbsolute( 0.0 ) / 2.0; - targetFlightCurserHalfHeight_ = targetFlightCurser_->getHeight().asAbsolute( 0.0 ) / 2.0; - targetFlightCurser_->hide(); + targetFlightCursor_ = CEGUI::WindowManager::getSingleton().getWindow( "HUDTargetFlightCursor" ); + targetFlightCursorHalfWidth_ = targetFlightCursor_->getWidth().asAbsolute( 0.0 ) / 2.0; + targetFlightCursorHalfHeight_ = targetFlightCursor_->getHeight().asAbsolute( 0.0 ) / 2.0; + targetFlightCursor_->hide(); velocityProgress_ = CEGUI::WindowManager::getSingleton().getWindow( "HUDVelocityProgress" ); velocityProgressHeight_ = velocityProgress_->getHeight().asAbsolute( 0.0 ); @@ -133,9 +133,9 @@ // resources_->guiSystem->setDefaultMouseCursor( (CEGUI::utf8*)"opengate", (CEGUI::utf8*)"MouseArrow" ); // CEGUI::MouseCursor::getSingleton().setImage( (CEGUI::utf8*)"opengate", (CEGUI::utf8*)"MouseArrow" ); - flightCurser_ = CEGUI::WindowManager::getSingleton().getWindow( "HUDFlightCurser" ); - flightCurserHalfWidth_ = 10; - flightCurserHalfHeight_ = 10; + flightCursor_ = CEGUI::WindowManager::getSingleton().getWindow( "HUDFlightCursor" ); + flightCursorHalfWidth_ = 10; + flightCursorHalfHeight_ = 10; } @@ -180,15 +180,15 @@ overlayName_ = "SimpleHUD"; hudOverlay_ = Ogre::OverlayManager::getSingleton().getByName( overlayName_ ); hudOverlay_->show( ); -// mousePointer_ = hudOverlay_->getChild( overlayName_ + "/FlightCurser" ); +// mousePointer_ = hudOverlay_->getChild( overlayName_ + "/FlightCursor" ); // mousePointer_->setTop( windowsHalfHeight_ - mousePointer_->getHeight() / 2 ); // mousePointer_->setLeft( windowsHalfWidth_ - mousePointer_->getWidth() / 2 ); // mousePointer_->hide(); - flightCurserPos_[ 0 ] = windowsHalfWidth_ - flightCurserHalfWidth_; - flightCurserPos_[ 1 ] = windowsHalfHeight_ - flightCurserHalfHeight_; - flightCurser_->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.0, flightCurserPos_[ 0 ] ), - CEGUI::UDim( 0.0, flightCurserPos_[ 1 ] ) ) ); + flightCursorPos_[ 0 ] = windowsHalfWidth_ - flightCursorHalfWidth_; + flightCursorPos_[ 1 ] = windowsHalfHeight_ - flightCursorHalfHeight_; + flightCursor_->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.0, flightCursorPos_[ 0 ] ), + CEGUI::UDim( 0.0, flightCursorPos_[ 1 ] ) ) ); Ogre::OverlayManager::getSingleton().getByName( "Radar" )->show(); sceneDetailIndex_ = 0; @@ -526,17 +526,17 @@ bool UnDockedState::mouseMoved( const OIS::MouseEvent & e ){ if ( !configMode_ ){ - flightCurserPos_[ 0 ] += e.state.X.rel; - flightCurserPos_[ 1 ] += e.state.Y.rel; + flightCursorPos_[ 0 ] += e.state.X.rel; + flightCursorPos_[ 1 ] += e.state.Y.rel; - flightCurserPos_[ 0 ] = min ( flightCurserPos_[ 0 ], windowsWidth_- flightCurserHalfWidth_ ); - flightCurserPos_[ 1 ] = min ( flightCurserPos_[ 1 ], windowsHeight_- flightCurserHalfHeight_ ); + flightCursorPos_[ 0 ] = min ( flightCursorPos_[ 0 ], windowsWidth_- flightCursorHalfWidth_ ); + flightCursorPos_[ 1 ] = min ( flightCursorPos_[ 1 ], windowsHeight_- flightCursorHalfHeight_ ); - flightCurserPos_[ 0 ] = max ( flightCurserPos_[ 0 ], -flightCurserHalfWidth_ ); - flightCurserPos_[ 1 ] = max ( flightCurserPos_[ 1 ], -flightCurserHalfHeight_ ); + flightCursorPos_[ 0 ] = max ( flightCursorPos_[ 0 ], -flightCursorHalfWidth_ ); + flightCursorPos_[ 1 ] = max ( flightCursorPos_[ 1 ], -flightCursorHalfHeight_ ); - flightCurser_->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.0, flightCurserPos_[ 0 ] ), - CEGUI::UDim( 0.0, flightCurserPos_[ 1 ] ) ) ); + flightCursor_->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.0, flightCursorPos_[ 0 ] ), + CEGUI::UDim( 0.0, flightCursorPos_[ 1 ] ) ) ); // mousePointer_->setLeft( mousePointer_->getLeft( ) + e.state.X.rel ); // mousePointer_->setTop( mousePointer_->getTop( ) + e.state.Y.rel ); @@ -562,8 +562,8 @@ // int relativToMidPointX = (int)rint( (mousePointer_->getLeft( ) + mousePointerWidth) - windowsHalfWidth_ ); // int relativToMidPointY = (int)rint( (mousePointer_->getTop( ) + mousePointerHeight) - windowsHalfHeight_ ); - int relativToMidPointX = (int)rint( ( flightCurserPos_[ 0 ] + flightCurserHalfWidth_ ) - windowsHalfWidth_ ); - int relativToMidPointY = (int)rint( ( flightCurserPos_[ 1 ] + flightCurserHalfHeight_ ) - windowsHalfHeight_ ); + int relativToMidPointX = (int)rint( ( flightCursorPos_[ 0 ] + flightCursorHalfWidth_ ) - windowsHalfWidth_ ); + int relativToMidPointY = (int)rint( ( flightCursorPos_[ 1 ] + flightCursorHalfHeight_ ) - windowsHalfHeight_ ); int minActiveZonePercent = 5; int maxActiveZonePercent = 90; @@ -935,13 +935,13 @@ bool targetVisible = projectionPos_( mainCamera_, targetPos, targetScreenPos ); if ( targetVisible ){ - targetCurser_->show(); - targetCurser_->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.5 + targetScreenPos[ 0 ] / 2.0, - -targetCurserHalfWidth_ ), + targetCursor_->show(); + targetCursor_->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.5 + targetScreenPos[ 0 ] / 2.0, + -targetCursorHalfWidth_ ), CEGUI::UDim( 0.5 - targetScreenPos[ 1 ] / 2.0, - -targetCurserHalfHeight_ ) ) ); + -targetCursorHalfHeight_ ) ) ); } else { - targetCurser_->hide(); + targetCursor_->hide(); } Ogre::Real ammoTimeToTarget( distToTarget.length() / sector_->avatarObject()->ammoSpeed() ); @@ -954,16 +954,16 @@ targetVisible = projectionPos_( mainCamera_, duelistPilotPos, targetScreenPos ); if ( targetVisible ){ - pilotFlightCurser_->show(); - pilotFlightCurser_->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.5 + targetScreenPos[ 0 ] / 2.0, - - pilotFlightCurserHalfWidth_ ), + pilotFlightCursor_->show(); + pilotFlightCursor_->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.5 + targetScreenPos[ 0 ] / 2.0, + - pilotFlightCursorHalfWidth_ ), CEGUI::UDim( 0.5 - targetScreenPos[ 1 ] / 2.0, - - pilotFlightCurserHalfHeight_ ) ) ); + - pilotFlightCursorHalfHeight_ ) ) ); } else { - pilotFlightCurser_->hide(); + pilotFlightCursor_->hide(); } } else { - pilotFlightCurser_->hide(); + pilotFlightCursor_->hide(); } if ( duelistTarget_ && ( target_->getTypeID() == SECTOROBJECTMOVABLE_RTTI || @@ -975,16 +975,16 @@ targetVisible = projectionPos_( mainCamera_, duelistTargetPos, targetScreenPos ); if ( targetVisible ){ - targetFlightCurser_->show(); - targetFlightCurser_->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.5 + targetScreenPos[ 0 ] / 2.0, - - targetFlightCurserHalfWidth_ ), + targetFlightCursor_->show(); + targetFlightCursor_->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.5 + targetScreenPos[ 0 ] / 2.0, + - targetFlightCursorHalfWidth_ ), CEGUI::UDim( 0.5 - targetScreenPos[ 1 ] / 2.0, - - targetFlightCurserHalfHeight_ ) ) ); + - targetFlightCursorHalfHeight_ ) ) ); } else { - targetFlightCurser_->hide(); + targetFlightCursor_->hide(); } } else { - targetFlightCurser_->hide(); + targetFlightCursor_->hide(); } //** End update targeting pointer and duelist pointers; Modified: branches/ogsector/src/UnDockedState.h =================================================================== --- branches/ogsector/src/UnDockedState.h 2007-08-27 17:46:56 UTC (rev 700) +++ branches/ogsector/src/UnDockedState.h 2007-08-27 18:04:51 UTC (rev 701) @@ -122,22 +122,22 @@ Sector * sector_; NetworkClient * network_; - Ogre::Vector2 flightCurserPos_; - CEGUI::Window * flightCurser_; - Ogre::Real flightCurserHalfWidth_; - Ogre::Real flightCurserHalfHeight_; + Ogre::Vector2 flightCursorPos_; + CEGUI::Window * flightCursor_; + Ogre::Real flightCursorHalfWidth_; + Ogre::Real flightCursorHalfHeight_; - CEGUI::Window * targetCurser_; - Ogre::Real targetCurserHalfWidth_; - Ogre::Real targetCurserHalfHeight_; + CEGUI::Window * targetCursor_; + Ogre::Real targetCursorHalfWidth_; + Ogre::Real targetCursorHalfHeight_; - CEGUI::Window * pilotFlightCurser_; - Ogre::Real pilotFlightCurserHalfWidth_; - Ogre::Real pilotFlightCurserHalfHeight_; + CEGUI::Window * pilotFlightCursor_; + Ogre::Real pilotFlightCursorHalfWidth_; + Ogre::Real pilotFlightCursorHalfHeight_; - CEGUI::Window * targetFlightCurser_; - Ogre::Real targetFlightCurserHalfWidth_; - Ogre::Real targetFlightCurserHalfHeight_; + CEGUI::Window * targetFlightCursor_; + Ogre::Real targetFlightCursorHalfWidth_; + Ogre::Real targetFlightCursorHalfHeight_; CEGUI::Window * velocityProgress_; CEGUI::Window * velocityProgressImg_; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <spo...@us...> - 2007-09-02 16:55:34
|
Revision: 712 http://opengate.svn.sourceforge.net/opengate/?rev=712&view=rev Author: spom_spom Date: 2007-09-02 09:55:36 -0700 (Sun, 02 Sep 2007) Log Message: ----------- win compatibility commit for openal support, works in general but need further improvement Modified Paths: -------------- branches/ogsector/src/DockedState.cpp branches/ogsector/src/OpenALSoundManager.cpp branches/ogsector/src/OpenALSoundManager.h branches/ogsector/src/UnDockedState.cpp branches/ogsector/win32/ogsectorclient/ogsectorclient.cbp branches/ogsector/win32/ogsectorclient/ogsectorclient.exe branches/ogsector/win32/ogsectorclient/resources.cfg Added Paths: ----------- branches/ogsector/win32/ogsectorclient/OpenAL32.dll branches/ogsector/win32/ogsectorclient/alut.dll branches/ogsector/win32/ogsectorclient/include/ branches/ogsector/win32/ogsectorclient/include/Ogg/ branches/ogsector/win32/ogsectorclient/include/Ogg/ogg.h branches/ogsector/win32/ogsectorclient/include/Ogg/os_types.h branches/ogsector/win32/ogsectorclient/include/Vorbis/ branches/ogsector/win32/ogsectorclient/include/Vorbis/codec.h branches/ogsector/win32/ogsectorclient/include/Vorbis/vorbisenc.h branches/ogsector/win32/ogsectorclient/include/Vorbis/vorbisfile.h branches/ogsector/win32/ogsectorclient/include/XiphLicense.txt branches/ogsector/win32/ogsectorclient/ogg.dll branches/ogsector/win32/ogsectorclient/vorbis.dll branches/ogsector/win32/ogsectorclient/vorbisfile.dll Modified: branches/ogsector/src/DockedState.cpp =================================================================== --- branches/ogsector/src/DockedState.cpp 2007-09-02 14:16:42 UTC (rev 711) +++ branches/ogsector/src/DockedState.cpp 2007-09-02 16:55:36 UTC (rev 712) @@ -41,7 +41,7 @@ clickSound_ = NULL; } -void DockedState::createContent(){ +void DockedState::createContent(){ sceneMgr_ = resources_->ogreRoot->createSceneManager( Ogre::ST_GENERIC, "DockedSceneManagerInstance" ); Ogre::Camera * camera = sceneMgr_->createCamera( "StationCamera" ); @@ -51,19 +51,19 @@ // Ogre::Viewport * vp = resources_->renderWindow->addViewport( sceneMgr_->getCamera( "StationCamera" ), 0, 0.0, 0.0, 1.0f, 1.0f ); // vp->setBackgroundColour( Ogre::ColourValue( 0, 0, 0) ); -// camera->setAspectRatio( (Ogre::Real)resources_->renderWindow->getViewport( 0 )->getActualWidth() / +// camera->setAspectRatio( (Ogre::Real)resources_->renderWindow->getViewport( 0 )->getActualWidth() / // (Ogre::Real)resources_->renderWindow->getViewport( 0 )->getActualHeight() ); overlayRootWindow_ = CEGUI::WindowManager::getSingleton().loadWindowLayout((CEGUI::utf8*)"opengateDocked.layout"); - + cursorFrame_ = 1; cursorMaxFrames_ = CEGUI::ImagesetManager::getSingleton().getImageset( "opengateCursor" )->getImageCount(); lastCursorFrameTime_ = 0.0f; - Ogre::SceneNode * backgroundNode = sceneMgr_->getRootSceneNode()->createChildSceneNode( "Background" ); - Ogre::ManualObject * background = sceneMgr_->createManualObject( "BackgroundObject" ); - - background->begin( "Docked/Background", Ogre::RenderOperation::OT_TRIANGLE_LIST); + Ogre::SceneNode * backgroundNode = sceneMgr_->getRootSceneNode()->createChildSceneNode( "Background" ); + Ogre::ManualObject * background = sceneMgr_->createManualObject( "BackgroundObject" ); + + background->begin( "Docked/Background", Ogre::RenderOperation::OT_TRIANGLE_LIST); background->position( Ogre::Vector3( -1.0, -1.0, 200.0 ) ); background->textureCoord( 0, 0 ); background->position( Ogre::Vector3( 1.0, -1.0, 200.0 ) ); @@ -73,8 +73,8 @@ background->position( Ogre::Vector3( -1.0, 1.0, 200.0 ) ); background->textureCoord( 0, 1 ); background->quad( 3, 2, 1, 0 ); - background->end(); - Ogre::AxisAlignedBox aabInf; aabInf.setInfinite(); + background->end(); + Ogre::AxisAlignedBox aabInf; aabInf.setInfinite(); background->setBoundingBox( aabInf ); backgroundNode->attachObject( background ); backgroundNode->scale( 1024, 768, 1 ); @@ -86,22 +86,22 @@ marketDialog_ = new MarketDialog( ); overlayRootWindow_->addChildWindow( marketDialog_->rootWindow() ); - backgroundSound_ = resources_->soundManager->createSoundSourceFromRessource( "sounds/docked/defaultMusic", - "stationBackground", true, true); - clickSound_ = resources_->soundManager->createSoundSourceFromRessource( "sounds/GUI/click", "GUI/click" ); + backgroundSound_ = resources_->soundManager->createSoundSourceFromRessource( "sounds/docked/defaultMusic", + "stationBackground", true, true); + clickSound_ = resources_->soundManager->createSoundSourceFromRessource( "sounds/GUI/click", "GUI/click" ); setupEventHandlers(); } -void DockedState::destroyContent(){ +void DockedState::destroyContent(){ if ( shipConfigDialog_ ) delete shipConfigDialog_; if ( marketDialog_ ) delete marketDialog_; OpenALSoundManager::getSingleton().destroySoundSource( backgroundSound_ ); OpenALSoundManager::getSingleton().destroySoundSource( clickSound_ ); - sceneMgr_->destroyManualObject( "BackgroundObject" ); - sceneMgr_->getRootSceneNode()->removeAndDestroyChild( "Background" ); + sceneMgr_->destroyManualObject( "BackgroundObject" ); + sceneMgr_->getRootSceneNode()->removeAndDestroyChild( "Background" ); CEGUI::WindowManager::getSingleton().destroyWindow( overlayRootWindow_ ); resources_->ogreRoot->destroySceneManager( sceneMgr_ ); } @@ -111,11 +111,11 @@ resources_->guiRenderer->setTargetSceneManager( sceneMgr_ ); resources_->guiSystem->setGUISheet( overlayRootWindow_ ); overlayRootWindow_->show(); - resources_->console->start(); + resources_->console->start(); resources_->inputManager->addKeyListener( this, "DockedStateKeyListener" ); resources_->inputManager->addMouseListener( this, "DockedStateMouseListener" ); - + resources_->guiSystem->setDefaultMouseCursor( (CEGUI::utf8*)"opengateCursor", (CEGUI::utf8*)"Cursor1" ); Ogre::Viewport * vp = resources_->renderWindow->addViewport( sceneMgr_->getCamera( "StationCamera" ), 0, 0.0, 0.0, 1.0f, 1.0f ); @@ -139,7 +139,7 @@ log_->info("Exiting dockstate"); overlayRootWindow_->hide(); - resources_->console->stop(); + resources_->console->stop(); resources_->renderWindow->removeAllViewports(); resources_->inputManager->removeKeyListener( "DockedStateKeyListener" ); @@ -245,7 +245,7 @@ wmgr.getWindow( (CEGUI::utf8*)"Docked/MainWindow/ConsoleBackground" )->subscribeEvent( CEGUI::Window::EventSized, CEGUI::Event::Subscriber(&Console::handleResize, resources_->console ) ) ; -} +} bool DockedState::handleLaunch( const CEGUI::EventArgs & e ){ if ( !resources_->avatar->vessel()->powerPlant() ) { @@ -260,7 +260,7 @@ changeToUnDockedState(); return true; } - + bool DockedState::handleShipConfigButton( const CEGUI::EventArgs & e ){ if ( shipConfigDialog_ ) shipConfigDialog_->setVisible( !shipConfigDialog_->isVisible() ); if ( marketDialog_ ) marketDialog_->hide(); Modified: branches/ogsector/src/OpenALSoundManager.cpp =================================================================== --- branches/ogsector/src/OpenALSoundManager.cpp 2007-09-02 14:16:42 UTC (rev 711) +++ branches/ogsector/src/OpenALSoundManager.cpp 2007-09-02 16:55:36 UTC (rev 712) @@ -26,19 +26,31 @@ #include <cerrno> #include <OgreRoot.h> -#include <AL/alut.h> +#ifdef WIN32 +#include <al.h> +#include <alc.h> +extern "C" { +ALenum alutGetError (void); +const char *alutGetErrorString (ALenum error); +ALvoid * alutLoadMemoryFromFile (const char *fileName, ALenum *format, ALsizei *size, ALfloat *frequency); + void alutLoadWAVFile( ALbyte *fileName, ALenum *format, void **data, ALsizei *size, + ALsizei *frequency, ALboolean *loop); +} +#else +#include <AL/alut.h> +#endif #define STREAM_BUFFER_SIZE (4096 * 100) namespace OpenGate{ -bool OpenALSoundSource::play(){ - if ( isPlaying() ) return true; +bool OpenALSoundSource::play(){ + if ( isPlaying() ) return true; alSourcePlay( source_ ); if ( soundMgr_->checkOpenALError( "OpenALSound::play::alSourcePlay" ) ) return false; - return true; + return true; } bool OpenALSoundSource::isPlaying(){ @@ -48,42 +60,53 @@ return ( state == AL_PLAYING ); } -bool OpenALSoundSource::stop(){ +bool OpenALSoundSource::stop(){ alGetError(); - + alSourceStop( source_ ); if ( soundMgr_->checkOpenALError( "OpenALSoundSource::stop::alSourceStop" ) ) return false; - - return true; + + return true; } -bool OpenALSoundSource::open( const std::string & fileName ){ +bool OpenALSoundSource::open( const std::string & fileName ){ alGenBuffers( 1, &buffer_ ); if ( soundMgr_->checkOpenALError( "OpenALSoundSource::open::alGenBuffers" ) ) return false; - - format_ = 0x0000; + + format_ = 0x0000; size_ = 0; - freq_ = 0.0; + freq_ = 0.0; // ALboolean loop; std::vector< char > data; int result = 0; - if ( fileName.rfind( ".ogg" ) != std::string::npos ){ FILE *oggFile; // file handle OggVorbis_File oggStream; - if ( ! ( oggFile = fopen( fileName.c_str(), "rb") ) ){ - LogManager::getSingleton().warn( "Could not open Ogg file.: " + fileName ); + +#ifdef WIN32 + + if ( ( result = ov_fopen( (char*)fileName.c_str(), &oggStream ) ) < 0 ){ + + return false; + } +#else + if ( ! ( oggFile = fopen( fileName.c_str(), "rb") ) ){ + LogManager::getSingleton().warn( "Could not open Ogg file.: " + fileName + + strerror(errno) ); + return false; + } + // struct stat sbuf; + // stat( fileName.c_str(), &sbuf); + if ( ( result = ov_open( oggFile, &oggStream, NULL, 0) ) < 0 ){ + fclose( oggFile ); + LogManager::getSingleton().warn( "Could not open Ogg file.: " + toStr(result )); +// LogManager::getSingleton().warn( "Could not open Ogg file.: " + errorString( result ) ); return false; } - if ( ( result = ov_open( oggFile, &oggStream, NULL, 0) ) < 0 ){ - fclose( oggFile ); - LogManager::getSingleton().warn( "Could not open Ogg file.: " ); -// LogManager::getSingleton().warn( "Could not open Ogg file.: " + errorString_( result ) ); - return false; - } - +#endif + vorbis_info *vorbisInfo = ov_info( &oggStream, -1 ); if ( vorbisInfo->channels == 1 ){ format_ = AL_FORMAT_MONO16; @@ -91,6 +114,7 @@ format_ = AL_FORMAT_STEREO16; } freq_ = vorbisInfo->rate; + char buf[ 4096 ]; int section; @@ -102,26 +126,34 @@ size_ = data.size(); } else { void *buf; - buf = alutLoadMemoryFromFile( fileName.c_str(), &format_, &size_, &freq_ ); + ALsizei freq; + ALboolean loop; + LogManager::getSingleton().fout( "Audio file: " + fileName ); + + alutLoadWAVFile( const_cast< ALbyte * >(fileName.c_str()), &format_, &buf, &size_, &freq, &loop ); + LogManager::getSingleton().fout( "Audio file: " + size_ ); + freq_ = freq; + + // buf = alutLoadMemoryFromFile( fileName.c_str(), &format_, &size_, &freq_ ); if ( !buf ){ LogManager::getSingleton().warn( "Audio file: " + fileName + " : " + alutGetErrorString( alutGetError() ) ); return false; } - data.insert( data.end(), (char*)buf, (char*)buf + size_ ); + data.insert( data.end(), (char*)buf, (char*)buf + size_ ); free( buf ); } // Copy the audio data into the buffer; - alBufferData( buffer_, format_, &data[0], (ALsizei)data.size(), (int)freq_ ); + alBufferData( buffer_, format_, &data[0], (ALsizei)data.size(), (int)freq_ ); if ( soundMgr_->checkOpenALError( "OpenALSoundSource::open::alBufferData" ) ) return false; - alGenSources( 1, &source_ ); + alGenSources( 1, &source_ ); if ( soundMgr_->checkOpenALError( "OpenALSoundSource::open::alGenSources" ) ) return false; - + alSourcei( source_, AL_BUFFER, buffer_ ); if ( soundMgr_->checkOpenALError( "OpenALSoundSource::open::alSourcei" ) ) return false; -// if ( checkOpenALError( "OpenALSoundManager::createSound::alSourcei" ) ) return false; +// if ( checkOpenALError( "OpenALSoundManager::createSound::alSourcei" ) ) return false; // alSourcei( source_, AL_LOOPING, loop_ ); return true; @@ -131,9 +163,9 @@ stop(); alSourcei( source_, AL_BUFFER, 0); alDeleteSources( 1, &source_ ); - if ( soundMgr_->checkOpenALError( "OpenALSoundSource::release::alDeleteSources" ) ) return false; + if ( soundMgr_->checkOpenALError( "OpenALSoundSource::release::alDeleteSources " + name_ + " " ) ) return false; alDeleteBuffers( 1, &buffer_ ); - if ( soundMgr_->checkOpenALError( "OpenALSoundSource::release::alDeleteBuffers" ) ) return false; + if ( soundMgr_->checkOpenALError( "OpenALSoundSource::release::alDeleteBuffers " + name_ + " " ) ) return false; return true; } @@ -144,8 +176,8 @@ bool OpenALSoundSource::setPosition( float x, float y, float z ){ return setPosition( Ogre::Vector3( x, y, z ) ); } bool OpenALSoundSource::setPosition( const Ogre::Vector3 & pos ){ - position_ = pos; - + position_ = pos; + alGetError(); alSourcefv( source_, AL_POSITION, position_.ptr() ); if ( soundMgr_->checkOpenALError( "OpenALSoundSource::setPosition::alSourcefv:AL_POSITION" ) ) return false; @@ -162,7 +194,7 @@ bool OpenALSoundSource::setDirection( float x, float y, float z ){ return setDirection( Ogre::Vector3( x, y, z ) ); } - + bool OpenALSoundSource::setDirection( const Ogre::Vector3 & dir ){ direction_ = dir; alSourcefv( source_, AL_DIRECTION, direction_.ptr() ); @@ -171,13 +203,19 @@ } OpenALOggStreamSource::OpenALOggStreamSource( OpenALSoundManager * soundMgr, const std::string & name) - : OpenALSoundSource( soundMgr, name ){ + : OpenALSoundSource( soundMgr, name ){ } bool OpenALOggStreamSource::open( const std::string & fileName ){ int result = 0; - - if ( ! ( oggFile_ = fopen( fileName.c_str(), "rb") ) ){ + + #ifdef WIN32 + if ( ( result = ov_fopen( (char*)fileName.c_str(), &oggStream_ ) ) < 0 ){ + LogManager::getSingleton().warn( "Could not open Ogg stream: " + fileName ); + return false; + } +#else + if ( ! ( oggFile_ = fopen( fileName.c_str(), "rb") ) ){ LogManager::getSingleton().warn( "Could not open Ogg file.: " + fileName ); return false; } @@ -187,10 +225,10 @@ LogManager::getSingleton().warn( "Could not open Ogg file.: " + errorString_( result ) ); return false; } - +#endif vorbisInfo_ = ov_info( &oggStream_, -1 ); vorbisComment_ = ov_comment( &oggStream_, -1 ); - + if ( vorbisInfo_->channels == 1 ){ format_ = AL_FORMAT_MONO16; } else { @@ -202,9 +240,9 @@ alGenSources( 1, & source_ ); if ( soundMgr_->checkOpenALError( "OpenALOggStreamSource::open::alGenSources" ) ) return false; - // Rolloff factor judges the strength of attenuation over distance. - // By setting it to 0 we will have turned it off. - // This means that no matter how far away the Listener is to the source of the Ogg they will still hear it. + // Rolloff factor judges the strength of attenuation over distance. + // By setting it to 0 we will have turned it off. + // This means that no matter how far away the Listener is to the source of the Ogg they will still hear it. // The same idea applies to source relativity. alSourcef(source_, AL_ROLLOFF_FACTOR, 0.0 ); @@ -233,38 +271,38 @@ << "bitrate window " << vorbisInfo_->bitrate_window << "\n" << "\n" << "vendor " << vorbisComment_->vendor << "\n"; - + for ( int i = 0; i < vorbisComment_->comments; i++ ){ std::cout << " " << vorbisComment_->user_comments[ i ] << "\n"; } - + std::cout << std::endl; } bool OpenALOggStreamSource::play(){ if ( isPlaying() ) return true; - + std::cout << "OpenALOggStreamSource::play()" << std::endl; if( !stream_( buffers_[ 0 ] ) ) return false; std::cout << "OpenALOggStreamSource::stream1" << std::endl; if( !stream_( buffers_[ 1 ] ) ) return false; std::cout << "OpenALOggStreamSource::stream2" << std::endl; - + alSourceQueueBuffers( source_, 2, buffers_ ); alSourcePlay( source_ ); - + return true; } bool OpenALOggStreamSource::update(){ int processed = 0; bool active = true; - + alGetSourcei( source_, AL_BUFFERS_PROCESSED, &processed ); - + while( processed-- ){ ALuint buffer; - + alSourceUnqueueBuffers( source_, 1, &buffer ); if ( soundMgr_->checkOpenALError( "OpenALOggStreamSource::update::alSourceUnqueueBuffers" ) ) return false; @@ -272,7 +310,7 @@ alSourceQueueBuffers(source_, 1, &buffer ); if ( soundMgr_->checkOpenALError( "OpenALOggStreamSource::update::alSourceQueueBuffers" ) ) return false; } - + return active; } @@ -292,10 +330,10 @@ int size = 0; int section = 0; int result = 0; - + while ( size < STREAM_BUFFER_SIZE ) { result = ov_read( &oggStream_, data + size, STREAM_BUFFER_SIZE - size, 0, 2, 1, §ion); - + if ( result > 0 ){ size += result; } else { @@ -307,12 +345,12 @@ } } } - + if ( size == 0 ) return false; - + alBufferData( buffer, format_, data, size, vorbisInfo_->rate ); if ( soundMgr_->checkOpenALError( "OpenALOggStreamSource::stream_::alBufferData" ) ) return false; - + return true; } @@ -332,7 +370,7 @@ } OpenALListener::~OpenALListener(){} - + void OpenALListener::reset( ){ setPosition( Ogre::Vector3::ZERO ); setVelocity( Ogre::Vector3::ZERO ); @@ -357,14 +395,14 @@ return true; } -bool OpenALListener::setOrientation( float xf, float yf, float zf, float xu, float yu, float zu ){ +bool OpenALListener::setOrientation( float xf, float yf, float zf, float xu, float yu, float zu ){ return setOrientation( Ogre::Vector3( xf, yf, zf ), Ogre::Vector3( xu, yu, zu ) ); } - + bool OpenALListener::setOrientation( const Ogre::Vector3 & front, const Ogre::Vector3 & up){ directionFront_ = front; directionUp_ = up; orientation_[ 0 ] = front[ 0 ]; orientation_[ 1 ] = front[ 1 ]; orientation_[ 2 ] = front[ 2 ]; orientation_[ 3 ] = up[ 0 ]; orientation_[ 4 ] = up[ 1 ]; orientation_[ 5 ] = up[ 2 ]; - + alListenerfv( AL_ORIENTATION, orientation_ ); if ( soundMgr_->checkOpenALError( "OpenALListener::alListenerfv:AL_ORIENTATION" ) ) return false; return true; @@ -388,27 +426,23 @@ OpenALSoundManager::~OpenALSoundManager(){ Ogre::Root::getSingleton().removeFrameListener( this ); log_->info( "Shoutdown soundmanager." ); -// alDeleteSources( maxSources_, audioSources_ ); -// alDeleteBuffers( maxBuffers_, audioBuffers_ ); - + for ( std::map< std::string, OpenALSoundSource * >::iterator it = mapSoundSources_.begin(); it != mapSoundSources_.end(); ){ destroySoundSource( it++->second ); } if ( listener_ ) delete listener_; - alutExit(); - -// delete [] audioBuffers_; -// delete [] audioBufferInUse_; - -// delete [] audioSources_; -// delete [] audioSourceInUse_; - + + ALCcontext *context = alcGetCurrentContext(); + ALCdevice *device = alcGetContextsDevice( context ); + alcMakeContextCurrent( NULL ); + alcDestroyContext( context ); + alcCloseDevice( device ); } bool OpenALSoundManager::frameStarted( const Ogre::FrameEvent & evt ){ - for ( std::map< std::string, OpenALSoundSource * >::iterator it = mapSoundSources_.begin(); + for ( std::map< std::string, OpenALSoundSource * >::iterator it = mapSoundSources_.begin(); it != mapSoundSources_.end(); it++){ it->second->update(); } @@ -416,14 +450,11 @@ } bool OpenALSoundManager::init(){ - alutInit( 0, NULL ); - if ( checkOpenALError( "init::alutInit" ) ) return false; - log_->info( "Initialize Soundmanager ..." ); // if ( alIsExtensionPresent( "AL_EXT_vorbis" ) == AL_TRUE ){ // oggVorbisExtension_ = true; -// } +// } // if ( alIsExtensionPresent( "AL_EXT_mp3" ) == AL_TRUE ){ // mp3Extension_ = true; // } @@ -449,13 +480,13 @@ // char *devList; // ALenum alenum = alcGetEnumValue(NULL, "ALC_CAPTURE_DEVICE_SPECIFIER"); // devList = (char *)alcGetString(NULL, alenum); - + // printf("ALC_ENUMERATION_EXT:\n"); // while (*devList) { // printf(" - %s\n", devList); // devList += strlen(devList) + 1; -// } - +// } + // const ALCchar *deviceSpecifiers = alcGetString( NULL, ALC_DEVICE_SPECIFIER ); // while ( deviceSpecifiers != NULL ) { @@ -472,26 +503,32 @@ // deviceSpecifiers += strlen( deviceSpecifiers ) + 1; // } -// ALCdevice *device = alcOpenDevice(NULL); -// if ( device ){ -// log_->info( "Choosing: " + Ogre::String(alcGetString(device, ALC_DEVICE_SPECIFIER))); -// maxSources_ = getMaxSources_(); -// // std::cout << "maxsources: " << maxSources_ << std::endl; - -// listener_ = new OpenALListener( this ); + ALCdevice * device = alcOpenDevice( NULL ); + // Device = alcOpenDevice((ALubyte*)"DirectSound3D"); -// } else { -// log_->warn( "no sound device found" ); -// haveSoundDevice_ = false; -// } + if ( !device ){ + log_->warn( "No sound device detected." ); + haveSoundDevice_ = false; + return false; + } + log_->info( "Choosing: " + Ogre::String( alcGetString( device, ALC_DEVICE_SPECIFIER) ) ); + ALCcontext * context = alcCreateContext( device, NULL ); + + if ( !context ){ + log_->warn( "Can not create sound context." ); + return false; + } + + alcMakeContextCurrent( context ); + if ( checkOpenALError( "OpenALSoundManager::init::alcMakeContextCurrent" ) ) return false; + maxSources_ = getMaxSources_(); listener_ = new OpenALListener( this ); +// alutInit( 0, NULL ); +// if ( checkOpenALError( "OpenALSoundManager::init::alutInit" ) ) return false; -//** end device identification; - - return true; } @@ -504,18 +541,18 @@ TiXmlHandle docHandle( & doc ); TiXmlElement * pElem; TiXmlHandle hRoot( 0 ); - + pElem = docHandle.FirstChildElement().Element(); hRoot = TiXmlHandle( pElem ); - - if ( !pElem ) { - log_->fatal( fileName + " cannot read first node." ); - return; + + if ( !pElem ) { + log_->fatal( fileName + " cannot read first node." ); + return; } - - if ( strcmp( "container", pElem->Value() ) != 0 ) { - log_->fatal( fileName + " is no resource description" ); - return; + + if ( strcmp( "container", pElem->Value() ) != 0 ) { + log_->fatal( fileName + " is no resource description" ); + return; } TiXmlElement * pElemName; @@ -526,14 +563,14 @@ pElemFile = pElem->FirstChildElement( "file" ); if ( pElemName && pElemFile ) { - mapSounds_[ pElemName->FirstChild()->Value() ] = + mapSounds_[ pElemName->FirstChild()->Value() ] = ResourceManager::getSingleton().findFullFileName( pElemFile->FirstChild()->Value() ); log_->info( std::string( "sound: " ) + pElemName->FirstChild()->Value() + "->" + pElemFile->FirstChild()->Value() ); } } } -OpenALSoundSource * OpenALSoundManager::createSoundSource( const std::string & fileName, const std::string & name, +OpenALSoundSource * OpenALSoundManager::createSoundSource( const std::string & fileName, const std::string & name, bool loop, bool stream ){ OpenALSoundSource * sound = NULL; @@ -549,7 +586,7 @@ } else { sound = new OpenALSoundSource( this, name ); } - + sound->open( fileName ); sound->showInfos( ); mapSoundSources_[ name ] = sound; @@ -557,15 +594,18 @@ return sound; } -OpenALSoundSource * OpenALSoundManager::createSoundSourceFromRessource( const std::string & ressourceName, - const std::string & name, +OpenALSoundSource * OpenALSoundManager::createSoundSourceFromRessource( const std::string & ressourceName, + const std::string & name, bool loop, bool stream ){ return createSoundSource( soundFileName( ressourceName ), name, loop, stream ); } void OpenALSoundManager::destroySoundSource( OpenALSoundSource * sound ){ if ( sound ){ - sound->release(); + if ( sound->release() ){ + mapSoundSources_.erase( sound->name() ); + delete sound; + } } } @@ -595,20 +635,20 @@ std::string OpenALSoundManager::alGetErrorString( int error ) const { switch( error ) { - case AL_INVALID_VALUE: return "AL_INVALID_VALUE: The value pointer given is not valid"; - case AL_INVALID_ENUM: return "AL_INVALID_ENUM: The specified parameter is not valid"; - case AL_INVALID_NAME: return "AL_INVALID_NAME: The specified source name is not valid"; + case AL_INVALID_VALUE: return "AL_INVALID_VALUE: The value pointer given is not valid"; + case AL_INVALID_ENUM: return "AL_INVALID_ENUM: The specified parameter is not valid"; + case AL_INVALID_NAME: return "AL_INVALID_NAME: The specified source name is not valid"; case AL_INVALID_OPERATION: return "AL_INVALID_OPERATION: There is no current context"; // case OV_EREAD: return "Read from media."; // case OV_ENOTVORBIS: return "Not Vorbis data."; // case OV_EVERSION: return "Vorbis version mismatch."; // case OV_EBADHEADER: return "Invalid Vorbis header."; // case OV_EFAULT: return "Internal logic fault (bug or heap/stack corruption."; - default: return "Unknown Error"; break; + default: return "Unknown Error"; break; } } -std::string OpenALSoundManager::soundFileName( const std::string & name ) { +std::string OpenALSoundManager::soundFileName( const std::string & name ) { if ( mapSounds_.count( name ) ) return mapSounds_[ name ]; log_->warn( "Warning! there is no sound associated to the symbolic name: " + name ); return "unknown"; @@ -632,7 +672,7 @@ } } for( uint i = 0; i < sources.size(); i++) alDeleteSources( 1, &sources[ i ] ); - + return numSources; } Modified: branches/ogsector/src/OpenALSoundManager.h =================================================================== --- branches/ogsector/src/OpenALSoundManager.h 2007-09-02 14:16:42 UTC (rev 711) +++ branches/ogsector/src/OpenALSoundManager.h 2007-09-02 16:55:36 UTC (rev 712) @@ -31,7 +31,11 @@ #include <ogg/ogg.h> #include <vorbis/codec.h> -#include <vorbis/vorbisenc.h> +#ifdef WIN32 +#else +#include <vorbis/vorbisenc.h> +#endif + #include <vorbis/vorbisfile.h> namespace OpenGate { @@ -51,19 +55,19 @@ virtual bool stop(); //** close the file handle and remove buffers - virtual bool release(); + virtual bool release(); //** obtain a handle to the file - virtual bool open( const std::string & fileName ); + virtual bool open( const std::string & fileName ); virtual void showInfos(); - virtual bool update(){ + virtual bool update(){ return true; } //** check if the source is playing - bool isPlaying(); + bool isPlaying(); bool setPosition( float x, float y, float z ); bool setPosition( const Ogre::Vector3 & pos ); @@ -98,30 +102,30 @@ class OpenALOggStreamSource : public OpenALSoundSource { public: OpenALOggStreamSource( OpenALSoundManager * soundMgr, const std::string & name); - + virtual ~OpenALOggStreamSource(){} //** play the Ogg stream - virtual bool play(); + virtual bool play(); //** obtain a handle to the file - virtual bool open( const std::string & fileName ); + virtual bool open( const std::string & fileName ); //** close the file handle and remove buffers - virtual bool release(); + virtual bool release(); //** display some info on the Ogg - virtual void showInfos(); + virtual void showInfos(); //** update the stream if necessary - bool update(); - + bool update(); + protected: //** reloads a buffer bool stream_( uint buffer ); //** empties the queue - bool empty_(); + bool empty_(); //** stringify an error code std::string errorString_( int error ); @@ -130,7 +134,7 @@ OggVorbis_File oggStream_; // stream handle vorbis_info * vorbisInfo_; // some formatting data vorbis_comment * vorbisComment_; // user comments - + uint buffers_[ 2 ]; // front and back buffers }; @@ -140,7 +144,7 @@ public: OpenALListener( OpenALSoundManager * soundMgr ); ~OpenALListener(); - + bool setPosition( float x, float y, float z ); bool setPosition( const Ogre::Vector3 & pos); @@ -149,15 +153,15 @@ bool setOrientation( float xf, float yf, float zf, float xu, float yu, float zu ); bool setOrientation( const Ogre::Vector3 & front, const Ogre::Vector3 & up); - + void reset( ); protected: OpenALSoundManager * soundMgr_; Ogre::Vector3 position_; Ogre::Vector3 velocity_; - Ogre::Vector3 directionFront_; - Ogre::Vector3 directionUp_; + Ogre::Vector3 directionFront_; + Ogre::Vector3 directionUp_; float orientation_[ 6 ]; }; @@ -183,15 +187,15 @@ void loadRessourceNames( const std::string & fileName ); - OpenALSoundSource * createSoundSource( const std::string & fileName, const std::string & name, + OpenALSoundSource * createSoundSource( const std::string & fileName, const std::string & name, bool loop = false, bool stream = false ); - OpenALSoundSource * createSoundSourceFromRessource( const std::string & ressourceName, - const std::string & name, + OpenALSoundSource * createSoundSourceFromRessource( const std::string & ressourceName, + const std::string & name, bool loop = false, bool stream = false ); void destroySoundSource( OpenALSoundSource * sound ); - + void destroySoundSource( const std::string & name ); bool checkOpenAlutError( const std::string & str ); @@ -204,7 +208,7 @@ inline OpenALListener listener( ) const { return *listener_; } - inline OpenALSoundSource * sound( const std::string & name ) { + inline OpenALSoundSource * sound( const std::string & name ) { if ( mapSoundSources_.count( name ) ) return mapSoundSources_[ name ]; return NULL; } Modified: branches/ogsector/src/UnDockedState.cpp =================================================================== --- branches/ogsector/src/UnDockedState.cpp 2007-09-02 14:16:42 UTC (rev 711) +++ branches/ogsector/src/UnDockedState.cpp 2007-09-02 16:55:36 UTC (rev 712) @@ -137,8 +137,8 @@ flightCursor_ = CEGUI::WindowManager::getSingleton().getWindow( "HUDFlightCursor" ); flightCursorHalfWidth_ = 10; flightCursorHalfHeight_ = 10; - soundBackround_ = OpenALSoundManager::getSingleton().createSoundSourceFromRessource( "sounds/undocked/defaultMusic", - "sectorBackground", + soundBackround_ = OpenALSoundManager::getSingleton().createSoundSourceFromRessource( "sounds/undocked/defaultMusic", + "sectorBackground", true, true ); } @@ -162,8 +162,8 @@ if ( overlayRootWindow_ ){ resources_->guiSystem->setGUISheet( overlayRootWindow_ ); overlayRootWindow_->show(); - } - if ( resources_->console ) resources_->console->start(); + } + if ( resources_->console ) resources_->console->start(); resources_->inputManager->addKeyListener( this, "SectorClientKeyListener" ); resources_->inputManager->addMouseListener( this, "SectorClientMouseListener" ); @@ -173,13 +173,13 @@ vp->setBackgroundColour( Ogre::ColourValue( 0, 0, 0) ); // camera->setAspectRatio( Real(vp->getActualWidth()) / Real(vp->getActualHeight())); - + Ogre::Viewport* vp1 = window_->addViewport( sceneMgr_->getCamera( "SecondCamera" ), 1, 0.01, 0.84, 0.15, 0.15 ); vp1->setBackgroundColour( Ogre::ColourValue( 0.1, 0.1, 0.1 ) ); vp1->setSkiesEnabled( true ); vp1->setShadowsEnabled( false ); vp1->setOverlaysEnabled( false ); - + CEGUI::MouseCursor::getSingleton().hide(); overlayName_ = "SimpleHUD"; @@ -195,7 +195,7 @@ flightCursor_->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.0, flightCursorPos_[ 0 ] ), CEGUI::UDim( 0.0, flightCursorPos_[ 1 ] ) ) ); Ogre::OverlayManager::getSingleton().getByName( "Radar" )->show(); - + sceneDetailIndex_ = 0; target_ = sector_->firstTarget(); chatMode_ = false; @@ -265,25 +265,25 @@ //** start update SceneManager, if not set this leeds to strange behaviour by switching states //** opengateclient: OgreRenderQueueSortingGrouping.cpp:355: void Ogre::QueuedRenderableCollection::addRenderable(Ogre::Pass*, Ogre::Renderable*): Assertion `retPair.second && "Error inserting new pass entry into PassGroupRenderableMap"' failed. - if ( resources_->ogreRoot && (Ogre::Pass::getDirtyHashList().size()!=0 || Ogre::Pass::getPassGraveyard().size()!=0)) { - Ogre::SceneManagerEnumerator::SceneManagerIterator scenesIter = resources_->ogreRoot->getSceneManagerIterator(); - - while ( scenesIter.hasMoreElements() ) { - Ogre::SceneManager * pScene = scenesIter.getNext(); - if ( pScene ){ - Ogre::RenderQueue * pQueue = pScene->getRenderQueue(); - if ( pQueue ) { - Ogre::RenderQueue::QueueGroupIterator groupIter = pQueue->_getQueueGroupIterator(); - while ( groupIter.hasMoreElements() ) { - Ogre::RenderQueueGroup * pGroup = groupIter.getNext(); - if ( pGroup ) pGroup->clear( false ); - }//end_while(groupIter.hasMoreElements()) - }//end_if(pScene) - }//end_if(pScene) - }//end_while(scenesIter.hasMoreElements()) - - // Now trigger the pending pass updates - Ogre::Pass::processPendingPassUpdates(); + if ( resources_->ogreRoot && (Ogre::Pass::getDirtyHashList().size()!=0 || Ogre::Pass::getPassGraveyard().size()!=0)) { + Ogre::SceneManagerEnumerator::SceneManagerIterator scenesIter = resources_->ogreRoot->getSceneManagerIterator(); + + while ( scenesIter.hasMoreElements() ) { + Ogre::SceneManager * pScene = scenesIter.getNext(); + if ( pScene ){ + Ogre::RenderQueue * pQueue = pScene->getRenderQueue(); + if ( pQueue ) { + Ogre::RenderQueue::QueueGroupIterator groupIter = pQueue->_getQueueGroupIterator(); + while ( groupIter.hasMoreElements() ) { + Ogre::RenderQueueGroup * pGroup = groupIter.getNext(); + if ( pGroup ) pGroup->clear( false ); + }//end_while(groupIter.hasMoreElements()) + }//end_if(pScene) + }//end_if(pScene) + }//end_while(scenesIter.hasMoreElements()) + + // Now trigger the pending pass updates + Ogre::Pass::processPendingPassUpdates(); }//end_if(m_Root.. //** end update SceneManager; enterDockedState_ = false; @@ -299,7 +299,7 @@ CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"Config/BackButton" )->removeEvent( CEGUI::PushButton::EventClicked ) ; if ( overlayRootWindow_ ) overlayRootWindow_->hide(); - if ( resources_->console ) resources_->console->stop(); + if ( resources_->console ) resources_->console->stop(); CEGUI::MouseCursor::getSingleton().show(); @@ -321,7 +321,7 @@ } bool UnDockedState::switchConfigDialog( ){ - resources_->gameStateRoot->switchConfigDialog( ); + resources_->gameStateRoot->switchConfigDialog( ); configMode_ = resources_->gameStateRoot->configDialog()->isVisible(); if ( configMode_ ){ @@ -385,7 +385,7 @@ bool UnDockedState::keyPressed( const OIS::KeyEvent & e ){ // std::cout << "UnDockedState: " << e.key << " " << (char)e.key<< std::endl; - if ( e.key == OIS::KC_ESCAPE) { + if ( e.key == OIS::KC_ESCAPE) { switchConfigDialog(); } @@ -404,45 +404,45 @@ // hudOverlay_->getChild( overlayName_ + "/ChatIn" )->show( ); chatMode_ = true; } - + if ( e.key == OIS::KC_L && resources_->globalKeyModifier( ) != KEY_SHIFT ) { decreaseAmbientLight(); } if ( e.key == OIS::KC_L && resources_->globalKeyModifier( ) == KEY_SHIFT ) { increaseAmbientLight(); } if ( e.key == OIS::KC_O && resources_->globalKeyModifier( ) != KEY_SHIFT ) { decreaseScheme(); } if ( e.key == OIS::KC_O && resources_->globalKeyModifier( ) == KEY_SHIFT ) { increaseScheme(); } - + if ( sector_->avatarObject() != NULL ){ //** Avatar yaw LEFT; if ( e.key == OIS::KC_A || e.key == OIS::KC_NUMPAD4 ) { sector_->avatarObject()->setScaledYaw( 1.0 ); } - + //** Avatar yaw RIGHT; if ( e.key == OIS::KC_D || e.key == OIS::KC_NUMPAD6 ) { sector_->avatarObject()->setScaledYaw( -1.0 ); } - + //** Avatar pitch DOWN; if ( e.key == OIS::KC_W || e.key == OIS::KC_NUMPAD8 ) { sector_->avatarObject()->setScaledPitch( -1.0 ); } - + //** Avatar pitch UP; if ( e.key == OIS::KC_S || e.key == OIS::KC_NUMPAD2 ) { sector_->avatarObject()->setScaledPitch( 1.0 ); } - + //** Avatar roll (181 == NUM/); if ( e.key == OIS::KC_NUMPAD0 || e.key == 181 ) { sector_->avatarObject()->setScaledRoll( 1.0 ); } - + //** Avatar roll (55 == NUM*); if ( e.key == OIS::KC_NUMPADCOMMA || e.key == 55 ) { sector_->avatarObject()->setScaledRoll( -1.0 ); } - + //** Avatar increase thrust by 10%; if ( e.key == OIS::KC_NUMPAD7 ) { sector_->avatarObject()->incrementThrust(); } - + //** Avatar increase thrust by 10%; if ( e.key == OIS::KC_NUMPAD1 ) { sector_->avatarObject()->decrementThrust(); } - + //** Avatar press break; if ( e.key == OIS::KC_NUMPAD3 ) { sector_->avatarObject()->setBreakPressed( true ); } - + //** Avatar press afterburner; if ( e.key == OIS::KC_NUMPAD9 ) { sector_->avatarObject()->setAfterburnerPressed( true ); } - + //** Avatar centering; if ( e.key == OIS::KC_NUMPAD5 ) { sector_->avatarObject()->setScaledYaw( 0.0 ); @@ -455,13 +455,13 @@ if ( e.key == OIS::KC_F6 ) { duelistTarget_ = !duelistTarget_; } if ( e.key == OIS::KC_F8 ) { sector_->avatarObject()->deathSequence( 0 ); } } // if avatar; - + //** next Target; if ( e.key == OIS::KC_N ) { setTarget( sector_->nextTarget() ); } - + //** prev Target; if ( e.key == OIS::KC_P ) { setTarget( sector_->prevTarget() ); } - + if ( e.key == OIS::KC_1 ) { if ( cameraMode_ == 0 ) showHud(); cameraViewKey_ = 1; } if ( e.key == OIS::KC_2 ) { hideHud(); cameraViewKey_ = 2; } if ( e.key == OIS::KC_3 ) { hideHud(); cameraViewKey_ = 3; } @@ -470,7 +470,7 @@ //** Toggle through camera modes; if ( e.key == OIS::KC_6 ) { toggleNextCamera_(); } - + //** Create one screenshot; if ( e.key == OIS::KC_SYSRQ ) { char tmp[ 20 ]; @@ -486,7 +486,7 @@ case 2: mainCamera_->setPolygonMode( Ogre::PM_POINTS ); break; } } - + } else { // ** chatmode if ( e.key == OIS::KC_RETURN) { CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"ConsoleEdit")->deactivate(); @@ -522,11 +522,11 @@ if ( sector_->avatarObject() != NULL ){ // Avatar release break if ( e.key == OIS::KC_NUMPAD3 ) { sector_->avatarObject()->setBreakPressed( false ); } - + // Avatar release afterburner if ( e.key == OIS::KC_NUMPAD9 ) { sector_->avatarObject()->setAfterburnerPressed( false ); } } - } + } return true; } @@ -546,7 +546,7 @@ // 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 ); @@ -557,26 +557,26 @@ // if ( mousePointer_->getTop( ) > windowsHeight_-mousePointerHeight ) mousePointer_->setTop( windowsHeight_- // mousePointerHeight ); - - + + if ( sector_->avatarObject() != 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 relativToMidPointX = (int)rint( ( flightCursorPos_[ 0 ] + flightCursorHalfWidth_ ) - windowsHalfWidth_ ); int relativToMidPointY = (int)rint( ( flightCursorPos_[ 1 ] + flightCursorHalfHeight_ ) - 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); @@ -588,13 +588,13 @@ } 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 ) + @@ -603,11 +603,11 @@ // String(" ") + StringConverter::toString( relativToMidPointY ) + // String(" yaw: ") + StringConverter::toString( yaw ) + // String(" pitch ") + StringConverter::toString( pitch ) ) << std::endl; - + sector_->avatarObject()->setScaledYaw( -yaw ); sector_->avatarObject()->setScaledPitch( -pitch ); } // if avatar; - + if ( e.state.Z.rel < -10 ){ // mouse wheel up if ( cameraMode_ == 1 ) cameraZoom_ = max( 20.0f, cameraZoom_ - 5 ); else setTarget( sector_->nextTarget() ); @@ -658,29 +658,29 @@ 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 ) + @@ -690,7 +690,7 @@ // " pitch: " + StringConverter::toString(pitch) + // " roll: " + StringConverter::toString(roll) + // " thrust: " + StringConverter::toString(thrust) ); - + sector_->avatarObject()->setScaledYaw( -yaw ); sector_->avatarObject()->setScaledPitch( pitch ); sector_->avatarObject()->setScaledRoll( -roll ); @@ -716,7 +716,7 @@ if ( !configMode_ ){ // window_->setDebugText( "Joy: " + toStr( button ) ); if ( sector_->avatarObject() != NULL ){ - + if ( button == 0){ sector_->avatarObject()->setFirePressed( false ); } @@ -856,7 +856,7 @@ if ( target_ != NULL ){ // hudOverlay_->getChild( overlayName_ + "/TargetPointer" )->show(); - Ogre::OverlayManager::getSingleton().getOverlayElement( overlayName_ + + Ogre::OverlayManager::getSingleton().getOverlayElement( overlayName_ + "/MainPanel/TextTargetName" )->setCaption( target_->name() ); if ( sector_->avatarObject() ) target_->selectedBy( sector_->avatarObject() ); @@ -905,12 +905,12 @@ Ogre::OverlayManager::getSingleton().getOverlayElement( overlayName_ + "/MainPanel/StatsTextArea" ) ->setCaption( "fps: " + toStr( stats.lastFPS ) + " ping: " + toStr( network_->pingTime() ) + " ms" ); } - + if ( hudIsVisible_ && sector_->avatarObject() != NULL ){ - + Ogre::Vector3 flightDir( sector_->avatarObject()->flightDirection() ); Ogre::Quaternion flightOrient( sector_->avatarObject()->mainNode()->getOrientation() ); - + //** flight arrow; if ( sector_->avatarObject()->flightArrow() ) { if ( fabs( sector_->avatarObject()->speed() ) > 1e-1 ){ @@ -921,49 +921,49 @@ sector_->avatarObject()->flightArrow()->setVisible( false ); } } - + if ( target_ != NULL ) { - Ogre::Vector3 distToTarget( ( target_->mainNode()->getPosition() - - sector_->avatarObject()->mainNode()->getPosition() ) ); - + Ogre::Vector3 distToTarget( ( target_->mainNode()->getPosition() - + sector_->avatarObject()->mainNode()->getPosition() ) ); + if ( sector_->avatarObject()->targetArrow() ) { sector_->avatarObject()->targetArrow()->setVisible( true ); sector_->avatarObject()->targetArrow()->setOrientation( flightOrient ); sector_->avatarObject()->targetArrow()->setDirection( distToTarget.normalisedCopy(), Ogre::Node::TS_WORLD ); } - + //** Start update targeting pointer and duelist pointers; Ogre::Vector3 targetScreenPos; - + target_->mainNode()->needUpdate(); - + Ogre::Vector3 targetPos( target_->mainNode()->getPosition() ); - + bool targetVisible = projectionPos_( mainCamera_, targetPos, targetScreenPos ); if ( targetVisible ){ targetCursor_->show(); - targetCursor_->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.5 + targetScreenPos[ 0 ] / 2.0, + targetCursor_->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.5 + targetScreenPos[ 0 ] / 2.0, -targetCursorHalfWidth_ ), - CEGUI::UDim( 0.5 - targetScreenPos[ 1 ] / 2.0, + CEGUI::UDim( 0.5 - targetScreenPos[ 1 ] / 2.0, -targetCursorHalfHeight_ ) ) ); } else { targetCursor_->hide(); } - + Ogre::Real ammoTimeToTarget( distToTarget.length() / sector_->avatarObject()->ammoSpeed() ); - + if ( duelistPilot_ ){ - Ogre::Vector3 duelistPilotPos( sector_->avatarObject()->mainNode()->getPosition() + - - sector_->avatarObject()->mainNode()->getOrientation().zAxis().normalisedCopy() + Ogre::Vector3 duelistPilotPos( sector_->avatarObject()->mainNode()->getPosition() + + - sector_->avatarObject()->mainNode()->getOrientation().zAxis().normalisedCopy() * sector_->avatarObject()->ammoSpeed() * ammoTimeToTarget + sector_->avatarObject()->velocity() * ammoTimeToTarget ); - + targetVisible = projectionPos_( mainCamera_, duelistPilotPos, targetScreenPos ); if ( targetVisible ){ pilotFlightCursor_->show(); - pilotFlightCursor_->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.5 + targetScreenPos[ 0 ] / 2.0, + pilotFlightCursor_->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.5 + targetScreenPos[ 0 ] / 2.0, - pilotFlightCursorHalfWidth_ ), - CEGUI::UDim( 0.5 - targetScreenPos[ 1 ] / 2.0, + CEGUI::UDim( 0.5 - targetScreenPos[ 1 ] / 2.0, - pilotFlightCursorHalfHeight_ ) ) ); } else { pilotFlightCursor_->hide(); @@ -971,20 +971,20 @@ } else { pilotFlightCursor_->hide(); } - - if ( duelistTarget_ && ( target_->getTypeID() == SECTOROBJECTMOVABLE_RTTI || + + if ( duelistTarget_ && ( target_->getTypeID() == SECTOROBJECTMOVABLE_RTTI || target_->getTypeID() == SECTOROBJECTMOVABLE_AI_RTTI ) ){ - - Ogre::Vector3 duelistTargetPos( targetPos + dynamic_cast< SectorObjectMoveable *>( target_ )->velocity() + + Ogre::Vector3 duelistTargetPos( targetPos + dynamic_cast< SectorObjectMoveable *>( target_ )->velocity() * ammoTimeToTarget ); - + targetVisible = projectionPos_( mainCamera_, duelistTargetPos, targetScreenPos ); - + if ( targetVisible ){ targetFlightCursor_->show(); - targetFlightCursor_->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.5 + targetScreenPos[ 0 ] / 2.0, + targetFlightCursor_->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.5 + targetScreenPos[ 0 ] / 2.0, - targetFlightCursorHalfWidth_ ), - CEGUI::UDim( 0.5 - targetScreenPos[ 1 ] / 2.0, + CEGUI::UDim( 0.5 - targetScreenPos[ 1 ] / 2.0, - targetFlightCursorHalfHeight_ ) ) ); } else { targetFlightCursor_->hide(); @@ -992,20 +992,20 @@ } else { targetFlightCursor_->hide(); } - + //** End update targeting pointer and duelist pointers; - + targetDistanceText_->setText( "D" + Ogre::StringConverter::toString( round( distToTarget.length(), 0 ) ) ); - + if ( target_->getTypeID() == SECTOROBJECTMOVABLE_RTTI || target_->getTypeID() == SECTOROBJECTMOVABLE_AI_RTTI ){ - + targetVelocity_->setText( "V" + Ogre::StringConverter::toString( round( dynamic_cast< SectorObjectMoveable *>( target_ )->speed(), 2 ), 4 ) ); targetShieldText_->setText( "S" + Ogre::StringConverter::toString( round( dynamic_cast< SectorObjectMoveable *>( target_ )->shieldRate() * 100.0f, 1), 4 ) ); - targetArmorText_->setText( "A" + Ogre::StringConverter::toString( round( + targetArmorText_->setText( "A" + Ogre::StringConverter::toString( round( dynamic_cast< SectorObjectMoveable *>( target_ )->armorRate() * 100.0f, 1), 4 ) ); - + } else{ targetVelocity_->setText( "" ); targetShieldText_->setText( "" ); @@ -1018,36 +1018,36 @@ if ( timeSinceLastHudUpdate_ > hudUpdateTime ){ // std::cout << timeSinceLastHudUpdate_ << std::endl; timeSinceLastHudUpdate_ = 0.0; - - + + Ogre::Real height = sector_->avatarObject()->speedRate() * velocityProgressHeight_; velocityProgress_->setYPosition( CEGUI::UDim( 0.5, velocityProgressHeight_/2.0 - height ) ); velocityProgress_->setHeight( CEGUI::UDim( 0.0, height ) ); velocityProgressImg_->setYPosition( CEGUI::UDim( 0, -velocityProgressHeight_ + height ) ); - + height = sector_->avatarObject()->capacityRate() * capacitorProgressHeight_; // std::cout << height << " " << capacitorProgressHeight_ << " " << sector_->avatarObject()->capacity() << " " << sector_->avatarObject()->maxCapacity() << std::endl; capacitorProgress_->setYPosition( CEGUI::UDim( 0.5, capacitorProgressHeight_/2.0 - height ) ); capacitorProgress_->setHeight( CEGUI::UDim( 0.0, height ) ); capacitorProgressImg_->setYPosition( CEGUI::UDim( 0, -capacitorProgressHeight_ + height ) ); - + height = sector_->avatarObject()->thrustRate() * thrustProgressHeight_; thrustProgress_->setYPosition( CEGUI::UDim( 0.5, thrustProgressHeight_/2.0 - height ) ); thrustProgress_->setHeight( CEGUI::UDim( 0.0, height ) ); thrustProgressImg_->setYPosition( CEGUI::UDim( 0, -thrustProgressHeight_ + height ) ); - + height = sector_->avatarObject()->shieldRate() * shieldProgressHeight_; shieldProgress_->setYPosition( CEGUI::UDim( 0.5, - height + height/2.0 ) ); shieldProgress_->setHeight( CEGUI::UDim( 0.0, height ) ); shieldProgressLeftImg_->setYPosition( CEGUI::UDim( 0.5, -shieldProgressHeight_/2.0 ) ); shieldProgressRightImg_->setYPosition( CEGUI::UDim( 0.5, -shieldProgressHeight_/2.0 ) ); - + height = sector_->avatarObject()->armorRate() * armorProgressHeight_; armorProgress_->setYPosition( CEGUI::UDim( 0.5, - height + height/2.0 ) ); armorProgress_->setHeight( CEGUI::UDim( 0.0, height ) ); armorProgressLeftImg_->setYPosition( CEGUI::UDim( 0.5, -armorProgressHeight_/2.0 ) ); armorProgressRightImg_->setYPosition( CEGUI::UDim( 0.5, -armorProgressHeight_/2.0 ) ); - + if ( sector_->avatarObject()->breakPressed() ){ velocityText_->setProperty( "TextColours", "ffff0000" ); } else if (sector_->avatarObject()->afterburnerPressed()){ @@ -1058,7 +1058,7 @@ velocityText_->setText( "V" + Ogre::StringConverter::toString( round( sector_->avatarObject()->speed(), 2 ), 4 ) ); shieldText_->setText( "S" + Ogre::StringConverter::toString( sector_->avatarObject()->shieldRate() * 100.0f, 4 ) ); armorText_->setText( "A" + Ogre::StringConverter::toString( sector_->avatarObject()->armorRate() * 100.0f, 4 ) ); - + // OverlayElement* guiAvg = OverlayManager::getSingleton().getOverlayElement("Core/AverageFps"); // OverlayElement* guiCurr = OverlayManager::getSingleton().getOverlayElement("Core/CurrFps"); // OverlayElement* guiBest = OverlayManager::getSingleton().getOverlayElement("Core/BestFps"); @@ -1068,10 +1068,10 @@ // +" "+StringConverter::toString(stats.bestFrameTime)+" ms"); // guiWorst->setCaption(worstFps + StringConverter::toString(stats.worstFPS) // +" "+StringConverter::toString(stats.worstFrameTime)+" ms"); - + // OverlayElement* guiTris = OverlayManager::getSingleton().getOverlayElement("Core/NumTris"); // guiTris->setCaption(tris + StringConverter::toString(stats.triangleCount)); - + // OverlayElement* guiDbg = OverlayManager::getSingleton().getOverlayElement("Core/DebugText"); // guiDbg->setCaption( window_->getDebugText() ); // } @@ -1153,9 +1153,9 @@ } } -bool UnDockedState::projectionPosAndSize_( Ogre::Camera * cam, const Ogre::Vector3 & pos, const Ogre::Real rad, +bool UnDockedState::projectionPosAndSize_( Ogre::Camera * cam, const Ogre::Vector3 & pos, const Ogre::Real rad, Ogre::Real & x, Ogre::Real & y, Ogre::Real & cx, Ogre::Real & cy ){ - + Ogre::Vector3 eyeSpacePos = cam->getViewMatrix( true ) * pos; // z < 0 means in front of cam if ( eyeSpacePos.z < 0 ) { @@ -1177,7 +1177,7 @@ return false; } } - + bool UnDockedState::maximiseConsole( ){ if ( overlayRootWindow_ ){ CEGUI::WindowManager::getSingleton().getWindow( (CEGUI::utf8*)"UnDocked/MainWindow/ConsoleFrame")-> @@ -1196,8 +1196,8 @@ return true; } -void UnDockedState::spawnAI( const std::string & name ){ - sector_->spawnAiObject( name ); +void UnDockedState::spawnAI( const std::string & name ){ + sector_->spawnAiObject( name ); } void UnDockedState::increaseAmbientLight(){ @@ -1211,10 +1211,10 @@ } void UnDockedState::setAmbientLight_(){ - + std::cout << ambientLight_ << std::endl; - sceneMgr_->setAmbientLight( Ogre::ColourValue( (double)ambientLight_/10.0, - (double)ambientLight_/10.0, + sceneMgr_->setAmbientLight( Ogre::ColourValue( (double)ambientLight_/10.0, + (double)ambientLight_/10.0, (double)ambientLight_/10.0 ) ); } @@ -1222,7 +1222,7 @@ schemeIdx_ = min( schemeIdx_ + 1, 2 ); setScheme_(); } - + void UnDockedState::decreaseScheme(){ schemeIdx_ = max( schemeIdx_ - 1, 0 ); setScheme_(); Added: branches/ogsector/win32/ogsectorclient/OpenAL32.dll =================================================================== (Binary files differ) Property changes on: branches/ogsector/win32/ogsectorclient/OpenAL32.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/win32/ogsectorclient/alut.dll =================================================================== (Binary files differ) Property changes on: branches/ogsector/win32/ogsectorclient/alut.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/ogsector/win32/ogsectorclient/include/Ogg/ogg.h =================================================================== --- branches/ogsector/win32/ogsectorclient/include/Ogg/ogg.h (rev 0) +++ branches/ogsector/win32/ogsectorclient/include/Ogg/ogg.h 2007-09-02 16:55:36 UTC (rev 712) @@ -0,0 +1,202 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: toplevel libogg include + last mod: $Id: ogg.h 7188 2004-07-20 07:26:04Z xiphmont $ + + ********************************************************************/ +#ifndef _OGG_H +#define _OGG_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include <ogg/os_types.h> + +typedef struct { + long endbyte; + int endbit; + + unsigned char *buffer; + unsigned char *ptr; + long storage; +} oggpack_buffer; + +/* ogg_page is used to encapsulate the data in one Ogg bitstream page *****/ + +typedef struct { + unsigned char *header; + long header_len; + unsigned char *body; + long body_len; +} ogg_page; + +/* ogg_stream_state contains the current encode/decode state of a logical + Ogg bitstream **********************************************************/ + +typedef struct { + unsigned char *body_data; /* bytes from packet bodies */ + long body_storage; /* storage elements allocated */ + long body_fill; /* elements stored; fill mark */ + long body_returned; /* elements of fill returned */ + + + int *lacing_vals; /* The values that will go to the segment table */ + ogg_int64_t *granule_vals; /* granulepos values for headers. Not compact + this way, but it is simple coupled to the + lacing fifo */ + long lacing_storage; + long lacing_fill; + long lacing_packet; + long lacing_returned; + + unsigned char header[282]; /* working space for header encode */ + int header_fill; + + int e_o_s; /* set when we have buffered the last packet in the + logical bitstream */ + int b_o_s; /* set after we've written the initial page + of a logical bitstream */ + long serialno; + long pageno; + ogg_int64_t packetno; /* sequence number for decode; the framing + knows where there's a hole in the data, + but we need coupling so that the codec + (which is in a seperate abstraction + layer) also knows about the gap */ + ogg_int64_t granulepos; + +} ogg_stream_state; + +/* ogg_packet is used to encapsulate the data and metadata belonging + to a single raw Ogg/Vorbis packet *************************************/ + +typedef struct { + unsigned char *packet; + long bytes; + long b_o_s; + long e_o_s; + + ogg_int64_t granulepos; + + ogg_int64_t packetno; /* sequence number for decode; the framing + knows where there's a hole in the data, + but we need coupling so that the codec + (which is in a seperate abstraction + layer) also knows about the gap */ +} ogg_packet; + +typedef struct { + unsigned char *data; + ... [truncated message content] |
From: <eg...@us...> - 2007-09-20 19:32:18
|
Revision: 740 http://opengate.svn.sourceforge.net/opengate/?rev=740&view=rev Author: egore Date: 2007-09-20 12:32:22 -0700 (Thu, 20 Sep 2007) Log Message: ----------- Switch to more standard layout Modified Paths: -------------- branches/ogsector/.svnignore Added Paths: ----------- branches/ogsector/AUTHORS branches/ogsector/COPYING branches/ogsector/ChangeLog branches/ogsector/INSTALL branches/ogsector/NEWS branches/ogsector/README branches/ogsector/autogen.sh branches/ogsector/compile branches/ogsector/config.guess branches/ogsector/config.sub Removed Paths: ------------- branches/ogsector/Readme branches/ogsector/bootstrap Modified: branches/ogsector/.svnignore =================================================================== --- branches/ogsector/.svnignore 2007-09-20 17:01:33 UTC (rev 739) +++ branches/ogsector/.svnignore 2007-09-20 19:32:22 UTC (rev 740) @@ -1,9 +1,40 @@ +.anjuta +.tm_project* +.libs +.deps +.libs +.*swp +.nautilus-metafile.xml +*.autosave +*.pws +*.bak +*~ +#*# +*.gladep +*.la +*.lo *.log -configure -Makefile.in +*.o +*.class +*.pyc +aclocal.m4 +autom4te.cache config.h -Makefile +config.h.in +config.log config.status -stamp-h1 +configure +intltool-extract* +intltool-merge* +intltool-modules* +intltool-update* +libtool +prepare.sh +stamp-h* +ltmain.sh +mkinstalldirs opengate.depend -autom4te.cache +config.guess +config.sub +Makefile +Makefile.in Added: branches/ogsector/AUTHORS =================================================================== --- branches/ogsector/AUTHORS (rev 0) +++ branches/ogsector/AUTHORS 2007-09-20 19:32:22 UTC (rev 740) @@ -0,0 +1,3 @@ +Carsten <spo...@us...> +Christoph Brill <eg...@us...> +Gary Luck <ult...@us...> Added: branches/ogsector/COPYING =================================================================== --- branches/ogsector/COPYING (rev 0) +++ branches/ogsector/COPYING 2007-09-20 19:32:22 UTC (rev 740) @@ -0,0 +1 @@ +link /usr/share/automake-1.10/COPYING \ No newline at end of file Property changes on: branches/ogsector/COPYING ___________________________________________________________________ Name: svn:special + * Added: branches/ogsector/ChangeLog =================================================================== Added: branches/ogsector/INSTALL =================================================================== --- branches/ogsector/INSTALL (rev 0) +++ branches/ogsector/INSTALL 2007-09-20 19:32:22 UTC (rev 740) @@ -0,0 +1 @@ +link /usr/share/automake-1.10/INSTALL \ No newline at end of file Property changes on: branches/ogsector/INSTALL ___________________________________________________________________ Name: svn:special + * Added: branches/ogsector/NEWS =================================================================== Copied: branches/ogsector/README (from rev 710, branches/ogsector/Readme) =================================================================== --- branches/ogsector/README (rev 0) +++ branches/ogsector/README 2007-09-20 19:32:22 UTC (rev 740) @@ -0,0 +1,52 @@ +-- 0.0.2 -- +Not yet testet with other players +need test Nr.2 ;) + +- changed netprotocol to TCP (my router hangs with udp, I dont know why), port: 1234 +- add simple interpolation and extrapolation for smooth movement at higher pings or packetloss +(spawned ships still jiggle a bit) +- clear register/deregister of spawns and playerships +- add network protocol for: registering ships, ship status changed, ship hit by ammo + +-- 0.0.1 -- +do not fly online +At test Nr.1 my router died 2 times. +Lost packets lead to crazy behaviour of the vessels. + +----------------------------------------------------------------------- +For installation: + +you will need: +Ogre-1.2 +>=freealut-1.0.1 + +Build externals (libgrapple, OIS, OgreOpode) + +cd ./externals +sh genExternals.sh all +cd .. + +For building ogsector simple run: +./bootstrap +./configure +make -j3 + +For running the ogsectorclient you have to custumise: + +plugins.cfg +ogre.cfg +runClient.sh + +then +./runClient.sh + +# start a server (optional) +./runServer.sh + +If you want to test the openALsoundManager you have to take care that your LD_LIBRARY_PATH knows the external libs + +src/testopenalmanager + +Enjoy this first technical proof of concept. + +Spom Deleted: branches/ogsector/Readme =================================================================== --- branches/ogsector/Readme 2007-09-20 17:01:33 UTC (rev 739) +++ branches/ogsector/Readme 2007-09-20 19:32:22 UTC (rev 740) @@ -1,52 +0,0 @@ --- 0.0.2 -- -Not yet testet with other players -need test Nr.2 ;) - -- changed netprotocol to TCP (my router hangs with udp, I dont know why), port: 1234 -- add simple interpolation and extrapolation for smooth movement at higher pings or packetloss -(spawned ships still jiggle a bit) -- clear register/deregister of spawns and playerships -- add network protocol for: registering ships, ship status changed, ship hit by ammo - --- 0.0.1 -- -do not fly online -At test Nr.1 my router died 2 times. -Lost packets lead to crazy behaviour of the vessels. - ------------------------------------------------------------------------ -For installation: - -you will need: -Ogre-1.2 ->=freealut-1.0.1 - -Build externals (libgrapple, OIS, OgreOpode) - -cd ./externals -sh genExternals.sh all -cd .. - -For building ogsector simple run: -./bootstrap -./configure -make -j3 - -For running the ogsectorclient you have to custumise: - -plugins.cfg -ogre.cfg -runClient.sh - -then -./runClient.sh - -# start a server (optional) -./runServer.sh - -If you want to test the openALsoundManager you have to take care that your LD_LIBRARY_PATH knows the external libs - -src/testopenalmanager - -Enjoy this first technical proof of concept. - -Spom Copied: branches/ogsector/autogen.sh (from rev 710, branches/ogsector/bootstrap) =================================================================== --- branches/ogsector/autogen.sh (rev 0) +++ branches/ogsector/autogen.sh 2007-09-20 19:32:22 UTC (rev 740) @@ -0,0 +1,159 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +DIE=0 + +if [ -n "$GNOME2_DIR" ]; then + ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS" + LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH" + PATH="$GNOME2_DIR/bin:$PATH" + export PATH + export LD_LIBRARY_PATH +fi + +(test -f $srcdir/configure.ac) || { + echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" + echo " top-level package directory" + exit 1 +} + +(autoconf --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`autoconf' installed." + echo "Download the appropriate package for your distribution," + echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" + DIE=1 +} + +(grep "^IT_PROG_INTLTOOL" $srcdir/configure.ac >/dev/null) && { + (intltoolize --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`intltool' installed." + echo "You can get it from:" + echo " ftp://ftp.gnome.org/pub/GNOME/" + DIE=1 + } +} + +(grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/configure.ac >/dev/null) && { + (xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`xml-i18n-toolize' installed." + echo "You can get it from:" + echo " ftp://ftp.gnome.org/pub/GNOME/" + DIE=1 + } +} + +(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && { + (libtool --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`libtool' installed." + echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" + DIE=1 + } +} + +(grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.ac >/dev/null) && { + (grep "sed.*POTFILES" $srcdir/configure.ac) > /dev/null || \ + (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`glib' installed." + echo "You can get it from: ftp://ftp.gtk.org/pub/gtk" + DIE=1 + } +} + +(automake --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`automake' installed." + echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" + DIE=1 + NO_AUTOMAKE=yes +} + + +# if no automake, don't bother testing for aclocal +test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: Missing \`aclocal'. The version of \`automake'" + echo "installed doesn't appear recent enough." + echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/" + DIE=1 +} + +if test "$DIE" -eq 1; then + exit 1 +fi + +if test -z "$*"; then + echo "**Warning**: I am going to run \`configure' with no arguments." + echo "If you wish to pass any to it, please specify them on the" + echo \`$0\'" command line." + echo +fi + +case $CC in +xlc ) + am_opt=--include-deps;; +esac + +for coin in `find $srcdir -path $srcdir/CVS -prune -o -name configure.ac -print` +do + dr=`dirname $coin` + if test -f $dr/NO-AUTO-GEN; then + echo skipping $dr -- flagged as no auto-gen + else + echo processing $dr + ( cd $dr + + aclocalinclude="$ACLOCAL_FLAGS" + + if grep "^AM_GLIB_GNU_GETTEXT" configure.ac >/dev/null; then + echo "Creating $dr/aclocal.m4 ..." + test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 + echo "Running glib-gettextize... Ignore non-fatal messages." + echo "no" | glib-gettextize --force --copy + echo "Making $dr/aclocal.m4 writable ..." + test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 + fi + if grep "^IT_PROG_INTLTOOL" configure.ac >/dev/null; then + echo "Running intltoolize..." + intltoolize --copy --force --automake + fi + if grep "^AM_PROG_XML_I18N_TOOLS" configure.ac >/dev/null; then + echo "Running xml-i18n-toolize..." + xml-i18n-toolize --copy --force --automake + fi + if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then + if test -z "$NO_LIBTOOLIZE" ; then + echo "Running libtoolize..." + libtoolize --force --copy + fi + fi + echo "Running aclocal $aclocalinclude ..." + aclocal $aclocalinclude + if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then + echo "Running autoheader..." + autoheader + fi + echo "Running automake --gnu $am_opt ..." + automake --add-missing --gnu $am_opt + echo "Running autoconf ..." + autoconf + ) + fi +done + +conf_flags="--enable-maintainer-mode" + +if test x$NOCONFIGURE = x; then + echo Running $srcdir/configure $conf_flags "$@" ... + $srcdir/configure $conf_flags "$@" \ + && echo Now type \`make\' to compile. || exit 1 +else + echo Skipping configure process. +fi Deleted: branches/ogsector/bootstrap =================================================================== --- branches/ogsector/bootstrap 2007-09-20 17:01:33 UTC (rev 739) +++ branches/ogsector/bootstrap 2007-09-20 19:32:22 UTC (rev 740) @@ -1,38 +0,0 @@ -#!/bin/sh - -# Check for proper versions of autotools -# We require: -# - autoconf 2.60+ -# - automake 1.9+ -# - libtool 1.5+ - -# Deal with some gentoo-specific issues -export WANT_AUTOMAKE='1.9' -#export WANT_AUTOCONF='2.6' - -## Using prereq in autoconf rather than here, mostly for the debian systems at -## this point -if test -z "`autoconf --version 2>&1|head -n 1|egrep '2.[6]'`"; then - echo "Autoconf 2.60 or above is required. Aborting build..."; - exit 1; -fi - -if test -z "`automake --version 2>&1|head -n 1|egrep '1.[9]'`"; then - echo "Automake 1.9 or above is required. Aborting build..."; - exit 1; -fi - -if test -z "`libtool --version 2>&1|head -n 1|egrep '1.[5]'`"; then - echo "Libtool 1.5 or above is required. Aborting build..."; - exit 1; -fi - -# clean up files which cause confusion when switch versions of auto* -rm -rf autom4te.cache - -# Fire up autotools -#echo "- libtoolize"; libtoolize --force -echo "- aclocal."; aclocal #-I Scripts/m4 $ACLOCAL_FLAGS -echo "- autoheader."; autoheader -echo "- automake."; automake --include-deps --add-missing --foreign --copy -echo "- autoconf." ; autoconf Added: branches/ogsector/compile =================================================================== --- branches/ogsector/compile (rev 0) +++ branches/ogsector/compile 2007-09-20 19:32:22 UTC (rev 740) @@ -0,0 +1 @@ +link /usr/share/automake-1.10/compile \ No newline at end of file Property changes on: branches/ogsector/compile ___________________________________________________________________ Name: svn:special + * Added: branches/ogsector/config.guess =================================================================== --- branches/ogsector/config.guess (rev 0) +++ branches/ogsector/config.guess 2007-09-20 19:32:22 UTC (rev 740) @@ -0,0 +1,1535 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. + +timestamp='2007-07-22' + +# This file 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., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner <pe...@bo...>. +# Please send patches to <con...@gn...>. Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to <con...@gn...>." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (gh...@no... 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +if [ "${UNAME_SYSTEM}" = "Linux" ] ; then + eval $set_cc_for_build + cat << EOF > $dummy.c + #include <features.h> + #ifdef __UCLIBC__ + # ifdef __UCLIBC_CONFIG_VERSION__ + LIBC=uclibc __UCLIBC_CONFIG_VERSION__ + # else + LIBC=uclibc + # endif + #else + LIBC=gnu + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'` +fi + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # ak...@wp... (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include <stdio.h> /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include <sys/systemcfg.h> + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include <stdlib.h> + #include <unistd.h> + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include <unistd.h> + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:[3456]*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-${LIBC} + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-${LIBC} + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-${LIBC} + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-${LIBC} + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-${LIBC} + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; + esac + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-${LIBC} + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-${LIBC} + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-${LIBC} + exit ;; + xtensa:Linux:*:*) + echo xtensa-unknown-linux-${LIBC} + exit ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout" + exit ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff" + exit ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld" + exit ;; + esac + # This should get integrated into the C code below, but now we hack + if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include <features.h> + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` + echo ${UNAME_MACHINE}-pc-isc$UNAME_REL + elif /bin/uname -X 2>/dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says <Ric...@cc...> + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes <he...@op...>. + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From se...@sw.... + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Pau...@st.... + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Pau...@st.... + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c <<EOF +#ifdef _SEQUENT_ +# include <sys/types.h> +# include <sys/utsname.h> +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include <sys/param.h> + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include <sys/param.h> +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 <<EOF +$0: unable to guess system type + +This script, last modified $timestamp, has failed to recognize +the operating system you are using. It is advised that you +download the most up to date version of the config scripts from + + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess +and + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub + +If the version you run ($0) is already up to date, please +send the following data and any information you think might be +pertinent to <con...@gn...> in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: Property changes on: branches/ogsector/config.guess ___________________________________________________________________ Name: svn:executable + * Added: branches/ogsector/config.sub =================================================================== --- branches/ogsector/config.sub (rev 0) +++ branches/ogsector/config.sub 2007-09-20 19:32:22 UTC (rev 740) @@ -0,0 +1,1644 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. + +timestamp='2007-06-28' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file 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 ... [truncated message content] |
From: <eg...@us...> - 2007-09-20 20:24:51
|
Revision: 741 http://opengate.svn.sourceforge.net/opengate/?rev=741&view=rev Author: egore Date: 2007-09-20 13:24:53 -0700 (Thu, 20 Sep 2007) Log Message: ----------- autogenerated stuff Modified Paths: -------------- branches/ogsector/aclocal.m4 branches/ogsector/src/Makefile.in Modified: branches/ogsector/aclocal.m4 =================================================================== --- branches/ogsector/aclocal.m4 2007-09-20 19:32:22 UTC (rev 740) +++ branches/ogsector/aclocal.m4 2007-09-20 20:24:53 UTC (rev 741) @@ -159,7 +159,7 @@ _PKG_TEXT -To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], +To get pkg-config, see <http://pkg-config.freedesktop.org/>.])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS Modified: branches/ogsector/src/Makefile.in =================================================================== --- branches/ogsector/src/Makefile.in 2007-09-20 19:32:22 UTC (rev 740) +++ branches/ogsector/src/Makefile.in 2007-09-20 20:24:53 UTC (rev 741) @@ -312,9 +312,9 @@ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/Makefile + $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2007-09-20 21:54:18
|
Revision: 745 http://opengate.svn.sourceforge.net/opengate/?rev=745&view=rev Author: egore Date: 2007-09-20 14:54:16 -0700 (Thu, 20 Sep 2007) Log Message: ----------- rework build system to be more standard and hopefully faster Modified Paths: -------------- branches/ogsector/configure.ac branches/ogsector/src/Makefile.am Modified: branches/ogsector/configure.ac =================================================================== --- branches/ogsector/configure.ac 2007-09-20 21:07:22 UTC (rev 744) +++ branches/ogsector/configure.ac 2007-09-20 21:54:16 UTC (rev 745) @@ -1,39 +1,60 @@ +dnl Process this file with autoconf to produce a configure script. +dnl Created by Anjuta application wizard. + AC_PREREQ(2.59) -AC_INIT([ogsector], [0.0.1], [spo...@so...]) +AC_INIT([opengate], [0.0.1], [http://sourceforge.net/projects/opengate/]) +AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION, [dist-bzip2]) AM_CONFIG_HEADER(config.h) +AM_MAINTAINER_MODE AM_INIT_AUTOMAKE(ogsector, 0.0.1) +AC_ISC_POSIX AC_LANG_CPLUSPLUS AC_PROG_CXX -#AM_PROG_LIBTOOL +AM_PROG_CC_STDC +AC_HEADER_STDC +AM_PROG_CC_C_O OGSECTOR_PATH=$PWD AC_PREFIX_DEFAULT($OGSECTOR_PATH) OGSECTOR_EXTERNALS_PATH=$OGSECTOR_PATH/externals +AC_SUBST(OGSECTOR_EXTERNALS_PATH) AC_SUBST(PKG_CONFIG_PATH, "$OGSECTOR_EXTERNALS_PATH/lib/pkgconfig:$PKG_CONFIG_PATH") -# OGRE - http://www.ogre3d.org/ +AM_PROG_LIBTOOL + PKG_CHECK_MODULES(OGRE, [OGRE >= 1.4.0]) -AC_SUBST(AM_CXXFLAGS,"$AM_CXXFLAGS $OGRE_CFLAGS") -AC_SUBST(AM_LDFLAGS,"$AM_LDFLAGS $OGRE_LIBS") +AC_SUBST(OGRE_CFLAGS) +AC_SUBST(OGRE_LIBS) PKG_CHECK_MODULES(CEGUI, [CEGUI >= 0.5.0]) -AC_SUBST(AM_CXXFLAGS,"$AM_CXXFLAGS $CEGUI_CFLAGS") -AC_SUBST(AM_LDFLAGS,"$AM_LDFLAGS $CEGUI_LIBS") +AC_SUBST(CEGUI_CFLAGS) +AC_SUBST(CEGUI_LIBS) PKG_CHECK_MODULES(CEGUIOGRE, [CEGUI-OGRE >= 1.4.0]) -AC_SUBST(AM_CXXFLAGS,"$AM_CXXFLAGS $CEGUIOGRE_CFLAGS") -AC_SUBST(AM_LDFLAGS,"$AM_LDFLAGS $CEGUIOGRE_LIBS") +AC_SUBST(CEGUIOGRE_CFLAGS) +AC_SUBST(CEGUIOGRE_LIBS) -dnl OIS - http://www.sourceforge.net/projects/wgois/ -PKG_CHECK_MODULES(OIS, [OIS >= 0.9.9]) -AC_SUBST(AM_CXXFLAGS, "$AM_CXXFLAGS $OIS_CFLAGS") -AC_SUBST(AM_LDFLAGS, "$AM_LDFLAGS $OIS_LIBS") +PKG_CHECK_MODULES(OIS, [OIS >= 1.0.0]) +AC_SUBST(OIS_CFLAGS) +AC_SUBST(OIS_LIBS) +PKG_CHECK_MODULES(freealut, [freealut >= 1.0.1]) +AC_SUBST(freealut_CFLAGS) +AC_SUBST(freealut_LIBS) + +PKG_CHECK_MODULES(vorbis, [vorbis >= 1.1.2]) +AC_SUBST(vorbis_CFLAGS) +AC_SUBST(vorbis_LIBS) + +PKG_CHECK_MODULES(vorbisfile, [vorbisfile >= 1.1.2]) +AC_SUBST(vorbisfile_CFLAGS) +AC_SUBST(vorbisfile_LIBS) + dnl asio: http://sourceforge.net/projects/asio/ AC_CHECK_HEADER([asio.hpp],, [ @@ -46,44 +67,16 @@ dnl # some of the boost headers are needed by asio #AC_CHECK_HEADER([boost/bind.h]) -AC_SUBST(AM_LDFLAGS, "$AM_LDFLAGS -lboost_thread") +AC_SUBST(AM_LDFLAGS, "$AM_LDFLAGS -lboost_thread -lboost_regex") - - -#freealut - http://www.openal.org -PKG_CHECK_MODULES(freealut, [freealut >= 1.0.1]) -AC_SUBST(AM_CXXFLAGS, "$AM_CXXFLAGS $freealut_CFLAGS") -AC_SUBST(AM_LDFLAGS, "$AM_LDFLAGS $freealut_LIBS") - -#vorbis - http://xiph.org/vorbis/ -PKG_CHECK_MODULES(vorbis, [vorbis >= 1.1.2]) -AC_SUBST(AM_CXXFLAGS, "$AM_CXXFLAGS $vorbis_CFLAGS") -AC_SUBST(AM_LDFLAGS, "$AM_LDFLAGS $vorbis_LIBS") - -PKG_CHECK_MODULES(vorbisfile, [vorbisfile >= 1.1.2]) -AC_SUBST(AM_CXXFLAGS, "$AM_CXXFLAGS $vorbisfile_CFLAGS") -AC_SUBST(AM_LDFLAGS, "$AM_LDFLAGS $vorbisfile_LIBS") - -AC_SUBST([CXXFLAGS], ["${CXXFLAGS} -Wall -I$OGSECTOR_EXTERNALS_PATH/include"]) +AC_SUBST([CXXFLAGS], ["${CXXFLAGS} -I$OGSECTOR_EXTERNALS_PATH/include"]) AC_SUBST([CXXFLAGS], ["${CXXFLAGS} -I$OGSECTOR_EXTERNALS_PATH/ogreopcode/include"]) AC_SUBST([CXXFLAGS], ["${CXXFLAGS} -I$OGSECTOR_EXTERNALS_PATH/ogreopcode/opcode132"]) -AC_SUBST([LDFLAGS], ["${LDFLAGS} -L$OGSECTOR_EXTERNALS_PATH/lib/ -lOpcode -lOgreOpcode -lboost_regex"]) +AC_SUBST([LDFLAGS], ["${LDFLAGS} -L$OGSECTOR_EXTERNALS_PATH/lib/ -lOpcode -lOgreOpcode"]) -#AC_SUBST([CXXFLAGS], ["-g -Wall ${CXXFLAGS}"]) -dnl #libopcode -dnl PKG_CHECK_MODULES(GRAPPLE, [GRAPPLE >= 0.9]) -dnl AM_CXXFLAGS="$AM_CXXFLAGS $GRAPPLE_CFLAGS" -dnl AM_LDFLAGS="$AM_LDFLAGS $GRAPPLE_LIBS" +AC_OUTPUT([ +Makefile +src/Makefile +]) -#openAL, alut -dnl AC_SUBST(AM_CXXFLAGS, "$AM_CXXFLAGS") -dnl AC_SUBST(AM_LDFLAGS, "$AM_LDFLAGS") - -AC_CONFIG_FILES([ \ - Makefile \ - src/Makefile \ - ] ) - -AC_OUTPUT - AC_MSG_RESULT([Configuration successful! Now type 'make'.]) Modified: branches/ogsector/src/Makefile.am =================================================================== --- branches/ogsector/src/Makefile.am 2007-09-20 21:07:22 UTC (rev 744) +++ branches/ogsector/src/Makefile.am 2007-09-20 21:54:16 UTC (rev 745) @@ -66,6 +66,19 @@ metaserver.h \ metaserver.cpp +opengateclient_LDFLAGS = \ + $(OGRE_LIBS) \ + $(CEGUI_LIBS) \ + $(CEGUIOGRE_LIBS) \ + $(freealut_LIBS) \ + $(vorbisfile_LIBS) \ + $(OIS_LIBS) \ + -L$(OGSECTOR_EXTERNALS_PATH)/lib/ + +opengateclient_CXXFLAGS = \ + $(OGRE_CFLAGS) \ + $(CEGUI_CFLAGS) + opengateserver_SOURCES = \ opengateserver.cpp \ common.h \ @@ -84,6 +97,13 @@ metaserver.h \ metaserver.cpp +opengateserver_LDFLAGS = \ + $(OGRE_LIBS) \ + $(OIS_LIBS) + +opengateserver_CXXFLAGS = \ + $(OGRE_CFLAGS) + testopenalmanager_SOURCES = \ testopenalmanager.cpp \ common.h \ @@ -109,6 +129,18 @@ ResourceManager.h \ ResourceManager.cpp +testopenalmanager_LDFLAGS = \ + $(OGRE_LIBS) \ + $(CEGUI_LIBS) \ + $(CEGUIOGRE_LIBS) \ + $(freealut_LIBS) \ + $(vorbisfile_LIBS) \ + $(OIS_LIBS) + +testopenalmanager_CXXFLAGS = \ + $(OGRE_CFLAGS) \ + $(CEGUI_CFLAGS) + distclean: maintainer-clean rm -rf *~ \ Makefile.in This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2007-09-20 21:55:48
|
Revision: 746 http://opengate.svn.sourceforge.net/opengate/?rev=746&view=rev Author: egore Date: 2007-09-20 14:55:50 -0700 (Thu, 20 Sep 2007) Log Message: ----------- autogenerated stuff Modified Paths: -------------- branches/ogsector/aclocal.m4 branches/ogsector/config.h.in branches/ogsector/src/Makefile.in Modified: branches/ogsector/aclocal.m4 =================================================================== --- branches/ogsector/aclocal.m4 2007-09-20 21:54:16 UTC (rev 745) +++ branches/ogsector/aclocal.m4 2007-09-20 21:55:50 UTC (rev 746) @@ -11,6 +11,6627 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- + +# serial 51 AC_PROG_LIBTOOL + + +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) + + +# AC_PROG_LIBTOOL +# --------------- +AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) + +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL + + +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +# Prevent multiple expansion +define([AC_PROG_LIBTOOL], []) +])# _AC_PROG_LIBTOOL + + +# AC_LIBTOOL_SETUP +# ---------------- +AC_DEFUN([AC_LIBTOOL_SETUP], +[AC_PREREQ(2.50)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl +AC_REQUIRE([AC_PROG_NM])dnl + +AC_REQUIRE([AC_PROG_LN_S])dnl +AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +AC_REQUIRE([AC_OBJEXT])dnl +AC_REQUIRE([AC_EXEEXT])dnl +dnl + +AC_LIBTOOL_SYS_MAX_CMD_LEN +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +AC_LIBTOOL_OBJDIR + +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +_LT_AC_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e 1s/^X//' +[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] + +# Same as above, but do not quote variable references. +[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +AC_CHECK_TOOL(AR, ar, false) +AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_CHECK_TOOL(STRIP, strip, :) + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + AC_PATH_MAGIC + fi + ;; +esac + +AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +enable_win32_dll=yes, enable_win32_dll=no) + +AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +AC_ARG_WITH([pic], + [AC_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) +test -z "$pic_mode" && pic_mode=default + +# Check if we have a version mismatch between libtool.m4 and ltmain.sh. +# +# Note: This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined. +# We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually +# calls AC_LIBTOOL_CONFIG and creates libtool. +# +_LT_VERSION_CHECK + +# Use C for the default configuration in the libtool script +tagname= +AC_LIBTOOL_LANG_C_CONFIG +_LT_AC_TAGCONFIG +])# AC_LIBTOOL_SETUP + + +# _LT_VERSION_CHECK +# ----------------- +AC_DEFUN([_LT_VERSION_CHECK], +[AC_MSG_CHECKING([for correct ltmain.sh version]) +if test "x$ltmain" = "x" ; then + AC_MSG_RESULT(no) + AC_MSG_ERROR([ + +*** @<:@Gentoo@:>@ sanity check failed! *** +*** \$ltmain is not defined, please check the patch for consistency! *** +]) +fi +gentoo_lt_version="1.5.24" +gentoo_ltmain_version=`sed -n '/^[[ ]]*VERSION=/{s/^[[ ]]*VERSION=//;p;q;}' "$ltmain"` +if test "x$gentoo_lt_version" != "x$gentoo_ltmain_version" ; then + AC_MSG_RESULT(no) + AC_MSG_ERROR([ + +*** @<:@Gentoo@:>@ sanity check failed! *** +*** libtool.m4 and ltmain.sh have a version mismatch! *** +*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) *** + +Please run: + + libtoolize --copy --force + +if appropriate, please contact the maintainer of this +package (or your distribution) for help. +]) +else + AC_MSG_RESULT(yes) +fi +])# _LT_VERSION_CHECK + + +# _LT_AC_SYS_COMPILER +# ------------------- +AC_DEFUN([_LT_AC_SYS_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_AC_SYS_COMPILER + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +AC_DEFUN([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +AC_DEFUN([_LT_COMPILER_BOILERPLATE], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +AC_DEFUN([_LT_LINKER_BOILERPLATE], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_LINKER_BOILERPLATE + + +# _LT_AC_SYS_LIBPATH_AIX +# ---------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_AC_SYS_LIBPATH_AIX + + +# _LT_AC_SHELL_INIT(ARG) +# ---------------------- +AC_DEFUN([_LT_AC_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_AC_SHELL_INIT + + +# _LT_AC_PROG_ECHO_BACKSLASH +# -------------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], +[_LT_AC_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +echo=${ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat <<EOF +[$]* +EOF + exit 0 +fi + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(ECHO) +])])# _LT_AC_PROG_ECHO_BACKSLASH + + +# _LT_AC_LOCK +# ----------- +AC_DEFUN([_LT_AC_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +[*-*-cygwin* | *-*-mingw* | *-*-pw32*) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; + ]) +esac + +need_locks="$enable_libtool_lock" + +])# _LT_AC_LOCK + + +# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], +[AC_REQUIRE([LT_AC_PROG_SED]) +AC_CACHE_CHECK([$1], [$2], + [$2=no + ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $rm conftest* +]) + +if test x"[$]$2" = xyes; then + ifelse([$5], , :, [$5]) +else + ifelse([$6], , :, [$6]) +fi +])# AC_LIBTOOL_COMPILER_OPTION + + +# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ------------------------------------------------------------ +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + ifelse([$4], , :, [$4]) +else + ifelse([$5], , :, [$5]) +fi +])# AC_LIBTOOL_LINKER_OPTION + + +# AC_LIBTOOL_SYS_MAX_CMD_LEN +# -------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], +[# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +])# AC_LIBTOOL_SYS_MAX_CMD_LEN + + +# _LT_AC_CHECK_DLFCN +# ------------------ +AC_DEFUN([_LT_AC_CHECK_DLFCN], +[AC_CHECK_HEADERS(dlfcn.h)dnl +])# _LT_AC_CHECK_DLFCN + + +# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# --------------------------------------------------------------------- +AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<EOF +[#line __oline__ "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include <dlfcn.h> +#endif + +#include <stdio.h> + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +}] +EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_AC_TRY_DLOPEN_SELF + + +# AC_LIBTOOL_DLOPEN_SELF +# ---------------------- +AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +])# AC_LIBTOOL_DLOPEN_SELF + + +# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) +# --------------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler +AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* +]) +])# AC_LIBTOOL_PROG_CC_C_O + + +# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) +# ----------------------------------------- +# Check to see if we can do hard links to lock some files if needed +AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], +[AC_REQUIRE([_LT_AC_LOCK])dnl + +hard_links="nottested" +if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS + + +# AC_LIBTOOL_OBJDIR +# ----------------- +AC_DEFUN([AC_LIBTOOL_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +])# AC_LIBTOOL_OBJDIR + + +# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) +# ---------------------------------------------- +# Check hardcoding attributes. +AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_AC_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ + test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ + test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_AC_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_AC_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_AC_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH + + +# AC_LIBTOOL_SYS_LIB_STRIP +# ------------------------ +AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], +[striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) +fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +])# AC_LIBTOOL_SYS_LIB_STRIP + + +# AC_LIBTOOL_SYS_DYNAMIC_LINKER +# ----------------------------- +# PORTME Fill in your ld.so characteristics +AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +m4_if($1,[],[ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`echo $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib<name>.so + # instead of lib<name>.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + # Handle Gentoo/FreeBSD as it was Linux + case $host_vendor in + gentoo) + version_type=linux ;; + *) + version_type=freebsd-$objformat ;; + esac + + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + linux) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + need_lib_prefix=no + need_version=no + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[[3-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if... [truncated message content] |
From: <eg...@us...> - 2007-09-21 09:32:36
|
Revision: 751 http://opengate.svn.sourceforge.net/opengate/?rev=751&view=rev Author: egore Date: 2007-09-21 02:32:38 -0700 (Fri, 21 Sep 2007) Log Message: ----------- Remove autogenerated stuff Removed Paths: ------------- branches/ogsector/aclocal.m4 branches/ogsector/config.guess branches/ogsector/config.h.in branches/ogsector/config.sub branches/ogsector/depcomp branches/ogsector/install-sh branches/ogsector/missing Deleted: branches/ogsector/aclocal.m4 =================================================================== --- branches/ogsector/aclocal.m4 2007-09-20 22:03:47 UTC (rev 750) +++ branches/ogsector/aclocal.m4 2007-09-21 09:32:38 UTC (rev 751) @@ -1,7721 +0,0 @@ -# generated automatically by aclocal 1.9.6 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- - -# serial 51 AC_PROG_LIBTOOL - - -# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) -# ----------------------------------------------------------- -# If this macro is not defined by Autoconf, define it here. -m4_ifdef([AC_PROVIDE_IFELSE], - [], - [m4_define([AC_PROVIDE_IFELSE], - [m4_ifdef([AC_PROVIDE_$1], - [$2], [$3])])]) - - -# AC_PROG_LIBTOOL -# --------------- -AC_DEFUN([AC_PROG_LIBTOOL], -[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl -dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX -dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. - AC_PROVIDE_IFELSE([AC_PROG_CXX], - [AC_LIBTOOL_CXX], - [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX - ])]) -dnl And a similar setup for Fortran 77 support - AC_PROVIDE_IFELSE([AC_PROG_F77], - [AC_LIBTOOL_F77], - [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 -])]) - -dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. -dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run -dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. - AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [ifdef([AC_PROG_GCJ], - [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([A][M_PROG_GCJ], - [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([LT_AC_PROG_GCJ], - [define([LT_AC_PROG_GCJ], - defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) -])])# AC_PROG_LIBTOOL - - -# _AC_PROG_LIBTOOL -# ---------------- -AC_DEFUN([_AC_PROG_LIBTOOL], -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl -AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl -AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl -AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -# Prevent multiple expansion -define([AC_PROG_LIBTOOL], []) -])# _AC_PROG_LIBTOOL - - -# AC_LIBTOOL_SETUP -# ---------------- -AC_DEFUN([AC_LIBTOOL_SETUP], -[AC_PREREQ(2.50)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl -AC_REQUIRE([AC_PROG_NM])dnl - -AC_REQUIRE([AC_PROG_LN_S])dnl -AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! -AC_REQUIRE([AC_OBJEXT])dnl -AC_REQUIRE([AC_EXEEXT])dnl -dnl - -AC_LIBTOOL_SYS_MAX_CMD_LEN -AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE -AC_LIBTOOL_OBJDIR - -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -_LT_AC_PROG_ECHO_BACKSLASH - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e 1s/^X//' -[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] - -# Same as above, but do not quote variable references. -[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Constants: -rm="rm -f" - -# Global variables: -default_ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a -ltmain="$ac_aux_dir/ltmain.sh" -ofile="$default_ofile" -with_gnu_ld="$lt_cv_prog_gnu_ld" - -AC_CHECK_TOOL(AR, ar, false) -AC_CHECK_TOOL(RANLIB, ranlib, :) -AC_CHECK_TOOL(STRIP, strip, :) - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -test -z "$AS" && AS=as -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$DLLTOOL" && DLLTOOL=dlltool -test -z "$LD" && LD=ld -test -z "$LN_S" && LN_S="ln -s" -test -z "$MAGIC_CMD" && MAGIC_CMD=file -test -z "$NM" && NM=nm -test -z "$SED" && SED=sed -test -z "$OBJDUMP" && OBJDUMP=objdump -test -z "$RANLIB" && RANLIB=: -test -z "$STRIP" && STRIP=: -test -z "$ac_objext" && ac_objext=o - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - AC_PATH_MAGIC - fi - ;; -esac - -AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -enable_win32_dll=yes, enable_win32_dll=no) - -AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -AC_ARG_WITH([pic], - [AC_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) -test -z "$pic_mode" && pic_mode=default - -# Check if we have a version mismatch between libtool.m4 and ltmain.sh. -# -# Note: This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined. -# We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually -# calls AC_LIBTOOL_CONFIG and creates libtool. -# -_LT_VERSION_CHECK - -# Use C for the default configuration in the libtool script -tagname= -AC_LIBTOOL_LANG_C_CONFIG -_LT_AC_TAGCONFIG -])# AC_LIBTOOL_SETUP - - -# _LT_VERSION_CHECK -# ----------------- -AC_DEFUN([_LT_VERSION_CHECK], -[AC_MSG_CHECKING([for correct ltmain.sh version]) -if test "x$ltmain" = "x" ; then - AC_MSG_RESULT(no) - AC_MSG_ERROR([ - -*** @<:@Gentoo@:>@ sanity check failed! *** -*** \$ltmain is not defined, please check the patch for consistency! *** -]) -fi -gentoo_lt_version="1.5.24" -gentoo_ltmain_version=`sed -n '/^[[ ]]*VERSION=/{s/^[[ ]]*VERSION=//;p;q;}' "$ltmain"` -if test "x$gentoo_lt_version" != "x$gentoo_ltmain_version" ; then - AC_MSG_RESULT(no) - AC_MSG_ERROR([ - -*** @<:@Gentoo@:>@ sanity check failed! *** -*** libtool.m4 and ltmain.sh have a version mismatch! *** -*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) *** - -Please run: - - libtoolize --copy --force - -if appropriate, please contact the maintainer of this -package (or your distribution) for help. -]) -else - AC_MSG_RESULT(yes) -fi -])# _LT_VERSION_CHECK - - -# _LT_AC_SYS_COMPILER -# ------------------- -AC_DEFUN([_LT_AC_SYS_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_AC_SYS_COMPILER - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -AC_DEFUN([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -AC_DEFUN([_LT_COMPILER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -AC_DEFUN([_LT_LINKER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* -])# _LT_LINKER_BOILERPLATE - - -# _LT_AC_SYS_LIBPATH_AIX -# ---------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_AC_SYS_LIBPATH_AIX - - -# _LT_AC_SHELL_INIT(ARG) -# ---------------------- -AC_DEFUN([_LT_AC_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_AC_SHELL_INIT - - -# _LT_AC_PROG_ECHO_BACKSLASH -# -------------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], -[_LT_AC_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -echo=${ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then - # Yippee, $echo works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<EOF -[$]* -EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$ECHO"; then -if test "X${echo_test_string+set}" != Xset; then -# find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string=`eval $cmd`) 2>/dev/null && - echo_test_string=`eval $cmd` && - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null - then - break - fi - done -fi - -if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : -else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$echo" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - echo='print -r' - elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - echo='printf %s\n' - if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - echo="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - echo="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - echo=echo - fi - fi - fi - fi -fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -ECHO=$echo -if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(ECHO) -])])# _LT_AC_PROG_ECHO_BACKSLASH - - -# _LT_AC_LOCK -# ----------- -AC_DEFUN([_LT_AC_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AC_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) LD="${LD-ld} -64" ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw* | *-*-pw32*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; - ]) -esac - -need_locks="$enable_libtool_lock" - -])# _LT_AC_LOCK - - -# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED]) -AC_CACHE_CHECK([$1], [$2], - [$2=no - ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $rm conftest* -]) - -if test x"[$]$2" = xyes; then - ifelse([$5], , :, [$5]) -else - ifelse([$6], , :, [$6]) -fi -])# AC_LIBTOOL_COMPILER_OPTION - - -# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ------------------------------------------------------------ -# Check whether the given compiler option works -AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - ifelse([$4], , :, [$4]) -else - ifelse([$5], , :, [$5]) -fi -])# AC_LIBTOOL_LINKER_OPTION - - -# AC_LIBTOOL_SYS_MAX_CMD_LEN -# -------------------------- -AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], -[# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -])# AC_LIBTOOL_SYS_MAX_CMD_LEN - - -# _LT_AC_CHECK_DLFCN -# ------------------ -AC_DEFUN([_LT_AC_CHECK_DLFCN], -[AC_CHECK_HEADERS(dlfcn.h)dnl -])# _LT_AC_CHECK_DLFCN - - -# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# --------------------------------------------------------------------- -AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<EOF -[#line __oline__ "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include <dlfcn.h> -#endif - -#include <stdio.h> - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - exit (status); -}] -EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_AC_TRY_DLOPEN_SELF - - -# AC_LIBTOOL_DLOPEN_SELF -# ---------------------- -AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], -[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_AC_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_AC_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -])# AC_LIBTOOL_DLOPEN_SELF - - -# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) -# --------------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler -AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* -]) -])# AC_LIBTOOL_PROG_CC_C_O - - -# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) -# ----------------------------------------- -# Check to see if we can do hard links to lock some files if needed -AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], -[AC_REQUIRE([_LT_AC_LOCK])dnl - -hard_links="nottested" -if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS - - -# AC_LIBTOOL_OBJDIR -# ----------------- -AC_DEFUN([AC_LIBTOOL_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -])# AC_LIBTOOL_OBJDIR - - -# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) -# ---------------------------------------------- -# Check hardcoding attributes. -AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_AC_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ - test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ - test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existant directories. - if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_AC_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_AC_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_AC_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH - - -# AC_LIBTOOL_SYS_LIB_STRIP -# ------------------------ -AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], -[striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) -fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -])# AC_LIBTOOL_SYS_LIB_STRIP - - -# AC_LIBTOOL_SYS_DYNAMIC_LINKER -# ----------------------------- -# PORTME Fill in your ld.so characteristics -AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -m4_if($1,[],[ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`echo $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib<name>.so - # instead of lib<name>.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - # Handle Gentoo/FreeBSD as it was Linux - case $host_vendor in - gentoo) - version_type=linux ;; - *) - version_type=freebsd-$objformat ;; - esac - - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - linux) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - need_lib_prefix=no - need_version=no - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[[3-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d ... [truncated message content] |
From: <eg...@us...> - 2007-09-21 09:33:18
|
Revision: 752 http://opengate.svn.sourceforge.net/opengate/?rev=752&view=rev Author: egore Date: 2007-09-21 02:33:21 -0700 (Fri, 21 Sep 2007) Log Message: ----------- Use symlinks to point to autofoo stuff Added Paths: ----------- branches/ogsector/depcomp branches/ogsector/install-sh branches/ogsector/missing Added: branches/ogsector/depcomp =================================================================== --- branches/ogsector/depcomp (rev 0) +++ branches/ogsector/depcomp 2007-09-21 09:33:21 UTC (rev 752) @@ -0,0 +1 @@ +link /usr/share/automake-1.10/depcomp \ No newline at end of file Property changes on: branches/ogsector/depcomp ___________________________________________________________________ Name: svn:special + * Added: branches/ogsector/install-sh =================================================================== --- branches/ogsector/install-sh (rev 0) +++ branches/ogsector/install-sh 2007-09-21 09:33:21 UTC (rev 752) @@ -0,0 +1 @@ +link /usr/share/automake-1.10/install-sh \ No newline at end of file Property changes on: branches/ogsector/install-sh ___________________________________________________________________ Name: svn:special + * Added: branches/ogsector/missing =================================================================== --- branches/ogsector/missing (rev 0) +++ branches/ogsector/missing 2007-09-21 09:33:21 UTC (rev 752) @@ -0,0 +1 @@ +link /usr/share/automake-1.10/missing \ No newline at end of file Property changes on: branches/ogsector/missing ___________________________________________________________________ Name: svn:special + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eg...@us...> - 2007-09-21 12:45:45
|
Revision: 753 http://opengate.svn.sourceforge.net/opengate/?rev=753&view=rev Author: egore Date: 2007-09-21 05:45:47 -0700 (Fri, 21 Sep 2007) Log Message: ----------- Improve autotools a bit further Modified Paths: -------------- branches/ogsector/TODO.cbrill branches/ogsector/configure.ac Modified: branches/ogsector/TODO.cbrill =================================================================== --- branches/ogsector/TODO.cbrill 2007-09-21 09:33:21 UTC (rev 752) +++ branches/ogsector/TODO.cbrill 2007-09-21 12:45:47 UTC (rev 753) @@ -3,3 +3,4 @@ * remove ogre dependency from server * remove ois dependency from server * remove testopenalmanager once the client is done +* fix "make dist" with ogreopcode external stuff Modified: branches/ogsector/configure.ac =================================================================== --- branches/ogsector/configure.ac 2007-09-21 09:33:21 UTC (rev 752) +++ branches/ogsector/configure.ac 2007-09-21 12:45:47 UTC (rev 753) @@ -16,14 +16,13 @@ AC_HEADER_STDC AM_PROG_CC_C_O +# TODO: remove this part OGSECTOR_PATH=$PWD - AC_PREFIX_DEFAULT($OGSECTOR_PATH) - OGSECTOR_EXTERNALS_PATH=$OGSECTOR_PATH/externals AC_SUBST(OGSECTOR_EXTERNALS_PATH) - AC_SUBST(PKG_CONFIG_PATH, "$OGSECTOR_EXTERNALS_PATH/lib/pkgconfig:$PKG_CONFIG_PATH") +# TODO: end remove AM_PROG_LIBTOOL @@ -55,7 +54,19 @@ AC_SUBST(vorbisfile_CFLAGS) AC_SUBST(vorbisfile_LIBS) -dnl asio: http://sourceforge.net/projects/asio/ +AC_CHECK_LIB([boost_regex], + [main], + , + [AC_MSG_ERROR([*** boost_regex library not found!])] +) + +AC_CHECK_LIB([boost_thread], + [main], + , + [AC_MSG_ERROR([*** boost_thread library not found!])] +) + +# TODO: fix this part AC_CHECK_HEADER([asio.hpp],, [ echo "Can't find asio headers. Please install the asio development packages." @@ -63,16 +74,11 @@ exit 1 ],[]) -dnl boost: http://www.boost.org/ -dnl # some of the boost headers are needed by asio -#AC_CHECK_HEADER([boost/bind.h]) - -AC_SUBST(AM_LDFLAGS, "$AM_LDFLAGS -lboost_thread -lboost_regex") - AC_SUBST([CXXFLAGS], ["${CXXFLAGS} -I$OGSECTOR_EXTERNALS_PATH/include"]) AC_SUBST([CXXFLAGS], ["${CXXFLAGS} -I$OGSECTOR_EXTERNALS_PATH/ogreopcode/include"]) AC_SUBST([CXXFLAGS], ["${CXXFLAGS} -I$OGSECTOR_EXTERNALS_PATH/ogreopcode/opcode132"]) AC_SUBST([LDFLAGS], ["${LDFLAGS} -L$OGSECTOR_EXTERNALS_PATH/lib/ -lOpcode -lOgreOpcode"]) +# TODO: end fix AC_OUTPUT([ Makefile This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |