summaryrefslogtreecommitdiffstats
path: root/src/core/Pad.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-02-03 01:41:12 +0100
committerSergeanur <s.anureev@yandex.ua>2021-02-03 01:41:12 +0100
commit91612eb45a4195484b43e446907317dbffbff730 (patch)
treee240252a44da318e5854d851e524a3ada6ca869c /src/core/Pad.cpp
parentAdd radio off text (diff)
downloadre3-91612eb45a4195484b43e446907317dbffbff730.tar
re3-91612eb45a4195484b43e446907317dbffbff730.tar.gz
re3-91612eb45a4195484b43e446907317dbffbff730.tar.bz2
re3-91612eb45a4195484b43e446907317dbffbff730.tar.lz
re3-91612eb45a4195484b43e446907317dbffbff730.tar.xz
re3-91612eb45a4195484b43e446907317dbffbff730.tar.zst
re3-91612eb45a4195484b43e446907317dbffbff730.zip
Diffstat (limited to 'src/core/Pad.cpp')
-rw-r--r--src/core/Pad.cpp116
1 files changed, 116 insertions, 0 deletions
diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp
index 95a107ee..9bcac613 100644
--- a/src/core/Pad.cpp
+++ b/src/core/Pad.cpp
@@ -2336,6 +2336,121 @@ bool CPad::ShiftTargetRightJustDown(void)
return !!(NewState.RightShoulder2 && !OldState.RightShoulder2);
}
+#ifdef FIX_BUGS
+// FIX: fixes from VC for the bug of double switching the controller setup
+bool CPad::GetAnaloguePadUp(void)
+{
+ static int16 oldfStickY = 0;
+
+ int16 leftStickY = CPad::GetPad(0)->GetLeftStickY();
+
+ if ( leftStickY < -15 && oldfStickY >= -5 )
+ {
+ oldfStickY = leftStickY;
+ return true;
+ }
+ else
+ {
+ oldfStickY = leftStickY;
+ return false;
+ }
+}
+
+bool CPad::GetAnaloguePadDown(void)
+{
+ static int16 oldfStickY = 0;
+
+ int16 leftStickY = CPad::GetPad(0)->GetLeftStickY();
+
+ if ( leftStickY > 15 && oldfStickY <= 5 )
+ {
+ oldfStickY = leftStickY;
+ return true;
+ }
+ else
+ {
+ oldfStickY = leftStickY;
+ return false;
+ }
+}
+
+bool CPad::GetAnaloguePadLeft(void)
+{
+ static int16 oldfStickX = 0;
+
+ int16 leftStickX = CPad::GetPad(0)->GetLeftStickX();
+
+ if ( leftStickX < -15 && oldfStickX >= -5 )
+ {
+ oldfStickX = leftStickX;
+ return true;
+ }
+ else
+ {
+ oldfStickX = leftStickX;
+ return false;
+ }
+}
+
+bool CPad::GetAnaloguePadRight(void)
+{
+ static int16 oldfStickX = 0;
+
+ int16 leftStickX = CPad::GetPad(0)->GetLeftStickX();
+
+ if ( leftStickX > 15 && oldfStickX <= 5 )
+ {
+ oldfStickX = leftStickX;
+ return true;
+ }
+ else
+ {
+ oldfStickX = leftStickX;
+ return false;
+ }
+}
+
+bool CPad::GetAnaloguePadLeftJustUp(void)
+{
+ static int16 oldfStickX = 0;
+
+ int16 X = GetPad(0)->GetPedWalkLeftRight();
+
+ if ( X == 0 && oldfStickX < 0 )
+ {
+ oldfStickX = 0;
+
+ return true;
+ }
+ else
+ {
+ oldfStickX = X;
+
+ return false;
+ }
+}
+
+bool CPad::GetAnaloguePadRightJustUp(void)
+{
+ static int16 oldfStickX = 0;
+
+ int16 X = GetPad(0)->GetPedWalkLeftRight();
+
+ if ( X == 0 && oldfStickX > 0 )
+ {
+ oldfStickX = 0;
+
+ return true;
+ }
+ else
+ {
+ oldfStickX = X;
+
+ return false;
+ }
+}
+
+#else
bool CPad::GetAnaloguePadUp(void)
{
static int16 oldfStickY = 0;
@@ -2447,6 +2562,7 @@ bool CPad::GetAnaloguePadRightJustUp(void)
return false;
}
}
+#endif
bool CPad::ForceCameraBehindPlayer(void)
{