diff options
author | Bad Diode <bd@badd10de.dev> | 2021-04-24 16:09:29 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2021-04-24 16:09:29 +0200 |
commit | a910bccb3e2f70865d4a2f4d2991b864a97bebed (patch) | |
tree | f30bcc5394765a8a2aa49ae5e15a0bfd4a77e419 /src/gba-buttons.c | |
parent | 4c39f45406b12ab536ad22275eb160a368f380ff (diff) | |
download | gba-experiments-a910bccb3e2f70865d4a2f4d2991b864a97bebed.tar.gz gba-experiments-a910bccb3e2f70865d4a2f4d2991b864a97bebed.zip |
Add the rest of the buttons
Diffstat (limited to 'src/gba-buttons.c')
-rw-r--r-- | src/gba-buttons.c | 127 |
1 files changed, 126 insertions, 1 deletions
diff --git a/src/gba-buttons.c b/src/gba-buttons.c index 5a2a6e2..7f13676 100644 --- a/src/gba-buttons.c +++ b/src/gba-buttons.c | |||
@@ -24,7 +24,7 @@ u32 gba_btn_l_data[] = { | |||
24 | }; | 24 | }; |
25 | 25 | ||
26 | u32 gba_btn_r_data[] = { | 26 | u32 gba_btn_r_data[] = { |
27 | 0xff018181, 0x818101ff, 0x3f408182, 0x818280ff, | 27 | 0xff01c141, 0xc14101ff, 0x3f408081, 0x808180ff, |
28 | }; | 28 | }; |
29 | 29 | ||
30 | u32 gba_btn_ab_shadow_data[] = { | 30 | u32 gba_btn_ab_shadow_data[] = { |
@@ -52,6 +52,16 @@ u32 gba_btn_startselect_data[] = { | |||
52 | 0x000000f8, 0x04f80000, 0x0000001f, 0x201f0000, | 52 | 0x000000f8, 0x04f80000, 0x0000001f, 0x201f0000, |
53 | }; | 53 | }; |
54 | 54 | ||
55 | u32 gba_btn_start_text[] = { | ||
56 | 0x00008080, 0x00800000, 0x0000bb91, 0x92930000, | ||
57 | 0x00009b2a, 0x1b2a0000, 0x00000301, 0x01010000, | ||
58 | }; | ||
59 | |||
60 | u32 gba_btn_select_text[] = { | ||
61 | 0x0000e060, 0x80e00000, 0x00002e26, 0x22ee0000, | ||
62 | 0x0000ee26, 0x22ee0000, 0x00000e04, 0x04040000, | ||
63 | }; | ||
64 | |||
55 | u32 gba_btn_fx_downup[] = { | 65 | u32 gba_btn_fx_downup[] = { |
56 | 0x00000000, 0x00000000, 0x04000000, 0x00000000, | 66 | 0x00000000, 0x00000000, 0x04000000, 0x00000000, |
57 | 0x40000100, 0x00000000, 0x00000000, 0x00000000, | 67 | 0x40000100, 0x00000000, 0x00000000, 0x00000000, |
@@ -74,6 +84,55 @@ u32 gba_btn_fx_leftright[] = { | |||
74 | 0x40000000, 0x00000000, 0x00001000, 0x00000000, | 84 | 0x40000000, 0x00000000, 0x00001000, 0x00000000, |
75 | }; | 85 | }; |
76 | 86 | ||
87 | u32 gba_btn_fx_lr[] = { | ||
88 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, | ||
89 | 0x00000000, 0x00000000, 0x00008004, 0x00000002, | ||
90 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, | ||
91 | 0x00000000, 0x00000080, 0x80810200, 0x00000001, | ||
92 | 0x00000000, 0x00000000, 0x00000000, 0x00000080, | ||
93 | 0x80000000, 0x000000c0, 0x80010000, 0x00000000, | ||
94 | 0x00000000, 0x00000000, 0x00000000, 0x00000080, | ||
95 | 0x80000000, 0x00000020, 0x00000000, 0x00000000, | ||
96 | }; | ||
97 | |||
98 | u32 gba_btn_fx_ab[] = { | ||
99 | 0x00000000, 0x00408000, 0x00000080, 0x80800001, | ||
100 | 0x00000000, 0x00000080, 0x00000000, 0x00020100, | ||
101 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, | ||
102 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, | ||
103 | 0x38000000, 0x00000080, 0x00000000, 0x00000000, | ||
104 | 0x00000000, 0x00000000, 0x1c000000, 0x00000001, | ||
105 | 0x40200000, 0x00000000, 0x00008080, 0x80000000, | ||
106 | 0x00000000, 0x00000000, 0x02040000, 0x00000000, | ||
107 | 0x00000000, 0x20400000, 0x00808000, 0x00000000, | ||
108 | 0x00000000, 0x00000000, 0x00000000, 0x04020000, | ||
109 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, | ||
110 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, | ||
111 | 0x0c000000, 0x00000000, 0x00000000, 0x00000000, | ||
112 | 0x00000000, 0x00000000, 0x30000000, 0x00000000, | ||
113 | 0x00201000, 0x00000000, 0x00000000, 0x80800000, | ||
114 | 0x00000000, 0x00000000, 0x00040800, 0x00000000, | ||
115 | 0x00000000, 0x20000000, 0x00800000, 0x00000000, | ||
116 | 0x00000000, 0x00000000, 0x00000000, 0x04000000, | ||
117 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, | ||
118 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, | ||
119 | 0x04000000, 0x00000000, 0x00000000, 0x00000000, | ||
120 | 0x00000000, 0x00000000, 0x20000000, 0x00000000, | ||
121 | 0x00001000, 0x00000000, 0x00000000, 0x00800000, | ||
122 | 0x00000000, 0x00000000, 0x00000800, 0x00000000, | ||
123 | }; | ||
124 | |||
125 | u32 gba_btn_fx_startselect[] = { | ||
126 | 0x00000000, 0x00000000, 0x00000000, 0x10000002, | ||
127 | 0x00000001, 0x10000080, 0x00000000, 0x00000000, | ||
128 | 0x00000000, 0x00000080, 0x00000408, 0x00000001, | ||
129 | 0x00014120, 0x00000000, 0x00000000, 0x00000003, | ||
130 | 0x00000000, 0x000000c0, 0x00020400, 0x00000000, | ||
131 | 0x01814000, 0x00000000, 0x00000000, 0x00000006, | ||
132 | 0x00000000, 0x00000040, 0x00020000, 0x00000000, | ||
133 | 0x01800000, 0x00000000, 0x00000000, 0x00000004, | ||
134 | }; | ||
135 | |||
77 | typedef struct SpriteAnimation { | 136 | typedef struct SpriteAnimation { |
78 | size_t *tile_offsets; | 137 | size_t *tile_offsets; |
79 | size_t n_frames; | 138 | size_t n_frames; |
@@ -152,3 +211,69 @@ AnimationEntry *btn_animation[] = { | |||
152 | {0, 0, 12, 1}, | 211 | {0, 0, 12, 1}, |
153 | }, | 212 | }, |
154 | }; | 213 | }; |
214 | |||
215 | AnimationEntry *btn_animation_ab[] = { | ||
216 | &(AnimationEntry[]){ | ||
217 | {0, 0, 0, 0}, | ||
218 | {0, 0, 0, 0}, | ||
219 | {0, 1, 0, 0}, | ||
220 | {0, 1, 0, 0}, | ||
221 | {0, 2, 0, 0}, | ||
222 | {0, 2, 0, 0}, | ||
223 | {0, 2, 0, 0}, | ||
224 | {0, 2, 0, 0}, | ||
225 | }, | ||
226 | &(AnimationEntry[]){ | ||
227 | {0, 0, 0, 0}, | ||
228 | {0, 0, 0, 0}, | ||
229 | {0, 0, 0, 0}, | ||
230 | {0, 0, 0, 0}, | ||
231 | {0, 0, 0, 0}, | ||
232 | {0, 0, 0, 0}, | ||
233 | {0, 0, 0, 0}, | ||
234 | {0, 0, 0, 0}, | ||
235 | }, | ||
236 | &(AnimationEntry[]){ | ||
237 | {0, 0, 0, 1}, | ||
238 | {0, 0, 0, 1}, | ||
239 | {0, 0, 0, 0}, | ||
240 | {0, 0, 0, 0}, | ||
241 | {0, 0, 16, 0}, | ||
242 | {0, 0, 16, 0}, | ||
243 | {0, 0, 32, 0}, | ||
244 | {0, 0, 32, 1}, | ||
245 | }, | ||
246 | }; | ||
247 | |||
248 | AnimationEntry *btn_animation_startselect[] = { | ||
249 | &(AnimationEntry[]){ | ||
250 | {0, 0, 0, 0}, | ||
251 | {0, 0, 0, 0}, | ||
252 | {0, 0, 2, 0}, | ||
253 | {0, 0, 2, 0}, | ||
254 | {0, 0, 2, 0}, | ||
255 | {0, 0, 2, 0}, | ||
256 | {0, 0, 2, 0}, | ||
257 | {0, 0, 2, 0}, | ||
258 | }, | ||
259 | &(AnimationEntry[]){ | ||
260 | {0, 0, 0, 0}, | ||
261 | {0, 0, 0, 0}, | ||
262 | {0, 0, 0, 0}, | ||
263 | {0, 0, 0, 0}, | ||
264 | {0, 0, 0, 0}, | ||
265 | {0, 0, 0, 0}, | ||
266 | {0, 0, 0, 0}, | ||
267 | {0, 0, 0, 0}, | ||
268 | }, | ||
269 | &(AnimationEntry[]){ | ||
270 | {0, 0, 0, 1}, | ||
271 | {0, 0, 4, 0}, | ||
272 | {0, 0, 4, 0}, | ||
273 | {0, 0, 8, 0}, | ||
274 | {0, 0, 8, 0}, | ||
275 | {0, 0, 12, 0}, | ||
276 | {0, 0, 12, 0}, | ||
277 | {0, 0, 12, 1}, | ||
278 | }, | ||
279 | }; | ||