diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -18,7 +18,6 @@ WITH REGARD TO THIS SOFTWARE. | |||
18 | #define PROF_ENABLE 1 | 18 | #define PROF_ENABLE 1 |
19 | #include "profiling.c" | 19 | #include "profiling.c" |
20 | 20 | ||
21 | |||
22 | void | 21 | void |
23 | render(void) { | 22 | render(void) { |
24 | PROF(draw_rect(0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, 1), clear_cycles); | 23 | PROF(draw_rect(0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, 1), clear_cycles); |
@@ -67,12 +66,16 @@ render(void) { | |||
67 | redraw_params = false; | 66 | redraw_params = false; |
68 | } | 67 | } |
69 | 68 | ||
70 | // TODO: Make sure we are drawing the cursors properly. | ||
71 | // PROF(draw_trig_cursor(trig_selection_loc, COL_CURSOR), draw_cursor_cycles); | ||
72 | // PROF(draw_channel_cursor(channel_selection_loc, COL_GREY), draw_cursor_cycles); | ||
73 | // PROF(draw_pattern_cursor(pattern_selection_loc, COL_GREY), draw_cursor_cycles); | ||
74 | |||
75 | // PROF(draw_current_step(COL_RED), draw_cursor_cycles); | 69 | // PROF(draw_current_step(COL_RED), draw_cursor_cycles); |
70 | PROF(draw_cursors(), draw_cursor_cycles); | ||
71 | } | ||
72 | |||
73 | void | ||
74 | update(void) { | ||
75 | last_trig_loc = trig_selection_loc; | ||
76 | last_channel_loc = channel_selection_loc; | ||
77 | last_pattern_loc = pattern_selection_loc; | ||
78 | last_right_col_loc = right_col_selection_loc; | ||
76 | } | 79 | } |
77 | 80 | ||
78 | int | 81 | int |
@@ -101,8 +104,8 @@ main(void) { | |||
101 | PROF_SHOW(); | 104 | PROF_SHOW(); |
102 | FRAME_START(); | 105 | FRAME_START(); |
103 | PROF(flip_buffer(), flip_cycles); | 106 | PROF(flip_buffer(), flip_cycles); |
107 | PROF(update(), update_cycles); | ||
104 | PROF(handle_sequencer_input(), input_cycles); | 108 | PROF(handle_sequencer_input(), input_cycles); |
105 | // TODO: Update function to performa animations, etc. | ||
106 | PROF(render(), render_cycles); | 109 | PROF(render(), render_cycles); |
107 | FRAME_END(); | 110 | FRAME_END(); |
108 | } | 111 | } |