mirror of
https://github.com/krystalgamer/spidey-decomp.git
synced 2025-02-22 05:40:51 +00:00
fix build
This commit is contained in:
parent
300ff84301
commit
ef5bd7e3d2
@ -28,5 +28,5 @@ add_executable(${PROJECT_NAME} ${SRC_FILES})
|
||||
if (UNIX)
|
||||
target_link_libraries(${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/lib/libz.a)
|
||||
elseif(WIN32)
|
||||
target_link_libraries(${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/lib/safesehzlib.lib winmm.lib dinput8.lib dxguid.lib dsound.lib)
|
||||
target_link_libraries(${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/lib/safesehzlib.lib winmm.lib dinput8.lib dxguid.lib dsound.lib ddraw.lib)
|
||||
endif ()
|
||||
|
@ -218,6 +218,7 @@ void displayDSError(long,char *,i32)
|
||||
// @Ok
|
||||
INLINE void enumDisplayModes(void)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
DDSURFACEDESC2 v123;
|
||||
|
||||
memset(&v123, 0, sizeof(v123));
|
||||
@ -226,12 +227,14 @@ INLINE void enumDisplayModes(void)
|
||||
v123.ddsCaps.dwCaps = DDSCAPS_3DDEVICE;
|
||||
HRESULT hr = lpDD->EnumDisplayModes(0, &v123, gD3DOptionsRelated, enumerateModesCB);
|
||||
D3D_ERROR_LOG_AND_QUIT(hr);
|
||||
#endif
|
||||
}
|
||||
|
||||
// @Ok
|
||||
// Slightly different register allocation
|
||||
HRESULT WINAPI enumerateModesCB(LPDDSURFACEDESC2 pDesc, void* pUnkContext)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
DXVideoModeContext* pContext = reinterpret_cast<DXVideoModeContext*>(pUnkContext);
|
||||
|
||||
if (pContext->mNumEntries < 64)
|
||||
@ -272,7 +275,7 @@ HRESULT WINAPI enumerateModesCB(LPDDSURFACEDESC2 pDesc, void* pUnkContext)
|
||||
pContext->mFlags[i] |= 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -527,9 +530,11 @@ void validate_SVideoMode(void)
|
||||
|
||||
void validate_DXVideoModeContext(void)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
VALIDATE_SIZE(DXVideoModeContext, 0x1F44);
|
||||
|
||||
VALIDATE(DXVideoModeContext, mNumEntries, 0x0);
|
||||
VALIDATE(DXVideoModeContext, mSurfaces, 0x4);
|
||||
VALIDATE(DXVideoModeContext, mFlags, 0x1F04);
|
||||
#endif
|
||||
}
|
||||
|
2
my_dx.h
2
my_dx.h
@ -18,6 +18,7 @@
|
||||
typedef i32 _DDPIXELFORMAT;
|
||||
typedef i32 DDPIXELFORMAT;
|
||||
typedef i32 DDSURFACEDESC2;
|
||||
typedef DDSURFACEDESC2* LPDDSURFACEDESC2;
|
||||
typedef i32 D3DDEVICEDESC7;
|
||||
typedef i32 IDirectInputA;
|
||||
typedef i32 IDirectDrawSurface7;
|
||||
@ -29,6 +30,7 @@ typedef DIRECTINPUT8* LPDIRECTINPUT8;
|
||||
typedef i32 DIRECTSOUND8;
|
||||
typedef DIRECTSOUND8* LPDIRECTSOUND8;
|
||||
typedef void* LPDIRECTDRAWSURFACE7;
|
||||
typedef void* LPDIRECTDRAW7;
|
||||
|
||||
struct DSCAPS
|
||||
{
|
||||
|
20
my_types.h
20
my_types.h
@ -52,12 +52,28 @@ typedef int i32;
|
||||
#ifndef _WIN32
|
||||
#define FAILED(x) ((i32)(x) < 0)
|
||||
|
||||
struct _GUID
|
||||
typedef struct _GUID
|
||||
{
|
||||
u8 pad[0x10];
|
||||
};
|
||||
} GUID;
|
||||
|
||||
typedef u32 HRESULT;
|
||||
typedef i32 BOOL;
|
||||
typedef char* LPSTR;
|
||||
typedef void* LPVOID;
|
||||
typedef i32 HMONITOR;
|
||||
|
||||
struct RECT
|
||||
{};
|
||||
|
||||
struct tagPOINT
|
||||
{
|
||||
};
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user