summaryrefslogtreecommitdiff
path: root/src/controller.h
blob: a97fc7a36fe443599f7ae3447e5e62db11499c75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef CONTROLLER_H
#define CONTROLLER_H

#include <SDL.h>
#include <stdbool.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef struct controller_t {
  bool up;
  bool down;
  bool left;
  bool right;
} controller_t;

void controller_update(controller_t *self,
                       SDL_Event    *event);

#ifdef __cplusplus
}
#endif

#endif /* CONTROLLER_H */