2020-04-26 10:25:03 +00:00
|
|
|
|
|
|
|
// DON'T include directly. crossplatform.h includes this if you're on Windows.
|
|
|
|
|
2019-06-02 03:00:38 +00:00
|
|
|
#if (!defined(_PLATFORM_WIN_H))
|
|
|
|
#define _PLATFORM_WIN_H
|
|
|
|
|
|
|
|
#if (!defined(RSREGSETBREAKALLOC))
|
|
|
|
#define RSREGSETBREAKALLOC(_name) /* No op */
|
|
|
|
#endif /* (!defined(RSREGSETBREAKALLOC)) */
|
|
|
|
|
2020-04-21 10:28:06 +00:00
|
|
|
#ifndef _INC_WINDOWS
|
2020-07-22 11:56:28 +00:00
|
|
|
#ifdef _WIN64
|
|
|
|
#define _AMD64_
|
|
|
|
#else
|
|
|
|
#define _X86_
|
|
|
|
#endif
|
|
|
|
#include <windef.h>
|
2020-04-21 10:28:06 +00:00
|
|
|
#endif
|
|
|
|
|
2019-06-02 03:00:38 +00:00
|
|
|
enum eWinVersion
|
|
|
|
{
|
|
|
|
OS_WIN95 = 0,
|
|
|
|
OS_WIN98,
|
2019-10-27 03:17:30 +00:00
|
|
|
OS_WINNT,
|
2019-06-02 03:00:38 +00:00
|
|
|
OS_WIN2000,
|
|
|
|
OS_WINXP,
|
|
|
|
};
|
|
|
|
|
2019-10-27 03:17:30 +00:00
|
|
|
|
2020-04-21 10:28:06 +00:00
|
|
|
#ifdef __DINPUT_INCLUDED__
|
2019-06-11 09:30:53 +00:00
|
|
|
/* platform specfic global data */
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
HWND window;
|
|
|
|
HINSTANCE instance;
|
|
|
|
RwBool fullScreen;
|
|
|
|
RwV2d lastMousePos;
|
|
|
|
|
|
|
|
DWORD field_14;
|
|
|
|
|
|
|
|
LPDIRECTINPUT8 dinterface;
|
|
|
|
LPDIRECTINPUTDEVICE8 mouse;
|
|
|
|
LPDIRECTINPUTDEVICE8 joy1;
|
|
|
|
LPDIRECTINPUTDEVICE8 joy2;
|
|
|
|
}
|
|
|
|
psGlobalType;
|
|
|
|
|
|
|
|
#define PSGLOBAL(var) (((psGlobalType *)(RsGlobal.ps))->var)
|
|
|
|
|
2019-10-27 03:17:30 +00:00
|
|
|
enum eJoypads
|
|
|
|
{
|
|
|
|
JOYSTICK1 = 0,
|
|
|
|
JOYSTICK2,
|
|
|
|
MAX_JOYSTICKS
|
|
|
|
};
|
|
|
|
|
|
|
|
enum eJoypadState
|
|
|
|
{
|
|
|
|
JOYPAD_UNUSED,
|
|
|
|
JOYPAD_ATTACHED,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct tJoy
|
|
|
|
{
|
|
|
|
eJoypadState m_State;
|
|
|
|
bool m_bInitialised;
|
|
|
|
bool m_bHasAxisZ;
|
|
|
|
bool m_bHasAxisR;
|
|
|
|
int m_nVendorID;
|
|
|
|
int m_nProductID;
|
|
|
|
};
|
|
|
|
|
|
|
|
class CJoySticks
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
tJoy m_aJoys[MAX_JOYSTICKS];
|
|
|
|
|
|
|
|
CJoySticks();
|
|
|
|
void ClearJoyInfo(int joyID);
|
|
|
|
};
|
|
|
|
|
|
|
|
extern CJoySticks AllValidWinJoys;
|
2020-04-21 10:28:06 +00:00
|
|
|
#endif
|
2019-10-27 03:17:30 +00:00
|
|
|
|
2019-06-02 03:00:38 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2020-04-26 10:25:03 +00:00
|
|
|
#ifdef __DINPUT_INCLUDED__
|
2019-06-02 03:00:38 +00:00
|
|
|
extern LRESULT CALLBACK
|
|
|
|
MainWndProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam);
|
|
|
|
|
2019-06-11 09:30:53 +00:00
|
|
|
HRESULT _InputInitialise();
|
|
|
|
HRESULT _InputInitialiseMouse();
|
|
|
|
HRESULT CapturePad(RwInt32 padID);
|
|
|
|
void _InputInitialiseJoys();
|
2019-07-03 11:13:55 +00:00
|
|
|
void _InputAddJoyStick(LPDIRECTINPUTDEVICE8 lpDevice, INT num);
|
2019-06-11 09:30:53 +00:00
|
|
|
HRESULT _InputAddJoys();
|
|
|
|
HRESULT _InputGetMouseState(DIMOUSESTATE2 *state);
|
|
|
|
void _InputShutdown();
|
|
|
|
BOOL CALLBACK _InputEnumDevicesCallback( const DIDEVICEINSTANCE* pdidInstance, VOID* pContext );
|
|
|
|
BOOL _InputTranslateKey(RsKeyCodes *rs, UINT flag, UINT key);
|
2019-07-03 11:13:55 +00:00
|
|
|
BOOL _InputTranslateShiftKey(RsKeyCodes *rs, UINT key, BOOLEAN bDown);
|
2019-06-11 09:30:53 +00:00
|
|
|
BOOL _InputIsExtended(INT flag);
|
2020-04-21 10:28:06 +00:00
|
|
|
#endif
|
2019-06-11 09:30:53 +00:00
|
|
|
|
|
|
|
void CenterVideo(void);
|
|
|
|
void CloseClip(void);
|
|
|
|
|
2019-06-02 03:00:38 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
#endif /* (!defined(_PLATFORM_WIN_H)) */
|