remove dependency on directx sdk
This commit is contained in:
parent
e44fd0eac9
commit
416dcc5ff1
|
@ -25,7 +25,7 @@
|
|||
#include <mmsystem.h>
|
||||
#include <COMMDLG.H>
|
||||
#include <string.h>
|
||||
#include <dinput.h>
|
||||
#include "directx/dinput.h"
|
||||
|
||||
#include "CWindow.h"
|
||||
#include "ConfigKeys.h"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#define CONFIGKEYS_H
|
||||
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
#include <dinput.h>
|
||||
#include "directx/dinput.h"
|
||||
|
||||
extern const DWORD tabkey[48];
|
||||
extern DWORD ds_up;
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
EnableFiberSafeOptimizations="false"
|
||||
WholeProgramOptimization="false"
|
||||
AdditionalIncludeDirectories="..;.\zlib123;.\zziplib"
|
||||
PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;VERSION=\"0.8.0b2 DEBUG\";WIN32;BETA_VERSION;SPU_INTERPOLATE;HAVE_LIBZ"
|
||||
PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;VERSION=\"0.8.0b2 DEBUG\";WIN32;BETA_VERSION;SPU_INTERPOLATE;HAVE_LIBZ;GDB_STUB"
|
||||
ExceptionHandling="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableEnhancedInstructionSet="0"
|
||||
|
@ -73,7 +73,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib user32.lib gdi32.lib dxguid.lib shell32.lib comdlg32.lib dxerr.lib dsound.lib dinput8.lib ddraw.lib zlib-2005-x32.lib zziplib-2005-x32.lib"
|
||||
AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib user32.lib gdi32.lib directx\dxguid.lib shell32.lib comdlg32.lib directx\dxerr8.lib directx\dsound.lib directx\dinput8.lib directx\ddraw.lib zlib-2005-x32.lib zziplib-2005-x32.lib"
|
||||
OutputFile="$(OutDir)\$(ProjectName)_debug.exe"
|
||||
AdditionalLibraryDirectories=".\zlib123;.\zziplib"
|
||||
GenerateDebugInformation="true"
|
||||
|
@ -162,7 +162,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib user32.lib gdi32.lib dxguid.lib shell32.lib comdlg32.lib dxerr.lib dsound.lib dinput8.lib ddraw.lib zlib-2005-x32.lib zziplib-2005-x32.lib"
|
||||
AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib user32.lib gdi32.lib directx\dxguid.lib shell32.lib comdlg32.lib directx\dxerr8.lib directx\dsound.lib directx\dinput8.lib directx\ddraw.lib zlib-2005-x32.lib zziplib-2005-x32.lib"
|
||||
OutputFile="$(OutDir)\$(ProjectName).exe"
|
||||
AdditionalLibraryDirectories=".\zlib123;.\zziplib"
|
||||
GenerateDebugInformation="true"
|
||||
|
@ -250,7 +250,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib user32.lib gdi32.lib dxguid.lib shell32.lib comdlg32.lib dxerr.lib dsound.lib dinput8.lib ddraw.lib zlib-2005-x32.lib zziplib-2005-x32.lib"
|
||||
AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib user32.lib gdi32.lib directx\dxguid.lib shell32.lib comdlg32.lib directx\dxerr8.lib directx\dsound.lib directx\dinput8.lib directx\ddraw.lib zlib-2005-x32.lib zziplib-2005-x32.lib"
|
||||
OutputFile="$(OutDir)\$(ProjectName)_sse2.exe"
|
||||
AdditionalLibraryDirectories=".\zlib123;.\zziplib"
|
||||
GenerateDebugInformation="true"
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib user32.lib gdi32.lib dxguid.lib shell32.lib comdlg32.lib dxerr.lib dsound.lib dinput8.lib ddraw.lib"
|
||||
AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib user32.lib gdi32.lib directx\dxguid.lib shell32.lib comdlg32.lib directx\dxerr8.lib directx\dsound.lib directx\dinput8.lib directx\ddraw.lib zlib-2005-x32.lib zziplib-2005-x32.lib"
|
||||
OutputFile="$(OutDir)\$(ProjectName)_debug.exe"
|
||||
AdditionalLibraryDirectories=".\zlib123;.\zziplib"
|
||||
GenerateDebugInformation="true"
|
||||
|
@ -249,7 +249,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib user32.lib gdi32.lib dxguid.lib shell32.lib comdlg32.lib dxerr.lib dsound.lib dinput8.lib ddraw.lib zlib-2008-x32.lib zziplib-2008-x32.lib"
|
||||
AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib user32.lib gdi32.lib directx\dxguid.lib shell32.lib comdlg32.lib directx\dxerr8.lib directx\dsound.lib directx\dinput8.lib directx\ddraw.lib zlib-2005-x32.lib zziplib-2005-x32.lib"
|
||||
OutputFile="$(OutDir)\$(ProjectName)_sse2.exe"
|
||||
AdditionalLibraryDirectories=".\zlib123;.\zziplib"
|
||||
GenerateDebugInformation="true"
|
||||
|
@ -425,7 +425,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib user32.lib gdi32.lib dxguid.lib shell32.lib comdlg32.lib dxerr.lib dsound.lib dinput8.lib ddraw.lib zlib-2008-x32.lib zziplib-2008-x32.lib"
|
||||
AdditionalDependencies="opengl32.lib glu32.lib ws2_32.lib user32.lib gdi32.lib directx\dxguid.lib shell32.lib comdlg32.lib directx\dxerr8.lib directx\dsound.lib directx\dinput8.lib directx\ddraw.lib zlib-2005-x32.lib zziplib-2005-x32.lib"
|
||||
OutputFile="$(OutDir)\$(ProjectName)_sse2.exe"
|
||||
AdditionalLibraryDirectories=".\zlib123;.\zziplib"
|
||||
GenerateDebugInformation="true"
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -0,0 +1,99 @@
|
|||
/*==========================================================================;
|
||||
*
|
||||
*
|
||||
* File: dxerr8.h
|
||||
* Content: DirectX Error Library Include File
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _DXERR8_H_
|
||||
#define _DXERR8_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
//
|
||||
// DXGetErrorString8
|
||||
//
|
||||
// Desc: Converts a DirectX HRESULT to a string
|
||||
//
|
||||
// Args: HRESULT hr Can be any error code from
|
||||
// D3D8 D3DX8 DDRAW DPLAY8 DMUSIC DSOUND DINPUT DSHOW
|
||||
//
|
||||
// Return: Converted string
|
||||
//
|
||||
const char* WINAPI DXGetErrorString8A(HRESULT hr);
|
||||
const WCHAR* WINAPI DXGetErrorString8W(HRESULT hr);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define DXGetErrorString8 DXGetErrorString8W
|
||||
#else
|
||||
#define DXGetErrorString8 DXGetErrorString8A
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// DXGetErrorDescription8
|
||||
//
|
||||
// Desc: Returns a string description of a DirectX HRESULT
|
||||
//
|
||||
// Args: HRESULT hr Can be any error code from
|
||||
// D3D8 D3DX8 DDRAW DPLAY8 DMUSIC DSOUND DINPUT DSHOW
|
||||
//
|
||||
// Return: String description
|
||||
//
|
||||
const char* WINAPI DXGetErrorDescription8A(HRESULT hr);
|
||||
const WCHAR* WINAPI DXGetErrorDescription8W(HRESULT hr);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define DXGetErrorDescription8 DXGetErrorDescription8W
|
||||
#else
|
||||
#define DXGetErrorDescription8 DXGetErrorDescription8A
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// DXTrace
|
||||
//
|
||||
// Desc: Outputs a formatted error message to the debug stream
|
||||
//
|
||||
// Args: CHAR* strFile The current file, typically passed in using the
|
||||
// __FILE__ macro.
|
||||
// DWORD dwLine The current line number, typically passed in using the
|
||||
// __LINE__ macro.
|
||||
// HRESULT hr An HRESULT that will be traced to the debug stream.
|
||||
// CHAR* strMsg A string that will be traced to the debug stream (may be NULL)
|
||||
// BOOL bPopMsgBox If TRUE, then a message box will popup also containing the passed info.
|
||||
//
|
||||
// Return: The hr that was passed in.
|
||||
//
|
||||
HRESULT WINAPI DXTraceA( const char* strFile, DWORD dwLine, HRESULT hr, const char* strMsg, BOOL bPopMsgBox );
|
||||
HRESULT WINAPI DXTraceW( const char* strFile, DWORD dwLine, HRESULT hr, const WCHAR* strMsg, BOOL bPopMsgBox );
|
||||
|
||||
#ifdef UNICODE
|
||||
#define DXTrace DXTraceW
|
||||
#else
|
||||
#define DXTrace DXTraceA
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Helper macros
|
||||
//
|
||||
#if defined(DEBUG) | defined(_DEBUG)
|
||||
#define DXTRACE_MSG(str) DXTrace( __FILE__, (DWORD)__LINE__, 0, str, FALSE )
|
||||
#define DXTRACE_ERR(str,hr) DXTrace( __FILE__, (DWORD)__LINE__, hr, str, TRUE )
|
||||
#define DXTRACE_ERR_NOMSGBOX(str,hr) DXTrace( __FILE__, (DWORD)__LINE__, hr, str, FALSE )
|
||||
#else
|
||||
#define DXTRACE_MSG(str) (0L)
|
||||
#define DXTRACE_ERR(str,hr) (hr)
|
||||
#define DXTRACE_ERR_NOMSGBOX(str,hr) (hr)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
#endif // _DXERR8_H_
|
Binary file not shown.
|
@ -59,7 +59,7 @@
|
|||
|
||||
#include "snddx.h"
|
||||
|
||||
#include <ddraw.h>
|
||||
#include "directx/ddraw.h"
|
||||
|
||||
#define GPU3D_NULL 0
|
||||
#define GPU3D_OPENGL 1
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <dsound.h>
|
||||
#include "directx/dsound.h"
|
||||
#ifdef __MINGW32__
|
||||
// I have to do this because for some reason because the dxerr8.h header is fubared
|
||||
const char* __stdcall DXGetErrorString8A(HRESULT hr);
|
||||
|
@ -26,7 +26,7 @@ const char* __stdcall DXGetErrorString8A(HRESULT hr);
|
|||
const char* __stdcall DXGetErrorDescription8A(HRESULT hr);
|
||||
#define DXGetErrorDescription8 DXGetErrorDescription8A
|
||||
#else
|
||||
#include <dxerr.h>
|
||||
#include "directx/dxerr8.h"
|
||||
#endif
|
||||
#include "SPU.h"
|
||||
#include "snddx.h"
|
||||
|
@ -72,14 +72,14 @@ int SNDDXInit(int buffersize)
|
|||
|
||||
if ((ret = DirectSoundCreate8(NULL, &lpDS8, NULL)) != DS_OK)
|
||||
{
|
||||
sprintf(tempstr, "DirectSound8Create error: %s - %s", DXGetErrorString(ret), DXGetErrorDescription(ret));
|
||||
sprintf(tempstr, "DirectSound8Create error: %s - %s", DXGetErrorString8(ret), DXGetErrorDescription8(ret));
|
||||
MessageBox (NULL, tempstr, "Error", MB_OK | MB_ICONINFORMATION);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((ret = IDirectSound8_SetCooperativeLevel(lpDS8, hwnd, DSSCL_PRIORITY)) != DS_OK)
|
||||
{
|
||||
sprintf(tempstr, "IDirectSound8_SetCooperativeLevel error: %s - %s", DXGetErrorString(ret), DXGetErrorDescription(ret));
|
||||
sprintf(tempstr, "IDirectSound8_SetCooperativeLevel error: %s - %s", DXGetErrorString8(ret), DXGetErrorDescription8(ret));
|
||||
MessageBox (NULL, tempstr, "Error", MB_OK | MB_ICONINFORMATION);
|
||||
return -1;
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ int SNDDXInit(int buffersize)
|
|||
|
||||
if ((ret = IDirectSound8_CreateSoundBuffer(lpDS8, &dsbdesc, &lpDSB, NULL)) != DS_OK)
|
||||
{
|
||||
sprintf(tempstr, "Error when creating primary sound buffer: %s - %s", DXGetErrorString(ret), DXGetErrorDescription(ret));
|
||||
sprintf(tempstr, "Error when creating primary sound buffer: %s - %s", DXGetErrorString8(ret), DXGetErrorDescription8(ret));
|
||||
MessageBox (NULL, tempstr, "Error", MB_OK | MB_ICONINFORMATION);
|
||||
return -1;
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ int SNDDXInit(int buffersize)
|
|||
|
||||
if ((ret = IDirectSoundBuffer8_SetFormat(lpDSB, &wfx)) != DS_OK)
|
||||
{
|
||||
sprintf(tempstr, "IDirectSoundBuffer8_SetFormat error: %s - %s", DXGetErrorString(ret), DXGetErrorDescription(ret));
|
||||
sprintf(tempstr, "IDirectSoundBuffer8_SetFormat error: %s - %s", DXGetErrorString8(ret), DXGetErrorDescription8(ret));
|
||||
MessageBox (NULL, tempstr, "Error", MB_OK | MB_ICONINFORMATION);
|
||||
return -1;
|
||||
}
|
||||
|
@ -136,14 +136,14 @@ int SNDDXInit(int buffersize)
|
|||
|
||||
if ((ret = IDirectSound8_CreateSoundBuffer(lpDS8, &dsbdesc, &lpDSB2, NULL)) != DS_OK)
|
||||
{
|
||||
sprintf(tempstr, "Error when creating secondary sound buffer: %s - %s", DXGetErrorString(ret), DXGetErrorDescription(ret));
|
||||
sprintf(tempstr, "Error when creating secondary sound buffer: %s - %s", DXGetErrorString8(ret), DXGetErrorDescription8(ret));
|
||||
MessageBox (NULL, tempstr, "Error", MB_OK | MB_ICONINFORMATION);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(tempstr, "Error when creating secondary sound buffer: %s - %s", DXGetErrorString(ret), DXGetErrorDescription(ret));
|
||||
sprintf(tempstr, "Error when creating secondary sound buffer: %s - %s", DXGetErrorString8(ret), DXGetErrorDescription8(ret));
|
||||
MessageBox (NULL, tempstr, "Error", MB_OK | MB_ICONINFORMATION);
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue