Creeper original look

This commit is contained in:
Patrick Haßel 2025-01-20 14:47:18 +01:00
parent ad16660716
commit 4f9fe2a24d
2 changed files with 13 additions and 12 deletions

View File

@ -213,19 +213,20 @@ public:
// TODO REMOVE QUICK & DIRTY
uint8_t printCreeper(uint8_t xPos, uint8_t yPos) {
const auto creeperBlink = doCreeperBlink();
Color sym[7][7] = {
{X, X, X, X, X, X, X},
{X, _, _, X, _, _, X},
{X, _, _, X, _, _, X},
{X, X, X, X, X, X, X},
{X, X, _, _, _, X, X},
{X, X, _, X, _, X, X},
{X, X, X, X, X, X, X},
bool sym[8][8] = {
{X, X, X, X, X, X, X, X},
{X, X, X, X, X, X, X, X},
{X, _, _, X, X, _, _, X},
{X, _, _, X, X, _, _, X},
{X, X, X, _, _, X, X, X},
{X, X, _, _, _, _, X, X},
{X, X, _, _, _, _, X, X},
{X, X, _, X, X, _, X, X},
};
for (int y = 0; y < countof(sym); ++y) {
for (int x = 0; x < countof(sym[0]); ++x) {
if (creeperBlink && ((x == 1 || x == 2) && y == 1)) {
set(xPos + x, yPos + y, BLACK);
if (creeperBlink && ((x == 1 || x == 2) && y == 2)) {
set(xPos + x, yPos + y, GREEN);
} else {
set(xPos + x, yPos + y, sym[y][x] ? GREEN : BLACK);
}

View File

@ -277,9 +277,9 @@ private:
x += display.printI(x, 1, WHITE);
x += 1;
x += display.print(x, 1,SYMBOL_L, WHITE, true);
x += 4;
x += 3;
x += display.print(x, 1, 5, WHITE, true);
x += 2;
x += 3;
display.printCreeper(x, 0);
} else {
uint8_t x = 8;