From 6c57b3d435af36510a0134f6e7b39ac75d7fe3ee Mon Sep 17 00:00:00 2001 From: shadow578 <52449218+shadow578@users.noreply.github.com> Date: Thu, 18 Apr 2024 18:28:33 +0200 Subject: [PATCH] reduce draw calls needed by brickout by ~4x --- Marlin/src/lcd/menu/game/brickout.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Marlin/src/lcd/menu/game/brickout.cpp b/Marlin/src/lcd/menu/game/brickout.cpp index b0d0f11097879..83c74d82f4499 100644 --- a/Marlin/src/lcd/menu/game/brickout.cpp +++ b/Marlin/src/lcd/menu/game/brickout.cpp @@ -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); } } }