diff options
author | erorcun <erayorcunus@gmail.com> | 2020-12-24 18:47:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-24 18:47:26 +0100 |
commit | f9cbe29c5036d647d4ed882badd67092b5ee7331 (patch) | |
tree | d358e55143ac06bc0390cc1eb365b0818a649e7d /src/core | |
parent | fixed double explosion (diff) | |
parent | style change (diff) | |
download | re3-f9cbe29c5036d647d4ed882badd67092b5ee7331.tar re3-f9cbe29c5036d647d4ed882badd67092b5ee7331.tar.gz re3-f9cbe29c5036d647d4ed882badd67092b5ee7331.tar.bz2 re3-f9cbe29c5036d647d4ed882badd67092b5ee7331.tar.lz re3-f9cbe29c5036d647d4ed882badd67092b5ee7331.tar.xz re3-f9cbe29c5036d647d4ed882badd67092b5ee7331.tar.zst re3-f9cbe29c5036d647d4ed882badd67092b5ee7331.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/ControllerConfig.cpp | 46 | ||||
-rw-r--r-- | src/core/ControllerConfig.h | 4 | ||||
-rw-r--r-- | src/core/config.h | 2 |
3 files changed, 52 insertions, 0 deletions
diff --git a/src/core/ControllerConfig.cpp b/src/core/ControllerConfig.cpp index cadba7f2..b56a19f0 100644 --- a/src/core/ControllerConfig.cpp +++ b/src/core/ControllerConfig.cpp @@ -1718,6 +1718,52 @@ void CControllerConfigManager::DeleteMatching1rstPersonControls(e_ControllerActi #undef CLEAR_ACTION_IF_NEEDED +#ifdef RADIO_SCROLL_TO_PREV_STATION +#define CHECK_ACTION(action) \ +if (key == GetControllerKeyAssociatedWithAction(action, type))\ + return true; + +bool CControllerConfigManager::IsAnyVehicleActionAssignedToMouseKey(int32 key) +{ + const eControllerType type = MOUSE; + if (!GetIsKeyBlank(key, type)) + { +#ifdef BIND_VEHICLE_FIREWEAPON + CHECK_ACTION(VEHICLE_FIREWEAPON); +#endif + CHECK_ACTION(VEHICLE_LOOKBEHIND); + CHECK_ACTION(VEHICLE_LOOKLEFT); + CHECK_ACTION(VEHICLE_LOOKRIGHT); + CHECK_ACTION(VEHICLE_LOOKBEHIND); // note: duplicate + CHECK_ACTION(VEHICLE_HORN); + CHECK_ACTION(VEHICLE_HANDBRAKE); + CHECK_ACTION(VEHICLE_ACCELERATE); + CHECK_ACTION(VEHICLE_BRAKE); + CHECK_ACTION(VEHICLE_CHANGE_RADIO_STATION); + CHECK_ACTION(TOGGLE_SUBMISSIONS); + CHECK_ACTION(VEHICLE_TURRETLEFT); + CHECK_ACTION(VEHICLE_TURRETRIGHT); + CHECK_ACTION(VEHICLE_TURRETUP); + CHECK_ACTION(VEHICLE_TURRETDOWN); + CHECK_ACTION(VEHICLE_ENTER_EXIT); + CHECK_ACTION(CAMERA_CHANGE_VIEW_ALL_SITUATIONS); +#ifndef BIND_VEHICLE_FIREWEAPON + CHECK_ACTION(PED_FIREWEAPON); +#endif + CHECK_ACTION(GO_LEFT); + CHECK_ACTION(GO_RIGHT); + CHECK_ACTION(NETWORK_TALK); + CHECK_ACTION(SWITCH_DEBUG_CAM_ON); + CHECK_ACTION(TOGGLE_DPAD); + CHECK_ACTION(TAKE_SCREEN_SHOT); + CHECK_ACTION(SHOW_MOUSE_POINTER_TOGGLE); + } + return false; +} + +#undef CHECK_ACTION +#endif + void CControllerConfigManager::DeleteMatchingActionInitiators(e_ControllerAction action, int32 key, eControllerType type) { if (!GetIsKeyBlank(key, type)) diff --git a/src/core/ControllerConfig.h b/src/core/ControllerConfig.h index 92017a93..d3c2293d 100644 --- a/src/core/ControllerConfig.h +++ b/src/core/ControllerConfig.h @@ -188,6 +188,10 @@ public: void DeleteMatching1rstPersonControls (e_ControllerAction action, int32 key, eControllerType type); void DeleteMatchingActionInitiators (e_ControllerAction action, int32 key, eControllerType type); +#ifdef RADIO_SCROLL_TO_PREV_STATION + bool IsAnyVehicleActionAssignedToMouseKey(int32 key); +#endif + bool GetIsKeyBlank(int32 key, eControllerType type); e_ControllerActionType GetActionType(e_ControllerAction action); diff --git a/src/core/config.h b/src/core/config.h index d1043c72..e5a97049 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -286,6 +286,7 @@ enum Config { // #define BETA_SLIDING_TEXT #define TRIANGULAR_BLIPS // height indicating triangular radar blips, as in VC // #define XBOX_SUBTITLES // the infamous outlines +#define RADIO_OFF_TEXT #define PC_MENU #ifndef PC_MENU @@ -350,6 +351,7 @@ enum Config { #define FREE_CAM // Rotating cam // Audio +#define RADIO_SCROLL_TO_PREV_STATION #ifndef AUDIO_OAL // is not working yet for openal #define AUDIO_CACHE // cache sound lengths to speed up the cold boot #endif |