diff options
Diffstat (limited to 'core/global_constants.cpp')
-rw-r--r-- | core/global_constants.cpp | 154 |
1 files changed, 79 insertions, 75 deletions
diff --git a/core/global_constants.cpp b/core/global_constants.cpp index 6f58af2ccf..48101c8cf1 100644 --- a/core/global_constants.cpp +++ b/core/global_constants.cpp @@ -86,6 +86,8 @@ static Vector<_GlobalConstant> _global_constants; VARIANT_ENUM_CAST(KeyList); VARIANT_ENUM_CAST(KeyModifierMask); +VARIANT_ENUM_CAST(ButtonList); +VARIANT_ENUM_CAST(JoystickList); void register_global_constants() { @@ -367,82 +369,84 @@ void register_global_constants() { BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_GROUP_SWITCH); // mouse - BIND_GLOBAL_CONSTANT(BUTTON_LEFT); - BIND_GLOBAL_CONSTANT(BUTTON_RIGHT); - BIND_GLOBAL_CONSTANT(BUTTON_MIDDLE); - BIND_GLOBAL_CONSTANT(BUTTON_WHEEL_UP); - BIND_GLOBAL_CONSTANT(BUTTON_WHEEL_DOWN); - BIND_GLOBAL_CONSTANT(BUTTON_WHEEL_LEFT); - BIND_GLOBAL_CONSTANT(BUTTON_WHEEL_RIGHT); - BIND_GLOBAL_CONSTANT(BUTTON_MASK_LEFT); - BIND_GLOBAL_CONSTANT(BUTTON_MASK_RIGHT); - BIND_GLOBAL_CONSTANT(BUTTON_MASK_MIDDLE); + BIND_GLOBAL_ENUM_CONSTANT(BUTTON_LEFT); + BIND_GLOBAL_ENUM_CONSTANT(BUTTON_RIGHT); + BIND_GLOBAL_ENUM_CONSTANT(BUTTON_MIDDLE); + BIND_GLOBAL_ENUM_CONSTANT(BUTTON_WHEEL_UP); + BIND_GLOBAL_ENUM_CONSTANT(BUTTON_WHEEL_DOWN); + BIND_GLOBAL_ENUM_CONSTANT(BUTTON_WHEEL_LEFT); + BIND_GLOBAL_ENUM_CONSTANT(BUTTON_WHEEL_RIGHT); + BIND_GLOBAL_ENUM_CONSTANT(BUTTON_MASK_LEFT); + BIND_GLOBAL_ENUM_CONSTANT(BUTTON_MASK_RIGHT); + BIND_GLOBAL_ENUM_CONSTANT(BUTTON_MASK_MIDDLE); //joypads - BIND_GLOBAL_CONSTANT(JOY_BUTTON_0); - BIND_GLOBAL_CONSTANT(JOY_BUTTON_1); - BIND_GLOBAL_CONSTANT(JOY_BUTTON_2); - BIND_GLOBAL_CONSTANT(JOY_BUTTON_3); - BIND_GLOBAL_CONSTANT(JOY_BUTTON_4); - BIND_GLOBAL_CONSTANT(JOY_BUTTON_5); - BIND_GLOBAL_CONSTANT(JOY_BUTTON_6); - BIND_GLOBAL_CONSTANT(JOY_BUTTON_7); - BIND_GLOBAL_CONSTANT(JOY_BUTTON_8); - BIND_GLOBAL_CONSTANT(JOY_BUTTON_9); - BIND_GLOBAL_CONSTANT(JOY_BUTTON_10); - BIND_GLOBAL_CONSTANT(JOY_BUTTON_11); - BIND_GLOBAL_CONSTANT(JOY_BUTTON_12); - BIND_GLOBAL_CONSTANT(JOY_BUTTON_13); - BIND_GLOBAL_CONSTANT(JOY_BUTTON_14); - BIND_GLOBAL_CONSTANT(JOY_BUTTON_15); - BIND_GLOBAL_CONSTANT(JOY_BUTTON_MAX); - - BIND_GLOBAL_CONSTANT(JOY_SONY_CIRCLE); - BIND_GLOBAL_CONSTANT(JOY_SONY_X); - BIND_GLOBAL_CONSTANT(JOY_SONY_SQUARE); - BIND_GLOBAL_CONSTANT(JOY_SONY_TRIANGLE); - - BIND_GLOBAL_CONSTANT(JOY_XBOX_B); - BIND_GLOBAL_CONSTANT(JOY_XBOX_A); - BIND_GLOBAL_CONSTANT(JOY_XBOX_X); - BIND_GLOBAL_CONSTANT(JOY_XBOX_Y); - - BIND_GLOBAL_CONSTANT(JOY_DS_A); - BIND_GLOBAL_CONSTANT(JOY_DS_B); - BIND_GLOBAL_CONSTANT(JOY_DS_X); - BIND_GLOBAL_CONSTANT(JOY_DS_Y); - - BIND_GLOBAL_CONSTANT(JOY_SELECT); - BIND_GLOBAL_CONSTANT(JOY_START); - BIND_GLOBAL_CONSTANT(JOY_DPAD_UP); - BIND_GLOBAL_CONSTANT(JOY_DPAD_DOWN); - BIND_GLOBAL_CONSTANT(JOY_DPAD_LEFT); - BIND_GLOBAL_CONSTANT(JOY_DPAD_RIGHT); - BIND_GLOBAL_CONSTANT(JOY_L); - BIND_GLOBAL_CONSTANT(JOY_L2); - BIND_GLOBAL_CONSTANT(JOY_L3); - BIND_GLOBAL_CONSTANT(JOY_R); - BIND_GLOBAL_CONSTANT(JOY_R2); - BIND_GLOBAL_CONSTANT(JOY_R3); - - BIND_GLOBAL_CONSTANT(JOY_AXIS_0); - BIND_GLOBAL_CONSTANT(JOY_AXIS_1); - BIND_GLOBAL_CONSTANT(JOY_AXIS_2); - BIND_GLOBAL_CONSTANT(JOY_AXIS_3); - BIND_GLOBAL_CONSTANT(JOY_AXIS_4); - BIND_GLOBAL_CONSTANT(JOY_AXIS_5); - BIND_GLOBAL_CONSTANT(JOY_AXIS_6); - BIND_GLOBAL_CONSTANT(JOY_AXIS_7); - BIND_GLOBAL_CONSTANT(JOY_AXIS_MAX); - - BIND_GLOBAL_CONSTANT(JOY_ANALOG_LX); - BIND_GLOBAL_CONSTANT(JOY_ANALOG_LY); - - BIND_GLOBAL_CONSTANT(JOY_ANALOG_RX); - BIND_GLOBAL_CONSTANT(JOY_ANALOG_RY); - - BIND_GLOBAL_CONSTANT(JOY_ANALOG_L2); - BIND_GLOBAL_CONSTANT(JOY_ANALOG_R2); + BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_0); + BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_1); + BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_2); + BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_3); + BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_4); + BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_5); + BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_6); + BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_7); + BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_8); + BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_9); + BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_10); + BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_11); + BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_12); + BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_13); + BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_14); + BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_15); + BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_MAX); + + BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_CIRCLE); + BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_X); + BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_SQUARE); + BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_TRIANGLE); + + BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_B); + BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_A); + BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_X); + BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_Y); + + BIND_GLOBAL_ENUM_CONSTANT(JOY_DS_A); + BIND_GLOBAL_ENUM_CONSTANT(JOY_DS_B); + BIND_GLOBAL_ENUM_CONSTANT(JOY_DS_X); + BIND_GLOBAL_ENUM_CONSTANT(JOY_DS_Y); + + BIND_GLOBAL_ENUM_CONSTANT(JOY_SELECT); + BIND_GLOBAL_ENUM_CONSTANT(JOY_START); + BIND_GLOBAL_ENUM_CONSTANT(JOY_DPAD_UP); + BIND_GLOBAL_ENUM_CONSTANT(JOY_DPAD_DOWN); + BIND_GLOBAL_ENUM_CONSTANT(JOY_DPAD_LEFT); + BIND_GLOBAL_ENUM_CONSTANT(JOY_DPAD_RIGHT); + BIND_GLOBAL_ENUM_CONSTANT(JOY_L); + BIND_GLOBAL_ENUM_CONSTANT(JOY_L2); + BIND_GLOBAL_ENUM_CONSTANT(JOY_L3); + BIND_GLOBAL_ENUM_CONSTANT(JOY_R); + BIND_GLOBAL_ENUM_CONSTANT(JOY_R2); + BIND_GLOBAL_ENUM_CONSTANT(JOY_R3); + + BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_0); + BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_1); + BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_2); + BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_3); + BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_4); + BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_5); + BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_6); + BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_7); + BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_8); + BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_9); + BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_MAX); + + BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_LX); + BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_LY); + + BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_RX); + BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_RY); + + BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_L2); + BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_R2); // error list @@ -553,7 +557,7 @@ void register_global_constants() { BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_TRANSFORM2D", Variant::TRANSFORM2D); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_PLANE", Variant::PLANE); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_QUAT", Variant::QUAT); // 10 - BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RECT3", Variant::RECT3); + BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_AABB", Variant::AABB); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_BASIS", Variant::BASIS); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_TRANSFORM", Variant::TRANSFORM); BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_COLOR", Variant::COLOR); |