mirror of
https://github.com/nzp-team/fteqw.git
synced 2025-02-17 01:11:18 +00:00
don't show link gibberish on stdout
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4127 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
cac1e0fb57
commit
670dadcecf
1 changed files with 16 additions and 1 deletions
|
@ -164,11 +164,26 @@ void Sys_Printf (char *fmt, ...)
|
||||||
|
|
||||||
for (c = ctext; c < e; c++)
|
for (c = ctext; c < e; c++)
|
||||||
{
|
{
|
||||||
|
if (*c & CON_HIDDEN)
|
||||||
|
continue;
|
||||||
|
|
||||||
ApplyColour(*c);
|
ApplyColour(*c);
|
||||||
w = *c & 0x0ffff;
|
w = *c & 0x0ffff;
|
||||||
if (w >= 0xe000 && w < 0xe100)
|
if (w >= 0xe000 && w < 0xe100)
|
||||||
{
|
{
|
||||||
putc(w&0x7f, stdout);
|
/*not all quake chars are ascii compatible, so map those control chars to safe ones so we don't mess up anyone's xterm*/
|
||||||
|
if ((w & 0x7f) > 0x20)
|
||||||
|
putc(w&0x7f, stdout);
|
||||||
|
else if (w & 0x80)
|
||||||
|
{
|
||||||
|
static char tab[32] = "---#@.@@@@ # >.." "[]0123456789.---";
|
||||||
|
putc(tab[w&31], stdout);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
static char tab[32] = ".####.#### # >.." "[]0123456789.---";
|
||||||
|
putc(tab[w&31], stdout);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue