2024-05-23 17:19:28 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#ifndef DXINIT_H
|
|
|
|
#define DXINIT_H
|
|
|
|
|
2024-05-27 16:58:37 +00:00
|
|
|
#include "export.h"
|
|
|
|
|
2024-08-23 22:24:56 +00:00
|
|
|
#include "non_win32.h"
|
2024-09-05 16:15:40 +00:00
|
|
|
#include "my_dx.h"
|
2024-08-04 16:19:59 +00:00
|
|
|
|
2024-09-08 16:00:36 +00:00
|
|
|
struct DXContextEntry
|
|
|
|
{
|
|
|
|
GUID mGUID;
|
|
|
|
u8 padAfter010[0xFC-0x10];
|
|
|
|
char *pDescription;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct DXContext
|
|
|
|
{
|
|
|
|
i32 mNumEntries;
|
|
|
|
DXContextEntry mEntry[8];
|
|
|
|
};
|
|
|
|
|
2024-09-05 16:28:04 +00:00
|
|
|
EXPORT extern i32 gLowGraphics;
|
|
|
|
EXPORT extern void* gLowGraphicsRelated;
|
|
|
|
|
2024-05-27 16:58:37 +00:00
|
|
|
EXPORT void DXINIT_GetCurrentResolution(int *, int *);
|
2024-08-04 16:19:59 +00:00
|
|
|
EXPORT void AUDIOGROUPS_GetGroup(char *);
|
2024-08-17 19:57:14 +00:00
|
|
|
|
|
|
|
EXPORT void DXINIT_DirectX8(HWND, HINSTANCE,u32);
|
2024-08-04 16:19:59 +00:00
|
|
|
EXPORT void DXINIT_GetCurrentResolution(u32 *,u32 *);
|
|
|
|
EXPORT void DXINIT_GetNextColorDepth(u32);
|
|
|
|
EXPORT void DXINIT_GetNextResolution(u32 *,u32 *,u32,i32,bool);
|
|
|
|
EXPORT void DXINIT_GetPrevColorDepth(u32);
|
|
|
|
EXPORT void DXINIT_GetPrevResolution(u32 *,u32 *,u32,i32,bool);
|
|
|
|
EXPORT void DXINIT_SetDisplayOptions(u32,u32,u32,i32,i32);
|
|
|
|
EXPORT void DXINIT_ShutDown(void);
|
|
|
|
EXPORT void DXINIT_ZBufSupported(u32);
|
|
|
|
EXPORT void FreePushOffsets(void);
|
|
|
|
EXPORT void LoadPushOffsets(void);
|
2024-09-05 16:15:40 +00:00
|
|
|
EXPORT void MyD3DEnumCallback(char *,char *, D3DDEVICEDESC7 *,void *);
|
2024-09-08 16:00:36 +00:00
|
|
|
EXPORT BOOL WINAPI MyD3DEnumCallback(GUID*, LPSTR, LPSTR, LPVOID, HMONITOR);
|
2024-08-04 16:19:59 +00:00
|
|
|
EXPORT void displayD3DError(long,char *,i32);
|
|
|
|
EXPORT void displayDIError(long,char *,i32);
|
|
|
|
EXPORT void displayDSError(long,char *,i32);
|
|
|
|
EXPORT void enumDisplayModes(void);
|
2024-09-05 16:15:40 +00:00
|
|
|
EXPORT void enumerateModesCB(DDSURFACEDESC2 *,void *);
|
|
|
|
EXPORT void enumerateZBuffersCB(DDPIXELFORMAT *,void *);
|
2024-08-04 16:19:59 +00:00
|
|
|
EXPORT void getNextNumber(char *,i32 *);
|
2024-09-07 17:01:31 +00:00
|
|
|
EXPORT u8 initDirect3D7(u32);
|
2024-08-23 22:24:56 +00:00
|
|
|
EXPORT void initDirectDraw7(HWND);
|
|
|
|
EXPORT void initDirectInput8(HINSTANCE);
|
|
|
|
EXPORT void initDirectSound8(HWND);
|
2024-08-04 16:19:59 +00:00
|
|
|
EXPORT void shutdownDirect3D7(i32);
|
|
|
|
EXPORT void shutdownDirectInput8(void);
|
|
|
|
EXPORT void shutdownDirectSound8(void);
|
2024-09-05 16:28:04 +00:00
|
|
|
EXPORT void gsub_5027A0(void);
|
2024-05-27 16:58:37 +00:00
|
|
|
|
2024-09-07 17:01:31 +00:00
|
|
|
EXPORT extern i32 gColorCount;
|
2024-09-07 17:29:24 +00:00
|
|
|
EXPORT extern LPDIRECTINPUT8 gDirectInputRelated;
|
2024-09-07 17:50:33 +00:00
|
|
|
EXPORT extern LPDIRECTSOUND8 g_pDS;
|
2024-09-07 17:01:31 +00:00
|
|
|
|
2024-09-06 17:00:50 +00:00
|
|
|
#define DISPLAY_DI_ERROR(x) displayDIError(x, __FILE__, __LINE__)
|
2024-09-07 17:50:33 +00:00
|
|
|
#define DISPLAY_DS_ERROR(x) displayDSError(x, __FILE__, __LINE__)
|
2024-09-06 17:00:50 +00:00
|
|
|
|
2024-09-07 17:29:24 +00:00
|
|
|
#define DI_ERROR_LOG_AND_QUIT(x) {\
|
|
|
|
if (x)\
|
|
|
|
{\
|
|
|
|
DISPLAY_DI_ERROR(x);\
|
|
|
|
if (FAILED(hr))\
|
|
|
|
{\
|
|
|
|
DXINIT_ShutDown();\
|
|
|
|
exit(hr);\
|
|
|
|
}\
|
|
|
|
}\
|
|
|
|
}
|
|
|
|
|
2024-09-07 17:50:33 +00:00
|
|
|
#define DS_ERROR_LOG_AND_QUIT(x) {\
|
|
|
|
if (x)\
|
|
|
|
{\
|
|
|
|
DISPLAY_DS_ERROR(x);\
|
2024-09-07 17:58:29 +00:00
|
|
|
if (FAILED(hr))\
|
|
|
|
{\
|
|
|
|
DXINIT_ShutDown();\
|
|
|
|
exit(hr);\
|
|
|
|
}\
|
2024-09-07 17:50:33 +00:00
|
|
|
}\
|
|
|
|
}
|
|
|
|
|
2024-09-08 16:00:36 +00:00
|
|
|
void validate_DXContext(void);
|
|
|
|
void validate_DXContextEntry(void);
|
|
|
|
|
2024-05-27 16:58:37 +00:00
|
|
|
#endif
|