From f2634319ab7ebfe22fc6d2ebabcdd27879f3667e Mon Sep 17 00:00:00 2001 From: mrcodetastic <12006953+mrcodetastic@users.noreply.github.com> Date: Sun, 28 Jul 2024 22:00:45 +0100 Subject: Clean-up and fix some examples --- examples/AuroraDemo/PatternInvaders.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'examples/AuroraDemo/PatternInvaders.h') diff --git a/examples/AuroraDemo/PatternInvaders.h b/examples/AuroraDemo/PatternInvaders.h index e2df82e..cb76c34 100644 --- a/examples/AuroraDemo/PatternInvaders.h +++ b/examples/AuroraDemo/PatternInvaders.h @@ -36,7 +36,7 @@ class PatternInvadersSmall : public Drawable { } void start() { - dma_display->fillScreen(0); + matrix->fillScreen(0); } unsigned int drawFrame() { @@ -80,7 +80,7 @@ class PatternInvadersMedium : public Drawable { } void start() { - dma_display->fillScreen(0); + matrix->fillScreen(0); } unsigned int drawFrame() { @@ -92,10 +92,10 @@ class PatternInvadersMedium : public Drawable { if (random(0, 2) == 1) color = color1; - dma_display->fillRect(x + (i * 2), y + (j * 2), x + (i * 2 + 1), y + (j * 2 + 1), color); + effects.drawBackgroundFastLEDPixelCRGB(x + (i * 2), y + (j * 2), color); if (i < 2) - dma_display->fillRect(x + (8 - i * 2), y + (j * 2), x + (9 - i * 2), y + (j * 2 + 1), color); + effects.drawBackgroundFastLEDPixelCRGB(x + (8 - i * 2), y + (j * 2), color); } } @@ -122,11 +122,11 @@ class PatternInvadersLarge : public Drawable { } void start() { - dma_display->fillScreen(0); + matrix->fillScreen(0); } unsigned int drawFrame() { - dma_display->fillScreen(0); + matrix->fillScreen(0); CRGB color1 = effects.ColorFromCurrentPalette(random(0, 255)); @@ -138,10 +138,10 @@ class PatternInvadersLarge : public Drawable { color = color1; } - dma_display->fillRect(1 + x * 6, 1 + y * 6, 5 + x * 6, 5 + y * 6, color); + effects.drawBackgroundFastLEDPixelCRGB(1 + x * 6, 1 + y * 6, color); if (x < 2) - dma_display->fillRect(1 + (4 - x) * 6, 1 + y * 6, 5 + (4 - x) * 6, 5 + y * 6, color); + effects.drawBackgroundFastLEDPixelCRGB(1 + (4 - x) * 6, 1 + y * 6, color); } } -- cgit v1.3.1