From: Andy D. <kha...@us...> - 2004-11-03 16:04:44
|
Update of /cvsroot/planeshift/planeshift/src/client/sound In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9085/src/client/sound Modified Files: pssoundmngr.cpp pssoundmngr.h Log Message: Implemented new BinaryRBTree<T> and BinaryRBIterator<> red-black binary trees based on libavl. Removed old BinaryTree<T> and BinaryTreeIterator<T> implementation. Index: pssoundmngr.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/sound/pssoundmngr.cpp,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** pssoundmngr.cpp 5 Oct 2004 04:34:37 -0000 1.69 --- pssoundmngr.cpp 3 Nov 2004 16:04:34 -0000 1.70 *************** *** 607,611 **** void psMapSoundSystem::EnableMusic( bool enable ) { ! BinaryTreeIterator<psSectorSoundManager> iter(§ors); for ( psSectorSoundManager* sect = iter.First(); sect; sect = ++iter ) { --- 607,611 ---- void psMapSoundSystem::EnableMusic( bool enable ) { ! BinaryRBIterator<psSectorSoundManager> iter(§ors); for ( psSectorSoundManager* sect = iter.First(); sect; sect = ++iter ) { *************** *** 617,621 **** void psMapSoundSystem::EnableSounds( bool enable ) { ! BinaryTreeIterator<psSectorSoundManager> iter(§ors); Fade_Direction dir; --- 617,621 ---- void psMapSoundSystem::EnableSounds( bool enable ) { ! BinaryRBIterator<psSectorSoundManager> iter(§ors); Fade_Direction dir; *************** *** 665,669 **** Debug2(LOG_SOUND, "Loading Sound System for Sector: %s", sectorName.GetData() ); psSectorSoundManager* manager = new psSectorSoundManager( sectorName, sndmngr->GetEngine(), this ); ! sectors.Add( manager ); csRef<iDocumentNodeIterator> ambientItr = sector->GetNodes("AMBIENT"); --- 665,669 ---- Debug2(LOG_SOUND, "Loading Sound System for Sector: %s", sectorName.GetData() ); psSectorSoundManager* manager = new psSectorSoundManager( sectorName, sndmngr->GetEngine(), this ); ! sectors.Insert( manager ); csRef<iDocumentNodeIterator> ambientItr = sector->GetNodes("AMBIENT"); Index: pssoundmngr.h =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/sound/pssoundmngr.h,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** pssoundmngr.h 4 Oct 2004 04:01:55 -0000 1.35 --- pssoundmngr.h 3 Nov 2004 16:04:34 -0000 1.36 *************** *** 30,34 **** #include <iutil/eventh.h> #include <iutil/comp.h> ! #include "util/binarytree.h" #include "isound/loader.h" #include "csutil/hash.h" --- 30,34 ---- #include <iutil/eventh.h> #include <iutil/comp.h> ! #include "util/prb.h" #include "isound/loader.h" #include "csutil/hash.h" *************** *** 366,374 **** void New3DMeshSound( psSoundObject* sound ); ! bool operator==(psSectorSoundManager& other ) { return other.sector == this->sector; } ! bool operator<( psSectorSoundManager& other ) { return ( strcmp( this->sector.GetData(), other.sector.GetData()) < 0); --- 366,374 ---- void New3DMeshSound( psSoundObject* sound ); ! bool operator==(psSectorSoundManager& other ) const { return other.sector == this->sector; } ! bool operator<( psSectorSoundManager& other ) const { return ( strcmp( this->sector.GetData(), other.sector.GetData()) < 0); *************** *** 418,422 **** void EnableSounds( bool enable ); csRef<iObjectRegistry> objectReg; ! BinaryTree<psSectorSoundManager> sectors; psSoundManager* sndmngr; --- 418,422 ---- void EnableSounds( bool enable ); csRef<iObjectRegistry> objectReg; ! BinaryRBTree<psSectorSoundManager> sectors; psSoundManager* sndmngr; |