-
Notifications
You must be signed in to change notification settings - Fork 11
/
buttons.cpp
47 lines (42 loc) · 1.04 KB
/
buttons.cpp
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include "joysmooth.h"
#include "buttons.h"
buttons::buttons(joysmooth& h) {
init(h.GetRawButton(1),
h.GetRawButton(2),
h.GetRawButton(3),
h.GetRawButton(4),
h.GetRawButton(5),
h.GetRawButton(6),
h.GetRawButton(7),
h.GetRawButton(8),
h.GetRawButton(9),
h.GetRawButton(10),
h.GetRawButton(11)
);
}
buttons::buttons(bool b1, bool b2, bool b3, bool b4, bool b5, bool b6, bool b7,
bool b8, bool b9, bool b10, bool b11)
{
init(b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11);
}
void buttons::init(bool b1, bool b2, bool b3, bool b4, bool b5, bool b6,
bool b7, bool b8, bool b9, bool b10, bool b11)
{
values[0] = b1;
values[1] = b2;
values[2] = b3;
values[3] = b4;
values[4] = b5;
values[5] = b6;
values[6] = b7;
values[7] = b8;
values[8] = b9;
values[9] = b10;
values[10] = b11;
}
bool& buttons::GetRawButton(int i) {
return values[i - 1];
}
const bool buttons::GetRawButton(int i) const {
return values[i - 1];
}