Move the color enum to under the color definitions

Signed-off-by: 0xf8 <0xf8.dev@proton.me>
This commit is contained in:
0xf8 2023-02-25 12:27:54 -05:00
parent 28badd6f40
commit 5d6a297295
Signed by: 0xf8
GPG Key ID: 446580D758689584
1 changed files with 6 additions and 6 deletions

View File

@ -20,7 +20,7 @@ I DON'T CARE HOW YOU USE OR CONFIGURE THIS PROGRAM.
// BEWARE RICERS
// If you add extra colors make sure to
// a) Add it to the color enum in the genColors function
// a) Add it to the color enum
// b) Add the case to the switch statement in the genColors function
// c) Update the COLORS definition with the new amount of colors
// FORMAT
@ -34,14 +34,14 @@ I DON'T CARE HOW YOU USE OR CONFIGURE THIS PROGRAM.
#define PURPLE "155;71;193"
#define PINK "193;71;153"
#define COLORS 8
// Keep track of how many ticks have gone by
enum color {
red,orange,yellow,green,cyan,blue,purple,pink
};
unsigned long long t = 0;
void genColors(char *s) {
for (int i = 0; i < strlen(s); i++) {
enum color {
red,orange,yellow,green,cyan,blue,purple,pink
};
enum color c = (((t + i) / COLOR_SKIP) % COLORS);
char *cstr = malloc(256*sizeof(char));