aboutsummaryrefslogtreecommitdiffstats
path: root/src/draft/cruft.pde
blob: c86a7309ffc018302b50a1263304d15d1b2f1c93 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
void static old_process_keypress() {
  if(SerialUSB.available()) {
    inchar = SerialUSB.read();
    while(SerialUSB.available()) {
      inchar = SerialUSB.read();
    }
    SerialUSB.println(inchar, 16);
    switch(inchar) {
      case 'w':
        swimy -= SWIM_SPEED;
        break;
      case 's':
        swimy += SWIM_SPEED;
        break;
      case 'a':
        swimx -= SWIM_SPEED;
        break;
      case 'd':
        swimx += SWIM_SPEED;
        break;
      case 'W':
        swimy -= SWIM_SPEED;
        jaws_closed = 20;
        break;
      case 'S':
        swimy += SWIM_SPEED;
        jaws_closed = 20;
        break;
      case 'A':
        swimx -= SWIM_SPEED;
        jaws_closed = 20;
        break;
      case 'D':
        swimx += SWIM_SPEED;
        jaws_closed = 20;
        break;
      case ' ':
        jaws_closed = 20;
        break;
      default:
        break;
    }
  }
}