summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2023-04-24 03:58:04 -0400
committerrealtradam <[email protected]>2023-04-24 03:58:04 -0400
commit8f42815db1d3636c3fddc696b626c54ca7896d32 (patch)
treec8b691f85704abbe3becd21e6dac5efba17f4028 /include
parent92b561030f7f713fc4e2893de05fdc7a06c8a139 (diff)
downloadRodeoKit-8f42815db1d3636c3fddc696b626c54ca7896d32.tar.gz
RodeoKit-8f42815db1d3636c3fddc696b626c54ca7896d32.zip
added unbounded ranges for the input system
Diffstat (limited to 'include')
-rw-r--r--include/rodeo/input.h8
-rw-r--r--include/rodeo/input_t.h27
2 files changed, 33 insertions, 2 deletions
diff --git a/include/rodeo/input.h b/include/rodeo/input.h
index 41a7849..8d3d775 100644
--- a/include/rodeo/input.h
+++ b/include/rodeo/input.h
@@ -48,7 +48,13 @@ rodeo_input_command_register_binary_mouseButton(
bool
rodeo_input_command_register_positional_mouse(
rodeo_input_command_t *input_command,
- rodeo_input_positional_mouse_t mouse_position
+ rodeo_input_positional_mouse_t mouse_axis
+);
+
+bool
+rodeo_input_command_register_unboundedRange_mouse(
+ rodeo_input_command_t *input_command,
+ rodeo_input_unboundedRange_mouse_t mouse_axis
);
// alternative proposed "general" registration methods
diff --git a/include/rodeo/input_t.h b/include/rodeo/input_t.h
index 6013eed..f717de3 100644
--- a/include/rodeo/input_t.h
+++ b/include/rodeo/input_t.h
@@ -766,6 +766,7 @@ rodeo_input_binary_mouseButton_t;
typedef
enum
{
+ rodeo_input_positional_mouse_Invalid = 0,
rodeo_input_positional_mouse_X = 1,
rodeo_input_positional_mouse_Y = 2
}
@@ -774,9 +775,19 @@ rodeo_input_positional_mouse_t;
typedef
enum
{
+ rodeo_input_unboundedRange_mouse_Invalid = 0,
+ rodeo_input_unboundedRange_mouse_X = 1,
+ rodeo_input_unboundedRange_mouse_Y = 2
+}
+rodeo_input_unboundedRange_mouse_t;
+
+typedef
+enum
+{
rodeo_input_type_Invalid = (1 << 0),
rodeo_input_type_Binary = (1 << 1),
rodeo_input_type_Positional = (1 << 2),
+ rodeo_input_type_UnboundedRange = (1 << 3),
}
rodeo_input_type_t ;
@@ -800,6 +811,8 @@ rodeo_input_binary_state_t;
typedef int64_t rodeo_input_positional_state_t;
+typedef float rodeo_input_unboundedRange_state_t;
+
typedef
struct
{
@@ -807,6 +820,7 @@ struct
{
rodeo_input_binary_state_t binary_state;
rodeo_input_positional_state_t positional_state;
+ rodeo_input_unboundedRange_state_t unbounded_range_state;
}
data;
rodeo_input_type_t input_type;
@@ -835,6 +849,10 @@ void
#define i_tag input_positional_mouse
#include <stc/cset.h>
+#define i_val rodeo_input_unboundedRange_mouse_t
+#define i_tag input_unboundedRange_mouse
+#include <stc/cset.h>
+
typedef
struct
{
@@ -850,11 +868,18 @@ struct
}
binary;
- // unbounded range
+ // positional
struct
{
cset_input_positional_mouse mouse_position;
}
+ positional;
+
+ // unbounded range
+ struct
+ {
+ cset_input_unboundedRange_mouse mouse_delta;
+ }
unbounded_range;
}