re3-wiiu/src/core/ControllerConfig.h

58 lines
1.3 KiB
C
Raw Normal View History

2019-05-31 19:02:26 +02:00
#pragma once
// based on x-gtasa
enum eControllerType
{
KEYBOARD,
OPTIONAL_EXTRA,
MOUSE,
JOYSTICK,
};
class CMouseControllerState;
2019-05-31 19:02:26 +02:00
class CControllerConfigManager
{
public:
struct tControllerConfigBind
{
RsKeyCodes m_Key;
2019-06-17 00:16:38 +02:00
int32 m_ContSetOrder;
2019-05-31 19:02:26 +02:00
};
2019-06-17 00:16:38 +02:00
bool field_0;
2019-05-31 19:02:26 +02:00
char _pad0[3];
DIJOYSTATE2 m_OldState;
DIJOYSTATE2 m_NewState;
2019-06-17 00:16:38 +02:00
wchar m_aActionNames[41][40];
bool m_aButtonStates[17];
2019-05-31 19:02:26 +02:00
char _pad1[3];
tControllerConfigBind m_aSettings[41][4];
2019-06-17 00:16:38 +02:00
uint8 m_aSimCheckers[4][4];
bool m_bMouseAssociated;
2019-05-31 19:02:26 +02:00
char _pad2[3];
void UpdateJoyButtonState(int padnumber);
void UpdateJoyInConfigMenus_ButtonDown(int button, int padnumber);
void AffectControllerStateOn_ButtonDown(int button, eControllerType type);
void UpdateJoyInConfigMenus_ButtonUp(int button, int padnumber);
void AffectControllerStateOn_ButtonUp(int button, int padnumber);
2019-06-17 00:16:38 +02:00
int32 GetJoyButtonJustDown();
void LoadSettings(int32 file);
2019-07-03 17:26:15 +02:00
void SaveSettings(int32 file);
void MakeControllerActionsBlank();
void InitDefaultControlConfiguration();
void InitDefaultControlConfigMouse(CMouseControllerState const &mousestate);
2019-06-05 21:18:06 +02:00
void InitDefaultControlConfigJoyPad(unsigned int buttons);
2019-06-13 02:35:26 +02:00
void ClearSimButtonPressCheckers();
void AffectPadFromKeyBoard();
void AffectPadFromMouse();
2019-05-31 19:02:26 +02:00
};
VALIDATE_SIZE(CControllerConfigManager, 0x143C);
extern CControllerConfigManager &ControlsManager;