Skip to content

Commit

Permalink
Merge pull request #67 from roblabla/csoundmanager
Browse files Browse the repository at this point in the history
Implement CSound::*, CSoundManager::* and CWaveFile::*
  • Loading branch information
roblabla authored Feb 17, 2024
2 parents 4f0bf91 + db5dad3 commit 0d35952
Show file tree
Hide file tree
Showing 5 changed files with 1,318 additions and 2 deletions.
26 changes: 26 additions & 0 deletions config/implemented.csv
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,32 @@ InitD3dDevice
InitD3dRendering
Clear
SetViewport
CSoundManager::CSoundManager
CSoundManager::~CSoundManager
CSoundManager::Initialize
CSoundManager::SetPrimaryBufferFormat
CSoundManager::CreateStreaming
CSound::CSound
CSound::~CSound
CSound::FillBufferWithSound
CSound::RestoreBuffer
CSound::GetFreeBuffer
CSound::GetBuffer
CSound::Play
CSound::Stop
CSound::Reset
CStreamingSound::CStreamingSound
CStreamingSound::~CStreamingSound
CStreamingSound::UpdateFadeOut
CStreamingSound::HandleWaveStreamNotification
CStreamingSound::Reset
CWaveFile::CWaveFile
CWaveFile::Open
CWaveFile::ReadMMIO
CWaveFile::GetSize
CWaveFile::ResetFile
CWaveFile::Read
CWaveFile::Close
IPbg3Parser::Reset
IPbg3Parser::ReadVarInt
IPbg3Parser::ReadMagic
Expand Down
5 changes: 3 additions & 2 deletions scripts/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def configure(build_type):
writer.variable("cl", "cl.exe")
writer.variable(
"cl_common_flags",
"/nologo /MT /EHsc /G5 /Gs /DNDEBUG /Zi /I $builddir/autogenerated /I src /I src/pbg3",
"/nologo /MT /EHsc /G5 /Gs /GS /DNDEBUG /Zi /I $builddir/autogenerated /I src /I src/pbg3",
)
writer.variable("cl_flags", "$cl_common_flags /Od /Oi /Ob1 /Op")
writer.variable("cl_flags_pbg3", "$cl_common_flags /O2")
Expand All @@ -37,7 +37,7 @@ def configure(build_type):
)
writer.variable(
"link_libs",
"dxguid.lib d3dx8.lib d3d8.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib",
"dxguid.lib d3dx8.lib d3d8.lib dsound.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib",
)

writer.variable("msvc_deps_prefix", "Note: including file:")
Expand Down Expand Up @@ -79,6 +79,7 @@ def configure(build_type):
"GameManager",
"Rng",
"utils",
"zwave",
]

pbg3_sources = [
Expand Down
39 changes: 39 additions & 0 deletions src/dxutil.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//-----------------------------------------------------------------------------
// File: DXUtil.h
//
// Desc: Helper functions and typing shortcuts for DirectX programming.
//
// Copyright (c) 1997-2000 Microsoft Corporation. All rights reserved
//-----------------------------------------------------------------------------
#ifndef DXUTIL_H
#define DXUTIL_H

//-----------------------------------------------------------------------------
// Miscellaneous helper functions
//-----------------------------------------------------------------------------
#define SAFE_DELETE(p) \
{ \
if (p) \
{ \
delete (p); \
(p) = NULL; \
} \
}
#define SAFE_DELETE_ARRAY(p) \
{ \
if (p) \
{ \
delete[] (p); \
(p) = NULL; \
} \
}
#define SAFE_RELEASE(p) \
{ \
if (p) \
{ \
(p)->Release(); \
(p) = NULL; \
} \
}

#endif // DXUTIL_H
Loading

0 comments on commit 0d35952

Please sign in to comment.