Move the color enum to under the color definitions
Signed-off-by: 0xf8 <0xf8.dev@proton.me>
This commit is contained in:
parent
28badd6f40
commit
5d6a297295
10
rbtext.c
10
rbtext.c
@ -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
|
||||
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
|
||||
};
|
||||
|
||||
unsigned long long t = 0;
|
||||
void genColors(char *s) {
|
||||
for (int i = 0; i < strlen(s); i++) {
|
||||
enum color c = (((t + i) / COLOR_SKIP) % COLORS);
|
||||
char *cstr = malloc(256*sizeof(char));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user