diff options
author | Bad Diode <bd@badd10de.dev> | 2023-04-23 15:48:59 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2023-04-23 15:48:59 +0200 |
commit | ff6e784e7c5ebe223666c6c631305397ad358289 (patch) | |
tree | 0f87823d48366a6beb8d36d7eea5dc33663d7abd /src/assets.c | |
parent | deb9c48fbd3dc5854de4ae3a04dc999029c10ae0 (diff) | |
download | stepper-ff6e784e7c5ebe223666c6c631305397ad358289.tar.gz stepper-ff6e784e7c5ebe223666c6c631305397ad358289.zip |
Start decoupling of rendering from update passes
Diffstat (limited to 'src/assets.c')
-rw-r--r-- | src/assets.c | 129 |
1 files changed, 129 insertions, 0 deletions
diff --git a/src/assets.c b/src/assets.c new file mode 100644 index 0000000..74d27d2 --- /dev/null +++ b/src/assets.c | |||
@@ -0,0 +1,129 @@ | |||
1 | #ifndef STEPPER_ASSETS_C | ||
2 | #define STEPPER_ASSETS_C | ||
3 | |||
4 | // | ||
5 | // Sprites. | ||
6 | // | ||
7 | |||
8 | static const u32 note_name_sprites[] = { | ||
9 | 0xe0000000, 0xe0202020, 0x0e000000, 0x0e020e08, | ||
10 | 0x98000000, 0x98a8a8a8, 0x38000000, 0x390a3b20, | ||
11 | 0x60000000, 0x60a0a0a0, 0x0e000000, 0x0e020e08, | ||
12 | 0xb8000000, 0xb8889888, 0x38000000, 0x390a3b20, | ||
13 | 0xe0000000, 0xe0206020, 0x0e000000, 0x0e020e08, | ||
14 | 0xe0000000, 0x20206020, 0x0e000000, 0x0e020e08, | ||
15 | 0xb8000000, 0xb8a88888, 0x38000000, 0x390a3b20, | ||
16 | 0xe0000000, 0xe0a02020, 0x0e000000, 0x0e020e08, | ||
17 | 0xb8000000, 0xa8b8a8a8, 0x38000000, 0x390a3b20, | ||
18 | 0xe0000000, 0xa0e0a0a0, 0x0e000000, 0x0e020e08, | ||
19 | 0xb8000000, 0xb8a898a8, 0x38000000, 0x390a3b20, | ||
20 | 0xe0000000, 0xe0a060a0, 0x0e000000, 0x0e020e08, | ||
21 | 0xe0000000, 0xe0202020, 0x0e000000, 0x0e080c08, | ||
22 | 0x98000000, 0x98a8a8a8, 0x38000000, 0x39223320, | ||
23 | 0x60000000, 0x60a0a0a0, 0x0e000000, 0x0e080c08, | ||
24 | 0xb8000000, 0xb8889888, 0x38000000, 0x39223320, | ||
25 | 0xe0000000, 0xe0206020, 0x0e000000, 0x0e080c08, | ||
26 | 0xe0000000, 0x20206020, 0x0e000000, 0x0e080c08, | ||
27 | 0xb8000000, 0xb8a88888, 0x38000000, 0x39223320, | ||
28 | 0xe0000000, 0xe0a02020, 0x0e000000, 0x0e080c08, | ||
29 | 0xb8000000, 0xa8b8a8a8, 0x38000000, 0x39223320, | ||
30 | 0xe0000000, 0xa0e0a0a0, 0x0e000000, 0x0e080c08, | ||
31 | 0xb8000000, 0xb8a898a8, 0x38000000, 0x39223320, | ||
32 | 0xe0000000, 0xe0a060a0, 0x0e000000, 0x0e080c08, | ||
33 | 0xe0000000, 0xe0202020, 0x0a000000, 0x08080e0a, | ||
34 | 0x98000000, 0x98a8a8a8, 0x28000000, 0x21223b28, | ||
35 | 0x60000000, 0x60a0a0a0, 0x0a000000, 0x08080e0a, | ||
36 | 0xb8000000, 0xb8889888, 0x28000000, 0x21223b28, | ||
37 | 0xe0000000, 0xe0206020, 0x0a000000, 0x08080e0a, | ||
38 | 0xe0000000, 0x20206020, 0x0a000000, 0x08080e0a, | ||
39 | 0xb8000000, 0xb8a88888, 0x28000000, 0x21223b28, | ||
40 | 0xe0000000, 0xe0a02020, 0x0a000000, 0x08080e0a, | ||
41 | 0xb8000000, 0xa8b8a8a8, 0x28000000, 0x21223b28, | ||
42 | 0xe0000000, 0xa0e0a0a0, 0x0a000000, 0x08080e0a, | ||
43 | 0xb8000000, 0xb8a898a8, 0x28000000, 0x21223b28, | ||
44 | 0xe0000000, 0xe0a060a0, 0x0a000000, 0x08080e0a, | ||
45 | 0xe0000000, 0xe0202020, 0x0e000000, 0x0e080e02, | ||
46 | 0x98000000, 0x98a8a8a8, 0x38000000, 0x39223b08, | ||
47 | 0x60000000, 0x60a0a0a0, 0x0e000000, 0x0e080e02, | ||
48 | 0xb8000000, 0xb8889888, 0x38000000, 0x39223b08, | ||
49 | 0xe0000000, 0xe0206020, 0x0e000000, 0x0e080e02, | ||
50 | 0xe0000000, 0x20206020, 0x0e000000, 0x0e080e02, | ||
51 | 0xb8000000, 0xb8a88888, 0x38000000, 0x39223b08, | ||
52 | 0xe0000000, 0xe0a02020, 0x0e000000, 0x0e080e02, | ||
53 | 0xb8000000, 0xa8b8a8a8, 0x38000000, 0x39223b08, | ||
54 | 0xe0000000, 0xa0e0a0a0, 0x0e000000, 0x0e080e02, | ||
55 | 0xb8000000, 0xb8a898a8, 0x38000000, 0x39223b08, | ||
56 | 0xe0000000, 0xe0a060a0, 0x0e000000, 0x0e080e02, | ||
57 | 0xe0000000, 0xe0202020, 0x0e000000, 0x0e0a0e02, | ||
58 | 0x98000000, 0x98a8a8a8, 0x38000000, 0x392a3b08, | ||
59 | 0x60000000, 0x60a0a0a0, 0x0e000000, 0x0e0a0e02, | ||
60 | 0xb8000000, 0xb8889888, 0x38000000, 0x392a3b08, | ||
61 | 0xe0000000, 0xe0206020, 0x0e000000, 0x0e0a0e02, | ||
62 | 0xe0000000, 0x20206020, 0x0e000000, 0x0e0a0e02, | ||
63 | 0xb8000000, 0xb8a88888, 0x38000000, 0x392a3b08, | ||
64 | 0xe0000000, 0xe0a02020, 0x0e000000, 0x0e0a0e02, | ||
65 | 0xb8000000, 0xa8b8a8a8, 0x38000000, 0x392a3b08, | ||
66 | 0xe0000000, 0xa0e0a0a0, 0x0e000000, 0x0e0a0e02, | ||
67 | 0xb8000000, 0xb8a898a8, 0x38000000, 0x392a3b08, | ||
68 | 0xe0000000, 0xe0a060a0, 0x0e000000, 0x0e0a0e02, | ||
69 | 0xe0000000, 0xe0202020, 0x0e000000, 0x02020408, | ||
70 | 0x98000000, 0x98a8a8a8, 0x38000000, 0x090a1320, | ||
71 | 0x60000000, 0x60a0a0a0, 0x0e000000, 0x02020408, | ||
72 | 0xb8000000, 0xb8889888, 0x38000000, 0x090a1320, | ||
73 | 0xe0000000, 0xe0206020, 0x0e000000, 0x02020408, | ||
74 | 0xe0000000, 0x20206020, 0x0e000000, 0x02020408, | ||
75 | 0xb8000000, 0xb8a88888, 0x38000000, 0x090a1320, | ||
76 | 0xe0000000, 0xe0a02020, 0x0e000000, 0x02020408, | ||
77 | 0xb8000000, 0xa8b8a8a8, 0x38000000, 0x090a1320, | ||
78 | 0xe0000000, 0xa0e0a0a0, 0x0e000000, 0x02020408, | ||
79 | 0xb8000000, 0xb8a898a8, 0x38000000, 0x090a1320, | ||
80 | 0xe0000000, 0xe0a060a0, 0x0e000000, 0x02020408, | ||
81 | 0xe0000000, 0xe0202020, 0x0e000000, 0x0e0a0e0a, | ||
82 | }; | ||
83 | |||
84 | u32 ch_btn_sprite[] = { | ||
85 | // CH1 | ||
86 | 0x888e80ff, 0xff808e88, | ||
87 | 0xa1a100ff, 0xff00a9e1, | ||
88 | 0x101010f0, 0xf0101010, | ||
89 | |||
90 | // CH2 | ||
91 | 0x919d80ff, 0xff809d91, | ||
92 | 0x424200ff, 0xff0052c2, | ||
93 | 0x909010f0, 0xf0109090, | ||
94 | |||
95 | // CH3 | ||
96 | 0xa2ba80ff, 0xff80baa3, | ||
97 | 0x858500ff, 0xff00a585, | ||
98 | 0x505010f0, 0xf0105050, | ||
99 | |||
100 | // CH4 | ||
101 | 0xa2ba80ff, 0xff80baa3, | ||
102 | 0x858500ff, 0xff00a485, | ||
103 | 0x505010f0, 0xf010d050, | ||
104 | }; | ||
105 | |||
106 | static const u32 default_wave_buttons[] = { | ||
107 | 0xff013149, 0x850101ff, 0x3f202028, 0x2423203f, | ||
108 | 0xff016151, 0x49c501ff, 0x3f202c2a, 0x2928203f, | ||
109 | 0xff017d45, 0x45c501ff, 0x3f202828, 0x282f203f, | ||
110 | 0xff014911, 0x812501ff, 0x3f202128, 0x2420203f, | ||
111 | }; | ||
112 | |||
113 | // | ||
114 | // Wave data. | ||
115 | // | ||
116 | |||
117 | static const u32 sine_wave[16] = { | ||
118 | 0xefdebc89, 0x98cbedfe, 0x10214376, 0x67341201, | ||
119 | }; | ||
120 | |||
121 | static const u32 saw_wave[16] = { | ||
122 | 0x67452301, 0xefcdab89, 0x67452301, 0xefcdab89, | ||
123 | }; | ||
124 | |||
125 | static const u32 square_wave[16] = { | ||
126 | 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, | ||
127 | }; | ||
128 | |||
129 | #endif // STEPPER_ASSETS_C | ||