From: <spo...@us...> - 2009-02-11 23:59:13
|
Revision: 1028 http://opengate.svn.sourceforge.net/opengate/?rev=1028&view=rev Author: spom_spom Date: 2009-02-11 23:59:10 +0000 (Wed, 11 Feb 2009) Log Message: ----------- internal entity names are now case insensitive, removed some debug msgs. Modified Paths: -------------- trunk/data/gui/config.ini trunk/data/gui/fonts/BlueHighway-12.font trunk/data/gui/fonts/BlueHighway-14.font trunk/data/gui/fonts/BlueHighway-16.font trunk/src/EntityManager.cpp trunk/src/GameStateManager.cpp trunk/src/Moveable.cpp trunk/src/Moveable.h trunk/src/OpenALSoundManager.cpp trunk/src/UnDockedState.cpp Modified: trunk/data/gui/config.ini =================================================================== --- trunk/data/gui/config.ini 2009-02-11 23:50:17 UTC (rev 1027) +++ trunk/data/gui/config.ini 2009-02-11 23:59:10 UTC (rev 1028) @@ -1,5 +1,5 @@ [user] -username: -password: +username: testuser +password: test1 [display] -show startup video: true \ No newline at end of file +show startup video: false \ No newline at end of file Modified: trunk/data/gui/fonts/BlueHighway-12.font =================================================================== --- trunk/data/gui/fonts/BlueHighway-12.font 2009-02-11 23:50:17 UTC (rev 1027) +++ trunk/data/gui/fonts/BlueHighway-12.font 2009-02-11 23:59:10 UTC (rev 1028) @@ -1,2 +1,2 @@ <?xml version="1.0" ?> -<Font Name="BlueHighway-12" Filename="BlueHighway.ttf" Type="FreeType" Size="12" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="true" /> +<Font Name="BlueHighway-12" Filename="BlueHighway.ttf" Type="FreeType" Size="12" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="false" AntiAlias="true" /> Modified: trunk/data/gui/fonts/BlueHighway-14.font =================================================================== --- trunk/data/gui/fonts/BlueHighway-14.font 2009-02-11 23:50:17 UTC (rev 1027) +++ trunk/data/gui/fonts/BlueHighway-14.font 2009-02-11 23:59:10 UTC (rev 1028) @@ -1,2 +1,2 @@ <?xml version="1.0" ?> -<Font Name="BlueHighway-14" Filename="BlueHighway.ttf" Type="FreeType" Size="14" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="true" /> +<Font Name="BlueHighway-14" Filename="BlueHighway.ttf" Type="FreeType" Size="14" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="false" AntiAlias="true" /> Modified: trunk/data/gui/fonts/BlueHighway-16.font =================================================================== --- trunk/data/gui/fonts/BlueHighway-16.font 2009-02-11 23:50:17 UTC (rev 1027) +++ trunk/data/gui/fonts/BlueHighway-16.font 2009-02-11 23:59:10 UTC (rev 1028) @@ -1,2 +1,2 @@ <?xml version="1.0" ?> -<Font Name="BlueHighway-16" Filename="BlueHighway.ttf" Type="FreeType" Size="16" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="true" /> +<Font Name="BlueHighway-16" Filename="BlueHighway.ttf" Type="FreeType" Size="16" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="false" AntiAlias="true"/> Modified: trunk/src/EntityManager.cpp =================================================================== --- trunk/src/EntityManager.cpp 2009-02-11 23:50:17 UTC (rev 1027) +++ trunk/src/EntityManager.cpp 2009-02-11 23:59:10 UTC (rev 1028) @@ -107,8 +107,8 @@ } Entity * EntityManager::entity( const std::string & name ) { - if ( templatesByName_.count( name ) ){ - return templatesByName_[ name ]; + if ( templatesByName_.count( strCopyToLowerCase( name ) ) ){ + return templatesByName_[ strCopyToLowerCase( name ) ]; } else { LogManager::getSingleton().warn( "No entity named: " + name + " registered." ); return NULL; @@ -166,8 +166,9 @@ Ogre::StringVectorPtr files = pArch->find( "*.xml", true, false); for ( unsigned int i = 0; i < (*files).size(); i ++ ){ - if ( (*files)[ i ].rfind( ".mesh.xml" ) == std::string::npos ){ - log_->fout( std::string( "Found ressource: " ) + (*files)[ i ] ); + if ( (*files)[ i ].rfind( ".mesh.xml" ) == std::string::npos && + (*files)[ i ].rfind( ".xml~" ) == std::string::npos ){ + //log_->fout( std::string( "Found ressource: " ) + (*files)[ i ] ); loadAndCreate( (*resourcePaths.begin()) + "/" + resourceName + "/" + (*files)[ i ] ); } } @@ -176,7 +177,7 @@ } Entity * EntityManager::loadAndCreate( const std::string & fileName ){ - log_->fout( "Read equipment: " + fileName ); + //log_->fout( "Read equipment: " + fileName ); TiXmlDocument doc( fileName ); bool loadOkay = doc.LoadFile(); @@ -252,8 +253,8 @@ return NULL; } - if ( templatesByName_.count( entity->name() ) == 0 ){ - templatesByName_[ entity->name() ] = entity; + if ( templatesByName_.count( strCopyToLowerCase( entity->name() ) ) == 0 ){ + templatesByName_[ strCopyToLowerCase( entity->name() ) ] = entity; templatesByID_[ entity->id() ] = entity; factions_.insert( entity->factionName() ); } else { Modified: trunk/src/GameStateManager.cpp =================================================================== --- trunk/src/GameStateManager.cpp 2009-02-11 23:50:17 UTC (rev 1027) +++ trunk/src/GameStateManager.cpp 2009-02-11 23:59:10 UTC (rev 1028) @@ -93,8 +93,8 @@ } if ( resources_.soundManager ) { log_->info( "Shutdown soundmanager." ); - delete resources_.soundManager; - resources_.soundManager = NULL; +// delete resources_.soundManager; +// resources_.soundManager = NULL; } if ( resources_.inputManager ) { log_->info( "Shutdown inputmanager." ); @@ -122,6 +122,24 @@ return true; } +bool GameStateManager::initialiseOgreEngine_( bool dialog ){ + if ( !fileExist( "ogre.cfg" ) ) { + dialog = true; + } + + if ( !dialog ){ + resources_.ogreRoot()->restoreConfig(); + resources_.renderWindow = resources_.ogreRoot()->initialise( true, "OpenGate" ); + return true; + } else { + if ( resources_.ogreRoot()->showConfigDialog() ) { + resources_.renderWindow = resources_.ogreRoot()->initialise( true, "OpenGate" ); + return true; + } + } + return false; +} + bool GameStateManager::initialiseBootstrapResources( ) { log_->info( "load bootstrap resources." ); Ogre::ConfigFile cf; cf.load( "resources.cfg" ); @@ -307,24 +325,6 @@ return true; } -bool GameStateManager::initialiseOgreEngine_( bool dialog ){ - if ( !fileExist( "ogre.cfg" ) ) { - dialog = true; - } - - if ( !dialog ){ - resources_.ogreRoot()->restoreConfig(); - resources_.renderWindow = resources_.ogreRoot()->initialise( true, "OpenGate" ); - return true; - } else { - if ( resources_.ogreRoot()->showConfigDialog() ) { - resources_.renderWindow = resources_.ogreRoot()->initialise( true, "OpenGate" ); - return true; - } - } - return false; -} - bool GameStateManager::initialiseOgreResources( ) { // Load resource paths from config file Ogre::ConfigFile cf; cf.load( "resources.cfg" ); @@ -352,12 +352,11 @@ } Ogre::ResourceGroupManager::getSingleton().initialiseResourceGroup( "Opengate" ); - std::cout << "Ogre::ResourceGroupManager::getSingleton().initialiseResourceGroup( Opengate ); " << std::endl; Ogre::ResourceGroupManager::ResourceDeclarationList li = Ogre::ResourceGroupManager::getSingleton().getResourceDeclarationList( "Opengate" ); - std::cout << li.size() << std::endl; +/* std::cout << li.size() << std::endl; for ( std::list<Ogre::ResourceGroupManager::ResourceDeclaration>::iterator it = li.begin(); it != li.end(); it ++ ){ std::cout << (*it).resourceName << std::endl; - } + }*/ return true; } Modified: trunk/src/Moveable.cpp =================================================================== --- trunk/src/Moveable.cpp 2009-02-11 23:50:17 UTC (rev 1027) +++ trunk/src/Moveable.cpp 2009-02-11 23:59:10 UTC (rev 1028) @@ -35,9 +35,9 @@ void Movable::readPropertiesFromXML( TiXmlHandle & hRoot ){ MeshEntity::readPropertiesFromXML( hRoot ); - readXMLNode< float >( hRoot, "yaw", this, &OpenGate::Movable::setYaw, false ); - readXMLNode< float >( hRoot, "pitch", this, &OpenGate::Movable::setPitch, false ); - readXMLNode< float >( hRoot, "roll", this, &OpenGate::Movable::setRoll, false ); + readXMLNode< float >( hRoot, "yaw maximum_yaw", this, &OpenGate::Movable::setYaw, false ); + readXMLNode< float >( hRoot, "pitch maximum_pitch", this, &OpenGate::Movable::setPitch, false ); + readXMLNode< float >( hRoot, "roll maximum_roll", this, &OpenGate::Movable::setRoll, false ); readXMLNode< Uint32 >( hRoot, "armor", this, &OpenGate::Movable::setArmor, false ); readXMLNode< float >( hRoot, "dragfactor drag_factor", this, &OpenGate::Movable::setDragFactor, false ); } Modified: trunk/src/Moveable.h =================================================================== --- trunk/src/Moveable.h 2009-02-11 23:50:17 UTC (rev 1027) +++ trunk/src/Moveable.h 2009-02-11 23:59:10 UTC (rev 1028) @@ -36,7 +36,7 @@ inline void setArmor( Uint32 armor ){ armor_ = armor * 1000; } inline Uint32 armor( ) const { return armor_; } - //** degree /second + /*! degree /second */ inline void setYaw( float yaw ){ yaw_ = yaw; if ( yaw_ < 1.0 ) yaw_ = 1000.0 * ( 180.0 * yaw_ ) / 3.141592; } @@ -50,6 +50,7 @@ inline void setRoll( float roll ){ roll_ = roll; if ( roll_ < 1.0 ) roll_ = 1000.0 * ( 180.0 * roll_ ) / 3.141592; } + inline float roll( ) const { return roll_; } inline void setDragFactor( float drag ){ dragFactor_ = drag; } Modified: trunk/src/OpenALSoundManager.cpp =================================================================== --- trunk/src/OpenALSoundManager.cpp 2009-02-11 23:50:17 UTC (rev 1027) +++ trunk/src/OpenALSoundManager.cpp 2009-02-11 23:59:10 UTC (rev 1028) @@ -281,7 +281,7 @@ stop(); empty_(); - alDeleteSources(1, & source_ ); +// alDeleteSources(1, & source_ ); //** valgrind says:; // Invalid read of size 4 // ==10954== at 0x6129E42: (within /usr/lib64/libopenal.so.0.0.0) Modified: trunk/src/UnDockedState.cpp =================================================================== --- trunk/src/UnDockedState.cpp 2009-02-11 23:50:17 UTC (rev 1027) +++ trunk/src/UnDockedState.cpp 2009-02-11 23:59:10 UTC (rev 1028) @@ -459,13 +459,13 @@ if ( !configMode_ ){ if ( sector_->avatarObject() != NULL ){ switch ( id ){ - case 0: + case OIS::MB_Left: sector_->avatarObject()->setFirePressed( true ); break; - case 1: + case OIS::MB_Middle: sector_->avatarObject()->fireMissile( ResourceManager::getSingleton().entityManager->missile( "Firefly" ), radar_->target() ); break; - case 2: + case OIS::MB_Right: sector_->avatarObject()->fireMissile( ResourceManager::getSingleton().entityManager->missile( "bee" ), radar_->target() ); break; default: @@ -481,7 +481,7 @@ bool UnDockedState::mouseReleased( const OIS::MouseEvent &e , OIS::MouseButtonID id ){ if ( !configMode_ ){ if ( sector_->avatarObject() != NULL ){ - if ( id == 0 ){ + if ( id == OIS::MB_Left ){ sector_->avatarObject()->setFirePressed( false); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |