diff options
| author | mrcodetastic <12006953+mrcodetastic@users.noreply.github.com> | 2024-07-28 22:00:45 +0100 |
|---|---|---|
| committer | mrcodetastic <12006953+mrcodetastic@users.noreply.github.com> | 2024-07-28 22:00:45 +0100 |
| commit | f2634319ab7ebfe22fc6d2ebabcdd27879f3667e (patch) | |
| tree | d8834f64f0dc4349bf34cf29a6831a12063b1435 /examples/AuroraDemo/PatternSnake.h | |
| parent | aa28e2a93baaf90083b2d556c0ac80602d9940aa (diff) | |
Clean-up and fix some examples
Diffstat (limited to 'examples/AuroraDemo/PatternSnake.h')
| -rw-r--r-- | examples/AuroraDemo/PatternSnake.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/AuroraDemo/PatternSnake.h b/examples/AuroraDemo/PatternSnake.h index e25756f..00895ab 100644 --- a/examples/AuroraDemo/PatternSnake.h +++ b/examples/AuroraDemo/PatternSnake.h @@ -80,16 +80,16 @@ private: void move() { switch (direction) { case UP: - pixels[0].y = (pixels[0].y + 1) % MATRIX_HEIGHT; + pixels[0].y = (pixels[0].y + 1) % VPANEL_H; break; case LEFT: - pixels[0].x = (pixels[0].x + 1) % MATRIX_WIDTH; + pixels[0].x = (pixels[0].x + 1) % VPANEL_W; break; case DOWN: - pixels[0].y = pixels[0].y == 0 ? MATRIX_HEIGHT - 1 : pixels[0].y - 1; + pixels[0].y = pixels[0].y == 0 ? VPANEL_H - 1 : pixels[0].y - 1; break; case RIGHT: - pixels[0].x = pixels[0].x == 0 ? MATRIX_WIDTH - 1 : pixels[0].x - 1; + pixels[0].x = pixels[0].x == 0 ? VPANEL_W - 1 : pixels[0].x - 1; break; } } |
