Fumofumotris/source/fumoengine/input/ctrl.h

34 lines
625 B
C
Raw Normal View History

2024-03-25 05:34:59 +00:00
#pragma once
2024-05-08 22:07:31 +00:00
#include "dictionary.h"
2024-04-30 21:41:31 +00:00
#include "fumocommon.h"
2024-04-18 05:04:44 +00:00
#include "input.h"
2024-04-16 22:14:53 +00:00
2024-04-30 21:41:31 +00:00
struct Controller {
2024-05-09 05:32:58 +00:00
struct InputAxis *pending[IO_BUF_SIZE];
usize pending_len;
struct InputAxis *axes;
usize axes_len;
2024-05-08 22:07:31 +00:00
struct Dictionary binds;
2024-05-02 22:17:37 +00:00
};
2024-03-25 05:34:59 +00:00
2024-05-02 22:17:37 +00:00
bool CreateController(struct Controller *ctrl);
2024-05-08 12:47:46 +00:00
2024-05-02 22:17:37 +00:00
void FreeController(struct Controller *ctrl);
2024-03-25 05:34:59 +00:00
2024-05-10 07:38:08 +00:00
bool ControllerBind(struct Controller *ctrl, u16 control, u16 code, u16 type);
2024-04-19 06:38:45 +00:00
2024-05-10 07:38:08 +00:00
bool ControllerBindMulti(
2024-05-07 22:10:15 +00:00
struct Controller *ctrl,
2024-05-08 12:47:46 +00:00
usize n,
2024-05-10 07:38:08 +00:00
u16 *controls,
u16 *codes,
u16 *types
2024-05-07 22:10:15 +00:00
);
2024-05-02 22:17:37 +00:00
void ControllerPoll(struct Controller *ctrl, struct RecordBuffer *recs);
2024-04-19 06:38:45 +00:00