Arch Game Engine  0.2
input.h
1 #ifndef INPUT_H
2 #define INPUT_H
3 
4 #include <SDL2/SDL.h>
5 using namespace std;
6 #include <iostream>
7 
9 class Input {
10 public:
11  Input();
12  ~Input();
14  void logPress();
16  bool checkKey(int k);
18  bool reset();
19  int getMouseX() const { return mousex; }
20  int getMouseY() const { return mousey; }
21  int left;
22  int right;
23  int up;
24  int down;
25  int q;
26  int w;
27  int e;
28  int r;
29  int t;
30  int y;
31  int u;
32  int i;
33  int o;
34  int p;
35  int a;
36  int s;
37  int d;
38  int f;
39  int g;
40  int h;
41  int j;
42  int k;
43  int l;
44  int z;
45  int x;
46  int c;
47  int v;
48  int b;
49  int n;
50  int m;
51  int lshift;
52  int rshift;
53  int shift;
54  int quit;
55  int esc;
56  int mouseleft;
58  int mouseright;
59  int mouseup;
60  int mousedown;
61 private:
63  bool keys[51];
64  int mousex;
65  int mousey;
66 };
67 
68 #endif //INPUT_H
int esc
Log ID for esc.
Definition: input.h:55
int l
Log ID for l.
Definition: input.h:43
int g
Log ID for g.
Definition: input.h:39
int y
Log ID for y.
Definition: input.h:30
int m
Log ID for m.
Definition: input.h:50
int c
Log ID for c.
Definition: input.h:46
int f
Log ID for f.
Definition: input.h:38
int mousemiddle
Log ID for middle mouse click.
Definition: input.h:57
int mouseright
Log ID for right mouse click.
Definition: input.h:58
int x
Log ID for x.
Definition: input.h:45
int j
Log ID for j.
Definition: input.h:41
int up
Log ID for up.
Definition: input.h:23
int lshift
Log ID for left shift.
Definition: input.h:51
int shift
Shift ID for shift.
Definition: input.h:53
int h
Log ID for h.
Definition: input.h:40
int e
Log ID for e.
Definition: input.h:27
int i
Log ID for i.
Definition: input.h:32
int d
Log ID for d.
Definition: input.h:37
int mousedown
Log ID for scroll down on mouse wheel.
Definition: input.h:60
int p
Log ID for p.
Definition: input.h:34
int right
Log ID for right.
Definition: input.h:22
int r
Log ID for r.
Definition: input.h:28
int z
Log ID for z.
Definition: input.h:44
int left
Log ID for left.
Definition: input.h:21
int mouseleft
Log ID for left mouse click.
Definition: input.h:56
int v
Log ID for v.
Definition: input.h:47
int a
Log ID for a.
Definition: input.h:35
int w
Log ID for w.
Definition: input.h:26
Class for checking and storing keyboard and mouse input.
Definition: input.h:9
int b
Log ID for b.
Definition: input.h:48
int n
Log ID for n.
Definition: input.h:49
int u
Log ID for u.
Definition: input.h:31
int o
Log ID for o.
Definition: input.h:33
int down
Log ID for down.
Definition: input.h:24
int quit
Log ID for quit.
Definition: input.h:54
int q
Log ID for q.
Definition: input.h:25
int k
Log ID for k.
Definition: input.h:42
int rshift
Log ID for right shift.
Definition: input.h:52
int s
Log ID for s.
Definition: input.h:36
int mouseup
Log ID for scroll up on mouse wheel.
Definition: input.h:59
int t
Log ID for t.
Definition: input.h:29