commit aa65eb5
0uppy
·
2026-07-28 22:43:38 +0000 UTC
parent 8201e4e
cotton v0.2a - revised the current cottolette a bit (also now its 8 colours big instead of 7)
3 files changed,
+36,
-32
+15,
-15
1@@ -1,16 +1,16 @@
2-color black
3-print "hi im dani, wish you could read this"
4-color white
5-print "text above is in black, hence why you dont see it"
6-color geen
7-print "chld was right we needed green"
8-color rey
9-print "rey,, its like,, grey,, but no g,,"
10-color wist
11-print "this is wist, i like this color"
12+color blabla
13+print "hallo this is" /n
14+color whie
15+print "a showcase cot file" /n
16+color lav
17+print "to show YOU" /n
18 color wink
19-print "this is wink, i like this color too"
20-color laven
21-print "im running out of ideas on what to say"
22-color white
23-print "back to normal!! :D"
24+print "cotton's slightly new" /n
25+color sink
26+print "cottolette,..," /n
27+color wist
28+print "i hope yuo guys liek it" /n
29+color yebow
30+print "thats it" /n
31+color geen
32+print "geen" /n
+10,
-9
1@@ -7,22 +7,22 @@
2 #define VIDEO_WIDTH 250
3 #define VIDEO_HEIGHT 200
4
5-#define COTTOLETTE_SIZE 7 // would be 6 but due to high demand we invited green into the mix because green is cool <3
6+#define COTTOLETTE_SIZE 8
7
8 #define VARS 32 // i think this is enough,, not like cot programs can be that complex rn anyway :P
9 #define VAR_NAME_LEN 16
10 #define VAR_VAL_LEN 32
11
12-// i might work on better names another time xP
13 static const uint32_t
14 COTTOLETTE[COTTOLETTE_SIZE] = {
15- 0xFF000000, // 0 - black
16- 0xFFFFFFFF, // 1 - white
17- 0xFF28262C, // 2 - rey
18- 0xFFA9A0CF, // 3 - wist
19- 0xFFE4D8FD, // 4 - wink
20- 0xFFF9F5FF, // 5 - laven
21- 0xFFD0F0C0, // 6 - the dude nobody invited (geen)
22+ 0xFF1C1C1C, // 0 - blabla
23+ 0xFFFAFAFA, // 1 - whie
24+ 0xFFECE3FF, // 2 - lav
25+ 0xFFE4D8FD, // 3 - wink
26+ 0xFFD4C5F5, // 4 - sink
27+ 0xFFA9A0CF, // 5 - wist
28+ 0xFFFFFBDA, // 6 - yebow (random kid)
29+ 0xFFD0F0C0 // 7 - geen (the (first) dude nobody invited)
30 };
31
32 typedef struct
33@@ -56,3 +56,4 @@ void cotton_store_var
34 (Cotton *cotton, const char *name, const char *value);
35
36 #endif
37+
+11,
-8
1@@ -192,33 +192,36 @@ cmd_clear(Cotton *cotton, CottonWindow *cw)
2 cottonwindow_update(cw, cotton->video, sizeof(cotton->video[0]) * VIDEO_WIDTH);
3 }
4
5-static void
6+static void
7 cmd_color(Cotton *cotton, char *arg)
8 {
9 if (!arg)
10 return;
11
12- if (strcmp(arg, "black") == 0)
13+ if (strcmp(arg, "blabla") == 0)
14 cotton->c_cottolette = COTTOLETTE[0];
15
16- else if (strcmp(arg, "white") == 0)
17+ else if (strcmp(arg, "whie") == 0)
18 cotton->c_cottolette = COTTOLETTE[1];
19
20- else if (strcmp(arg, "rey") == 0)
21+ else if (strcmp(arg, "lav") == 0)
22 cotton->c_cottolette = COTTOLETTE[2];
23
24- else if (strcmp(arg, "wist") == 0)
25+ else if (strcmp(arg, "wink") == 0)
26 cotton->c_cottolette = COTTOLETTE[3];
27
28- else if (strcmp(arg, "wink") == 0)
29+ else if (strcmp(arg, "sink") == 0)
30 cotton->c_cottolette = COTTOLETTE[4];
31
32- else if (strcmp(arg, "laven") == 0)
33+ else if (strcmp(arg, "wist") == 0)
34 cotton->c_cottolette = COTTOLETTE[5];
35
36- else if (strcmp(arg, "geen") == 0)
37+ else if (strcmp(arg, "yebow") == 0)
38 cotton->c_cottolette = COTTOLETTE[6];
39
40+ else if (strcmp(arg, "geen") == 0)
41+ cotton->c_cottolette = COTTOLETTE[7];
42+
43 else
44 fprintf(stderr, "cot syntax error: cotton doesn't know the color \"%s\" sorry,, :(\n", arg);
45 }