diff options
author | Fire-Head <Fire-Head@users.noreply.github.com> | 2019-06-02 05:00:38 +0200 |
---|---|---|
committer | Fire-Head <Fire-Head@users.noreply.github.com> | 2019-06-02 05:00:38 +0200 |
commit | b1f9e28cd155459ab2843690c248ed9f4767bc3f (patch) | |
tree | 8e7d2a33d4c5109ea3c3562940268afc57d0915c /src/Pad.h | |
parent | rw skeleton (diff) | |
download | re3-b1f9e28cd155459ab2843690c248ed9f4767bc3f.tar re3-b1f9e28cd155459ab2843690c248ed9f4767bc3f.tar.gz re3-b1f9e28cd155459ab2843690c248ed9f4767bc3f.tar.bz2 re3-b1f9e28cd155459ab2843690c248ed9f4767bc3f.tar.lz re3-b1f9e28cd155459ab2843690c248ed9f4767bc3f.tar.xz re3-b1f9e28cd155459ab2843690c248ed9f4767bc3f.tar.zst re3-b1f9e28cd155459ab2843690c248ed9f4767bc3f.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Pad.h | 50 |
1 files changed, 47 insertions, 3 deletions
@@ -73,12 +73,42 @@ public: }; static_assert(sizeof(CControllerState) == 0x2A, "CControllerState: error"); -struct CMouseControllerState +class CMouseControllerState { - uint32 btns; // bit 0-2 button 1-3 - int x, y; +public: + //uint32 btns; // bit 0-2 button 1-3 + + UInt8 LMB; + UInt8 RMB; + UInt8 MMB; + UInt8 WHEELUP; + UInt8 WHEELDN; + UInt8 MXB1; + UInt8 MXB2; + UInt8 _pad0; + + Float x, y; + + CMouseControllerState(); + void Clear(); +}; + +VALIDATE_SIZE(CMouseControllerState, 0x10); + +class CMousePointerStateHelper +{ +public: + Bool bInvertHorizontally; + Bool bInvertVertically; + + CMouseControllerState GetMouseSetUp(); }; +VALIDATE_SIZE(CMousePointerStateHelper, 0x2); + +extern CMousePointerStateHelper &MousePointerStateHelper; + + class CKeyboardState { public: @@ -179,11 +209,25 @@ public: bool GetLookLeft(void); bool GetLookRight(void); + static void StopPadsShaking(void); + static void ResetCheats(void); static void UpdatePads(void); static CPad *GetPad(int n) { return &Pads[n]; } static void PrintErrorMessage(void); void AddToPCCheatString(Char c); + void Clear(Bool unk); + + // + + inline Bool GetLeftMouseJustDown() { return !!(NewMouseControllerState.LMB && !OldMouseControllerState.LMB); } + + inline Bool GetEnterJustDown() { return !!(NewKeyState.ENTER && !OldKeyState.ENTER); } + inline Bool GetExtEnterJustDown() { return !!(NewKeyState.EXTENTER && !OldKeyState.EXTENTER); } + inline Bool GetCharJustDown(Char c) { return !!(NewKeyState.VK_KEYS[c] && !OldKeyState.VK_KEYS[c]); } + inline Bool GetLeftAltJustDown() { return !!(NewKeyState.LALT && !OldKeyState.LALT); } + inline Bool GetRightAltJustDown() { return !!(NewKeyState.RALT && !OldKeyState.RALT); } + inline Bool GetTabJustDown() { return !!(NewKeyState.TAB && !OldKeyState.TAB); } }; static_assert(sizeof(CPad) == 0xFC, "CPad: error"); |