From: <eg...@us...> - 2007-05-17 18:41:51
|
Revision: 475 http://svn.sourceforge.net/opengate/?rev=475&view=rev Author: egore Date: 2007-05-17 11:41:36 -0700 (Thu, 17 May 2007) Log Message: ----------- [Bugfix] restore deleted "s" in VesselManager [QA] add some doxygen to openALSoundManager Modified Paths: -------------- branches/ogsector/src/Sector.cpp branches/ogsector/src/VesselManager.h branches/ogsector/src/openALSoundManager.cpp branches/ogsector/src/openALSoundManager.h Modified: branches/ogsector/src/Sector.cpp =================================================================== --- branches/ogsector/src/Sector.cpp 2007-05-17 14:37:08 UTC (rev 474) +++ branches/ogsector/src/Sector.cpp 2007-05-17 18:41:36 UTC (rev 475) @@ -104,11 +104,11 @@ //*** end starfield test 2; - planetNode_ = sceneMgr_->getRootSceneNode()->createChildSceneNode( "PlanetNode" ); - Ogre::ManualObject * planet = sceneMgr_->createManualObject( "Planet" ); + planetNode_ = sceneMgr_->getRootSceneNode()->createChildSceneNode( "PlanetNode" ); + Ogre::ManualObject * planet = sceneMgr_->createManualObject( "Planet" ); // planet->setUseIdentityProjection( true ); // planet->setUseIdentityView( true ); - + planet->begin( "OpenGate/RedPlanet", Ogre::RenderOperation::OT_TRIANGLE_LIST); planet->position( Ogre::Vector3( -1.0, -1.0, 200.0 ) ); planet->textureCoord( 0, 0 ); @@ -119,13 +119,13 @@ planet->position( Ogre::Vector3( -1.0, 1.0, 200.0 ) ); planet->textureCoord( 0, 1 ); planet->quad( 0, 1, 2, 3 ); - planet->end(); + planet->end(); 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 ) ); - + new OgreOpcode::CollisionManager( sceneMgr_ ); OgreOpcode::CollisionManager::getSingletonPtr()->addCollClass( "SectorObject" ); OgreOpcode::CollisionManager::getSingletonPtr()->addCollClass( "Bullet" ); Modified: branches/ogsector/src/VesselManager.h =================================================================== --- branches/ogsector/src/VesselManager.h 2007-05-17 14:37:08 UTC (rev 474) +++ branches/ogsector/src/VesselManager.h 2007-05-17 18:41:36 UTC (rev 475) @@ -237,10 +237,10 @@ /*! Destructor that free's all loaded vessels */ ~VesselManager(); - /*! This method loads a vessel and stores it in the interal storage + /*! This method loads vessels and stores them in an interal storage * \param resourcePaths An array of all available resource paths - * \param resourceName The name of the file to load the vessel from */ - void loadVessel( const std::set < std::string > & resourcePaths, const std::string & resourceName ); + * \param resourceName The name of the file to load the vessels from */ + void loadVessels( const std::set < std::string > & resourcePaths, const std::string & resourceName ); Vessel * loadAndCreateVessel( int vesselID, const std::string & filename ); Modified: branches/ogsector/src/openALSoundManager.cpp =================================================================== --- branches/ogsector/src/openALSoundManager.cpp 2007-05-17 14:37:08 UTC (rev 474) +++ branches/ogsector/src/openALSoundManager.cpp 2007-05-17 18:41:36 UTC (rev 475) @@ -23,17 +23,17 @@ OpenALSoundManager::OpenALSoundManager( int maxBuffers, int maxSources ) : maxBuffers_( maxBuffers ), maxSources_( maxSources ){ - + //** Audio sources; audioSourcesInUseCount_ = 0; audioSources_ = new unsigned int[ maxSources_ ]; audioSourceInUse_ = new bool[ maxSources_ ]; - + //** Audio buffers; audioBuffersInUseCount_ = 0; audioBuffers_ = new unsigned int[ maxBuffers_ ]; audioBufferInUse_ = new bool[ maxBuffers_ ]; - + init(); } @@ -150,13 +150,13 @@ } //** Successfully loaded the file into an audio buffer; - audioBufferInUse_[ bufferID ] = true; + audioBufferInUse_[ bufferID ] = true; //** save the file descriptor; audioBufferFileName_[ filename ] = bufferID; //** bump the 'in use' counter; - audioBuffersInUseCount_++; + audioBuffersInUseCount_++; return bufferID; } Modified: branches/ogsector/src/openALSoundManager.h =================================================================== --- branches/ogsector/src/openALSoundManager.h 2007-05-17 14:37:08 UTC (rev 474) +++ branches/ogsector/src/openALSoundManager.h 2007-05-17 18:41:36 UTC (rev 475) @@ -18,14 +18,22 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#ifndef OPENALSOUNDMANAGER__H -#define OPENALSOUNDMANAGER__H OPENALSOUNDMANAGER__H +#ifndef _OPENGATE_OPENALSOUNDMANAGER__H +#define _OPENGATE_OPENALSOUNDMANAGER__H #include <string> #include <map> #include <AL/alut.h> +namespace OpenGate { + +/*! + * \brief The soundmanager based on OpenAL + * + * The soundmanager is used to play sounds. + * \author Carsten <spo...@us...> + */ class OpenALSoundManager{ public: @@ -34,7 +42,7 @@ ~OpenALSoundManager(); bool init(); - + std::string listAvailableDevices(); bool checkOpenALError( const std::string & str ); @@ -48,7 +56,7 @@ int loadAudioInToSystem( const std::string & filename ); bool loadAndAssignWAV( const std::string & filename, int buffNumber ); - + bool createSource( unsigned int * sourceId ); bool bindAudioToSource( unsigned int bufferId, unsigned int sourceId, bool loop = false); @@ -60,7 +68,7 @@ bool setSourcePosition( unsigned int sourceId, const double x, const double y, const double z ); bool setListenerPosition( const ALfloat x, const ALfloat y, const ALfloat z ); - + bool setListenerVelocity( const ALfloat x, const ALfloat y, const ALfloat z ); bool setListenerOrientation( const ALfloat x, const ALfloat y, const ALfloat z, @@ -71,7 +79,7 @@ int maxBuffers_; int maxSources_; int bufferUsed_; - + float listenerPosition_[ 3 ]; float listenerVelocity_[ 3 ]; float listenerOrientation_[ 6 ]; @@ -80,13 +88,15 @@ unsigned int audioSourcesInUseCount_; unsigned int * audioSources_; bool * audioSourceInUse_; - + // Audio buffers unsigned int audioBuffersInUseCount_; unsigned int * audioBuffers_; bool * audioBufferInUse_; - + std::map < std::string, unsigned int > audioBufferFileName_; }; -#endif // OPENALSOUNDMANAGER__H +} // namespace Opengate + +#endif // _OPENGATE_OPENALSOUNDMANAGER__H This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |