forked from bertrandom/snowball-thrower
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInstructions.h
More file actions
127 lines (115 loc) · 2.06 KB
/
Instructions.h
File metadata and controls
127 lines (115 loc) · 2.06 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#ifndef _INSTRUCTIONS_H_
#define _INSTRUCTIONS_H_
#include "Joystick.h"
#if !defined(ARRAY_SIZE)
#define ARRAY_SIZE(x) (sizeof((x)) / sizeof((x)[0]))
#endif
typedef enum
{
SYNC_CONTROLLER,
BATTLE_RESTAURANT,
BATTLE,
BENCH,
TELEPORT5,
SUSPEND,
CLEANUP,
DONE
} State_t;
typedef enum
{ // All of the commands for controlls that you want to use go here.
L_UP, // Don't forget to add them to the case statement at the bottom to tell the computer what the commands mean
L_DOWN,
L_LEFT,
L_RIGHT,
R_UP,
R_DOWN,
R_LEFT,
R_RIGHT,
A,
B,
Y,
X,
L,
R,
ZL,
ZR,
MINUS,
PLUS,
HOME,
TARGET,
ATTACK,
SYNC,
NOTHING
} Buttons_t;
typedef struct
{
Buttons_t button;
uint16_t duration;
} command_t;
static const command_t sync_controller[] = {
{SYNC, 5},
{NOTHING, 50},
{SYNC, 5},
{NOTHING, 50},
{A, 5},
{NOTHING, 50},
{B, 5},
{NOTHING, 30},
{L_LEFT, 25},
{NOTHING, 20},
{L_UP, 5},
{NOTHING, 20},
{A, 5},
{NOTHING, 70}};
static const int restaurant_iteration = 60;
static const command_t basic_interact[] = {
{A, 5},
{NOTHING, 10}};
static const int battle_iteration = 75;
static const command_t battle[] = {
{TARGET, 30},
{ATTACK, 10},
{NOTHING, 20}};
static const command_t bench_loop[] = {
{A, 5},
{NOTHING, 20},
{A, 5},
{NOTHING, 20},
{A, 5},
{NOTHING, 20},
{A, 5},
{NOTHING, 20},
{A, 5},
{NOTHING, 20},
{A, 5},
{NOTHING, 20},
{A, 5},
{NOTHING, 650},
{L_DOWN, 10},
{NOTHING, 20},
{A, 5},
{NOTHING, 20},
{A, 5},
{NOTHING, 20},
{A, 5},
{NOTHING, 20},
{A, 5},
{NOTHING, 20},
{A, 5},
{NOTHING, 20},
{A, 5},
{NOTHING, 20},
{A, 5},
{NOTHING, 650}};
static const command_t teleport_5[] = {
{PLUS, 5},
{NOTHING, 30},
{L_UP, 5},
{L_RIGHT, 5},
{NOTHING, 30},
{A, 5},
{NOTHING, 100},
{R_RIGHT, 50}};
static const command_t home_break[] = {
{HOME, 5}};
#endif