You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
elseif (!overlayBG) SEGMENT.setPixelColorXY(x,y, allColors ? RGBW32(bgColor.r, bgColor.g, bgColor.b, 0) : bgColor); // set background color if not overlaying
5216
+
elseif (!overlayBG) SEGMENT.setPixelColorXY(x,y, bgColor); // set background color if not overlaying
5217
5217
}
5218
5218
memcpy(futureCells, cells, dataSize);
5219
5219
@@ -5234,7 +5234,7 @@ uint16_t mode_2Dgameoflife(void) { // Written by Ewoud Wijma, inspired by https:
elseif (!alive && !overlayBG) SEGMENT.setPixelColorXY(x,y, cellColor);// Redraw dead cells for default overlayFG
5254
5254
}
5255
5255
5256
5256
if (SEGENV.step > strip.now || strip.now - SEGENV.step < 1000 / (uint32_t)map(SEGMENT.speed,0,255,1,64)) return FRAMETIME; //skip if not enough time has passed (1-64 updates/sec)
@@ -5264,7 +5264,7 @@ uint16_t mode_2Dgameoflife(void) { // Written by Ewoud Wijma, inspired by https:
5264
5264
for (int x = 0; x < cols; x++) for (int y = 0; y < rows; y++) {
5265
5265
byte neighbors = 0;
5266
5266
byte colorCount = 0; //track number of valid colors
5267
-
CRGB nColors[3]; // track 3 colors, dying cells may overwrite but this wont be used
5267
+
uint32_t nColors[3]; // track 3 colors, dying cells may overwrite but this wont be used
5268
5268
5269
5269
for (int i = -1; i <= 1; i++) for (int j = -1; j <= 1; j++) { // iterate through 3*3 matrix
5270
5270
if (i == 0 && j == 0) continue; // ignore itself
@@ -5295,29 +5295,28 @@ uint16_t mode_2Dgameoflife(void) { // Written by Ewoud Wijma, inspired by https:
5295
5295
cellChanged = true;
5296
5296
setBitValue(futureCells, cIndex, false);
5297
5297
// Blur/turn off dying cells
5298
-
if (!overlayBG) SEGMENT.setPixelColorXY(x,y, blend(SEGMENT.getPixelColorXY(x,y), bgColor, bgBlendMode ? bgBlur : blur));
5298
+
if (!overlayBG) SEGMENT.setPixelColorXY(x,y, color_blend(SEGMENT.getPixelColorXY(x,y), bgColor, bgBlendMode ? bgBlur : blur));
5299
5299
}
5300
5300
elseif (!(cellValue) && (neighbors == 3)) {
5301
5301
// Reproduction
5302
5302
setBitValue(futureCells, cIndex, true);
5303
5303
cellChanged = true;
5304
5304
// find dominant color and assign it to a new born cell no longer storing colors, if parent dies the color is lost
0 commit comments