Laufschrift: Ring rückwärts belegen, sie war spiegelverkehrt
Am Würfel läuft ringPos von außen gesehen von rechts nach links. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cb0cccb99c
commit
aaef550c1a
2 files changed
+8
-6
No files matched your search
+5
-4
@@ -136,9 +136,10 @@ static uint8_t textHue; // Farbverlauf für rainbow()
|
||||
static CRGB solid(uint16_t) { return textColor; }
|
||||
static CRGB rainbow(uint16_t col) { return CHSV(textHue + col * 6, 240, highlight); }
|
||||
|
||||
// Zeichnet die Textspalten ab "first" einmal rund um die 16 Randsäulen. ringPos
|
||||
// läuft von oben gesehen gegen den Uhrzeigersinn, also auf jeder Seite von außen
|
||||
// gesehen von links nach rechts; mit wachsendem "first" wandert die Schrift nach links.
|
||||
// Zeichnet die Textspalten ab "first" einmal rund um die 16 Randsäulen. Am echten
|
||||
// Würfel läuft ringPos auf jeder Seite von außen gesehen von rechts nach links
|
||||
// (geprüft: vorwärts belegt war die Schrift spiegelverkehrt), deshalb wird der Ring
|
||||
// rückwärts belegt; mit wachsendem "first" wandert die Schrift nach links.
|
||||
// period > 0: Text wiederholt sich; period = 0: nur einmal.
|
||||
static void drawText(int32_t first, uint16_t period, CRGB (*paint)(uint16_t col)) {
|
||||
for (uint8_t i = 0; i < 16; i++) {
|
||||
@@ -146,7 +147,7 @@ static void drawText(int32_t first, uint16_t period, CRGB (*paint)(uint16_t col)
|
||||
if (period) c = (c % period + period) % period;
|
||||
if (c < 0 || c >= textLen || !textCols[c]) continue;
|
||||
uint8_t x, y;
|
||||
ringPos(i, x, y);
|
||||
ringPos(15 - i, x, y);
|
||||
CRGB color = paint(c);
|
||||
for (uint8_t row = 0; row < 5; row++)
|
||||
if (textCols[c] >> row & 1) at(x, y, TOP - row) = color;
|
||||
|
||||
Reference in new issue
Block a user