25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: dev_vga.c,v 1.74 2005/05/29 16:04:28 debug Exp $ |
* $Id: dev_vga.c,v 1.75 2005/06/26 11:43:48 debug Exp $ |
29 |
* |
* |
30 |
* VGA charcell and graphics device. |
* VGA charcell and graphics device. |
31 |
* |
* |
260 |
d->charcells_outputed[i+1] = d->charcells[base+i+1]; |
d->charcells_outputed[i+1] = d->charcells[base+i+1]; |
261 |
|
|
262 |
if (!printed_last || x == 0) { |
if (!printed_last || x == 0) { |
263 |
sprintf(s, "\033[%i;%iH", y + 1, x + 1); |
snprintf(s, sizeof(s), "\033[%i;%iH", y + 1, x + 1); |
264 |
c_putstr(d, s); |
c_putstr(d, s); |
265 |
} |
} |
266 |
if (oldcolor < 0 || (bg<<4)+fg != oldcolor || !printed_last) { |
if (oldcolor < 0 || (bg<<4)+fg != oldcolor || !printed_last) { |
267 |
sprintf(s, "\033[0;"); c_putstr(d, s); |
snprintf(s, sizeof(s), "\033[0;"); c_putstr(d, s); |
268 |
|
|
269 |
switch (fg & 7) { |
switch (fg & 7) { |
270 |
case 0: c_putstr(d, "30"); break; |
case 0: c_putstr(d, "30"); break; |
301 |
} |
} |
302 |
|
|
303 |
/* Restore the terminal's cursor position: */ |
/* Restore the terminal's cursor position: */ |
304 |
sprintf(s, "\033[%i;%iH", d->cursor_y + 1, d->cursor_x + 1); |
snprintf(s, sizeof(s), "\033[%i;%iH", d->cursor_y + 1, d->cursor_x + 1); |
305 |
c_putstr(d, s); |
c_putstr(d, s); |
306 |
} |
} |
307 |
|
|