aboutsummaryrefslogtreecommitdiffstats
path: root/src/fuvst/image.c
blob: 414715ad4ec021048960a3ef697ff213f61b1ae6 (plain)
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
#include <stdio.h>
#include <string.h>
#include "../libmobile/image.h"

const char *image[] = {
	"",
	"@K      ___.   @M._____.@K     _.",
	"@K     /  \\|   @M|/ | \\|@K     \\|",
	"@K    |        @M   |  @K  __   |     @W         * FuVSt *",
	"@K [] |      []@M   |  @K /__\\  | []  @K      A CNetz @MMSC@K for",
	"@K    |        @M   |  @K|      |     @K    a real Base Station",
	"@K     \\___/   @M  _|_ @K \\__/ _|_",
	"",
	NULL
};

void print_image(void)
{
	int i, j;

	for (i = 0; image[i]; i++) {
		for (j = 0; j < (int)strlen(image[i]); j++) {
			if (image[i][j] == '@') {
				j++;
				switch(image[i][j]) {
				case 'k': /* black */
					printf("\033[0;30m");
					break;
				case 'r': /* red */
					printf("\033[0;31m");
					break;
				case 'g': /* green */
					printf("\033[0;32m");
					break;
				case 'y': /* yellow */
					printf("\033[0;33m");
					break;
				case 'b': /* blue */
					printf("\033[0;34m");
					break;
				case 'm': /* magenta */
					printf("\033[0;35m");
					break;
				case 'c': /* cyan */
					printf("\033[0;36m");
					break;
				case 'w': /* white */
					printf("\033[0;37m");
					break;
				case 'K': /* bright black */
					printf("\033[1;30m");
					break;
				case 'R': /* bright red */
					printf("\033[1;31m");
					break;
				case 'G': /* bright green */
					printf("\033[1;32m");
					break;
				case 'Y': /* bright yellow */
					printf("\033[1;33m");
					break;
				case 'B': /* bright blue */
					printf("\033[1;34m");
					break;
				case 'M': /* bright magenta */
					printf("\033[1;35m");
					break;
				case 'C': /* bright cyan */
					printf("\033[1;36m");
					break;
				case 'W': /* bright white */
					printf("\033[1;37m");
					break;
				}
			} else
				printf("%c", image[i][j]);
		}
		printf("\n");
	}
	printf("\033[0;39m");
}