fencer/core/src/player_input.h
Sara 0c6f1dd8cf feat: reworked typeclasses to forward-declare then define
forward declarations are simplified with decl_typeclass_impl
impl_Typeclass_for now instead only define
static inline impl_Typeclass_for can be used to achieve the old behaviour
2024-01-12 09:02:42 +01:00

23 lines
608 B
C

#ifndef _fencer_player_input_h
#define _fencer_player_input_h
#include "list.h"
#include "input.h"
#include "input_axis.h"
#include "typeclass_helpers.h"
typedef struct PlayerInput {
InputDevice* device;
List listeners;
void* target;
} PlayerInput;
extern PlayerInput* playerinput_new(void* target, int device);
extern void playerinput_add(PlayerInput* self, InputAxis axis, InputDelegateFn delegate);
extern void playerinput_set_device(PlayerInput* self, int device);
extern void playerinput_drop(PlayerInput* self);
decl_typeclass_impl(Drop, PlayerInput)
#endif // !_fencer_player_input_h