From f0dfaac838fdbb90783609bf4e45518ccf853708 Mon Sep 17 00:00:00 2001 From: aap Date: Thu, 26 Mar 2020 14:16:06 +0100 Subject: Finished CCam; various smaller things --- src/core/Pad.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/core/Pad.h') diff --git a/src/core/Pad.h b/src/core/Pad.h index 09691128..fec21df3 100644 --- a/src/core/Pad.h +++ b/src/core/Pad.h @@ -399,6 +399,8 @@ public: bool GetLeftShoulder2JustDown() { return !!(NewState.LeftShoulder2 && !OldState.LeftShoulder2); } bool GetRightShoulder1JustDown() { return !!(NewState.RightShoulder1 && !OldState.RightShoulder1); } bool GetRightShoulder2JustDown() { return !!(NewState.RightShoulder2 && !OldState.RightShoulder2); } + bool GetLeftShockJustDown() { return !!(NewState.LeftShock && !OldState.LeftShock); } + bool GetRightShockJustDown() { return !!(NewState.RightShock && !OldState.RightShock); } bool GetStartJustDown() { return !!(NewState.Start && !OldState.Start); } bool GetLeftStickXJustDown() { return !!(NewState.LeftStickX && !OldState.LeftStickX); } bool GetLeftStickYJustDown() { return !!(NewState.LeftStickY && !OldState.LeftStickY); } @@ -422,6 +424,10 @@ public: bool GetLeftShoulder2(void) { return !!NewState.LeftShoulder2; } bool GetRightShoulder1(void) { return !!NewState.RightShoulder1; } bool GetRightShoulder2(void) { return !!NewState.RightShoulder2; } + int16 GetLeftStickX(void) { return NewState.LeftStickX; } + int16 GetLeftStickY(void) { return NewState.LeftStickY; } + int16 GetRightStickX(void) { return NewState.RightStickX; } + int16 GetRightStickY(void) { return NewState.RightStickY; } bool ArePlayerControlsDisabled(void) { return DisablePlayerControls != PLAYERCONTROL_ENABLED; } }; -- cgit v1.2.3 From 43b092033cb7be208640b328bc42cdab7c5102ef Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Fri, 27 Mar 2020 20:54:35 +0200 Subject: XInput --- src/core/Pad.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core/Pad.h') diff --git a/src/core/Pad.h b/src/core/Pad.h index fec21df3..6cabdf54 100644 --- a/src/core/Pad.h +++ b/src/core/Pad.h @@ -247,6 +247,10 @@ public: static char *EditString(char *pStr, int32 nSize); static int32 *EditCodesForControls(int32 *pRsKeys, int32 nSize); +#ifdef XINPUT + void AffectFromXinput(uint32 pad); +#endif + // mouse bool GetLeftMouseJustDown() { return !!(NewMouseControllerState.LMB && !OldMouseControllerState.LMB); } bool GetRightMouseJustDown() { return !!(NewMouseControllerState.RMB && !OldMouseControllerState.RMB); } -- cgit v1.2.3 From 268f92bfbe5330149be341855fa52f53ea501c62 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sat, 28 Mar 2020 15:24:13 +0300 Subject: garages part 1 --- src/core/Pad.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/core/Pad.h') diff --git a/src/core/Pad.h b/src/core/Pad.h index 09691128..a231900e 100644 --- a/src/core/Pad.h +++ b/src/core/Pad.h @@ -4,7 +4,7 @@ enum { PLAYERCONTROL_ENABLED = 0, PLAYERCONTROL_DISABLED_1 = 1, PLAYERCONTROL_DISABLED_2 = 2, - PLAYERCONTROL_DISABLED_4 = 4, + PLAYERCONTROL_GARAGE = 4, PLAYERCONTROL_DISABLED_8 = 8, PLAYERCONTROL_DISABLED_10 = 16, PLAYERCONTROL_DISABLED_20 = 32, // used on CPlayerInfo::MakePlayerSafe @@ -423,7 +423,10 @@ public: bool GetRightShoulder1(void) { return !!NewState.RightShoulder1; } bool GetRightShoulder2(void) { return !!NewState.RightShoulder2; } - bool ArePlayerControlsDisabled(void) { return DisablePlayerControls != PLAYERCONTROL_ENABLED; } + bool ArePlayerControlsDisabled(void) { return DisablePlayerControls != PLAYERCONTROL_ENABLED; } + void SetDisablePlayerControls(uint8 who) { DisablePlayerControls |= who; } + void SetEnablePlayerControls(uint8 who) { DisablePlayerControls &= ~who; } + bool IsPlayerControlsDisabledBy(uint8 who) { return DisablePlayerControls & who; } }; VALIDATE_SIZE(CPad, 0xFC); -- cgit v1.2.3 From 7ff5a3a65c3106cb488a5b0a4f25d0b5450d489f Mon Sep 17 00:00:00 2001 From: aap Date: Thu, 2 Apr 2020 12:48:01 +0200 Subject: CCamera fixes --- src/core/Pad.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/Pad.h') diff --git a/src/core/Pad.h b/src/core/Pad.h index 84919f32..ca44a9f7 100644 --- a/src/core/Pad.h +++ b/src/core/Pad.h @@ -2,7 +2,7 @@ enum { PLAYERCONTROL_ENABLED = 0, - PLAYERCONTROL_DISABLED_1 = 1, + PLAYERCONTROL_DISABLED_1 = 1, // used by first person camera PLAYERCONTROL_DISABLED_2 = 2, PLAYERCONTROL_GARAGE = 4, PLAYERCONTROL_DISABLED_8 = 8, -- cgit v1.2.3