aboutsummaryrefslogtreecommitdiff
path: root/src/pad/inc
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2022-09-27 17:03:06 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2022-11-01 16:26:16 +0100
commit980858186149651df5543b6fc99a4f7db0cdd089 (patch)
treed347200b0a562d84df505097651ad0642f207fdd /src/pad/inc
parent39f50e601d395bbd2d78d0147ac530b756da2fff (diff)
downloadjancity-980858186149651df5543b6fc99a4f7db0cdd089.tar.gz
WIP
Diffstat (limited to 'src/pad/inc')
-rw-r--r--src/pad/inc/pad.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/pad/inc/pad.h b/src/pad/inc/pad.h
index c8f6b31..d68f734 100644
--- a/src/pad/inc/pad.h
+++ b/src/pad/inc/pad.h
@@ -3,6 +3,7 @@
#include <pad/port.h>
#include <stdbool.h>
+#include <stddef.h>
#ifdef __cplusplus
extern "C"
@@ -34,17 +35,20 @@ enum pad_key
struct pad
{
- int player;
+ int id;
int mask, oldmask;
struct pad_port port;
};
-void pad_init(int player, struct pad *p);
+void pad_init(int id, struct pad *p);
+void pad_deinit(int id, struct pad *p);
void pad_update(struct pad *p);
bool pad_pressed(const struct pad *p, enum pad_key k);
bool pad_justpressed(const struct pad *p, enum pad_key k);
bool pad_released(const struct pad *p, enum pad_key k);
const char *pad_str(enum pad_key k);
+size_t pad_count(void);
+const char *pad_name(int id);
#ifdef __cplusplus
}