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:
57
Engine/SoundLib/WaveLoader.h
Normal file
57
Engine/SoundLib/WaveLoader.h
Normal file
@@ -0,0 +1,57 @@
|
||||
// WaveLoader.h: interface for the CWaveLoader class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_WAVELOADER_H__3687F4CA_E7BA_48A0_93A9_A32858B43DF2__INCLUDED_)
|
||||
#define AFX_WAVELOADER_H__3687F4CA_E7BA_48A0_93A9_A32858B43DF2__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
#include <dsound.h>
|
||||
#include "DefineSound.h"
|
||||
|
||||
#define WAVEFILE_READ 1
|
||||
#define WAVEFILE_WRITE 2
|
||||
|
||||
class CWaveLoader
|
||||
{
|
||||
public:
|
||||
WAVEFORMATEX* m_pwfx; // Pointer to WAVEFORMATEX structure
|
||||
HMMIO m_hmmio; // MM I/O handle for the WAVE
|
||||
CHAR* m_pResourceBuffer;
|
||||
DWORD m_dwSize; // The size of the wave file
|
||||
BOOL m_bIsReadingFromMemory;
|
||||
bool m_bEOF;
|
||||
|
||||
MMCKINFO m_ck; // Multimedia RIFF chunk
|
||||
MMCKINFO m_ckRiff; // Use in opening a WAVE file
|
||||
MMIOINFO m_mmioinfoOut;
|
||||
DWORD m_dwFlags;
|
||||
BYTE* m_pbData;
|
||||
BYTE* m_pbDataCur;
|
||||
ULONG m_ulDataSize;
|
||||
|
||||
protected:
|
||||
HRESULT ReadMMIO();
|
||||
HRESULT WriteMMIO( WAVEFORMATEX *pwfxDest );
|
||||
|
||||
public:
|
||||
CWaveLoader();
|
||||
~CWaveLoader();
|
||||
|
||||
bool IsEOF() { return m_bEOF; };
|
||||
HRESULT Open( LPTSTR strFileName, WAVEFORMATEX* pwfx, DWORD dwFlags );
|
||||
HRESULT OpenFromMemory( BYTE* pbData, ULONG ulDataSize, WAVEFORMATEX* pwfx, DWORD dwFlags );
|
||||
HRESULT Close();
|
||||
HRESULT Read( BYTE* pBuffer, DWORD dwSizeToRead, DWORD* pdwSizeRead );
|
||||
HRESULT Write( UINT nSizeToWrite, BYTE* pbData, UINT* pnSizeWrote );
|
||||
DWORD GetSize();
|
||||
HRESULT ResetFile();
|
||||
WAVEFORMATEX* GetFormat() { return m_pwfx; };
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_WAVELOADER_H__3687F4CA_E7BA_48A0_93A9_A32858B43DF2__INCLUDED_)
|
||||
Reference in New Issue
Block a user