Filter all prints, not just ones from a game source.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2416 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2006-10-20 14:02:28 +00:00
parent 18e24f710c
commit faa252f37b
1 changed files with 28 additions and 2 deletions

View File

@ -479,12 +479,38 @@ int main(int argc, char **argv)
void Sys_Printf(cluster_t *cluster, char *fmt, ...)
{
va_list argptr;
char string[2024];
char string[2048];
unsigned char *t;
va_start (argptr, fmt);
vsnprintf (string, sizeof(string), fmt,argptr);
vsnprintf (string, sizeof(string)-1, fmt,argptr);
string[sizeof(string)-1] = 0;
va_end (argptr);
for (t = (unsigned char*)string; *t; t++)
{
if (*t >= 146 && *t < 156)
*t = *t - 146 + '0';
if (*t == 143)
*t = '.';
if (*t == 157 || *t == 158 || *t == 159)
*t = '-';
if (*t >= 128)
*t -= 128;
if (*t == 16)
*t = '[';
if (*t == 17)
*t = ']';
if (*t == 29)
*t = '-';
if (*t == 30)
*t = '-';
if (*t == 31)
*t = '-';
if (*t == '\a') //doh. :D
*t = ' ';
}
printf("%s", string);
}