// SectorSoundMap.h: interface for the CSectorSoundMap class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_SECTORSOUNDMAP_H__7411D669_725E_454F_BA8C_F8F5A45C9F38__INCLUDED_) #define AFX_SECTORSOUNDMAP_H__7411D669_725E_454F_BA8C_F8F5A45C9F38__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "STL.h" struct SSoundAsset; struct SAmbience; struct SSoundList; struct SScheduleSound; class CSoundBuffer; class CDirectSound; //struct ITERATOR; struct IDirectSound8; typedef struct HWND__* HWND; typedef unsigned long DWORD; typedef void * HANDLE; //////////////////////////////////////////////////////////////// // class CSectorSoundMap { protected: //»ç¿ë ¸øÇϵµ·Ï Çϱâ À§ÇØ º¸È£ ¸â¹ö·Î ¼³Á¤ CSectorSoundMap( HWND, DWORD ); CSectorSoundMap( IDirectSound8 * ); CSectorSoundMap( const CSectorSoundMap & ); CSectorSoundMap & operator=( const CSectorSoundMap & ); public: static CSectorSoundMap & GetInstance( HWND = 0, DWORD = 0 ); // static CSectorSoundMap & GetInstance( IDirectSound8 * = 0 ); virtual ~CSectorSoundMap(); void Create( const char * ); //È­ÀÏ¿¡¼­ Àоî¿Í¼­ »ý¼º void Save( const char * ); //È­ÀÏ·Î ÀúÀå void Destroy(); void AppendSoundAsset( SSoundAsset & ); void GetSoundAsset( int, SSoundAsset & ); void SetSoundAsset( int, SSoundAsset & ); void DeleteSoundAsset( int ); int GetSoundAssetCount(); int GetAmbienceCount( int SectorX, int SectorY ); SAmbience * GetAmbience( int SectorX, int SectorY, int index ); SAmbience * GetAmbience( float x, float y, float z ); void PickAmbience( float x, float y, float z ); void AddAmbience( SAmbience &, bool bReset = true ); void MoveAmbience( float destX, float destY, float destZ ); long DeleteAmbience( float x, float y, float z ); //°Å¸®°¡ 10.0f ÀÌÇÏÀÎ °ÍµéÁß¿¡¼­ ÁÖ¾îÁø ÁÂÇ¥¿Í °¡Àå °¡±î¿î Ambience¸¦ »èÁ¦, ObjectSceneID¸¦ ¸®ÅÏ void UpdateListener( float dirX, float dirY, float dirZ , float upX, float upY, float upZ , float x, float y, float z ); //¸ðµç »ç¿îµå¸¦ ÇѲ¨¹ø¿¡ ¼¼ÆÃÇØ¼­ Ç÷¹ÀÌÇÏÁö ¾Ê°í, ¼½Åͺ°·Î ÇÑ´Ù. CDirectSound & GetDirectSoundObject() { return m_DSound; } IDirectSound8 * GetDS(); public: typedef std::vector SOUNDASSETS; // typedef std::multiset SCHEDULESOUNDLIST; typedef std::vector SCHEDULESOUNDLIST; typedef std::list AMBIENCELIST; typedef std::vector SOUNDBUFFERS; protected: SOUNDASSETS * m_pSoundAssets; SSoundList ** m_aaSoundList; // ITERATOR * m_pCurrentScheduleSound; int m_iCurrentScheduleSound; CDirectSound & m_DSound; SOUNDBUFFERS * m_pSoundBuffers; int m_iCurrentSectorX; //ÇöÀç ListenerÀÇ ¼½ÅÍ ÁÂÇ¥ int m_iCurrentSectorY; HANDLE * m_arrEvent; int * m_arrEventIndexes; //arrEventÀÇ °¢ À̺¥Æ®°¡ ¾î¶² ¹öÆÛ¿¡ ¼ÓÇÑ °ÍÀÎÁö¸¦ ³ªÅ¸³»´Â À妽ºµé int m_nEvent; float m_fPickedX, m_fPickedY, m_fPickedZ; protected: void RebuildScheduleSound( SSoundList & ); void ResetSectorSound( int, int ); int GetWholeSectorAmbienceNum(); //Àüü ¼½ÅÍÀÇ ambienceµéÀÇ ÃÑÇÕÀ» ¸®ÅÏ void ResetEventArray(); void HandleStreamEvents(); void DestroyAllSoundBuffers(); }; //////////////////////////////////////////////////////////////// #endif // !defined(AFX_SECTORSOUNDMAP_H__7411D669_725E_454F_BA8C_F8F5A45C9F38__INCLUDED_)