Apply loop shorthand macros (#17159)
This commit is contained in:
@@ -140,13 +140,13 @@ void BrickoutGame::game_screen() {
|
||||
|
||||
// Draw bricks
|
||||
if (PAGE_CONTAINS(BRICK_TOP, BRICK_BOT)) {
|
||||
for (uint8_t y = 0; y < BRICK_ROWS; ++y) {
|
||||
LOOP_L_N(y, BRICK_ROWS) {
|
||||
const uint8_t yy = y * BRICK_H + BRICK_TOP;
|
||||
if (PAGE_CONTAINS(yy, yy + BRICK_H - 1)) {
|
||||
for (uint8_t x = 0; x < BRICK_COLS; ++x) {
|
||||
LOOP_L_N(x, BRICK_COLS) {
|
||||
if (TEST(bdat.bricks[y], x)) {
|
||||
const uint8_t xx = x * BRICK_W;
|
||||
for (uint8_t v = 0; v < BRICK_H - 1; ++v)
|
||||
LOOP_L_N(v, BRICK_H - 1)
|
||||
if (PAGE_CONTAINS(yy + v, yy + v))
|
||||
u8g.drawHLine(xx, yy + v, BRICK_W - 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user