diff --git a/include/twn_draw.h b/include/twn_draw.h index 8566ab3..b34289d 100644 --- a/include/twn_draw.h +++ b/include/twn_draw.h @@ -85,7 +85,7 @@ typedef struct DrawCameraFromPrincipalAxesResult { Vec3 direction; Vec3 up; } DrawCameraFromPrincipalAxesResult; -DrawCameraFromPrincipalAxesResult TWN_API draw_camera_from_principal_axes(Vec3 position, +TWN_API DrawCameraFromPrincipalAxesResult draw_camera_from_principal_axes(Vec3 position, float fov, float roll, float pitch, diff --git a/include/twn_input.h b/include/twn_input.h index 50200e7..d9a314b 100644 --- a/include/twn_input.h +++ b/include/twn_input.h @@ -11,14 +11,10 @@ TWN_API void input_bind_action_control(const char *action_name, Control control); -TWN_API void input_unbind_action_control(const char *action_name, Control control); - TWN_API bool input_is_action_pressed(const char *action_name); TWN_API bool input_is_action_just_pressed(const char *action_name); TWN_API bool input_is_action_just_released(const char *action_name); - TWN_API Vec2 input_get_action_position(const char *action_name); - TWN_API void input_set_mouse_captured(bool enabled); #endif diff --git a/src/twn_input.c b/src/twn_input.c index dafc365..08f4553 100644 --- a/src/twn_input.c +++ b/src/twn_input.c @@ -275,26 +275,26 @@ void input_bind_action_control(char const *action_name, } -void input_unbind_action_control(char const *action_name, - Control control) -{ - SDL_assert_always(action_name); +// static void input_unbind_action_control(char const *action_name, +// Control control) +// { +// SDL_assert_always(action_name); - if (CONTROL_SCANCODE_START <= control && control < CONTROL_SCANCODE_LIMIT) - input_unbind_code_from_action(&ctx.input, - action_name, - BUTTON_SOURCE_KEYBOARD_PHYSICAL, - (union ButtonCode) { .scancode = (SDL_Scancode)control }); +// if (CONTROL_SCANCODE_START <= control && control < CONTROL_SCANCODE_LIMIT) +// input_unbind_code_from_action(&ctx.input, +// action_name, +// BUTTON_SOURCE_KEYBOARD_PHYSICAL, +// (union ButtonCode) { .scancode = (SDL_Scancode)control }); - else if (CONTROL_MOUSECODE_START <= control && control < CONTROL_MOUSECODE_LIMIT) { - uint8_t const mouse_button = (uint8_t)(control - CONTROL_MOUSECODE_START); - input_unbind_code_from_action(&ctx.input, - action_name, - BUTTON_SOURCE_MOUSE, - (union ButtonCode) { .mouse_button = (uint8_t)SDL_BUTTON(mouse_button)}); - } else - log_warn("(%s) Invalid control value given: %i.", __func__, control); -} +// else if (CONTROL_MOUSECODE_START <= control && control < CONTROL_MOUSECODE_LIMIT) { +// uint8_t const mouse_button = (uint8_t)(control - CONTROL_MOUSECODE_START); +// input_unbind_code_from_action(&ctx.input, +// action_name, +// BUTTON_SOURCE_MOUSE, +// (union ButtonCode) { .mouse_button = (uint8_t)SDL_BUTTON(mouse_button)}); +// } else +// log_warn("(%s) Invalid control value given: %i.", __func__, control); +// } bool input_is_action_pressed(char const *action_name) {