Skip to content

Commit

Permalink
Illuminate current notes.
Browse files Browse the repository at this point in the history
  • Loading branch information
iandoesallthethings committed Jul 25, 2023
1 parent e0c1eb4 commit e848874
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/keyboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ fn note_off(grid: &mut Grid, x: i32, y: i32) {
}

fn draw_c(grid: &mut Grid) {
let new_pixels = grid.map_pixels(|_, x, y, _, _| {
grid.map_pixels(|grid, x, y, _, _| {
let note = isometric_fourths(x, y);

if note % 12 == 0 {
return (note / 12) * 2;
let intensity = (note / 12) * 2;
grid.set_pixel(x, y, intensity);
return intensity;
}

0
});

grid.set_all(new_pixels);
}

fn isometric_fourths(x: i32, y: i32) -> u8 {
Expand Down

0 comments on commit e848874

Please sign in to comment.