mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-19 08:51:59 +00:00
clean up Con_Print a smidge
This commit is contained in:
parent
9dc5cf6591
commit
be4d2f57ea
1 changed files with 6 additions and 7 deletions
|
@ -314,14 +314,10 @@ Con_Print (const char *fmt, va_list args)
|
|||
int mask, c, l, y;
|
||||
static int cr;
|
||||
static char txt[1024];
|
||||
const char *s;
|
||||
char *s;
|
||||
|
||||
vsnprintf (txt, sizeof (txt), fmt, args);
|
||||
|
||||
// echo to debugging console
|
||||
for (s = txt; *s; s++)
|
||||
fputc (sys_char_map[(byte)*s], stdout);
|
||||
|
||||
// log all messages to file
|
||||
if (con_debuglog)
|
||||
Sys_DebugLog (va ("%s/qconsole.log", com_gamedir), "%s", txt);
|
||||
|
@ -337,7 +333,7 @@ Con_Print (const char *fmt, va_list args)
|
|||
} else
|
||||
mask = 0;
|
||||
|
||||
while ((c = *s)) {
|
||||
while ((c = (byte)*s)) {
|
||||
// count word length
|
||||
for (l = 0; l < con_linewidth; l++)
|
||||
if (s[l] <= ' ')
|
||||
|
@ -347,7 +343,7 @@ Con_Print (const char *fmt, va_list args)
|
|||
if (l != con_linewidth && (con->x + l > con_linewidth))
|
||||
con->x = 0;
|
||||
|
||||
s++;
|
||||
*s++ = sys_char_map[c];
|
||||
|
||||
if (cr) {
|
||||
con->current--;
|
||||
|
@ -382,6 +378,9 @@ Con_Print (const char *fmt, va_list args)
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
// echo to debugging console
|
||||
fputs (txt, stdout);
|
||||
}
|
||||
|
||||
/* DRAWING */
|
||||
|
|
Loading…
Reference in a new issue