1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
|
#include "../defs/all.h"
#include "../defs/mikuart.h"
char **getmikuart(int style){
if(style < 0)
style = rand() % migucount;
return mikuart[style];
}
struct win {
int winwidth;
int winheight;
};
static struct win term = {80, 24}; //if the function fails this is the defualt
#ifdef _WIN32
#include <windows.h>
static void getterminalsize(void) {
CONSOLE_SCREEN_BUFFER_INFO info;
HANDLE console = GetStdHandle(STD_OUTPUT_HANDLE);
int found = GetConsoleScreenBufferInfo(console, &info);
SetConsoleOutputCP(CP_UTF8);
if(!found){
HANDLE fallback = CreateFileA("CONOUT$", GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
if(fallback != INVALID_HANDLE_VALUE){
found = GetConsoleScreenBufferInfo(fallback, &info);
CloseHandle(fallback);
}
}
if(found){
term.winwidth = info.srWindow.Right - info.srWindow.Left + 1;
term.winheight = info.srWindow.Bottom - info.srWindow.Top + 1;
}
}
#else
#include <sys/ioctl.h>
#include <unistd.h>
#include <fcntl.h>
static void getterminalsize(void) {
struct winsize size_info;
int tty_descriptor = -1;
int status = ioctl(STDOUT_FILENO, TIOCGWINSZ, &size_info);
if(status != 0){
tty_descriptor = open("/dev/tty", O_RDONLY);
if(tty_descriptor >= 0)
status = ioctl(tty_descriptor, TIOCGWINSZ, &size_info);
}
if(status == 0){
if(size_info.ws_col > 0) term.winwidth = size_info.ws_col;
if(size_info.ws_row > 0) term.winheight = size_info.ws_row;
}
if(tty_descriptor >= 0)
close(tty_descriptor);
}
#endif
#define TERMINALWIDTH term.winwidth
#define TERMINALHEIGHT term.winheight
static int count;
static void freelines(char **lines){
if(!lines) return;
for(int i = 0; lines[i] != NULL; i++)
free(lines[i]);
free(lines);
}
static char **push_chunk(char **chunks, int *count, const char *start, size_t len){
chunks = realloc(chunks, (*count + 2) * sizeof(char *));
chunks[*count] = malloc(len + 1);
memcpy(chunks[*count], start, len);
chunks[*count][len] = '\0';
(*count)++;
chunks[*count] = NULL;
return chunks;
}
char **split_word_by_width(const char *word, int max_width){
char **chunks = NULL;
int count = 0;
size_t length = strlen(word);
size_t start = 0, i = 0;
int chunk_width = 0;
while(i < length){
unsigned long codepoint;
int bytes = utf8_decode((const unsigned char *)word + i, &codepoint);
int width = codepoint_width(codepoint);
if(i > start && chunk_width + width > max_width){
chunks = push_chunk(chunks, &count, word + start, i - start);
start = i;
chunk_width = 0;
}
chunk_width += width;
i += bytes;
}
if(i > start)
chunks = push_chunk(chunks, &count, word + start, i - start);
return chunks;
}
char **wraptext(const char *text, int max, int *count){
char *copy = strdup(text);
char *current_line = calloc(strlen(text)+1, sizeof(char));
char **lines = NULL;
*count = 0;
char *tok = strtok(copy, " \t\n");
while(tok != NULL){
if((size_t)displaywidth(current_line)+(size_t)displaywidth(tok) < (size_t)max){
if(current_line[0] != '\0'){
strcat(current_line, " ");
}
strcat(current_line, tok);
} else{
if(displaywidth(tok) > max){
if(current_line[0] != '\0'){
lines = realloc(lines, (*count + 2) * sizeof(char *));
lines[*count] = strdup(current_line);
(*count)++;
lines[*count] = NULL;
}
char **chunks = split_word_by_width(tok, max);
int n = 0;
while(chunks[n] != NULL) n++;
for(int i = 0; i < n - 1; i++){
lines = realloc(lines, (*count + 2) * sizeof(char *));
lines[*count] = chunks[i];
(*count)++;
lines[*count] = NULL;
}
strcpy(current_line, chunks[n - 1]);
free(chunks[n - 1]);
free(chunks);
} else{
if(current_line[0] != '\0'){
lines = realloc(lines, (*count + 2) * sizeof(char *));
lines[*count] = strdup(current_line);
(*count)++;
lines[*count] = NULL;
}
strcpy(current_line, tok);
}
}
tok = strtok(NULL, " \t\n");
}
if(current_line[0] != '\0'){
lines = realloc(lines, (*count + 2) * sizeof(char *));
lines[*count] = strdup(current_line);
(*count)++;
lines[*count] = NULL;
}
free(copy);
free(current_line);
return lines;
}
#define MAX_BUBBLE_WIDTH 50
#define MIN_BUBBLE_WIDTH 20
char **getbubblelines(char *text){
char **templines = wraptext(text, MAX_BUBBLE_WIDTH - 4, &count);
size_t content_width = 0;
for (int i = 0; templines != NULL && templines[i] != NULL; i++) {
size_t current_len = displaywidth(templines[i]);
if (current_len > content_width)
content_width = current_len;
}
freelines(templines);
int bubble_width = content_width + 4;
if(bubble_width < MIN_BUBBLE_WIDTH) bubble_width = MIN_BUBBLE_WIDTH;
if(bubble_width > MAX_BUBBLE_WIDTH) bubble_width = MAX_BUBBLE_WIDTH;
char **lines = wraptext(text, bubble_width - 4, &count);
const char *top_left = "╭";
const char *top_right = "╮";
const char *bottom_left = "╰";
const char *bottom_right = "╯";
const char *horizontal = "─";
const char *vertical = "│";
char **bubblelines = calloc(count + 5, sizeof(char *));
bubblelines[0] = malloc(strlen(top_left) + strlen(horizontal) * bubble_width + strlen(top_right) + 1);
strcpy(bubblelines[0], top_left);
for (int i = 0; i < bubble_width; i++)
strcat(bubblelines[0], horizontal);
strcat(bubblelines[0], top_right);
for (int i = 0; lines != NULL && lines[i] != NULL; i++) {
int line_width = displaywidth(lines[i]);
int padding_needed = (bubble_width - 2) - line_width;
if (padding_needed < 0) padding_needed = 0;
int left_padding = padding_needed / 2;
int right_padding = padding_needed - left_padding;
bubblelines[i + 1] = malloc(strlen(vertical) * 2 + 2 + strlen(lines[i]) + padding_needed + 1);
sprintf(bubblelines[i + 1], "%s %*s%s%*s %s",vertical, left_padding, "", lines[i], right_padding, "", vertical);
}
bubblelines[count+1] = malloc(strlen(bottom_left) + strlen(horizontal) * bubble_width + strlen(bottom_right) + 1);
strcpy(bubblelines[count+1], bottom_left);
for (int i = 0; i < bubble_width; i++)
strcat(bubblelines[count+1], horizontal);
strcat(bubblelines[count+1], bottom_right);
bubblelines[count + 2] = strdup("\\");
bubblelines[count + 3] = strdup(" \\");
freelines(lines);
return bubblelines;
}
static void print_help(void){
printf("A \"cowsay\" clone with Hatsune Miku ASCII art and speech bubbles.\n\n"
"Usage: mikusays [OPTIONS] [TEXT]\n\n"
"Arguments:\n"
" [TEXT] Text to display in the speech bubble\n\n"
"Options:\n"
" -s, --style <STYLE> Style of the Miku art. A random one is chosen if not specified\n"
" -l, --list List all available art styles with their indices\n"
" --rainbow Apply a smooth rainbow gradient across the ASCII art\n"
" --saturation <SATURATION> Saturation level for rainbow gradient (0-100) [default: 100]\n"
" --brightness <BRIGHTNESS> Brightness level for rainbow gradient (0-100) [default: 50]\n"
" --color <COLOR> Override with a single solid color\n"
" --gradient <START:END> Define a custom two-color gradient (e.g., --gradient red:blue)\n"
" --no-color Disable all coloring (respects NO_COLOR environment variable)\n"
" --color-debug Print color detection/debug info and exit\n"
" -h, --help Print help\n"
" -V, --version Print version\n");
}
static void list_all_art_styles(void){
printf("Available Miku art styles:\n");
printf("==========================\n");
printf("Total styles: %zu\n", migucount);
for(size_t i = 0; i < migucount; i++){
printf("\n--- Style %zu ---\n", i);
for(int j = 0; mikuart[i][j] != NULL; j++)
printf("%s\n", mikuart[i][j]);
}
printf("\nUse --style <number> to select a specific style, or omit for random selection.\n");
printf("\nColor Options:\n"
" --rainbow Apply a smooth rainbow gradient\n"
" --saturation <0-100> Set rainbow saturation level (default: 100)\n"
" --brightness <0-100> Set rainbow brightness level (default: 50)\n"
" --color <COLOR> Set a single solid color (supports named colors, hex, rgb, hsl, ansi)\n"
" --gradient <START:END> Define a custom two-color gradient\n"
" --no-color Disable all coloring\n"
"\nColor Format Examples:\n"
" --color red Named color\n"
" --color #FF0000 Hex color\n"
" --color 255,0,128 RGB tuple\n"
" --color hsl(180,100%%,50%%) HSL value\n"
" --color 93 ANSI color code\n"
" --gradient red:blue Custom gradient\n");
}
static struct colorconfig colors;
static int is_art_space(unsigned long codepoint){
return (codepoint >= 0x09 && codepoint <= 0x0D) || codepoint == 0x20 || codepoint == 0x85 || codepoint == 0xA0
|| codepoint == 0x1680 || (codepoint >= 0x2000 && codepoint <= 0x200A) || codepoint == 0x2028
|| codepoint == 0x2029 || codepoint == 0x202F || codepoint == 0x205F || codepoint == 0x3000;
}
static size_t count_colored_chars(char **art){
size_t total = 0;
for(int i = 0; art[i] != NULL; i++){
const unsigned char *p = (const unsigned char *)art[i];
while(*p){
unsigned long codepoint;
p += utf8_decode(p, &codepoint);
if(!is_art_space(codepoint)) total++;
}
}
return total;
}
static rgbcolor color_for_index(size_t index, size_t total){
if(colors.has_gradient){
float position = total <= 1 ? 0.0f : (float)index / (float)(total - 1);
return lerp_color_hsv(colors.gradient_start, colors.gradient_end, position);
}
return hsl_to_rgb((unsigned short)((float)index / (float)total * 360.0f + 0.5f),
(unsigned char)colors.saturation, (unsigned char)colors.brightness);
}
static void print_art_line(const char *line, size_t *index, size_t total){
char escape[32];
const unsigned char *cursor = (const unsigned char *)line;
int per_character = colors.rainbow_enabled || colors.has_gradient;
if(colors.mode == MODE_NONE || (!per_character && !colors.has_solid_color)){
fputs(line, stdout);
return;
}
if(!per_character){
rgb_to_fg_escape(colors.solid_color, colors.mode, escape, sizeof(escape));
printf("%s%s\x1b[0m", escape, line);
return;
}
while(*cursor){
unsigned long codepoint;
int byte_count = utf8_decode(cursor, &codepoint);
if(is_art_space(codepoint)){
fwrite(cursor, 1, (size_t)byte_count, stdout);
}else{
rgb_to_fg_escape(color_for_index(*index, total), colors.mode, escape, sizeof(escape));
fputs(escape, stdout);
fwrite(cursor, 1, (size_t)byte_count, stdout);
fputs("\x1b[0m", stdout);
(*index)++;
}
cursor += byte_count;
}
}
void draw_miku_says(char *text, int style){
char **speech_bubble_lines = getbubblelines(text);
if(speech_bubble_lines == NULL)
return;
char **miku_art = getmikuart(style);
int available_width = TERMINALWIDTH;
int available_height = TERMINALHEIGHT;
int max_content_width = 0;
for(int i = 0; speech_bubble_lines[i] != NULL; i++){
int width = displaywidth(speech_bubble_lines[i]);
if(width> max_content_width) max_content_width = width;
}
for(int i = 0; miku_art[i] != NULL; i++){
int width = displaywidth(miku_art[i]);
if(width > max_content_width) max_content_width = width;
}
int overall_left_padding;
if(available_width > max_content_width){
overall_left_padding = (available_width - max_content_width) / 2;
}else{
overall_left_padding = 0;
}
int bubble_width = displaywidth(speech_bubble_lines[0]);
const char *first_miku_line = miku_art[0] ? miku_art[0] : "";
int tail_pos = 0;
const char *ptr = first_miku_line;
while (*ptr == ' ') {
ptr += 1;
tail_pos++;
}
int bubble_center = bubble_width / 2;
int miku_tail_absolute_pos = overall_left_padding + tail_pos;
int bubble_left_padding;
if(miku_tail_absolute_pos >= bubble_center){
bubble_left_padding = miku_tail_absolute_pos - bubble_center;
}else{
bubble_left_padding = 0;
}
int bubble_line_count = 0;
for(int i = 0; speech_bubble_lines[i] != NULL; i++){
bubble_line_count++;
}
int art_count = 0;
while(miku_art[art_count] != NULL) art_count++;
char **all_content_lines = calloc(bubble_line_count + art_count + 1, sizeof(char *));
for(int i = 0; i < bubble_line_count; i++)
all_content_lines[i] = speech_bubble_lines[i];
for(int i = 0; i < art_count; i++)
all_content_lines[bubble_line_count + i] = miku_art[i];
int content_height = bubble_line_count + art_count;
int top_padding;
if(content_height < available_height){
top_padding = (available_height - content_height) / 2;
}else{
top_padding = 0;
}
for(int i = 0; i < top_padding; i++){
printf("\n");
}
size_t color_index = 0;
size_t colored_total = count_colored_chars(miku_art);
for(int i = 0; all_content_lines[i] != NULL; i++){
int is_bubble_line = i < bubble_line_count;
int is_tail_line = is_bubble_line && (i == bubble_line_count - 2 || i == bubble_line_count - 1);
int padding;
if(is_tail_line)
padding = overall_left_padding + tail_pos;
else if(is_bubble_line)
padding = bubble_left_padding;
else
padding = overall_left_padding;
if(is_bubble_line){
printf("%*s%s\n", padding, "", all_content_lines[i]);
}else{
printf("%*s", padding, "");
print_art_line(all_content_lines[i], &color_index, colored_total);
putchar('\n');
}
}
for(int i = 0; i < top_padding; i++){
printf("\n");
}
freelines(speech_bubble_lines);
free(all_content_lines);
}
#define COLOR_FORMAT_HELP "expected a named color, #RRGGBB, #RGB, R,G,B, hsl(H,S%%,L%%), or ANSI value 0-255"
static int usage_error(const char *format, ...){
va_list arguments;
va_start(arguments, format);
fputs("error: ", stderr);
vfprintf(stderr, format, arguments);
va_end(arguments);
fputs("\n\nUsage: mikusays [OPTIONS] [TEXT]\n\nFor more information, try '--help'.\n", stderr);
return 2;
}
//returns 1 if argv[*index] is this option; *value stays NULL when the value is missing
static int match_value_option(int argc, char **argv, int *index, const char *long_name,
char short_name, const char **value){
const char *argument = argv[*index];
size_t long_length = strlen(long_name);
*value = NULL;
if(strcmp(argument, long_name) == 0
|| (short_name != '\0' && argument[0] == '-' && argument[1] == short_name && argument[2] == '\0')){
if(*index + 1 < argc){
(*index)++;
*value = argv[*index];
}
return 1;
}
if(strncmp(argument, long_name, long_length) == 0 && argument[long_length] == '='){
*value = argument + long_length + 1;
return 1;
}
if(short_name != '\0' && argument[0] == '-' && argument[1] == short_name && argument[2] != '\0'){
*value = argument + 2;
return 1;
}
return 0;
}
static int parse_percent_option(const char *flag, const char *value, int *destination){
char *end;
long parsed;
if(value == NULL)
return usage_error("a value is required for '%s' but none was supplied", flag);
parsed = strtol(value, &end, 10);
if(*value == '\0' || *end != '\0' || parsed < 0 || parsed > 100)
return usage_error("invalid value '%s' for '%s'", value, flag);
*destination = (int)parsed;
return 0;
}
static int parse_gradient(const char *specification, rgbcolor *start, rgbcolor *end){
const char *separator = strchr(specification, ':');
char start_text[64];
size_t start_length;
ColorParseError error;
if(separator == NULL)
return usage_error("invalid gradient: expected START:END (for example, red:blue)");
start_length = (size_t)(separator - specification);
if(start_length == 0 || separator[1] == '\0' || strchr(separator + 1, ':') != NULL)
return usage_error("invalid gradient: expected exactly two colors as START:END");
if(start_length >= sizeof(start_text))
return usage_error("invalid gradient start: %s; " COLOR_FORMAT_HELP,
color_parse_error_message(COLOR_ERR_FORMAT));
memcpy(start_text, specification, start_length);
start_text[start_length] = '\0';
error = parse_color(start_text, start);
if(error != COLOR_OK)
return usage_error("invalid gradient start '%s': %s; " COLOR_FORMAT_HELP,
start_text, color_parse_error_message(error));
error = parse_color(separator + 1, end);
if(error != COLOR_OK)
return usage_error("invalid gradient end '%s': %s; " COLOR_FORMAT_HELP,
separator + 1, color_parse_error_message(error));
return 0;
}
int main(int argc, char **argv){
long style = -1; //-1 means random
int index, result = 0, list_requested = 0, color_debug = 0, no_color = 0;
int has_text = 0, options_ended = 0, ansi_enabled = 0;
const char *value, *color_text = NULL, *gradient_text = NULL;
ColorParseError color_error;
size_t length = 0;
char *text;
srand(time(NULL));
getterminalsize();
colorconfig_init(&colors);
for(index = 1; index < argc; index++)
length += strlen(argv[index]);
text = malloc(length + (size_t)argc);
if(!text) return 1;
*text = '\0';
for(index = 1; index < argc; index++){
const char *argument = argv[index];
if(!options_ended && strcmp(argument, "--") == 0){
options_ended = 1;
} else if(options_ended || argument[0] != '-' || argument[1] == '\0'){
strcat(text, argument);
strcat(text, " ");
has_text = 1;
} else if(strcmp(argument, "-h") == 0 || strcmp(argument, "--help") == 0){
print_help();
goto out;
} else if(strcmp(argument, "-V") == 0 || strcmp(argument, "--version") == 0){
printf("mikusays " VERSION "\n");
goto out;
} else if(strcmp(argument, "-l") == 0 || strcmp(argument, "--list") == 0){
list_requested = 1;
} else if(strcmp(argument, "--no-color") == 0){
no_color = 1;
colors.mode = MODE_NONE;
}else if(strcmp(argument, "--rainbow") == 0){
colors.rainbow_enabled = true;
} else if(strcmp(argument, "--color-debug") == 0){
color_debug = 1;
} else if(match_value_option(argc, argv, &index, "--style", 's', &value)){
char *end;
long parsed;
if(value == NULL){
result = usage_error("a value is required for '--style <STYLE>' but none was supplied");
goto out;
}
parsed = strtol(value, &end, 10);
if(*value == '\0' || *end != '\0'){
result = usage_error("invalid value '%s' for '--style <STYLE>': invalid digit found in string", value);
goto out;
}
if(parsed < 0){
result = usage_error("invalid value '%s' for '--style <STYLE>': %ld is not in 0..2147483647", value, parsed);
goto out;
}
style = parsed;
} else if(match_value_option(argc, argv, &index, "--color", '\0', &value)){
if(value == NULL){
result = usage_error("a value is required for '--color <COLOR>' but none was supplied");
goto out;
}
color_text = value;
} else if(match_value_option(argc, argv, &index, "--gradient", '\0', &value)){
if(value == NULL){
result = usage_error("a value is required for '--gradient <START:END>' but none was supplied");
goto out;
}
gradient_text = value;
} else if(match_value_option(argc, argv, &index, "--saturation", '\0', &value)){
result = parse_percent_option("--saturation <SATURATION>", value, &colors.saturation);
if(result) goto out;
} else if(match_value_option(argc, argv, &index, "--brightness", '\0', &value)){
result = parse_percent_option("--brightness <BRIGHTNESS>", value, &colors.brightness);
if(result) goto out;
} else {
result = usage_error("unexpected argument '%s' found", argument);
goto out;
}
}
if(colors.rainbow_enabled && color_text){
result = usage_error("the argument '--rainbow' cannot be used with '--color <COLOR>'");
goto out;
}
if(colors.rainbow_enabled && gradient_text){
result = usage_error("the argument '--rainbow' cannot be used with '--gradient <START:END>'");
goto out;
}
if(color_text && gradient_text){
result = usage_error("the argument '--color <COLOR>' cannot be used with '--gradient <START:END>'");
goto out;
}
if(list_requested){
list_all_art_styles();
goto out;
}
if(!has_text){
fprintf(stderr, "Error: Text is required when not using --list\n");
result = 1;
goto out;
}
if(style >= (long)migucount){
result = usage_error("style %ld does not exist; choose a value between 0 and %lu",
style, (unsigned long)(migucount - 1));
goto out;
}
if(color_text){
color_error = parse_color(color_text, &colors.solid_color);
if(color_error != COLOR_OK){
result = usage_error("invalid color '%s': %s; " COLOR_FORMAT_HELP,
color_text, color_parse_error_message(color_error));
goto out;
}
colors.has_solid_color = true;
}
if(gradient_text){
result = parse_gradient(gradient_text, &colors.gradient_start, &colors.gradient_end);
if(result) goto out;
colors.has_gradient = true;
}
#ifdef _WIN32
ansi_enabled = !no_color && enable_windows_ansi();
#endif
if(color_debug){
print_color_debug(&colors, ansi_enabled != 0);
goto out;
}
draw_miku_says(text, (int)style);
//i didn't know you could do labels like in assembly (nasm) this is very useful knowledge
out:
free(text);
return result;
} //ooooo 666 lines spookyyy evillll
|