diff --git a/hw/source/master.c b/hw/source/master.c index aa0087a8d..a895b779c 100644 --- a/hw/source/master.c +++ b/hw/source/master.c @@ -230,7 +230,7 @@ SV_InitNet (void) p = COM_CheckParm ("-port"); if (p && p < com_argc) { port = atoi (com_argv[p + 1]); - Con_Printf ("Port: %i\n", port); + Sys_Printf ("Port: %i\n", port); } NET_Init (port); @@ -252,20 +252,20 @@ AnalysePacket (void) byte *p, *data; int i, size, rsize; - Con_Printf ("%s >> unknown packet:\n", NET_AdrToString (net_from)); + Sys_Printf ("%s >> unknown packet:\n", NET_AdrToString (net_from)); data = net_message->message->data; size = net_message->message->cursize; for (p = data; (rsize = min (size - (p - data), 16)); p += rsize) { - Con_Printf ("%04X:", (unsigned) (p - data)); + Sys_Printf ("%04X:", (unsigned) (p - data)); memcpy (buf, p, rsize); for (i = 0; i < rsize; i++) { - Con_Printf (" %02X", buf[i]); + Sys_Printf (" %02X", buf[i]); if (buf[i] < ' ' || buf [i] > '~') buf[i] = '.'; } - Con_Printf ("%*.*s\n", 1 + (16 - rsize) * 3 + rsize, rsize, buf); + Sys_Printf ("%*.*s\n", 1 + (16 - rsize) * 3 + rsize, rsize, buf); } } @@ -314,7 +314,7 @@ Mst_Packet (void) msg = net_message->message->data[1]; if (msg == A2A_PING) { Filter (); - Con_Printf ("%s >> A2A_PING\n", NET_AdrToString (net_from)); + Sys_Printf ("%s >> A2A_PING\n", NET_AdrToString (net_from)); if (!(sv = SVL_Find (net_from))) { sv = SVL_New (&net_from); SVL_Add (sv); @@ -322,7 +322,7 @@ Mst_Packet (void) sv->timeout = Sys_DoubleTime (); } else if (msg == S2M_HEARTBEAT) { Filter (); - Con_Printf ("%s >> S2M_HEARTBEAT\n", NET_AdrToString (net_from)); + Sys_Printf ("%s >> S2M_HEARTBEAT\n", NET_AdrToString (net_from)); if (!(sv = SVL_Find (net_from))) { sv = SVL_New (&net_from); SVL_Add (sv); @@ -330,22 +330,22 @@ Mst_Packet (void) sv->timeout = Sys_DoubleTime (); } else if (msg == S2M_SHUTDOWN) { Filter (); - Con_Printf ("%s >> S2M_SHUTDOWN\n", NET_AdrToString (net_from)); + Sys_Printf ("%s >> S2M_SHUTDOWN\n", NET_AdrToString (net_from)); if ((sv = SVL_Find (net_from))) { SVL_Remove (sv); free (sv); } } else if (msg == S2C_CHALLENGE) { - Con_Printf ("%s >> ", NET_AdrToString (net_from)); - Con_Printf ("Gamespy server list request\n"); + Sys_Printf ("%s >> ", NET_AdrToString (net_from)); + Sys_Printf ("Gamespy server list request\n"); Mst_SendList (); } else { byte *p; p = net_message->message->data; if (p[0] == 0 && p[1] == 'y') { - Con_Printf ("%s >> ", NET_AdrToString (net_from)); - Con_Printf ("Pingtool server list request\n"); + Sys_Printf ("%s >> ", NET_AdrToString (net_from)); + Sys_Printf ("Pingtool server list request\n"); Mst_SendList (); } else { AnalysePacket (); @@ -368,7 +368,7 @@ FilterAdd (int arg) netadr_t to, from; if (Cmd_Argc () - arg != 2) { - Con_Printf ("Invalid command parameters. " + Sys_Printf ("Invalid command parameters. " "Usage:\nfilter add x.x.x.x:port x.x.x.x:port\n\n"); return; } @@ -379,12 +379,12 @@ FilterAdd (int arg) if (from.port == 0) from.port = BigShort (PORT_SERVER); if (!(filter = FL_Find (from))) { - Con_Printf ("Added filter %s\t\t%s\n", Cmd_Argv (arg), + Sys_Printf ("Added filter %s\t\t%s\n", Cmd_Argv (arg), Cmd_Argv (arg + 1)); filter = FL_New (&from, &to); FL_Add (filter); } else - Con_Printf ("%s already defined\n\n", Cmd_Argv (arg)); + Sys_Printf ("%s already defined\n\n", Cmd_Argv (arg)); } static void @@ -394,17 +394,17 @@ FilterRemove (int arg) netadr_t from; if (Cmd_Argc () - arg != 1) { - Con_Printf ("Invalid command parameters. Usage:\n" + Sys_Printf ("Invalid command parameters. Usage:\n" "filter remove x.x.x.x:port\n\n"); return; } NET_StringToAdr (Cmd_Argv (arg), &from); if ((filter = FL_Find (from))) { - Con_Printf ("Removed %s\n\n", Cmd_Argv (arg)); + Sys_Printf ("Removed %s\n\n", Cmd_Argv (arg)); FL_Remove (filter); free (filter); } else - Con_Printf ("Cannot find %s\n\n", Cmd_Argv (arg)); + Sys_Printf ("Cannot find %s\n\n", Cmd_Argv (arg)); } static void @@ -413,18 +413,18 @@ FilterList (void) filter_t *filter; for (filter = filter_list; filter; filter = filter->next) { - Con_Printf ("%s", NET_AdrToString (filter->from)); - Con_Printf ("\t\t%s\n", NET_AdrToString (filter->to)); + Sys_Printf ("%s", NET_AdrToString (filter->from)); + Sys_Printf ("\t\t%s\n", NET_AdrToString (filter->to)); } if (filter_list == NULL) - Con_Printf ("No filter\n"); - Con_Printf ("\n"); + Sys_Printf ("No filter\n"); + Sys_Printf ("\n"); } static void FilterClear (void) { - Con_Printf ("Removed all filters\n\n"); + Sys_Printf ("Removed all filters\n\n"); FL_Clear (); } @@ -490,7 +490,7 @@ SV_TimeOut (void) for (sv = sv_list; sv;) { if (sv->timeout + SV_TIMEOUT < time) { next = sv->next; - Con_Printf ("%s timed out\n", NET_AdrToString (sv->ip)); + Sys_Printf ("%s timed out\n", NET_AdrToString (sv->ip)); SVL_Remove (sv); free (sv); sv = next; @@ -512,7 +512,7 @@ SV_Frame (void) static void MST_Quit_f (void) { - Con_Printf ("HW master shutdown\n"); + Sys_Printf ("HW master shutdown\n"); Sys_Quit (); } @@ -550,8 +550,8 @@ main (int argc, const char **argv) con_list_print = Sys_Printf; SV_InitNet (); - Con_Printf ("Exe: " __TIME__ " " __DATE__ "\n"); - Con_Printf ("======== HW master initialized ========\n\n"); + Sys_Printf ("Exe: " __TIME__ " " __DATE__ "\n"); + Sys_Printf ("======== HW master initialized ========\n\n"); while (1) { SV_Frame (); } diff --git a/include/QF/console.h b/include/QF/console.h index 4e700b567..89b624a76 100644 --- a/include/QF/console.h +++ b/include/QF/console.h @@ -90,8 +90,6 @@ void Con_CheckResize (void); void Con_DrawConsole (void); void Con_Print (const char *fmt, va_list args); -void Con_Printf (const char *fmt, ...) __attribute__((format(printf,1,2))); -void Con_DPrintf (const char *fmt, ...) __attribute__((format(printf,1,2))); void Con_ToggleConsole_f (void); // wrapper function to attempt to either complete the command line diff --git a/libs/console/client.c b/libs/console/client.c index 1d55fcf48..1dd46445e 100644 --- a/libs/console/client.c +++ b/libs/console/client.c @@ -255,19 +255,19 @@ Condump_f (void) char name[MAX_OSPATH]; if (Cmd_Argc () != 2) { - Con_Printf ("usage: condump \n"); + Sys_Printf ("usage: condump \n"); return; } if (strchr (Cmd_Argv (1), '/') || strchr (Cmd_Argv (1), '\\')) { - Con_Printf ("invalid character in filename\n"); + Sys_Printf ("invalid character in filename\n"); return; } snprintf (name, sizeof (name), "%s/%s.txt", qfs_gamedir->dir.def, Cmd_Argv (1)); if (!(file = QFS_WOpen (name, 0))) { - Con_Printf ("could not open %s for writing: %s\n", name, + Sys_Printf ("could not open %s for writing: %s\n", name, strerror (errno)); return; } @@ -307,7 +307,7 @@ cl_exec_line_rcon (void *data, const char *line) Cbuf_AddText (con_data.cbuf, "rcon "); Cbuf_AddText (con_data.cbuf, line); Cbuf_AddText (con_data.cbuf, "\n"); - Con_Printf ("rcon %s\n", line); + Sys_Printf ("rcon %s\n", line); return 0; } @@ -321,8 +321,8 @@ cl_conmode_f (cvar_t *var) } else if (!strcmp (var->string, "rcon")) { con_data.exec_line = cl_exec_line_rcon; } else { - Con_Printf ("mode must be one of \"command\", \"chat\" or \"rcon\"\n"); - Con_Printf (" forcing \"command\"\n"); + Sys_Printf ("mode must be one of \"command\", \"chat\" or \"rcon\"\n"); + Sys_Printf (" forcing \"command\"\n"); Cvar_Set (var, "command"); } } @@ -896,7 +896,7 @@ C_Init (void) C_CheckResize (); - Con_Printf ("Console initialized.\n"); + Sys_Printf ("Console initialized.\n"); // register our commands Cmd_AddCommand ("toggleconsole", ToggleConsole_f, diff --git a/libs/console/complete.c b/libs/console/complete.c index f957f2d3f..c635d3e23 100644 --- a/libs/console/complete.c +++ b/libs/console/complete.c @@ -45,6 +45,7 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/console.h" #include "QF/cvar.h" #include "QF/plugin.h" +#include "QF/sys.h" #include "QF/va.h" #include "compat.h" @@ -128,23 +129,23 @@ Con_BasicCompleteCommandLine (inputline_t *il) cmd_len++; } while (i == 3); // 'quakebar' - Con_Printf ("\n\35"); + Sys_Printf ("\n\35"); for (i = 0; i < con_linewidth - 4; i++) - Con_Printf ("\36"); - Con_Printf ("\37\n"); + Sys_Printf ("\36"); + Sys_Printf ("\37\n"); // Print Possible Commands if (c) { - Con_Printf ("%i possible command%s\n", c, (c > 1) ? "s: " : ":"); + Sys_Printf ("%i possible command%s\n", c, (c > 1) ? "s: " : ":"); Con_DisplayList (list[0], con_linewidth); } if (v) { - Con_Printf ("%i possible variable%s\n", v, (v > 1) ? "s: " : ":"); + Sys_Printf ("%i possible variable%s\n", v, (v > 1) ? "s: " : ":"); Con_DisplayList (list[1], con_linewidth); } if (o) { - Con_Printf ("%i possible matche%s\n", o, (o > 1) ? "s: " : ":"); + Sys_Printf ("%i possible matche%s\n", o, (o > 1) ? "s: " : ":"); Con_DisplayList (list[2], con_linewidth); } } diff --git a/libs/console/console.c b/libs/console/console.c index 51a5cfef9..2e6778ed0 100644 --- a/libs/console/console.c +++ b/libs/console/console.c @@ -113,7 +113,7 @@ Con_ExecLine (const char *line) } no_lf: if (echo) - Con_Printf ("%s\n", line); + Sys_Printf ("%s\n", line); } VISIBLE void @@ -133,19 +133,6 @@ Con_Shutdown (void) } } -VISIBLE void -Con_Printf (const char *fmt, ...) -{ - va_list args; - - va_start (args, fmt); - if (con_module) - con_module->functions->console->pC_Print (fmt, args); - else - vfprintf (stdout, fmt, args); - va_end (args); -} - VISIBLE void Con_Print (const char *fmt, va_list args) { @@ -155,20 +142,6 @@ Con_Print (const char *fmt, va_list args) vfprintf (stdout, fmt, args); } -VISIBLE void -Con_DPrintf (const char *fmt, ...) -{ - if (developer && developer->int_val) { - va_list args; - va_start (args, fmt); - if (con_module) - con_module->functions->console->pC_Print (fmt, args); - else - vfprintf (stdout, fmt, args); - va_end (args); - } -} - VISIBLE void Con_ProcessInput (void) { @@ -179,7 +152,7 @@ Con_ProcessInput (void) if (!been_there_done_that) { been_there_done_that = 1; - Con_Printf ("no input for you\n"); + Sys_Printf ("no input for you\n"); } } } diff --git a/libs/console/list.c b/libs/console/list.c index 12e72167b..79d63ae63 100644 --- a/libs/console/list.c +++ b/libs/console/list.c @@ -39,8 +39,9 @@ static __attribute__ ((used)) const char rcsid[] = #endif #include "QF/console.h" +#include "QF/sys.h" -VISIBLE void (*con_list_print)(const char *fmt, ...) = Con_Printf; +VISIBLE void (*con_list_print)(const char *fmt, ...) = Sys_Printf; /* Con_DisplayList diff --git a/libs/console/menu.c b/libs/console/menu.c index b0c76d2e3..7ad113898 100644 --- a/libs/console/menu.c +++ b/libs/console/menu.c @@ -106,7 +106,7 @@ menu_resolve_globals (progs_t *pr) menu_pr_state.globals.time = &G_FLOAT (pr, def->ofs); return 1; error: - Con_Printf ("%s: undefined symbol %s\n", pr->progs_name, sym); + Sys_Printf ("%s: undefined symbol %s\n", pr->progs_name, sym); return 0; } @@ -345,7 +345,7 @@ bi_Menu_SelectMenu (progs_t *pr) } } else { if (name && *name) - Con_Printf ("no menu \"%s\"\n", name); + Sys_Printf ("no menu \"%s\"\n", name); if (con_data.force_commandline) { key_dest = key_console; game_target = IMT_CONSOLE; @@ -495,7 +495,7 @@ Menu_Load (void) if (!menu_pr_state.progs) { // Not a fatal error, just means no menus Con_SetOrMask (0x80); - Con_Printf ("Menu_Load: could not load %s\n", + Sys_Printf ("Menu_Load: could not load %s\n", menu_pr_state.progs_name); Con_SetOrMask (0x00); return; diff --git a/libs/console/server.c b/libs/console/server.c index 9daaa9fab..8fdf85d91 100644 --- a/libs/console/server.c +++ b/libs/console/server.c @@ -635,8 +635,8 @@ sv_conmode_f (cvar_t *var) } else if (!strcmp (var->string, "chat")) { sv_con_data.exec_line = sv_exec_line_chat; } else { - Con_Printf ("mode must be one of \"command\" or \"chat\"\n"); - Con_Printf (" forcing \"command\"\n"); + Sys_Printf ("mode must be one of \"command\" or \"chat\"\n"); + Sys_Printf (" forcing \"command\"\n"); Cvar_Set (var, "command"); } } diff --git a/libs/models/alias/gl_model_alias.c b/libs/models/alias/gl_model_alias.c index ee0aae5de..1d7aa531d 100644 --- a/libs/models/alias/gl_model_alias.c +++ b/libs/models/alias/gl_model_alias.c @@ -102,7 +102,8 @@ Mod_FloodFillSkin (byte * skin, int skinwidth, int skinheight) } // can't fill to filled color or transparent color (used as visited marker) if ((fillcolor == filledcolor) || (fillcolor == 255)) { -// Sys_Printf ("not filling skin from %d to %d\n", fillcolor, filledcolor); + Sys_DPrintf ("not filling skin from %d to %d\n", + fillcolor, filledcolor); return; } diff --git a/libs/models/brush/gl_model_brush.c b/libs/models/brush/gl_model_brush.c index 5136c3d5e..5418f72e9 100644 --- a/libs/models/brush/gl_model_brush.c +++ b/libs/models/brush/gl_model_brush.c @@ -160,9 +160,9 @@ Mod_LoadLighting (lump_t *l) loadmodel->lightdata = data + 8; return; } else - Sys_Printf ("Unknown .lit file version (%d)\n", i); + Sys_DPrintf ("Unknown .lit file version (%d)\n", i); } else - Sys_Printf ("Corrupt .lit file (old version?), ignoring\n"); + Sys_DPrintf ("Corrupt .lit file (old version?), ignoring\n"); } } // LordHavoc: oh well, expand the white lighting data diff --git a/libs/models/trace.c b/libs/models/trace.c index c0eb0f2f5..dd3d65f7b 100644 --- a/libs/models/trace.c +++ b/libs/models/trace.c @@ -138,7 +138,7 @@ impact (tl_t *tl) frac = (t1 - offset) / (t1 - t2); } else { frac = 0; - Sys_Printf ("help! help! the world is falling apart!\n"); + Sys_DPrintf ("help! help! the world is falling apart!\n"); } if (frac >= 0) { tl->fraction = frac; @@ -396,7 +396,7 @@ MOD_TraceLine (hull_t *hull, int num, frac = (start_dist + offset) / (start_dist - end_dist); } else { // get here only when offset is non-zero - Sys_Printf ("foo\n"); + Sys_DPrintf ("foo\n"); frac = 1; side = start_dist < end_dist; } diff --git a/libs/net/nc/net_udp.c b/libs/net/nc/net_udp.c index d93589b7c..fa8032669 100644 --- a/libs/net/nc/net_udp.c +++ b/libs/net/nc/net_udp.c @@ -267,7 +267,7 @@ NET_GetPacket (void) int err = WSAGetLastError (); if (err == WSAEMSGSIZE) { - Con_Printf ("Warning: Oversize packet from %s\n", + Sys_Printf ("Warning: Oversize packet from %s\n", NET_AdrToString (net_from)); return false; } @@ -283,27 +283,27 @@ NET_GetPacket (void) #endif // _WIN32 if (err == EWOULDBLOCK) return false; - Con_Printf ("NET_GetPacket: %d: %d: %s\n", net_socket, err, + Sys_Printf ("NET_GetPacket: %d: %d: %s\n", net_socket, err, strerror (err)); return false; } // Check for malformed packets if (ntohs (net_from.port) < 1024) { - Con_Printf ("Warning: Packet from %s dropped: Bad port\n", + Sys_Printf ("Warning: Packet from %s dropped: Bad port\n", NET_AdrToString (net_from)); return false; } if (from.sin_addr.s_addr==INADDR_ANY || from.sin_addr.s_addr == INADDR_BROADCAST) { - Con_Printf ("Warning: Packet dropped - bad address\n"); + Sys_Printf ("Warning: Packet dropped - bad address\n"); return false; } _net_message_message.cursize = ret; if (ret == sizeof (net_message_buffer)) { - Con_Printf ("Oversize packet from %s\n", NET_AdrToString (net_from)); + Sys_Printf ("Oversize packet from %s\n", NET_AdrToString (net_from)); return false; } @@ -335,7 +335,7 @@ NET_SendPacket (int length, const void *data, netadr_t to) if (err == EWOULDBLOCK) return; - Con_Printf ("NET_SendPacket: %d: %d: %s\n", net_socket, err, + Sys_Printf ("NET_SendPacket: %d: %d: %s\n", net_socket, err, strerror (errno)); } } @@ -363,7 +363,7 @@ UDP_OpenSocket (int port) // ZOID -- check for interface binding option if ((i = COM_CheckParm ("-ip")) != 0 && i < com_argc) { address.sin_addr.s_addr = inet_addr (com_argv[i + 1]); - Con_Printf ("Binding to IP Interface Address of %s\n", + Sys_Printf ("Binding to IP Interface Address of %s\n", inet_ntoa (address.sin_addr)); } else address.sin_addr.s_addr = INADDR_ANY; @@ -394,7 +394,7 @@ NET_GetLocalAddress (void) Sys_Error ("NET_Init: getsockname: %s", strerror (errno)); net_local_adr.port = address.sin_port; - Con_Printf ("IP address %s\n", NET_AdrToString (net_local_adr)); + Sys_Printf ("IP address %s\n", NET_AdrToString (net_local_adr)); } void @@ -423,7 +423,7 @@ NET_Init (int port) net_loopback_adr.ip[0] = 127; net_loopback_adr.ip[3] = 1; - Con_Printf ("UDP (IPv4) Initialized\n"); + Sys_Printf ("UDP (IPv4) Initialized\n"); } void diff --git a/libs/net/nc/net_udp6.c b/libs/net/nc/net_udp6.c index 61cc9fd21..e9fef19e5 100644 --- a/libs/net/nc/net_udp6.c +++ b/libs/net/nc/net_udp6.c @@ -269,7 +269,7 @@ NET_StringToAdr (const char *s, netadr_t *a) addrs++; for (; *space && *space != ']'; space++); if (!*space) { - Con_Printf ("NET_StringToAdr: invalid IPv6 address %s\n", s); + Sys_Printf ("NET_StringToAdr: invalid IPv6 address %s\n", s); return 0; } *space++ = '\0'; @@ -284,7 +284,7 @@ NET_StringToAdr (const char *s, netadr_t *a) if ((err = getaddrinfo (addrs, ports, &hints, &resultp))) { // Error - Con_Printf ("NET_StringToAdr: string %s:\n%s\n", s, + Sys_Printf ("NET_StringToAdr: string %s:\n%s\n", s, gai_strerror (err)); return 0; } @@ -309,7 +309,7 @@ NET_StringToAdr (const char *s, netadr_t *a) break; default: - Con_Printf ("NET_StringToAdr: string %s:\nprotocol family %d not " + Sys_Printf ("NET_StringToAdr: string %s:\nprotocol family %d not " "supported\n", s, resultp->ai_family); return 0; } @@ -369,7 +369,7 @@ NET_GetPacket (void) int err = WSAGetLastError (); if (err == WSAEMSGSIZE) { - Con_Printf ("Warning: Oversize packet from %s\n", + Sys_Printf ("Warning: Oversize packet from %s\n", NET_AdrToString (net_from)); return false; } @@ -381,13 +381,13 @@ NET_GetPacket (void) #endif // _WIN32 if (err == EWOULDBLOCK) return false; - Con_Printf ("NET_GetPacket: %s\n", strerror (err)); + Sys_Printf ("NET_GetPacket: %s\n", strerror (err)); return false; } _net_message_message.cursize = ret; if (ret == sizeof (net_message_buffer)) { - Con_Printf ("Oversize packet from %s\n", NET_AdrToString (net_from)); + Sys_Printf ("Oversize packet from %s\n", NET_AdrToString (net_from)); return false; } @@ -422,7 +422,7 @@ NET_SendPacket (int length, const void *data, netadr_t to) if (err == EWOULDBLOCK) return; - Con_Printf ("NET_SendPacket: %s\n", strerror (err)); + Sys_Printf ("NET_SendPacket: %s\n", strerror (err)); } } @@ -465,7 +465,7 @@ UDP_OpenSocket (int port) } else { Host = "0::0"; } - Con_Printf ("Binding to IP Interface Address of %s\n", Host); + Sys_Printf ("Binding to IP Interface Address of %s\n", Host); if (port == PORT_ANY) Service = NULL; @@ -522,7 +522,7 @@ NET_GetLocalAddress (void) Sys_Error ("NET_GetLocalAddress: getsockname: %s", strerror (errno)); net_local_adr.port = address.sin6_port; - Con_Printf ("IP address %s\n", NET_AdrToString (net_local_adr)); + Sys_Printf ("IP address %s\n", NET_AdrToString (net_local_adr)); } void @@ -551,7 +551,7 @@ NET_Init (int port) net_loopback_adr.ip[15] = 1; - Con_Printf ("UDP (IPv6) Initialized\n"); + Sys_Printf ("UDP (IPv6) Initialized\n"); } void diff --git a/libs/net/net_chan.c b/libs/net/net_chan.c index e358926e7..e014a0bd4 100644 --- a/libs/net/net_chan.c +++ b/libs/net/net_chan.c @@ -254,7 +254,7 @@ Netchan_Transmit (netchan_t *chan, int length, byte *data) // check for message overflow if (chan->message.overflowed) { chan->fatal_error = true; - Con_Printf ("%s:Outgoing message overflow\n", + Sys_Printf ("%s:Outgoing message overflow\n", NET_AdrToString (chan->remote_address)); return; } @@ -316,7 +316,7 @@ Netchan_Transmit (netchan_t *chan, int length, byte *data) chan->cleartime = *net_realtime; if (showpackets->int_val & 1) - Con_Printf ("--> s=%i(%i) a=%i(%i) %-4i %i\n", chan->outgoing_sequence, + Sys_Printf ("--> s=%i(%i) a=%i(%i) %-4i %i\n", chan->outgoing_sequence, send_reliable, chan->incoming_sequence, chan->incoming_reliable_sequence, send.cursize, chan->outgoing_sequence - chan->incoming_sequence); @@ -354,7 +354,7 @@ Netchan_Process (netchan_t *chan) sequence_ack &= ~(1 << 31); if (showpackets->int_val & 2) - Con_Printf ("<-- s=%i(%i) a=%i(%i) %i\n", sequence, reliable_message, + Sys_Printf ("<-- s=%i(%i) a=%i(%i) %i\n", sequence, reliable_message, sequence_ack, reliable_ack, net_message->message->cursize); // get a rate estimation @@ -387,7 +387,7 @@ Netchan_Process (netchan_t *chan) // discard stale or duplicated packets if (sequence < (unsigned int) chan->incoming_sequence + 1) { if (showdrop->int_val) - Con_Printf ("%s:Out of order packet %i at %i\n", + Sys_Printf ("%s:Out of order packet %i at %i\n", NET_AdrToString (chan->remote_address), sequence, chan->incoming_sequence); return false; @@ -399,7 +399,7 @@ Netchan_Process (netchan_t *chan) chan->drop_count += 1; if (showdrop->int_val) - Con_Printf ("%s:Dropped %i packets at %i\n", + Sys_Printf ("%s:Dropped %i packets at %i\n", NET_AdrToString (chan->remote_address), sequence - (chan->incoming_sequence + 1), sequence); } diff --git a/libs/net/net_main.c b/libs/net/net_main.c index 92c5f77ff..e551df73d 100644 --- a/libs/net/net_main.c +++ b/libs/net/net_main.c @@ -211,7 +211,7 @@ static void NET_Listen_f (void) { if (Cmd_Argc () != 2) { - Con_Printf ("\"listen\" is \"%u\"\n", listening ? 1 : 0); + Sys_Printf ("\"listen\" is \"%u\"\n", listening ? 1 : 0); return; } @@ -232,12 +232,12 @@ MaxPlayers_f (void) int n; if (Cmd_Argc () != 2) { - Con_Printf ("\"maxplayers\" is \"%u\"\n", svs.maxclients); + Sys_Printf ("\"maxplayers\" is \"%u\"\n", svs.maxclients); return; } if (sv.active) { - Con_Printf + Sys_Printf ("maxplayers can not be changed while a server is running.\n"); return; } @@ -247,7 +247,7 @@ MaxPlayers_f (void) n = 1; if (n > svs.maxclientslimit) { n = svs.maxclientslimit; - Con_Printf ("\"maxplayers\" set to \"%u\"\n", n); + Sys_Printf ("\"maxplayers\" set to \"%u\"\n", n); } if ((n == 1) && listening) @@ -270,13 +270,13 @@ NET_Port_f (void) int n; if (Cmd_Argc () != 2) { - Con_Printf ("\"port\" is \"%u\"\n", net_hostport); + Sys_Printf ("\"port\" is \"%u\"\n", net_hostport); return; } n = atoi (Cmd_Argv (1)); if (n < 1 || n > 65534) { - Con_Printf ("Bad value, must be between 1 and 65534\n"); + Sys_Printf ("Bad value, must be between 1 and 65534\n"); return; } @@ -294,8 +294,8 @@ NET_Port_f (void) static void PrintSlistHeader (void) { - Con_Printf ("Server Map Users\n"); - Con_Printf ("--------------- --------------- -----\n"); + Sys_Printf ("Server Map Users\n"); + Sys_Printf ("--------------- --------------- -----\n"); slistLastShown = 0; } @@ -307,11 +307,11 @@ PrintSlist (void) for (n = slistLastShown; n < hostCacheCount; n++) { if (hostcache[n].maxusers) - Con_Printf ("%-15.15s %-15.15s %2u/%2u\n", hostcache[n].name, + Sys_Printf ("%-15.15s %-15.15s %2u/%2u\n", hostcache[n].name, hostcache[n].map, hostcache[n].users, hostcache[n].maxusers); else - Con_Printf ("%-15.15s %-15.15s\n", hostcache[n].name, + Sys_Printf ("%-15.15s %-15.15s\n", hostcache[n].name, hostcache[n].map); } slistLastShown = n; @@ -322,9 +322,9 @@ static void PrintSlistTrailer (void) { if (hostCacheCount) - Con_Printf ("== end list ==\n\n"); + Sys_Printf ("== end list ==\n\n"); else - Con_Printf ("No Quake servers found.\n\n"); + Sys_Printf ("No Quake servers found.\n\n"); } @@ -335,7 +335,7 @@ NET_Slist_f (void) return; if (!slistSilent) { - Con_Printf ("Looking for Quake servers...\n"); + Sys_Printf ("Looking for Quake servers...\n"); PrintSlistHeader (); } @@ -442,7 +442,7 @@ NET_Connect (const char *host) if (hostCacheCount != 1) return NULL; host = hostcache[0].cname; - Con_Printf ("Connecting to...\n%s @ %s\n\n", hostcache[0].name, host); + Sys_Printf ("Connecting to...\n%s @ %s\n\n", hostcache[0].name, host); } if (hostCacheCount) @@ -462,7 +462,7 @@ NET_Connect (const char *host) } if (host) { - Con_Printf ("\n"); + Sys_Printf ("\n"); PrintSlistHeader (); PrintSlist (); PrintSlistTrailer (); @@ -573,7 +573,7 @@ NET_GetMessage (qsocket_t * sock) return -1; if (sock->disconnected) { - Con_Printf ("NET_GetMessage: disconnected socket\n"); + Sys_Printf ("NET_GetMessage: disconnected socket\n"); return -1; } @@ -650,7 +650,7 @@ NET_SendMessage (qsocket_t * sock, sizebuf_t *data) return -1; if (sock->disconnected) { - Con_Printf ("NET_SendMessage: disconnected socket\n"); + Sys_Printf ("NET_SendMessage: disconnected socket\n"); return -1; } @@ -680,7 +680,7 @@ NET_SendUnreliableMessage (qsocket_t * sock, sizebuf_t *data) return -1; if (sock->disconnected) { - Con_Printf ("NET_SendMessage: disconnected socket\n"); + Sys_Printf ("NET_SendMessage: disconnected socket\n"); return -1; } @@ -891,9 +891,9 @@ NET_Init (void) } if (*my_ipx_address) - Con_DPrintf ("IPX address %s\n", my_ipx_address); + Sys_DPrintf ("IPX address %s\n", my_ipx_address); if (*my_tcpip_address) - Con_DPrintf ("TCP/IP address %s\n", my_tcpip_address); + Sys_DPrintf ("TCP/IP address %s\n", my_tcpip_address); } /* @@ -924,7 +924,7 @@ NET_Shutdown (void) } if (vcrFile) { - Con_Printf ("Closing vcrfile.\n"); + Sys_Printf ("Closing vcrfile.\n"); Qclose (vcrFile); } } diff --git a/libs/net/nm/net_dgrm.c b/libs/net/nm/net_dgrm.c index 87bb7ecf0..4b75c5ce7 100644 --- a/libs/net/nm/net_dgrm.c +++ b/libs/net/nm/net_dgrm.c @@ -138,7 +138,7 @@ NET_Ban_f (void) CL_Cmd_ForwardToServer (); return; } - print = Con_Printf; + print = Sys_Printf; } else { if (*sv_globals.deathmatch && !host_client->privileged) return; @@ -339,7 +339,7 @@ Datagram_GetMessage (qsocket_t * sock) break; if ((int) length == -1) { - Con_Printf ("Read error\n"); + Sys_Printf ("Read error\n"); return -1; } @@ -364,14 +364,14 @@ Datagram_GetMessage (qsocket_t * sock) if (flags & NETFLAG_UNRELIABLE) { if (sequence < sock->unreliableReceiveSequence) { - Con_DPrintf ("Got a stale datagram\n"); + Sys_DPrintf ("Got a stale datagram\n"); ret = 0; break; } if (sequence != sock->unreliableReceiveSequence) { count = sequence - sock->unreliableReceiveSequence; droppedDatagrams += count; - Con_DPrintf ("Dropped %u datagram(s)\n", count); + Sys_DPrintf ("Dropped %u datagram(s)\n", count); } sock->unreliableReceiveSequence = sequence + 1; @@ -386,15 +386,15 @@ Datagram_GetMessage (qsocket_t * sock) if (flags & NETFLAG_ACK) { if (sequence != (sock->sendSequence - 1)) { - Con_DPrintf ("Stale ACK received\n"); + Sys_DPrintf ("Stale ACK received\n"); continue; } if (sequence == sock->ackSequence) { sock->ackSequence++; if (sock->ackSequence != sock->sendSequence) - Con_DPrintf ("ack sequencing error\n"); + Sys_DPrintf ("ack sequencing error\n"); } else { - Con_DPrintf ("Duplicate ACK received\n"); + Sys_DPrintf ("Duplicate ACK received\n"); continue; } sock->sendMessageLength -= MAX_DATAGRAM; @@ -451,10 +451,10 @@ Datagram_GetMessage (qsocket_t * sock) static void PrintStats (qsocket_t * s) { - Con_Printf ("canSend = %4u \n", s->canSend); - Con_Printf ("sendSeq = %4u ", s->sendSequence); - Con_Printf ("recvSeq = %4u \n", s->receiveSequence); - Con_Printf ("\n"); + Sys_Printf ("canSend = %4u \n", s->canSend); + Sys_Printf ("sendSeq = %4u ", s->sendSequence); + Sys_Printf ("recvSeq = %4u \n", s->receiveSequence); + Sys_Printf ("\n"); } static void @@ -463,19 +463,19 @@ NET_Stats_f (void) qsocket_t *s; if (Cmd_Argc () == 1) { - Con_Printf ("unreliable messages sent = %i\n", + Sys_Printf ("unreliable messages sent = %i\n", unreliableMessagesSent); - Con_Printf ("unreliable messages recv = %i\n", + Sys_Printf ("unreliable messages recv = %i\n", unreliableMessagesReceived); - Con_Printf ("reliable messages sent = %i\n", messagesSent); - Con_Printf ("reliable messages received = %i\n", messagesReceived); - Con_Printf ("packetsSent = %i\n", packetsSent); - Con_Printf ("packetsReSent = %i\n", packetsReSent); - Con_Printf ("packetsReceived = %i\n", packetsReceived); - Con_Printf ("receivedDuplicateCount = %i\n", + Sys_Printf ("reliable messages sent = %i\n", messagesSent); + Sys_Printf ("reliable messages received = %i\n", messagesReceived); + Sys_Printf ("packetsSent = %i\n", packetsSent); + Sys_Printf ("packetsReSent = %i\n", packetsReSent); + Sys_Printf ("packetsReceived = %i\n", packetsReceived); + Sys_Printf ("receivedDuplicateCount = %i\n", receivedDuplicateCount); - Con_Printf ("shortPacketCount = %i\n", shortPacketCount); - Con_Printf ("droppedDatagrams = %i\n", droppedDatagrams); + Sys_Printf ("shortPacketCount = %i\n", shortPacketCount); + Sys_Printf ("droppedDatagrams = %i\n", droppedDatagrams); } else if (strcmp (Cmd_Argv (1), "*") == 0) { for (s = net_activeSockets; s; s = s->next) PrintStats (s); @@ -548,7 +548,7 @@ Test_Poll (void *unused) connectTime = MSG_ReadLong (net_message); strcpy (address, MSG_ReadString (net_message)); - Con_Printf ("%s\n frags:%3i colors:%u %u time:%u\n %s\n", name, + Sys_Printf ("%s\n frags:%3i colors:%u %u time:%u\n %s\n", name, frags, colors >> 4, colors & 0x0f, connectTime / 60, address); } @@ -674,7 +674,7 @@ Test2_Poll (void *unused) goto Done; strcpy (value, MSG_ReadString (net_message)); - Con_Printf ("%-16.16s %-16.16s\n", name, value); + Sys_Printf ("%-16.16s %-16.16s\n", name, value); SZ_Clear (net_message->message); // save space for the header, filled in later @@ -693,7 +693,7 @@ Test2_Poll (void *unused) return; Error: - Con_Printf ("Unexpected repsonse to Rule Info request\n"); + Sys_Printf ("Unexpected repsonse to Rule Info request\n"); Done: dfunc.CloseSocket (test2Socket); test2InProgress = false; @@ -1260,7 +1260,7 @@ _Datagram_Connect (const char *host) goto ErrorReturn; // send the connection request - Con_Printf ("trying...\n"); + Sys_Printf ("trying...\n"); CL_UpdateScreen (cl.time); start_time = net_time; @@ -1316,21 +1316,21 @@ _Datagram_Connect (const char *host) while (ret == 0 && (SetNetTime () - start_time) < 2.5); if (ret) break; - Con_Printf ("still trying...\n"); + Sys_Printf ("still trying...\n"); CL_UpdateScreen (cl.time); start_time = SetNetTime (); } if (ret == 0) { reason = "No Response"; - Con_Printf ("%s\n", reason); + Sys_Printf ("%s\n", reason); // strcpy (m_return_reason, reason); goto ErrorReturn; } if (ret == -1) { reason = "Network Error"; - Con_Printf ("%s\n", reason); + Sys_Printf ("%s\n", reason); // strcpy (m_return_reason, reason); goto ErrorReturn; } @@ -1338,7 +1338,7 @@ _Datagram_Connect (const char *host) ret = MSG_ReadByte (net_message); if (ret == CCREP_REJECT) { reason = MSG_ReadString (net_message); - Con_Printf (reason); + Sys_Printf (reason); // strncpy (m_return_reason, reason, 31); goto ErrorReturn; } @@ -1349,20 +1349,20 @@ _Datagram_Connect (const char *host) dfunc.SetSocketPort (&sock->addr, MSG_ReadLong (net_message)); } else { reason = "Bad Response"; - Con_Printf ("%s\n", reason); + Sys_Printf ("%s\n", reason); // strcpy (m_return_reason, reason); goto ErrorReturn; } dfunc.GetNameFromAddr (&sendaddr, sock->address); - Con_Printf ("Connection accepted\n"); + Sys_Printf ("Connection accepted\n"); sock->lastMessageTime = SetNetTime (); // switch the connection to the specified address if (dfunc.Connect (newsock, &sock->addr) == -1) { reason = "Connect to Game failed"; - Con_Printf ("%s\n", reason); + Sys_Printf ("%s\n", reason); // strcpy (m_return_reason, reason); goto ErrorReturn; } diff --git a/libs/net/nm/net_loop.c b/libs/net/nm/net_loop.c index 23a59062f..5b915e84e 100644 --- a/libs/net/nm/net_loop.c +++ b/libs/net/nm/net_loop.c @@ -96,7 +96,7 @@ Loop_Connect (const char *host) if (!loop_client) { if ((loop_client = NET_NewQSocket ()) == NULL) { - Con_Printf ("Loop_Connect: no qsocket available\n"); + Sys_Printf ("Loop_Connect: no qsocket available\n"); return NULL; } strcpy (loop_client->address, "localhost"); @@ -107,7 +107,7 @@ Loop_Connect (const char *host) if (!loop_server) { if ((loop_server = NET_NewQSocket ()) == NULL) { - Con_Printf ("Loop_Connect: no qsocket available\n"); + Sys_Printf ("Loop_Connect: no qsocket available\n"); return NULL; } strcpy (loop_server->address, "LOCAL"); diff --git a/libs/net/nm/net_udp.c b/libs/net/nm/net_udp.c index a30bc87a9..74d12d3b8 100644 --- a/libs/net/nm/net_udp.c +++ b/libs/net/nm/net_udp.c @@ -142,7 +142,7 @@ get_address (int sock) if (ioctl (sock, SIOCGIFADDR, &ifr[i]) == -1) continue; in_addr = (struct sockaddr_in *)&ifr[i].ifr_addr; - Con_DPrintf ("%s: %s\n", ifr[i].ifr_name, + Sys_DPrintf ("%s: %s\n", ifr[i].ifr_name, inet_ntoa (in_addr->sin_addr)); addr = *(unsigned *)&in_addr->sin_addr; if (addr != htonl (0x7f000001)) { @@ -202,7 +202,7 @@ UDP_Init (void) if (colon) *colon = 0; - Con_Printf ("UDP (IPv4) Initialized\n"); + Sys_Printf ("UDP (IPv4) Initialized\n"); tcpipAvailable = true; return net_controlsocket; @@ -397,7 +397,7 @@ UDP_Broadcast (int socket, byte * buf, int len) Sys_Error ("Attempted to use multiple broadcasts sockets"); ret = UDP_MakeSocketBroadcastCapable (socket); if (ret == -1) { - Con_Printf ("Unable to make socket broadcast capable\n"); + Sys_Printf ("Unable to make socket broadcast capable\n"); return ret; } } diff --git a/libs/net/nm/net_wins.c b/libs/net/nm/net_wins.c index d1ca9dafc..47950396b 100644 --- a/libs/net/nm/net_wins.c +++ b/libs/net/nm/net_wins.c @@ -157,7 +157,7 @@ WINS_Init (void) hInst = LoadLibrary ("wsock32.dll"); if (hInst == NULL) { - Con_Printf ("Failed to load winsock.dll\n"); + Sys_Printf ("Failed to load winsock.dll\n"); winsock_lib_initialized = false; return -1; } @@ -182,7 +182,7 @@ WINS_Init (void) !psocket || !pioctlsocket || !psetsockopt || !precvfrom || !psendto || !pclosesocket || !pgethostname || !pgethostbyname || !pgethostbyaddr || !pgetsockname) { - Con_Printf ("Couldn't GetProcAddress from winsock.dll\n"); + Sys_Printf ("Couldn't GetProcAddress from winsock.dll\n"); return -1; } @@ -195,7 +195,7 @@ WINS_Init (void) r = pWSAStartup (MAKEWORD (1, 1), &winsockdata); if (r) { - Con_Printf ("Winsock initialization failed.\n"); + Sys_Printf ("Winsock initialization failed.\n"); return -1; } } @@ -203,7 +203,7 @@ WINS_Init (void) // determine my name if (pgethostname (buff, MAXHOSTNAMELEN) == SOCKET_ERROR) { - Con_DPrintf ("Winsock TCP/IP Initialization failed.\n"); + Sys_DPrintf ("Winsock TCP/IP Initialization failed.\n"); if (--winsock_initialized == 0) pWSACleanup (); return -1; @@ -241,7 +241,7 @@ WINS_Init (void) } if ((net_controlsocket = WINS_OpenSocket (0)) == -1) { - Con_Printf ("WINS_Init: Unable to open control socket\n"); + Sys_Printf ("WINS_Init: Unable to open control socket\n"); if (--winsock_initialized == 0) pWSACleanup (); return -1; @@ -251,7 +251,7 @@ WINS_Init (void) ((struct sockaddr_in *) &broadcastaddr)->sin_addr.s_addr = INADDR_BROADCAST; ((struct sockaddr_in *) &broadcastaddr)->sin_port = htons ((unsigned short) net_hostport); - Con_Printf ("Winsock TCP/IP Initialized\n"); + Sys_Printf ("Winsock TCP/IP Initialized\n"); tcpipAvailable = true; return net_controlsocket; @@ -459,7 +459,7 @@ WINS_Broadcast (int socket, byte * buf, int len) WINS_GetLocalAddress (); ret = WINS_MakeSocketBroadcastCapable (socket); if (ret == -1) { - Con_Printf ("Unable to make socket broadcast capable\n"); + Sys_Printf ("Unable to make socket broadcast capable\n"); return ret; } } diff --git a/libs/qw/msg_backbuf.c b/libs/qw/msg_backbuf.c index d0bcd9a7b..32ff74955 100644 --- a/libs/qw/msg_backbuf.c +++ b/libs/qw/msg_backbuf.c @@ -38,8 +38,8 @@ static __attribute__ ((used)) const char rcsid[] = # include #endif -#include "QF/console.h" #include "QF/msg.h" +#include "QF/sys.h" #include "netchan.h" #include "qw/msg_backbuf.h" @@ -50,7 +50,7 @@ PushBackbuf (backbuf_t *rel) { int tail_backbuf; - Con_DPrintf ("backbuffering %d %s\n", rel->num_backbuf, rel->name); + Sys_DPrintf ("backbuffering %d %s\n", rel->num_backbuf, rel->name); tail_backbuf = (rel->head_backbuf + rel->num_backbuf) % MAX_BACK_BUFFERS; memset (&rel->backbuf, 0, sizeof (rel->backbuf)); rel->backbuf.allowoverflow = true; @@ -94,7 +94,7 @@ MSG_ReliableCheckBlock (backbuf_t *rel, int maxsize) if (rel->backbuf.cursize > rel->backbuf.maxsize - maxsize - 1) { if (rel->num_backbuf == MAX_BACK_BUFFERS) { - Con_Printf ("WARNING: MAX_BACK_BUFFERS for %s\n", rel->name); + Sys_Printf ("WARNING: MAX_BACK_BUFFERS for %s\n", rel->name); rel->backbuf.cursize = 0; // don't overflow without // allowoverflow set msg->overflowed = true; // this will drop the client @@ -129,7 +129,7 @@ MSG_Reliable_FinishWrite (backbuf_t *rel) rel->backbuf_size[tail_backbuf] = rel->backbuf.cursize; if (rel->backbuf.overflowed) { - Con_Printf ("WARNING: backbuf [%d] overflow for %s\n", + Sys_Printf ("WARNING: backbuf [%d] overflow for %s\n", rel->num_backbuf, rel->name); rel->netchan->message.overflowed = true; // this will drop the // client @@ -268,7 +268,7 @@ MSG_Reliable_Send (backbuf_t *rel) return; // will it fit? if (msg->cursize + *size < msg->maxsize) { - Con_DPrintf ("%s: backbuf %d bytes\n", rel->name, *size); + Sys_DPrintf ("%s: backbuf %d bytes\n", rel->name, *size); // it'll fit SZ_Write (msg, data, *size); diff --git a/libs/util/cmd.c b/libs/util/cmd.c index f0775ae4f..fb2284250 100644 --- a/libs/util/cmd.c +++ b/libs/util/cmd.c @@ -147,7 +147,7 @@ Cmd_AddCommand (const char *cmd_name, xcommand_t function, // fail if the command already exists cmd = (cmd_function_t *) Hash_Find (cmd_hash, cmd_name); if (cmd) { - Sys_Printf ("Cmd_AddCommand: %s already defined\n", cmd_name); + Sys_DPrintf ("Cmd_AddCommand: %s already defined\n", cmd_name); return 0; } diff --git a/libs/util/quakefs.c b/libs/util/quakefs.c index 281804275..22c128ec1 100644 --- a/libs/util/quakefs.c +++ b/libs/util/quakefs.c @@ -654,7 +654,7 @@ QFS_WriteBuffers (const char *filename, int count, ...) Sys_Error ("Error opening %s", filename); } - Sys_Printf ("QFS_WriteBuffers: %s\n", filename); + Sys_DPrintf ("QFS_WriteBuffers: %s\n", filename); while (count--) { void *data = va_arg (args, void *); int len = va_arg (args, int); @@ -1008,7 +1008,7 @@ QFS_LoadPackFile (char *packfile) pack_t *pack = pack_open (packfile); if (pack) - Sys_Printf ("Added packfile %s (%i files)\n", + Sys_DPrintf ("Added packfile %s (%i files)\n", packfile, pack->numfiles); return pack; } diff --git a/libs/video/renderer/gl/gl_draw.c b/libs/video/renderer/gl/gl_draw.c index 8916951b7..9ec7b8ecd 100644 --- a/libs/video/renderer/gl/gl_draw.c +++ b/libs/video/renderer/gl/gl_draw.c @@ -41,7 +41,6 @@ static __attribute__ ((used)) const char rcsid[] = #include #include "QF/cmd.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/draw.h" #include "QF/dstring.h" @@ -136,7 +135,7 @@ Draw_InitText (void) tVAsize = 0; if (tVAsize) { - Con_Printf ("Text: %i maximum vertex elements.\n", tVAsize); + Sys_Printf ("Text: %i maximum vertex elements.\n", tVAsize); if (textVertices) free (textVertices); @@ -154,7 +153,7 @@ Draw_InitText (void) for (i = 0; i < tVAsize; i++) tVAindices[i] = i; } else { - Con_Printf ("Text: Vertex Array use disabled.\n"); + Sys_Printf ("Text: Vertex Array use disabled.\n"); } } diff --git a/libs/video/renderer/gl/gl_dyn_part.c b/libs/video/renderer/gl/gl_dyn_part.c index af659053f..46173f124 100644 --- a/libs/video/renderer/gl/gl_dyn_part.c +++ b/libs/video/renderer/gl/gl_dyn_part.c @@ -41,7 +41,6 @@ static __attribute__ ((used)) const char rcsid[] = #include #include "QF/cmd.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/qargs.h" #include "QF/quakefs.h" @@ -161,7 +160,7 @@ R_InitParticles (void) else pVAsize = 0; if (pVAsize) { - Con_Printf ("Particles: %i maximum vertex elements.\n", pVAsize); + Sys_Printf ("Particles: %i maximum vertex elements.\n", pVAsize); if (particleVertexArray) free (particleVertexArray); @@ -175,7 +174,7 @@ R_InitParticles (void) for (i = 0; i < pVAsize; i++) pVAindices[i] = i; } else { - Con_Printf ("Particles: Vertex Array use disabled.\n"); + Sys_Printf ("Particles: Vertex Array use disabled.\n"); } } else { if (particleVertexArray) { @@ -210,11 +209,11 @@ R_ReadPointFile_f (void) QFS_FOpenFile (name, &f); if (!f) { - Con_Printf ("couldn't open %s\n", name); + Sys_Printf ("couldn't open %s\n", name); return; } - Con_Printf ("Reading %s...\n", name); + Sys_Printf ("Reading %s...\n", name); c = 0; for (;;) { char buf[64]; @@ -226,7 +225,7 @@ R_ReadPointFile_f (void) c++; if (numparticles >= r_maxparticles) { - Con_Printf ("Not enough free particles\n"); + Sys_Printf ("Not enough free particles\n"); break; } else { particle_new (pt_static, part_tex_dot, org, 1.5, vec3_origin, @@ -234,7 +233,7 @@ R_ReadPointFile_f (void) } } Qclose (f); - Con_Printf ("%i points read\n", c); + Sys_Printf ("%i points read\n", c); } static void @@ -1549,7 +1548,7 @@ R_ParticlePhysics (particle_t *part) part->scale -= time2; break; default: - Con_DPrintf ("unhandled particle type %d\n", part->type); + Sys_DPrintf ("unhandled particle type %d\n", part->type); break; } } diff --git a/libs/video/renderer/gl/gl_lightmap.c b/libs/video/renderer/gl/gl_lightmap.c index adbdba154..dcb2803f0 100644 --- a/libs/video/renderer/gl/gl_lightmap.c +++ b/libs/video/renderer/gl/gl_lightmap.c @@ -42,7 +42,6 @@ static __attribute__ ((used)) const char rcsid[] = #include #include -#include "QF/console.h" #include "QF/cvar.h" #include "QF/render.h" #include "QF/sys.h" @@ -540,7 +539,7 @@ gl_overbright_f (cvar_t *var) if (var->int_val) { if (!gl_combine_capable && gl_mtex_capable) { - Con_Printf ("Warning: gl_overbright has no effect with " + Sys_Printf ("Warning: gl_overbright has no effect with " "gl_multitexture enabled if you don't have " "GL_COMBINE support in your driver.\n"); lm_src_blend = GL_ZERO; diff --git a/libs/video/renderer/gl/gl_mod_alias.c b/libs/video/renderer/gl/gl_mod_alias.c index fdab4d33b..c1ebb896b 100644 --- a/libs/video/renderer/gl/gl_mod_alias.c +++ b/libs/video/renderer/gl/gl_mod_alias.c @@ -42,7 +42,6 @@ static __attribute__ ((used)) const char rcsid[] = #include #include -#include "QF/console.h" #include "QF/cvar.h" #include "QF/locs.h" #include "QF/mathlib.h" @@ -259,7 +258,7 @@ GL_GetAliasFrameVerts16 (int frame, aliashdr_t *paliashdr, entity_t *e) if ((frame >= paliashdr->mdl.numframes) || (frame < 0)) { if (developer->int_val) - Con_Printf ("R_AliasSetupFrame: no such frame %d %s\n", frame, + Sys_Printf ("R_AliasSetupFrame: no such frame %d %s\n", frame, currententity->model->name); frame = 0; } @@ -365,7 +364,7 @@ GL_GetAliasFrameVerts (int frame, aliashdr_t *paliashdr, entity_t *e) if ((frame >= paliashdr->mdl.numframes) || (frame < 0)) { if (developer->int_val) - Con_Printf ("R_AliasSetupFrame: no such frame %d %s\n", frame, + Sys_Printf ("R_AliasSetupFrame: no such frame %d %s\n", frame, currententity->model->name); frame = 0; } @@ -468,7 +467,7 @@ R_AliasGetSkindesc (int skinnum, aliashdr_t *ahdr) maliasskingroup_t *paliasskingroup; if ((skinnum >= ahdr->mdl.numskins) || (skinnum < 0)) { - Con_DPrintf ("R_AliasSetupSkin: no such skin # %d\n", skinnum); + Sys_DPrintf ("R_AliasSetupSkin: no such skin # %d\n", skinnum); skinnum = 0; } diff --git a/libs/video/renderer/gl/gl_mod_sprite.c b/libs/video/renderer/gl/gl_mod_sprite.c index 576f73f62..34d44bce0 100644 --- a/libs/video/renderer/gl/gl_mod_sprite.c +++ b/libs/video/renderer/gl/gl_mod_sprite.c @@ -41,9 +41,9 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/GL/defines.h" #include "QF/GL/funcs.h" -#include "QF/console.h" #include "QF/model.h" #include "QF/render.h" +#include "QF/sys.h" #include "compat.h" #include "r_local.h" @@ -74,7 +74,7 @@ R_GetSpriteFrame (entity_t *currententity) frame = currententity->frame; if ((frame >= psprite->numframes) || (frame < 0)) { - Con_Printf ("R_DrawSprite: no such frame %d\n", frame); + Sys_Printf ("R_DrawSprite: no such frame %d\n", frame); frame = 0; } @@ -260,7 +260,7 @@ R_InitSprites (void) #else sVAsize = 4; #endif - Con_Printf ("Sprites: %i maximum vertex elements.\n", sVAsize); + Sys_Printf ("Sprites: %i maximum vertex elements.\n", sVAsize); if (spriteVertexArray) free (spriteVertexArray); diff --git a/libs/video/renderer/gl/gl_rmain.c b/libs/video/renderer/gl/gl_rmain.c index 4845908b6..84e31173e 100644 --- a/libs/video/renderer/gl/gl_rmain.c +++ b/libs/video/renderer/gl/gl_rmain.c @@ -42,7 +42,6 @@ static __attribute__ ((used)) const char rcsid[] = #include #include -#include "QF/console.h" #include "QF/cvar.h" #include "QF/draw.h" #include "QF/locs.h" @@ -822,15 +821,15 @@ R_InitFishEyeOnce (void) if (fisheye_init_once_completed) return 1; - Con_Printf ("GL_ARB_texture_cube_map "); + Sys_Printf ("GL_ARB_texture_cube_map "); if (QFGL_ExtensionPresent ("GL_ARB_texture_cube_map")) { qfglGetIntegerv (GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB, &gl_cube_map_maxtex); - Con_Printf ("present, max texture size %d.\n", + Sys_Printf ("present, max texture size %d.\n", (int) gl_cube_map_maxtex); gl_cube_map_capable = true; } else { - Con_Printf ("not found.\n"); + Sys_Printf ("not found.\n"); gl_cube_map_capable = false; } fisheye_init_once_completed = true; diff --git a/libs/video/renderer/gl/gl_rmisc.c b/libs/video/renderer/gl/gl_rmisc.c index 6859575a1..9b91172f7 100644 --- a/libs/video/renderer/gl/gl_rmisc.c +++ b/libs/video/renderer/gl/gl_rmisc.c @@ -41,7 +41,6 @@ static __attribute__ ((used)) const char rcsid[] = #include #include "QF/cmd.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/draw.h" #include "QF/quakefs.h" @@ -133,7 +132,7 @@ void R_LoadSky_f (void) { if (Cmd_Argc () != 2) { - Con_Printf ("loadsky : load a skybox\n"); + Sys_Printf ("loadsky : load a skybox\n"); return; } @@ -241,7 +240,7 @@ R_TimeRefresh_f (void) stop = Sys_DoubleTime (); time = stop - start; - Con_Printf ("%f seconds (%f fps)\n", time, 128 / time); + Sys_Printf ("%f seconds (%f fps)\n", time, 128 / time); GL_BeginRendering (&glx, &gly, &glwidth, &glheight); } diff --git a/libs/video/renderer/gl/gl_screen.c b/libs/video/renderer/gl/gl_screen.c index 0b351d6cd..2e93f233d 100644 --- a/libs/video/renderer/gl/gl_screen.c +++ b/libs/video/renderer/gl/gl_screen.c @@ -40,7 +40,6 @@ static __attribute__ ((used)) const char rcsid[] = #include -#include "QF/console.h" #include "QF/cvar.h" #include "QF/draw.h" #include "QF/dstring.h" @@ -142,7 +141,7 @@ SCR_ScreenShot_f (void) // find a file name to save it to if (!QFS_NextFilename (pcxname, va ("%s/qf", qfs_gamedir->dir.def), ".tga")) { - Con_Printf ("SCR_ScreenShot_f: Couldn't create a TGA file\n"); + Sys_Printf ("SCR_ScreenShot_f: Couldn't create a TGA file\n"); } else { buffer = malloc (glwidth * glheight * 3); SYS_CHECKMEM (buffer); @@ -150,7 +149,7 @@ SCR_ScreenShot_f (void) GL_UNSIGNED_BYTE, buffer); WriteTGAfile (pcxname->str, buffer, glwidth, glheight); free (buffer); - Con_Printf ("Wrote %s/%s\n", qfs_userpath, pcxname->str); + Sys_Printf ("Wrote %s/%s\n", qfs_userpath, pcxname->str); } dstring_delete (pcxname); } @@ -265,7 +264,7 @@ SCR_UpdateScreen (double realtime, SCR_Func *scr_funcs) if (r_speeds->int_val) { // qfglFinish (); time2 = Sys_DoubleTime (); - Con_Printf ("%3i ms %4i wpoly %4i epoly %4i parts\n", + Sys_Printf ("%3i ms %4i wpoly %4i epoly %4i parts\n", (int) ((time2 - time1) * 1000), c_brush_polys, c_alias_polys, numparticles); } diff --git a/libs/video/renderer/gl/gl_skin.c b/libs/video/renderer/gl/gl_skin.c index 34ebcaeb6..2db3e1240 100644 --- a/libs/video/renderer/gl/gl_skin.c +++ b/libs/video/renderer/gl/gl_skin.c @@ -38,11 +38,11 @@ static __attribute__ ((used)) const char rcsid[] = # include #endif -#include "QF/console.h" #include "QF/cvar.h" #include "QF/image.h" #include "QF/render.h" #include "QF/skin.h" +#include "QF/sys.h" #include "QF/GL/defines.h" #include "QF/GL/funcs.h" #include "QF/GL/qf_textures.h" @@ -221,7 +221,7 @@ Skin_Do_Translation_Model (model_t *model, int skinnum, int slot, skin_t *skin) paliashdr = Cache_Get (&model->cache); if (skinnum < 0 || skinnum >= paliashdr->mdl.numskins) { - Con_Printf ("(%d): Invalid player skin #%d\n", slot, + Sys_Printf ("(%d): Invalid player skin #%d\n", slot, skinnum); skinnum = 0; } diff --git a/libs/video/renderer/gl/gl_sky.c b/libs/video/renderer/gl/gl_sky.c index 72970534f..4bd502017 100644 --- a/libs/video/renderer/gl/gl_sky.c +++ b/libs/video/renderer/gl/gl_sky.c @@ -38,11 +38,11 @@ static __attribute__ ((used)) const char rcsid[] = # include #endif -#include "QF/console.h" #include "QF/cvar.h" #include "QF/image.h" #include "QF/quakefs.h" #include "QF/render.h" +#include "QF/sys.h" #include "QF/va.h" #include "QF/vid.h" #include "QF/GL/defines.h" @@ -129,11 +129,11 @@ R_LoadSkys (const char *skyname) targa = LoadImage (name = va ("env/%s%s", skyname, suf[i])); if (!targa || targa->format < 3) { // FIXME Can't do PCX right now - Con_DPrintf ("Couldn't load %s\n", name); + Sys_DPrintf ("Couldn't load %s\n", name); // also look in gfx/env, where Darkplaces looks for skies targa = LoadImage (name = va ("gfx/env/%s%s", skyname, suf[i])); if (!targa) { - Con_DPrintf ("Couldn't load %s\n", name); + Sys_DPrintf ("Couldn't load %s\n", name); skyloaded = false; continue; } @@ -169,7 +169,7 @@ R_LoadSkys (const char *skyname) #endif } if (!skyloaded) - Con_Printf ("Unable to load skybox %s, using normal sky\n", skyname); + Sys_Printf ("Unable to load skybox %s, using normal sky\n", skyname); } static void diff --git a/libs/video/renderer/gl/gl_textures.c b/libs/video/renderer/gl/gl_textures.c index fd74efc88..203ab1a24 100644 --- a/libs/video/renderer/gl/gl_textures.c +++ b/libs/video/renderer/gl/gl_textures.c @@ -42,7 +42,6 @@ static __attribute__ ((used)) const char rcsid[] = #include #include "QF/cmd.h" -#include "QF/console.h" #include "QF/crc.h" #include "QF/cvar.h" #include "QF/draw.h" @@ -197,10 +196,10 @@ GL_TextureMode_f (void) if (Cmd_Argc () == 1) { for (i = 0; i < 6; i++) if (gl_filter_min == modes[i].minimize) { - Con_Printf ("%s\n", modes[i].name); + Sys_Printf ("%s\n", modes[i].name); return; } - Con_Printf ("current filter is unknown?\n"); + Sys_Printf ("current filter is unknown?\n"); return; } @@ -210,7 +209,7 @@ GL_TextureMode_f (void) } if (i == 6) { - Con_Printf ("bad filter name\n"); + Sys_Printf ("bad filter name\n"); return; } @@ -240,10 +239,10 @@ GL_TextureDepth_f (int format) for (i = 0; i < 42; i++) { if (format == formats[i].format) { - Con_Printf ("%s\n", formats[i].name); + Sys_Printf ("%s\n", formats[i].name); return GL_RGBA; } - Con_Printf ("Current texture format is unknown.\n"); + Sys_Printf ("Current texture format is unknown.\n"); return GL_RGBA; } @@ -253,7 +252,7 @@ GL_TextureDepth_f (int format) } if (formats[i].format == 0) { - Con_Printf ("bad texture format name\n"); + Sys_Printf ("bad texture format name\n"); return GL_RGBA; } diff --git a/libs/video/renderer/r_progs.c b/libs/video/renderer/r_progs.c index e8b9bd1b8..4539bc016 100644 --- a/libs/video/renderer/r_progs.c +++ b/libs/video/renderer/r_progs.c @@ -39,11 +39,11 @@ static __attribute__ ((used)) const char rcsid[] = #endif #include -#include "QF/console.h" #include "QF/draw.h" #include "QF/hash.h" #include "QF/progs.h" #include "QF/render.h" +#include "QF/sys.h" typedef struct { int width; @@ -84,7 +84,7 @@ bi_Draw_CachePic (progs_t *pr) qpic_res_t *rpic = Hash_Find (res->pic_hash, path); if (!pic) { - Con_DPrintf ("can't load %s\n", path); + Sys_DPrintf ("can't load %s\n", path); R_INT (pr) = 0; return; } diff --git a/libs/video/renderer/r_screen.c b/libs/video/renderer/r_screen.c index 1a2f0ce59..69a9c10ae 100644 --- a/libs/video/renderer/r_screen.c +++ b/libs/video/renderer/r_screen.c @@ -39,7 +39,6 @@ static __attribute__ ((used)) const char rcsid[] = #endif #include "QF/cmd.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/draw.h" #include "QF/image.h" @@ -83,7 +82,7 @@ static __attribute__ ((used)) const char rcsid[] = CenterPrint () SlowPrint () Screen_Update (); - Con_Printf (); + Sys_Printf (); net turn off messages option diff --git a/libs/video/renderer/sw/draw.c b/libs/video/renderer/sw/draw.c index 7b207c33d..a853b9242 100644 --- a/libs/video/renderer/sw/draw.c +++ b/libs/video/renderer/sw/draw.c @@ -38,7 +38,6 @@ static __attribute__ ((used)) const char rcsid[] = # include #endif -#include "QF/console.h" #include "QF/cvar.h" #include "QF/draw.h" #include "QF/quakefs.h" @@ -609,7 +608,7 @@ Draw_Fill (int x, int y, int w, int h, int c) if (x < 0 || x + w > (int) vid.width || y < 0 || y + h > (int) vid.height) { - Con_Printf ("Bad Draw_Fill(%d, %d, %d, %d, %c)\n", x, y, w, h, c); + Sys_Printf ("Bad Draw_Fill(%d, %d, %d, %d, %c)\n", x, y, w, h, c); return; } diff --git a/libs/video/renderer/sw/screen.c b/libs/video/renderer/sw/screen.c index c5636e1ae..63422abc9 100644 --- a/libs/video/renderer/sw/screen.c +++ b/libs/video/renderer/sw/screen.c @@ -40,7 +40,6 @@ static __attribute__ ((used)) const char rcsid[] = #include -#include "QF/console.h" #include "QF/cvar.h" #include "QF/draw.h" #include "QF/dstring.h" @@ -163,7 +162,7 @@ SCR_ScreenShot_f (void) // find a file name to save it to if (!QFS_NextFilename (pcxname, va ("%s/qf", qfs_gamedir->dir.def), ".pcx")) { - Con_Printf ("SCR_ScreenShot_f: Couldn't create a PCX"); + Sys_Printf ("SCR_ScreenShot_f: Couldn't create a PCX"); } else { // enable direct drawing of console to back buffer D_EnableBackBufferAccess (); @@ -178,7 +177,7 @@ SCR_ScreenShot_f (void) // time D_DisableBackBufferAccess (); - Con_Printf ("Wrote %s/%s\n", qfs_userpath, pcxname->str); + Sys_Printf ("Wrote %s/%s\n", qfs_userpath, pcxname->str); } dstring_delete (pcxname); } diff --git a/libs/video/renderer/sw/sw_ralias.c b/libs/video/renderer/sw/sw_ralias.c index 5704789b4..98cd4aaee 100644 --- a/libs/video/renderer/sw/sw_ralias.c +++ b/libs/video/renderer/sw/sw_ralias.c @@ -35,7 +35,6 @@ static __attribute__ ((used)) const char rcsid[] = # include #endif -#include "QF/console.h" #include "QF/image.h" #include "QF/render.h" #include "QF/skin.h" @@ -118,7 +117,7 @@ R_AliasCheckBBox (void) frame = currententity->frame; // TODO: don't repeat this check when drawing? if ((frame >= pmdl->numframes) || (frame < 0)) { - Con_DPrintf ("No such frame %d %s\n", frame, pmodel->name); + Sys_DPrintf ("No such frame %d %s\n", frame, pmodel->name); frame = 0; } @@ -563,7 +562,7 @@ R_AliasSetupSkin (void) skinnum = currententity->skinnum; if ((skinnum >= pmdl->numskins) || (skinnum < 0)) { - Con_DPrintf ("R_AliasSetupSkin: no such skin # %d\n", skinnum); + Sys_DPrintf ("R_AliasSetupSkin: no such skin # %d\n", skinnum); skinnum = 0; } @@ -656,7 +655,7 @@ R_AliasSetupFrame (void) frame = currententity->frame; if ((frame >= pmdl->numframes) || (frame < 0)) { - Con_DPrintf ("R_AliasSetupFrame: no such frame %d\n", frame); + Sys_DPrintf ("R_AliasSetupFrame: no such frame %d\n", frame); frame = 0; } diff --git a/libs/video/renderer/sw/sw_rbsp.c b/libs/video/renderer/sw/sw_rbsp.c index 7b75467e3..03f0aeba0 100644 --- a/libs/video/renderer/sw/sw_rbsp.c +++ b/libs/video/renderer/sw/sw_rbsp.c @@ -33,7 +33,6 @@ static __attribute__ ((used)) const char rcsid[] = #include -#include "QF/console.h" #include "QF/render.h" #include "QF/sys.h" @@ -216,7 +215,7 @@ R_RecursiveClipBPoly (bedge_t *pedges, mnode_t *pnode, msurface_t *psurf) // and exiting points // FIXME: share the clip edge by having a winding direction flag? if (numbedges >= (MAX_BMODEL_EDGES - 1)) { - Con_Printf ("Out of edges for bmodel\n"); + Sys_Printf ("Out of edges for bmodel\n"); return; } @@ -253,7 +252,7 @@ R_RecursiveClipBPoly (bedge_t *pedges, mnode_t *pnode, msurface_t *psurf) // plane to both sides (but in opposite directions) if (makeclippededge) { if (numbedges >= (MAX_BMODEL_EDGES - 2)) { - Con_Printf ("Out of edges for bmodel\n"); + Sys_Printf ("Out of edges for bmodel\n"); return; } diff --git a/libs/video/renderer/sw/sw_rmain.c b/libs/video/renderer/sw/sw_rmain.c index 35b5ad5f3..c1b666c39 100644 --- a/libs/video/renderer/sw/sw_rmain.c +++ b/libs/video/renderer/sw/sw_rmain.c @@ -47,7 +47,6 @@ static __attribute__ ((used)) const char rcsid[] = #include #include "QF/cmd.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/locs.h" #include "QF/mathlib.h" @@ -862,10 +861,10 @@ R_RenderView_ (void) R_PrintDSpeeds (); if (r_reportsurfout->int_val && r_outofsurfaces) - Con_Printf ("Short %d surfaces\n", r_outofsurfaces); + Sys_Printf ("Short %d surfaces\n", r_outofsurfaces); if (r_reportedgeout->int_val && r_outofedges) - Con_Printf ("Short roughly %d edges\n", r_outofedges * 2 / 3); + Sys_Printf ("Short roughly %d edges\n", r_outofedges * 2 / 3); // back to high floating-point precision R_HighFPPrecision (); diff --git a/libs/video/renderer/sw/sw_rmisc.c b/libs/video/renderer/sw/sw_rmisc.c index d37b814d8..8fd36a7f6 100644 --- a/libs/video/renderer/sw/sw_rmisc.c +++ b/libs/video/renderer/sw/sw_rmisc.c @@ -32,7 +32,6 @@ static __attribute__ ((used)) const char rcsid[] = "$Id$"; #include "QF/cmd.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/draw.h" #include "QF/render.h" @@ -81,7 +80,7 @@ R_TimeRefresh_f (void) } stop = Sys_DoubleTime (); time = stop - start; - Con_Printf ("%f seconds (%f fps)\n", time, 128 / time); + Sys_Printf ("%f seconds (%f fps)\n", time, 128 / time); r_refdef.viewangles[1] = startangle; } @@ -90,7 +89,7 @@ void R_LoadSky_f (void) { if (Cmd_Argc () != 2) { - Con_Printf ("loadsky : load a skybox\n"); + Sys_Printf ("loadsky : load a skybox\n"); return; } @@ -107,7 +106,7 @@ R_PrintTimes (void) ms = 1000 * (r_time2 - r_time1); - Con_Printf ("%5.1f ms %3i/%3i/%3i poly %3i surf\n", + Sys_Printf ("%5.1f ms %3i/%3i/%3i poly %3i surf\n", ms, c_faceclip, r_polycount, r_drawnpolycount, c_surf); c_surf = 0; } @@ -129,7 +128,7 @@ R_PrintDSpeeds (void) dv_time = (dv_time2 - dv_time1) * 1000; ms = (r_time2 - r_time1) * 1000; - Con_Printf ("%3i %4.1fp %3iw %4.1fb %3is %4.1fe %4.1fv\n", + Sys_Printf ("%3i %4.1fp %3iw %4.1fb %3is %4.1fe %4.1fv\n", (int) ms, dp_time, (int) rw_time, db_time, (int) se_time, de_time, dv_time); } @@ -137,7 +136,7 @@ R_PrintDSpeeds (void) void R_PrintAliasStats (void) { - Con_Printf ("%3i polygon model drawn\n", r_amodels_drawn); + Sys_Printf ("%3i polygon model drawn\n", r_amodels_drawn); } void @@ -225,7 +224,7 @@ R_SetupFrame (void) if ((surface_p - surfaces) > r_maxsurfsseen) r_maxsurfsseen = surface_p - surfaces; - Con_Printf ("Used %ld of %ld surfs; %d max\n", + Sys_Printf ("Used %ld of %ld surfs; %d max\n", (long)(surface_p - surfaces), (long)(surf_max - surfaces), r_maxsurfsseen); } @@ -236,7 +235,7 @@ R_SetupFrame (void) if (edgecount > r_maxedgesseen) r_maxedgesseen = edgecount; - Con_Printf ("Used %d of %d edges; %d max\n", edgecount, + Sys_Printf ("Used %d of %d edges; %d max\n", edgecount, r_numallocatededges, r_maxedgesseen); } diff --git a/libs/video/renderer/sw/sw_rpart.c b/libs/video/renderer/sw/sw_rpart.c index a84dcb26a..01359f6f8 100644 --- a/libs/video/renderer/sw/sw_rpart.c +++ b/libs/video/renderer/sw/sw_rpart.c @@ -33,11 +33,11 @@ static __attribute__ ((used)) const char rcsid[] = #include -#include "QF/console.h" #include "QF/cvar.h" #include "QF/qargs.h" #include "QF/quakefs.h" #include "QF/render.h" +#include "QF/sys.h" #include "compat.h" #include "r_cvar.h" @@ -81,11 +81,11 @@ R_ReadPointFile_f (void) QFS_FOpenFile (name, &f); if (!f) { - Con_Printf ("couldn't open %s\n", name); + Sys_Printf ("couldn't open %s\n", name); return; } - Con_Printf ("Reading %s...\n", name); + Sys_Printf ("Reading %s...\n", name); c = 0; for (;;) { char buf[64]; @@ -97,7 +97,7 @@ R_ReadPointFile_f (void) c++; if (!free_particles) { - Con_Printf ("Not enough free particles\n"); + Sys_Printf ("Not enough free particles\n"); break; } p = free_particles; @@ -113,7 +113,7 @@ R_ReadPointFile_f (void) } Qclose (f); - Con_Printf ("%i points read\n", c); + Sys_Printf ("%i points read\n", c); } static void @@ -818,7 +818,7 @@ R_DrawParticles (void) p->vel[2] -= grav; break; default: - Con_DPrintf ("unhandled particle type %d\n", p->type); + Sys_DPrintf ("unhandled particle type %d\n", p->type); break; } } diff --git a/libs/video/renderer/sw/sw_rsprite.c b/libs/video/renderer/sw/sw_rsprite.c index 6a393fee8..da1b09f2d 100644 --- a/libs/video/renderer/sw/sw_rsprite.c +++ b/libs/video/renderer/sw/sw_rsprite.c @@ -40,7 +40,6 @@ static __attribute__ ((used)) const char rcsid[] = #include -#include "QF/console.h" #include "QF/render.h" #include "QF/sys.h" @@ -253,7 +252,7 @@ R_GetSpriteframe (msprite_t *psprite) frame = currententity->frame; if ((frame >= psprite->numframes) || (frame < 0)) { - Con_Printf ("R_DrawSprite: no such frame %d\n", frame); + Sys_Printf ("R_DrawSprite: no such frame %d\n", frame); frame = 0; } diff --git a/libs/video/renderer/sw32/draw.c b/libs/video/renderer/sw32/draw.c index fdda1c45d..9b3ab4166 100644 --- a/libs/video/renderer/sw32/draw.c +++ b/libs/video/renderer/sw32/draw.c @@ -38,7 +38,6 @@ static __attribute__ ((used)) const char rcsid[] = # include #endif -#include "QF/console.h" #include "QF/cvar.h" #include "QF/draw.h" #include "QF/quakefs.h" @@ -1021,7 +1020,7 @@ Draw_Fill (int x, int y, int w, int h, int c) if (x < 0 || x + w > (int) vid.width || y < 0 || y + h > (int) vid.height) { - Con_Printf ("Bad Draw_Fill(%d, %d, %d, %d, %c)\n", x, y, w, h, c); + Sys_Printf ("Bad Draw_Fill(%d, %d, %d, %d, %c)\n", x, y, w, h, c); return; } diff --git a/libs/video/renderer/sw32/screen.c b/libs/video/renderer/sw32/screen.c index 21bbcee6a..313ce52fb 100644 --- a/libs/video/renderer/sw32/screen.c +++ b/libs/video/renderer/sw32/screen.c @@ -40,7 +40,6 @@ static __attribute__ ((used)) const char rcsid[] = #include -#include "QF/console.h" #include "QF/cvar.h" #include "QF/draw.h" #include "QF/dstring.h" @@ -172,7 +171,7 @@ SCR_ScreenShot_f (void) // find a file name to save it to if (!QFS_NextFilename (pcxname, va ("%s/qf", qfs_gamedir->dir.def), ".pcx")) { - Con_Printf ("SCR_ScreenShot_f: Couldn't create a PCX"); + Sys_Printf ("SCR_ScreenShot_f: Couldn't create a PCX"); } else { // enable direct drawing of console to back buffer D_EnableBackBufferAccess (); @@ -184,10 +183,10 @@ SCR_ScreenShot_f (void) vid.basepal, false, &pcx_len); break; case 2: - Con_Printf("SCR_ScreenShot_f: FIXME - add 16bit support\n"); + Sys_Printf("SCR_ScreenShot_f: FIXME - add 16bit support\n"); break; case 4: - Con_Printf("SCR_ScreenShot_f: FIXME - add 32bit support\n"); + Sys_Printf("SCR_ScreenShot_f: FIXME - add 32bit support\n"); break; default: Sys_Error("SCR_ScreenShot_f: unsupported r_pixbytes %i", r_pixbytes); @@ -198,7 +197,7 @@ SCR_ScreenShot_f (void) if (pcx) { QFS_WriteFile (pcxname->str, pcx, pcx_len); - Con_Printf ("Wrote %s/%s\n", qfs_userpath, pcxname->str); + Sys_Printf ("Wrote %s/%s\n", qfs_userpath, pcxname->str); } } dstring_delete (pcxname); diff --git a/libs/video/renderer/sw32/sw32_ralias.c b/libs/video/renderer/sw32/sw32_ralias.c index 847db0523..fa206628c 100644 --- a/libs/video/renderer/sw32/sw32_ralias.c +++ b/libs/video/renderer/sw32/sw32_ralias.c @@ -35,7 +35,6 @@ static __attribute__ ((used)) const char rcsid[] = # include #endif -#include "QF/console.h" #include "QF/image.h" #include "QF/render.h" #include "QF/skin.h" @@ -118,7 +117,7 @@ R_AliasCheckBBox (void) frame = currententity->frame; // TODO: don't repeat this check when drawing? if ((frame >= pmdl->numframes) || (frame < 0)) { - Con_DPrintf ("No such frame %d %s\n", frame, pmodel->name); + Sys_DPrintf ("No such frame %d %s\n", frame, pmodel->name); frame = 0; } @@ -558,7 +557,7 @@ R_AliasSetupSkin (void) skinnum = currententity->skinnum; if ((skinnum >= pmdl->numskins) || (skinnum < 0)) { - Con_DPrintf ("R_AliasSetupSkin: no such skin # %d\n", skinnum); + Sys_DPrintf ("R_AliasSetupSkin: no such skin # %d\n", skinnum); skinnum = 0; } @@ -651,7 +650,7 @@ R_AliasSetupFrame (void) frame = currententity->frame; if ((frame >= pmdl->numframes) || (frame < 0)) { - Con_DPrintf ("R_AliasSetupFrame: no such frame %d\n", frame); + Sys_DPrintf ("R_AliasSetupFrame: no such frame %d\n", frame); frame = 0; } diff --git a/libs/video/renderer/sw32/sw32_rbsp.c b/libs/video/renderer/sw32/sw32_rbsp.c index 95cee9496..2cce998e5 100644 --- a/libs/video/renderer/sw32/sw32_rbsp.c +++ b/libs/video/renderer/sw32/sw32_rbsp.c @@ -33,7 +33,6 @@ static __attribute__ ((used)) const char rcsid[] = #include -#include "QF/console.h" #include "QF/render.h" #include "QF/sys.h" @@ -216,7 +215,7 @@ R_RecursiveClipBPoly (bedge_t *pedges, mnode_t *pnode, msurface_t *psurf) // and exiting points // FIXME: share the clip edge by having a winding direction flag? if (numbedges >= (MAX_BMODEL_EDGES - 1)) { - Con_Printf ("Out of edges for bmodel\n"); + Sys_Printf ("Out of edges for bmodel\n"); return; } @@ -253,7 +252,7 @@ R_RecursiveClipBPoly (bedge_t *pedges, mnode_t *pnode, msurface_t *psurf) // plane to both sides (but in opposite directions) if (makeclippededge) { if (numbedges >= (MAX_BMODEL_EDGES - 2)) { - Con_Printf ("Out of edges for bmodel\n"); + Sys_Printf ("Out of edges for bmodel\n"); return; } diff --git a/libs/video/renderer/sw32/sw32_rmain.c b/libs/video/renderer/sw32/sw32_rmain.c index 806a560d7..7720193f0 100644 --- a/libs/video/renderer/sw32/sw32_rmain.c +++ b/libs/video/renderer/sw32/sw32_rmain.c @@ -44,7 +44,6 @@ static __attribute__ ((used)) const char rcsid[] = #include #include "QF/cmd.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/locs.h" #include "QF/mathlib.h" @@ -879,10 +878,10 @@ R_RenderView_ (void) R_PrintDSpeeds (); if (r_reportsurfout->int_val && r_outofsurfaces) - Con_Printf ("Short %d surfaces\n", r_outofsurfaces); + Sys_Printf ("Short %d surfaces\n", r_outofsurfaces); if (r_reportedgeout->int_val && r_outofedges) - Con_Printf ("Short roughly %d edges\n", r_outofedges * 2 / 3); + Sys_Printf ("Short roughly %d edges\n", r_outofedges * 2 / 3); } VISIBLE void diff --git a/libs/video/renderer/sw32/sw32_rmisc.c b/libs/video/renderer/sw32/sw32_rmisc.c index e503f4639..5c35d41ac 100644 --- a/libs/video/renderer/sw32/sw32_rmisc.c +++ b/libs/video/renderer/sw32/sw32_rmisc.c @@ -32,7 +32,6 @@ static __attribute__ ((used)) const char rcsid[] = "$Id$"; #include "QF/cmd.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/draw.h" #include "QF/render.h" @@ -81,7 +80,7 @@ R_TimeRefresh_f (void) } stop = Sys_DoubleTime (); time = stop - start; - Con_Printf ("%f seconds (%f fps)\n", time, 128 / time); + Sys_Printf ("%f seconds (%f fps)\n", time, 128 / time); r_refdef.viewangles[1] = startangle; } @@ -90,7 +89,7 @@ void R_LoadSky_f (void) { if (Cmd_Argc () != 2) { - Con_Printf ("loadsky : load a skybox\n"); + Sys_Printf ("loadsky : load a skybox\n"); return; } @@ -107,7 +106,7 @@ R_PrintTimes (void) ms = 1000 * (r_time2 - r_time1); - Con_Printf ("%5.1f ms %3i/%3i/%3i poly %3i surf\n", + Sys_Printf ("%5.1f ms %3i/%3i/%3i poly %3i surf\n", ms, c_faceclip, r_polycount, r_drawnpolycount, c_surf); c_surf = 0; } @@ -129,7 +128,7 @@ R_PrintDSpeeds (void) dv_time = (dv_time2 - dv_time1) * 1000; ms = (r_time2 - r_time1) * 1000; - Con_Printf ("%3i %4.1fp %3iw %4.1fb %3is %4.1fe %4.1fv\n", + Sys_Printf ("%3i %4.1fp %3iw %4.1fb %3is %4.1fe %4.1fv\n", (int) ms, dp_time, (int) rw_time, db_time, (int) se_time, de_time, dv_time); } @@ -137,7 +136,7 @@ R_PrintDSpeeds (void) void R_PrintAliasStats (void) { - Con_Printf ("%3i polygon model drawn\n", r_amodels_drawn); + Sys_Printf ("%3i polygon model drawn\n", r_amodels_drawn); } void @@ -219,7 +218,7 @@ R_SetupFrame (void) if ((surface_p - surfaces) > r_maxsurfsseen) r_maxsurfsseen = surface_p - surfaces; - Con_Printf ("Used %ld of %ld surfs; %d max\n", + Sys_Printf ("Used %ld of %ld surfs; %d max\n", (long) (surface_p - surfaces), (long) (surf_max - surfaces), r_maxsurfsseen); } @@ -230,7 +229,7 @@ R_SetupFrame (void) if (edgecount > r_maxedgesseen) r_maxedgesseen = edgecount; - Con_Printf ("Used %d of %d edges; %d max\n", edgecount, + Sys_Printf ("Used %d of %d edges; %d max\n", edgecount, r_numallocatededges, r_maxedgesseen); } diff --git a/libs/video/renderer/sw32/sw32_rpart.c b/libs/video/renderer/sw32/sw32_rpart.c index ee52382db..db98ca094 100644 --- a/libs/video/renderer/sw32/sw32_rpart.c +++ b/libs/video/renderer/sw32/sw32_rpart.c @@ -33,11 +33,11 @@ static __attribute__ ((used)) const char rcsid[] = #include -#include "QF/console.h" #include "QF/cvar.h" #include "QF/qargs.h" #include "QF/quakefs.h" #include "QF/render.h" +#include "QF/sys.h" #include "compat.h" #include "r_cvar.h" @@ -82,11 +82,11 @@ R_ReadPointFile_f (void) QFS_FOpenFile (name, &f); if (!f) { - Con_Printf ("couldn't open %s\n", name); + Sys_Printf ("couldn't open %s\n", name); return; } - Con_Printf ("Reading %s...\n", name); + Sys_Printf ("Reading %s...\n", name); c = 0; for (;;) { char buf[64]; @@ -98,7 +98,7 @@ R_ReadPointFile_f (void) c++; if (!free_particles) { - Con_Printf ("Not enough free particles\n"); + Sys_Printf ("Not enough free particles\n"); break; } p = free_particles; @@ -114,7 +114,7 @@ R_ReadPointFile_f (void) } Qclose (f); - Con_Printf ("%i points read\n", c); + Sys_Printf ("%i points read\n", c); } static void @@ -828,7 +828,7 @@ R_DrawParticles (void) p->vel[2] -= grav; break; default: - Con_DPrintf ("unhandled particle type %d\n", p->type); + Sys_DPrintf ("unhandled particle type %d\n", p->type); break; } } diff --git a/libs/video/renderer/sw32/sw32_rsprite.c b/libs/video/renderer/sw32/sw32_rsprite.c index 1d7eca4d3..b69e74828 100644 --- a/libs/video/renderer/sw32/sw32_rsprite.c +++ b/libs/video/renderer/sw32/sw32_rsprite.c @@ -40,7 +40,6 @@ static __attribute__ ((used)) const char rcsid[] = #include -#include "QF/console.h" #include "QF/render.h" #include "QF/sys.h" @@ -246,7 +245,7 @@ R_GetSpriteframe (msprite_t *psprite) frame = currententity->frame; if ((frame >= psprite->numframes) || (frame < 0)) { - Con_Printf ("R_DrawSprite: no such frame %d\n", frame); + Sys_Printf ("R_DrawSprite: no such frame %d\n", frame); frame = 0; } diff --git a/libs/video/targets/context_sdl.c b/libs/video/targets/context_sdl.c index 3224a2cb7..72587ea09 100644 --- a/libs/video/targets/context_sdl.c +++ b/libs/video/targets/context_sdl.c @@ -15,9 +15,9 @@ static __attribute__ ((used)) const char rcsid[] = #include #include -#include "QF/console.h" #include "QF/cvar.h" #include "QF/input.h" +#include "QF/sys.h" #include "QF/va.h" #include "QF/vid.h" @@ -72,7 +72,7 @@ VID_UpdateFullscreen (cvar_t *vid_fullscreen) if ((vid_fullscreen->int_val && !(screen->flags & SDL_FULLSCREEN)) || (!vid_fullscreen->int_val && screen->flags & SDL_FULLSCREEN)) if (!SDL_WM_ToggleFullScreen (screen)) - Con_Printf ("VID_UpdateFullscreen: error setting fullscreen\n"); + Sys_Printf ("VID_UpdateFullscreen: error setting fullscreen\n"); IN_UpdateGrab (in_grab); } diff --git a/libs/video/targets/context_x11.c b/libs/video/targets/context_x11.c index 773fa41a1..320936380 100644 --- a/libs/video/targets/context_x11.c +++ b/libs/video/targets/context_x11.c @@ -63,7 +63,6 @@ static __attribute__ ((used)) const char rcsid[] = # include #endif -#include "QF/console.h" #include "QF/cvar.h" #include "QF/input.h" #include "QF/qargs.h" @@ -129,7 +128,7 @@ configure_notify (XEvent *event) if (vidmode_active) X11_ForceViewPort (); #endif - Con_DPrintf ("ConfigureNotify: %ld %d %ld %ld %d,%d (%d,%d) %d %ld %d\n", + Sys_DPrintf ("ConfigureNotify: %ld %d %ld %ld %d,%d (%d,%d) %d %ld %d\n", c->serial, c->send_event, c->event, c->window, c->x, c->y, c->width, c->height, c->border_width, c->above, c->override_redirect); @@ -139,7 +138,7 @@ qboolean X11_AddEvent (int event, void (*event_handler) (XEvent *)) { if (event >= LASTEvent) { - Sys_Printf ("event: %d, LASTEvent: %d\n", event, LASTEvent); + Sys_DPrintf ("event: %d, LASTEvent: %d\n", event, LASTEvent); return false; } @@ -430,7 +429,7 @@ X11_SetVidMode (int width, int height) } if (found_mode) { - Con_DPrintf ("VID: Chose video mode: %dx%d\n", scr_width, + Sys_DPrintf ("VID: Chose video mode: %dx%d\n", scr_width, scr_height); XF86VidModeSwitchToMode (x_disp, x_screen, @@ -438,7 +437,7 @@ X11_SetVidMode (int width, int height) vidmode_active = true; X11_SetScreenSaver (); } else { - Con_Printf ("VID: Mode %dx%d can't go fullscreen.\n", + Sys_Printf ("VID: Mode %dx%d can't go fullscreen.\n", scr_width, scr_height); vidmode_avail = vidmode_active = false; } diff --git a/libs/video/targets/dga_check.c b/libs/video/targets/dga_check.c index 7fd93436a..04c33cd6e 100644 --- a/libs/video/targets/dga_check.c +++ b/libs/video/targets/dga_check.c @@ -53,7 +53,7 @@ static __attribute__ ((used)) const char rcsid[] = # include #endif -#include "QF/console.h" +#include "QF/sys.h" #include "dga_check.h" @@ -88,11 +88,11 @@ VID_CheckDGA (Display * dpy, int *maj_ver, int *min_ver, int *hasvideo) } if ((!maj_ver) || (*maj_ver != XDGA_MAJOR_VERSION)) { - Con_Printf ("VID: Incorrect DGA version: %d.%d, \n", *maj_ver, + Sys_Printf ("VID: Incorrect DGA version: %d.%d, \n", *maj_ver, *min_ver); return false; } - Con_Printf ("VID: DGA version: %d.%d\n", *maj_ver, *min_ver); + Sys_Printf ("VID: DGA version: %d.%d\n", *maj_ver, *min_ver); if (!hasvideo) hasvideo = &dummy_video; @@ -142,12 +142,12 @@ VID_CheckVMode (Display * dpy, int *maj_ver, int *min_ver) return false; if ((!maj_ver) || (*maj_ver != XF86VIDMODE_MAJOR_VERSION)) { - Con_Printf ("VID: Incorrect VidMode version: %d.%d\n", *maj_ver, + Sys_Printf ("VID: Incorrect VidMode version: %d.%d\n", *maj_ver, *min_ver); return false; } - Con_Printf ("VID: VidMode version: %d.%d\n", *maj_ver, *min_ver); + Sys_Printf ("VID: VidMode version: %d.%d\n", *maj_ver, *min_ver); return true; #else return false; diff --git a/libs/video/targets/in_common.c b/libs/video/targets/in_common.c index 9aec41635..f8d645fab 100644 --- a/libs/video/targets/in_common.c +++ b/libs/video/targets/in_common.c @@ -50,13 +50,13 @@ static __attribute__ ((used)) const char rcsid[] = #include #include -#include "QF/console.h" #include "QF/cvar.h" #include "QF/in_event.h" #include "QF/input.h" #include "QF/joystick.h" #include "QF/keys.h" #include "QF/mathlib.h" +#include "QF/sys.h" #include "QF/vid.h" VISIBLE viewdelta_t viewdelta; @@ -135,7 +135,7 @@ IN_Shutdown (void) { JOY_Shutdown (); - Con_Printf ("IN_Shutdown\n"); + Sys_Printf ("IN_Shutdown\n"); IN_LL_Shutdown (); IE_Shutdown (); diff --git a/libs/video/targets/in_svgalib.c b/libs/video/targets/in_svgalib.c index 72fcddafa..5904753c5 100644 --- a/libs/video/targets/in_svgalib.c +++ b/libs/video/targets/in_svgalib.c @@ -51,7 +51,6 @@ static __attribute__ ((used)) const char rcsid[] = #include #include "QF/cmd.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/input.h" #include "QF/joystick.h" @@ -116,7 +115,7 @@ keyhandler (int scancode, int state) default: break; } - //Con_DPrintf ("%d %02x %02lx %04x %c\n", sc, press, shifts, + //Sys_DPrintf ("%d %02x %02lx %04x %c\n", sc, press, shifts, // key, ascii > 32 && ascii < 127 ? ascii : '#'); Key_Event (key, ascii, press); } @@ -394,7 +393,7 @@ IN_InitMouse (void) // closing it to ensure its opened how we want it mouse_close(); if (mouse_init ((char *)mousedev, mtype, mouserate)) { - Con_Printf ("No mouse found. Check your libvga.conf mouse settings" + Sys_Printf ("No mouse found. Check your libvga.conf mouse settings" " and that the mouse\n" "device has appropriate permission settings.\n"); UseMouse = 0; @@ -407,7 +406,7 @@ IN_InitMouse (void) void IN_LL_Shutdown (void) { - Con_Printf ("IN_LL_Shutdown\n"); + Sys_Printf ("IN_LL_Shutdown\n"); if (UseMouse) mouse_close (); diff --git a/libs/video/targets/in_win.c b/libs/video/targets/in_win.c index 202154075..059edd6f2 100644 --- a/libs/video/targets/in_win.c +++ b/libs/video/targets/in_win.c @@ -41,7 +41,6 @@ static __attribute__ ((used)) const char rcsid[] = #include #include "QF/cmd.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/input.h" #include "QF/keys.h" @@ -224,7 +223,7 @@ IN_InitDInput (void) hInstDI = LoadLibrary ("dinput.dll"); if (hInstDI == NULL) { - Con_Printf ("Couldn't load dinput.dll\n"); + Sys_Printf ("Couldn't load dinput.dll\n"); return false; } } @@ -234,7 +233,7 @@ IN_InitDInput (void) (void *) GetProcAddress (hInstDI, "DirectInputCreateA"); if (!pDirectInputCreate) { - Con_Printf ("Couldn't get DI proc addr\n"); + Sys_Printf ("Couldn't get DI proc addr\n"); return false; } } @@ -248,14 +247,14 @@ IN_InitDInput (void) hr = IDirectInput_CreateDevice (g_pdi, &GUID_SysMouse, &g_pMouse, NULL); if (FAILED (hr)) { - Con_Printf ("Couldn't open DI mouse device\n"); + Sys_Printf ("Couldn't open DI mouse device\n"); return false; } // set the data format to "mouse format". hr = IDirectInputDevice_SetDataFormat (g_pMouse, &df); if (FAILED (hr)) { - Con_Printf ("Couldn't set DI mouse format\n"); + Sys_Printf ("Couldn't set DI mouse format\n"); return false; } // set the cooperativity level. @@ -264,7 +263,7 @@ IN_InitDInput (void) DISCL_FOREGROUND); if (FAILED (hr)) { - Con_Printf ("Couldn't set DI coop level\n"); + Sys_Printf ("Couldn't set DI coop level\n"); return false; } @@ -274,7 +273,7 @@ IN_InitDInput (void) &dipdw.diph); if (FAILED (hr)) { - Con_Printf ("Couldn't set DI buffersize\n"); + Sys_Printf ("Couldn't set DI buffersize\n"); return false; } @@ -295,9 +294,9 @@ IN_StartupMouse (void) dinput = IN_InitDInput (); if (dinput) { - Con_Printf ("DirectInput initialized\n"); + Sys_Printf ("DirectInput initialized\n"); } else { - Con_Printf ("DirectInput not initialized\n"); + Sys_Printf ("DirectInput not initialized\n"); } } @@ -681,7 +680,7 @@ MapKey (unsigned int keycode, int press, int *k, int *u) break; } - Con_DPrintf ("%08x %d %02x %02lx %04x %c\n", keycode, press, scan, shifts, + Sys_DPrintf ("%08x %d %02x %02lx %04x %c\n", keycode, press, scan, shifts, key, uc > 32 && uc < 127 ? uc : '#'); *k = key; *u = uc; diff --git a/libs/video/targets/in_x11.c b/libs/video/targets/in_x11.c index 75954d02e..618344f28 100644 --- a/libs/video/targets/in_x11.c +++ b/libs/video/targets/in_x11.c @@ -60,7 +60,6 @@ static __attribute__ ((used)) const char rcsid[] = #endif #include "QF/cdaudio.h" -#include "QF/console.h" #include "QF/cmd.h" #include "QF/cvar.h" #include "QF/input.h" @@ -591,7 +590,7 @@ grab_error (int code, const char *device) reason = "unknown reason"; break; } - Con_Printf ("failed to grab %s: %s\n", device, reason); + Sys_Printf ("failed to grab %s: %s\n", device, reason); } void @@ -645,7 +644,7 @@ IN_LL_ProcessEvents (void) void IN_LL_Shutdown (void) { - Con_Printf ("IN_LL_Shutdown\n"); + Sys_Printf ("IN_LL_Shutdown\n"); in_mouse_avail = 0; if (x_disp) { XAutoRepeatOn (x_disp); diff --git a/libs/video/targets/joy.c b/libs/video/targets/joy.c index f86b50da7..b23c9976a 100644 --- a/libs/video/targets/joy.c +++ b/libs/video/targets/joy.c @@ -33,12 +33,12 @@ static __attribute__ ((used)) const char rcsid[] = "$Id$"; -#include "QF/console.h" #include "QF/cvar.h" #include "QF/input.h" #include "QF/joystick.h" #include "QF/keys.h" #include "QF/mathlib.h" +#include "QF/sys.h" #include "QF/va.h" #include "compat.h" @@ -155,7 +155,7 @@ JOY_Init (void) int i; if (JOY_Open () == -1) { - Con_Printf ("JOY: Joystick not found.\n"); + Sys_Printf ("JOY: Joystick not found.\n"); joy_found = false; joy_active = false; return; @@ -164,12 +164,12 @@ JOY_Init (void) joy_found = true; if (!joy_enable->int_val) { - Con_Printf ("JOY: Joystick found, but not enabled.\n"); + Sys_Printf ("JOY: Joystick found, but not enabled.\n"); joy_active = false; JOY_Close (); } - Con_Printf ("JOY: Joystick found and activated.\n"); + Sys_Printf ("JOY: Joystick found and activated.\n"); // Initialize joystick if found and enabled for (i = 0; i < JOY_MAX_BUTTONS; i++) { diff --git a/libs/video/targets/joy_linux.c b/libs/video/targets/joy_linux.c index 4cc6eb738..6b8e65ffb 100644 --- a/libs/video/targets/joy_linux.c +++ b/libs/video/targets/joy_linux.c @@ -36,11 +36,11 @@ static __attribute__ ((used)) const char rcsid[] = #include #include -#include "QF/console.h" #include "QF/cvar.h" #include "QF/joystick.h" #include "QF/keys.h" #include "QF/qtypes.h" +#include "QF/sys.h" // Variables and structures for this driver int joy_handle; @@ -99,8 +99,8 @@ JOY_Close (void) i = close (joy_handle); if (i) { - Con_Printf ("JOY: Failed to close joystick device!\n"); + Sys_Printf ("JOY: Failed to close joystick device!\n"); } else { - Con_Printf ("JOY_Shutdown\n"); + Sys_Printf ("JOY_Shutdown\n"); } } diff --git a/libs/video/targets/joy_win.c b/libs/video/targets/joy_win.c index bfdc59b04..695e4fd17 100644 --- a/libs/video/targets/joy_win.c +++ b/libs/video/targets/joy_win.c @@ -39,12 +39,12 @@ static __attribute__ ((used)) const char rcsid[] = #include "winquake.h" #include "QF/cmd.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/input.h" #include "QF/joystick.h" #include "QF/keys.h" #include "QF/qargs.h" +#include "QF/sys.h" #include "compat.h" @@ -149,13 +149,13 @@ _JOY_Read (void) ji.dwUpos += 100; } if (joy_debug->int_val) { - if (ji.dwXpos) Con_Printf("X: %ld\n",ji.dwXpos); - if (ji.dwYpos) Con_Printf("Y: %ld\n",ji.dwYpos); - if (ji.dwZpos) Con_Printf("Z: %ld\n",ji.dwZpos); - if (ji.dwRpos) Con_Printf("R: %ld\n",ji.dwRpos); - if (ji.dwUpos) Con_Printf("U: %ld\n",ji.dwUpos); - if (ji.dwVpos) Con_Printf("V: %ld\n",ji.dwVpos); - if (ji.dwButtons) Con_Printf("B: %ld\n",ji.dwButtons); + if (ji.dwXpos) Sys_Printf("X: %ld\n",ji.dwXpos); + if (ji.dwYpos) Sys_Printf("Y: %ld\n",ji.dwYpos); + if (ji.dwZpos) Sys_Printf("Z: %ld\n",ji.dwZpos); + if (ji.dwRpos) Sys_Printf("R: %ld\n",ji.dwRpos); + if (ji.dwUpos) Sys_Printf("U: %ld\n",ji.dwUpos); + if (ji.dwVpos) Sys_Printf("V: %ld\n",ji.dwVpos); + if (ji.dwButtons) Sys_Printf("B: %ld\n",ji.dwButtons); } return true; } else { // read error @@ -233,7 +233,7 @@ JOY_StartupJoystick (void) // verify joystick driver is present if ((numdevs = joyGetNumDevs ()) == 0) { - Con_Printf ("\njoystick not found -- driver not present\n\n"); + Sys_Printf ("\njoystick not found -- driver not present\n\n"); return -1; } // cycle through the joystick ids for the first valid one @@ -248,7 +248,7 @@ JOY_StartupJoystick (void) // abort startup if we didn't find a valid joystick if (mmr != JOYERR_NOERROR) { - Con_Printf ("\njoystick not found -- no valid joysticks (%x)\n\n", + Sys_Printf ("\njoystick not found -- no valid joysticks (%x)\n\n", mmr); return -1; } @@ -256,7 +256,7 @@ JOY_StartupJoystick (void) // abort startup if command fails memset (&jc, 0, sizeof (jc)); if ((mmr = joyGetDevCaps (joy_id, &jc, sizeof (jc))) != JOYERR_NOERROR) { - Con_Printf + Sys_Printf ("\njoystick not found -- invalid joystick capabilities (%x)\n\n", mmr); return -1; @@ -276,7 +276,7 @@ JOY_StartupJoystick (void) joy_found = true; // FIXME: do this right joy_active = true; - Con_Printf ("\njoystick detected\n\n"); + Sys_Printf ("\njoystick detected\n\n"); return 0; } @@ -319,7 +319,7 @@ JOY_AdvancedUpdate_f (void) } else { if (strcmp (joy_name->string, "joystick") != 0) { // notify user of advanced controller - Con_Printf ("\n%s configured\n\n", joy_name->string); + Sys_Printf ("\n%s configured\n\n", joy_name->string); } // advanced initialization here // data supplied by user via joy_axisn cvars diff --git a/libs/video/targets/keys.c b/libs/video/targets/keys.c index dd2756f67..cdd678ebf 100644 --- a/libs/video/targets/keys.c +++ b/libs/video/targets/keys.c @@ -403,7 +403,7 @@ Key_Game (knum_t key, short unicode) kb = Key_GetBinding (IMT_0, key); /* - Con_Printf("kb %p, game_target %d, key_dest %d, key %d\n", kb, + Sys_Printf("kb %p, game_target %d, key_dest %d, key %d\n", kb, game_target, key_dest, key); */ if (!kb) @@ -535,13 +535,13 @@ Key_In_Unbind (const char *imt, const char *key) t = Key_StringToIMTnum (imt); if (t == -1) { - Con_Printf ("\"%s\" isn't a valid imt\n", imt); + Sys_Printf ("\"%s\" isn't a valid imt\n", imt); return; } b = Key_StringToKeynum (key); if (b == -1) { - Con_Printf ("\"%s\" isn't a valid key\n", key); + Sys_Printf ("\"%s\" isn't a valid key\n", key); return; } @@ -552,7 +552,7 @@ static void Key_In_Unbind_f (void) { if (Cmd_Argc () != 3) { - Con_Printf ("in_unbind : remove commands from a key\n"); + Sys_Printf ("in_unbind : remove commands from a key\n"); return; } Key_In_Unbind (Cmd_Argv (1), Cmd_Argv (2)); @@ -575,22 +575,22 @@ Key_In_Bind (const char *imt, const char *key, const char *cmd) t = Key_StringToIMTnum (imt); if (t == -1) { - Con_Printf ("\"%s\" isn't a valid imt\n", imt); + Sys_Printf ("\"%s\" isn't a valid imt\n", imt); return; } b = Key_StringToKeynum (key); if (b == -1) { - Con_Printf ("\"%s\" isn't a valid key\n", key); + Sys_Printf ("\"%s\" isn't a valid key\n", key); return; } if (!cmd) { if (Key_GetBinding (t, b)) - Con_Printf ("%s %s \"%s\"\n", imt, key, + Sys_Printf ("%s %s \"%s\"\n", imt, key, Key_GetBinding(t, b)); else - Con_Printf ("%s %s is not bound\n", imt, key); + Sys_Printf ("%s %s is not bound\n", imt, key); return; } Key_SetBinding (t, b, cmd); @@ -606,7 +606,7 @@ Key_In_Bind_f (void) c = Cmd_Argc (); if (c < 3) { - Con_Printf ("in_bind [command] : attach a command to a " + Sys_Printf ("in_bind [command] : attach a command to a " "key\n"); return; } @@ -635,7 +635,7 @@ Key_Unbind_f (void) const char *key; if (Cmd_Argc () != 2) { - Con_Printf ("unbind : remove commands from a key\n"); + Sys_Printf ("unbind : remove commands from a key\n"); return; } key = OK_TranslateKeyName (Cmd_Argv (1)); @@ -652,7 +652,7 @@ Key_Bind_f (void) c = Cmd_Argc (); if (c < 2) { - Con_Printf ("bind [command] : attach a command to a key\n"); + Sys_Printf ("bind [command] : attach a command to a key\n"); return; } @@ -710,7 +710,7 @@ static void in_bind_imt_f (cvar_t *var) { if (Key_StringToIMTnum (var->string) == -1) { - Con_Printf ("\"%s\" is not a valid imt. setting to \"imt_default\"\n", + Sys_Printf ("\"%s\" is not a valid imt. setting to \"imt_default\"\n", var->string); Cvar_Set (var, "imt_default"); } @@ -724,14 +724,14 @@ Key_InputMappingTable_f (void) c = Cmd_Argc (); if (c != 2) { - Con_Printf ("Current imt is %s\n", Key_IMTnumToString(game_target)); - Con_Printf ("imt : set to a specific input mapping table\n"); + Sys_Printf ("Current imt is %s\n", Key_IMTnumToString(game_target)); + Sys_Printf ("imt : set to a specific input mapping table\n"); return; } t = Key_StringToIMTnum (Cmd_Argv (1)); if (t == -1) { - Con_Printf ("\"%s\" isn't a valid imt\n", Cmd_Argv (1)); + Sys_Printf ("\"%s\" isn't a valid imt\n", Cmd_Argv (1)); return; } @@ -785,12 +785,12 @@ keyhelp_f (void) VISIBLE void Key_Event (knum_t key, short unicode, qboolean down) { -// Con_Printf ("%d %d %d : %d\n", game_target, key_dest, key, down); //@@@ +// Sys_Printf ("%d %d %d : %d\n", game_target, key_dest, key, down); //@@@ if (down) { keydown[key]++; if (keyhelp) { - Con_Printf ("Key name for that key is \"%s\"\n", + Sys_Printf ("Key name for that key is \"%s\"\n", Key_KeynumToString (key)); keyhelp = 0; return; // gobble the key diff --git a/libs/video/targets/old_keys.c b/libs/video/targets/old_keys.c index 9acb22e15..d6a4f1496 100644 --- a/libs/video/targets/old_keys.c +++ b/libs/video/targets/old_keys.c @@ -51,8 +51,8 @@ static __attribute__ ((used)) const char rcsid[] = #include #include -#include "QF/console.h" #include "QF/hash.h" +#include "QF/sys.h" #include "old_keys.h" @@ -253,7 +253,7 @@ OK_TranslateKeyName (const char *name) s++; ok = Hash_Find (old_key_table, uname); if (!ok) { - Con_Printf ("unknown old keyname: %s\n", uname); + Sys_Printf ("unknown old keyname: %s\n", uname); return name; } return ok->new_name; diff --git a/libs/video/targets/qfgl_ext.c b/libs/video/targets/qfgl_ext.c index e09639c2b..ed8dffcf8 100644 --- a/libs/video/targets/qfgl_ext.c +++ b/libs/video/targets/qfgl_ext.c @@ -57,7 +57,6 @@ static __attribute__ ((used)) const char rcsid[] = # include #endif -#include "QF/console.h" #include "QF/cvar.h" #include "QF/qtypes.h" #include "QF/sys.h" @@ -72,20 +71,20 @@ QFGL_ProcAddress (void *handle, const char *name, qboolean crit) { void *glfunc = NULL; - Con_DPrintf ("DEBUG: Finding symbol %s ... ", name); + Sys_DPrintf ("DEBUG: Finding symbol %s ... ", name); glfunc = QFGL_GetProcAddress (handle, name); if (glfunc) { - Con_DPrintf ("found [%p]\n", glfunc); + Sys_DPrintf ("found [%p]\n", glfunc); return glfunc; } - Con_DPrintf ("not found\n"); + Sys_DPrintf ("not found\n"); if (crit) { if (strncmp ("fxMesa", name, 6) == 0) { - Con_Printf ("This target requires a special version of Mesa with " + Sys_Printf ("This target requires a special version of Mesa with " "support for Glide and SVGAlib.\n"); - Con_Printf ("If you are in X, try using a GLX or SGL target.\n"); + Sys_Printf ("If you are in X, try using a GLX or SGL target.\n"); } Sys_Error ("Couldn't load critical OpenGL function %s, exiting...", name); diff --git a/libs/video/targets/vid.c b/libs/video/targets/vid.c index 37d96fcc9..2d2df8349 100644 --- a/libs/video/targets/vid.c +++ b/libs/video/targets/vid.c @@ -39,7 +39,6 @@ static __attribute__ ((used)) const char rcsid[] = #endif #include -#include "QF/console.h" #include "QF/cvar.h" #include "QF/qargs.h" #include "QF/sys.h" @@ -174,13 +173,13 @@ VID_UpdateGamma (cvar_t *vid_gamma) vid.recalc_refdef = 1; // force a surface cache flush if (vid_gamma_avail && vid_system_gamma->int_val) { // Have system, use it - Con_DPrintf ("Setting hardware gamma to %g\n", gamma); + Sys_DPrintf ("Setting hardware gamma to %g\n", gamma); VID_BuildGammaTable (1.0); // hardware gamma wants a linear palette VID_SetGamma (gamma); memcpy (vid.palette, vid.basepal, 256 * 3); } else { // We have to hack the palette int i; - Con_DPrintf ("Setting software gamma to %g\n", gamma); + Sys_DPrintf ("Setting software gamma to %g\n", gamma); VID_BuildGammaTable (gamma); for (i = 0; i < 256 * 3; i++) vid.palette[i] = gammatable[vid.basepal[i]]; diff --git a/libs/video/targets/vid_3dfxsvga.c b/libs/video/targets/vid_3dfxsvga.c index d0704f0d5..5f33d0f00 100644 --- a/libs/video/targets/vid_3dfxsvga.c +++ b/libs/video/targets/vid_3dfxsvga.c @@ -45,7 +45,6 @@ static __attribute__ ((used)) const char rcsid[] = #include -#include "QF/console.h" #include "QF/cvar.h" #include "QF/qargs.h" #include "QF/qendian.h" @@ -176,20 +175,20 @@ GL_Init (void) if (!(dither_select = QFGL_ExtensionAddress ("gl3DfxSetDitherModeEXT"))) return; - Con_Printf ("Dithering: "); + Sys_Printf ("Dithering: "); if ((p = COM_CheckParm ("-dither")) && p < com_argc) { if (strequal (com_argv[p+1], "2x2")) { dither_select (GR_DITHER_2x2); - Con_Printf ("2x2.\n"); + Sys_Printf ("2x2.\n"); } if (strequal (com_argv[p+1], "4x4")) { dither_select (GR_DITHER_4x4); - Con_Printf ("4x4.\n"); + Sys_Printf ("4x4.\n"); } } else { qfglDisable (GL_DITHER); - Con_Printf ("disabled.\n"); + Sys_Printf ("disabled.\n"); } } @@ -344,7 +343,7 @@ VID_Init (unsigned char *palette) vid.initialized = true; - Con_Printf ("Video mode %dx%d initialized.\n", scr_width, scr_height); + Sys_Printf ("Video mode %dx%d initialized.\n", scr_width, scr_height); vid.recalc_refdef = 1; // force a surface cache flush } diff --git a/libs/video/targets/vid_common_gl.c b/libs/video/targets/vid_common_gl.c index fd1191839..269dc0e5f 100644 --- a/libs/video/targets/vid_common_gl.c +++ b/libs/video/targets/vid_common_gl.c @@ -42,7 +42,6 @@ static __attribute__ ((used)) const char rcsid[] = # include #endif -#include "QF/console.h" #include "QF/cvar.h" #include "QF/input.h" #include "QF/qargs.h" @@ -198,7 +197,7 @@ gl_multitexture_f (cvar_t *var) qfglDisable (GL_TEXTURE_2D); } else { gl_mtex_fullbright = false; - Con_Printf ("Not enough TMUs for BSP fullbrights.\n"); + Sys_Printf ("Not enough TMUs for BSP fullbrights.\n"); } } } else { @@ -248,7 +247,7 @@ gl_anisotropy_f (cvar_t * var) } else { aniso = 1.0; if (var) - Con_Printf ("Anisotropy (GL_EXT_texture_filter_anisotropic) is " + Sys_Printf ("Anisotropy (GL_EXT_texture_filter_anisotropic) is " "not supported by your hardware and/or drivers.\n"); } } @@ -265,7 +264,7 @@ gl_tessellate_f (cvar_t * var) } else { tess = 0; if (var) - Con_Printf ("TruForm (GL_ATI_pn_triangles) is not supported by " + Sys_Printf ("TruForm (GL_ATI_pn_triangles) is not supported by " "your hardware and/or drivers.\n"); } } @@ -335,14 +334,14 @@ CheckGLVersionString (void) } else { Sys_Error ("Malformed OpenGL version string!"); } - Con_Printf ("GL_VERSION: %s\n", gl_version); + Sys_Printf ("GL_VERSION: %s\n", gl_version); gl_vendor = (char *) qfglGetString (GL_VENDOR); - Con_Printf ("GL_VENDOR: %s\n", gl_vendor); + Sys_Printf ("GL_VENDOR: %s\n", gl_vendor); gl_renderer = (char *) qfglGetString (GL_RENDERER); - Con_Printf ("GL_RENDERER: %s\n", gl_renderer); + Sys_Printf ("GL_RENDERER: %s\n", gl_renderer); gl_extensions = (char *) qfglGetString (GL_EXTENSIONS); - Con_Printf ("GL_EXTENSIONS: %s\n", gl_extensions); + Sys_Printf ("GL_EXTENSIONS: %s\n", gl_extensions); if (strstr (gl_renderer, "Mesa DRI Mach64")) gl_feature_mach64 = true; @@ -377,14 +376,14 @@ CheckCombineExtensions (void) { if (gl_major >= 1 && gl_minor >= 3) { gl_combine_capable = true; - Con_Printf ("COMBINE active, multitextured doublebright enabled.\n"); + Sys_Printf ("COMBINE active, multitextured doublebright enabled.\n"); } else if (QFGL_ExtensionPresent ("GL_ARB_texture_env_combine")) { gl_combine_capable = true; - Con_Printf ("COMBINE_ARB active, multitextured doublebright " + Sys_Printf ("COMBINE_ARB active, multitextured doublebright " "enabled.\n"); } else { gl_combine_capable = false; - Con_Printf ("GL_ARB_texture_env_combine not found. gl_doublebright " + Sys_Printf ("GL_ARB_texture_env_combine not found. gl_doublebright " "will have no effect with gl_multitexture on.\n"); } } @@ -397,15 +396,15 @@ CheckCombineExtensions (void) static void CheckMultiTextureExtensions (void) { - Con_Printf ("Checking for multitexture: "); + Sys_Printf ("Checking for multitexture: "); if (COM_CheckParm ("-nomtex")) { - Con_Printf ("disabled.\n"); + Sys_Printf ("disabled.\n"); return; } if (gl_major >= 1 && gl_minor >= 3) { qfglGetIntegerv (GL_MAX_TEXTURE_UNITS, &gl_mtex_tmus); if (gl_mtex_tmus >= 2) { - Con_Printf ("enabled, %d TMUs.\n", gl_mtex_tmus); + Sys_Printf ("enabled, %d TMUs.\n", gl_mtex_tmus); qglMultiTexCoord2f = QFGL_ExtensionAddress ("glMultiTexCoord2f"); qglMultiTexCoord2fv = @@ -415,15 +414,15 @@ CheckMultiTextureExtensions (void) if (qglMultiTexCoord2f && gl_mtex_enum) gl_mtex_capable = true; else - Con_Printf ("Multitexture disabled, could not find required " + Sys_Printf ("Multitexture disabled, could not find required " "functions\n"); } else { - Con_Printf ("Multitexture disabled, not enough TMUs.\n"); + Sys_Printf ("Multitexture disabled, not enough TMUs.\n"); } } else if (QFGL_ExtensionPresent ("GL_ARB_multitexture")) { qfglGetIntegerv (GL_MAX_TEXTURE_UNITS_ARB, &gl_mtex_tmus); if (gl_mtex_tmus >= 2) { - Con_Printf ("enabled, %d TMUs.\n", gl_mtex_tmus); + Sys_Printf ("enabled, %d TMUs.\n", gl_mtex_tmus); qglMultiTexCoord2f = QFGL_ExtensionAddress ("glMultiTexCoord2fARB"); qglMultiTexCoord2fv = @@ -433,13 +432,13 @@ CheckMultiTextureExtensions (void) if (qglMultiTexCoord2f && gl_mtex_enum) gl_mtex_capable = true; else - Con_Printf ("Multitexture disabled, could not find required " + Sys_Printf ("Multitexture disabled, could not find required " "functions\n"); } else { - Con_Printf ("Multitexture disabled, not enough TMUs.\n"); + Sys_Printf ("Multitexture disabled, not enough TMUs.\n"); } } else { - Con_Printf ("not found.\n"); + Sys_Printf ("not found.\n"); } } @@ -482,7 +481,7 @@ CheckLights (void) specular[4] = {0.1, 0.1, 0.1, 1.0}; qfglGetIntegerv (GL_MAX_LIGHTS, &gl_max_lights); - Con_Printf ("Max GL Lights %d.\n", gl_max_lights); + Sys_Printf ("Max GL Lights %d.\n", gl_max_lights); qfglEnable (GL_LIGHTING); qfglLightModelfv (GL_LIGHT_MODEL_AMBIENT, dark); @@ -517,7 +516,7 @@ VID_SetPalette (unsigned char *palette) QFile *f; // 8 8 8 encoding -// Con_Printf ("Converting 8to24\n"); +// Sys_Printf ("Converting 8to24\n"); pal = palette; table = d_8to24table; @@ -644,11 +643,11 @@ Tdfx_Init8bitPalette (void) if (!(qgl3DfxSetPaletteEXT = QFGL_ExtensionAddress ("gl3DfxSetPaletteEXT"))) { - Con_Printf ("3DFX_set_global_palette not found.\n"); + Sys_Printf ("3DFX_set_global_palette not found.\n"); return; } - Con_Printf ("3DFX_set_global_palette.\n"); + Sys_Printf ("3DFX_set_global_palette.\n"); oldpal = (char *) d_8to24table; // d_8to24table3dfx; for (i = 0; i < 256; i++) { @@ -662,7 +661,7 @@ Tdfx_Init8bitPalette (void) qgl3DfxSetPaletteEXT ((GLuint *) table); is8bit = true; } else { - Con_Printf ("\n 3DFX_set_global_palette not found."); + Sys_Printf ("\n 3DFX_set_global_palette not found."); } } @@ -687,11 +686,11 @@ Shared_Init8bitPalette (void) if (QFGL_ExtensionPresent ("GL_EXT_shared_texture_palette")) { if (!(qglColorTableEXT = QFGL_ExtensionAddress ("glColorTableEXT"))) { - Con_Printf ("glColorTableEXT not found.\n"); + Sys_Printf ("glColorTableEXT not found.\n"); return; } - Con_Printf ("GL_EXT_shared_texture_palette\n"); + Sys_Printf ("GL_EXT_shared_texture_palette\n"); qfglEnable (GL_SHARED_TEXTURE_PALETTE_EXT); oldPalette = (GLubyte *) d_8to24table; // d_8to24table3dfx; @@ -706,21 +705,21 @@ Shared_Init8bitPalette (void) GL_UNSIGNED_BYTE, (GLvoid *) thePalette); is8bit = true; } else { - Con_Printf ("\n GL_EXT_shared_texture_palette not found."); + Sys_Printf ("\n GL_EXT_shared_texture_palette not found."); } } void VID_Init8bitPalette (void) { - Con_Printf ("Checking for 8-bit extension: "); + Sys_Printf ("Checking for 8-bit extension: "); if (vid_use8bit->int_val) { Tdfx_Init8bitPalette (); Shared_Init8bitPalette (); if (!is8bit) - Con_Printf ("\n 8-bit extension not found.\n"); + Sys_Printf ("\n 8-bit extension not found.\n"); } else { - Con_Printf ("disabled.\n"); + Sys_Printf ("disabled.\n"); } } diff --git a/libs/video/targets/vid_fbdev.c b/libs/video/targets/vid_fbdev.c index a3ebf4389..c202d3037 100644 --- a/libs/video/targets/vid_fbdev.c +++ b/libs/video/targets/vid_fbdev.c @@ -283,7 +283,7 @@ VID_SetMode (const char *name, unsigned char *palette) vmode = FindVideoMode(name); if (!vmode) { - // Con_Printf ("No such video mode: %s\n", name); + // Sys_Printf ("No such video mode: %s\n", name); return 0; } diff --git a/libs/video/targets/vid_glx.c b/libs/video/targets/vid_glx.c index 1e7d620c5..3a6961520 100644 --- a/libs/video/targets/vid_glx.c +++ b/libs/video/targets/vid_glx.c @@ -150,7 +150,7 @@ QFGL_LoadLibrary (void) void VID_Shutdown (void) { - Con_Printf ("VID_Shutdown\n"); + Sys_Printf ("VID_Shutdown\n"); X11_CloseDisplay (); } @@ -254,7 +254,7 @@ VID_Init (unsigned char *palette) VID_Init8bitPalette (); VID_SetPalette (vid.palette); - Con_Printf ("Video mode %dx%d initialized.\n", scr_width, scr_height); + Sys_Printf ("Video mode %dx%d initialized.\n", scr_width, scr_height); vid.initialized = true; diff --git a/libs/video/targets/vid_sgl.c b/libs/video/targets/vid_sgl.c index b5536e4a9..1f9a5603e 100644 --- a/libs/video/targets/vid_sgl.c +++ b/libs/video/targets/vid_sgl.c @@ -191,7 +191,7 @@ success: VID_SetPalette (vid.palette); VID_Init8bitPalette (); // Check for 3DFX Extensions and initialize them. - Con_Printf ("Video mode %dx%d initialized.\n", scr_width, scr_height); + Sys_Printf ("Video mode %dx%d initialized.\n", scr_width, scr_height); vid.initialized = true; diff --git a/libs/video/targets/vid_svgalib.c b/libs/video/targets/vid_svgalib.c index dd52aac3e..e6d3f14a9 100644 --- a/libs/video/targets/vid_svgalib.c +++ b/libs/video/targets/vid_svgalib.c @@ -54,7 +54,6 @@ static __attribute__ ((used)) const char rcsid[] = #include #include "QF/cmd.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/input.h" #include "QF/qargs.h" @@ -245,7 +244,7 @@ get_mode (int width, int height, int depth) void VID_Shutdown (void) { - Sys_Printf ("VID_Shutdown\n"); + Sys_DPrintf ("VID_Shutdown\n"); if (!svgalib_inited) return; @@ -284,7 +283,7 @@ VID_SetMode (int modenum, unsigned char *palette) int err; if ((modenum >= num_modes) || (modenum < 0) || !modes[modenum].width) { - Con_Printf ("No such video mode: %d\n", modenum); + Sys_Printf ("No such video mode: %d\n", modenum); return 0; } @@ -369,7 +368,7 @@ VID_Init (unsigned char *palette) Sys_Error ("SVGALib failed to allocate a new VC"); if (vga_runinbackground_version () == 1) { - Con_Printf ("SVGALIB background support detected\n"); + Sys_Printf ("SVGALIB background support detected\n"); vga_runinbackground (VGA_GOTOBACK, goto_background); vga_runinbackground (VGA_COMEFROMBACK, comefrom_background); vga_runinbackground (1); diff --git a/libs/video/targets/vid_wgl.c b/libs/video/targets/vid_wgl.c index 18e365aaf..e5073965a 100644 --- a/libs/video/targets/vid_wgl.c +++ b/libs/video/targets/vid_wgl.c @@ -35,7 +35,6 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/cdaudio.h" #include "QF/cmd.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/input.h" #include "QF/keys.h" @@ -315,7 +314,7 @@ VID_SetMode (unsigned char *palette) // fix the leftover Alt from any Alt-Tab or the like that switched us away IN_ClearStates (); - Con_Printf ("Video mode %ix%i initialized.\n", vid_width->int_val, + Sys_Printf ("Video mode %ix%i initialized.\n", vid_width->int_val, vid_height->int_val); VID_SetPalette (palette); diff --git a/libs/video/targets/vid_x11.c b/libs/video/targets/vid_x11.c index 089cf6b77..a4e8cb5ae 100644 --- a/libs/video/targets/vid_x11.c +++ b/libs/video/targets/vid_x11.c @@ -346,8 +346,8 @@ ResetSharedFrameBuffers (void) // attach to the shared memory segment x_shminfo[frm].shmaddr = (void *) shmat (x_shminfo[frm].shmid, 0, 0); - Sys_Printf ("VID: shared memory id=%d, addr=0x%lx\n", - x_shminfo[frm].shmid, (long) x_shminfo[frm].shmaddr); + Sys_DPrintf ("VID: shared memory id=%d, addr=0x%lx\n", + x_shminfo[frm].shmid, (long) x_shminfo[frm].shmaddr); x_framebuffer[frm]->data = x_shminfo[frm].shmaddr; @@ -452,10 +452,10 @@ VID_Init (unsigned char *palette) x_vis = x_visinfo->visual; if (num_visuals > 1) { - Sys_Printf ("Found more than one visual id at depth %d:\n", + Sys_DPrintf ("Found more than one visual id at depth %d:\n", template.depth); for (i = 0; i < num_visuals; i++) - Sys_Printf (" -visualid %d\n", (int) x_visinfo[i].visualid); + Sys_DPrintf (" -visualid %d\n", (int) x_visinfo[i].visualid); } else { if (num_visuals == 0) { if (template_mask == VisualIDMask) { @@ -467,15 +467,15 @@ VID_Init (unsigned char *palette) } if (verbose) { - Sys_Printf ("Using visualid %d:\n", (int) x_visinfo->visualid); - Sys_Printf (" class %d\n", x_visinfo->class); - Sys_Printf (" screen %d\n", x_visinfo->screen); - Sys_Printf (" depth %d\n", x_visinfo->depth); - Sys_Printf (" red_mask 0x%x\n", (int) x_visinfo->red_mask); - Sys_Printf (" green_mask 0x%x\n", (int) x_visinfo->green_mask); - Sys_Printf (" blue_mask 0x%x\n", (int) x_visinfo->blue_mask); - Sys_Printf (" colormap_size %d\n", x_visinfo->colormap_size); - Sys_Printf (" bits_per_rgb %d\n", x_visinfo->bits_per_rgb); + Sys_DPrintf ("Using visualid %d:\n", (int) x_visinfo->visualid); + Sys_DPrintf (" class %d\n", x_visinfo->class); + Sys_DPrintf (" screen %d\n", x_visinfo->screen); + Sys_DPrintf (" depth %d\n", x_visinfo->depth); + Sys_DPrintf (" red_mask 0x%x\n", (int) x_visinfo->red_mask); + Sys_DPrintf (" green_mask 0x%x\n", (int) x_visinfo->green_mask); + Sys_DPrintf (" blue_mask 0x%x\n", (int) x_visinfo->blue_mask); + Sys_DPrintf (" colormap_size %d\n", x_visinfo->colormap_size); + Sys_DPrintf (" bits_per_rgb %d\n", x_visinfo->bits_per_rgb); } /* Setup attributes for main window */ @@ -579,7 +579,7 @@ VID_SetPalette (unsigned char *palette) void VID_Shutdown (void) { - Sys_Printf ("VID_Shutdown\n"); + Sys_DPrintf ("VID_Shutdown\n"); X11_CloseDisplay (); } diff --git a/nq/source/cl_cmd.c b/nq/source/cl_cmd.c index 945b1755e..a58639cdd 100644 --- a/nq/source/cl_cmd.c +++ b/nq/source/cl_cmd.c @@ -35,9 +35,9 @@ #endif #include "QF/cmd.h" -#include "QF/console.h" #include "QF/msg.h" #include "QF/sizebuf.h" +#include "QF/sys.h" #include "client.h" @@ -51,7 +51,7 @@ void CL_Cmd_ForwardToServer (void) { if (cls.state != ca_connected) { - Con_Printf ("Can't \"%s\", not connected\n", Cmd_Argv (0)); + Sys_Printf ("Can't \"%s\", not connected\n", Cmd_Argv (0)); return; } diff --git a/nq/source/cl_demo.c b/nq/source/cl_demo.c index 63430d6c8..a8a64a7c0 100644 --- a/nq/source/cl_demo.c +++ b/nq/source/cl_demo.c @@ -39,7 +39,6 @@ static __attribute__ ((used)) const char rcsid[] = #endif #include "QF/cmd.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/keys.h" #include "QF/msg.h" @@ -174,7 +173,7 @@ CL_GetMessage (void) // discard nop keepalive message if (net_message->message->cursize == 1 && net_message->message->data[0] == svc_nop) - Con_Printf ("<-- server to client keepalive\n"); + Sys_Printf ("<-- server to client keepalive\n"); else break; } @@ -198,7 +197,7 @@ CL_Stop_f (void) return; if (!cls.demorecording) { - Con_Printf ("Not recording a demo.\n"); + Sys_Printf ("Not recording a demo.\n"); return; } // write a disconnect message to the demo file @@ -210,7 +209,7 @@ CL_Stop_f (void) Qclose (cls.demofile); cls.demofile = NULL; cls.demorecording = false; - Con_Printf ("Completed demo\n"); + Sys_Printf ("Completed demo\n"); } @@ -231,24 +230,24 @@ CL_Record_f (void) c = Cmd_Argc (); if (c != 2 && c != 3 && c != 4) { - Con_Printf ("record [ [cd track]]\n"); + Sys_Printf ("record [ [cd track]]\n"); return; } if (strstr (Cmd_Argv (1), "..")) { - Con_Printf ("Relative pathnames are not allowed.\n"); + Sys_Printf ("Relative pathnames are not allowed.\n"); return; } if (c == 2 && cls.state == ca_connected) { - Con_Printf + Sys_Printf ("Can not record - already connected to server\nClient demo recording must be started before connecting\n"); return; } // write the forced cd track number, or -1 if (c == 4) { track = atoi (Cmd_Argv (3)); - Con_Printf ("Forcing CD track to %i\n", cls.forcetrack); + Sys_Printf ("Forcing CD track to %i\n", cls.forcetrack); } else track = -1; @@ -274,11 +273,11 @@ CL_Record_f (void) } if (!cls.demofile) { - Con_Printf ("ERROR: couldn't open.\n"); + Sys_Printf ("ERROR: couldn't open.\n"); return; } - Con_Printf ("recording to %s.\n", name); + Sys_Printf ("recording to %s.\n", name); cls.demorecording = true; cls.forcetrack = track; @@ -303,10 +302,10 @@ CL_StartDemo (void) strncpy (name, demoname, sizeof (name)); QFS_DefaultExtension (name, ".dem"); - Con_Printf ("Playing demo from %s.\n", name); + Sys_Printf ("Playing demo from %s.\n", name); QFS_FOpenFile (name, &cls.demofile); if (!cls.demofile) { - Con_Printf ("ERROR: couldn't open.\n"); + Sys_Printf ("ERROR: couldn't open.\n"); cls.demonum = -1; // stop demo loop return; } @@ -340,7 +339,7 @@ CL_PlayDemo_f (void) return; if (Cmd_Argc () != 2) { - Con_Printf ("play : plays a demo\n"); + Sys_Printf ("play : plays a demo\n"); return; } strncpy (demoname, Cmd_Argv (1), sizeof (demoname)); @@ -373,7 +372,7 @@ CL_FinishTimeDemo (void) time = realtime - cls.td_starttime; if (!time) time = 1; - Con_Printf ("%i frame%s %.4g seconds %.4g fps\n", frames, + Sys_Printf ("%i frame%s %.4g seconds %.4g fps\n", frames, frames == 1 ? "" : "s", time, frames / time); if (--timedemo_count > 0) CL_StartTimeDemo (); @@ -392,7 +391,7 @@ CL_TimeDemo_f (void) return; if (Cmd_Argc () < 2 || Cmd_Argc () > 3) { - Con_Printf ("timedemo [count]: gets demo speeds\n"); + Sys_Printf ("timedemo [count]: gets demo speeds\n"); return; } if (Cmd_Argc () == 3) { diff --git a/nq/source/cl_input.c b/nq/source/cl_input.c index ca218a64b..c885e37b8 100644 --- a/nq/source/cl_input.c +++ b/nq/source/cl_input.c @@ -39,11 +39,11 @@ static __attribute__ ((used)) const char rcsid[] = #endif #include "QF/cmd.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/input.h" #include "QF/keys.h" #include "QF/msg.h" +#include "QF/sys.h" #include "chase.h" #include "client.h" @@ -97,7 +97,7 @@ KeyPress (kbutton_t *b) else if (!b->down[1]) b->down[1] = k; else { - Con_Printf ("Three keys down for a button!\n"); + Sys_Printf ("Three keys down for a button!\n"); return; } @@ -587,7 +587,7 @@ CL_SendMove (usercmd_t *cmd) return; if (NET_SendUnreliableMessage (cls.netcon, &buf) == -1) { - Con_Printf ("CL_SendMove: lost server connection\n"); + Sys_Printf ("CL_SendMove: lost server connection\n"); CL_Disconnect (); } } diff --git a/nq/source/cl_main.c b/nq/source/cl_main.c index 8f7377117..92f52a759 100644 --- a/nq/source/cl_main.c +++ b/nq/source/cl_main.c @@ -42,6 +42,7 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/render.h" #include "QF/screen.h" #include "QF/skin.h" +#include "QF/sys.h" #include "QF/va.h" #include "chase.h" @@ -217,7 +218,7 @@ CL_Disconnect (void) if (cls.demorecording) CL_Stop_f (); - Con_DPrintf ("Sending clc_disconnect\n"); + Sys_DPrintf ("Sending clc_disconnect\n"); SZ_Clear (&cls.message); MSG_WriteByte (&cls.message, clc_disconnect); NET_SendUnreliableMessage (cls.netcon, &cls.message); @@ -260,7 +261,7 @@ CL_EstablishConnection (const char *host) cls.netcon = NET_Connect (host); if (!cls.netcon) Host_Error ("CL_Connect: connect failed\n"); - Con_DPrintf ("CL_EstablishConnection: connected to %s\n", host); + Sys_DPrintf ("CL_EstablishConnection: connected to %s\n", host); cls.demonum = -1; // not in the demo loop now CL_SetState (ca_connected); @@ -280,7 +281,7 @@ CL_SignonReply (void) { char str[8192]; - Con_DPrintf ("CL_SignonReply: %i\n", cls.signon); + Sys_DPrintf ("CL_SignonReply: %i\n", cls.signon); switch (cls.signon) { case 1: @@ -328,7 +329,7 @@ CL_NextDemo (void) if (!cls.demos[cls.demonum][0] || cls.demonum == MAX_DEMOS) { cls.demonum = 0; if (!cls.demos[cls.demonum][0]) { - Con_Printf ("No demos listed with startdemos\n"); + Sys_Printf ("No demos listed with startdemos\n"); cls.demonum = -1; return; } @@ -346,12 +347,12 @@ CL_PrintEntities_f (void) int i; for (i = 0, ent = cl_entities; i < cl.num_entities; i++, ent++) { - Con_Printf ("%3i:", i); + Sys_Printf ("%3i:", i); if (!ent->model) { - Con_Printf ("EMPTY\n"); + Sys_Printf ("EMPTY\n"); continue; } - Con_Printf ("%s:%2i (%5.1f,%5.1f,%5.1f) [%5.1f %5.1f %5.1f]\n", + Sys_Printf ("%s:%2i (%5.1f,%5.1f,%5.1f) [%5.1f %5.1f %5.1f]\n", ent->model->name, ent->frame, ent->origin[0], ent->origin[1], ent->origin[2], ent->angles[0], ent->angles[1], ent->angles[2]); @@ -660,7 +661,7 @@ CL_ReadFromServer (void) } while (ret && cls.state == ca_connected); if (cl_shownet->int_val) - Con_Printf ("\n"); + Sys_Printf ("\n"); R_ClearEnts (); @@ -696,7 +697,7 @@ CL_SendCmd (void) return; // no message at all if (!NET_CanSendMessage (cls.netcon)) { - Con_DPrintf ("CL_WriteToServer: can't send\n"); + Sys_DPrintf ("CL_WriteToServer: can't send\n"); return; } diff --git a/nq/source/cl_parse.c b/nq/source/cl_parse.c index 3117569ce..0c46a9c59 100644 --- a/nq/source/cl_parse.c +++ b/nq/source/cl_parse.c @@ -215,7 +215,7 @@ CL_KeepaliveMessage (void) lastmsg = time; // write out a nop - Con_Printf ("--> client to server keepalive\n"); + Sys_Printf ("--> client to server keepalive\n"); MSG_WriteByte (&cls.message, clc_nop); NET_SendMessage (cls.netcon, &cls.message); @@ -265,7 +265,7 @@ CL_ParseServerInfo (void) const char *str; int nummodels, numsounds, i; - Con_DPrintf ("Serverinfo packet received.\n"); + Sys_DPrintf ("Serverinfo packet received.\n"); S_BlockSound (); S_StopAllSounds (); @@ -276,13 +276,13 @@ CL_ParseServerInfo (void) // parse protocol version number i = MSG_ReadLong (net_message); if (i != PROTOCOL_VERSION) { - Con_Printf ("Server returned version %i, not %i", i, PROTOCOL_VERSION); + Sys_Printf ("Server returned version %i, not %i", i, PROTOCOL_VERSION); goto done; } // parse maxclients cl.maxclients = MSG_ReadByte (net_message); if (cl.maxclients < 1 || cl.maxclients > MAX_SCOREBOARD) { - Con_Printf ("Bad maxclients (%u) from server\n", cl.maxclients); + Sys_Printf ("Bad maxclients (%u) from server\n", cl.maxclients); goto done; } cl.scores = Hunk_AllocName (cl.maxclients * sizeof (*cl.scores), "scores"); @@ -295,10 +295,10 @@ CL_ParseServerInfo (void) strncpy (cl.levelname, str, sizeof (cl.levelname) - 1); // separate the printfs so the server message can have a color - Con_Printf ("\n\n\35\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36" + Sys_Printf ("\n\n\35\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36" "\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\37\n" "\n"); - Con_Printf ("%c%s\n", 2, str); + Sys_Printf ("%c%s\n", 2, str); // first we go through and touch all of the precache data that still // happens to be in the cache, so precaching something else doesn't @@ -311,7 +311,7 @@ CL_ParseServerInfo (void) if (!str[0]) break; if (nummodels == MAX_MODELS) { - Con_Printf ("Server sent too many model precaches\n"); + Sys_Printf ("Server sent too many model precaches\n"); goto done; } strcpy (model_precache[nummodels], str); @@ -325,7 +325,7 @@ CL_ParseServerInfo (void) if (!str[0]) break; if (numsounds == MAX_SOUNDS) { - Con_Printf ("Server sent too many sound precaches\n"); + Sys_Printf ("Server sent too many sound precaches\n"); goto done; } strcpy (sound_precache[numsounds], str); @@ -338,7 +338,7 @@ CL_ParseServerInfo (void) for (i = 1; i < nummodels; i++) { cl.model_precache[i] = Mod_ForName (model_precache[i], false); if (cl.model_precache[i] == NULL) { - Con_Printf ("Model %s not found\n", model_precache[i]); + Sys_Printf ("Model %s not found\n", model_precache[i]); goto done; } CL_KeepaliveMessage (); @@ -739,7 +739,7 @@ CL_ParseStaticSound (void) #define SHOWNET(x) \ if (cl_shownet->int_val == 2) \ - Con_Printf ("%3i:%s\n", net_message->readcount - 1, x); + Sys_Printf ("%3i:%s\n", net_message->readcount - 1, x); int viewentity; @@ -750,9 +750,9 @@ CL_ParseServerMessage (void) // if recording demos, copy the message out if (cl_shownet->int_val == 1) - Con_Printf ("%i ", net_message->message->cursize); + Sys_Printf ("%i ", net_message->message->cursize); else if (cl_shownet->int_val == 2) - Con_Printf ("------------------\n"); + Sys_Printf ("------------------\n"); cl.onground = false; // unless the server says otherwise @@ -809,7 +809,7 @@ CL_ParseServerMessage (void) Host_EndGame ("Server disconnected\n"); case svc_print: - Con_Printf ("%s", MSG_ReadString (net_message)); + Sys_Printf ("%s", MSG_ReadString (net_message)); break; case svc_centerprint: diff --git a/nq/source/cl_tent.c b/nq/source/cl_tent.c index 3825f2591..4bce89585 100644 --- a/nq/source/cl_tent.c +++ b/nq/source/cl_tent.c @@ -41,7 +41,6 @@ static __attribute__ ((used)) const char rcsid[] = #include #include -#include "QF/console.h" #include "QF/model.h" #include "QF/msg.h" #include "QF/sound.h" @@ -176,7 +175,7 @@ beam_alloc (int ent) for (i = 0, b = cl_beams; i < MAX_BEAMS; i++, b++) if (!b->model || b->endtime < cl.time) return b; - Con_Printf ("beam list overflow!\n"); + Sys_Printf ("beam list overflow!\n"); return 0; } diff --git a/nq/source/com.c b/nq/source/com.c index f43fb1a54..efbb6c1e0 100644 --- a/nq/source/com.c +++ b/nq/source/com.c @@ -32,10 +32,10 @@ static __attribute__ ((used)) const char rcsid[] = "$Id$"; #include "QF/cmd.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/qargs.h" #include "QF/quakefs.h" +#include "QF/sys.h" #include "game.h" #include "server.h" @@ -70,7 +70,7 @@ COM_CheckRegistered (void) if (static_registered) { Cvar_Set (registered, "1"); - Con_Printf ("Playing registered version.\n"); + Sys_Printf ("Playing registered version.\n"); } } diff --git a/nq/source/host.c b/nq/source/host.c index 8ae774a3c..3cd398015 100644 --- a/nq/source/host.c +++ b/nq/source/host.c @@ -146,7 +146,7 @@ Host_EndGame (const char *message, ...) va_start (argptr, message); dvsprintf (str, message, argptr); va_end (argptr); - Con_DPrintf ("Host_EndGame: %s\n", str->str); + Sys_DPrintf ("Host_EndGame: %s\n", str->str); if (sv.active) Host_ShutdownServer (false); @@ -194,7 +194,7 @@ Host_Error (const char *error, ...) if (cls.state == ca_dedicated) Sys_Error ("Host_Error: %s", str->str); // dedicated servers exit - Con_Printf ("Host_Error: %s\n", str->str); + Sys_Printf ("Host_Error: %s\n", str->str); CL_Disconnect (); cls.demonum = -1; @@ -299,7 +299,7 @@ Host_WriteConfiguration (void) char *path = va ("%s/config.cfg", qfs_gamedir->dir.def); f = QFS_WOpen (path, 0); if (!f) { - Con_Printf ("Couldn't write config.cfg.\n"); + Sys_Printf ("Couldn't write config.cfg.\n"); return; } @@ -410,7 +410,7 @@ SV_DropClient (qboolean crash) *sv_globals.self = saveSelf; } - Con_Printf ("Client %s removed\n", host_client->name); + Sys_Printf ("Client %s removed\n", host_client->name); } // break the net connection NET_Close (host_client->netconnection); @@ -489,7 +489,7 @@ Host_ShutdownServer (qboolean crash) MSG_WriteByte (&buf, svc_disconnect); count = NET_SendToAll (&buf, 5); if (count) - Con_Printf + Sys_Printf ("Host_ShutdownServer: NET_SendToAll failed for %u clients\n", count); @@ -512,7 +512,7 @@ Host_ShutdownServer (qboolean crash) void Host_ClearMemory (void) { - Con_DPrintf ("Clearing memory\n"); + Sys_DPrintf ("Clearing memory\n"); D_FlushCaches (); Mod_ClearAll (); if (host_hunklevel) @@ -633,7 +633,7 @@ Host_ClientFrame (void) time3 = Sys_DoubleTime (); pass2 = (time2 - time1) * 1000; pass3 = (time3 - time2) * 1000; - Con_Printf ("%3i tot %3i server %3i gfx %3i snd\n", + Sys_Printf ("%3i tot %3i server %3i gfx %3i snd\n", pass1 + pass2 + pass3, pass1, pass2, pass3); } } @@ -732,7 +732,7 @@ Host_Frame (float time) c++; } - Con_Printf ("serverprofile: %2i clients %2i msec\n", c, m); + Sys_Printf ("serverprofile: %2i clients %2i msec\n", c, m); } @@ -867,7 +867,7 @@ Host_Init (void) { const char *mp; - Con_Printf ("Host_Init\n"); + Sys_Printf ("Host_Init\n"); host_cbuf = Cbuf_New (&id_interp); cmd_source = src_command; @@ -964,7 +964,7 @@ Host_Init (void) SV_Progs_Init (); SV_Init (); - Con_Printf ("%4.1f megabyte heap\n", host_mem_size->value); + Sys_Printf ("%4.1f megabyte heap\n", host_mem_size->value); if (cls.state != ca_dedicated) { host_basepal = (byte *) QFS_LoadHunkFile ("gfx/palette.lmp"); @@ -1004,10 +1004,10 @@ Host_Init (void) Hunk_AllocName (0, "-HOST_HUNKLEVEL-"); host_hunklevel = Hunk_LowMark (); - Con_Printf ("\nVersion %s (build %04d)\n\n", VERSION, + Sys_Printf ("\nVersion %s (build %04d)\n\n", VERSION, build_number ()); - Con_Printf ("\x80\x81\x81\x82 %s initialized \x80\x81\x81\x82\n", PROGRAM); + Sys_Printf ("\x80\x81\x81\x82 %s initialized \x80\x81\x81\x82\n", PROGRAM); host_initialized = true; diff --git a/nq/source/host_cmd.c b/nq/source/host_cmd.c index d4695b4cb..46df34ce8 100644 --- a/nq/source/host_cmd.c +++ b/nq/source/host_cmd.c @@ -70,7 +70,7 @@ Host_Quit_f (void) // return; // } if (!con_module) - Con_Printf ("I hope you wanted to quit\n"); + Sys_Printf ("I hope you wanted to quit\n"); CL_Disconnect (); Host_ShutdownServer (false); @@ -92,7 +92,7 @@ Host_Status_f (void) CL_Cmd_ForwardToServer (); return; } - print = Con_Printf; + print = Sys_Printf; } else print = SV_ClientPrintf; @@ -277,11 +277,11 @@ Host_Map_f (void) return; if (Cmd_Argc () > 2) { - Con_Printf ("map : continue game on a new level\n"); + Sys_Printf ("map : continue game on a new level\n"); return; } if (Cmd_Argc () == 1) { - Con_Printf ("map is %s (%s)\n", sv.name, nice_time (sv.time)); + Sys_Printf ("map is %s (%s)\n", sv.name, nice_time (sv.time)); return; } @@ -289,7 +289,7 @@ Host_Map_f (void) expanded = va ("maps/%s.bsp", Cmd_Argv (1)); QFS_FOpenFile (expanded, &f); if (!f) { - Con_Printf ("Can't find %s\n", expanded); + Sys_Printf ("Can't find %s\n", expanded); return; } Qclose (f); @@ -337,12 +337,12 @@ Host_Changelevel_f (void) char level[MAX_QPATH]; if (Cmd_Argc () != 2) { - Con_Printf ("changelevel : continue game on a new " + Sys_Printf ("changelevel : continue game on a new " "level\n"); return; } if (!sv.active || cls.demoplayback) { - Con_Printf ("Only the server may changelevel\n"); + Sys_Printf ("Only the server may changelevel\n"); return; } SV_SaveSpawnparms (); @@ -540,34 +540,34 @@ Host_Savegame_f (void) return; if (!sv.active) { - Con_Printf ("Not playing a local game.\n"); + Sys_Printf ("Not playing a local game.\n"); return; } if (cl.intermission) { - Con_Printf ("Can't save in intermission.\n"); + Sys_Printf ("Can't save in intermission.\n"); return; } if (svs.maxclients != 1) { - Con_Printf ("Can't save multiplayer games.\n"); + Sys_Printf ("Can't save multiplayer games.\n"); return; } if (Cmd_Argc () != 2) { - Con_Printf ("save : save a game\n"); + Sys_Printf ("save : save a game\n"); return; } if (strstr (Cmd_Argv (1), "..")) { - Con_Printf ("Relative pathnames are not allowed.\n"); + Sys_Printf ("Relative pathnames are not allowed.\n"); return; } for (i = 0; i < svs.maxclients; i++) { if (svs.clients[i].active && (SVfloat (svs.clients[i].edict, health) <= 0)) { - Con_Printf ("Can't savegame with a dead player\n"); + Sys_Printf ("Can't savegame with a dead player\n"); return; } } @@ -576,10 +576,10 @@ Host_Savegame_f (void) qfs_gamedir->dir.def, Cmd_Argv (1)); QFS_DefaultExtension (name, ".sav"); - Con_Printf ("Saving game to %s...\n", name); + Sys_Printf ("Saving game to %s...\n", name); f = QFS_WOpen (name, 0); if (!f) { - Con_Printf ("ERROR: couldn't open.\n"); + Sys_Printf ("ERROR: couldn't open.\n"); return; } @@ -588,7 +588,7 @@ Host_Savegame_f (void) free (save_text); Qclose (f); - Con_Printf ("done.\n"); + Sys_Printf ("done.\n"); } static void @@ -612,7 +612,7 @@ Host_Loadgame_f (void) goto end; if (Cmd_Argc () != 2) { - Con_Printf ("load : load a game\n"); + Sys_Printf ("load : load a game\n"); goto end; } @@ -629,10 +629,10 @@ Host_Loadgame_f (void) // been used. The menu calls it before stuffing loadgame command // SCR_BeginLoadingPlaque (); - Con_Printf ("Loading game from %s...\n", name->str); + Sys_Printf ("Loading game from %s...\n", name->str); f = QFS_Open (name->str, "rz"); if (!f) { - Con_Printf ("ERROR: couldn't open.\n"); + Sys_Printf ("ERROR: couldn't open.\n"); goto end; } script_data = malloc (Qfilesize (f) + 1); @@ -646,14 +646,14 @@ Host_Loadgame_f (void) Script_GetToken (script, 1); if (strequal (script->token->str, PROGRAM)) { if (!Script_TokenAvailable (script, 1)) { - Con_Printf ("Unexpected EOF reading %s\n", name->str); + Sys_Printf ("Unexpected EOF reading %s\n", name->str); goto end; } game = PL_GetPropertyList (script->p); } else { sscanf (script->token->str, "%i", &version); if (version != SAVEGAME_VERSION) { - Con_Printf ("Savegame is version %i, not %i\n", version, + Sys_Printf ("Savegame is version %i, not %i\n", version, SAVEGAME_VERSION); goto end; } @@ -674,7 +674,7 @@ Host_Loadgame_f (void) SV_SpawnServer (mapname); if (!sv.active) { - Con_Printf ("Couldn't load map %s\n", mapname); + Sys_Printf ("Couldn't load map %s\n", mapname); goto end; } sv.paused = true; // pause until all clients connect @@ -741,7 +741,7 @@ Host_Name_f (void) const char *newName; if (Cmd_Argc () == 1) { - Con_Printf ("\"name\" is \"%s\"\n", cl_name->string); + Sys_Printf ("\"name\" is \"%s\"\n", cl_name->string); return; } if (Cmd_Argc () == 2) @@ -760,7 +760,7 @@ Host_Name_f (void) if (host_client->name[0] && strcmp (host_client->name, "unconnected")) if (strcmp (host_client->name, newName) != 0) - Con_Printf ("%s renamed to %s\n", host_client->name, newName); + Sys_Printf ("%s renamed to %s\n", host_client->name, newName); strcpy (host_client->name, newName); SVstring (host_client->edict, netname) = PR_SetString (&sv_pr_state, host_client->name); @@ -774,8 +774,8 @@ Host_Name_f (void) static void Host_Version_f (void) { - Con_Printf ("Version %s\n", VERSION); - Con_Printf ("Exe: " __TIME__ " " __DATE__ "\n"); + Sys_Printf ("Version %s\n", VERSION); + Sys_Printf ("Exe: " __TIME__ " " __DATE__ "\n"); } static void @@ -834,7 +834,7 @@ Host_Say (qboolean teamonly) } host_client = save; - Con_Printf ("%s", &text[1]); + Sys_Printf ("%s", &text[1]); } static void @@ -951,12 +951,12 @@ static void Host_PreSpawn_f (void) { if (cmd_source == src_command) { - Con_Printf ("prespawn is not valid from the console\n"); + Sys_Printf ("prespawn is not valid from the console\n"); return; } if (host_client->spawned) { - Con_Printf ("prespawn not valid -- already spawned\n"); + Sys_Printf ("prespawn not valid -- already spawned\n"); return; } @@ -974,12 +974,12 @@ Host_Spawn_f (void) edict_t *ent; if (cmd_source == src_command) { - Con_Printf ("spawn is not valid from the console\n"); + Sys_Printf ("spawn is not valid from the console\n"); return; } if (host_client->spawned) { - Con_Printf ("Spawn not valid -- already spawned\n"); + Sys_Printf ("Spawn not valid -- already spawned\n"); return; } // run the entrance script @@ -1004,7 +1004,7 @@ Host_Spawn_f (void) *sv_globals.self = EDICT_TO_PROG (&sv_pr_state, sv_player); PR_ExecuteProgram (&sv_pr_state, sv_funcs.ClientConnect); if ((Sys_DoubleTime () - host_client->netconnection->connecttime) <= - sv.time) Con_Printf ("%s entered the game\n", host_client->name); + sv.time) Sys_Printf ("%s entered the game\n", host_client->name); PR_ExecuteProgram (&sv_pr_state, sv_funcs.PutClientInServer); } @@ -1077,7 +1077,7 @@ static void Host_Begin_f (void) { if (cmd_source == src_command) { - Con_Printf ("begin is not valid from the console\n"); + Sys_Printf ("begin is not valid from the console\n"); return; } @@ -1298,7 +1298,7 @@ FindViewthing (void) "viewthing")) return e; } - Con_Printf ("No viewthing on map\n"); + Sys_Printf ("No viewthing on map\n"); return NULL; } @@ -1314,7 +1314,7 @@ Host_Viewmodel_f (void) m = Mod_ForName (Cmd_Argv (1), false); if (!m) { - Con_Printf ("Can't load %s\n", Cmd_Argv (1)); + Sys_Printf ("Can't load %s\n", Cmd_Argv (1)); return; } @@ -1352,7 +1352,7 @@ PrintFrameName (model_t *m, int frame) return; pframedesc = &hdr->frames[frame]; - Con_Printf ("frame %i: %s\n", frame, pframedesc->name); + Sys_Printf ("frame %i: %s\n", frame, pframedesc->name); Cache_Release (&m->cache); } @@ -1408,10 +1408,10 @@ Host_Startdemos_f (void) c = Cmd_Argc () - 1; if (c > MAX_DEMOS) { - Con_Printf ("Max %i demos in demoloop\n", MAX_DEMOS); + Sys_Printf ("Max %i demos in demoloop\n", MAX_DEMOS); c = MAX_DEMOS; } - Con_Printf ("%i demo(s) in loop\n", c); + Sys_Printf ("%i demo(s) in loop\n", c); for (i = 1; i < c + 1; i++) strncpy (cls.demos[i - 1], Cmd_Argv (i), sizeof (cls.demos[0]) - 1); diff --git a/nq/source/host_skin.c b/nq/source/host_skin.c index 6fa0d5360..cf7a5f53c 100644 --- a/nq/source/host_skin.c +++ b/nq/source/host_skin.c @@ -39,8 +39,6 @@ static __attribute__ ((used)) const char rcsid[] = #endif #include "QF/cmd.h" -#include "compat.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/msg.h" #include "QF/screen.h" @@ -48,6 +46,7 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/sys.h" #include "QF/va.h" +#include "compat.h" #include "client.h" #include "host.h" #include "server.h" @@ -67,9 +66,9 @@ Host_Color_f (void) char playercolor; if (Cmd_Argc () == 1) { - Con_Printf ("\"color\" is \"%d %d\"\n", (cl_color->int_val) >> 4, + Sys_Printf ("\"color\" is \"%d %d\"\n", (cl_color->int_val) >> 4, (cl_color->int_val) & 0x0f); - Con_Printf ("color <0-13> [0-13]\n"); + Sys_Printf ("color <0-13> [0-13]\n"); return; } diff --git a/nq/source/skin.c b/nq/source/skin.c index 2506281c6..0b4697cf0 100644 --- a/nq/source/skin.c +++ b/nq/source/skin.c @@ -38,7 +38,6 @@ static __attribute__ ((used)) const char rcsid[] = # include #endif -#include "QF/console.h" #include "QF/cvar.h" #include "QF/hash.h" #include "QF/image.h" @@ -165,7 +164,7 @@ Skin_Cache (skin_t *skin) snprintf (name, sizeof (name), "skins/%s.pcx", skin->name); QFS_FOpenFile (name, &file); if (!file) { - Con_Printf ("Couldn't load skin %s\n", name); + Sys_Printf ("Couldn't load skin %s\n", name); snprintf (name, sizeof (name), "skins/%s.pcx", baseskin->string); QFS_FOpenFile (name, &file); if (!file) { @@ -185,7 +184,7 @@ Skin_Cache (skin_t *skin) if (!tex || tex->width > 320 || tex->height > 200) { skin->failedload = true; - Con_Printf ("Bad skin %s\n", name); + Sys_Printf ("Bad skin %s\n", name); return NULL; } diff --git a/nq/source/sv_cl_phys.c b/nq/source/sv_cl_phys.c index 32710924e..56fa60544 100644 --- a/nq/source/sv_cl_phys.c +++ b/nq/source/sv_cl_phys.c @@ -31,7 +31,6 @@ static __attribute__ ((used)) const char rcsid[] = "$Id$"; -#include "QF/console.h" #include "QF/cvar.h" #include "QF/sys.h" @@ -65,7 +64,7 @@ SV_CheckStuck (edict_t *ent) VectorCopy (SVvector (ent, origin), org); VectorCopy (SVvector (ent, oldorigin), SVvector (ent, origin)); if (!SV_TestEntityPosition (ent)) { - Con_DPrintf ("Unstuck.\n"); + Sys_DPrintf ("Unstuck.\n"); SV_LinkEdict (ent, true); return; } @@ -77,14 +76,14 @@ SV_CheckStuck (edict_t *ent) SVvector (ent, origin)[1] = org[1] + j; SVvector (ent, origin)[2] = org[2] + z; if (!SV_TestEntityPosition (ent)) { - Con_DPrintf ("Unstuck.\n"); + Sys_DPrintf ("Unstuck.\n"); SV_LinkEdict (ent, true); return; } } VectorCopy (org, SVvector (ent, origin)); - Con_DPrintf ("player is stuck.\n"); + Sys_DPrintf ("player is stuck.\n"); } static qboolean @@ -207,7 +206,7 @@ SV_TryUnstick (edict_t *ent, vec3_t oldvel) if (fabs (oldorg[1] - SVvector (ent, origin)[1]) > 4 || fabs (oldorg[0] - SVvector (ent, origin)[0]) > 4) { -// Con_DPrintf ("unstuck!\n"); +// Sys_DPrintf ("unstuck!\n"); return clip; } // go back to the original pos and try again diff --git a/nq/source/sv_ded.c b/nq/source/sv_ded.c index 9119a9339..b804585be 100644 --- a/nq/source/sv_ded.c +++ b/nq/source/sv_ded.c @@ -36,7 +36,6 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/cdaudio.h" #include "QF/cmd.h" -#include "QF/console.h" #include "QF/csqc.h" #include "QF/cvar.h" #include "QF/draw.h" @@ -141,9 +140,9 @@ color_f (void) char playercolor; if (Cmd_Argc () <= 1) { - Con_Printf ("\"color\" is \"%d %d\"\n", (host_client->colors) >> 4, + Sys_Printf ("\"color\" is \"%d %d\"\n", (host_client->colors) >> 4, (host_client->colors) & 0x0f); - Con_Printf ("color <0-13> [0-13]\n"); + Sys_Printf ("color <0-13> [0-13]\n"); return; } diff --git a/nq/source/sv_main.c b/nq/source/sv_main.c index ff3a5d33b..91aaa6411 100644 --- a/nq/source/sv_main.c +++ b/nq/source/sv_main.c @@ -31,7 +31,6 @@ static __attribute__ ((used)) const char rcsid[] = "$Id$"; -#include "QF/console.h" #include "QF/cmd.h" #include "QF/cvar.h" #include "QF/msg.h" @@ -144,7 +143,7 @@ SV_StartSound (edict_t *entity, int channel, const char *sample, int volume, break; if (sound_num == MAX_SOUNDS || !sv.sound_precache[sound_num]) { - Con_Printf ("SV_StartSound: %s not precacheed\n", sample); + Sys_Printf ("SV_StartSound: %s not precacheed\n", sample); return; } @@ -248,7 +247,7 @@ SV_ConnectClient (int clientnum) client = svs.clients + clientnum; - Con_DPrintf ("Client %s connected\n", client->netconnection->address); + Sys_DPrintf ("Client %s connected\n", client->netconnection->address); edictnum = clientnum + 1; @@ -409,7 +408,7 @@ SV_WriteEntitiesToClient (edict_t *clent, sizebuf_t *msg) } if (msg->maxsize - msg->cursize < 16) { - Con_Printf ("packet overflow\n"); + Sys_Printf ("packet overflow\n"); return; } // send an update @@ -909,7 +908,7 @@ SV_SpawnServer (const char *server) if (hostname->string[0] == 0) Cvar_Set (hostname, "UNNAMED"); - Con_DPrintf ("SpawnServer: %s\n", server); + Sys_DPrintf ("SpawnServer: %s\n", server); svs.changelevel_issued = false; // now safe to issue another // tell all connected clients that we are going to a new level @@ -973,7 +972,7 @@ SV_SpawnServer (const char *server) snprintf (sv.modelname, sizeof (sv.modelname), "maps/%s.bsp", server); sv.worldmodel = Mod_ForName (sv.modelname, false); if (!sv.worldmodel) { - Con_Printf ("Couldn't spawn server %s\n", sv.modelname); + Sys_Printf ("Couldn't spawn server %s\n", sv.modelname); sv.active = false; S_UnblockSound (); return; @@ -1040,6 +1039,6 @@ SV_SpawnServer (const char *server) if (host_client->active) SV_SendServerinfo (host_client); - Con_DPrintf ("Server spawned.\n"); + Sys_DPrintf ("Server spawned.\n"); S_UnblockSound (); } diff --git a/nq/source/sv_phys.c b/nq/source/sv_phys.c index 6398ccd10..0a6070f58 100644 --- a/nq/source/sv_phys.c +++ b/nq/source/sv_phys.c @@ -31,7 +31,6 @@ static __attribute__ ((used)) const char rcsid[] = "$Id$"; -#include "QF/console.h" #include "QF/cvar.h" #include "QF/sys.h" @@ -85,7 +84,7 @@ SV_CheckAllEnts (void) continue; if (SV_TestEntityPosition (check)) - Con_Printf ("entity in invalid position\n"); + Sys_Printf ("entity in invalid position\n"); } } #endif @@ -97,13 +96,13 @@ SV_CheckVelocity (edict_t *ent) // bound velocity for (i = 0; i < 3; i++) { if (IS_NAN (SVvector (ent, velocity)[i])) { - Con_Printf ("Got a NaN velocity on %s\n", + Sys_Printf ("Got a NaN velocity on %s\n", PR_GetString (&sv_pr_state, SVstring (ent, classname))); SVvector (ent, velocity)[i] = 0; } if (IS_NAN (SVvector (ent, origin)[i])) { - Con_Printf ("Got a NaN origin on %s\n", + Sys_Printf ("Got a NaN origin on %s\n", PR_GetString (&sv_pr_state, SVstring (ent, classname))); SVvector (ent, origin)[i] = 0; diff --git a/nq/source/sv_pr_cmds.c b/nq/source/sv_pr_cmds.c index 585f34214..8f8989378 100644 --- a/nq/source/sv_pr_cmds.c +++ b/nq/source/sv_pr_cmds.c @@ -41,7 +41,6 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/cbuf.h" #include "QF/clip_hull.h" #include "QF/cmd.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/msg.h" #include "QF/ruamoko.h" @@ -73,7 +72,7 @@ PF_error (progs_t *pr) edict_t *ed; s = PF_VarString (pr, 0); - Con_Printf ("======SERVER ERROR in %s:\n%s\n", + Sys_Printf ("======SERVER ERROR in %s:\n%s\n", PR_GetString (pr, pr->pr_xfunction->descriptor->s_name), s); ed = PROG_TO_EDICT (pr, *sv_globals.self); ED_Print (pr, ed); @@ -97,7 +96,7 @@ PF_objerror (progs_t *pr) edict_t *ed; s = PF_VarString (pr, 0); - Con_Printf ("======OBJECT ERROR in %s:\n%s\n", + Sys_Printf ("======OBJECT ERROR in %s:\n%s\n", PR_GetString (pr, pr->pr_xfunction->descriptor->s_name), s); ed = PROG_TO_EDICT (pr, *sv_globals.self); ED_Print (pr, ed); @@ -305,7 +304,7 @@ PF_sprint (progs_t *pr) s = PF_VarString (pr, 1); if (entnum < 1 || entnum > svs.maxclients) { - Con_Printf ("tried to sprint to a non-client\n"); + Sys_Printf ("tried to sprint to a non-client\n"); return; } @@ -334,7 +333,7 @@ PF_centerprint (progs_t *pr) s = PF_VarString (pr, 1); if (entnum < 1 || entnum > svs.maxclients) { - Con_Printf ("tried to sprint to a non-client\n"); + Sys_Printf ("tried to sprint to a non-client\n"); return; } @@ -383,7 +382,7 @@ PF_ambientsound (progs_t *pr) break; if (!*check) { - Con_Printf ("no precache: %s\n", samp); + Sys_Printf ("no precache: %s\n", samp); return; } diff --git a/nq/source/sv_progs.c b/nq/source/sv_progs.c index c3d696f0a..6bfd7452d 100644 --- a/nq/source/sv_progs.c +++ b/nq/source/sv_progs.c @@ -39,9 +39,9 @@ static __attribute__ ((used)) const char rcsid[] = #endif #include "QF/cmd.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/quakefs.h" +#include "QF/sys.h" #include "compat.h" #include "host.h" @@ -129,7 +129,7 @@ ED_PrintEdict_f (void) int i; i = atoi (Cmd_Argv (1)); - Con_Printf ("\n EDICT %i:\n", i); + Sys_Printf ("\n EDICT %i:\n", i); ED_PrintNum (&sv_pr_state, i); } @@ -143,7 +143,7 @@ static void PR_Profile_f (void) { if (!sv_pr_state.progs) { - Con_Printf ("no progs loaded\n"); + Sys_Printf ("no progs loaded\n"); return; } PR_Profile (&sv_pr_state); @@ -480,7 +480,7 @@ SV_LoadProgs (void) sv_range = PR_RANGE_NONE; range = "None"; } - Con_DPrintf ("Using %s builtin extention mapping\n", range); + Sys_DPrintf ("Using %s builtin extention mapping\n", range); PR_LoadProgs (&sv_pr_state, progs_name, sv.max_edicts, sv_progs_zone->int_val * 1024); diff --git a/nq/source/sv_user.c b/nq/source/sv_user.c index 54e84b6cb..6276cb93e 100644 --- a/nq/source/sv_user.c +++ b/nq/source/sv_user.c @@ -39,7 +39,6 @@ static __attribute__ ((used)) const char rcsid[] = #endif #include "QF/cbuf.h" -#include "QF/console.h" #include "QF/cmd.h" #include "QF/cvar.h" #include "QF/keys.h" @@ -462,7 +461,7 @@ SV_ReadClientMessage (void) nextmsg: ret = NET_GetMessage (host_client->netconnection); if (ret == -1) { - Con_Printf ("SV_ReadClientMessage: NET_GetMessage failed\n"); + Sys_Printf ("SV_ReadClientMessage: NET_GetMessage failed\n"); return false; } if (!ret) @@ -475,7 +474,7 @@ SV_ReadClientMessage (void) return false; // a command caused an error if (net_message->badread) { - Con_Printf ("SV_ReadClientMessage: badread\n"); + Sys_Printf ("SV_ReadClientMessage: badread\n"); return false; } @@ -486,7 +485,7 @@ SV_ReadClientMessage (void) goto nextmsg; // end of message default: - Con_Printf ("SV_ReadClientMessage: unknown command char\n"); + Sys_Printf ("SV_ReadClientMessage: unknown command char\n"); return false; case clc_nop: @@ -541,7 +540,7 @@ SV_ReadClientMessage (void) else if (ret == 1) Cmd_ExecuteString (s, src_client); else - Con_DPrintf ("%s tried to %s\n", host_client->name, s); + Sys_DPrintf ("%s tried to %s\n", host_client->name, s); break; case clc_disconnect: diff --git a/nq/source/sys_unix.c b/nq/source/sys_unix.c index a6b093de6..318d8ae68 100644 --- a/nq/source/sys_unix.c +++ b/nq/source/sys_unix.c @@ -51,7 +51,6 @@ static __attribute__ ((used)) const char rcsid[] = #include #include -#include "QF/console.h" #include "QF/cvar.h" #include "QF/qargs.h" #include "QF/sys.h" @@ -92,7 +91,7 @@ main (int c, const char *v[]) if (!sys_nostdout->int_val) { fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) | O_NONBLOCK); - Con_Printf ("Quake -- Version %s\n", NQ_VERSION); + Sys_Printf ("Quake -- Version %s\n", NQ_VERSION); } oldtime = Sys_DoubleTime () - 0.1; diff --git a/qtv/source/client.c b/qtv/source/client.c index 06a894917..29292cc86 100644 --- a/qtv/source/client.c +++ b/qtv/source/client.c @@ -46,12 +46,12 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/cbuf.h" #include "QF/cmd.h" -#include "QF/console.h" #include "QF/checksum.h" #include "QF/dstring.h" #include "QF/hash.h" #include "QF/idparse.h" #include "QF/info.h" +#include "QF/sys.h" #include "QF/va.h" #include "qw/bothdefs.h" @@ -577,7 +577,7 @@ client_parse_message (client_t *cl) MSG_GetReadCount (net_message) - checksumIndex - 1, seq_hash); if (calculatedChecksum != checksum) { - Con_DPrintf + Sys_DPrintf ("Failed command checksum for %s(%d) (%d != %d)\n", Info_ValueForKey (cl->userinfo, "name"), cl->netchan.incoming_sequence, checksum, diff --git a/qtv/source/qtv.c b/qtv/source/qtv.c index cc3394b1a..e85a2e1ab 100644 --- a/qtv/source/qtv.c +++ b/qtv/source/qtv.c @@ -107,12 +107,12 @@ qtv_print (const char *fmt, va_list args) char stamp[123]; if (pending) { - Con_Printf ("%s", msg->str); + Sys_Printf ("%s", msg->str); } else { mytime = time (NULL); local = localtime (&mytime); strftime (stamp, sizeof (stamp), "[%b %e %X] ", local); - Con_Printf ("%s%s", stamp, msg->str); + Sys_Printf ("%s%s", stamp, msg->str); } if (msg->str[0] && msg->str[strlen (msg->str) - 1] != '\n') { pending = 1; @@ -347,7 +347,7 @@ qtv_connectionless_packet (void) default: goto bad_packet; case A2C_PRINT: - Con_Printf ("%s", str + 1); + Sys_Printf ("%s", str + 1); break; case A2A_PING: qtv_ping (); @@ -355,7 +355,7 @@ qtv_connectionless_packet (void) } } else { bad_packet: - Con_Printf ("bad connectionless packet from %s:\n%s\n", + Sys_Printf ("bad connectionless packet from %s:\n%s\n", NET_AdrToString (net_from), str); } } @@ -381,7 +381,7 @@ main (int argc, const char *argv[]) qtv_init (); - Con_Printf ("Ohayou gozaimasu\n"); + Sys_Printf ("Ohayou gozaimasu\n"); while (1) { Cbuf_Execute_Stack (qtv_cbuf); diff --git a/qw/source/cl_cam.c b/qw/source/cl_cam.c index 9818c5aaa..7faba249d 100644 --- a/qw/source/cl_cam.c +++ b/qw/source/cl_cam.c @@ -45,7 +45,6 @@ static __attribute__ ((used)) const char rcsid[] = #include -#include "QF/console.h" #include "QF/cvar.h" #include "QF/msg.h" @@ -623,7 +622,7 @@ Cam_FinishMove (usercmd_t *cmd) } oldbuttons |= BUTTON_JUMP; // don't jump again until released } -// Con_Printf ("Selecting track target...\n"); +// Sys_Printf ("Selecting track target...\n"); if (locked && autocam) end = (spec_track + 1) % MAX_CLIENTS; @@ -647,7 +646,7 @@ Cam_FinishMove (usercmd_t *cmd) ideal_track = i; return; } - Con_Printf ("No target found ...\n"); + Sys_Printf ("No target found ...\n"); autocam = locked = false; } diff --git a/qw/source/cl_cmd.c b/qw/source/cl_cmd.c index 06abd5793..b13f01580 100644 --- a/qw/source/cl_cmd.c +++ b/qw/source/cl_cmd.c @@ -40,8 +40,8 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/cbuf.h" #include "QF/cmd.h" -#include "QF/console.h" #include "QF/msg.h" +#include "QF/sys.h" #include "QF/teamplay.h" #include "client.h" @@ -58,7 +58,7 @@ void CL_Cmd_ForwardToServer (void) { if (cls.state == ca_disconnected) { - Con_Printf ("Can't \"%s\", not connected\n", Cmd_Argv (0)); + Sys_Printf ("Can't \"%s\", not connected\n", Cmd_Argv (0)); return; } @@ -96,7 +96,7 @@ static void CL_Cmd_ForwardToServer_f (void) { if (cls.state == ca_disconnected) { - Con_Printf ("Can't \"%s\", not connected\n", Cmd_Argv (0)); + Sys_Printf ("Can't \"%s\", not connected\n", Cmd_Argv (0)); return; } diff --git a/qw/source/cl_demo.c b/qw/source/cl_demo.c index 7095e96ff..bb4bd417c 100644 --- a/qw/source/cl_demo.c +++ b/qw/source/cl_demo.c @@ -47,7 +47,6 @@ static __attribute__ ((used)) const char rcsid[] = #include #include "QF/cbuf.h" -#include "QF/console.h" #include "QF/cmd.h" #include "QF/cvar.h" #include "QF/msg.h" @@ -391,7 +390,7 @@ readit: goto readit; default: - Con_Printf ("Corrupted demo.\n"); + Sys_Printf ("Corrupted demo.\n"); CL_StopPlayback (); return 0; } @@ -437,7 +436,7 @@ void CL_Stop_f (void) { if (!cls.demorecording) { - Con_Printf ("Not recording a demo.\n"); + Sys_Printf ("Not recording a demo.\n"); return; } // write a disconnect message to the demo file @@ -451,7 +450,7 @@ CL_Stop_f (void) Qclose (cls.demofile); cls.demofile = NULL; cls.demorecording = false; - Con_Printf ("Completed demo\n"); + Sys_Printf ("Completed demo\n"); } /* @@ -570,11 +569,11 @@ CL_Record (const char *argv1) cls.demofile = QFS_WOpen (name, 0); } if (!cls.demofile) { - Con_Printf ("ERROR: couldn't open.\n"); + Sys_Printf ("ERROR: couldn't open.\n"); return; } - Con_Printf ("recording to %s.\n", name); + Sys_Printf ("recording to %s.\n", name); cls.demorecording = true; /*-------------------------------------------------*/ @@ -819,12 +818,12 @@ CL_Record_f (void) if (Cmd_Argc () > 2) { // we use a demo name like year-month-day-hours-minutes-mapname.qwd // if there is no argument - Con_Printf ("record [demoname]\n"); + Sys_Printf ("record [demoname]\n"); return; } if (cls.demoplayback || cls.state != ca_active) { - Con_Printf ("You must be connected to record.\n"); + Sys_Printf ("You must be connected to record.\n"); return; } @@ -849,12 +848,12 @@ CL_ReRecord_f (void) c = Cmd_Argc (); if (c != 2) { - Con_Printf ("rerecord \n"); + Sys_Printf ("rerecord \n"); return; } if (!*cls.servername) { - Con_Printf ("No server to reconnect to...\n"); + Sys_Printf ("No server to reconnect to...\n"); return; } @@ -869,11 +868,11 @@ CL_ReRecord_f (void) cls.demofile = QFS_WOpen (name, 0); if (!cls.demofile) { - Con_Printf ("ERROR: couldn't open.\n"); + Sys_Printf ("ERROR: couldn't open.\n"); return; } - Con_Printf ("recording to %s.\n", name); + Sys_Printf ("recording to %s.\n", name); cls.demorecording = true; CL_Disconnect (); @@ -889,10 +888,10 @@ CL_StartDemo (void) strncpy (name, demoname, sizeof (name)); QFS_DefaultExtension (name, ".qwd"); - Con_Printf ("Playing demo from %s.\n", name); + Sys_Printf ("Playing demo from %s.\n", name); QFS_FOpenFile (name, &cls.demofile); if (!cls.demofile) { - Con_Printf ("ERROR: couldn't open.\n"); + Sys_Printf ("ERROR: couldn't open.\n"); cls.demonum = -1; // stop demo loop return; } @@ -901,9 +900,9 @@ CL_StartDemo (void) net_blocksend = 1; if (strequal (QFS_FileExtension (name), ".mvd")) { cls.demoplayback2 = true; - Con_Printf ("mvd\n"); + Sys_Printf ("mvd\n"); } else { - Con_Printf ("qwd\n"); + Sys_Printf ("qwd\n"); } CL_SetState (ca_demostart); Netchan_Setup (&cls.netchan, net_from, 0, NC_SEND_QPORT); @@ -927,7 +926,7 @@ void CL_PlayDemo_f (void) { if (Cmd_Argc () != 2) { - Con_Printf ("play : plays a demo\n"); + Sys_Printf ("play : plays a demo\n"); return; } timedemo_runs = timedemo_count = 1; // make sure looped timedemos stop @@ -978,7 +977,7 @@ CL_FinishTimeDemo (void) time = Sys_DoubleTime () - cls.td_starttime; if (!time) time = 1; - Con_Printf ("%i frame%s %.4g seconds %.4g fps\n", frames, + Sys_Printf ("%i frame%s %.4g seconds %.4g fps\n", frames, frames == 1 ? "" : "s", time, frames / time); CL_TimeFrames_DumpLog (); @@ -1007,10 +1006,10 @@ CL_FinishTimeDemo (void) for (i = 0; i < timedemo_runs; i++) variance += sqr (timedemo_data[i].fps - average); variance /= timedemo_runs; - Con_Printf ("timedemo stats for %d runs:\n", timedemo_runs); - Con_Printf (" average fps: %.3f\n", average); - Con_Printf (" min/max fps: %.3f/%.3f\n", min, max); - Con_Printf ("std deviation: %.3f fps\n", sqrt (variance)); + Sys_Printf ("timedemo stats for %d runs:\n", timedemo_runs); + Sys_Printf (" average fps: %.3f\n", average); + Sys_Printf (" min/max fps: %.3f/%.3f\n", min, max); + Sys_Printf ("std deviation: %.3f fps\n", sqrt (variance)); } free (timedemo_data); timedemo_data = 0; @@ -1028,7 +1027,7 @@ void CL_TimeDemo_f (void) { if (Cmd_Argc () < 2 || Cmd_Argc () > 3) { - Con_Printf ("timedemo [count]: gets demo speeds\n"); + Sys_Printf ("timedemo [count]: gets demo speeds\n"); return; } timedemo_runs = timedemo_count = 1; // make sure looped timedemos stop @@ -1101,10 +1100,10 @@ CL_TimeFrames_DumpLog (void) if (demo_timeframes_isactive == 0) return; - Con_Printf ("Dumping Timed Frames log: %s\n", filename); + Sys_Printf ("Dumping Timed Frames log: %s\n", filename); outputfile = QFS_Open (filename, "w"); if (!outputfile) { - Con_Printf ("Could not open: %s\n", filename); + Sys_Printf ("Could not open: %s\n", filename); return; } for (i = 1; i < demo_timeframes_index; i++) { diff --git a/qw/source/cl_ents.c b/qw/source/cl_ents.c index 6910f2c7d..3ca0f029e 100644 --- a/qw/source/cl_ents.c +++ b/qw/source/cl_ents.c @@ -38,12 +38,12 @@ static __attribute__ ((used)) const char rcsid[] = # include #endif -#include "QF/console.h" #include "QF/cvar.h" #include "QF/locs.h" #include "QF/msg.h" #include "QF/render.h" #include "QF/skin.h" +#include "QF/sys.h" #include "qw/msg_ucmd.h" @@ -262,7 +262,7 @@ FlushEntityPacket (void) entity_state_t olde, newe; int word; - Con_DPrintf ("FlushEntityPacket\n"); + Sys_DPrintf ("FlushEntityPacket\n"); memset (&olde, 0, sizeof (olde)); @@ -303,7 +303,7 @@ CL_ParsePacketEntities (qboolean delta) if (cls.demoplayback2) from = oldpacket = (cls.netchan.incoming_sequence - 1); if ((from & UPDATE_MASK) != (oldpacket & UPDATE_MASK)) - Con_DPrintf ("WARNING: from mismatch\n"); + Sys_DPrintf ("WARNING: from mismatch\n"); } else oldpacket = -1; @@ -351,7 +351,7 @@ CL_ParsePacketEntities (qboolean delta) while (newnum > oldnum) { if (full) { - Con_Printf ("WARNING: oldcopy on full update"); + Sys_Printf ("WARNING: oldcopy on full update"); FlushEntityPacket (); return; } @@ -370,7 +370,7 @@ CL_ParsePacketEntities (qboolean delta) if (word & U_REMOVE) { if (full) { cl.validsequence = 0; - Con_Printf ("WARNING: U_REMOVE on full update\n"); + Sys_Printf ("WARNING: U_REMOVE on full update\n"); FlushEntityPacket (); return; } @@ -389,7 +389,7 @@ CL_ParsePacketEntities (qboolean delta) if (newnum == oldnum) { // delta from previous if (full) { cl.validsequence = 0; - Con_Printf ("WARNING: delta on full update"); + Sys_Printf ("WARNING: delta on full update"); } if (word & U_REMOVE) { // Clear the entity entity_t *ent = &cl_packet_ents[newnum]; @@ -1010,7 +1010,7 @@ CL_SetSolidEntities (void) if (cl.model_precache[state->modelindex]->hulls[1].firstclipnode || cl.model_precache[state->modelindex]->clipbox) { if (pmove.numphysent == MAX_PHYSENTS) { - Con_Printf ("WARNING: entity physent overflow, email " + Sys_Printf ("WARNING: entity physent overflow, email " "quakeforge-devel@lists.quakeforge.net\n"); break; } @@ -1078,11 +1078,11 @@ CL_SetUpPlayerPrediction (qboolean dopred) msec = 500 * (playertime - state->state_time); if (msec <= 0 || !dopred) { VectorCopy (state->pls.origin, pplayer->origin); -// Con_DPrintf ("nopredict\n"); +// Sys_DPrintf ("nopredict\n"); } else { // predict players movement state->pls.cmd.msec = msec = min (msec, 255); -// Con_DPrintf ("predict: %i\n", msec); +// Sys_DPrintf ("predict: %i\n", msec); CL_PredictUsercmd (state, &exact, &state->pls.cmd, false); VectorCopy (exact.pls.origin, pplayer->origin); @@ -1123,7 +1123,7 @@ CL_SetSolidPlayers (int playernum) continue; // dead players aren't solid if (pmove.numphysent == MAX_PHYSENTS) { - Con_Printf ("WARNING: player physent overflow, email " + Sys_Printf ("WARNING: player physent overflow, email " "quakeforge-devel@lists.quakeforge.net\n"); break; } diff --git a/qw/source/cl_http.c b/qw/source/cl_http.c index f13ecc9b0..0094b33c9 100644 --- a/qw/source/cl_http.c +++ b/qw/source/cl_http.c @@ -38,8 +38,8 @@ static __attribute__ ((used)) const char rcsid[] = #include -#include "QF/console.h" #include "QF/dstring.h" +#include "QF/sys.h" #include "cl_http.h" #include "cl_parse.h" @@ -60,7 +60,7 @@ static size_t http_write (void *ptr, size_t size, size_t nmemb, void *stream) { if (!cls.download) { - Con_Printf ("http_write: unexpected call\n"); + Sys_Printf ("http_write: unexpected call\n"); return -1; } return Qwrite (cls.download, ptr, size * nmemb); @@ -114,7 +114,7 @@ CL_HTTP_Update (void) if (response_code == 200) { CL_FinishDownload (); } else { - Con_Printf ("download failed: %ld\n", response_code); + Sys_Printf ("download failed: %ld\n", response_code); CL_FailDownload (); } curl_multi_remove_handle (multi_handle, easy_handle); diff --git a/qw/source/cl_input.c b/qw/source/cl_input.c index 0431ecaf2..d2c537f5a 100644 --- a/qw/source/cl_input.c +++ b/qw/source/cl_input.c @@ -40,11 +40,11 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/checksum.h" #include "QF/cmd.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/input.h" #include "QF/keys.h" #include "QF/msg.h" +#include "QF/sys.h" #include "QF/teamplay.h" #include "QF/va.h" @@ -109,7 +109,7 @@ KeyDown (kbutton_t *b) else if (!b->down[1]) b->down[1] = k; else { - Con_Printf ("Three keys down for a button!\n"); + Sys_Printf ("Three keys down for a button!\n"); return; } diff --git a/qw/source/cl_main.c b/qw/source/cl_main.c index 5ccdc163b..cde3b08c1 100644 --- a/qw/source/cl_main.c +++ b/qw/source/cl_main.c @@ -242,7 +242,7 @@ static void CL_Quit_f (void) { if (!con_module) - Con_Printf ("I hope you wanted to quit\n"); + Sys_Printf ("I hope you wanted to quit\n"); CL_Disconnect (); Sys_Quit (); } @@ -250,8 +250,8 @@ CL_Quit_f (void) static void CL_Version_f (void) { - Con_Printf ("%s Version %s\n", PROGRAM, VERSION); - Con_Printf ("Binary: " __TIME__ " " __DATE__ "\n"); + Sys_Printf ("%s Version %s\n", PROGRAM, VERSION); + Sys_Printf ("Binary: " __TIME__ " " __DATE__ "\n"); } /* @@ -275,7 +275,7 @@ CL_SendConnectPacket (void) t1 = Sys_DoubleTime (); if (!NET_StringToAdr (cls.servername, &cls.server_addr)) { - Con_Printf ("Bad server address\n"); + Sys_Printf ("Bad server address\n"); connect_time = -1; return; } @@ -316,7 +316,7 @@ CL_CheckForResend (void) t1 = Sys_DoubleTime (); if (!NET_StringToAdr (cls.servername, &cls.server_addr)) { - Con_Printf ("Bad server address\n"); + Sys_Printf ("Bad server address\n"); connect_time = -1; return; } @@ -328,7 +328,7 @@ CL_CheckForResend (void) connect_time = realtime + t2 - t1; // for retransmit requests VID_SetCaption (va ("Connecting to %s", cls.servername)); - Con_Printf ("Connecting to %s...\n", cls.servername); + Sys_Printf ("Connecting to %s...\n", cls.servername); Netchan_SendPacket (strlen (getchallenge), (void *) getchallenge, cls.server_addr); } @@ -346,7 +346,7 @@ CL_Connect_f (void) const char *server; if (Cmd_Argc () != 2) { - Con_Printf ("usage: connect \n"); + Sys_Printf ("usage: connect \n"); return; } @@ -381,7 +381,7 @@ CL_Rcon_f (void) to = cls.netchan.remote_address; else { if (!rcon_address->string[0]) { - Con_Printf ("You must either be connected, or set the " + Sys_Printf ("You must either be connected, or set the " "'rcon_address' cvar to issue rcon commands\n"); return; } @@ -416,7 +416,7 @@ CL_ClearState (void) CL_Init_Entity (&cl.viewent); - Con_DPrintf ("Clearing memory\n"); + Sys_DPrintf ("Clearing memory\n"); D_FlushCaches (); Mod_ClearAll (); if (host_hunklevel) // FIXME: check this... @@ -546,7 +546,7 @@ CL_User_f (void) int uid, i; if (Cmd_Argc () != 2) { - Con_Printf ("Usage: user \n"); + Sys_Printf ("Usage: user \n"); return; } @@ -561,7 +561,7 @@ CL_User_f (void) return; } } - Con_Printf ("User not in server.\n"); + Sys_Printf ("User not in server.\n"); } /* @@ -575,17 +575,17 @@ CL_Users_f (void) int c, i; c = 0; - Con_Printf ("userid frags name\n"); - Con_Printf ("------ ----- ----\n"); + Sys_Printf ("userid frags name\n"); + Sys_Printf ("------ ----- ----\n"); for (i = 0; i < MAX_CLIENTS; i++) { if (cl.players[i].name[0]) { - Con_Printf ("%6i %4i %s\n", cl.players[i].userid, + Sys_Printf ("%6i %4i %s\n", cl.players[i].userid, cl.players[i].frags, cl.players[i].name); c++; } } - Con_Printf ("%i total users\n", c); + Sys_Printf ("%i total users\n", c); } /* @@ -599,30 +599,30 @@ CL_FullServerinfo_f (void) const char *p; if (Cmd_Argc () != 2) { - Con_Printf ("usage: fullserverinfo \n"); + Sys_Printf ("usage: fullserverinfo \n"); return; } - Con_DPrintf ("Cmd_Argv (1): '%s'\n", Cmd_Argv (1)); + Sys_DPrintf ("Cmd_Argv (1): '%s'\n", Cmd_Argv (1)); Info_Destroy (cl.serverinfo); cl.serverinfo = Info_ParseString (Cmd_Argv (1), MAX_SERVERINFO_STRING, 0); - Con_DPrintf ("cl.serverinfo: '%s'\n", Info_MakeString (cl.serverinfo, 0)); + Sys_DPrintf ("cl.serverinfo: '%s'\n", Info_MakeString (cl.serverinfo, 0)); if ((p = Info_ValueForKey (cl.serverinfo, "*qf_version")) && *p) { if (server_version == NULL) - Con_Printf ("QuakeForge v%s Server\n", p); + Sys_Printf ("QuakeForge v%s Server\n", p); server_version = strdup (p); } else if ((p = Info_ValueForKey (cl.serverinfo, "*version")) && *p) { if (server_version == NULL) - Con_Printf ("QuakeWorld v%s Server\n", p); + Sys_Printf ("QuakeWorld v%s Server\n", p); server_version = strdup (p); } if ((p = Info_ValueForKey (cl.serverinfo, "*qsg_version")) && *p) { if ((cl.stdver = atof (p))) - Con_Printf ("Server supports QSG v%s protocol\n", p); + Sys_Printf ("Server supports QSG v%s protocol\n", p); else - Con_Printf ("Invalid QSG Protocol number: %s", p); + Sys_Printf ("Invalid QSG Protocol number: %s", p); } cl.chase = cl.sv_cshifts = cl.no_pogo_stick = cl.teamplay = 0; @@ -691,7 +691,7 @@ CL_FullInfo_f (void) info_t *info; if (Cmd_Argc () != 2) { - Con_Printf ("fullinfo \n"); + Sys_Printf ("fullinfo \n"); return; } @@ -713,7 +713,7 @@ CL_SetInfo_f (void) return; } if (Cmd_Argc () != 3) { - Con_Printf ("usage: setinfo [ ]\n"); + Sys_Printf ("usage: setinfo [ ]\n"); return; } if (strcaseequal (Cmd_Argv (1), pmodel_name) @@ -743,12 +743,12 @@ CL_Packet_f (void) netadr_t adr; if (Cmd_Argc () != 3) { - Con_Printf ("packet \n"); + Sys_Printf ("packet \n"); return; } if (!NET_StringToAdr (Cmd_Argv (1), &adr)) { - Con_Printf ("Bad address\n"); + Sys_Printf ("Bad address\n"); return; } @@ -811,7 +811,7 @@ CL_Changing_f (void) r_force_fullscreen = 0; CL_SetState (ca_connected); // not active anymore, but not // disconnected - Con_Printf ("\nChanging map...\n"); + Sys_Printf ("\nChanging map...\n"); } /* @@ -830,7 +830,7 @@ CL_Reconnect_f (void) S_StopAllSounds (); if (cls.state == ca_connected) { - Con_Printf ("reconnecting...\n"); + Sys_Printf ("reconnecting...\n"); VID_SetCaption ("Reconnecting"); MSG_WriteByte (&cls.netchan.message, clc_stringcmd); MSG_WriteString (&cls.netchan.message, "new"); @@ -838,7 +838,7 @@ CL_Reconnect_f (void) } if (!*cls.servername) { - Con_Printf ("No server to reconnect to...\n"); + Sys_Printf ("No server to reconnect to...\n"); return; } @@ -865,19 +865,19 @@ CL_ConnectionlessPacket (void) if (!cls.demoplayback && (cl_paranoid->int_val || !NET_CompareAdr (net_from, cls.server_addr))) - Con_Printf ("%s: ", NET_AdrToString (net_from)); + Sys_Printf ("%s: ", NET_AdrToString (net_from)); if (c == S2C_CONNECTION) { - Con_Printf ("connection\n"); + Sys_Printf ("connection\n"); if (cls.state >= ca_connected) { if (!cls.demoplayback) - Con_Printf ("Dup connect received. Ignored.\n"); + Sys_Printf ("Dup connect received. Ignored.\n"); return; } Netchan_Setup (&cls.netchan, net_from, cls.qport, NC_SEND_QPORT); MSG_WriteByte (&cls.netchan.message, clc_stringcmd); MSG_WriteString (&cls.netchan.message, "new"); CL_SetState (ca_connected); - Con_Printf ("Connected.\n"); + Sys_Printf ("Connected.\n"); allowremotecmd = false; // localid required now for remote // cmds return; @@ -887,7 +887,7 @@ CL_ConnectionlessPacket (void) char *cmdtext; int len; - Con_Printf ("client command\n"); + Sys_Printf ("client command\n"); if (!cl_allow_cmd_pkt->int_val || (!NET_CompareBaseAdr (net_from, net_local_adr) @@ -895,7 +895,7 @@ CL_ConnectionlessPacket (void) && (!cl_cmd_pkt_adr->string[0] || !NET_CompareBaseAdr (net_from, cl_cmd_packet_address)))) { - Con_Printf ("Command packet from remote host. Ignored.\n"); + Sys_Printf ("Command packet from remote host. Ignored.\n"); return; } if (cl_cmd_pkt_adr->string[0] @@ -918,25 +918,25 @@ CL_ConnectionlessPacket (void) (int) strlen (localid->string) > len || strncmp (localid->string, s, len))) { if (!*localid->string) { - Con_Printf ("===========================\n"); - Con_Printf ("Command packet received from local host, but no " + Sys_Printf ("===========================\n"); + Sys_Printf ("Command packet received from local host, but no " "localid has been set. You may need to upgrade " "your server browser.\n"); - Con_Printf ("===========================\n"); + Sys_Printf ("===========================\n"); return; } - Con_Printf ("===========================\n"); - Con_Printf + Sys_Printf ("===========================\n"); + Sys_Printf ("Invalid localid on command packet received from local host. " "\n|%s| != |%s|\n" "You may need to reload your server browser and %s.\n", s, localid->string, PROGRAM); - Con_Printf ("===========================\n"); + Sys_Printf ("===========================\n"); Cvar_Set (localid, ""); return; } - Con_Printf ("%s\n", cmdtext); + Sys_Printf ("%s\n", cmdtext); Cbuf_AddText (cl_cbuf, cmdtext); allowremotecmd = false; return; @@ -946,21 +946,21 @@ CL_ConnectionlessPacket (void) s = MSG_ReadString (net_message); if (SL_CheckStatus (NET_AdrToString (net_from), s)) { - Con_Printf ("status response\n"); + Sys_Printf ("status response\n"); return; } else if (!cls.demoplayback && (cl_paranoid->int_val || !NET_CompareAdr (net_from, cls.server_addr))) { - Con_Printf ("print\n"); + Sys_Printf ("print\n"); } - Con_Printf ("%s", s); + Sys_Printf ("%s", s); return; } // ping from somewhere if (c == A2A_PING) { char data[6]; - Con_Printf ("ping\n"); + Sys_Printf ("ping\n"); data[0] = 0xff; data[1] = 0xff; @@ -974,22 +974,22 @@ CL_ConnectionlessPacket (void) } if (c == S2C_CHALLENGE) { - Con_Printf ("challenge"); + Sys_Printf ("challenge"); if (cls.state >= ca_connected) { if (!cls.demoplayback) - Con_Printf ("\nDup challenge received. Ignored.\n"); + Sys_Printf ("\nDup challenge received. Ignored.\n"); return; } s = MSG_ReadString (net_message); cls.challenge = atoi (s); if (strstr (s, "QF")) { - Con_Printf (": QuakeForge server detected\n"); + Sys_Printf (": QuakeForge server detected\n"); CL_AddQFInfoKeys (); } else if (strstr (s, "EXT")) { CL_AddQFInfoKeys (); } else { - Con_Printf ("\n"); + Sys_Printf ("\n"); } CL_SendConnectPacket (); return; @@ -997,7 +997,7 @@ CL_ConnectionlessPacket (void) if (c == M2C_MASTER_REPLY) { - Con_Printf ("Master Server Reply\n"); + Sys_Printf ("Master Server Reply\n"); clcp_temp = MSG_ReadByte (net_message); s = MSG_ReadString (net_message); MSL_ParseServerList (s); @@ -1007,11 +1007,11 @@ CL_ConnectionlessPacket (void) if (cls.demoplayback) Host_EndGame ("End of demo"); else - Con_Printf ("svc_disconnect\n"); + Sys_Printf ("svc_disconnect\n"); return; } - Con_Printf ("unknown: %c\n", c); + Sys_Printf ("unknown: %c\n", c); } void @@ -1037,14 +1037,14 @@ CL_ReadPackets (void) continue; } if (net_message->message->cursize < 8 && !cls.demoplayback2) { - Con_Printf ("%s: Runt packet\n", NET_AdrToString (net_from)); + Sys_Printf ("%s: Runt packet\n", NET_AdrToString (net_from)); continue; } // packet from server if (!cls.demoplayback && !NET_CompareAdr (net_from, cls.netchan.remote_address)) { - Con_DPrintf ("%s:sequenced packet without connection\n", + Sys_DPrintf ("%s:sequenced packet without connection\n", NET_AdrToString (net_from)); continue; } @@ -1061,7 +1061,7 @@ CL_ReadPackets (void) // check timeout if (!cls.demoplayback && cls.state >= ca_connected && realtime - cls.netchan.last_received > cl_timeout->value) { - Con_Printf ("\nServer connection timed out.\n"); + Sys_Printf ("\nServer connection timed out.\n"); CL_Disconnect (); return; } @@ -1072,12 +1072,12 @@ static void CL_Download_f (void) { if (cls.state == ca_disconnected || cls.demoplayback) { - Con_Printf ("Must be connected.\n"); + Sys_Printf ("Must be connected.\n"); return; } if (Cmd_Argc () != 2) { - Con_Printf ("Usage: download \n"); + Sys_Printf ("Usage: download \n"); return; } @@ -1094,7 +1094,7 @@ CL_Download_f (void) MSG_WriteByte (&cls.netchan.message, clc_stringcmd); SZ_Print (&cls.netchan.message, va ("download %s\n", Cmd_Argv (1))); } else { - Con_Printf ("error downloading %s: %s\n", Cmd_Argv (1), + Sys_Printf ("error downloading %s: %s\n", Cmd_Argv (1), strerror (errno)); } } @@ -1141,7 +1141,7 @@ CL_SetState (cactive_t state) }; cactive_t old_state = cls.state; - Con_DPrintf ("CL_SetState (%s)\n", state_names[state]); + Sys_DPrintf ("CL_SetState (%s)\n", state_names[state]); cls.state = state; if (old_state != state) { if (old_state == ca_active) { @@ -1405,9 +1405,9 @@ Host_EndGame (const char *message, ...) va_start (argptr, message); dvsprintf (str, message, argptr); va_end (argptr); - Con_Printf ("\n===========================\n"); - Con_Printf ("Host_EndGame: %s\n", str->str); - Con_Printf ("===========================\n\n"); + Sys_Printf ("\n===========================\n"); + Sys_Printf ("Host_EndGame: %s\n", str->str); + Sys_Printf ("===========================\n\n"); CL_Disconnect (); @@ -1438,7 +1438,7 @@ Host_Error (const char *error, ...) dvsprintf (str, error, argptr); va_end (argptr); - Con_Printf ("Host_Error: %s", str->str); + Sys_Printf ("Host_Error: %s", str->str); CL_Disconnect (); cls.demonum = -1; @@ -1467,7 +1467,7 @@ Host_WriteConfiguration (void) f = QFS_WOpen (path, 0); if (!f) { - Con_Printf ("Couldn't write config.cfg.\n"); + Sys_Printf ("Couldn't write config.cfg.\n"); return; } @@ -1632,7 +1632,7 @@ Host_Frame (float time) time3 = Sys_DoubleTime (); pass2 = (time2 - time1) * 1000; pass3 = (time3 - time2) * 1000; - Con_Printf ("%3i tot %3i server %3i gfx %3i snd\n", + Sys_Printf ("%3i tot %3i server %3i gfx %3i snd\n", pass1 + pass2 + pass3, pass1, pass2, pass3); } @@ -1829,7 +1829,7 @@ Host_Init (void) CL_Demo_Init (); - Con_Printf ("%4.1f megabyte heap.\n", cl_mem_size->value); + Sys_Printf ("%4.1f megabyte heap.\n", cl_mem_size->value); host_basepal = (byte *) QFS_LoadHunkFile ("gfx/palette.lmp"); if (!host_basepal) @@ -1868,9 +1868,9 @@ Host_Init (void) Hunk_AllocName (0, "-HOST_HUNKLEVEL-"); host_hunklevel = Hunk_LowMark (); - Con_Printf ("\nClient version %s (build %04d)\n\n", VERSION, + Sys_Printf ("\nClient version %s (build %04d)\n\n", VERSION, build_number ()); - Con_Printf ("\x80\x81\x81\x82 %s initialized \x80\x81\x81\x82\n", PROGRAM); + Sys_Printf ("\x80\x81\x81\x82 %s initialized \x80\x81\x81\x82\n", PROGRAM); // make sure all + commands have been executed Cbuf_Execute_Stack (cl_cbuf); diff --git a/qw/source/cl_parse.c b/qw/source/cl_parse.c index 5cb625773..e151af296 100644 --- a/qw/source/cl_parse.c +++ b/qw/source/cl_parse.c @@ -50,16 +50,17 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/console.h" #include "QF/cvar.h" #include "QF/draw.h" +#include "QF/dstring.h" +#include "QF/gib.h" #include "QF/hash.h" #include "QF/idparse.h" #include "QF/msg.h" #include "QF/quakeio.h" #include "QF/screen.h" #include "QF/sound.h" +#include "QF/sys.h" #include "QF/teamplay.h" #include "QF/va.h" -#include "QF/dstring.h" -#include "QF/gib.h" #include "qw/bothdefs.h" #include "cl_cam.h" @@ -216,7 +217,7 @@ CL_CheckOrDownloadFile (const char *filename) QFile *f; if (strstr (filename, "..")) { - Con_Printf ("Refusing to download a path with ..\n"); + Sys_Printf ("Refusing to download a path with ..\n"); return true; } /* @@ -232,7 +233,7 @@ CL_CheckOrDownloadFile (const char *filename) } // ZOID - can't download when recording if (cls.demorecording) { - Con_Printf ("Unable to download %s in record mode.\n", + Sys_Printf ("Unable to download %s in record mode.\n", cls.downloadname->str); return true; } @@ -242,7 +243,7 @@ CL_CheckOrDownloadFile (const char *filename) dstring_copystr (cls.downloadname, filename); dstring_copystr (cls.downloadtempname, filename); - Con_Printf ("Downloading %s...\n", cls.downloadname->str); + Sys_Printf ("Downloading %s...\n", cls.downloadname->str); // download to a temp name, and only rename to the real name when done, // so if interrupted a runt file wont be left @@ -277,7 +278,7 @@ Model_NextDownload (void) int i; if (cls.downloadnumber == 0) { - Con_Printf ("Checking models...\n"); + Sys_Printf ("Checking models...\n"); CL_UpdateScreen (realtime); cls.downloadnumber = 1; } @@ -303,9 +304,9 @@ Model_NextDownload (void) cl.model_precache[i] = Mod_ForName (cl.model_name[i], false); if (!cl.model_precache[i]) { - Con_Printf ("\nThe required model file '%s' could not be found or " + Sys_Printf ("\nThe required model file '%s' could not be found or " "downloaded.\n\n", cl.model_name[i]); - Con_Printf ("You may need to download or purchase a %s client " + Sys_Printf ("You may need to download or purchase a %s client " "pack in order to play on this server.\n\n", qfs_gamedir->gamedir); CL_Disconnect (); @@ -337,8 +338,8 @@ Model_NextDownload (void) // Something went wrong (probably in the server, probably a TF server) // We need to disconnect gracefully. if (!cl.model_precache[1]) { - Con_Printf ("\nThe server has failed to provide the map name.\n\n"); - Con_Printf ("Disconnecting to prevent a crash.\n\n"); + Sys_Printf ("\nThe server has failed to provide the map name.\n\n"); + Sys_Printf ("Disconnecting to prevent a crash.\n\n"); CL_Disconnect (); return; } @@ -363,7 +364,7 @@ Sound_NextDownload (void) int i; if (cls.downloadnumber == 0) { - Con_Printf ("Checking sounds...\n"); + Sys_Printf ("Checking sounds...\n"); CL_UpdateScreen (realtime); cls.downloadnumber = 1; } @@ -413,7 +414,7 @@ CL_RequestNextDownload (void) break; case dl_none: default: - Con_DPrintf ("Unknown download type.\n"); + Sys_DPrintf ("Unknown download type.\n"); } } @@ -440,7 +441,7 @@ CL_FinishDownload (void) cls.downloadname->str + 6); } if (QFS_Rename (oldn->str, newn->str)) - Con_Printf ("failed to rename %s to %s, %s.\n", oldn->str, + Sys_Printf ("failed to rename %s to %s, %s.\n", oldn->str, newn->str, strerror (errno)); dstring_delete (oldn); dstring_delete (newn); @@ -497,7 +498,7 @@ CL_OpenDownload (void) if (!cls.download) { dstring_clearstr (cls.downloadname); dstring_clearstr (cls.downloadurl); - Con_Printf ("Failed to open %s\n", name->str); + Sys_Printf ("Failed to open %s\n", name->str); CL_RequestNextDownload (); return 0; } @@ -529,9 +530,9 @@ CL_ParseDownload (void) } if (size == DL_NOFILE) { - Con_Printf ("File not found.\n"); + Sys_Printf ("File not found.\n"); if (cls.download) { - Con_Printf ("cls.download shouldn't have been set\n"); + Sys_Printf ("cls.download shouldn't have been set\n"); Qclose (cls.download); cls.download = NULL; } @@ -548,7 +549,7 @@ CL_ParseDownload (void) if (strncmp (newname, cls.downloadname->str, strlen (cls.downloadname->str)) || strstr (newname + strlen (cls.downloadname->str), "/")) { - Con_Printf + Sys_Printf ("WARNING: server tried to give a strange new name: %s\n", newname); CL_RequestNextDownload (); @@ -559,7 +560,7 @@ CL_ParseDownload (void) unlink (cls.downloadname->str); } dstring_copystr (cls.downloadname, newname); - Con_Printf ("downloading to %s\n", cls.downloadname->str); + Sys_Printf ("downloading to %s\n", cls.downloadname->str); return; } if (size == DL_HTTP) { @@ -571,7 +572,7 @@ CL_ParseDownload (void) if (strncmp (newname, cls.downloadname->str, strlen (cls.downloadname->str)) || strstr (newname + strlen (cls.downloadname->str), "/")) { - Con_Printf + Sys_Printf ("WARNING: server tried to give a strange new name: %s\n", newname); CL_RequestNextDownload (); @@ -584,13 +585,13 @@ CL_ParseDownload (void) dstring_copystr (cls.downloadname, newname); } dstring_copystr (cls.downloadurl, url); - Con_Printf ("downloading %s to %s\n", cls.downloadurl->str, + Sys_Printf ("downloading %s to %s\n", cls.downloadurl->str, cls.downloadname->str); CL_HTTP_StartDownload (); #else MSG_ReadString (net_message); MSG_ReadString (net_message); - Con_Printf ("server sent http redirect but we don't know how to handle" + Sys_Printf ("server sent http redirect but we don't know how to handle" "it :(\n"); #endif CL_OpenDownload (); @@ -649,12 +650,12 @@ CL_NextUpload (void) MSG_WriteByte (&cls.netchan.message, percent); SZ_Write (&cls.netchan.message, buffer, r); - Con_DPrintf ("UPLOAD: %6d: %d written\n", upload_pos - r, r); + Sys_DPrintf ("UPLOAD: %6d: %d written\n", upload_pos - r, r); if (upload_pos != upload_size) return; - Con_Printf ("Upload completed\n"); + Sys_Printf ("Upload completed\n"); free (upload_data); upload_data = 0; @@ -671,7 +672,7 @@ CL_StartUpload (byte * data, int size) if (upload_data) free (upload_data); - Con_DPrintf ("Upload starting of %d...\n", size); + Sys_DPrintf ("Upload starting of %d...\n", size); upload_data = malloc (size); memcpy (upload_data, data, size); @@ -722,7 +723,7 @@ CL_ParseServerData (void) int protover; qboolean cflag = false; - Con_DPrintf ("Serverdata packet received.\n"); + Sys_DPrintf ("Serverdata packet received.\n"); // wipe the client_state_t struct CL_ClearState (); @@ -783,9 +784,9 @@ CL_ParseServerData (void) movevars.entgravity = MSG_ReadFloat (net_message); // separate the printfs so the server message can have a color - Con_Printf ("\n\n\35\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36" + Sys_Printf ("\n\n\35\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36" "\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\37\n\n"); - Con_Printf ("%c%s\n", 2, str); + Sys_Printf ("%c%s\n", 2, str); // ask for the sound list next memset (cl.sound_name, 0, sizeof (cl.sound_name)); @@ -1115,7 +1116,7 @@ CL_SetInfo (void) strncpy (value, MSG_ReadString (net_message), sizeof (value) - 1); key[sizeof (value) - 1] = 0; - Con_DPrintf ("SETINFO %s: %s=%s\n", player->name, key, value); + Sys_DPrintf ("SETINFO %s: %s=%s\n", player->name, key, value); if (!player->userinfo) player->userinfo = Info_ParseString ("", MAX_INFO_STRING, 0); @@ -1137,7 +1138,7 @@ CL_ServerInfo (void) strncpy (value, MSG_ReadString (net_message), sizeof (value) - 1); key[sizeof (value) - 1] = 0; - Con_DPrintf ("SERVERINFO: %s=%s\n", key, value); + Sys_DPrintf ("SERVERINFO: %s=%s\n", key, value); Info_SetValueForKey (cl.serverinfo, key, value, 0); if (strequal (key, "chase")) { @@ -1232,7 +1233,7 @@ CL_MuzzleFlash (void) #define SHOWNET(x) \ if (cl_shownet->int_val == 2) \ - Con_Printf ("%3i:%s\n", net_message->readcount-1, x); + Sys_Printf ("%3i:%s\n", net_message->readcount-1, x); int received_framecount; @@ -1249,9 +1250,9 @@ CL_ParseServerMessage (void) // if recording demos, copy the message out if (cl_shownet->int_val == 1) - Con_Printf ("%i ", net_message->message->cursize); + Sys_Printf ("%i ", net_message->message->cursize); else if (cl_shownet->int_val == 2) - Con_Printf ("------------------ %d\n", + Sys_Printf ("------------------ %d\n", cls.netchan.incoming_acknowledged); CL_ParseClientdata (); @@ -1320,7 +1321,7 @@ CL_ParseServerMessage (void) GIB_Event_Callback (cl_chat_e, 1, s); Team_ParseChat (s); } - Con_Printf ("%s", s); + Sys_Printf ("%s", s); Con_SetOrMask (0); break; } @@ -1332,15 +1333,15 @@ CL_ParseServerMessage (void) s = MSG_ReadString (net_message); if (s[strlen (s) - 1] == '\n') { if (stuffbuf && stuffbuf->str[0]) { - Con_DPrintf ("stufftext: %s%s\n", stuffbuf->str, s); + Sys_DPrintf ("stufftext: %s%s\n", stuffbuf->str, s); Cbuf_AddText (cl_stbuf, stuffbuf->str); dstring_clearstr (stuffbuf); } else { - Con_DPrintf ("stufftext: %s\n", s); + Sys_DPrintf ("stufftext: %s\n", s); } Cbuf_AddText (cl_stbuf, s); } else { - Con_DPrintf ("partial stufftext: %s\n", s); + Sys_DPrintf ("partial stufftext: %s\n", s); if (!stuffbuf) stuffbuf = dstring_newstr (); dstring_appendstr (stuffbuf, s); @@ -1470,21 +1471,21 @@ CL_ParseServerMessage (void) break; case svc_intermission: - Con_DPrintf ("svc_intermission\n"); + Sys_DPrintf ("svc_intermission\n"); cl.intermission = 1; r_force_fullscreen = 1; cl.completed_time = realtime; vid.recalc_refdef = true; // go to full screen - Con_DPrintf ("intermission simorg: "); + Sys_DPrintf ("intermission simorg: "); MSG_ReadCoordV (net_message, cl.simorg); for (i = 0; i < 3; i++) - Con_DPrintf ("%f ", cl.simorg[i]); - Con_DPrintf ("\nintermission simangles: "); + Sys_DPrintf ("%f ", cl.simorg[i]); + Sys_DPrintf ("\nintermission simangles: "); MSG_ReadAngleV (net_message, cl.simangles); for (i = 0; i < 3; i++) - Con_DPrintf ("%f ", cl.simangles[i]); - Con_DPrintf ("\n"); + Sys_DPrintf ("%f ", cl.simangles[i]); + Sys_DPrintf ("\n"); VectorZero (cl.simvel); // automatic fraglogging (by elmex) diff --git a/qw/source/cl_screen.c b/qw/source/cl_screen.c index 3304c3814..e22c0bc96 100644 --- a/qw/source/cl_screen.c +++ b/qw/source/cl_screen.c @@ -47,6 +47,7 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/msg.h" #include "QF/pcx.h" #include "QF/screen.h" +#include "QF/sys.h" #include "QF/va.h" #include "cl_parse.h" @@ -134,7 +135,7 @@ CL_RSShot_f (void) if (cls.state < ca_onserver) return; // must be connected - Con_Printf ("Remote screen shot requested.\n"); + Sys_Printf ("Remote screen shot requested.\n"); tex = SCR_ScreenShot (RSSHOT_WIDTH, RSSHOT_HEIGHT); @@ -161,7 +162,7 @@ CL_RSShot_f (void) } if (pcx) { CL_StartUpload ((void *)pcx, pcx_len); - Con_Printf ("Wrote %s\n", "rss.pcx"); - Con_Printf ("Sending shot to server...\n"); + Sys_Printf ("Wrote %s\n", "rss.pcx"); + Sys_Printf ("Sending shot to server...\n"); } } diff --git a/qw/source/cl_skin.c b/qw/source/cl_skin.c index 9d8ebc7ca..936732532 100644 --- a/qw/source/cl_skin.c +++ b/qw/source/cl_skin.c @@ -39,10 +39,10 @@ static __attribute__ ((used)) const char rcsid[] = #endif #include "QF/cmd.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/msg.h" #include "QF/screen.h" +#include "QF/sys.h" #include "QF/va.h" #include "cl_parse.h" @@ -67,7 +67,7 @@ Skin_NextDownload (void) return; if (cls.downloadnumber == 0) { - Con_Printf ("Checking skins...\n"); + Sys_Printf ("Checking skins...\n"); CL_UpdateScreen (realtime); } cls.downloadtype = dl_skin; @@ -136,10 +136,10 @@ CL_AllSkins_f (void) if (Cmd_Argc () == 2) { strcpy (allskins, Cmd_Argv (1)); } else if (Cmd_Argc () == 1) { - Con_Printf ("clearing allskins\n"); + Sys_Printf ("clearing allskins\n"); allskins[0] = 0; } else { - Con_Printf ("Usage: allskins [name]\n"); + Sys_Printf ("Usage: allskins [name]\n"); return; } CL_Skins_f (); @@ -153,10 +153,10 @@ CL_Color_f (void) int top, bottom; if (Cmd_Argc () == 1) { - Con_Printf ("\"color\" is \"%s %s\"\n", + Sys_Printf ("\"color\" is \"%s %s\"\n", Info_ValueForKey (cls.userinfo, "topcolor"), Info_ValueForKey (cls.userinfo, "bottomcolor")); - Con_Printf ("color <0-13> [0-13]\n"); + Sys_Printf ("color <0-13> [0-13]\n"); return; } diff --git a/qw/source/cl_slist.c b/qw/source/cl_slist.c index fc885b32f..ba14c2d41 100644 --- a/qw/source/cl_slist.c +++ b/qw/source/cl_slist.c @@ -64,7 +64,6 @@ static __attribute__ ((used)) const char rcsid[] = #include #include "QF/cmd.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/quakeio.h" #include "QF/sys.h" @@ -421,7 +420,7 @@ SL_Con_List (server_entry_t *sldata) cp = SL_Get_By_Num (sldata, serv); if (!cp) break; - Con_Printf ("%i) %s\n", (serv + 1), cp->desc); + Sys_Printf ("%i) %s\n", (serv + 1), cp->desc); } } @@ -461,27 +460,27 @@ SL_Con_Details (server_entry_t *sldata, int slitemno) cp = SL_Get_By_Num (sldata, (slitemno - 1)); if (!cp) return; - Con_Printf ("Server: %s\n", cp->server); - Con_Printf ("Ping: "); + Sys_Printf ("Server: %s\n", cp->server); + Sys_Printf ("Ping: "); if (cp->pongback) - Con_Printf ("%i\n", (int) (cp->pongback * 1000)); + Sys_Printf ("%i\n", (int) (cp->pongback * 1000)); else - Con_Printf ("N/A\n"); + Sys_Printf ("N/A\n"); if (cp->status) { char *s; - Con_Printf ("Name: %s\n", cp->desc); - Con_Printf ("Game: %s\n", Info_ValueForKey (cp->status, "*gamedir")); - Con_Printf ("Map: %s\n", Info_ValueForKey (cp->status, "map")); + Sys_Printf ("Name: %s\n", cp->desc); + Sys_Printf ("Game: %s\n", Info_ValueForKey (cp->status, "*gamedir")); + Sys_Printf ("Map: %s\n", Info_ValueForKey (cp->status, "map")); s = Info_MakeString (cp->status, 0); for (i = 0; i < strlen (s); i++) if (s[i] == '\n') playercount++; - Con_Printf ("Players: %i/%s\n", playercount, + Sys_Printf ("Players: %i/%s\n", playercount, Info_ValueForKey (cp->status, "maxclients")); } else - Con_Printf ("No Details Available\n"); + Sys_Printf ("No Details Available\n"); } static void @@ -535,35 +534,35 @@ SL_Command (void) SL_Con_List (slist); else if (strcasecmp (Cmd_Argv (1), "switch") == 0) { if (SL_Switch ()) - Con_Printf ("Switched to Server List from Masters\n"); + Sys_Printf ("Switched to Server List from Masters\n"); else - Con_Printf ("Switched to Favorite Server List\n"); + Sys_Printf ("Switched to Favorite Server List\n"); } else if (strcasecmp (Cmd_Argv (1), "refresh") == 0) { if (Cmd_Argc () == 2) SL_Update (slist); else - Con_Printf ("Syntax: slist refresh\n"); + Sys_Printf ("Syntax: slist refresh\n"); } else if (strcasecmp (Cmd_Argv (1),"update") == 0) { if (Cmd_Argc () == 2) { if (!which_slist) - Con_Printf ("ERROR: This of for updating the servers from a " + Sys_Printf ("ERROR: This of for updating the servers from a " "list of masters\n"); else SL_MasterUpdate (); } else - Con_Printf ("Syntax: slist update\n"); + Sys_Printf ("Syntax: slist update\n"); } else if (strcasecmp (Cmd_Argv (1), "connect") == 0) { if (Cmd_Argc () == 3) { sltemp = atoi (Cmd_Argv (2)); if (sltemp && (sltemp <= SL_Len (slist))) SL_Connect (slist, sltemp); else - Con_Printf ("Error: Invalid Server Number -> %s\n", + Sys_Printf ("Error: Invalid Server Number -> %s\n", Cmd_Argv (2)); } else if ((Cmd_Argc () == 2) && slist_last_details) SL_Connect (slist, slist_last_details); else - Con_Printf ("Syntax: slist connect #\n"); + Sys_Printf ("Syntax: slist connect #\n"); } else { sltemp = atoi (Cmd_Argv (1)); if ((Cmd_Argc () == 2) && sltemp && (sltemp <= SL_Len (slist))) diff --git a/qw/source/cl_sys_win.c b/qw/source/cl_sys_win.c index b8be970ca..69e9bd7b2 100644 --- a/qw/source/cl_sys_win.c +++ b/qw/source/cl_sys_win.c @@ -44,7 +44,6 @@ static __attribute__ ((used)) const char rcsid[] = #include #include "winquake.h" -#include "QF/console.h" #include "QF/qargs.h" #include "QF/screen.h" #include "QF/sound.h" @@ -211,7 +210,7 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, if (!tevent) Sys_Error ("Couldn't create event"); - Con_Printf ("Host_Init\n"); + Sys_Printf ("Host_Init\n"); Host_Init (); Sys_RegisterShutdown (Host_Shutdown); diff --git a/qw/source/com.c b/qw/source/com.c index 5ca8b95e8..b09970225 100644 --- a/qw/source/com.c +++ b/qw/source/com.c @@ -34,7 +34,6 @@ static __attribute__ ((used)) const char rcsid[] = #include #include "QF/cmd.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/qargs.h" #include "QF/quakefs.h" @@ -71,7 +70,7 @@ COM_CheckRegistered (void) if (static_registered) { Cvar_Set (registered, "1"); - Con_Printf ("Playing registered version.\n"); + Sys_Printf ("Playing registered version.\n"); } } diff --git a/qw/source/crudefile.c b/qw/source/crudefile.c index d626cd645..2b0bc2852 100644 --- a/qw/source/crudefile.c +++ b/qw/source/crudefile.c @@ -45,11 +45,10 @@ static __attribute__ ((used)) const char rcsid[] = #include #include -#include "QF/console.h" -#include "QF/dstring.h" -#include "QF/sys.h" #include "QF/cvar.h" +#include "QF/dstring.h" #include "QF/quakefs.h" +#include "QF/sys.h" #include "QF/va.h" #include "QF/zone.h" @@ -185,7 +184,7 @@ CF_CloseAllFiles () for (i = 0; i < cf_filepcount; i++) if (cf_filep[i].file) { - Con_DPrintf ("Warning: closing Crude File %d left over from last " + Sys_DPrintf ("Warning: closing Crude File %d left over from last " "map\n", i); CF_Close (i); } diff --git a/qw/source/game.c b/qw/source/game.c index 30e5f97b0..26623057f 100644 --- a/qw/source/game.c +++ b/qw/source/game.c @@ -37,11 +37,11 @@ #endif #include "QF/cmd.h" -#include "QF/console.h" #include "QF/cvar.h" #include "QF/info.h" #include "QF/qargs.h" #include "QF/quakefs.h" +#include "QF/sys.h" #include "game.h" #include "server.h" @@ -59,12 +59,12 @@ SV_Gamedir_f (void) const char *dir; if (Cmd_Argc () == 1) { - Con_Printf ("Current gamedir: %s\n", qfs_gamedir->gamedir); + Sys_Printf ("Current gamedir: %s\n", qfs_gamedir->gamedir); return; } if (Cmd_Argc () != 2) { - Con_Printf ("Usage: gamedir \n"); + Sys_Printf ("Usage: gamedir \n"); return; } @@ -72,7 +72,7 @@ SV_Gamedir_f (void) if (strstr (dir, "..") || strstr (dir, "/") || strstr (dir, "\\") || strstr (dir, ":")) { - Con_Printf ("Gamedir should be a single filename, not a path\n"); + Sys_Printf ("Gamedir should be a single filename, not a path\n"); return; } diff --git a/qw/source/locs.c b/qw/source/locs.c index 4a5f26ca1..04bceabcc 100644 --- a/qw/source/locs.c +++ b/qw/source/locs.c @@ -44,7 +44,6 @@ static __attribute__ ((used)) const char rcsid[] = #include -#include "QF/console.h" #include "QF/locs.h" #include "QF/qtypes.h" #include "QF/quakefs.h" @@ -142,7 +141,7 @@ locs_load (const char *filename) snprintf (tmp, sizeof (tmp), "maps/%s", filename); templength = QFS_FOpenFile (tmp, &file); if (!file) { - Con_Printf ("Couldn't load %s\n", tmp); + Sys_Printf ("Couldn't load %s\n", tmp); return; } while ((line = Qgetline (file))) { @@ -207,7 +206,7 @@ locs_save (const char *filename, qboolean gz) } else locfd = QFS_Open (filename, "w+"); if (locfd == 0) { - Con_Printf ("ERROR: Unable to open %s\n", filename); + Sys_Printf ("ERROR: Unable to open %s\n", filename); return; } for (i = 0; i < locations_count; i++) @@ -221,7 +220,7 @@ void locs_mark (const vec3_t loc, const char *desc) { locs_add (loc, desc); - Con_Printf ("Marked current location: %s\n", desc); + Sys_Printf ("Marked current location: %s\n", desc); } /* @@ -239,16 +238,16 @@ locs_edit (const vec3_t loc, const char *desc) i = locs_nearest (loc); if (!desc) { VectorCopy (loc, locations[i]->loc); - Con_Printf ("Moving location marker for %s\n", + Sys_Printf ("Moving location marker for %s\n", locations[i]->name); } else { free ((void *) locations[i]->name); locations[i]->name = strdup (desc); - Con_Printf ("Changing location description to %s\n", + Sys_Printf ("Changing location description to %s\n", locations[i]->name); } } else - Con_Printf ("Error: No location markers to modify!\n"); + Sys_Printf ("Error: No location markers to modify!\n"); } void @@ -258,7 +257,7 @@ locs_del (const vec3_t loc) if (locations_count) { i = locs_nearest (loc); - Con_Printf ("Removing location marker for %s\n", + Sys_Printf ("Removing location marker for %s\n", locations[i]->name); free ((void *) locations[i]->name); free ((void *) locations[i]); @@ -267,7 +266,7 @@ locs_del (const vec3_t loc) locations[i] = locations[i+1]; locations[locations_count] = NULL; } else - Con_Printf ("Error: No location markers to remove\n"); + Sys_Printf ("Error: No location markers to remove\n"); } void diff --git a/qw/source/net_packetlog.c b/qw/source/net_packetlog.c index 685e5b730..86932e0e5 100644 --- a/qw/source/net_packetlog.c +++ b/qw/source/net_packetlog.c @@ -53,6 +53,7 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/cvar.h" #include "QF/msg.h" #include "QF/quakefs.h" +#include "QF/sys.h" #include "QF/va.h" #include "compat.h" @@ -171,7 +172,7 @@ static qmsg_t packet = {0, 0, &_packet}; static int Net_LogStart (const char *fname) { - Con_Printf ("Opening packet logfile: %s\n", fname); + Sys_Printf ("Opening packet logfile: %s\n", fname); Net_PacketLog = QFS_Open (fname, "at"); if (!Net_PacketLog) return -1; @@ -963,11 +964,11 @@ static void Net_PacketLog_Zap_f (void) { if (Net_PacketLog && Net_PacketLog != _stdout) { - Con_Printf ("truncating packet logfile: %s\n", "qfpacket.log"); + Sys_Printf ("truncating packet logfile: %s\n", "qfpacket.log"); Qseek (Net_PacketLog, 0, 0); Qwrite (Net_PacketLog, 0, 0); } else { - Con_Printf ("Deleting packet logfile: %s\n", "qfpacket.log"); + Sys_Printf ("Deleting packet logfile: %s\n", "qfpacket.log"); QFS_Remove ("qfpacket.log"); } } diff --git a/qw/source/pmove.c b/qw/source/pmove.c index 509f9de96..6a21d97be 100644 --- a/qw/source/pmove.c +++ b/qw/source/pmove.c @@ -33,9 +33,9 @@ static __attribute__ ((used)) const char rcsid[] = #include -#include "QF/console.h" #include "QF/cvar.h" #include "QF/qtypes.h" +#include "QF/sys.h" #include "client.h" #include "compat.h" @@ -188,7 +188,7 @@ PM_FlyMove (void) if (i != numplanes) { // go along this plane } else { // go along the crease if (numplanes != 2) { -// Con_Printf ("clip velocity, numplanes == %i\n",numplanes); +// Sys_Printf ("clip velocity, numplanes == %i\n",numplanes); VectorZero (pmove.velocity); break; } @@ -467,7 +467,7 @@ PM_WaterMove (void) // water acceleration // if (pmove.waterjumptime) -// Con_Printf ("wm->%f, %f, %f\n", pmove.velocity[0], pmove.velocity[1], +// Sys_Printf ("wm->%f, %f, %f\n", pmove.velocity[0], pmove.velocity[1], // pmove.velocity[2]); PM_Accelerate (wishdir, wishspeed, movevars.wateraccelerate); @@ -720,7 +720,7 @@ NudgePosition (void) } } VectorCopy (base, pmove.origin); -// Con_DPrintf ("NudgePosition: stuck\n"); +// Sys_DPrintf ("NudgePosition: stuck\n"); } static void diff --git a/qw/source/skin.c b/qw/source/skin.c index f6bac36c6..8f3d96614 100644 --- a/qw/source/skin.c +++ b/qw/source/skin.c @@ -38,7 +38,6 @@ static __attribute__ ((used)) const char rcsid[] = # include #endif -#include "QF/console.h" #include "QF/cvar.h" #include "QF/hash.h" #include "QF/image.h" @@ -163,7 +162,7 @@ Skin_Cache (skin_t *skin) snprintf (name, sizeof (name), "skins/%s.pcx", skin->name); QFS_FOpenFile (name, &file); if (!file) { - Con_Printf ("Couldn't load skin %s\n", name); + Sys_Printf ("Couldn't load skin %s\n", name); snprintf (name, sizeof (name), "skins/%s.pcx", baseskin->string); QFS_FOpenFile (name, &file); if (!file) { @@ -183,7 +182,7 @@ Skin_Cache (skin_t *skin) if (!tex || tex->width > 320 || tex->height > 200) { skin->failedload = true; - Con_Printf ("Bad skin %s\n", name); + Sys_Printf ("Bad skin %s\n", name); return NULL; } diff --git a/qw/source/sv_ccmds.c b/qw/source/sv_ccmds.c index 82fefed96..1c931c182 100644 --- a/qw/source/sv_ccmds.c +++ b/qw/source/sv_ccmds.c @@ -224,7 +224,7 @@ SV_Restart_f (void) Netchan_Transmit (&client->netchan, net_message->message->cursize, net_message->message->data); } - Con_Printf ("Shutting down: server restart, shell must relaunch server\n"); + Sys_Printf ("Shutting down: server restart, shell must relaunch server\n"); SV_Shutdown (); // Error code 2 on exit, indication shell must restart the server exit (2); diff --git a/qw/source/sv_demo.c b/qw/source/sv_demo.c index 1d2e9d131..b42301af1 100644 --- a/qw/source/sv_demo.c +++ b/qw/source/sv_demo.c @@ -150,7 +150,7 @@ void SV_Stop (int reason) { if (!recorder) { - Con_Printf ("Not recording a demo.\n"); + Sys_Printf ("Not recording a demo.\n"); return; } @@ -377,7 +377,7 @@ SV_Record (char *name) demo_file = QFS_Open (name, "wb"); if (!demo_file) { - Con_Printf ("ERROR: couldn't open %s\n", name); + Sys_Printf ("ERROR: couldn't open %s\n", name); return; } @@ -633,12 +633,12 @@ SV_Record_f (void) dstring_t *name = dstring_newstr (); if (Cmd_Argc () != 2) { - Con_Printf ("record \n"); + Sys_Printf ("record \n"); return; } if (sv.state != ss_active) { - Con_Printf ("Not active yet.\n"); + Sys_Printf ("Not active yet.\n"); return; } @@ -734,7 +734,7 @@ SV_EasyRecord_f (void) int i; if (Cmd_Argc () > 2) { - Con_Printf ("easyrecord [demoname]\n"); + Sys_Printf ("easyrecord [demoname]\n"); return; } @@ -791,7 +791,7 @@ Demo_Init (void) } if (size < MIN_DEMO_MEMORY) { - Con_Printf ("Minimum memory size for demo cache is %dk\n", + Sys_Printf ("Minimum memory size for demo cache is %dk\n", MIN_DEMO_MEMORY / 1024); size = MIN_DEMO_MEMORY; } diff --git a/qw/source/sv_init.c b/qw/source/sv_init.c index c50a93342..dd3090fdc 100644 --- a/qw/source/sv_init.c +++ b/qw/source/sv_init.c @@ -308,7 +308,7 @@ SV_SpawnServer (const char *server) edict_t *ent; int i; - Con_DPrintf ("SpawnServer: %s\n", server); + Sys_DPrintf ("SpawnServer: %s\n", server); SV_SaveSpawnparms (); @@ -445,7 +445,7 @@ SV_SpawnServer (const char *server) sv.signon_buffer_size[sv.num_signon_buffers - 1] = sv.signon.cursize; Info_SetValueForKey (svs.info, "map", sv.name, !sv_highchars->int_val); - Con_DPrintf ("Server spawned.\n"); + Sys_DPrintf ("Server spawned.\n"); if (sv_map_e->func) GIB_Event_Callback (sv_map_e, 1, server); } diff --git a/qw/source/sv_main.c b/qw/source/sv_main.c index 6d757fc07..56bb3847a 100644 --- a/qw/source/sv_main.c +++ b/qw/source/sv_main.c @@ -274,7 +274,7 @@ SV_Error (const char *error, va_list argptr) string = dstring_new (); dvsprintf (string, error, argptr); - Con_Printf ("%s\n", string->str); + Sys_Printf ("%s\n", string->str); if (sv_net_initialized) { dstring_insertstr (string, 0, "server crashed: "); @@ -633,7 +633,7 @@ SVC_Log (void) return; } - Con_DPrintf ("sending log %i to %s\n", svs.logsequence - 1, + Sys_DPrintf ("sending log %i to %s\n", svs.logsequence - 1, NET_AdrToString (net_from)); // snprintf (data, sizeof (data), "stdlog %i\n", svs.logsequence - 1); @@ -1790,7 +1790,7 @@ SV_ReadPackets (void) if (cl->netchan.qport != qport) continue; if (cl->netchan.remote_address.port != net_from.port) { - Con_DPrintf ("SV_ReadPackets: fixing up a translated port\n"); + Sys_DPrintf ("SV_ReadPackets: fixing up a translated port\n"); cl->netchan.remote_address.port = net_from.port; } if (Netchan_Process (&cl->netchan)) { diff --git a/qw/source/sv_phys.c b/qw/source/sv_phys.c index cc21a13db..80ce0d07b 100644 --- a/qw/source/sv_phys.c +++ b/qw/source/sv_phys.c @@ -31,7 +31,6 @@ static __attribute__ ((used)) const char rcsid[] = "$Id$"; -#include "QF/console.h" #include "QF/cvar.h" #include "QF/sys.h" @@ -89,7 +88,7 @@ SV_CheckAllEnts (void) continue; if (SV_TestEntityPosition (check)) - Con_Printf ("entity in invalid position\n"); + Sys_Printf ("entity in invalid position\n"); } } #endif @@ -102,13 +101,13 @@ SV_CheckVelocity (edict_t *ent) // bound velocity for (i = 0; i < 3; i++) { if (IS_NAN (SVvector (ent, velocity)[i])) { - Con_Printf ("Got a NaN velocity on %s\n", + Sys_Printf ("Got a NaN velocity on %s\n", PR_GetString (&sv_pr_state, SVstring (ent, classname))); SVvector (ent, velocity)[i] = 0; } if (IS_NAN (SVvector (ent, origin)[i])) { - Con_Printf ("Got a NaN origin on %s\n", + Sys_Printf ("Got a NaN origin on %s\n", PR_GetString (&sv_pr_state, SVstring (ent, classname))); SVvector (ent, origin)[i] = 0; diff --git a/qw/source/sv_pr_cmds.c b/qw/source/sv_pr_cmds.c index b3cd330db..f9a4250d7 100644 --- a/qw/source/sv_pr_cmds.c +++ b/qw/source/sv_pr_cmds.c @@ -751,7 +751,7 @@ do_precache (progs_t *pr, const char **cache, int max, const char *name, char *c = Hunk_Alloc (strlen (s) + 1); strcpy (c, s); cache[i] = c; // blah, const - Con_DPrintf ("%s: %3d %s\n", func, i, s); + Sys_DPrintf ("%s: %3d %s\n", func, i, s); return; } if (!strcmp (cache[i], s)) diff --git a/qw/source/sv_pr_cpqw.c b/qw/source/sv_pr_cpqw.c index 63c8559d0..418583ff9 100644 --- a/qw/source/sv_pr_cpqw.c +++ b/qw/source/sv_pr_cpqw.c @@ -666,7 +666,7 @@ PF_clientsound (progs_t *pr) break; if (sound_num == MAX_SOUNDS || !sv.sound_precache[sound_num]) { - Con_Printf ("SV_StartSound: %s not precacheed\n", sample); + Sys_Printf ("SV_StartSound: %s not precacheed\n", sample); return; } diff --git a/qw/source/sv_pr_qwe.c b/qw/source/sv_pr_qwe.c index 8e78820dd..ca7c57047 100644 --- a/qw/source/sv_pr_qwe.c +++ b/qw/source/sv_pr_qwe.c @@ -475,7 +475,7 @@ PF_log (progs_t *pr) static void PF_conprint (progs_t *pr) { - Con_Printf ("%s", PF_VarString (pr, 0)); + Sys_Printf ("%s", PF_VarString (pr, 0)); } #define QWE (PR_RANGE_QWE << PR_RANGE_SHIFT) | diff --git a/qw/source/sv_progs.c b/qw/source/sv_progs.c index 6a45db86c..049a55b78 100644 --- a/qw/source/sv_progs.c +++ b/qw/source/sv_progs.c @@ -500,7 +500,7 @@ SV_LoadProgs (void) sv_range = PR_RANGE_NONE; range = "None"; } - Con_DPrintf ("Using %s builtin extention mapping\n", range); + Sys_DPrintf ("Using %s builtin extention mapping\n", range); if (qfs_gamedir->gamecode && *qfs_gamedir->gamecode) progs_name = qfs_gamedir->gamecode; diff --git a/qw/source/sv_qtv.c b/qw/source/sv_qtv.c index 46529d3dc..994320910 100644 --- a/qw/source/sv_qtv.c +++ b/qw/source/sv_qtv.c @@ -47,6 +47,7 @@ static __attribute__ ((used)) const char rcsid[] = #include "QF/hash.h" #include "QF/idparse.h" #include "QF/info.h" +#include "QF/sys.h" #include "QF/va.h" #include "compat.h" @@ -428,7 +429,7 @@ SV_qtvPacket (int qport) if (proxies[i].netchan.qport != qport) continue; if (proxies[i].netchan.remote_address.port != net_from.port) { - Con_DPrintf ("SV_ReadPackets: fixing up a translated port\n"); + Sys_DPrintf ("SV_ReadPackets: fixing up a translated port\n"); proxies[i].netchan.remote_address.port = net_from.port; } if (Netchan_Process (&proxies[i].netchan)) { diff --git a/qw/source/sv_recorder.c b/qw/source/sv_recorder.c index 861f5039e..7410ce28e 100644 --- a/qw/source/sv_recorder.c +++ b/qw/source/sv_recorder.c @@ -51,6 +51,7 @@ static __attribute__ ((used)) const char rcsid[] = #include #include "QF/sizebuf.h" +#include "QF/sys.h" #include "qw/bothdefs.h" #include "server.h" @@ -189,7 +190,7 @@ write_msg (sizebuf_t *msg, int type, int to, float time, sizebuf_t *dst) default: while (sv.recorders) SVR_RemoveUser (sv.recorders); - Con_Printf ("bad demo message type:%d", type); + Sys_Printf ("bad demo message type:%d", type); return; } } else { diff --git a/qw/source/sv_send.c b/qw/source/sv_send.c index eeca8cce2..5da4ef842 100644 --- a/qw/source/sv_send.c +++ b/qw/source/sv_send.c @@ -42,7 +42,6 @@ static __attribute__ ((used)) const char rcsid[] = #include #include -#include "QF/console.h" #include "QF/cvar.h" #include "QF/dstring.h" #include "QF/msg.h" @@ -234,7 +233,7 @@ SV_Print (const char *fmt, va_list args) pending = 0; } - Con_Printf ("%s", msg2); // also echo to debugging console + Sys_Printf ("%s", msg2); // also echo to debugging console } } diff --git a/qw/source/sv_user.c b/qw/source/sv_user.c index 7c9a57ff8..04a9fc254 100644 --- a/qw/source/sv_user.c +++ b/qw/source/sv_user.c @@ -325,7 +325,7 @@ SV_PreSpawn_f (void *unused) // should be three numbers following containing checksums check = atoi (Cmd_Argv (3)); -// Con_DPrintf ("Client check = %d\n", check); +// Sys_DPrintf ("Client check = %d\n", check); if (sv_mapcheck->int_val && check != sv.worldmodel->checksum && check != sv.worldmodel->checksum2) { @@ -678,7 +678,7 @@ SV_NextUpload (void) net_message->readcount, size); net_message->readcount += size; - Con_DPrintf ("UPLOAD: %d received\n", size); + Sys_DPrintf ("UPLOAD: %d received\n", size); if (percent != 100) { MSG_ReliableWrite_Begin (&host_client->backbuf, svc_stufftext, 8); @@ -1925,7 +1925,7 @@ SV_ExecuteClientMessage (client_t *cl) checksumIndex - 1, seq_hash); if (calculatedChecksum != checksum) { - Con_DPrintf + Sys_DPrintf ("Failed command checksum for %s(%d) (%d != %d)\n", cl->name, cl->netchan.incoming_sequence, checksum, calculatedChecksum); diff --git a/qw/source/teamplay.c b/qw/source/teamplay.c index 5a57bba85..325f8a928 100644 --- a/qw/source/teamplay.c +++ b/qw/source/teamplay.c @@ -43,16 +43,15 @@ static __attribute__ ((used)) const char rcsid[] = #include #include "QF/cbuf.h" -#include "QF/console.h" #include "QF/cmd.h" #include "QF/cvar.h" +#include "QF/gib.h" #include "QF/locs.h" #include "QF/model.h" -#include "QF/sys.h" -#include "QF/teamplay.h" #include "QF/va.h" #include "QF/skin.h" -#include "QF/gib.h" +#include "QF/sys.h" +#include "QF/teamplay.h" #include "qw/bothdefs.h" #include "cl_input.h" @@ -342,13 +341,13 @@ locs_loc (void) // FIXME: need to check to ensure you are actually in the game and alive. if (Cmd_Argc () == 1 || strcmp (Cmd_Argv (1), "help") == 0) { - Con_Printf ("loc [] " + Sys_Printf ("loc [] " ":Modifies location data, add|rename take " "parameter\n"); return; } if (!cl.worldmodel) { - Con_Printf ("No map loaded. Unable to work with location markers.\n"); + Sys_Printf ("No map loaded. Unable to work with location markers.\n"); return; } if (Cmd_Argc () >= 3) @@ -365,21 +364,21 @@ locs_loc (void) if (Cmd_Argc () == 2) { locs_save (locfile, false); } else - Con_Printf ("loc save :saves locs from memory into a .loc file\n"); + Sys_Printf ("loc save :saves locs from memory into a .loc file\n"); } if (strcasecmp (Cmd_Argv (1), "zsave") == 0) { if (Cmd_Argc () == 2) { locs_save (locfile, true); } else - Con_Printf ("loc save :saves locs from memory into a .loc file\n"); + Sys_Printf ("loc save :saves locs from memory into a .loc file\n"); } if (strcasecmp (Cmd_Argv (1), "add") == 0) { if (Cmd_Argc () >= 3) locs_mark (cl.simorg, desc); else - Con_Printf ("loc add :marks the current location " + Sys_Printf ("loc add :marks the current location " "with the description and records the information " "into a loc file.\n"); } @@ -388,7 +387,7 @@ locs_loc (void) if (Cmd_Argc () >= 3) locs_edit (cl.simorg, desc); else - Con_Printf ("loc rename :changes the description of " + Sys_Printf ("loc rename :changes the description of " "the nearest location marker\n"); } @@ -396,14 +395,14 @@ locs_loc (void) if (Cmd_Argc () == 2) locs_del (cl.simorg); else - Con_Printf ("loc delete :removes nearest location marker\n"); + Sys_Printf ("loc delete :removes nearest location marker\n"); } if (strcasecmp (Cmd_Argv (1),"move") == 0) { if (Cmd_Argc () == 2) locs_edit (cl.simorg, NULL); else - Con_Printf ("loc move :moves the nearest location marker to your " + Sys_Printf ("loc move :moves the nearest location marker to your " "current location\n"); } }