Files
Client/GameTools/Zallad3D SceneClass/SectorSoundMap.h
LGram16 dd97ddec92 Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code:
- Client: Game client source (moved to Client/Client/)
- Server: Game server source
- GameTools: Development tools
- CryptoSource: Encryption utilities
- database: Database scripts
- Script: Game scripts
- rylCoder_16.02.2008_src: Legacy coder tools
- GMFont, Game: Additional resources

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 20:17:20 +09:00

108 lines
3.3 KiB
C++

// 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<SSoundAsset> SOUNDASSETS;
// typedef std::multiset<SScheduleSound> SCHEDULESOUNDLIST;
typedef std::vector<SScheduleSound> SCHEDULESOUNDLIST;
typedef std::list<SAmbience> AMBIENCELIST;
typedef std::vector<CSoundBuffer*> 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_)