wiah
This commit is contained in:
Julia 2024-04-11 00:17:14 -05:00
parent ca32c2ce76
commit 878fbdd934

View file

@ -19,6 +19,13 @@ enum InputType {
ESCAPE ESCAPE
}; };
struct Input {
u8 type;
u8 is_down;
u8 is_held;
u8 is_up;
union {
struct Button { struct Button {
u64 value; u64 value;
} but; } but;
@ -29,26 +36,18 @@ struct Joystick {
i32 x; i32 x;
i32 y; i32 y;
} js; } js;
};
};
struct InputRecord { struct InputRecord {
u16f bind; u16f bind;
struct Input dat;
u8 type;
u8 is_down;
u8 is_held;
u8 is_up;
union {
struct Button but;
struct Axis axis;
struct Joystick js;
};
struct timespec timestamp; struct timespec timestamp;
}; };
struct InputAxis { struct InputAxis {
struct input; struct Input dat;
struct timespec last_pressed; struct timespec last_pressed;
struct timespec last_released; struct timespec last_released;