annotate basedtermgrx.h @ 19:8fe0b5711413

Added BasedTremGrx and Dvorak
author VilyaemKenyaz
date Wed, 27 Sep 2023 01:47:28 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
1 /*********************************************
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
2 * Description - Based Term Grx
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
3 * Modified for use with Harelet.
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
4 * Author - William King
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
5 * Date - Sep 13 2023
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
6 * *******************************************/
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
7
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
8 #include <string.h>
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
9
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
10 //Always have a 2:1 ratio if you want a square picture
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
11 //Terminals are vertically stretched
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
12 #define RESX 98
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
13 #define RESY 48
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
14
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
15 //Center X & Y
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
16 #define CX 49
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
17 #define CY 24
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
18
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
19 //Colours
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
20 #define BLACK "\x1b[30m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
21 #define RED "\x1b[31m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
22 #define GREEN "\x1b[32m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
23 #define YELLOW "\x1b[33m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
24 #define BLUE "\x1b[34m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
25 #define MAGENTA "\x1b[35m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
26 #define CYAN "\x1b[36m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
27 #define WHITE "\x1b[37m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
28
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
29 #define IBLACK "\x1b[30;1m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
30 #define IRED "\x1b[31;1m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
31 #define IGREEN "\x1b[32;1m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
32 #define IYELLOW "\x1b[33;1m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
33 #define IBLUE "\x1b[34;1m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
34 #define IMAGENTA "\x1b[35;1m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
35 #define ICYAN "\x1b[36;1m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
36 #define IWHITE "\x1b[37;1m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
37
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
38 #define BGC_BLACK "\x1b[40m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
39 #define BGC_RED "\x1b[41m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
40 #define BGC_GREEN "\x1b[42m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
41 #define BGC_YELLOW "\x1b[43m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
42 #define BGC_BLUE "\x1b[44m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
43 #define BGC_MAGENTA "\x1b[45m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
44 #define BGC_CYAN "\x1b[46m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
45 #define BGC_WHITE "\x1b[47m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
46
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
47 #define BGC_IBLACK "\x1b[40;1m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
48 #define BGC_IRED "\x1b[41;1m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
49 #define BGC_IGREEN "\x1b[42;1m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
50 #define BGC_IYELLOW "\x1b[43;1m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
51 #define BGC_IBLUE "\x1b[44;1m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
52 #define BGC_IMAGENTA "\x1b[45;1m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
53 #define BGC_ICYAN "\x1b[46;1m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
54 #define BGC_IWHITE "\x1b[47;1m"
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
55
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
56 char screen[RESY][RESX];
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
57
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
58
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
59 /*********************************************
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
60 * Description - Clear the screen
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
61 * Author - William King
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
62 * Date - Sep 13 2023
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
63 * *******************************************/
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
64 void ClrScr(){
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
65 //printf("\x1b[2J");
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
66 for(int i = 0; i != 32;i++)
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
67 puts("");
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
68
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
69 for(int i = 0; i != RESY; i++){
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
70
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
71 for(int j = 0; j != RESX; j++){
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
72
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
73 screen[i][j] = ' ';
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
74
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
75 }
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
76
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
77
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
78 }
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
79
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
80
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
81 }
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
82
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
83 /*********************************************
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
84 * Description - Render all the cells to the screen, splashing
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
85 * Author - William King
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
86 * Date - Sep 13 2023
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
87 * *******************************************/
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
88 void Splash(){
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
89 puts("");
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
90 for(int i = 0; i != RESY; i++){
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
91
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
92 for(int j = 0; j != RESX; j++){
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
93
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
94 printf("%c",screen[j][i]);
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
95
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
96 }
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
97
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
98 puts("");
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
99
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
100 }
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
101
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
102
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
103 }
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
104
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
105 /*********************************************
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
106 * Description - Put a character onto the screen
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
107 * Author - William King
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
108 * Date - Sep 13 2023
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
109 * *******************************************/
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
110 void DrawChar(int x, int y, char content){
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
111 //Make sure it's in the screen
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
112 assert(x <= RESX && y <= RESY);
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
113
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
114 screen[x][y] = content;
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
115 }
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
116
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
117 /*********************************************
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
118 * Description - Put a string onto the screen
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
119 * Author - William King
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
120 * Date - Sep 13 2023
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
121 * *******************************************/
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
122 void DrawString(int x, int y, char str[128]){
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
123
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
124 //Make sure origin is in the screen
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
125 assert(x <= RESX || y <= RESY);
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
126
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
127 //Make sure the string wont run off the screen
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
128 assert(x + strlen(str) <= RESX);
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
129
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
130 for(int i; i != strlen(str);i++){
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
131
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
132 DrawChar(x+i,y,str[i]);
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
133
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
134 }
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
135
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
136
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
137 }
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
138
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
139
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
140 /*********************************************
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
141 * Description - Draw a square
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
142 * Author - William King
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
143 * Date - Sep 13 2023
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
144 * *******************************************/
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
145 void DrawSquare(int x, int y, int length, char fill){
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
146
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
147 //Make sure shape is not ridiculous
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
148 assert(x <= RESX && y <= RESY);
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
149 assert(x+length <= RESX && y+length <= RESY);
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
150
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
151 for(int i = 0; i != length;i++){
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
152
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
153 int j = 0;
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
154 while (j != 0){
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
155 DrawChar(x+j,y+i,fill);
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
156 j++;
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
157 }
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
158
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
159 }
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
160
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
161
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
162 }
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
163
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
164
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
165 /*********************************************
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
166 * Description - Fill the entire screen with a character
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
167 * Author - William King
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
168 * Date - Sep 15 2023
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
169 * *******************************************/
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
170 void DrawFill(char fill){
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
171 for(int i = 0; i != RESY; i++){
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
172 for(int j = 0; j != RESX; j++){
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
173 screen[i][j] = fill;
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
174
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
175 }
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
176 }
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
177
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
178 }
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
179
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
180
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
181
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
182 /*********************************************
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
183 * Description - Set the colour
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
184 * Author - William King
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
185 * Date - Sep 13 2023
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
186 * *******************************************/
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
187 void SetColour(char * colour){
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
188 printf("%s",colour);
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
189 }
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
190
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
191
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
192 /*********************************************
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
193 * Description - Reset the colour
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
194 * Author - William King
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
195 * Date - Sep 13 2023
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
196 * *******************************************/
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
197 void ResetColour(char * colour){
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
198 printf("\x1b[0m");
8fe0b5711413 Added BasedTremGrx and Dvorak
VilyaemKenyaz
parents:
diff changeset
199 }