aboutsummaryrefslogtreecommitdiff
path: root/examples/AuroraDemo/PatternInvaders.h
diff options
context:
space:
mode:
authormrcodetastic <12006953+mrcodetastic@users.noreply.github.com>2024-07-28 22:00:45 +0100
committermrcodetastic <12006953+mrcodetastic@users.noreply.github.com>2024-07-28 22:00:45 +0100
commitf2634319ab7ebfe22fc6d2ebabcdd27879f3667e (patch)
treed8834f64f0dc4349bf34cf29a6831a12063b1435 /examples/AuroraDemo/PatternInvaders.h
parentaa28e2a93baaf90083b2d556c0ac80602d9940aa (diff)
Clean-up and fix some examples
Diffstat (limited to 'examples/AuroraDemo/PatternInvaders.h')
-rw-r--r--examples/AuroraDemo/PatternInvaders.h16
1 files changed, 8 insertions, 8 deletions
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);
}
}