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/main.c | |
parent | deb9c48fbd3dc5854de4ae3a04dc999029c10ae0 (diff) | |
download | stepper-ff6e784e7c5ebe223666c6c631305397ad358289.tar.gz stepper-ff6e784e7c5ebe223666c6c631305397ad358289.zip |
Start decoupling of rendering from update passes
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -21,7 +21,11 @@ WITH REGARD TO THIS SOFTWARE. | |||
21 | 21 | ||
22 | void | 22 | void |
23 | render(void) { | 23 | render(void) { |
24 | // TODO: Fix small font rendering. | ||
25 | // TODO: Draw remaining sprites. | ||
26 | // TODO: Decouple update from rendering. | ||
24 | PROF(screen_fill(0), clear_cycles); | 27 | PROF(screen_fill(0), clear_cycles); |
28 | PROF(draw_rect(0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, 1), clear_cycles); | ||
25 | PROF(draw_triggers(), draw_trigs_cycles); | 29 | PROF(draw_triggers(), draw_trigs_cycles); |
26 | PROF(draw_channels(), draw_btn_cycles); | 30 | PROF(draw_channels(), draw_btn_cycles); |
27 | PROF(draw_pattern_buttons(), draw_btn_cycles); | 31 | PROF(draw_pattern_buttons(), draw_btn_cycles); |
@@ -30,6 +34,10 @@ render(void) { | |||
30 | PROF(draw_play(), draw_btn_cycles); | 34 | PROF(draw_play(), draw_btn_cycles); |
31 | PROF(draw_stop(), draw_btn_cycles); | 35 | PROF(draw_stop(), draw_btn_cycles); |
32 | PROF(draw_piano(), draw_piano_cycles); | 36 | PROF(draw_piano(), draw_piano_cycles); |
37 | // TODO: Draw the notes currently playing with a fade off animation for the | ||
38 | // first 3 channels. | ||
39 | TriggerNote *trig = get_current_trig(); | ||
40 | PROF(draw_note(trig->note, COL_NOTE_PRESSED), draw_piano_cycles); | ||
33 | PROF(draw_parameters(), draw_param_cycles); | 41 | PROF(draw_parameters(), draw_param_cycles); |
34 | PROF(draw_trig_cursor(trig_selection_loc, COL_CURSOR), draw_cursor_cycles); | 42 | PROF(draw_trig_cursor(trig_selection_loc, COL_CURSOR), draw_cursor_cycles); |
35 | PROF(draw_channel_cursor(channel_selection_loc, COL_GREY), draw_cursor_cycles); | 43 | PROF(draw_channel_cursor(channel_selection_loc, COL_GREY), draw_cursor_cycles); |