From 820fd66a94c20c4e1dab21f6abda4138eaefbe79 Mon Sep 17 00:00:00 2001 From: aap Date: Wed, 29 May 2019 18:06:33 +0200 Subject: implemented some of CCam and dependencies --- src/Pad.h | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) (limited to 'src/Pad.h') diff --git a/src/Pad.h b/src/Pad.h index ddcfad8d..db035788 100644 --- a/src/Pad.h +++ b/src/Pad.h @@ -53,19 +53,19 @@ enum Key class CControllerState { public: - int16 leftX, leftY; - int16 rightX, rightY; - int16 l1, l2; - int16 r1, r2; - int16 up, down, left, right; - int16 start, select; - int16 square, triangle, cross, circle; - int16 leftshock, rightshock; - int16 networktalk; - float getLeftX(void) { return leftX/32767.0f; }; - float getLeftY(void) { return leftY/32767.0f; }; - float getRightX(void) { return rightX/32767.0f; }; - float getRightY(void) { return rightY/32767.0f; }; + int16 LeftStickX, LeftStickY; + int16 RightStickX, RightStickY; + int16 LeftShoulder1, LeftShoulder2; + int16 RightShoulder1, RightShoulder2; + int16 DPadUp, DPadDown, DPadLeft, DPadRight; + int16 Start, Select; + int16 Square, Triangle, Cross, Circle; + int16 LeftShock, RightShock; + int16 NetworkTalk; + float GetLeftStickX(void) { return LeftStickX/32767.0f; }; + float GetLeftStickY(void) { return LeftStickY/32767.0f; }; + float GetRightStickX(void) { return RightStickX/32767.0f; }; + float GetRightStickY(void) { return RightStickY/32767.0f; }; void Clear(void); }; @@ -108,6 +108,18 @@ public: static CMouseControllerState &NewMouseControllerState; static CMouseControllerState &PCTempMouseControllerState; + int GetLeftShoulder1(void) { return NewState.LeftShoulder1; } + int GetLeftShoulder2(void) { return NewState.LeftShoulder2; } + int GetRightShoulder1(void) { return NewState.RightShoulder1; } + int GetRightShoulder2(void) { return NewState.RightShoulder2; } + + bool ForceCameraBehindPlayer(void); + bool GetWeapon(void); + bool GetLookBehindForCar(void); + bool GetLookBehindForPed(void); + bool GetLookLeft(void); + bool GetLookRight(void); + static CPad *GetPad(int n) { return &Pads[n]; } }; static_assert(sizeof(CPad) == 0xFC, "CPad: error"); -- cgit v1.2.3