Commit 97916b8b authored by SR_team's avatar SR_team 💬

Update game keys

parent 1b88b3de
......@@ -135,11 +135,11 @@ void SREvents::hookEvent() {
}
uint16_t SREvents::gameKeyState( SRKeys::GameKeys id ) {
return keyState[id.onFoot];
return keyState[id.number];
}
void SREvents::setGameKeyState( SRKeys::GameKeys id, uint16_t state ) {
newKeyState[id.onFoot] = state;
newKeyState[id.number] = state;
}
std::deque<MODULEENTRY32> SREvents::modules() {
......
......@@ -165,7 +165,7 @@ bool SRKeys::isComboValid( std::deque< int > combo ) {
}
SRKeys::GameKeys::GameKeys( int keyId ) {
onFoot = (GameKeysOnFoot)keyId;
number = keyId;
}
SRKeys::GameKeys::GameKeys( SRKeys::GameKeysOnFoot foot ) {
......
......@@ -43,49 +43,49 @@ namespace SRKeys {
*/
bool isComboValid( std::deque<int> combo );
enum GameKeysOnFoot {
gkof_Left_or_Right = 0,
gkof_Forward_or_Backward,
gkof_SpecialCtrl_Left_or_Right,
gkof_SpecialCtrl_Up_or_Down,
gkof_Action_or_SecondaryFire,
gkof_PrevWeapon_or_ZoomIn,
gkof_AimWeapon,
gkof_NextWeapon_or_ZoomOut,
gkof_GroupCtrlForward,
gkof_GroupCtrlBack,
gkof_ConversationNO,
gkof_ConversationYES,
gkof_unused,
gkof_ChangeCamera,
gkof_Jump,
gkof_EnterVehicle,
gkof_Sprint,
gkof_Fire,
gkof_Crouch,
gkof_LookBehind
enum class GameKeysOnFoot : uint8_t {
Left_or_Right = 0,
Forward_or_Backward,
SpecialCtrl_Left_or_Right,
SpecialCtrl_Up_or_Down,
Action_or_SecondaryFire,
PrevWeapon_or_ZoomIn,
AimWeapon,
NextWeapon_or_ZoomOut,
GroupCtrlForward,
GroupCtrlBack,
ConversationNO,
ConversationYES,
unused,
ChangeCamera,
Jump,
EnterVehicle,
Sprint,
Fire,
Crouch,
LookBehind
};
enum GameKeysVehicle {
gkv_Left_or_Right = 0,
gkv_Steer_Back_or_Up,
gkv_SpecialCtrl_Left_or_Right,
gkv_SpecialCtrl_Up_or_Down,
gkv_SecondaryFire,
gkv_LookLeft,
gkv_HandBreak,
gkv_LookRight,
gkv_NextRadioStation,
gkv_PreviousRadioStation,
gkv_NO,
gkv_YES_or_TripSkip,
gkv_unused,
gkv_Camera,
gkv_Break_or_Reserve,
gkv_Enter_or_Exit,
gkv_Accelerate,
gkv_Fire,
gkv_Horn,
gkv_Submission
enum class GameKeysVehicle : uint8_t {
Left_or_Right = 0,
Steer_Back_or_Up,
SpecialCtrl_Left_or_Right,
SpecialCtrl_Up_or_Down,
SecondaryFire,
LookLeft,
HandBreak,
LookRight,
NextRadioStation,
PreviousRadioStation,
NO,
YES_or_TripSkip,
unused,
Camera,
Break_or_Reserve,
Enter_or_Exit,
Accelerate,
Fire,
Horn,
Submission
};
union GameKeys {
GameKeys( int keyId );
......@@ -93,6 +93,7 @@ namespace SRKeys {
GameKeys( GameKeysVehicle veh );
GameKeysOnFoot onFoot;
GameKeysVehicle vehicle;
uint8_t number;
};
}; // namespace SRKeys
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment