From 0548476ba6b9e2273ceec94ca9f62e76c69d7ef4 Mon Sep 17 00:00:00 2001 From: aap Date: Thu, 11 Jul 2019 12:48:49 +0200 Subject: CAutomobile::ProcessControlInputs --- 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 30cdb8df..30a9980b 100644 --- a/src/core/Pad.h +++ b/src/core/Pad.h @@ -289,6 +289,10 @@ public: // mouse bool GetLeftMouseJustDown() { return !!(NewMouseControllerState.LMB && !OldMouseControllerState.LMB); } + bool GetRightMouseJustDown() { return !!(NewMouseControllerState.RMB && !OldMouseControllerState.RMB); } + bool GetMiddleMouseJustDown() { return !!(NewMouseControllerState.MMB && !OldMouseControllerState.MMB); } + float GetMouseX() { return NewMouseControllerState.x; } + float GetMouseY() { return NewMouseControllerState.y; } // keyboard -- cgit v1.2.3 From 2c138b2b77cf661d9f119061963a726fdcde56d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Mon, 15 Jul 2019 15:11:40 +0300 Subject: Phone, World, Ped --- src/core/Pad.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/core/Pad.h') diff --git a/src/core/Pad.h b/src/core/Pad.h index 30a9980b..f853a8cd 100644 --- a/src/core/Pad.h +++ b/src/core/Pad.h @@ -51,6 +51,17 @@ enum Key }; */ +enum { + PLAYERCONTROL_ENABLED = 0, + PLAYERCONTROL_DISABLED_1 = 1, + PLAYERCONTROL_DISABLED_2 = 2, + PLAYERCONTROL_DISABLED_4 = 4, + PLAYERCONTROL_DISABLED_8 = 8, + PLAYERCONTROL_DISABLED_10 = 16, + PLAYERCONTROL_DISABLED_20 = 32, + PLAYERCONTROL_DISABLED_40 = 64, // used on phone calls + PLAYERCONTROL_DISABLED_80 = 128, +}; class CControllerState { @@ -188,7 +199,7 @@ public: uint8 ShakeFreq; int8 bHornHistory[5]; uint8 iCurrHornHistory; - bool DisablePlayerControls; + uint8 DisablePlayerControls; int8 bApplyBrakes; char _unk[12]; //int32 unk[3]; char _pad0[3]; @@ -362,6 +373,8 @@ public: int32 GetLeftShoulder2(void) { return NewState.LeftShoulder2; } int32 GetRightShoulder1(void) { return NewState.RightShoulder1; } int32 GetRightShoulder2(void) { return NewState.RightShoulder2; } + + bool ArePlayerControlsDisabled(void) { return DisablePlayerControls != PLAYERCONTROL_ENABLED; } }; VALIDATE_SIZE(CPad, 0xFC); -- cgit v1.2.3 From ba242bcf584d885167a9499e53f5bcaf6c9cc866 Mon Sep 17 00:00:00 2001 From: aap Date: Wed, 17 Jul 2019 23:58:06 +0200 Subject: more CAutomobile::ProcessControl --- src/core/Pad.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/Pad.h') diff --git a/src/core/Pad.h b/src/core/Pad.h index f853a8cd..f84ca742 100644 --- a/src/core/Pad.h +++ b/src/core/Pad.h @@ -197,7 +197,7 @@ public: int16 Mode; int16 ShakeDur; uint8 ShakeFreq; - int8 bHornHistory[5]; + bool bHornHistory[5]; uint8 iCurrHornHistory; uint8 DisablePlayerControls; int8 bApplyBrakes; @@ -377,6 +377,7 @@ public: bool ArePlayerControlsDisabled(void) { return DisablePlayerControls != PLAYERCONTROL_ENABLED; } }; VALIDATE_SIZE(CPad, 0xFC); +extern CPad *Pads; //[2] #define IsButtonJustDown(pad, btn) \ (!(pad)->OldState.btn && (pad)->NewState.btn) -- cgit v1.2.3 From 0ad39c020cfd4882b45bd1d26e521748e37b94a4 Mon Sep 17 00:00:00 2001 From: aap Date: Fri, 19 Jul 2019 13:58:19 +0200 Subject: implemented col line rendering --- src/core/Pad.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/core/Pad.h') diff --git a/src/core/Pad.h b/src/core/Pad.h index f84ca742..e15399dd 100644 --- a/src/core/Pad.h +++ b/src/core/Pad.h @@ -381,5 +381,3 @@ extern CPad *Pads; //[2] #define IsButtonJustDown(pad, btn) \ (!(pad)->OldState.btn && (pad)->NewState.btn) - -void LittleTest(void); -- cgit v1.2.3