Skip to content

Commit

Permalink
reduce draw calls needed by brickout by ~4x
Browse files Browse the repository at this point in the history
  • Loading branch information
shadow578 authored Apr 29, 2024
1 parent 36d9a9c commit 6c57b3d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Marlin/src/lcd/menu/game/brickout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,11 @@ void BrickoutGame::game_screen() {
// draw brick if it's still there
if (TEST(bdat.bricks[y], x)) {
const uint8_t xx = x * BRICK_W;
for (uint8_t v = 0; v < BRICK_H - 1; ++v)
if (PAGE_CONTAINS(yy + v, yy + v))
draw_hline(xx, yy + v, BRICK_W - 1);
draw_box(xx, yy, BRICK_W - 1, BRICK_H - 1);

//for (uint8_t v = 0; v < BRICK_H - 1; ++v)
// if (PAGE_CONTAINS(yy + v, yy + v))
// draw_hline(xx, yy + v, BRICK_W - 1);
}
}
}
Expand Down

0 comments on commit 6c57b3d

Please sign in to comment.