@@ -3483,6 +3483,7 @@ uint16_t mode_tetrix(void) {
34833483 if (SEGENV.call == 0 ) {
34843484 drop->stack = 0 ; // reset brick stack size
34853485 drop->step = 0 ;
3486+ if (SEGMENT.check1 ) drop->col = 0 ;// use only one color from palette
34863487 // for (int i=0; i<SEGLEN; i++) SEGMENT.setPixelColor(indexToVStrip(i, stripNr), SEGCOLOR(1)); // will fill virtual strip only
34873488 }
34883489
@@ -3494,7 +3495,7 @@ uint16_t mode_tetrix(void) {
34943495 speed = map (speed, 1 , 255 , 5000 , 250 ); // time taken for full (SEGLEN) drop
34953496 drop->speed = float (SEGLEN * FRAMETIME) / float (speed); // set speed
34963497 drop->pos = SEGLEN; // start at end of segment (no need to subtract 1)
3497- drop->col = random8 (0 ,15 )<<4 ; // limit color choices so there is enough HUE gap
3498+ if (!SEGMENT. check1 ) drop->col = random8 (0 ,15 )<<4 ; // limit color choices so there is enough HUE gap
34983499 drop->step = 1 ; // drop state (0 init, 1 forming, 2 falling)
34993500 drop->brick = (SEGMENT.intensity ? (SEGMENT.intensity >>5 )+1 : random8 (1 ,5 )) * (1 +(SEGLEN>>6 )); // size of brick
35003501 }
@@ -3508,7 +3509,7 @@ uint16_t mode_tetrix(void) {
35083509 if (drop->step == 2 ) { // falling
35093510 if (drop->pos > drop->stack ) { // fall until top of stack
35103511 drop->pos -= drop->speed ; // may add gravity as: speed += gravity
3511- if (uint16_t (drop->pos ) < drop->stack ) drop->pos = drop->stack ;
3512+ if (int (drop->pos ) < int ( drop->stack ) ) drop->pos = drop->stack ;
35123513 for (int i=int (drop->pos ); i<SEGLEN; i++) {
35133514 uint32_t col = i<int (drop->pos )+drop->brick ? SEGMENT.color_from_palette (drop->col , false , false , 0 ) : SEGCOLOR (1 );
35143515 SEGMENT.setPixelColor (indexToVStrip (i, stripNr), col);
@@ -3528,6 +3529,7 @@ uint16_t mode_tetrix(void) {
35283529 } else {
35293530 drop->stack = 0 ; // reset brick stack size
35303531 drop->step = 0 ; // proceed with next brick
3532+ if (SEGMENT.check1 ) drop->col += 8 ; // gradually increase palette index
35313533 }
35323534 }
35333535 }
@@ -3538,7 +3540,7 @@ uint16_t mode_tetrix(void) {
35383540
35393541 return FRAMETIME;
35403542}
3541- static const char _data_FX_MODE_TETRIX[] PROGMEM = " Tetrix@!,Width;!,!;!;;sx=0,ix=0,pal=11,m12=1" ;
3543+ static const char _data_FX_MODE_TETRIX[] PROGMEM = " Tetrix@!,Width,,,,One color ;!,!;!;;sx=0,ix=0,pal=11,m12=1" ;
35423544
35433545
35443546/*
0 commit comments