From 4959741a7eaac3b429912a1ccfd7ebe06d41ef0d Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Sun, 23 Apr 2023 20:45:37 +0200 Subject: Add back cursor drawing --- src/main.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index aa5bd43..525a0d9 100644 --- a/src/main.c +++ b/src/main.c @@ -18,7 +18,6 @@ WITH REGARD TO THIS SOFTWARE. #define PROF_ENABLE 1 #include "profiling.c" - void render(void) { PROF(draw_rect(0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, 1), clear_cycles); @@ -67,12 +66,16 @@ render(void) { redraw_params = false; } - // TODO: Make sure we are drawing the cursors properly. - // PROF(draw_trig_cursor(trig_selection_loc, COL_CURSOR), draw_cursor_cycles); - // PROF(draw_channel_cursor(channel_selection_loc, COL_GREY), draw_cursor_cycles); - // PROF(draw_pattern_cursor(pattern_selection_loc, COL_GREY), draw_cursor_cycles); - // PROF(draw_current_step(COL_RED), draw_cursor_cycles); + PROF(draw_cursors(), draw_cursor_cycles); +} + +void +update(void) { + last_trig_loc = trig_selection_loc; + last_channel_loc = channel_selection_loc; + last_pattern_loc = pattern_selection_loc; + last_right_col_loc = right_col_selection_loc; } int @@ -101,8 +104,8 @@ main(void) { PROF_SHOW(); FRAME_START(); PROF(flip_buffer(), flip_cycles); + PROF(update(), update_cycles); PROF(handle_sequencer_input(), input_cycles); - // TODO: Update function to performa animations, etc. PROF(render(), render_cycles); FRAME_END(); } -- cgit v1.2.1