@ -160,10 +160,6 @@ public:
} ;
} ;
// this structure is fill by the loadForm() function and will contain all you need
std : : map < std : : string , CSoundGroupSerializer > Container ;
CClusteredSound : : CClusteredSound ( )
CClusteredSound : : CClusteredSound ( )
: _Scene ( 0 ) ,
: _Scene ( 0 ) ,
_RootCluster ( 0 ) ,
_RootCluster ( 0 ) ,
@ -173,21 +169,27 @@ CClusteredSound::CClusteredSound()
}
}
void CClusteredSound : : buildSheets ( const std : : string & packedSheetPath )
{
std : : map < std : : string , CSoundGroupSerializer > container ;
: : loadForm ( " sound_group " , packedSheetPath + " sound_groups.packed_sheets " , container , true , false ) ;
}
void CClusteredSound : : init ( NL3D : : CScene * scene , float portalInterpolate , float maxEarDist , float minGain )
void CClusteredSound : : init ( NL3D : : CScene * scene , float portalInterpolate , float maxEarDist , float minGain )
{
{
// load the sound_group sheets
// load the sound_group sheets
: : loadForm ( " sound_group " , CAudioMixerUser : : instance ( ) - > getPackedSheetPath ( ) + " sound_groups.packed_sheets " , Container , CAudioMixerUser : : instance ( ) - > getPackedSheetUpdate ( ) , false ) ;
std : : map < std : : string , CSoundGroupSerializer > container ;
: : loadForm ( " sound_group " , CAudioMixerUser : : instance ( ) - > getPackedSheetPath ( ) + " sound_groups.packed_sheets " , container , CAudioMixerUser : : instance ( ) - > getPackedSheetUpdate ( ) , false ) ;
// copy the container data into internal structure
// copy the container data into internal structure
std : : map < std : : string , CSoundGroupSerializer > : : iterator first ( Container. begin ( ) ) , last ( C ontainer. end ( ) ) ;
std : : map < std : : string , CSoundGroupSerializer > : : iterator first ( container. begin ( ) ) , last ( c ontainer. end ( ) ) ;
for ( ; first ! = last ; + + first )
for ( ; first ! = last ; + + first )
{
{
_SoundGroupToSound . insert ( first - > second . _SoundGroupAssoc . begin ( ) , first - > second . _SoundGroupAssoc . end ( ) ) ;
_SoundGroupToSound . insert ( first - > second . _SoundGroupAssoc . begin ( ) , first - > second . _SoundGroupAssoc . end ( ) ) ;
}
}
// and clear the temporary Container
// and clear the temporary Container
C ontainer. clear ( ) ;
c ontainer. clear ( ) ;
_Scene = scene ;
_Scene = scene ;