summaryrefslogtreecommitdiffstats
path: root/src/core/Pad.h
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-03-17 19:03:13 +0100
committereray orçunus <erayorcunus@gmail.com>2020-03-21 12:58:54 +0100
commitd5a6e17079ab87b946132155bbe37bd20e27c239 (patch)
tree87a72ec36821bb04d9c08ed0e5730c2393b8fcf4 /src/core/Pad.h
parentMerge pull request #346 from Sergeanur/Radar2 (diff)
downloadre3-d5a6e17079ab87b946132155bbe37bd20e27c239.tar
re3-d5a6e17079ab87b946132155bbe37bd20e27c239.tar.gz
re3-d5a6e17079ab87b946132155bbe37bd20e27c239.tar.bz2
re3-d5a6e17079ab87b946132155bbe37bd20e27c239.tar.lz
re3-d5a6e17079ab87b946132155bbe37bd20e27c239.tar.xz
re3-d5a6e17079ab87b946132155bbe37bd20e27c239.tar.zst
re3-d5a6e17079ab87b946132155bbe37bd20e27c239.zip
Diffstat (limited to 'src/core/Pad.h')
-rw-r--r--src/core/Pad.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/Pad.h b/src/core/Pad.h
index 09e6b39d..09691128 100644
--- a/src/core/Pad.h
+++ b/src/core/Pad.h
@@ -256,6 +256,11 @@ public:
bool GetMouseX1JustDown() { return !!(NewMouseControllerState.MXB1 && !OldMouseControllerState.MXB1); }
bool GetMouseX2JustDown() { return !!(NewMouseControllerState.MXB2 && !OldMouseControllerState.MXB2); }
+ bool GetLeftMouseJustUp() { return !!(!NewMouseControllerState.LMB && OldMouseControllerState.LMB); }
+ bool GetRightMouseJustUp() { return !!(!NewMouseControllerState.RMB && OldMouseControllerState.RMB); }
+ bool GetMiddleMouseJustUp() { return !!(!NewMouseControllerState.MMB && OldMouseControllerState.MMB); }
+ bool GetMouseWheelUpJustUp() { return !!(!NewMouseControllerState.WHEELUP && OldMouseControllerState.WHEELUP); }
+ bool GetMouseWheelDownJustUp() { return !!(!NewMouseControllerState.WHEELDN && OldMouseControllerState.WHEELDN); }
bool GetLeftMouse() { return NewMouseControllerState.LMB; }
bool GetRightMouse() { return NewMouseControllerState.RMB; }
@@ -328,6 +333,12 @@ public:
bool GetEnterJustDown() { return GetPadEnterJustDown() || GetReturnJustDown(); }
bool GetAltJustDown() { return GetLeftAltJustDown() || GetRightAltJustDown(); }
+ bool GetLeftJustUp() { return !!(!NewKeyState.LEFT && OldKeyState.LEFT); }
+ bool GetRightJustUp() { return !!(!NewKeyState.RIGHT && OldKeyState.RIGHT); }
+ bool GetEnterJustUp() { return GetPadEnterJustUp() || GetReturnJustUp(); }
+ bool GetReturnJustUp() { return !!(!NewKeyState.EXTENTER && OldKeyState.EXTENTER); }
+ bool GetPadEnterJustUp() { return !!(!NewKeyState.ENTER && OldKeyState.ENTER); }
+
bool GetChar(int32 c) { return NewKeyState.VK_KEYS[c]; }
bool GetF(int32 n) { return NewKeyState.F[n]; }
bool GetEscape() { return NewKeyState.ESC; }
@@ -392,6 +403,13 @@ public:
bool GetLeftStickXJustDown() { return !!(NewState.LeftStickX && !OldState.LeftStickX); }
bool GetLeftStickYJustDown() { return !!(NewState.LeftStickY && !OldState.LeftStickY); }
+ bool GetCrossJustUp() { return !!(!NewState.Cross && OldState.Cross); }
+ bool GetSquareJustUp() { return !!(!NewState.Square && OldState.Square); }
+ bool GetDPadUpJustUp() { return !!(!NewState.DPadUp && OldState.DPadUp); }
+ bool GetDPadDownJustUp() { return !!(!NewState.DPadDown && OldState.DPadDown); }
+ bool GetDPadLeftJustUp() { return !!(!NewState.DPadLeft && OldState.DPadLeft); }
+ bool GetDPadRightJustUp() { return !!(!NewState.DPadRight && OldState.DPadRight); }
+
bool GetTriangle() { return !!NewState.Triangle; }
bool GetCircle() { return !!NewState.Circle; }
bool GetCross() { return !!NewState.Cross; }