Initial commit: ROW Client source code
Game client codebase including: - CharacterActionControl: Character and creature management - GlobalScript: Network, items, skills, quests, utilities - RYLClient: Main client application with GUI and event handlers - Engine: 3D rendering engine (RYLGL) - MemoryManager: Custom memory allocation - Library: Third-party dependencies (DirectX, boost, etc.) - Tools: Development utilities 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
114
Tools/SoundLib/SoundManager.h
Normal file
114
Tools/SoundLib/SoundManager.h
Normal file
@@ -0,0 +1,114 @@
|
||||
|
||||
|
||||
#ifndef _SoundManager_H_
|
||||
#define _SoundManager_H_
|
||||
|
||||
#include "STL.h"
|
||||
#include "SoundGlobal.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
// <09><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
#define DSSCL_NORMAL 0x00000001
|
||||
#define DSSCL_PRIORITY 0x00000002
|
||||
#define DSSCL_EXCLUSIVE 0x00000003
|
||||
#define DSSCL_WRITEPRIMARY 0x00000004
|
||||
|
||||
class ISoundObject;
|
||||
class CSoundBuffer;
|
||||
class CDirectSound;
|
||||
class CDirectMusic;
|
||||
class IStreamHandler;
|
||||
struct CompareResource;
|
||||
typedef struct HWND__* HWND;
|
||||
typedef unsigned long DWORD;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
// <09>⺻<EFBFBD><E2BABB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><DEB8><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ѱ<EFBFBD><D1B0><EFBFBD> 5MB<4D><42> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
|
||||
class CSoundManager
|
||||
{
|
||||
public:
|
||||
typedef void (*REPORTFUNC)( const char * );
|
||||
|
||||
public:
|
||||
enum eState
|
||||
{
|
||||
STATE_USING,
|
||||
STATE_UNUSE,
|
||||
STATE_DELETED
|
||||
};
|
||||
|
||||
struct Resource
|
||||
{
|
||||
int used; //<2F><> <20><><EFBFBD>̳<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ƴ°<C6B4>?
|
||||
DWORD time; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ð<EFBFBD> <20>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ð<EFBFBD> <20>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ð<EFBFBD>
|
||||
ISoundObject * pSndBuf;
|
||||
eState state;
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
typedef map<string, Resource*> RESOURCES; //Using, Unuse <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD>鿡<EFBFBD><E9BFA1> Resource<63><65> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>ϹǷ<CFB9> <20><><EFBFBD> Resource<63><65> <20><><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
typedef set<Resource*> RESLIST;
|
||||
|
||||
|
||||
protected:
|
||||
CDirectSound & m_DSound;
|
||||
CDirectMusic & m_DMusic;
|
||||
|
||||
bool m_bDSoundEnable;
|
||||
bool m_bDMusicEnable;
|
||||
|
||||
CompareResource * m_pComparer;
|
||||
|
||||
RESOURCES * m_pResources;
|
||||
RESLIST * m_pUsingList;
|
||||
RESLIST * m_pUnuseList;
|
||||
RESLIST * m_pDeletedList;
|
||||
|
||||
IStreamHandler* m_pStreamUpdater;
|
||||
|
||||
REPORTFUNC ReportFunc; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ <20>Լ<EFBFBD>
|
||||
|
||||
protected:
|
||||
CSoundManager();
|
||||
|
||||
void Caching();
|
||||
RESLIST * GetListOfState( eState );
|
||||
eState GetStateOfList( RESLIST * );
|
||||
void MoveResourceTo( Resource &, RESLIST * );
|
||||
void CreateSoundBuffer( Resource &, const char *, bool, bool, int, DWORD );
|
||||
Resource & AddResource( const char * szFilename, bool b3DSound, bool bStream, int, DWORD );
|
||||
void UseResource( Resource & res );
|
||||
void UnuseResource( Resource & res );
|
||||
|
||||
public:
|
||||
//--------------<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̽<EFBFBD>---------------//
|
||||
static CSoundManager & GetInstance();
|
||||
~CSoundManager();
|
||||
|
||||
void Create( HWND, DWORD = DSSCL_PRIORITY );
|
||||
void Destroy();
|
||||
|
||||
void SetMemoryLimit( DWORD limit ) {}
|
||||
void SetReportFunc( REPORTFUNC func ) { ReportFunc = func; } //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
CDirectSound & GetDirectSound();
|
||||
CDirectMusic & GetDirectMusic() { return m_DMusic; }
|
||||
DWORD GetMemoryUse() {}
|
||||
ISoundObject & GetBuffer( const char * szFilename,
|
||||
bool b3DSound = false,
|
||||
bool bStream = false,
|
||||
int nBuf = 10,
|
||||
DWORD dwAddFlag = 0 );
|
||||
bool ReleaseBuffer( ISoundObject & ) { return false; }
|
||||
|
||||
void Update(); //StreamBuffer<65><72> <20>ϳ<EFBFBD><CFB3><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>쿡<EFBFBD><ECBFA1>..
|
||||
//----------------------------------------//
|
||||
};
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user