-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
403 lines (389 loc) · 31.7 KB
/
index.html
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
<!-- saved from url=(0061)https://ro-s-web-p-02.registrar.ualberta.ca/connect/index.php -->
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<noscript>
<meta http-equiv="refresh" content="0;url=noscript.html">
</noscript>
<title>GLIR</title>
<script src="css_files/jquery.min.js"></script>
<script src="css_files/jquery-ui.min.js"></script>
<script src="css_files/bootstrap.min.js"></script>
<script src="css_files/main.js"></script>
<link href="css_files/bootstrap.min.css" rel="stylesheet">
<link href="css_files/custom.css" rel="stylesheet">
<link href="css_files/font-awesome.min.css" rel="stylesheet">
<link href="css_files/jquery-ui.min.css" rel="stylesheet">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!--
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
-->
</head>
<body style="margin: 1rem">
<div class="banner container-fluid">
<div class="container text-center banner-logo"><a href="http://www.ualberta.ca/"><img src="css_files/logo-reverse.png"></a>
</div>
</div>
<div class="container-fluid">
<h1 class="greentext"><strong>GLIR - <span style="text-decoration: underline;">G</span>raphics <span style="text-decoration: underline;">LI</span>brary for <span style="text-decoration: underline;">R</span>ISC-V</strong></h1>
<p><small>Created for the University of Alberta CMPUT 229 Computer Architecture course</small></p>
<p><small>Author: Austin Crapo, June 2017</small></p>
<p><small>Converted for RISC-V: Taylor Zowtuk, May 2019</small></p>
<hr />
<h2 class="greentext">Information</h2>
<p>GLIR is a collection of subroutines to emulate graphics and it is meant for use with the Xfce Terminal Emulator. GLIR can be run by using either RARS (master branch) or Freedom Studio (FreedomStudio branch). Although most UNIX-system terminals will work, the Xfce terminal was the only used for extensive testing during development (tests/examples also appear to work using GNOME Terminal). The true requirement is that the terminal emulator be <a href="https://invisible-island.net/xterm/ctlseqs/ctlseqs.html">DEC VT220</a> compliant. If the terminal emulator is not compliant GLIR subroutines will produce a bunch of garbled text. The purpose of GLIR is to abstract away the <a href="https://en.wikipedia.org/wiki/ANSI_escape_code">terminal escape sequences</a> into an organized library that allows beginner assembly programmers to include visual elements in their work. GLIR has been modified from the original <a href="https://github.com/cmput229/GLIM">GLIM library</a> to be used with the RISC-V ISA.</p>
<h2 class="greentext">Access to the Code</h2>
<p>The source code for GLIR can be found at: <a href="https://github.com/cmput229/GLIR">https://github.com/cmput229/GLIR</a>.</p>
<h2 class="greentext">Access to the API Reference</h2>
<p>Some high-level library useage is presented here; for a list of all public subroutines and their useage/requirements, refer to GLIR's reference at: <a href="docs/reference.html">https://cmput229.github.io/GLIR/docs/reference</a>.</p>
<h2 class="greentext">License</h2>
<p>GLIR is free to use, available under the MIT license. Attribution under this license is not required, but always appreciated.</p>
<h2 class="greentext">Dependencies</h2>
<p>GLIR requires a DEC VT220 compliant terminal and RARS (a RISC-V simulator) to run. On Ubuntu we can install an Xfce-terminal using the command <code>sudo apt-get install xfce4-terminal</code>. RARS requires at least Java 8 to run which we can install using the command <code>sudo apt-get install default-jdk</code>. Lastly, we can get RARS by going to the <a href="https://github.com/TheThirdOne/rars/releases">RARS github page</a> and downloading the latest rars.jar release.</p>
<h2 class="greentext">Usage</h2>
<p>This session discusses how to start GLIR, the conceptual architecture, how the screen is updated, and support for colors.</p>
<h3 class="greentext">Starting GLIR</h3>
<p>Before you call any of the GLIR printing routines you must call the following routine:</p>
<p><code>jal ra, GLIR_Start<br /></code></p>
<p>This helper subroutine resizes the screen (see input arguments), hides the cursor (which otherwise will interfere with printing), and clears the terminal to the default background color.</p>
<p>When your program finishes, and if you had started GLIR, then call the following:</p>
<p><code>jal ra, GLIR_End<br /></code></p>
<p><code>GLIR_End</code> undoes most changes so that the terminal window is not left unusable when your program exits. Unfortunately <code>GLIR_End</code> cannot resize the window back to its original size because at the moment there is no method to read and store the terminal size at the start of the program.</p>
<h3 class="greentext">Conceptual Architecture</h3>
<p>The main device in GLIR is the terminal window which contains a certain number of rows and columns. These are referred to throughout the documentation as Rows and Cols or (R, C).</p>
<p><img src="Resources/RowsCols.png" alt="If you stare at the space between the boxes long enough you'll probably see an optical illusion" /></p>
<p>The tuple describing a position on the grid is (R, C) and not (C, R). <strong>Remember this.</strong> Terminals were designed to print text top to bottom, left to right. Their underlying control structures are built on this assumption. Thus the row number comes before the column number. The origin <code>(0, 0)</code> is at the top left of the terminal window: </p>
<p><img src="Resources/GridAlignment.png" alt="If you think this is confusing, imagine the confusion trying to program the library while transforming coords each time, the overhead would be awful and the bugs many." /></p>
<p>The screen above is a square grid, but terminals and fonts are not square (even if they are monospace), thus a square grid renders a rectangular shape.</p>
<h3 class="greentext" id="screenupdates">Screen Updates</h3>
<p>The terminal display that you access with GLIR should be treated as a write-only persistent array. Thus, you can 'push' updates to the screen, but you cannot revert them, you cannot see if they were successful, and you cannot make decisions based on the screen state. Instead, the best method to use GLIR is to keep your own data structure representing the screen, then when a change needs to be made to that data structure, you can make a corresponding change in the screen by 'pushing' updates to it.</p>
<p>There are two main ways to handle the synchronization between your own data structure and GLIR. Depending on what you are trying to accomplish one will be preferable over the other, but the second is much better practice and more versatile.</p>
<h4 class="greentext">Method 1 - Clear and Refresh</h4>
<p>This is the brute force method. Each time any updates need to happen, you clear the entire screen (using <code>GLIR_ClearScreen</code>). Then you iterate over your data structure and use <code>GLIR_PrintString</code> to print each element of the display again.</p>
<p>Drawbacks: less built-in subroutine color support, if you need to reprint too often or have too many elements that need printing your screen will flicker uncomfortably. This is because clearing the terminal is very slow (it only requires one command), but printing requires that about 20 characters be printed for each tile you need to print on the screen. A monitor however refreshes very fast. So your monitor is likely to refresh at least once after you have cleared, but before you are done printing all the elements, causing the flicker.</p>
<p>Advantage: quick to setup for testing purposes so you can focus on getting the underlying code working.</p>
<p>Resources: see the <code>GLIR_ClearScreen</code> and <code>GLIR_PrintString</code> subroutines.</p>
<h4 class="greentext" id="batchprinting">Method 2 - Batch and Release</h4>
<p>This method focuses on calculating changes that need to be made to the screen, and then printing them. When your underlying data-structure representing the screen is changed, you add the changes to a list. When you have enough changes, or when you are finished calculations or ready to print, you then print all the updates at once, leaving the unchanged portions of the screen untouched. This can be important for things such as games or art, where you would rather have all the updates show at once or with as little delay between them as possible. There is a slight overhead in keeping track of this list, however, not nearly as much as clearing the whole screen and reprinting. Also, terminals themselves are slow to print so there's generally no way you can completely eliminate delay between the start and end of printing, but you can reduce it. GLIR has an included subroutine to assist with this concept for printing, that rolls together color printing in a simple 'batch job' format.</p>
<p>Advantages: less overhead, fewer updates, more built-in color support, potentially smoother animations</p>
<p>Resources: see the <code>GLIR_BatchPrint</code> subroutine.</p>
<p>Of course, there are other methods that can be designed using the individual subroutines and smart programming. Feel free to experiment. A hybrid approach might for example use <code>GLIR_PrintString</code> and <code>GLIR_SetColor</code> to achieve color printing and carefully be programmed to avoid reprinting too many tiles. It is left up to you how you use this library.
<h3 class="greentext" id="Color">Color</h3>
<p>Support for colors in terminals has been around for a long time - but universal adoption is not yet a reality. For those terminals that do support it, different levels and standards have been adopted as the terminal emulators matured. Seven color terminals were upgraded to 256 color terminals and then to a 3-byte Red-Green-Blue (RGB) color generation. GLIR is designed to support 256-color terminals or above (3-byte RGB terminals will also work because they also support the 256-color codes). The Xfce4-terminal is a 256-color terminal. Below is a table that shows the supported color codes (see <code>GLIR_SetColor</code> or <code>GLIR_BatchPrint</code> for usage).</p>
<p>In GLIR you change terminal color settings (using <code>GLIR_SetColor</code>) in the same way that you print to the terminal. You may 'push' a color setting, but you cannot check what the current setting is. Future prints will be in the color set, past prints will not be affected. Therefore, part of <code>GLIR_Start</code> is to set the color to the defaults (default is based on your terminal defaults, which are usually white text on black background in Linux). The <code>GLIR_RestoreSettings</code> subroutine can be used to restore the default color settings.</p>
<p>The following table is extracted from <a href="https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit">wikipedia</a>:</p>
<table style="text-align:center;font-size:80%;width:100%;background:#f6f6f6;cursor:default;" cellspacing="1" cellpadding="0">
<tbody><tr>
<th colspan="36">256-color mode — foreground: ESC[38;5;#m background: ESC[48;5;#m</th>
</tr>
<tr style="display: table-row;">
<td colspan="18">Standard colors</td>
<td colspan="18">High-intensity colors</td>
</tr>
<tr style="display: table-row;">
<td colspan="36">
<table style="width:100%;text-align:center;font-weight:bold;">
<tbody><tr>
<td style="color:#ffffff;background:#000000;" title="#000000"> 0 </td>
<td style="color:#ffffff;background:#800000;" title="#800000"> 1 </td>
<td style="color:#ffffff;background:#008000;" title="#008000"> 2 </td>
<td style="color:#ffffff;background:#808000;" title="#808000"> 3 </td>
<td style="color:#ffffff;background:#000080;" title="#000080"> 4 </td>
<td style="color:#ffffff;background:#800080;" title="#800080"> 5 </td>
<td style="color:#ffffff;background:#008080;" title="#008080"> 6 </td>
<td style="color:#ffffff;background:#c0c0c0;" title="#c0c0c0"> 7 </td>
<td style="width:1em;"></td>
<td style="color:#000000;background:#808080;" title="#808080"> 8 </td>
<td style="color:#000000;background:#ff0000;" title="#ff0000"> 9 </td>
<td style="color:#000000;background:#00ff00;" title="#00ff00">10</td>
<td style="color:#000000;background:#ffff00;" title="#ffff00">11</td>
<td style="color:#000000;background:#0000ff;" title="#0000ff">12</td>
<td style="color:#000000;background:#ff00ff;" title="#ff00ff">13</td>
<td style="color:#000000;background:#00ffff;" title="#00ffff">14</td>
<td style="color:#000000;background:#ffffff;" title="#ffffff">15</td>
</tr>
</tbody></table>
</td>
</tr>
<tr style="display: table-row;">
<td colspan="36">216 colors</td>
</tr>
<tr style="display: table-row;">
<td style="color:#ffffff;background:#000000;" title="#000000">16</td>
<td style="color:#ffffff;background:#00005f;" title="#00005f">17</td>
<td style="color:#ffffff;background:#000087;" title="#000087">18</td>
<td style="color:#ffffff;background:#0000af;" title="#0000af">19</td>
<td style="color:#ffffff;background:#0000d7;" title="#0000d7">20</td>
<td style="color:#ffffff;background:#0000ff;" title="#0000ff">21</td>
<td style="color:#ffffff;background:#005f00;" title="#005f00">22</td>
<td style="color:#ffffff;background:#005f5f;" title="#005f5f">23</td>
<td style="color:#ffffff;background:#005f87;" title="#005f87">24</td>
<td style="color:#ffffff;background:#005faf;" title="#005faf">25</td>
<td style="color:#ffffff;background:#005fd7;" title="#005fd7">26</td>
<td style="color:#ffffff;background:#005fff;" title="#005fff">27</td>
<td style="color:#ffffff;background:#008700;" title="#008700">28</td>
<td style="color:#ffffff;background:#00875f;" title="#00875f">29</td>
<td style="color:#ffffff;background:#008787;" title="#008787">30</td>
<td style="color:#ffffff;background:#0087af;" title="#0087af">31</td>
<td style="color:#ffffff;background:#0087d7;" title="#0087d7">32</td>
<td style="color:#ffffff;background:#0087ff;" title="#0087ff">33</td>
<td style="color:#000000;background:#00af00;" title="#00af00">34</td>
<td style="color:#000000;background:#00af5f;" title="#00af5f">35</td>
<td style="color:#000000;background:#00af87;" title="#00af87">36</td>
<td style="color:#000000;background:#00afaf;" title="#00afaf">37</td>
<td style="color:#000000;background:#00afd7;" title="#00afd7">38</td>
<td style="color:#000000;background:#00afff;" title="#00afff">39</td>
<td style="color:#000000;background:#00d700;" title="#00d700">40</td>
<td style="color:#000000;background:#00d75f;" title="#00d75f">41</td>
<td style="color:#000000;background:#00d787;" title="#00d787">42</td>
<td style="color:#000000;background:#00d7af;" title="#00d7af">43</td>
<td style="color:#000000;background:#00d7d7;" title="#00d7d7">44</td>
<td style="color:#000000;background:#00d7ff;" title="#00d7ff">45</td>
<td style="color:#000000;background:#00ff00;" title="#00ff00">46</td>
<td style="color:#000000;background:#00ff5f;" title="#00ff5f">47</td>
<td style="color:#000000;background:#00ff87;" title="#00ff87">48</td>
<td style="color:#000000;background:#00ffaf;" title="#00ffaf">49</td>
<td style="color:#000000;background:#00ffd7;" title="#00ffd7">50</td>
<td style="color:#000000;background:#00ffff;" title="#00ffff">51</td>
</tr>
<tr style="display: table-row;">
<td style="color:#ffffff;background:#5f0000;" title="#5f0000">52</td>
<td style="color:#ffffff;background:#5f005f;" title="#5f005f">53</td>
<td style="color:#ffffff;background:#5f0087;" title="#5f0087">54</td>
<td style="color:#ffffff;background:#5f00af;" title="#5f00af">55</td>
<td style="color:#ffffff;background:#5f00d7;" title="#5f00d7">56</td>
<td style="color:#ffffff;background:#5f00ff;" title="#5f00ff">57</td>
<td style="color:#ffffff;background:#5f5f00;" title="#5f5f00">58</td>
<td style="color:#ffffff;background:#5f5f5f;" title="#5f5f5f">59</td>
<td style="color:#ffffff;background:#5f5f87;" title="#5f5f87">60</td>
<td style="color:#ffffff;background:#5f5faf;" title="#5f5faf">61</td>
<td style="color:#ffffff;background:#5f5fd7;" title="#5f5fd7">62</td>
<td style="color:#ffffff;background:#5f5fff;" title="#5f5fff">63</td>
<td style="color:#ffffff;background:#5f8700;" title="#5f8700">64</td>
<td style="color:#ffffff;background:#5f875f;" title="#5f875f">65</td>
<td style="color:#ffffff;background:#5f8787;" title="#5f8787">66</td>
<td style="color:#ffffff;background:#5f87af;" title="#5f87af">67</td>
<td style="color:#ffffff;background:#5f87d7;" title="#5f87d7">68</td>
<td style="color:#ffffff;background:#5f87ff;" title="#5f87ff">69</td>
<td style="color:#000000;background:#5faf00;" title="#5faf00">70</td>
<td style="color:#000000;background:#5faf5f;" title="#5faf5f">71</td>
<td style="color:#000000;background:#5faf87;" title="#5faf87">72</td>
<td style="color:#000000;background:#5fafaf;" title="#5fafaf">73</td>
<td style="color:#000000;background:#5fafd7;" title="#5fafd7">74</td>
<td style="color:#000000;background:#5fafff;" title="#5fafff">75</td>
<td style="color:#000000;background:#5fd700;" title="#5fd700">76</td>
<td style="color:#000000;background:#5fd75f;" title="#5fd75f">77</td>
<td style="color:#000000;background:#5fd787;" title="#5fd787">78</td>
<td style="color:#000000;background:#5fd7af;" title="#5fd7af">79</td>
<td style="color:#000000;background:#5fd7d7;" title="#5fd7d7">80</td>
<td style="color:#000000;background:#5fd7ff;" title="#5fd7ff">81</td>
<td style="color:#000000;background:#5fff00;" title="#5fff00">82</td>
<td style="color:#000000;background:#5fff5f;" title="#5fff5f">83</td>
<td style="color:#000000;background:#5fff87;" title="#5fff87">84</td>
<td style="color:#000000;background:#5fffaf;" title="#5fffaf">85</td>
<td style="color:#000000;background:#5fffd7;" title="#5fffd7">86</td>
<td style="color:#000000;background:#5fffff;" title="#5fffff">87</td>
</tr>
<tr style="display: table-row;">
<td style="color:#ffffff;background:#870000;" title="#870000">88</td>
<td style="color:#ffffff;background:#87005f;" title="#87005f">89</td>
<td style="color:#ffffff;background:#870087;" title="#870087">90</td>
<td style="color:#ffffff;background:#8700af;" title="#8700af">91</td>
<td style="color:#ffffff;background:#8700d7;" title="#8700d7">92</td>
<td style="color:#ffffff;background:#8700ff;" title="#8700ff">93</td>
<td style="color:#ffffff;background:#875f00;" title="#875f00">94</td>
<td style="color:#ffffff;background:#875f5f;" title="#875f5f">95</td>
<td style="color:#ffffff;background:#875f87;" title="#875f87">96</td>
<td style="color:#ffffff;background:#875faf;" title="#875faf">97</td>
<td style="color:#ffffff;background:#875fd7;" title="#875fd7">98</td>
<td style="color:#ffffff;background:#875fff;" title="#875fff">99</td>
<td style="color:#ffffff;background:#878700;" title="#878700">100</td>
<td style="color:#ffffff;background:#87875f;" title="#87875f">101</td>
<td style="color:#ffffff;background:#878787;" title="#878787">102</td>
<td style="color:#ffffff;background:#8787af;" title="#8787af">103</td>
<td style="color:#ffffff;background:#8787d7;" title="#8787d7">104</td>
<td style="color:#ffffff;background:#8787ff;" title="#8787ff">105</td>
<td style="color:#000000;background:#87af00;" title="#87af00">106</td>
<td style="color:#000000;background:#87af5f;" title="#87af5f">107</td>
<td style="color:#000000;background:#87af87;" title="#87af87">108</td>
<td style="color:#000000;background:#87afaf;" title="#87afaf">109</td>
<td style="color:#000000;background:#87afd7;" title="#87afd7">110</td>
<td style="color:#000000;background:#87afff;" title="#87afff">111</td>
<td style="color:#000000;background:#87d700;" title="#87d700">112</td>
<td style="color:#000000;background:#87d75f;" title="#87d75f">113</td>
<td style="color:#000000;background:#87d787;" title="#87d787">114</td>
<td style="color:#000000;background:#87d7af;" title="#87d7af">115</td>
<td style="color:#000000;background:#87d7d7;" title="#87d7d7">116</td>
<td style="color:#000000;background:#87d7ff;" title="#87d7ff">117</td>
<td style="color:#000000;background:#87ff00;" title="#87ff00">118</td>
<td style="color:#000000;background:#87ff5f;" title="#87ff5f">119</td>
<td style="color:#000000;background:#87ff87;" title="#87ff87">120</td>
<td style="color:#000000;background:#87ffaf;" title="#87ffaf">121</td>
<td style="color:#000000;background:#87ffd7;" title="#87ffd7">122</td>
<td style="color:#000000;background:#87ffff;" title="#87ffff">123</td>
</tr>
<tr style="display: table-row;">
<td style="color:#ffffff;background:#af0000;" title="#af0000">124</td>
<td style="color:#ffffff;background:#af005f;" title="#af005f">125</td>
<td style="color:#ffffff;background:#af0087;" title="#af0087">126</td>
<td style="color:#ffffff;background:#af00af;" title="#af00af">127</td>
<td style="color:#ffffff;background:#af00d7;" title="#af00d7">128</td>
<td style="color:#ffffff;background:#af00ff;" title="#af00ff">129</td>
<td style="color:#ffffff;background:#af5f00;" title="#af5f00">130</td>
<td style="color:#ffffff;background:#af5f5f;" title="#af5f5f">131</td>
<td style="color:#ffffff;background:#af5f87;" title="#af5f87">132</td>
<td style="color:#ffffff;background:#af5faf;" title="#af5faf">133</td>
<td style="color:#ffffff;background:#af5fd7;" title="#af5fd7">134</td>
<td style="color:#ffffff;background:#af5fff;" title="#af5fff">135</td>
<td style="color:#ffffff;background:#af8700;" title="#af8700">136</td>
<td style="color:#ffffff;background:#af875f;" title="#af875f">137</td>
<td style="color:#ffffff;background:#af8787;" title="#af8787">138</td>
<td style="color:#ffffff;background:#af87af;" title="#af87af">139</td>
<td style="color:#ffffff;background:#af87d7;" title="#af87d7">140</td>
<td style="color:#ffffff;background:#af87ff;" title="#af87ff">141</td>
<td style="color:#000000;background:#afaf00;" title="#afaf00">142</td>
<td style="color:#000000;background:#afaf5f;" title="#afaf5f">143</td>
<td style="color:#000000;background:#afaf87;" title="#afaf87">144</td>
<td style="color:#000000;background:#afafaf;" title="#afafaf">145</td>
<td style="color:#000000;background:#afafd7;" title="#afafd7">146</td>
<td style="color:#000000;background:#afafff;" title="#afafff">147</td>
<td style="color:#000000;background:#afd700;" title="#afd700">148</td>
<td style="color:#000000;background:#afd75f;" title="#afd75f">149</td>
<td style="color:#000000;background:#afd787;" title="#afd787">150</td>
<td style="color:#000000;background:#afd7af;" title="#afd7af">151</td>
<td style="color:#000000;background:#afd7d7;" title="#afd7d7">152</td>
<td style="color:#000000;background:#afd7ff;" title="#afd7ff">153</td>
<td style="color:#000000;background:#afff00;" title="#afff00">154</td>
<td style="color:#000000;background:#afff5f;" title="#afff5f">155</td>
<td style="color:#000000;background:#afff87;" title="#afff87">156</td>
<td style="color:#000000;background:#afffaf;" title="#afffaf">157</td>
<td style="color:#000000;background:#afffd7;" title="#afffd7">158</td>
<td style="color:#000000;background:#afffff;" title="#afffff">159</td>
</tr>
<tr style="display: table-row;">
<td style="color:#ffffff;background:#d70000;" title="#d70000">160</td>
<td style="color:#ffffff;background:#d7005f;" title="#d7005f">161</td>
<td style="color:#ffffff;background:#d70087;" title="#d70087">162</td>
<td style="color:#ffffff;background:#d700af;" title="#d700af">163</td>
<td style="color:#ffffff;background:#d700d7;" title="#d700d7">164</td>
<td style="color:#ffffff;background:#d700ff;" title="#d700ff">165</td>
<td style="color:#ffffff;background:#d75f00;" title="#d75f00">166</td>
<td style="color:#ffffff;background:#d75f5f;" title="#d75f5f">167</td>
<td style="color:#ffffff;background:#d75f87;" title="#d75f87">168</td>
<td style="color:#ffffff;background:#d75faf;" title="#d75faf">169</td>
<td style="color:#ffffff;background:#d75fd7;" title="#d75fd7">170</td>
<td style="color:#ffffff;background:#d75fff;" title="#d75fff">171</td>
<td style="color:#ffffff;background:#d78700;" title="#d78700">172</td>
<td style="color:#ffffff;background:#d7875f;" title="#d7875f">173</td>
<td style="color:#ffffff;background:#d78787;" title="#d78787">174</td>
<td style="color:#ffffff;background:#d787af;" title="#d787af">175</td>
<td style="color:#ffffff;background:#d787d7;" title="#d787d7">176</td>
<td style="color:#ffffff;background:#d787ff;" title="#d787ff">177</td>
<td style="color:#000000;background:#d7af00;" title="#d7af00">178</td>
<td style="color:#000000;background:#d7af5f;" title="#d7af5f">179</td>
<td style="color:#000000;background:#d7af87;" title="#d7af87">180</td>
<td style="color:#000000;background:#d7afaf;" title="#d7afaf">181</td>
<td style="color:#000000;background:#d7afd7;" title="#d7afd7">182</td>
<td style="color:#000000;background:#d7afff;" title="#d7afff">183</td>
<td style="color:#000000;background:#d7d700;" title="#d7d700">184</td>
<td style="color:#000000;background:#d7d75f;" title="#d7d75f">185</td>
<td style="color:#000000;background:#d7d787;" title="#d7d787">186</td>
<td style="color:#000000;background:#d7d7af;" title="#d7d7af">187</td>
<td style="color:#000000;background:#d7d7d7;" title="#d7d7d7">188</td>
<td style="color:#000000;background:#d7d7ff;" title="#d7d7ff">189</td>
<td style="color:#000000;background:#d7ff00;" title="#d7ff00">190</td>
<td style="color:#000000;background:#d7ff5f;" title="#d7ff5f">191</td>
<td style="color:#000000;background:#d7ff87;" title="#d7ff87">192</td>
<td style="color:#000000;background:#d7ffaf;" title="#d7ffaf">193</td>
<td style="color:#000000;background:#d7ffd7;" title="#d7ffd7">194</td>
<td style="color:#000000;background:#d7ffff;" title="#d7ffff">195</td>
</tr>
<tr style="display: table-row;">
<td style="color:#ffffff;background:#ff0000;" title="#ff0000">196</td>
<td style="color:#ffffff;background:#ff005f;" title="#ff005f">197</td>
<td style="color:#ffffff;background:#ff0087;" title="#ff0087">198</td>
<td style="color:#ffffff;background:#ff00af;" title="#ff00af">199</td>
<td style="color:#ffffff;background:#ff00d7;" title="#ff00d7">200</td>
<td style="color:#ffffff;background:#ff00ff;" title="#ff00ff">201</td>
<td style="color:#ffffff;background:#ff5f00;" title="#ff5f00">202</td>
<td style="color:#ffffff;background:#ff5f5f;" title="#ff5f5f">203</td>
<td style="color:#ffffff;background:#ff5f87;" title="#ff5f87">204</td>
<td style="color:#ffffff;background:#ff5faf;" title="#ff5faf">205</td>
<td style="color:#ffffff;background:#ff5fd7;" title="#ff5fd7">206</td>
<td style="color:#ffffff;background:#ff5fff;" title="#ff5fff">207</td>
<td style="color:#ffffff;background:#ff8700;" title="#ff8700">208</td>
<td style="color:#ffffff;background:#ff875f;" title="#ff875f">209</td>
<td style="color:#ffffff;background:#ff8787;" title="#ff8787">210</td>
<td style="color:#ffffff;background:#ff87af;" title="#ff87af">211</td>
<td style="color:#ffffff;background:#ff87d7;" title="#ff87d7">212</td>
<td style="color:#ffffff;background:#ff87ff;" title="#ff87ff">213</td>
<td style="color:#000000;background:#ffaf00;" title="#ffaf00">214</td>
<td style="color:#000000;background:#ffaf5f;" title="#ffaf5f">215</td>
<td style="color:#000000;background:#ffaf87;" title="#ffaf87">216</td>
<td style="color:#000000;background:#ffafaf;" title="#ffafaf">217</td>
<td style="color:#000000;background:#ffafd7;" title="#ffafd7">218</td>
<td style="color:#000000;background:#ffafff;" title="#ffafff">219</td>
<td style="color:#000000;background:#ffd700;" title="#ffd700">220</td>
<td style="color:#000000;background:#ffd75f;" title="#ffd75f">221</td>
<td style="color:#000000;background:#ffd787;" title="#ffd787">222</td>
<td style="color:#000000;background:#ffd7af;" title="#ffd7af">223</td>
<td style="color:#000000;background:#ffd7d7;" title="#ffd7d7">224</td>
<td style="color:#000000;background:#ffd7ff;" title="#ffd7ff">225</td>
<td style="color:#000000;background:#ffff00;" title="#ffff00">226</td>
<td style="color:#000000;background:#ffff5f;" title="#ffff5f">227</td>
<td style="color:#000000;background:#ffff87;" title="#ffff87">228</td>
<td style="color:#000000;background:#ffffaf;" title="#ffffaf">229</td>
<td style="color:#000000;background:#ffffd7;" title="#ffffd7">230</td>
<td style="color:#000000;background:#ffffff;" title="#ffffff">231</td>
</tr>
<tr style="display: table-row;">
<td colspan="36">Grayscale colors</td>
</tr>
<tr style="display: table-row;">
<td colspan="36">
<table style="width:100%;text-align:center;font-weight:bold;">
<tbody><tr>
<td style="color:#ffffff;background:#080808;" title="#080808">232</td>
<td style="color:#ffffff;background:#121212;" title="#121212">233</td>
<td style="color:#ffffff;background:#1c1c1c;" title="#1c1c1c">234</td>
<td style="color:#ffffff;background:#262626;" title="#262626">235</td>
<td style="color:#ffffff;background:#303030;" title="#303030">236</td>
<td style="color:#ffffff;background:#3a3a3a;" title="#3a3a3a">237</td>
<td style="color:#ffffff;background:#444444;" title="#444444">238</td>
<td style="color:#ffffff;background:#4e4e4e;" title="#4e4e4e">239</td>
<td style="color:#ffffff;background:#585858;" title="#585858">240</td>
<td style="color:#ffffff;background:#626262;" title="#626262">241</td>
<td style="color:#ffffff;background:#6c6c6c;" title="#6c6c6c">242</td>
<td style="color:#ffffff;background:#767676;" title="#767676">243</td>
<td style="color:#000000;background:#808080;" title="#808080">244</td>
<td style="color:#000000;background:#8a8a8a;" title="#8a8a8a">245</td>
<td style="color:#000000;background:#949494;" title="#949494">246</td>
<td style="color:#000000;background:#9e9e9e;" title="#9e9e9e">247</td>
<td style="color:#000000;background:#a8a8a8;" title="#a8a8a8">248</td>
<td style="color:#000000;background:#b2b2b2;" title="#b2b2b2">249</td>
<td style="color:#000000;background:#bcbcbc;" title="#bcbcbc">250</td>
<td style="color:#000000;background:#c6c6c6;" title="#c6c6c6">251</td>
<td style="color:#000000;background:#d0d0d0;" title="#d0d0d0">252</td>
<td style="color:#000000;background:#dadada;" title="#dadada">253</td>
<td style="color:#000000;background:#e4e4e4;" title="#e4e4e4">254</td>
<td style="color:#000000;background:#eeeeee;" title="#eeeeee">255</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<h2 class="greentext">Testing</h2>
<p>Demonstrations of the expected output of the tests/demos, which are included with this library, can be found at: <a href="Testing/testing.html">https://cmput229.github.io/GLIR/Testing/testing</a>.</p>
<h2 class="greentext">Additional Notes</h2>
<p>If you create new subroutines or have any suggestions feel free to make a pull request and we will consider incorporating it. For any questions or problems with GLIR please create an issue on the repository. The purpose of GLIR is to abstract out the escape codes that move the cursor and change printing styles into a workable graphics package. Some terminal emulators allow more advanced capabilities that are not currently implemented in GLIR. Your terminal emulators' escape-code documentation contains information about such capabilities. A hint for those wanting to create animations or more pretty graphics - there is no character that can be printed that covers an entire grid space in most default fonts. The unicode 'full block' character <code>█</code> makes for a great pixel element in most printing cases but leaves a sliver of space above and below but not side to side. If you find a square font where the full block covers, please let me know and I will look into including support for it in GLIR. A hacky method is to set the color of the background and print a space (" ") but this can effect <code>GLIR_ClearScreen</code> because it will set the entire screen to the current background color.</p>
<h2 class="greentext">Contributions</h2>
<p>Thanks to: <a href="https://github.com/AustinGrey">AustinGrey</a>,
<a href="https://github.com/TaylorZowtuk">TaylorZowtuk</a>,
<a href="https://github.com/zacharyselk">zacharyselk</a>,
<a href="https://github.com/rmnattas">rmnattas</a>, and
<a href="https://github.com/mehrabmehdi">mehrabmehdi</a>
for their contributions to GLIR!</p>
</div>
</body>
</html>