From ff6e784e7c5ebe223666c6c631305397ad358289 Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Sun, 23 Apr 2023 15:48:59 +0200 Subject: Start decoupling of rendering from update passes --- src/assets.c | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 src/assets.c (limited to 'src/assets.c') 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 @@ +#ifndef STEPPER_ASSETS_C +#define STEPPER_ASSETS_C + +// +// Sprites. +// + +static const u32 note_name_sprites[] = { + 0xe0000000, 0xe0202020, 0x0e000000, 0x0e020e08, + 0x98000000, 0x98a8a8a8, 0x38000000, 0x390a3b20, + 0x60000000, 0x60a0a0a0, 0x0e000000, 0x0e020e08, + 0xb8000000, 0xb8889888, 0x38000000, 0x390a3b20, + 0xe0000000, 0xe0206020, 0x0e000000, 0x0e020e08, + 0xe0000000, 0x20206020, 0x0e000000, 0x0e020e08, + 0xb8000000, 0xb8a88888, 0x38000000, 0x390a3b20, + 0xe0000000, 0xe0a02020, 0x0e000000, 0x0e020e08, + 0xb8000000, 0xa8b8a8a8, 0x38000000, 0x390a3b20, + 0xe0000000, 0xa0e0a0a0, 0x0e000000, 0x0e020e08, + 0xb8000000, 0xb8a898a8, 0x38000000, 0x390a3b20, + 0xe0000000, 0xe0a060a0, 0x0e000000, 0x0e020e08, + 0xe0000000, 0xe0202020, 0x0e000000, 0x0e080c08, + 0x98000000, 0x98a8a8a8, 0x38000000, 0x39223320, + 0x60000000, 0x60a0a0a0, 0x0e000000, 0x0e080c08, + 0xb8000000, 0xb8889888, 0x38000000, 0x39223320, + 0xe0000000, 0xe0206020, 0x0e000000, 0x0e080c08, + 0xe0000000, 0x20206020, 0x0e000000, 0x0e080c08, + 0xb8000000, 0xb8a88888, 0x38000000, 0x39223320, + 0xe0000000, 0xe0a02020, 0x0e000000, 0x0e080c08, + 0xb8000000, 0xa8b8a8a8, 0x38000000, 0x39223320, + 0xe0000000, 0xa0e0a0a0, 0x0e000000, 0x0e080c08, + 0xb8000000, 0xb8a898a8, 0x38000000, 0x39223320, + 0xe0000000, 0xe0a060a0, 0x0e000000, 0x0e080c08, + 0xe0000000, 0xe0202020, 0x0a000000, 0x08080e0a, + 0x98000000, 0x98a8a8a8, 0x28000000, 0x21223b28, + 0x60000000, 0x60a0a0a0, 0x0a000000, 0x08080e0a, + 0xb8000000, 0xb8889888, 0x28000000, 0x21223b28, + 0xe0000000, 0xe0206020, 0x0a000000, 0x08080e0a, + 0xe0000000, 0x20206020, 0x0a000000, 0x08080e0a, + 0xb8000000, 0xb8a88888, 0x28000000, 0x21223b28, + 0xe0000000, 0xe0a02020, 0x0a000000, 0x08080e0a, + 0xb8000000, 0xa8b8a8a8, 0x28000000, 0x21223b28, + 0xe0000000, 0xa0e0a0a0, 0x0a000000, 0x08080e0a, + 0xb8000000, 0xb8a898a8, 0x28000000, 0x21223b28, + 0xe0000000, 0xe0a060a0, 0x0a000000, 0x08080e0a, + 0xe0000000, 0xe0202020, 0x0e000000, 0x0e080e02, + 0x98000000, 0x98a8a8a8, 0x38000000, 0x39223b08, + 0x60000000, 0x60a0a0a0, 0x0e000000, 0x0e080e02, + 0xb8000000, 0xb8889888, 0x38000000, 0x39223b08, + 0xe0000000, 0xe0206020, 0x0e000000, 0x0e080e02, + 0xe0000000, 0x20206020, 0x0e000000, 0x0e080e02, + 0xb8000000, 0xb8a88888, 0x38000000, 0x39223b08, + 0xe0000000, 0xe0a02020, 0x0e000000, 0x0e080e02, + 0xb8000000, 0xa8b8a8a8, 0x38000000, 0x39223b08, + 0xe0000000, 0xa0e0a0a0, 0x0e000000, 0x0e080e02, + 0xb8000000, 0xb8a898a8, 0x38000000, 0x39223b08, + 0xe0000000, 0xe0a060a0, 0x0e000000, 0x0e080e02, + 0xe0000000, 0xe0202020, 0x0e000000, 0x0e0a0e02, + 0x98000000, 0x98a8a8a8, 0x38000000, 0x392a3b08, + 0x60000000, 0x60a0a0a0, 0x0e000000, 0x0e0a0e02, + 0xb8000000, 0xb8889888, 0x38000000, 0x392a3b08, + 0xe0000000, 0xe0206020, 0x0e000000, 0x0e0a0e02, + 0xe0000000, 0x20206020, 0x0e000000, 0x0e0a0e02, + 0xb8000000, 0xb8a88888, 0x38000000, 0x392a3b08, + 0xe0000000, 0xe0a02020, 0x0e000000, 0x0e0a0e02, + 0xb8000000, 0xa8b8a8a8, 0x38000000, 0x392a3b08, + 0xe0000000, 0xa0e0a0a0, 0x0e000000, 0x0e0a0e02, + 0xb8000000, 0xb8a898a8, 0x38000000, 0x392a3b08, + 0xe0000000, 0xe0a060a0, 0x0e000000, 0x0e0a0e02, + 0xe0000000, 0xe0202020, 0x0e000000, 0x02020408, + 0x98000000, 0x98a8a8a8, 0x38000000, 0x090a1320, + 0x60000000, 0x60a0a0a0, 0x0e000000, 0x02020408, + 0xb8000000, 0xb8889888, 0x38000000, 0x090a1320, + 0xe0000000, 0xe0206020, 0x0e000000, 0x02020408, + 0xe0000000, 0x20206020, 0x0e000000, 0x02020408, + 0xb8000000, 0xb8a88888, 0x38000000, 0x090a1320, + 0xe0000000, 0xe0a02020, 0x0e000000, 0x02020408, + 0xb8000000, 0xa8b8a8a8, 0x38000000, 0x090a1320, + 0xe0000000, 0xa0e0a0a0, 0x0e000000, 0x02020408, + 0xb8000000, 0xb8a898a8, 0x38000000, 0x090a1320, + 0xe0000000, 0xe0a060a0, 0x0e000000, 0x02020408, + 0xe0000000, 0xe0202020, 0x0e000000, 0x0e0a0e0a, +}; + +u32 ch_btn_sprite[] = { + // CH1 + 0x888e80ff, 0xff808e88, + 0xa1a100ff, 0xff00a9e1, + 0x101010f0, 0xf0101010, + + // CH2 + 0x919d80ff, 0xff809d91, + 0x424200ff, 0xff0052c2, + 0x909010f0, 0xf0109090, + + // CH3 + 0xa2ba80ff, 0xff80baa3, + 0x858500ff, 0xff00a585, + 0x505010f0, 0xf0105050, + + // CH4 + 0xa2ba80ff, 0xff80baa3, + 0x858500ff, 0xff00a485, + 0x505010f0, 0xf010d050, +}; + +static const u32 default_wave_buttons[] = { + 0xff013149, 0x850101ff, 0x3f202028, 0x2423203f, + 0xff016151, 0x49c501ff, 0x3f202c2a, 0x2928203f, + 0xff017d45, 0x45c501ff, 0x3f202828, 0x282f203f, + 0xff014911, 0x812501ff, 0x3f202128, 0x2420203f, +}; + +// +// Wave data. +// + +static const u32 sine_wave[16] = { + 0xefdebc89, 0x98cbedfe, 0x10214376, 0x67341201, +}; + +static const u32 saw_wave[16] = { + 0x67452301, 0xefcdab89, 0x67452301, 0xefcdab89, +}; + +static const u32 square_wave[16] = { + 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, +}; + +#endif // STEPPER_ASSETS_C -- cgit v1.2.1