nuke Con_Printf and Con_DPrintf and use Sys_* instead

This commit is contained in:
Bill Currie 2007-11-06 10:17:14 +00:00 committed by Jeff Teunissen
parent 296894252d
commit d66934942d
127 changed files with 756 additions and 831 deletions

View file

@ -230,7 +230,7 @@ SV_InitNet (void)
p = COM_CheckParm ("-port"); p = COM_CheckParm ("-port");
if (p && p < com_argc) { if (p && p < com_argc) {
port = atoi (com_argv[p + 1]); port = atoi (com_argv[p + 1]);
Con_Printf ("Port: %i\n", port); Sys_Printf ("Port: %i\n", port);
} }
NET_Init (port); NET_Init (port);
@ -252,20 +252,20 @@ AnalysePacket (void)
byte *p, *data; byte *p, *data;
int i, size, rsize; 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; data = net_message->message->data;
size = net_message->message->cursize; size = net_message->message->cursize;
for (p = data; (rsize = min (size - (p - data), 16)); p += rsize) { 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); memcpy (buf, p, rsize);
for (i = 0; i < rsize; i++) { for (i = 0; i < rsize; i++) {
Con_Printf (" %02X", buf[i]); Sys_Printf (" %02X", buf[i]);
if (buf[i] < ' ' || buf [i] > '~') if (buf[i] < ' ' || 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]; msg = net_message->message->data[1];
if (msg == A2A_PING) { if (msg == A2A_PING) {
Filter (); 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))) { if (!(sv = SVL_Find (net_from))) {
sv = SVL_New (&net_from); sv = SVL_New (&net_from);
SVL_Add (sv); SVL_Add (sv);
@ -322,7 +322,7 @@ Mst_Packet (void)
sv->timeout = Sys_DoubleTime (); sv->timeout = Sys_DoubleTime ();
} else if (msg == S2M_HEARTBEAT) { } else if (msg == S2M_HEARTBEAT) {
Filter (); 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))) { if (!(sv = SVL_Find (net_from))) {
sv = SVL_New (&net_from); sv = SVL_New (&net_from);
SVL_Add (sv); SVL_Add (sv);
@ -330,22 +330,22 @@ Mst_Packet (void)
sv->timeout = Sys_DoubleTime (); sv->timeout = Sys_DoubleTime ();
} else if (msg == S2M_SHUTDOWN) { } else if (msg == S2M_SHUTDOWN) {
Filter (); 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))) { if ((sv = SVL_Find (net_from))) {
SVL_Remove (sv); SVL_Remove (sv);
free (sv); free (sv);
} }
} else if (msg == S2C_CHALLENGE) { } else if (msg == S2C_CHALLENGE) {
Con_Printf ("%s >> ", NET_AdrToString (net_from)); Sys_Printf ("%s >> ", NET_AdrToString (net_from));
Con_Printf ("Gamespy server list request\n"); Sys_Printf ("Gamespy server list request\n");
Mst_SendList (); Mst_SendList ();
} else { } else {
byte *p; byte *p;
p = net_message->message->data; p = net_message->message->data;
if (p[0] == 0 && p[1] == 'y') { if (p[0] == 0 && p[1] == 'y') {
Con_Printf ("%s >> ", NET_AdrToString (net_from)); Sys_Printf ("%s >> ", NET_AdrToString (net_from));
Con_Printf ("Pingtool server list request\n"); Sys_Printf ("Pingtool server list request\n");
Mst_SendList (); Mst_SendList ();
} else { } else {
AnalysePacket (); AnalysePacket ();
@ -368,7 +368,7 @@ FilterAdd (int arg)
netadr_t to, from; netadr_t to, from;
if (Cmd_Argc () - arg != 2) { 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"); "Usage:\nfilter add x.x.x.x:port x.x.x.x:port\n\n");
return; return;
} }
@ -379,12 +379,12 @@ FilterAdd (int arg)
if (from.port == 0) if (from.port == 0)
from.port = BigShort (PORT_SERVER); from.port = BigShort (PORT_SERVER);
if (!(filter = FL_Find (from))) { 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)); Cmd_Argv (arg + 1));
filter = FL_New (&from, &to); filter = FL_New (&from, &to);
FL_Add (filter); FL_Add (filter);
} else } else
Con_Printf ("%s already defined\n\n", Cmd_Argv (arg)); Sys_Printf ("%s already defined\n\n", Cmd_Argv (arg));
} }
static void static void
@ -394,17 +394,17 @@ FilterRemove (int arg)
netadr_t from; netadr_t from;
if (Cmd_Argc () - arg != 1) { 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"); "filter remove x.x.x.x:port\n\n");
return; return;
} }
NET_StringToAdr (Cmd_Argv (arg), &from); NET_StringToAdr (Cmd_Argv (arg), &from);
if ((filter = FL_Find (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); FL_Remove (filter);
free (filter); free (filter);
} else } else
Con_Printf ("Cannot find %s\n\n", Cmd_Argv (arg)); Sys_Printf ("Cannot find %s\n\n", Cmd_Argv (arg));
} }
static void static void
@ -413,18 +413,18 @@ FilterList (void)
filter_t *filter; filter_t *filter;
for (filter = filter_list; filter; filter = filter->next) { for (filter = filter_list; filter; filter = filter->next) {
Con_Printf ("%s", NET_AdrToString (filter->from)); Sys_Printf ("%s", NET_AdrToString (filter->from));
Con_Printf ("\t\t%s\n", NET_AdrToString (filter->to)); Sys_Printf ("\t\t%s\n", NET_AdrToString (filter->to));
} }
if (filter_list == NULL) if (filter_list == NULL)
Con_Printf ("No filter\n"); Sys_Printf ("No filter\n");
Con_Printf ("\n"); Sys_Printf ("\n");
} }
static void static void
FilterClear (void) FilterClear (void)
{ {
Con_Printf ("Removed all filters\n\n"); Sys_Printf ("Removed all filters\n\n");
FL_Clear (); FL_Clear ();
} }
@ -490,7 +490,7 @@ SV_TimeOut (void)
for (sv = sv_list; sv;) { for (sv = sv_list; sv;) {
if (sv->timeout + SV_TIMEOUT < time) { if (sv->timeout + SV_TIMEOUT < time) {
next = sv->next; 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); SVL_Remove (sv);
free (sv); free (sv);
sv = next; sv = next;
@ -512,7 +512,7 @@ SV_Frame (void)
static void static void
MST_Quit_f (void) MST_Quit_f (void)
{ {
Con_Printf ("HW master shutdown\n"); Sys_Printf ("HW master shutdown\n");
Sys_Quit (); Sys_Quit ();
} }
@ -550,8 +550,8 @@ main (int argc, const char **argv)
con_list_print = Sys_Printf; con_list_print = Sys_Printf;
SV_InitNet (); SV_InitNet ();
Con_Printf ("Exe: " __TIME__ " " __DATE__ "\n"); Sys_Printf ("Exe: " __TIME__ " " __DATE__ "\n");
Con_Printf ("======== HW master initialized ========\n\n"); Sys_Printf ("======== HW master initialized ========\n\n");
while (1) { while (1) {
SV_Frame (); SV_Frame ();
} }

View file

@ -90,8 +90,6 @@ void Con_CheckResize (void);
void Con_DrawConsole (void); void Con_DrawConsole (void);
void Con_Print (const char *fmt, va_list args); 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); void Con_ToggleConsole_f (void);
// wrapper function to attempt to either complete the command line // wrapper function to attempt to either complete the command line

View file

@ -255,19 +255,19 @@ Condump_f (void)
char name[MAX_OSPATH]; char name[MAX_OSPATH];
if (Cmd_Argc () != 2) { if (Cmd_Argc () != 2) {
Con_Printf ("usage: condump <filename>\n"); Sys_Printf ("usage: condump <filename>\n");
return; return;
} }
if (strchr (Cmd_Argv (1), '/') || strchr (Cmd_Argv (1), '\\')) { if (strchr (Cmd_Argv (1), '/') || strchr (Cmd_Argv (1), '\\')) {
Con_Printf ("invalid character in filename\n"); Sys_Printf ("invalid character in filename\n");
return; return;
} }
snprintf (name, sizeof (name), "%s/%s.txt", qfs_gamedir->dir.def, snprintf (name, sizeof (name), "%s/%s.txt", qfs_gamedir->dir.def,
Cmd_Argv (1)); Cmd_Argv (1));
if (!(file = QFS_WOpen (name, 0))) { 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)); strerror (errno));
return; 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, "rcon ");
Cbuf_AddText (con_data.cbuf, line); Cbuf_AddText (con_data.cbuf, line);
Cbuf_AddText (con_data.cbuf, "\n"); Cbuf_AddText (con_data.cbuf, "\n");
Con_Printf ("rcon %s\n", line); Sys_Printf ("rcon %s\n", line);
return 0; return 0;
} }
@ -321,8 +321,8 @@ cl_conmode_f (cvar_t *var)
} else if (!strcmp (var->string, "rcon")) { } else if (!strcmp (var->string, "rcon")) {
con_data.exec_line = cl_exec_line_rcon; con_data.exec_line = cl_exec_line_rcon;
} else { } else {
Con_Printf ("mode must be one of \"command\", \"chat\" or \"rcon\"\n"); Sys_Printf ("mode must be one of \"command\", \"chat\" or \"rcon\"\n");
Con_Printf (" forcing \"command\"\n"); Sys_Printf (" forcing \"command\"\n");
Cvar_Set (var, "command"); Cvar_Set (var, "command");
} }
} }
@ -896,7 +896,7 @@ C_Init (void)
C_CheckResize (); C_CheckResize ();
Con_Printf ("Console initialized.\n"); Sys_Printf ("Console initialized.\n");
// register our commands // register our commands
Cmd_AddCommand ("toggleconsole", ToggleConsole_f, Cmd_AddCommand ("toggleconsole", ToggleConsole_f,

View file

@ -45,6 +45,7 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/console.h" #include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/plugin.h" #include "QF/plugin.h"
#include "QF/sys.h"
#include "QF/va.h" #include "QF/va.h"
#include "compat.h" #include "compat.h"
@ -128,23 +129,23 @@ Con_BasicCompleteCommandLine (inputline_t *il)
cmd_len++; cmd_len++;
} while (i == 3); } while (i == 3);
// 'quakebar' // 'quakebar'
Con_Printf ("\n\35"); Sys_Printf ("\n\35");
for (i = 0; i < con_linewidth - 4; i++) for (i = 0; i < con_linewidth - 4; i++)
Con_Printf ("\36"); Sys_Printf ("\36");
Con_Printf ("\37\n"); Sys_Printf ("\37\n");
// Print Possible Commands // Print Possible Commands
if (c) { 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); Con_DisplayList (list[0], con_linewidth);
} }
if (v) { 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); Con_DisplayList (list[1], con_linewidth);
} }
if (o) { 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); Con_DisplayList (list[2], con_linewidth);
} }
} }

View file

@ -113,7 +113,7 @@ Con_ExecLine (const char *line)
} }
no_lf: no_lf:
if (echo) if (echo)
Con_Printf ("%s\n", line); Sys_Printf ("%s\n", line);
} }
VISIBLE void 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 VISIBLE void
Con_Print (const char *fmt, va_list args) Con_Print (const char *fmt, va_list args)
{ {
@ -155,20 +142,6 @@ Con_Print (const char *fmt, va_list args)
vfprintf (stdout, fmt, 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 VISIBLE void
Con_ProcessInput (void) Con_ProcessInput (void)
{ {
@ -179,7 +152,7 @@ Con_ProcessInput (void)
if (!been_there_done_that) { if (!been_there_done_that) {
been_there_done_that = 1; been_there_done_that = 1;
Con_Printf ("no input for you\n"); Sys_Printf ("no input for you\n");
} }
} }
} }

View file

@ -39,8 +39,9 @@ static __attribute__ ((used)) const char rcsid[] =
#endif #endif
#include "QF/console.h" #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 Con_DisplayList

View file

@ -106,7 +106,7 @@ menu_resolve_globals (progs_t *pr)
menu_pr_state.globals.time = &G_FLOAT (pr, def->ofs); menu_pr_state.globals.time = &G_FLOAT (pr, def->ofs);
return 1; return 1;
error: 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; return 0;
} }
@ -345,7 +345,7 @@ bi_Menu_SelectMenu (progs_t *pr)
} }
} else { } else {
if (name && *name) if (name && *name)
Con_Printf ("no menu \"%s\"\n", name); Sys_Printf ("no menu \"%s\"\n", name);
if (con_data.force_commandline) { if (con_data.force_commandline) {
key_dest = key_console; key_dest = key_console;
game_target = IMT_CONSOLE; game_target = IMT_CONSOLE;
@ -495,7 +495,7 @@ Menu_Load (void)
if (!menu_pr_state.progs) { if (!menu_pr_state.progs) {
// Not a fatal error, just means no menus // Not a fatal error, just means no menus
Con_SetOrMask (0x80); 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); menu_pr_state.progs_name);
Con_SetOrMask (0x00); Con_SetOrMask (0x00);
return; return;

View file

@ -635,8 +635,8 @@ sv_conmode_f (cvar_t *var)
} else if (!strcmp (var->string, "chat")) { } else if (!strcmp (var->string, "chat")) {
sv_con_data.exec_line = sv_exec_line_chat; sv_con_data.exec_line = sv_exec_line_chat;
} else { } else {
Con_Printf ("mode must be one of \"command\" or \"chat\"\n"); Sys_Printf ("mode must be one of \"command\" or \"chat\"\n");
Con_Printf (" forcing \"command\"\n"); Sys_Printf (" forcing \"command\"\n");
Cvar_Set (var, "command"); Cvar_Set (var, "command");
} }
} }

View file

@ -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) // can't fill to filled color or transparent color (used as visited marker)
if ((fillcolor == filledcolor) || (fillcolor == 255)) { 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; return;
} }

View file

@ -160,9 +160,9 @@ Mod_LoadLighting (lump_t *l)
loadmodel->lightdata = data + 8; loadmodel->lightdata = data + 8;
return; return;
} else } else
Sys_Printf ("Unknown .lit file version (%d)\n", i); Sys_DPrintf ("Unknown .lit file version (%d)\n", i);
} else } 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 // LordHavoc: oh well, expand the white lighting data

View file

@ -138,7 +138,7 @@ impact (tl_t *tl)
frac = (t1 - offset) / (t1 - t2); frac = (t1 - offset) / (t1 - t2);
} else { } else {
frac = 0; 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) { if (frac >= 0) {
tl->fraction = frac; tl->fraction = frac;
@ -396,7 +396,7 @@ MOD_TraceLine (hull_t *hull, int num,
frac = (start_dist + offset) / (start_dist - end_dist); frac = (start_dist + offset) / (start_dist - end_dist);
} else { } else {
// get here only when offset is non-zero // get here only when offset is non-zero
Sys_Printf ("foo\n"); Sys_DPrintf ("foo\n");
frac = 1; frac = 1;
side = start_dist < end_dist; side = start_dist < end_dist;
} }

View file

@ -267,7 +267,7 @@ NET_GetPacket (void)
int err = WSAGetLastError (); int err = WSAGetLastError ();
if (err == WSAEMSGSIZE) { if (err == WSAEMSGSIZE) {
Con_Printf ("Warning: Oversize packet from %s\n", Sys_Printf ("Warning: Oversize packet from %s\n",
NET_AdrToString (net_from)); NET_AdrToString (net_from));
return false; return false;
} }
@ -283,27 +283,27 @@ NET_GetPacket (void)
#endif // _WIN32 #endif // _WIN32
if (err == EWOULDBLOCK) if (err == EWOULDBLOCK)
return false; 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)); strerror (err));
return false; return false;
} }
// Check for malformed packets // Check for malformed packets
if (ntohs (net_from.port) < 1024) { 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)); NET_AdrToString (net_from));
return false; return false;
} }
if (from.sin_addr.s_addr==INADDR_ANY || from.sin_addr.s_addr == if (from.sin_addr.s_addr==INADDR_ANY || from.sin_addr.s_addr ==
INADDR_BROADCAST) { INADDR_BROADCAST) {
Con_Printf ("Warning: Packet dropped - bad address\n"); Sys_Printf ("Warning: Packet dropped - bad address\n");
return false; return false;
} }
_net_message_message.cursize = ret; _net_message_message.cursize = ret;
if (ret == sizeof (net_message_buffer)) { 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; return false;
} }
@ -335,7 +335,7 @@ NET_SendPacket (int length, const void *data, netadr_t to)
if (err == EWOULDBLOCK) if (err == EWOULDBLOCK)
return; 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)); strerror (errno));
} }
} }
@ -363,7 +363,7 @@ UDP_OpenSocket (int port)
// ZOID -- check for interface binding option // ZOID -- check for interface binding option
if ((i = COM_CheckParm ("-ip")) != 0 && i < com_argc) { if ((i = COM_CheckParm ("-ip")) != 0 && i < com_argc) {
address.sin_addr.s_addr = inet_addr (com_argv[i + 1]); 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)); inet_ntoa (address.sin_addr));
} else } else
address.sin_addr.s_addr = INADDR_ANY; address.sin_addr.s_addr = INADDR_ANY;
@ -394,7 +394,7 @@ NET_GetLocalAddress (void)
Sys_Error ("NET_Init: getsockname: %s", strerror (errno)); Sys_Error ("NET_Init: getsockname: %s", strerror (errno));
net_local_adr.port = address.sin_port; 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 void
@ -423,7 +423,7 @@ NET_Init (int port)
net_loopback_adr.ip[0] = 127; net_loopback_adr.ip[0] = 127;
net_loopback_adr.ip[3] = 1; net_loopback_adr.ip[3] = 1;
Con_Printf ("UDP (IPv4) Initialized\n"); Sys_Printf ("UDP (IPv4) Initialized\n");
} }
void void

View file

@ -269,7 +269,7 @@ NET_StringToAdr (const char *s, netadr_t *a)
addrs++; addrs++;
for (; *space && *space != ']'; space++); for (; *space && *space != ']'; space++);
if (!*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; return 0;
} }
*space++ = '\0'; *space++ = '\0';
@ -284,7 +284,7 @@ NET_StringToAdr (const char *s, netadr_t *a)
if ((err = getaddrinfo (addrs, ports, &hints, &resultp))) { if ((err = getaddrinfo (addrs, ports, &hints, &resultp))) {
// Error // Error
Con_Printf ("NET_StringToAdr: string %s:\n%s\n", s, Sys_Printf ("NET_StringToAdr: string %s:\n%s\n", s,
gai_strerror (err)); gai_strerror (err));
return 0; return 0;
} }
@ -309,7 +309,7 @@ NET_StringToAdr (const char *s, netadr_t *a)
break; break;
default: 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); "supported\n", s, resultp->ai_family);
return 0; return 0;
} }
@ -369,7 +369,7 @@ NET_GetPacket (void)
int err = WSAGetLastError (); int err = WSAGetLastError ();
if (err == WSAEMSGSIZE) { if (err == WSAEMSGSIZE) {
Con_Printf ("Warning: Oversize packet from %s\n", Sys_Printf ("Warning: Oversize packet from %s\n",
NET_AdrToString (net_from)); NET_AdrToString (net_from));
return false; return false;
} }
@ -381,13 +381,13 @@ NET_GetPacket (void)
#endif // _WIN32 #endif // _WIN32
if (err == EWOULDBLOCK) if (err == EWOULDBLOCK)
return false; return false;
Con_Printf ("NET_GetPacket: %s\n", strerror (err)); Sys_Printf ("NET_GetPacket: %s\n", strerror (err));
return false; return false;
} }
_net_message_message.cursize = ret; _net_message_message.cursize = ret;
if (ret == sizeof (net_message_buffer)) { 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; return false;
} }
@ -422,7 +422,7 @@ NET_SendPacket (int length, const void *data, netadr_t to)
if (err == EWOULDBLOCK) if (err == EWOULDBLOCK)
return; 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 { } else {
Host = "0::0"; 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) if (port == PORT_ANY)
Service = NULL; Service = NULL;
@ -522,7 +522,7 @@ NET_GetLocalAddress (void)
Sys_Error ("NET_GetLocalAddress: getsockname: %s", strerror (errno)); Sys_Error ("NET_GetLocalAddress: getsockname: %s", strerror (errno));
net_local_adr.port = address.sin6_port; 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 void
@ -551,7 +551,7 @@ NET_Init (int port)
net_loopback_adr.ip[15] = 1; net_loopback_adr.ip[15] = 1;
Con_Printf ("UDP (IPv6) Initialized\n"); Sys_Printf ("UDP (IPv6) Initialized\n");
} }
void void

View file

@ -254,7 +254,7 @@ Netchan_Transmit (netchan_t *chan, int length, byte *data)
// check for message overflow // check for message overflow
if (chan->message.overflowed) { if (chan->message.overflowed) {
chan->fatal_error = true; chan->fatal_error = true;
Con_Printf ("%s:Outgoing message overflow\n", Sys_Printf ("%s:Outgoing message overflow\n",
NET_AdrToString (chan->remote_address)); NET_AdrToString (chan->remote_address));
return; return;
} }
@ -316,7 +316,7 @@ Netchan_Transmit (netchan_t *chan, int length, byte *data)
chan->cleartime = *net_realtime; chan->cleartime = *net_realtime;
if (showpackets->int_val & 1) 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, send_reliable, chan->incoming_sequence,
chan->incoming_reliable_sequence, send.cursize, chan->incoming_reliable_sequence, send.cursize,
chan->outgoing_sequence - chan->incoming_sequence); chan->outgoing_sequence - chan->incoming_sequence);
@ -354,7 +354,7 @@ Netchan_Process (netchan_t *chan)
sequence_ack &= ~(1 << 31); sequence_ack &= ~(1 << 31);
if (showpackets->int_val & 2) 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); sequence_ack, reliable_ack, net_message->message->cursize);
// get a rate estimation // get a rate estimation
@ -387,7 +387,7 @@ Netchan_Process (netchan_t *chan)
// discard stale or duplicated packets // discard stale or duplicated packets
if (sequence < (unsigned int) chan->incoming_sequence + 1) { if (sequence < (unsigned int) chan->incoming_sequence + 1) {
if (showdrop->int_val) 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, NET_AdrToString (chan->remote_address), sequence,
chan->incoming_sequence); chan->incoming_sequence);
return false; return false;
@ -399,7 +399,7 @@ Netchan_Process (netchan_t *chan)
chan->drop_count += 1; chan->drop_count += 1;
if (showdrop->int_val) 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), NET_AdrToString (chan->remote_address),
sequence - (chan->incoming_sequence + 1), sequence); sequence - (chan->incoming_sequence + 1), sequence);
} }

View file

@ -211,7 +211,7 @@ static void
NET_Listen_f (void) NET_Listen_f (void)
{ {
if (Cmd_Argc () != 2) { if (Cmd_Argc () != 2) {
Con_Printf ("\"listen\" is \"%u\"\n", listening ? 1 : 0); Sys_Printf ("\"listen\" is \"%u\"\n", listening ? 1 : 0);
return; return;
} }
@ -232,12 +232,12 @@ MaxPlayers_f (void)
int n; int n;
if (Cmd_Argc () != 2) { if (Cmd_Argc () != 2) {
Con_Printf ("\"maxplayers\" is \"%u\"\n", svs.maxclients); Sys_Printf ("\"maxplayers\" is \"%u\"\n", svs.maxclients);
return; return;
} }
if (sv.active) { if (sv.active) {
Con_Printf Sys_Printf
("maxplayers can not be changed while a server is running.\n"); ("maxplayers can not be changed while a server is running.\n");
return; return;
} }
@ -247,7 +247,7 @@ MaxPlayers_f (void)
n = 1; n = 1;
if (n > svs.maxclientslimit) { if (n > svs.maxclientslimit) {
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) if ((n == 1) && listening)
@ -270,13 +270,13 @@ NET_Port_f (void)
int n; int n;
if (Cmd_Argc () != 2) { if (Cmd_Argc () != 2) {
Con_Printf ("\"port\" is \"%u\"\n", net_hostport); Sys_Printf ("\"port\" is \"%u\"\n", net_hostport);
return; return;
} }
n = atoi (Cmd_Argv (1)); n = atoi (Cmd_Argv (1));
if (n < 1 || n > 65534) { 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; return;
} }
@ -294,8 +294,8 @@ NET_Port_f (void)
static void static void
PrintSlistHeader (void) PrintSlistHeader (void)
{ {
Con_Printf ("Server Map Users\n"); Sys_Printf ("Server Map Users\n");
Con_Printf ("--------------- --------------- -----\n"); Sys_Printf ("--------------- --------------- -----\n");
slistLastShown = 0; slistLastShown = 0;
} }
@ -307,11 +307,11 @@ PrintSlist (void)
for (n = slistLastShown; n < hostCacheCount; n++) { for (n = slistLastShown; n < hostCacheCount; n++) {
if (hostcache[n].maxusers) 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].map, hostcache[n].users,
hostcache[n].maxusers); hostcache[n].maxusers);
else else
Con_Printf ("%-15.15s %-15.15s\n", hostcache[n].name, Sys_Printf ("%-15.15s %-15.15s\n", hostcache[n].name,
hostcache[n].map); hostcache[n].map);
} }
slistLastShown = n; slistLastShown = n;
@ -322,9 +322,9 @@ static void
PrintSlistTrailer (void) PrintSlistTrailer (void)
{ {
if (hostCacheCount) if (hostCacheCount)
Con_Printf ("== end list ==\n\n"); Sys_Printf ("== end list ==\n\n");
else 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; return;
if (!slistSilent) { if (!slistSilent) {
Con_Printf ("Looking for Quake servers...\n"); Sys_Printf ("Looking for Quake servers...\n");
PrintSlistHeader (); PrintSlistHeader ();
} }
@ -442,7 +442,7 @@ NET_Connect (const char *host)
if (hostCacheCount != 1) if (hostCacheCount != 1)
return NULL; return NULL;
host = hostcache[0].cname; 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) if (hostCacheCount)
@ -462,7 +462,7 @@ NET_Connect (const char *host)
} }
if (host) { if (host) {
Con_Printf ("\n"); Sys_Printf ("\n");
PrintSlistHeader (); PrintSlistHeader ();
PrintSlist (); PrintSlist ();
PrintSlistTrailer (); PrintSlistTrailer ();
@ -573,7 +573,7 @@ NET_GetMessage (qsocket_t * sock)
return -1; return -1;
if (sock->disconnected) { if (sock->disconnected) {
Con_Printf ("NET_GetMessage: disconnected socket\n"); Sys_Printf ("NET_GetMessage: disconnected socket\n");
return -1; return -1;
} }
@ -650,7 +650,7 @@ NET_SendMessage (qsocket_t * sock, sizebuf_t *data)
return -1; return -1;
if (sock->disconnected) { if (sock->disconnected) {
Con_Printf ("NET_SendMessage: disconnected socket\n"); Sys_Printf ("NET_SendMessage: disconnected socket\n");
return -1; return -1;
} }
@ -680,7 +680,7 @@ NET_SendUnreliableMessage (qsocket_t * sock, sizebuf_t *data)
return -1; return -1;
if (sock->disconnected) { if (sock->disconnected) {
Con_Printf ("NET_SendMessage: disconnected socket\n"); Sys_Printf ("NET_SendMessage: disconnected socket\n");
return -1; return -1;
} }
@ -891,9 +891,9 @@ NET_Init (void)
} }
if (*my_ipx_address) 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) 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) { if (vcrFile) {
Con_Printf ("Closing vcrfile.\n"); Sys_Printf ("Closing vcrfile.\n");
Qclose (vcrFile); Qclose (vcrFile);
} }
} }

View file

@ -138,7 +138,7 @@ NET_Ban_f (void)
CL_Cmd_ForwardToServer (); CL_Cmd_ForwardToServer ();
return; return;
} }
print = Con_Printf; print = Sys_Printf;
} else { } else {
if (*sv_globals.deathmatch if (*sv_globals.deathmatch
&& !host_client->privileged) return; && !host_client->privileged) return;
@ -339,7 +339,7 @@ Datagram_GetMessage (qsocket_t * sock)
break; break;
if ((int) length == -1) { if ((int) length == -1) {
Con_Printf ("Read error\n"); Sys_Printf ("Read error\n");
return -1; return -1;
} }
@ -364,14 +364,14 @@ Datagram_GetMessage (qsocket_t * sock)
if (flags & NETFLAG_UNRELIABLE) { if (flags & NETFLAG_UNRELIABLE) {
if (sequence < sock->unreliableReceiveSequence) { if (sequence < sock->unreliableReceiveSequence) {
Con_DPrintf ("Got a stale datagram\n"); Sys_DPrintf ("Got a stale datagram\n");
ret = 0; ret = 0;
break; break;
} }
if (sequence != sock->unreliableReceiveSequence) { if (sequence != sock->unreliableReceiveSequence) {
count = sequence - sock->unreliableReceiveSequence; count = sequence - sock->unreliableReceiveSequence;
droppedDatagrams += count; droppedDatagrams += count;
Con_DPrintf ("Dropped %u datagram(s)\n", count); Sys_DPrintf ("Dropped %u datagram(s)\n", count);
} }
sock->unreliableReceiveSequence = sequence + 1; sock->unreliableReceiveSequence = sequence + 1;
@ -386,15 +386,15 @@ Datagram_GetMessage (qsocket_t * sock)
if (flags & NETFLAG_ACK) { if (flags & NETFLAG_ACK) {
if (sequence != (sock->sendSequence - 1)) { if (sequence != (sock->sendSequence - 1)) {
Con_DPrintf ("Stale ACK received\n"); Sys_DPrintf ("Stale ACK received\n");
continue; continue;
} }
if (sequence == sock->ackSequence) { if (sequence == sock->ackSequence) {
sock->ackSequence++; sock->ackSequence++;
if (sock->ackSequence != sock->sendSequence) if (sock->ackSequence != sock->sendSequence)
Con_DPrintf ("ack sequencing error\n"); Sys_DPrintf ("ack sequencing error\n");
} else { } else {
Con_DPrintf ("Duplicate ACK received\n"); Sys_DPrintf ("Duplicate ACK received\n");
continue; continue;
} }
sock->sendMessageLength -= MAX_DATAGRAM; sock->sendMessageLength -= MAX_DATAGRAM;
@ -451,10 +451,10 @@ Datagram_GetMessage (qsocket_t * sock)
static void static void
PrintStats (qsocket_t * s) PrintStats (qsocket_t * s)
{ {
Con_Printf ("canSend = %4u \n", s->canSend); Sys_Printf ("canSend = %4u \n", s->canSend);
Con_Printf ("sendSeq = %4u ", s->sendSequence); Sys_Printf ("sendSeq = %4u ", s->sendSequence);
Con_Printf ("recvSeq = %4u \n", s->receiveSequence); Sys_Printf ("recvSeq = %4u \n", s->receiveSequence);
Con_Printf ("\n"); Sys_Printf ("\n");
} }
static void static void
@ -463,19 +463,19 @@ NET_Stats_f (void)
qsocket_t *s; qsocket_t *s;
if (Cmd_Argc () == 1) { if (Cmd_Argc () == 1) {
Con_Printf ("unreliable messages sent = %i\n", Sys_Printf ("unreliable messages sent = %i\n",
unreliableMessagesSent); unreliableMessagesSent);
Con_Printf ("unreliable messages recv = %i\n", Sys_Printf ("unreliable messages recv = %i\n",
unreliableMessagesReceived); unreliableMessagesReceived);
Con_Printf ("reliable messages sent = %i\n", messagesSent); Sys_Printf ("reliable messages sent = %i\n", messagesSent);
Con_Printf ("reliable messages received = %i\n", messagesReceived); Sys_Printf ("reliable messages received = %i\n", messagesReceived);
Con_Printf ("packetsSent = %i\n", packetsSent); Sys_Printf ("packetsSent = %i\n", packetsSent);
Con_Printf ("packetsReSent = %i\n", packetsReSent); Sys_Printf ("packetsReSent = %i\n", packetsReSent);
Con_Printf ("packetsReceived = %i\n", packetsReceived); Sys_Printf ("packetsReceived = %i\n", packetsReceived);
Con_Printf ("receivedDuplicateCount = %i\n", Sys_Printf ("receivedDuplicateCount = %i\n",
receivedDuplicateCount); receivedDuplicateCount);
Con_Printf ("shortPacketCount = %i\n", shortPacketCount); Sys_Printf ("shortPacketCount = %i\n", shortPacketCount);
Con_Printf ("droppedDatagrams = %i\n", droppedDatagrams); Sys_Printf ("droppedDatagrams = %i\n", droppedDatagrams);
} else if (strcmp (Cmd_Argv (1), "*") == 0) { } else if (strcmp (Cmd_Argv (1), "*") == 0) {
for (s = net_activeSockets; s; s = s->next) for (s = net_activeSockets; s; s = s->next)
PrintStats (s); PrintStats (s);
@ -548,7 +548,7 @@ Test_Poll (void *unused)
connectTime = MSG_ReadLong (net_message); connectTime = MSG_ReadLong (net_message);
strcpy (address, MSG_ReadString (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, frags, colors >> 4, colors & 0x0f, connectTime / 60,
address); address);
} }
@ -674,7 +674,7 @@ Test2_Poll (void *unused)
goto Done; goto Done;
strcpy (value, MSG_ReadString (net_message)); 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); SZ_Clear (net_message->message);
// save space for the header, filled in later // save space for the header, filled in later
@ -693,7 +693,7 @@ Test2_Poll (void *unused)
return; return;
Error: Error:
Con_Printf ("Unexpected repsonse to Rule Info request\n"); Sys_Printf ("Unexpected repsonse to Rule Info request\n");
Done: Done:
dfunc.CloseSocket (test2Socket); dfunc.CloseSocket (test2Socket);
test2InProgress = false; test2InProgress = false;
@ -1260,7 +1260,7 @@ _Datagram_Connect (const char *host)
goto ErrorReturn; goto ErrorReturn;
// send the connection request // send the connection request
Con_Printf ("trying...\n"); Sys_Printf ("trying...\n");
CL_UpdateScreen (cl.time); CL_UpdateScreen (cl.time);
start_time = net_time; start_time = net_time;
@ -1316,21 +1316,21 @@ _Datagram_Connect (const char *host)
while (ret == 0 && (SetNetTime () - start_time) < 2.5); while (ret == 0 && (SetNetTime () - start_time) < 2.5);
if (ret) if (ret)
break; break;
Con_Printf ("still trying...\n"); Sys_Printf ("still trying...\n");
CL_UpdateScreen (cl.time); CL_UpdateScreen (cl.time);
start_time = SetNetTime (); start_time = SetNetTime ();
} }
if (ret == 0) { if (ret == 0) {
reason = "No Response"; reason = "No Response";
Con_Printf ("%s\n", reason); Sys_Printf ("%s\n", reason);
// strcpy (m_return_reason, reason); // strcpy (m_return_reason, reason);
goto ErrorReturn; goto ErrorReturn;
} }
if (ret == -1) { if (ret == -1) {
reason = "Network Error"; reason = "Network Error";
Con_Printf ("%s\n", reason); Sys_Printf ("%s\n", reason);
// strcpy (m_return_reason, reason); // strcpy (m_return_reason, reason);
goto ErrorReturn; goto ErrorReturn;
} }
@ -1338,7 +1338,7 @@ _Datagram_Connect (const char *host)
ret = MSG_ReadByte (net_message); ret = MSG_ReadByte (net_message);
if (ret == CCREP_REJECT) { if (ret == CCREP_REJECT) {
reason = MSG_ReadString (net_message); reason = MSG_ReadString (net_message);
Con_Printf (reason); Sys_Printf (reason);
// strncpy (m_return_reason, reason, 31); // strncpy (m_return_reason, reason, 31);
goto ErrorReturn; goto ErrorReturn;
} }
@ -1349,20 +1349,20 @@ _Datagram_Connect (const char *host)
dfunc.SetSocketPort (&sock->addr, MSG_ReadLong (net_message)); dfunc.SetSocketPort (&sock->addr, MSG_ReadLong (net_message));
} else { } else {
reason = "Bad Response"; reason = "Bad Response";
Con_Printf ("%s\n", reason); Sys_Printf ("%s\n", reason);
// strcpy (m_return_reason, reason); // strcpy (m_return_reason, reason);
goto ErrorReturn; goto ErrorReturn;
} }
dfunc.GetNameFromAddr (&sendaddr, sock->address); dfunc.GetNameFromAddr (&sendaddr, sock->address);
Con_Printf ("Connection accepted\n"); Sys_Printf ("Connection accepted\n");
sock->lastMessageTime = SetNetTime (); sock->lastMessageTime = SetNetTime ();
// switch the connection to the specified address // switch the connection to the specified address
if (dfunc.Connect (newsock, &sock->addr) == -1) { if (dfunc.Connect (newsock, &sock->addr) == -1) {
reason = "Connect to Game failed"; reason = "Connect to Game failed";
Con_Printf ("%s\n", reason); Sys_Printf ("%s\n", reason);
// strcpy (m_return_reason, reason); // strcpy (m_return_reason, reason);
goto ErrorReturn; goto ErrorReturn;
} }

View file

@ -96,7 +96,7 @@ Loop_Connect (const char *host)
if (!loop_client) { if (!loop_client) {
if ((loop_client = NET_NewQSocket ()) == NULL) { if ((loop_client = NET_NewQSocket ()) == NULL) {
Con_Printf ("Loop_Connect: no qsocket available\n"); Sys_Printf ("Loop_Connect: no qsocket available\n");
return NULL; return NULL;
} }
strcpy (loop_client->address, "localhost"); strcpy (loop_client->address, "localhost");
@ -107,7 +107,7 @@ Loop_Connect (const char *host)
if (!loop_server) { if (!loop_server) {
if ((loop_server = NET_NewQSocket ()) == NULL) { if ((loop_server = NET_NewQSocket ()) == NULL) {
Con_Printf ("Loop_Connect: no qsocket available\n"); Sys_Printf ("Loop_Connect: no qsocket available\n");
return NULL; return NULL;
} }
strcpy (loop_server->address, "LOCAL"); strcpy (loop_server->address, "LOCAL");

View file

@ -142,7 +142,7 @@ get_address (int sock)
if (ioctl (sock, SIOCGIFADDR, &ifr[i]) == -1) if (ioctl (sock, SIOCGIFADDR, &ifr[i]) == -1)
continue; continue;
in_addr = (struct sockaddr_in *)&ifr[i].ifr_addr; 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)); inet_ntoa (in_addr->sin_addr));
addr = *(unsigned *)&in_addr->sin_addr; addr = *(unsigned *)&in_addr->sin_addr;
if (addr != htonl (0x7f000001)) { if (addr != htonl (0x7f000001)) {
@ -202,7 +202,7 @@ UDP_Init (void)
if (colon) if (colon)
*colon = 0; *colon = 0;
Con_Printf ("UDP (IPv4) Initialized\n"); Sys_Printf ("UDP (IPv4) Initialized\n");
tcpipAvailable = true; tcpipAvailable = true;
return net_controlsocket; return net_controlsocket;
@ -397,7 +397,7 @@ UDP_Broadcast (int socket, byte * buf, int len)
Sys_Error ("Attempted to use multiple broadcasts sockets"); Sys_Error ("Attempted to use multiple broadcasts sockets");
ret = UDP_MakeSocketBroadcastCapable (socket); ret = UDP_MakeSocketBroadcastCapable (socket);
if (ret == -1) { if (ret == -1) {
Con_Printf ("Unable to make socket broadcast capable\n"); Sys_Printf ("Unable to make socket broadcast capable\n");
return ret; return ret;
} }
} }

View file

@ -157,7 +157,7 @@ WINS_Init (void)
hInst = LoadLibrary ("wsock32.dll"); hInst = LoadLibrary ("wsock32.dll");
if (hInst == NULL) { if (hInst == NULL) {
Con_Printf ("Failed to load winsock.dll\n"); Sys_Printf ("Failed to load winsock.dll\n");
winsock_lib_initialized = false; winsock_lib_initialized = false;
return -1; return -1;
} }
@ -182,7 +182,7 @@ WINS_Init (void)
!psocket || !pioctlsocket || !psetsockopt || !psocket || !pioctlsocket || !psetsockopt ||
!precvfrom || !psendto || !pclosesocket || !precvfrom || !psendto || !pclosesocket ||
!pgethostname || !pgethostbyname || !pgethostbyaddr || !pgetsockname) { !pgethostname || !pgethostbyname || !pgethostbyaddr || !pgetsockname) {
Con_Printf ("Couldn't GetProcAddress from winsock.dll\n"); Sys_Printf ("Couldn't GetProcAddress from winsock.dll\n");
return -1; return -1;
} }
@ -195,7 +195,7 @@ WINS_Init (void)
r = pWSAStartup (MAKEWORD (1, 1), &winsockdata); r = pWSAStartup (MAKEWORD (1, 1), &winsockdata);
if (r) { if (r) {
Con_Printf ("Winsock initialization failed.\n"); Sys_Printf ("Winsock initialization failed.\n");
return -1; return -1;
} }
} }
@ -203,7 +203,7 @@ WINS_Init (void)
// determine my name // determine my name
if (pgethostname (buff, MAXHOSTNAMELEN) == SOCKET_ERROR) { 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) if (--winsock_initialized == 0)
pWSACleanup (); pWSACleanup ();
return -1; return -1;
@ -241,7 +241,7 @@ WINS_Init (void)
} }
if ((net_controlsocket = WINS_OpenSocket (0)) == -1) { 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) if (--winsock_initialized == 0)
pWSACleanup (); pWSACleanup ();
return -1; return -1;
@ -251,7 +251,7 @@ WINS_Init (void)
((struct sockaddr_in *) &broadcastaddr)->sin_addr.s_addr = INADDR_BROADCAST; ((struct sockaddr_in *) &broadcastaddr)->sin_addr.s_addr = INADDR_BROADCAST;
((struct sockaddr_in *) &broadcastaddr)->sin_port = htons ((unsigned short) net_hostport); ((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; tcpipAvailable = true;
return net_controlsocket; return net_controlsocket;
@ -459,7 +459,7 @@ WINS_Broadcast (int socket, byte * buf, int len)
WINS_GetLocalAddress (); WINS_GetLocalAddress ();
ret = WINS_MakeSocketBroadcastCapable (socket); ret = WINS_MakeSocketBroadcastCapable (socket);
if (ret == -1) { if (ret == -1) {
Con_Printf ("Unable to make socket broadcast capable\n"); Sys_Printf ("Unable to make socket broadcast capable\n");
return ret; return ret;
} }
} }

View file

@ -38,8 +38,8 @@ static __attribute__ ((used)) const char rcsid[] =
# include <strings.h> # include <strings.h>
#endif #endif
#include "QF/console.h"
#include "QF/msg.h" #include "QF/msg.h"
#include "QF/sys.h"
#include "netchan.h" #include "netchan.h"
#include "qw/msg_backbuf.h" #include "qw/msg_backbuf.h"
@ -50,7 +50,7 @@ PushBackbuf (backbuf_t *rel)
{ {
int tail_backbuf; 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; tail_backbuf = (rel->head_backbuf + rel->num_backbuf) % MAX_BACK_BUFFERS;
memset (&rel->backbuf, 0, sizeof (rel->backbuf)); memset (&rel->backbuf, 0, sizeof (rel->backbuf));
rel->backbuf.allowoverflow = true; 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->backbuf.cursize > rel->backbuf.maxsize - maxsize - 1) {
if (rel->num_backbuf == MAX_BACK_BUFFERS) { 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 rel->backbuf.cursize = 0; // don't overflow without
// allowoverflow set // allowoverflow set
msg->overflowed = true; // this will drop the client 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; rel->backbuf_size[tail_backbuf] = rel->backbuf.cursize;
if (rel->backbuf.overflowed) { 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->num_backbuf, rel->name);
rel->netchan->message.overflowed = true; // this will drop the rel->netchan->message.overflowed = true; // this will drop the
// client // client
@ -268,7 +268,7 @@ MSG_Reliable_Send (backbuf_t *rel)
return; return;
// will it fit? // will it fit?
if (msg->cursize + *size < msg->maxsize) { 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 // it'll fit
SZ_Write (msg, data, *size); SZ_Write (msg, data, *size);

View file

@ -147,7 +147,7 @@ Cmd_AddCommand (const char *cmd_name, xcommand_t function,
// fail if the command already exists // fail if the command already exists
cmd = (cmd_function_t *) Hash_Find (cmd_hash, cmd_name); cmd = (cmd_function_t *) Hash_Find (cmd_hash, cmd_name);
if (cmd) { if (cmd) {
Sys_Printf ("Cmd_AddCommand: %s already defined\n", cmd_name); Sys_DPrintf ("Cmd_AddCommand: %s already defined\n", cmd_name);
return 0; return 0;
} }

View file

@ -654,7 +654,7 @@ QFS_WriteBuffers (const char *filename, int count, ...)
Sys_Error ("Error opening %s", filename); Sys_Error ("Error opening %s", filename);
} }
Sys_Printf ("QFS_WriteBuffers: %s\n", filename); Sys_DPrintf ("QFS_WriteBuffers: %s\n", filename);
while (count--) { while (count--) {
void *data = va_arg (args, void *); void *data = va_arg (args, void *);
int len = va_arg (args, int); int len = va_arg (args, int);
@ -1008,7 +1008,7 @@ QFS_LoadPackFile (char *packfile)
pack_t *pack = pack_open (packfile); pack_t *pack = pack_open (packfile);
if (pack) if (pack)
Sys_Printf ("Added packfile %s (%i files)\n", Sys_DPrintf ("Added packfile %s (%i files)\n",
packfile, pack->numfiles); packfile, pack->numfiles);
return pack; return pack;
} }

View file

@ -41,7 +41,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <stdio.h> #include <stdio.h>
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/draw.h" #include "QF/draw.h"
#include "QF/dstring.h" #include "QF/dstring.h"
@ -136,7 +135,7 @@ Draw_InitText (void)
tVAsize = 0; tVAsize = 0;
if (tVAsize) { if (tVAsize) {
Con_Printf ("Text: %i maximum vertex elements.\n", tVAsize); Sys_Printf ("Text: %i maximum vertex elements.\n", tVAsize);
if (textVertices) if (textVertices)
free (textVertices); free (textVertices);
@ -154,7 +153,7 @@ Draw_InitText (void)
for (i = 0; i < tVAsize; i++) for (i = 0; i < tVAsize; i++)
tVAindices[i] = i; tVAindices[i] = i;
} else { } else {
Con_Printf ("Text: Vertex Array use disabled.\n"); Sys_Printf ("Text: Vertex Array use disabled.\n");
} }
} }

View file

@ -41,7 +41,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <stdlib.h> #include <stdlib.h>
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/qargs.h" #include "QF/qargs.h"
#include "QF/quakefs.h" #include "QF/quakefs.h"
@ -161,7 +160,7 @@ R_InitParticles (void)
else else
pVAsize = 0; pVAsize = 0;
if (pVAsize) { if (pVAsize) {
Con_Printf ("Particles: %i maximum vertex elements.\n", pVAsize); Sys_Printf ("Particles: %i maximum vertex elements.\n", pVAsize);
if (particleVertexArray) if (particleVertexArray)
free (particleVertexArray); free (particleVertexArray);
@ -175,7 +174,7 @@ R_InitParticles (void)
for (i = 0; i < pVAsize; i++) for (i = 0; i < pVAsize; i++)
pVAindices[i] = i; pVAindices[i] = i;
} else { } else {
Con_Printf ("Particles: Vertex Array use disabled.\n"); Sys_Printf ("Particles: Vertex Array use disabled.\n");
} }
} else { } else {
if (particleVertexArray) { if (particleVertexArray) {
@ -210,11 +209,11 @@ R_ReadPointFile_f (void)
QFS_FOpenFile (name, &f); QFS_FOpenFile (name, &f);
if (!f) { if (!f) {
Con_Printf ("couldn't open %s\n", name); Sys_Printf ("couldn't open %s\n", name);
return; return;
} }
Con_Printf ("Reading %s...\n", name); Sys_Printf ("Reading %s...\n", name);
c = 0; c = 0;
for (;;) { for (;;) {
char buf[64]; char buf[64];
@ -226,7 +225,7 @@ R_ReadPointFile_f (void)
c++; c++;
if (numparticles >= r_maxparticles) { if (numparticles >= r_maxparticles) {
Con_Printf ("Not enough free particles\n"); Sys_Printf ("Not enough free particles\n");
break; break;
} else { } else {
particle_new (pt_static, part_tex_dot, org, 1.5, vec3_origin, particle_new (pt_static, part_tex_dot, org, 1.5, vec3_origin,
@ -234,7 +233,7 @@ R_ReadPointFile_f (void)
} }
} }
Qclose (f); Qclose (f);
Con_Printf ("%i points read\n", c); Sys_Printf ("%i points read\n", c);
} }
static void static void
@ -1549,7 +1548,7 @@ R_ParticlePhysics (particle_t *part)
part->scale -= time2; part->scale -= time2;
break; break;
default: default:
Con_DPrintf ("unhandled particle type %d\n", part->type); Sys_DPrintf ("unhandled particle type %d\n", part->type);
break; break;
} }
} }

View file

@ -42,7 +42,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <math.h> #include <math.h>
#include <stdio.h> #include <stdio.h>
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/render.h" #include "QF/render.h"
#include "QF/sys.h" #include "QF/sys.h"
@ -540,7 +539,7 @@ gl_overbright_f (cvar_t *var)
if (var->int_val) { if (var->int_val) {
if (!gl_combine_capable && gl_mtex_capable) { 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_multitexture enabled if you don't have "
"GL_COMBINE support in your driver.\n"); "GL_COMBINE support in your driver.\n");
lm_src_blend = GL_ZERO; lm_src_blend = GL_ZERO;

View file

@ -42,7 +42,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/locs.h" #include "QF/locs.h"
#include "QF/mathlib.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 ((frame >= paliashdr->mdl.numframes) || (frame < 0)) {
if (developer->int_val) 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); currententity->model->name);
frame = 0; frame = 0;
} }
@ -365,7 +364,7 @@ GL_GetAliasFrameVerts (int frame, aliashdr_t *paliashdr, entity_t *e)
if ((frame >= paliashdr->mdl.numframes) || (frame < 0)) { if ((frame >= paliashdr->mdl.numframes) || (frame < 0)) {
if (developer->int_val) 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); currententity->model->name);
frame = 0; frame = 0;
} }
@ -468,7 +467,7 @@ R_AliasGetSkindesc (int skinnum, aliashdr_t *ahdr)
maliasskingroup_t *paliasskingroup; maliasskingroup_t *paliasskingroup;
if ((skinnum >= ahdr->mdl.numskins) || (skinnum < 0)) { 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; skinnum = 0;
} }

View file

@ -41,9 +41,9 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/GL/defines.h" #include "QF/GL/defines.h"
#include "QF/GL/funcs.h" #include "QF/GL/funcs.h"
#include "QF/console.h"
#include "QF/model.h" #include "QF/model.h"
#include "QF/render.h" #include "QF/render.h"
#include "QF/sys.h"
#include "compat.h" #include "compat.h"
#include "r_local.h" #include "r_local.h"
@ -74,7 +74,7 @@ R_GetSpriteFrame (entity_t *currententity)
frame = currententity->frame; frame = currententity->frame;
if ((frame >= psprite->numframes) || (frame < 0)) { 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; frame = 0;
} }
@ -260,7 +260,7 @@ R_InitSprites (void)
#else #else
sVAsize = 4; sVAsize = 4;
#endif #endif
Con_Printf ("Sprites: %i maximum vertex elements.\n", sVAsize); Sys_Printf ("Sprites: %i maximum vertex elements.\n", sVAsize);
if (spriteVertexArray) if (spriteVertexArray)
free (spriteVertexArray); free (spriteVertexArray);

View file

@ -42,7 +42,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/draw.h" #include "QF/draw.h"
#include "QF/locs.h" #include "QF/locs.h"
@ -822,15 +821,15 @@ R_InitFishEyeOnce (void)
if (fisheye_init_once_completed) if (fisheye_init_once_completed)
return 1; return 1;
Con_Printf ("GL_ARB_texture_cube_map "); Sys_Printf ("GL_ARB_texture_cube_map ");
if (QFGL_ExtensionPresent ("GL_ARB_texture_cube_map")) { if (QFGL_ExtensionPresent ("GL_ARB_texture_cube_map")) {
qfglGetIntegerv (GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB, qfglGetIntegerv (GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB,
&gl_cube_map_maxtex); &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); (int) gl_cube_map_maxtex);
gl_cube_map_capable = true; gl_cube_map_capable = true;
} else { } else {
Con_Printf ("not found.\n"); Sys_Printf ("not found.\n");
gl_cube_map_capable = false; gl_cube_map_capable = false;
} }
fisheye_init_once_completed = true; fisheye_init_once_completed = true;

View file

@ -41,7 +41,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <stdio.h> #include <stdio.h>
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/draw.h" #include "QF/draw.h"
#include "QF/quakefs.h" #include "QF/quakefs.h"
@ -133,7 +132,7 @@ void
R_LoadSky_f (void) R_LoadSky_f (void)
{ {
if (Cmd_Argc () != 2) { if (Cmd_Argc () != 2) {
Con_Printf ("loadsky <name> : load a skybox\n"); Sys_Printf ("loadsky <name> : load a skybox\n");
return; return;
} }
@ -241,7 +240,7 @@ R_TimeRefresh_f (void)
stop = Sys_DoubleTime (); stop = Sys_DoubleTime ();
time = stop - start; 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); GL_BeginRendering (&glx, &gly, &glwidth, &glheight);
} }

View file

@ -40,7 +40,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <time.h> #include <time.h>
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/draw.h" #include "QF/draw.h"
#include "QF/dstring.h" #include "QF/dstring.h"
@ -142,7 +141,7 @@ SCR_ScreenShot_f (void)
// find a file name to save it to // find a file name to save it to
if (!QFS_NextFilename (pcxname, if (!QFS_NextFilename (pcxname,
va ("%s/qf", qfs_gamedir->dir.def), ".tga")) { 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 { } else {
buffer = malloc (glwidth * glheight * 3); buffer = malloc (glwidth * glheight * 3);
SYS_CHECKMEM (buffer); SYS_CHECKMEM (buffer);
@ -150,7 +149,7 @@ SCR_ScreenShot_f (void)
GL_UNSIGNED_BYTE, buffer); GL_UNSIGNED_BYTE, buffer);
WriteTGAfile (pcxname->str, buffer, glwidth, glheight); WriteTGAfile (pcxname->str, buffer, glwidth, glheight);
free (buffer); 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); dstring_delete (pcxname);
} }
@ -265,7 +264,7 @@ SCR_UpdateScreen (double realtime, SCR_Func *scr_funcs)
if (r_speeds->int_val) { if (r_speeds->int_val) {
// qfglFinish (); // qfglFinish ();
time2 = Sys_DoubleTime (); 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, (int) ((time2 - time1) * 1000), c_brush_polys,
c_alias_polys, numparticles); c_alias_polys, numparticles);
} }

View file

@ -38,11 +38,11 @@ static __attribute__ ((used)) const char rcsid[] =
# include <strings.h> # include <strings.h>
#endif #endif
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/image.h" #include "QF/image.h"
#include "QF/render.h" #include "QF/render.h"
#include "QF/skin.h" #include "QF/skin.h"
#include "QF/sys.h"
#include "QF/GL/defines.h" #include "QF/GL/defines.h"
#include "QF/GL/funcs.h" #include "QF/GL/funcs.h"
#include "QF/GL/qf_textures.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); paliashdr = Cache_Get (&model->cache);
if (skinnum < 0 if (skinnum < 0
|| skinnum >= paliashdr->mdl.numskins) { || skinnum >= paliashdr->mdl.numskins) {
Con_Printf ("(%d): Invalid player skin #%d\n", slot, Sys_Printf ("(%d): Invalid player skin #%d\n", slot,
skinnum); skinnum);
skinnum = 0; skinnum = 0;
} }

View file

@ -38,11 +38,11 @@ static __attribute__ ((used)) const char rcsid[] =
# include <strings.h> # include <strings.h>
#endif #endif
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/image.h" #include "QF/image.h"
#include "QF/quakefs.h" #include "QF/quakefs.h"
#include "QF/render.h" #include "QF/render.h"
#include "QF/sys.h"
#include "QF/va.h" #include "QF/va.h"
#include "QF/vid.h" #include "QF/vid.h"
#include "QF/GL/defines.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])); targa = LoadImage (name = va ("env/%s%s", skyname, suf[i]));
if (!targa || targa->format < 3) { // FIXME Can't do PCX right now 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 // also look in gfx/env, where Darkplaces looks for skies
targa = LoadImage (name = va ("gfx/env/%s%s", skyname, suf[i])); targa = LoadImage (name = va ("gfx/env/%s%s", skyname, suf[i]));
if (!targa) { if (!targa) {
Con_DPrintf ("Couldn't load %s\n", name); Sys_DPrintf ("Couldn't load %s\n", name);
skyloaded = false; skyloaded = false;
continue; continue;
} }
@ -169,7 +169,7 @@ R_LoadSkys (const char *skyname)
#endif #endif
} }
if (!skyloaded) 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 static void

View file

@ -42,7 +42,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <stdio.h> #include <stdio.h>
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/crc.h" #include "QF/crc.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/draw.h" #include "QF/draw.h"
@ -197,10 +196,10 @@ GL_TextureMode_f (void)
if (Cmd_Argc () == 1) { if (Cmd_Argc () == 1) {
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
if (gl_filter_min == modes[i].minimize) { if (gl_filter_min == modes[i].minimize) {
Con_Printf ("%s\n", modes[i].name); Sys_Printf ("%s\n", modes[i].name);
return; return;
} }
Con_Printf ("current filter is unknown?\n"); Sys_Printf ("current filter is unknown?\n");
return; return;
} }
@ -210,7 +209,7 @@ GL_TextureMode_f (void)
} }
if (i == 6) { if (i == 6) {
Con_Printf ("bad filter name\n"); Sys_Printf ("bad filter name\n");
return; return;
} }
@ -240,10 +239,10 @@ GL_TextureDepth_f (int format)
for (i = 0; i < 42; i++) { for (i = 0; i < 42; i++) {
if (format == formats[i].format) { if (format == formats[i].format) {
Con_Printf ("%s\n", formats[i].name); Sys_Printf ("%s\n", formats[i].name);
return GL_RGBA; return GL_RGBA;
} }
Con_Printf ("Current texture format is unknown.\n"); Sys_Printf ("Current texture format is unknown.\n");
return GL_RGBA; return GL_RGBA;
} }
@ -253,7 +252,7 @@ GL_TextureDepth_f (int format)
} }
if (formats[i].format == 0) { if (formats[i].format == 0) {
Con_Printf ("bad texture format name\n"); Sys_Printf ("bad texture format name\n");
return GL_RGBA; return GL_RGBA;
} }

View file

@ -39,11 +39,11 @@ static __attribute__ ((used)) const char rcsid[] =
#endif #endif
#include <stdlib.h> #include <stdlib.h>
#include "QF/console.h"
#include "QF/draw.h" #include "QF/draw.h"
#include "QF/hash.h" #include "QF/hash.h"
#include "QF/progs.h" #include "QF/progs.h"
#include "QF/render.h" #include "QF/render.h"
#include "QF/sys.h"
typedef struct { typedef struct {
int width; int width;
@ -84,7 +84,7 @@ bi_Draw_CachePic (progs_t *pr)
qpic_res_t *rpic = Hash_Find (res->pic_hash, path); qpic_res_t *rpic = Hash_Find (res->pic_hash, path);
if (!pic) { if (!pic) {
Con_DPrintf ("can't load %s\n", path); Sys_DPrintf ("can't load %s\n", path);
R_INT (pr) = 0; R_INT (pr) = 0;
return; return;
} }

View file

@ -39,7 +39,6 @@ static __attribute__ ((used)) const char rcsid[] =
#endif #endif
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/draw.h" #include "QF/draw.h"
#include "QF/image.h" #include "QF/image.h"
@ -83,7 +82,7 @@ static __attribute__ ((used)) const char rcsid[] =
CenterPrint () CenterPrint ()
SlowPrint () SlowPrint ()
Screen_Update (); Screen_Update ();
Con_Printf (); Sys_Printf ();
net net
turn off messages option turn off messages option

View file

@ -38,7 +38,6 @@ static __attribute__ ((used)) const char rcsid[] =
# include <strings.h> # include <strings.h>
#endif #endif
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/draw.h" #include "QF/draw.h"
#include "QF/quakefs.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 if (x < 0 || x + w > (int) vid.width
|| y < 0 || y + h > (int) vid.height) { || 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; return;
} }

View file

@ -40,7 +40,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <time.h> #include <time.h>
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/draw.h" #include "QF/draw.h"
#include "QF/dstring.h" #include "QF/dstring.h"
@ -163,7 +162,7 @@ SCR_ScreenShot_f (void)
// find a file name to save it to // find a file name to save it to
if (!QFS_NextFilename (pcxname, if (!QFS_NextFilename (pcxname,
va ("%s/qf", qfs_gamedir->dir.def), ".pcx")) { 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 { } else {
// enable direct drawing of console to back buffer // enable direct drawing of console to back buffer
D_EnableBackBufferAccess (); D_EnableBackBufferAccess ();
@ -178,7 +177,7 @@ SCR_ScreenShot_f (void)
// time // time
D_DisableBackBufferAccess (); 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); dstring_delete (pcxname);
} }

View file

@ -35,7 +35,6 @@ static __attribute__ ((used)) const char rcsid[] =
# include <stdint.h> # include <stdint.h>
#endif #endif
#include "QF/console.h"
#include "QF/image.h" #include "QF/image.h"
#include "QF/render.h" #include "QF/render.h"
#include "QF/skin.h" #include "QF/skin.h"
@ -118,7 +117,7 @@ R_AliasCheckBBox (void)
frame = currententity->frame; frame = currententity->frame;
// TODO: don't repeat this check when drawing? // TODO: don't repeat this check when drawing?
if ((frame >= pmdl->numframes) || (frame < 0)) { 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; frame = 0;
} }
@ -563,7 +562,7 @@ R_AliasSetupSkin (void)
skinnum = currententity->skinnum; skinnum = currententity->skinnum;
if ((skinnum >= pmdl->numskins) || (skinnum < 0)) { 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; skinnum = 0;
} }
@ -656,7 +655,7 @@ R_AliasSetupFrame (void)
frame = currententity->frame; frame = currententity->frame;
if ((frame >= pmdl->numframes) || (frame < 0)) { 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; frame = 0;
} }

View file

@ -33,7 +33,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <math.h> #include <math.h>
#include "QF/console.h"
#include "QF/render.h" #include "QF/render.h"
#include "QF/sys.h" #include "QF/sys.h"
@ -216,7 +215,7 @@ R_RecursiveClipBPoly (bedge_t *pedges, mnode_t *pnode, msurface_t *psurf)
// and exiting points // and exiting points
// FIXME: share the clip edge by having a winding direction flag? // FIXME: share the clip edge by having a winding direction flag?
if (numbedges >= (MAX_BMODEL_EDGES - 1)) { if (numbedges >= (MAX_BMODEL_EDGES - 1)) {
Con_Printf ("Out of edges for bmodel\n"); Sys_Printf ("Out of edges for bmodel\n");
return; return;
} }
@ -253,7 +252,7 @@ R_RecursiveClipBPoly (bedge_t *pedges, mnode_t *pnode, msurface_t *psurf)
// plane to both sides (but in opposite directions) // plane to both sides (but in opposite directions)
if (makeclippededge) { if (makeclippededge) {
if (numbedges >= (MAX_BMODEL_EDGES - 2)) { if (numbedges >= (MAX_BMODEL_EDGES - 2)) {
Con_Printf ("Out of edges for bmodel\n"); Sys_Printf ("Out of edges for bmodel\n");
return; return;
} }

View file

@ -47,7 +47,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <math.h> #include <math.h>
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/locs.h" #include "QF/locs.h"
#include "QF/mathlib.h" #include "QF/mathlib.h"
@ -862,10 +861,10 @@ R_RenderView_ (void)
R_PrintDSpeeds (); R_PrintDSpeeds ();
if (r_reportsurfout->int_val && r_outofsurfaces) 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) 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 // back to high floating-point precision
R_HighFPPrecision (); R_HighFPPrecision ();

View file

@ -32,7 +32,6 @@ static __attribute__ ((used)) const char rcsid[] =
"$Id$"; "$Id$";
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/draw.h" #include "QF/draw.h"
#include "QF/render.h" #include "QF/render.h"
@ -81,7 +80,7 @@ R_TimeRefresh_f (void)
} }
stop = Sys_DoubleTime (); stop = Sys_DoubleTime ();
time = stop - start; 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; r_refdef.viewangles[1] = startangle;
} }
@ -90,7 +89,7 @@ void
R_LoadSky_f (void) R_LoadSky_f (void)
{ {
if (Cmd_Argc () != 2) { if (Cmd_Argc () != 2) {
Con_Printf ("loadsky <name> : load a skybox\n"); Sys_Printf ("loadsky <name> : load a skybox\n");
return; return;
} }
@ -107,7 +106,7 @@ R_PrintTimes (void)
ms = 1000 * (r_time2 - r_time1); 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); ms, c_faceclip, r_polycount, r_drawnpolycount, c_surf);
c_surf = 0; c_surf = 0;
} }
@ -129,7 +128,7 @@ R_PrintDSpeeds (void)
dv_time = (dv_time2 - dv_time1) * 1000; dv_time = (dv_time2 - dv_time1) * 1000;
ms = (r_time2 - r_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, (int) ms, dp_time, (int) rw_time, db_time, (int) se_time,
de_time, dv_time); de_time, dv_time);
} }
@ -137,7 +136,7 @@ R_PrintDSpeeds (void)
void void
R_PrintAliasStats (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 void
@ -225,7 +224,7 @@ R_SetupFrame (void)
if ((surface_p - surfaces) > r_maxsurfsseen) if ((surface_p - surfaces) > r_maxsurfsseen)
r_maxsurfsseen = surface_p - surfaces; 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)(surface_p - surfaces),
(long)(surf_max - surfaces), r_maxsurfsseen); (long)(surf_max - surfaces), r_maxsurfsseen);
} }
@ -236,7 +235,7 @@ R_SetupFrame (void)
if (edgecount > r_maxedgesseen) if (edgecount > r_maxedgesseen)
r_maxedgesseen = edgecount; 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); r_numallocatededges, r_maxedgesseen);
} }

View file

@ -33,11 +33,11 @@ static __attribute__ ((used)) const char rcsid[] =
#include <stdlib.h> #include <stdlib.h>
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/qargs.h" #include "QF/qargs.h"
#include "QF/quakefs.h" #include "QF/quakefs.h"
#include "QF/render.h" #include "QF/render.h"
#include "QF/sys.h"
#include "compat.h" #include "compat.h"
#include "r_cvar.h" #include "r_cvar.h"
@ -81,11 +81,11 @@ R_ReadPointFile_f (void)
QFS_FOpenFile (name, &f); QFS_FOpenFile (name, &f);
if (!f) { if (!f) {
Con_Printf ("couldn't open %s\n", name); Sys_Printf ("couldn't open %s\n", name);
return; return;
} }
Con_Printf ("Reading %s...\n", name); Sys_Printf ("Reading %s...\n", name);
c = 0; c = 0;
for (;;) { for (;;) {
char buf[64]; char buf[64];
@ -97,7 +97,7 @@ R_ReadPointFile_f (void)
c++; c++;
if (!free_particles) { if (!free_particles) {
Con_Printf ("Not enough free particles\n"); Sys_Printf ("Not enough free particles\n");
break; break;
} }
p = free_particles; p = free_particles;
@ -113,7 +113,7 @@ R_ReadPointFile_f (void)
} }
Qclose (f); Qclose (f);
Con_Printf ("%i points read\n", c); Sys_Printf ("%i points read\n", c);
} }
static void static void
@ -818,7 +818,7 @@ R_DrawParticles (void)
p->vel[2] -= grav; p->vel[2] -= grav;
break; break;
default: default:
Con_DPrintf ("unhandled particle type %d\n", p->type); Sys_DPrintf ("unhandled particle type %d\n", p->type);
break; break;
} }
} }

View file

@ -40,7 +40,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <math.h> #include <math.h>
#include "QF/console.h"
#include "QF/render.h" #include "QF/render.h"
#include "QF/sys.h" #include "QF/sys.h"
@ -253,7 +252,7 @@ R_GetSpriteframe (msprite_t *psprite)
frame = currententity->frame; frame = currententity->frame;
if ((frame >= psprite->numframes) || (frame < 0)) { 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; frame = 0;
} }

View file

@ -38,7 +38,6 @@ static __attribute__ ((used)) const char rcsid[] =
# include <strings.h> # include <strings.h>
#endif #endif
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/draw.h" #include "QF/draw.h"
#include "QF/quakefs.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 if (x < 0 || x + w > (int) vid.width
|| y < 0 || y + h > (int) vid.height) { || 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; return;
} }

View file

@ -40,7 +40,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <time.h> #include <time.h>
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/draw.h" #include "QF/draw.h"
#include "QF/dstring.h" #include "QF/dstring.h"
@ -172,7 +171,7 @@ SCR_ScreenShot_f (void)
// find a file name to save it to // find a file name to save it to
if (!QFS_NextFilename (pcxname, if (!QFS_NextFilename (pcxname,
va ("%s/qf", qfs_gamedir->dir.def), ".pcx")) { 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 { } else {
// enable direct drawing of console to back buffer // enable direct drawing of console to back buffer
D_EnableBackBufferAccess (); D_EnableBackBufferAccess ();
@ -184,10 +183,10 @@ SCR_ScreenShot_f (void)
vid.basepal, false, &pcx_len); vid.basepal, false, &pcx_len);
break; break;
case 2: case 2:
Con_Printf("SCR_ScreenShot_f: FIXME - add 16bit support\n"); Sys_Printf("SCR_ScreenShot_f: FIXME - add 16bit support\n");
break; break;
case 4: case 4:
Con_Printf("SCR_ScreenShot_f: FIXME - add 32bit support\n"); Sys_Printf("SCR_ScreenShot_f: FIXME - add 32bit support\n");
break; break;
default: default:
Sys_Error("SCR_ScreenShot_f: unsupported r_pixbytes %i", r_pixbytes); Sys_Error("SCR_ScreenShot_f: unsupported r_pixbytes %i", r_pixbytes);
@ -198,7 +197,7 @@ SCR_ScreenShot_f (void)
if (pcx) { if (pcx) {
QFS_WriteFile (pcxname->str, pcx, pcx_len); 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); dstring_delete (pcxname);

View file

@ -35,7 +35,6 @@ static __attribute__ ((used)) const char rcsid[] =
# include <stdint.h> # include <stdint.h>
#endif #endif
#include "QF/console.h"
#include "QF/image.h" #include "QF/image.h"
#include "QF/render.h" #include "QF/render.h"
#include "QF/skin.h" #include "QF/skin.h"
@ -118,7 +117,7 @@ R_AliasCheckBBox (void)
frame = currententity->frame; frame = currententity->frame;
// TODO: don't repeat this check when drawing? // TODO: don't repeat this check when drawing?
if ((frame >= pmdl->numframes) || (frame < 0)) { 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; frame = 0;
} }
@ -558,7 +557,7 @@ R_AliasSetupSkin (void)
skinnum = currententity->skinnum; skinnum = currententity->skinnum;
if ((skinnum >= pmdl->numskins) || (skinnum < 0)) { 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; skinnum = 0;
} }
@ -651,7 +650,7 @@ R_AliasSetupFrame (void)
frame = currententity->frame; frame = currententity->frame;
if ((frame >= pmdl->numframes) || (frame < 0)) { 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; frame = 0;
} }

View file

@ -33,7 +33,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <math.h> #include <math.h>
#include "QF/console.h"
#include "QF/render.h" #include "QF/render.h"
#include "QF/sys.h" #include "QF/sys.h"
@ -216,7 +215,7 @@ R_RecursiveClipBPoly (bedge_t *pedges, mnode_t *pnode, msurface_t *psurf)
// and exiting points // and exiting points
// FIXME: share the clip edge by having a winding direction flag? // FIXME: share the clip edge by having a winding direction flag?
if (numbedges >= (MAX_BMODEL_EDGES - 1)) { if (numbedges >= (MAX_BMODEL_EDGES - 1)) {
Con_Printf ("Out of edges for bmodel\n"); Sys_Printf ("Out of edges for bmodel\n");
return; return;
} }
@ -253,7 +252,7 @@ R_RecursiveClipBPoly (bedge_t *pedges, mnode_t *pnode, msurface_t *psurf)
// plane to both sides (but in opposite directions) // plane to both sides (but in opposite directions)
if (makeclippededge) { if (makeclippededge) {
if (numbedges >= (MAX_BMODEL_EDGES - 2)) { if (numbedges >= (MAX_BMODEL_EDGES - 2)) {
Con_Printf ("Out of edges for bmodel\n"); Sys_Printf ("Out of edges for bmodel\n");
return; return;
} }

View file

@ -44,7 +44,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <math.h> #include <math.h>
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/locs.h" #include "QF/locs.h"
#include "QF/mathlib.h" #include "QF/mathlib.h"
@ -879,10 +878,10 @@ R_RenderView_ (void)
R_PrintDSpeeds (); R_PrintDSpeeds ();
if (r_reportsurfout->int_val && r_outofsurfaces) 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) 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 VISIBLE void

View file

@ -32,7 +32,6 @@ static __attribute__ ((used)) const char rcsid[] =
"$Id$"; "$Id$";
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/draw.h" #include "QF/draw.h"
#include "QF/render.h" #include "QF/render.h"
@ -81,7 +80,7 @@ R_TimeRefresh_f (void)
} }
stop = Sys_DoubleTime (); stop = Sys_DoubleTime ();
time = stop - start; 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; r_refdef.viewangles[1] = startangle;
} }
@ -90,7 +89,7 @@ void
R_LoadSky_f (void) R_LoadSky_f (void)
{ {
if (Cmd_Argc () != 2) { if (Cmd_Argc () != 2) {
Con_Printf ("loadsky <name> : load a skybox\n"); Sys_Printf ("loadsky <name> : load a skybox\n");
return; return;
} }
@ -107,7 +106,7 @@ R_PrintTimes (void)
ms = 1000 * (r_time2 - r_time1); 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); ms, c_faceclip, r_polycount, r_drawnpolycount, c_surf);
c_surf = 0; c_surf = 0;
} }
@ -129,7 +128,7 @@ R_PrintDSpeeds (void)
dv_time = (dv_time2 - dv_time1) * 1000; dv_time = (dv_time2 - dv_time1) * 1000;
ms = (r_time2 - r_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, (int) ms, dp_time, (int) rw_time, db_time, (int) se_time,
de_time, dv_time); de_time, dv_time);
} }
@ -137,7 +136,7 @@ R_PrintDSpeeds (void)
void void
R_PrintAliasStats (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 void
@ -219,7 +218,7 @@ R_SetupFrame (void)
if ((surface_p - surfaces) > r_maxsurfsseen) if ((surface_p - surfaces) > r_maxsurfsseen)
r_maxsurfsseen = surface_p - surfaces; 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) (surface_p - surfaces),
(long) (surf_max - surfaces), r_maxsurfsseen); (long) (surf_max - surfaces), r_maxsurfsseen);
} }
@ -230,7 +229,7 @@ R_SetupFrame (void)
if (edgecount > r_maxedgesseen) if (edgecount > r_maxedgesseen)
r_maxedgesseen = edgecount; 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); r_numallocatededges, r_maxedgesseen);
} }

View file

@ -33,11 +33,11 @@ static __attribute__ ((used)) const char rcsid[] =
#include <stdlib.h> #include <stdlib.h>
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/qargs.h" #include "QF/qargs.h"
#include "QF/quakefs.h" #include "QF/quakefs.h"
#include "QF/render.h" #include "QF/render.h"
#include "QF/sys.h"
#include "compat.h" #include "compat.h"
#include "r_cvar.h" #include "r_cvar.h"
@ -82,11 +82,11 @@ R_ReadPointFile_f (void)
QFS_FOpenFile (name, &f); QFS_FOpenFile (name, &f);
if (!f) { if (!f) {
Con_Printf ("couldn't open %s\n", name); Sys_Printf ("couldn't open %s\n", name);
return; return;
} }
Con_Printf ("Reading %s...\n", name); Sys_Printf ("Reading %s...\n", name);
c = 0; c = 0;
for (;;) { for (;;) {
char buf[64]; char buf[64];
@ -98,7 +98,7 @@ R_ReadPointFile_f (void)
c++; c++;
if (!free_particles) { if (!free_particles) {
Con_Printf ("Not enough free particles\n"); Sys_Printf ("Not enough free particles\n");
break; break;
} }
p = free_particles; p = free_particles;
@ -114,7 +114,7 @@ R_ReadPointFile_f (void)
} }
Qclose (f); Qclose (f);
Con_Printf ("%i points read\n", c); Sys_Printf ("%i points read\n", c);
} }
static void static void
@ -828,7 +828,7 @@ R_DrawParticles (void)
p->vel[2] -= grav; p->vel[2] -= grav;
break; break;
default: default:
Con_DPrintf ("unhandled particle type %d\n", p->type); Sys_DPrintf ("unhandled particle type %d\n", p->type);
break; break;
} }
} }

View file

@ -40,7 +40,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <math.h> #include <math.h>
#include "QF/console.h"
#include "QF/render.h" #include "QF/render.h"
#include "QF/sys.h" #include "QF/sys.h"
@ -246,7 +245,7 @@ R_GetSpriteframe (msprite_t *psprite)
frame = currententity->frame; frame = currententity->frame;
if ((frame >= psprite->numframes) || (frame < 0)) { 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; frame = 0;
} }

View file

@ -15,9 +15,9 @@ static __attribute__ ((used)) const char rcsid[] =
#include <stdlib.h> #include <stdlib.h>
#include <SDL.h> #include <SDL.h>
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/input.h" #include "QF/input.h"
#include "QF/sys.h"
#include "QF/va.h" #include "QF/va.h"
#include "QF/vid.h" #include "QF/vid.h"
@ -72,7 +72,7 @@ VID_UpdateFullscreen (cvar_t *vid_fullscreen)
if ((vid_fullscreen->int_val && !(screen->flags & SDL_FULLSCREEN)) if ((vid_fullscreen->int_val && !(screen->flags & SDL_FULLSCREEN))
|| (!vid_fullscreen->int_val && screen->flags & SDL_FULLSCREEN)) || (!vid_fullscreen->int_val && screen->flags & SDL_FULLSCREEN))
if (!SDL_WM_ToggleFullScreen (screen)) 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); IN_UpdateGrab (in_grab);
} }

View file

@ -63,7 +63,6 @@ static __attribute__ ((used)) const char rcsid[] =
# include <X11/extensions/xf86vmode.h> # include <X11/extensions/xf86vmode.h>
#endif #endif
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/input.h" #include "QF/input.h"
#include "QF/qargs.h" #include "QF/qargs.h"
@ -129,7 +128,7 @@ configure_notify (XEvent *event)
if (vidmode_active) if (vidmode_active)
X11_ForceViewPort (); X11_ForceViewPort ();
#endif #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->serial, c->send_event, c->event, c->window, c->x, c->y,
c->width, c->height, c->border_width, c->above, c->width, c->height, c->border_width, c->above,
c->override_redirect); c->override_redirect);
@ -139,7 +138,7 @@ qboolean
X11_AddEvent (int event, void (*event_handler) (XEvent *)) X11_AddEvent (int event, void (*event_handler) (XEvent *))
{ {
if (event >= LASTEvent) { if (event >= LASTEvent) {
Sys_Printf ("event: %d, LASTEvent: %d\n", event, LASTEvent); Sys_DPrintf ("event: %d, LASTEvent: %d\n", event, LASTEvent);
return false; return false;
} }
@ -430,7 +429,7 @@ X11_SetVidMode (int width, int height)
} }
if (found_mode) { 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); scr_height);
XF86VidModeSwitchToMode (x_disp, x_screen, XF86VidModeSwitchToMode (x_disp, x_screen,
@ -438,7 +437,7 @@ X11_SetVidMode (int width, int height)
vidmode_active = true; vidmode_active = true;
X11_SetScreenSaver (); X11_SetScreenSaver ();
} else { } 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); scr_width, scr_height);
vidmode_avail = vidmode_active = false; vidmode_avail = vidmode_active = false;
} }

View file

@ -53,7 +53,7 @@ static __attribute__ ((used)) const char rcsid[] =
# include <X11/extensions/xf86vmstr.h> # include <X11/extensions/xf86vmstr.h>
#endif #endif
#include "QF/console.h" #include "QF/sys.h"
#include "dga_check.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)) { 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); *min_ver);
return false; 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) if (!hasvideo)
hasvideo = &dummy_video; hasvideo = &dummy_video;
@ -142,12 +142,12 @@ VID_CheckVMode (Display * dpy, int *maj_ver, int *min_ver)
return false; return false;
if ((!maj_ver) || (*maj_ver != XF86VIDMODE_MAJOR_VERSION)) { 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); *min_ver);
return false; 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; return true;
#else #else
return false; return false;

View file

@ -50,13 +50,13 @@ static __attribute__ ((used)) const char rcsid[] =
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/in_event.h" #include "QF/in_event.h"
#include "QF/input.h" #include "QF/input.h"
#include "QF/joystick.h" #include "QF/joystick.h"
#include "QF/keys.h" #include "QF/keys.h"
#include "QF/mathlib.h" #include "QF/mathlib.h"
#include "QF/sys.h"
#include "QF/vid.h" #include "QF/vid.h"
VISIBLE viewdelta_t viewdelta; VISIBLE viewdelta_t viewdelta;
@ -135,7 +135,7 @@ IN_Shutdown (void)
{ {
JOY_Shutdown (); JOY_Shutdown ();
Con_Printf ("IN_Shutdown\n"); Sys_Printf ("IN_Shutdown\n");
IN_LL_Shutdown (); IN_LL_Shutdown ();
IE_Shutdown (); IE_Shutdown ();

View file

@ -51,7 +51,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <vgamouse.h> #include <vgamouse.h>
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/input.h" #include "QF/input.h"
#include "QF/joystick.h" #include "QF/joystick.h"
@ -116,7 +115,7 @@ keyhandler (int scancode, int state)
default: default:
break; 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, ascii > 32 && ascii < 127 ? ascii : '#');
Key_Event (key, ascii, press); Key_Event (key, ascii, press);
} }
@ -394,7 +393,7 @@ IN_InitMouse (void)
// closing it to ensure its opened how we want it // closing it to ensure its opened how we want it
mouse_close(); mouse_close();
if (mouse_init ((char *)mousedev, mtype, mouserate)) { 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" " and that the mouse\n"
"device has appropriate permission settings.\n"); "device has appropriate permission settings.\n");
UseMouse = 0; UseMouse = 0;
@ -407,7 +406,7 @@ IN_InitMouse (void)
void void
IN_LL_Shutdown (void) IN_LL_Shutdown (void)
{ {
Con_Printf ("IN_LL_Shutdown\n"); Sys_Printf ("IN_LL_Shutdown\n");
if (UseMouse) if (UseMouse)
mouse_close (); mouse_close ();

View file

@ -41,7 +41,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <dinput.h> #include <dinput.h>
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/input.h" #include "QF/input.h"
#include "QF/keys.h" #include "QF/keys.h"
@ -224,7 +223,7 @@ IN_InitDInput (void)
hInstDI = LoadLibrary ("dinput.dll"); hInstDI = LoadLibrary ("dinput.dll");
if (hInstDI == NULL) { if (hInstDI == NULL) {
Con_Printf ("Couldn't load dinput.dll\n"); Sys_Printf ("Couldn't load dinput.dll\n");
return false; return false;
} }
} }
@ -234,7 +233,7 @@ IN_InitDInput (void)
(void *) GetProcAddress (hInstDI, "DirectInputCreateA"); (void *) GetProcAddress (hInstDI, "DirectInputCreateA");
if (!pDirectInputCreate) { if (!pDirectInputCreate) {
Con_Printf ("Couldn't get DI proc addr\n"); Sys_Printf ("Couldn't get DI proc addr\n");
return false; return false;
} }
} }
@ -248,14 +247,14 @@ IN_InitDInput (void)
hr = IDirectInput_CreateDevice (g_pdi, &GUID_SysMouse, &g_pMouse, NULL); hr = IDirectInput_CreateDevice (g_pdi, &GUID_SysMouse, &g_pMouse, NULL);
if (FAILED (hr)) { if (FAILED (hr)) {
Con_Printf ("Couldn't open DI mouse device\n"); Sys_Printf ("Couldn't open DI mouse device\n");
return false; return false;
} }
// set the data format to "mouse format". // set the data format to "mouse format".
hr = IDirectInputDevice_SetDataFormat (g_pMouse, &df); hr = IDirectInputDevice_SetDataFormat (g_pMouse, &df);
if (FAILED (hr)) { if (FAILED (hr)) {
Con_Printf ("Couldn't set DI mouse format\n"); Sys_Printf ("Couldn't set DI mouse format\n");
return false; return false;
} }
// set the cooperativity level. // set the cooperativity level.
@ -264,7 +263,7 @@ IN_InitDInput (void)
DISCL_FOREGROUND); DISCL_FOREGROUND);
if (FAILED (hr)) { if (FAILED (hr)) {
Con_Printf ("Couldn't set DI coop level\n"); Sys_Printf ("Couldn't set DI coop level\n");
return false; return false;
} }
@ -274,7 +273,7 @@ IN_InitDInput (void)
&dipdw.diph); &dipdw.diph);
if (FAILED (hr)) { if (FAILED (hr)) {
Con_Printf ("Couldn't set DI buffersize\n"); Sys_Printf ("Couldn't set DI buffersize\n");
return false; return false;
} }
@ -295,9 +294,9 @@ IN_StartupMouse (void)
dinput = IN_InitDInput (); dinput = IN_InitDInput ();
if (dinput) { if (dinput) {
Con_Printf ("DirectInput initialized\n"); Sys_Printf ("DirectInput initialized\n");
} else { } 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; 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 : '#'); key, uc > 32 && uc < 127 ? uc : '#');
*k = key; *k = key;
*u = uc; *u = uc;

View file

@ -60,7 +60,6 @@ static __attribute__ ((used)) const char rcsid[] =
#endif #endif
#include "QF/cdaudio.h" #include "QF/cdaudio.h"
#include "QF/console.h"
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/input.h" #include "QF/input.h"
@ -591,7 +590,7 @@ grab_error (int code, const char *device)
reason = "unknown reason"; reason = "unknown reason";
break; break;
} }
Con_Printf ("failed to grab %s: %s\n", device, reason); Sys_Printf ("failed to grab %s: %s\n", device, reason);
} }
void void
@ -645,7 +644,7 @@ IN_LL_ProcessEvents (void)
void void
IN_LL_Shutdown (void) IN_LL_Shutdown (void)
{ {
Con_Printf ("IN_LL_Shutdown\n"); Sys_Printf ("IN_LL_Shutdown\n");
in_mouse_avail = 0; in_mouse_avail = 0;
if (x_disp) { if (x_disp) {
XAutoRepeatOn (x_disp); XAutoRepeatOn (x_disp);

View file

@ -33,12 +33,12 @@
static __attribute__ ((used)) const char rcsid[] = static __attribute__ ((used)) const char rcsid[] =
"$Id$"; "$Id$";
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/input.h" #include "QF/input.h"
#include "QF/joystick.h" #include "QF/joystick.h"
#include "QF/keys.h" #include "QF/keys.h"
#include "QF/mathlib.h" #include "QF/mathlib.h"
#include "QF/sys.h"
#include "QF/va.h" #include "QF/va.h"
#include "compat.h" #include "compat.h"
@ -155,7 +155,7 @@ JOY_Init (void)
int i; int i;
if (JOY_Open () == -1) { if (JOY_Open () == -1) {
Con_Printf ("JOY: Joystick not found.\n"); Sys_Printf ("JOY: Joystick not found.\n");
joy_found = false; joy_found = false;
joy_active = false; joy_active = false;
return; return;
@ -164,12 +164,12 @@ JOY_Init (void)
joy_found = true; joy_found = true;
if (!joy_enable->int_val) { 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_active = false;
JOY_Close (); JOY_Close ();
} }
Con_Printf ("JOY: Joystick found and activated.\n"); Sys_Printf ("JOY: Joystick found and activated.\n");
// Initialize joystick if found and enabled // Initialize joystick if found and enabled
for (i = 0; i < JOY_MAX_BUTTONS; i++) { for (i = 0; i < JOY_MAX_BUTTONS; i++) {

View file

@ -36,11 +36,11 @@ static __attribute__ ((used)) const char rcsid[] =
#include <unistd.h> #include <unistd.h>
#include <linux/joystick.h> #include <linux/joystick.h>
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/joystick.h" #include "QF/joystick.h"
#include "QF/keys.h" #include "QF/keys.h"
#include "QF/qtypes.h" #include "QF/qtypes.h"
#include "QF/sys.h"
// Variables and structures for this driver // Variables and structures for this driver
int joy_handle; int joy_handle;
@ -99,8 +99,8 @@ JOY_Close (void)
i = close (joy_handle); i = close (joy_handle);
if (i) { if (i) {
Con_Printf ("JOY: Failed to close joystick device!\n"); Sys_Printf ("JOY: Failed to close joystick device!\n");
} else { } else {
Con_Printf ("JOY_Shutdown\n"); Sys_Printf ("JOY_Shutdown\n");
} }
} }

View file

@ -39,12 +39,12 @@ static __attribute__ ((used)) const char rcsid[] =
#include "winquake.h" #include "winquake.h"
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/input.h" #include "QF/input.h"
#include "QF/joystick.h" #include "QF/joystick.h"
#include "QF/keys.h" #include "QF/keys.h"
#include "QF/qargs.h" #include "QF/qargs.h"
#include "QF/sys.h"
#include "compat.h" #include "compat.h"
@ -149,13 +149,13 @@ _JOY_Read (void)
ji.dwUpos += 100; ji.dwUpos += 100;
} }
if (joy_debug->int_val) { if (joy_debug->int_val) {
if (ji.dwXpos) Con_Printf("X: %ld\n",ji.dwXpos); if (ji.dwXpos) Sys_Printf("X: %ld\n",ji.dwXpos);
if (ji.dwYpos) Con_Printf("Y: %ld\n",ji.dwYpos); if (ji.dwYpos) Sys_Printf("Y: %ld\n",ji.dwYpos);
if (ji.dwZpos) Con_Printf("Z: %ld\n",ji.dwZpos); if (ji.dwZpos) Sys_Printf("Z: %ld\n",ji.dwZpos);
if (ji.dwRpos) Con_Printf("R: %ld\n",ji.dwRpos); if (ji.dwRpos) Sys_Printf("R: %ld\n",ji.dwRpos);
if (ji.dwUpos) Con_Printf("U: %ld\n",ji.dwUpos); if (ji.dwUpos) Sys_Printf("U: %ld\n",ji.dwUpos);
if (ji.dwVpos) Con_Printf("V: %ld\n",ji.dwVpos); if (ji.dwVpos) Sys_Printf("V: %ld\n",ji.dwVpos);
if (ji.dwButtons) Con_Printf("B: %ld\n",ji.dwButtons); if (ji.dwButtons) Sys_Printf("B: %ld\n",ji.dwButtons);
} }
return true; return true;
} else { // read error } else { // read error
@ -233,7 +233,7 @@ JOY_StartupJoystick (void)
// verify joystick driver is present // verify joystick driver is present
if ((numdevs = joyGetNumDevs ()) == 0) { 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; return -1;
} }
// cycle through the joystick ids for the first valid one // 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 // abort startup if we didn't find a valid joystick
if (mmr != JOYERR_NOERROR) { 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); mmr);
return -1; return -1;
} }
@ -256,7 +256,7 @@ JOY_StartupJoystick (void)
// abort startup if command fails // abort startup if command fails
memset (&jc, 0, sizeof (jc)); memset (&jc, 0, sizeof (jc));
if ((mmr = joyGetDevCaps (joy_id, &jc, sizeof (jc))) != JOYERR_NOERROR) { if ((mmr = joyGetDevCaps (joy_id, &jc, sizeof (jc))) != JOYERR_NOERROR) {
Con_Printf Sys_Printf
("\njoystick not found -- invalid joystick capabilities (%x)\n\n", ("\njoystick not found -- invalid joystick capabilities (%x)\n\n",
mmr); mmr);
return -1; return -1;
@ -276,7 +276,7 @@ JOY_StartupJoystick (void)
joy_found = true; joy_found = true;
// FIXME: do this right // FIXME: do this right
joy_active = true; joy_active = true;
Con_Printf ("\njoystick detected\n\n"); Sys_Printf ("\njoystick detected\n\n");
return 0; return 0;
} }
@ -319,7 +319,7 @@ JOY_AdvancedUpdate_f (void)
} else { } else {
if (strcmp (joy_name->string, "joystick") != 0) { if (strcmp (joy_name->string, "joystick") != 0) {
// notify user of advanced controller // 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 // advanced initialization here
// data supplied by user via joy_axisn cvars // data supplied by user via joy_axisn cvars

View file

@ -403,7 +403,7 @@ Key_Game (knum_t key, short unicode)
kb = Key_GetBinding (IMT_0, key); 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); game_target, key_dest, key);
*/ */
if (!kb) if (!kb)
@ -535,13 +535,13 @@ Key_In_Unbind (const char *imt, const char *key)
t = Key_StringToIMTnum (imt); t = Key_StringToIMTnum (imt);
if (t == -1) { if (t == -1) {
Con_Printf ("\"%s\" isn't a valid imt\n", imt); Sys_Printf ("\"%s\" isn't a valid imt\n", imt);
return; return;
} }
b = Key_StringToKeynum (key); b = Key_StringToKeynum (key);
if (b == -1) { if (b == -1) {
Con_Printf ("\"%s\" isn't a valid key\n", key); Sys_Printf ("\"%s\" isn't a valid key\n", key);
return; return;
} }
@ -552,7 +552,7 @@ static void
Key_In_Unbind_f (void) Key_In_Unbind_f (void)
{ {
if (Cmd_Argc () != 3) { if (Cmd_Argc () != 3) {
Con_Printf ("in_unbind <imt> <key> : remove commands from a key\n"); Sys_Printf ("in_unbind <imt> <key> : remove commands from a key\n");
return; return;
} }
Key_In_Unbind (Cmd_Argv (1), Cmd_Argv (2)); 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); t = Key_StringToIMTnum (imt);
if (t == -1) { if (t == -1) {
Con_Printf ("\"%s\" isn't a valid imt\n", imt); Sys_Printf ("\"%s\" isn't a valid imt\n", imt);
return; return;
} }
b = Key_StringToKeynum (key); b = Key_StringToKeynum (key);
if (b == -1) { if (b == -1) {
Con_Printf ("\"%s\" isn't a valid key\n", key); Sys_Printf ("\"%s\" isn't a valid key\n", key);
return; return;
} }
if (!cmd) { if (!cmd) {
if (Key_GetBinding (t, b)) 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)); Key_GetBinding(t, b));
else else
Con_Printf ("%s %s is not bound\n", imt, key); Sys_Printf ("%s %s is not bound\n", imt, key);
return; return;
} }
Key_SetBinding (t, b, cmd); Key_SetBinding (t, b, cmd);
@ -606,7 +606,7 @@ Key_In_Bind_f (void)
c = Cmd_Argc (); c = Cmd_Argc ();
if (c < 3) { if (c < 3) {
Con_Printf ("in_bind <imt> <key> [command] : attach a command to a " Sys_Printf ("in_bind <imt> <key> [command] : attach a command to a "
"key\n"); "key\n");
return; return;
} }
@ -635,7 +635,7 @@ Key_Unbind_f (void)
const char *key; const char *key;
if (Cmd_Argc () != 2) { if (Cmd_Argc () != 2) {
Con_Printf ("unbind <key> : remove commands from a key\n"); Sys_Printf ("unbind <key> : remove commands from a key\n");
return; return;
} }
key = OK_TranslateKeyName (Cmd_Argv (1)); key = OK_TranslateKeyName (Cmd_Argv (1));
@ -652,7 +652,7 @@ Key_Bind_f (void)
c = Cmd_Argc (); c = Cmd_Argc ();
if (c < 2) { if (c < 2) {
Con_Printf ("bind <key> [command] : attach a command to a key\n"); Sys_Printf ("bind <key> [command] : attach a command to a key\n");
return; return;
} }
@ -710,7 +710,7 @@ static void
in_bind_imt_f (cvar_t *var) in_bind_imt_f (cvar_t *var)
{ {
if (Key_StringToIMTnum (var->string) == -1) { 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); var->string);
Cvar_Set (var, "imt_default"); Cvar_Set (var, "imt_default");
} }
@ -724,14 +724,14 @@ Key_InputMappingTable_f (void)
c = Cmd_Argc (); c = Cmd_Argc ();
if (c != 2) { if (c != 2) {
Con_Printf ("Current imt is %s\n", Key_IMTnumToString(game_target)); Sys_Printf ("Current imt is %s\n", Key_IMTnumToString(game_target));
Con_Printf ("imt <imt> : set to a specific input mapping table\n"); Sys_Printf ("imt <imt> : set to a specific input mapping table\n");
return; return;
} }
t = Key_StringToIMTnum (Cmd_Argv (1)); t = Key_StringToIMTnum (Cmd_Argv (1));
if (t == -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; return;
} }
@ -785,12 +785,12 @@ keyhelp_f (void)
VISIBLE void VISIBLE void
Key_Event (knum_t key, short unicode, qboolean down) 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) { if (down) {
keydown[key]++; keydown[key]++;
if (keyhelp) { 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)); Key_KeynumToString (key));
keyhelp = 0; keyhelp = 0;
return; // gobble the key return; // gobble the key

View file

@ -51,8 +51,8 @@ static __attribute__ ((used)) const char rcsid[] =
#include <ctype.h> #include <ctype.h>
#include <stdlib.h> #include <stdlib.h>
#include "QF/console.h"
#include "QF/hash.h" #include "QF/hash.h"
#include "QF/sys.h"
#include "old_keys.h" #include "old_keys.h"
@ -253,7 +253,7 @@ OK_TranslateKeyName (const char *name)
s++; s++;
ok = Hash_Find (old_key_table, uname); ok = Hash_Find (old_key_table, uname);
if (!ok) { if (!ok) {
Con_Printf ("unknown old keyname: %s\n", uname); Sys_Printf ("unknown old keyname: %s\n", uname);
return name; return name;
} }
return ok->new_name; return ok->new_name;

View file

@ -57,7 +57,6 @@ static __attribute__ ((used)) const char rcsid[] =
# include <strings.h> # include <strings.h>
#endif #endif
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/qtypes.h" #include "QF/qtypes.h"
#include "QF/sys.h" #include "QF/sys.h"
@ -72,20 +71,20 @@ QFGL_ProcAddress (void *handle, const char *name, qboolean crit)
{ {
void *glfunc = NULL; void *glfunc = NULL;
Con_DPrintf ("DEBUG: Finding symbol %s ... ", name); Sys_DPrintf ("DEBUG: Finding symbol %s ... ", name);
glfunc = QFGL_GetProcAddress (handle, name); glfunc = QFGL_GetProcAddress (handle, name);
if (glfunc) { if (glfunc) {
Con_DPrintf ("found [%p]\n", glfunc); Sys_DPrintf ("found [%p]\n", glfunc);
return glfunc; return glfunc;
} }
Con_DPrintf ("not found\n"); Sys_DPrintf ("not found\n");
if (crit) { if (crit) {
if (strncmp ("fxMesa", name, 6) == 0) { 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"); "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...", Sys_Error ("Couldn't load critical OpenGL function %s, exiting...",
name); name);

View file

@ -39,7 +39,6 @@ static __attribute__ ((used)) const char rcsid[] =
#endif #endif
#include <math.h> #include <math.h>
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/qargs.h" #include "QF/qargs.h"
#include "QF/sys.h" #include "QF/sys.h"
@ -174,13 +173,13 @@ VID_UpdateGamma (cvar_t *vid_gamma)
vid.recalc_refdef = 1; // force a surface cache flush vid.recalc_refdef = 1; // force a surface cache flush
if (vid_gamma_avail && vid_system_gamma->int_val) { // Have system, use it 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_BuildGammaTable (1.0); // hardware gamma wants a linear palette
VID_SetGamma (gamma); VID_SetGamma (gamma);
memcpy (vid.palette, vid.basepal, 256 * 3); memcpy (vid.palette, vid.basepal, 256 * 3);
} else { // We have to hack the palette } else { // We have to hack the palette
int i; int i;
Con_DPrintf ("Setting software gamma to %g\n", gamma); Sys_DPrintf ("Setting software gamma to %g\n", gamma);
VID_BuildGammaTable (gamma); VID_BuildGammaTable (gamma);
for (i = 0; i < 256 * 3; i++) for (i = 0; i < 256 * 3; i++)
vid.palette[i] = gammatable[vid.basepal[i]]; vid.palette[i] = gammatable[vid.basepal[i]];

View file

@ -45,7 +45,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <setjmp.h> #include <setjmp.h>
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/qargs.h" #include "QF/qargs.h"
#include "QF/qendian.h" #include "QF/qendian.h"
@ -176,20 +175,20 @@ GL_Init (void)
if (!(dither_select = QFGL_ExtensionAddress ("gl3DfxSetDitherModeEXT"))) if (!(dither_select = QFGL_ExtensionAddress ("gl3DfxSetDitherModeEXT")))
return; return;
Con_Printf ("Dithering: "); Sys_Printf ("Dithering: ");
if ((p = COM_CheckParm ("-dither")) && p < com_argc) { if ((p = COM_CheckParm ("-dither")) && p < com_argc) {
if (strequal (com_argv[p+1], "2x2")) { if (strequal (com_argv[p+1], "2x2")) {
dither_select (GR_DITHER_2x2); dither_select (GR_DITHER_2x2);
Con_Printf ("2x2.\n"); Sys_Printf ("2x2.\n");
} }
if (strequal (com_argv[p+1], "4x4")) { if (strequal (com_argv[p+1], "4x4")) {
dither_select (GR_DITHER_4x4); dither_select (GR_DITHER_4x4);
Con_Printf ("4x4.\n"); Sys_Printf ("4x4.\n");
} }
} else { } else {
qfglDisable (GL_DITHER); qfglDisable (GL_DITHER);
Con_Printf ("disabled.\n"); Sys_Printf ("disabled.\n");
} }
} }
@ -344,7 +343,7 @@ VID_Init (unsigned char *palette)
vid.initialized = true; 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 vid.recalc_refdef = 1; // force a surface cache flush
} }

View file

@ -42,7 +42,6 @@ static __attribute__ ((used)) const char rcsid[] =
# include <strings.h> # include <strings.h>
#endif #endif
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/input.h" #include "QF/input.h"
#include "QF/qargs.h" #include "QF/qargs.h"
@ -198,7 +197,7 @@ gl_multitexture_f (cvar_t *var)
qfglDisable (GL_TEXTURE_2D); qfglDisable (GL_TEXTURE_2D);
} else { } else {
gl_mtex_fullbright = false; gl_mtex_fullbright = false;
Con_Printf ("Not enough TMUs for BSP fullbrights.\n"); Sys_Printf ("Not enough TMUs for BSP fullbrights.\n");
} }
} }
} else { } else {
@ -248,7 +247,7 @@ gl_anisotropy_f (cvar_t * var)
} else { } else {
aniso = 1.0; aniso = 1.0;
if (var) 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"); "not supported by your hardware and/or drivers.\n");
} }
} }
@ -265,7 +264,7 @@ gl_tessellate_f (cvar_t * var)
} else { } else {
tess = 0; tess = 0;
if (var) 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"); "your hardware and/or drivers.\n");
} }
} }
@ -335,14 +334,14 @@ CheckGLVersionString (void)
} else { } else {
Sys_Error ("Malformed OpenGL version string!"); 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); 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); 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); 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")) if (strstr (gl_renderer, "Mesa DRI Mach64"))
gl_feature_mach64 = true; gl_feature_mach64 = true;
@ -377,14 +376,14 @@ CheckCombineExtensions (void)
{ {
if (gl_major >= 1 && gl_minor >= 3) { if (gl_major >= 1 && gl_minor >= 3) {
gl_combine_capable = true; 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")) { } else if (QFGL_ExtensionPresent ("GL_ARB_texture_env_combine")) {
gl_combine_capable = true; gl_combine_capable = true;
Con_Printf ("COMBINE_ARB active, multitextured doublebright " Sys_Printf ("COMBINE_ARB active, multitextured doublebright "
"enabled.\n"); "enabled.\n");
} else { } else {
gl_combine_capable = false; 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"); "will have no effect with gl_multitexture on.\n");
} }
} }
@ -397,15 +396,15 @@ CheckCombineExtensions (void)
static void static void
CheckMultiTextureExtensions (void) CheckMultiTextureExtensions (void)
{ {
Con_Printf ("Checking for multitexture: "); Sys_Printf ("Checking for multitexture: ");
if (COM_CheckParm ("-nomtex")) { if (COM_CheckParm ("-nomtex")) {
Con_Printf ("disabled.\n"); Sys_Printf ("disabled.\n");
return; return;
} }
if (gl_major >= 1 && gl_minor >= 3) { if (gl_major >= 1 && gl_minor >= 3) {
qfglGetIntegerv (GL_MAX_TEXTURE_UNITS, &gl_mtex_tmus); qfglGetIntegerv (GL_MAX_TEXTURE_UNITS, &gl_mtex_tmus);
if (gl_mtex_tmus >= 2) { if (gl_mtex_tmus >= 2) {
Con_Printf ("enabled, %d TMUs.\n", gl_mtex_tmus); Sys_Printf ("enabled, %d TMUs.\n", gl_mtex_tmus);
qglMultiTexCoord2f = qglMultiTexCoord2f =
QFGL_ExtensionAddress ("glMultiTexCoord2f"); QFGL_ExtensionAddress ("glMultiTexCoord2f");
qglMultiTexCoord2fv = qglMultiTexCoord2fv =
@ -415,15 +414,15 @@ CheckMultiTextureExtensions (void)
if (qglMultiTexCoord2f && gl_mtex_enum) if (qglMultiTexCoord2f && gl_mtex_enum)
gl_mtex_capable = true; gl_mtex_capable = true;
else else
Con_Printf ("Multitexture disabled, could not find required " Sys_Printf ("Multitexture disabled, could not find required "
"functions\n"); "functions\n");
} else { } else {
Con_Printf ("Multitexture disabled, not enough TMUs.\n"); Sys_Printf ("Multitexture disabled, not enough TMUs.\n");
} }
} else if (QFGL_ExtensionPresent ("GL_ARB_multitexture")) { } else if (QFGL_ExtensionPresent ("GL_ARB_multitexture")) {
qfglGetIntegerv (GL_MAX_TEXTURE_UNITS_ARB, &gl_mtex_tmus); qfglGetIntegerv (GL_MAX_TEXTURE_UNITS_ARB, &gl_mtex_tmus);
if (gl_mtex_tmus >= 2) { if (gl_mtex_tmus >= 2) {
Con_Printf ("enabled, %d TMUs.\n", gl_mtex_tmus); Sys_Printf ("enabled, %d TMUs.\n", gl_mtex_tmus);
qglMultiTexCoord2f = qglMultiTexCoord2f =
QFGL_ExtensionAddress ("glMultiTexCoord2fARB"); QFGL_ExtensionAddress ("glMultiTexCoord2fARB");
qglMultiTexCoord2fv = qglMultiTexCoord2fv =
@ -433,13 +432,13 @@ CheckMultiTextureExtensions (void)
if (qglMultiTexCoord2f && gl_mtex_enum) if (qglMultiTexCoord2f && gl_mtex_enum)
gl_mtex_capable = true; gl_mtex_capable = true;
else else
Con_Printf ("Multitexture disabled, could not find required " Sys_Printf ("Multitexture disabled, could not find required "
"functions\n"); "functions\n");
} else { } else {
Con_Printf ("Multitexture disabled, not enough TMUs.\n"); Sys_Printf ("Multitexture disabled, not enough TMUs.\n");
} }
} else { } 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}; specular[4] = {0.1, 0.1, 0.1, 1.0};
qfglGetIntegerv (GL_MAX_LIGHTS, &gl_max_lights); 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); qfglEnable (GL_LIGHTING);
qfglLightModelfv (GL_LIGHT_MODEL_AMBIENT, dark); qfglLightModelfv (GL_LIGHT_MODEL_AMBIENT, dark);
@ -517,7 +516,7 @@ VID_SetPalette (unsigned char *palette)
QFile *f; QFile *f;
// 8 8 8 encoding // 8 8 8 encoding
// Con_Printf ("Converting 8to24\n"); // Sys_Printf ("Converting 8to24\n");
pal = palette; pal = palette;
table = d_8to24table; table = d_8to24table;
@ -644,11 +643,11 @@ Tdfx_Init8bitPalette (void)
if (!(qgl3DfxSetPaletteEXT = if (!(qgl3DfxSetPaletteEXT =
QFGL_ExtensionAddress ("gl3DfxSetPaletteEXT"))) { QFGL_ExtensionAddress ("gl3DfxSetPaletteEXT"))) {
Con_Printf ("3DFX_set_global_palette not found.\n"); Sys_Printf ("3DFX_set_global_palette not found.\n");
return; return;
} }
Con_Printf ("3DFX_set_global_palette.\n"); Sys_Printf ("3DFX_set_global_palette.\n");
oldpal = (char *) d_8to24table; // d_8to24table3dfx; oldpal = (char *) d_8to24table; // d_8to24table3dfx;
for (i = 0; i < 256; i++) { for (i = 0; i < 256; i++) {
@ -662,7 +661,7 @@ Tdfx_Init8bitPalette (void)
qgl3DfxSetPaletteEXT ((GLuint *) table); qgl3DfxSetPaletteEXT ((GLuint *) table);
is8bit = true; is8bit = true;
} else { } 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 (QFGL_ExtensionPresent ("GL_EXT_shared_texture_palette")) {
if (!(qglColorTableEXT = QFGL_ExtensionAddress ("glColorTableEXT"))) { if (!(qglColorTableEXT = QFGL_ExtensionAddress ("glColorTableEXT"))) {
Con_Printf ("glColorTableEXT not found.\n"); Sys_Printf ("glColorTableEXT not found.\n");
return; return;
} }
Con_Printf ("GL_EXT_shared_texture_palette\n"); Sys_Printf ("GL_EXT_shared_texture_palette\n");
qfglEnable (GL_SHARED_TEXTURE_PALETTE_EXT); qfglEnable (GL_SHARED_TEXTURE_PALETTE_EXT);
oldPalette = (GLubyte *) d_8to24table; // d_8to24table3dfx; oldPalette = (GLubyte *) d_8to24table; // d_8to24table3dfx;
@ -706,21 +705,21 @@ Shared_Init8bitPalette (void)
GL_UNSIGNED_BYTE, (GLvoid *) thePalette); GL_UNSIGNED_BYTE, (GLvoid *) thePalette);
is8bit = true; is8bit = true;
} else { } else {
Con_Printf ("\n GL_EXT_shared_texture_palette not found."); Sys_Printf ("\n GL_EXT_shared_texture_palette not found.");
} }
} }
void void
VID_Init8bitPalette (void) VID_Init8bitPalette (void)
{ {
Con_Printf ("Checking for 8-bit extension: "); Sys_Printf ("Checking for 8-bit extension: ");
if (vid_use8bit->int_val) { if (vid_use8bit->int_val) {
Tdfx_Init8bitPalette (); Tdfx_Init8bitPalette ();
Shared_Init8bitPalette (); Shared_Init8bitPalette ();
if (!is8bit) if (!is8bit)
Con_Printf ("\n 8-bit extension not found.\n"); Sys_Printf ("\n 8-bit extension not found.\n");
} else { } else {
Con_Printf ("disabled.\n"); Sys_Printf ("disabled.\n");
} }
} }

View file

@ -283,7 +283,7 @@ VID_SetMode (const char *name, unsigned char *palette)
vmode = FindVideoMode(name); vmode = FindVideoMode(name);
if (!vmode) { if (!vmode) {
// Con_Printf ("No such video mode: %s\n", name); // Sys_Printf ("No such video mode: %s\n", name);
return 0; return 0;
} }

View file

@ -150,7 +150,7 @@ QFGL_LoadLibrary (void)
void void
VID_Shutdown (void) VID_Shutdown (void)
{ {
Con_Printf ("VID_Shutdown\n"); Sys_Printf ("VID_Shutdown\n");
X11_CloseDisplay (); X11_CloseDisplay ();
} }
@ -254,7 +254,7 @@ VID_Init (unsigned char *palette)
VID_Init8bitPalette (); VID_Init8bitPalette ();
VID_SetPalette (vid.palette); 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; vid.initialized = true;

View file

@ -191,7 +191,7 @@ success:
VID_SetPalette (vid.palette); VID_SetPalette (vid.palette);
VID_Init8bitPalette (); // Check for 3DFX Extensions and initialize them. 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; vid.initialized = true;

View file

@ -54,7 +54,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <vga.h> #include <vga.h>
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/input.h" #include "QF/input.h"
#include "QF/qargs.h" #include "QF/qargs.h"
@ -245,7 +244,7 @@ get_mode (int width, int height, int depth)
void void
VID_Shutdown (void) VID_Shutdown (void)
{ {
Sys_Printf ("VID_Shutdown\n"); Sys_DPrintf ("VID_Shutdown\n");
if (!svgalib_inited) if (!svgalib_inited)
return; return;
@ -284,7 +283,7 @@ VID_SetMode (int modenum, unsigned char *palette)
int err; int err;
if ((modenum >= num_modes) || (modenum < 0) || !modes[modenum].width) { 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; return 0;
} }
@ -369,7 +368,7 @@ VID_Init (unsigned char *palette)
Sys_Error ("SVGALib failed to allocate a new VC"); Sys_Error ("SVGALib failed to allocate a new VC");
if (vga_runinbackground_version () == 1) { 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_GOTOBACK, goto_background);
vga_runinbackground (VGA_COMEFROMBACK, comefrom_background); vga_runinbackground (VGA_COMEFROMBACK, comefrom_background);
vga_runinbackground (1); vga_runinbackground (1);

View file

@ -35,7 +35,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/cdaudio.h" #include "QF/cdaudio.h"
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/input.h" #include "QF/input.h"
#include "QF/keys.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 // fix the leftover Alt from any Alt-Tab or the like that switched us away
IN_ClearStates (); 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_height->int_val);
VID_SetPalette (palette); VID_SetPalette (palette);

View file

@ -346,8 +346,8 @@ ResetSharedFrameBuffers (void)
// attach to the shared memory segment // attach to the shared memory segment
x_shminfo[frm].shmaddr = (void *) shmat (x_shminfo[frm].shmid, 0, 0); x_shminfo[frm].shmaddr = (void *) shmat (x_shminfo[frm].shmid, 0, 0);
Sys_Printf ("VID: shared memory id=%d, addr=0x%lx\n", Sys_DPrintf ("VID: shared memory id=%d, addr=0x%lx\n",
x_shminfo[frm].shmid, (long) x_shminfo[frm].shmaddr); x_shminfo[frm].shmid, (long) x_shminfo[frm].shmaddr);
x_framebuffer[frm]->data = 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; x_vis = x_visinfo->visual;
if (num_visuals > 1) { 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); template.depth);
for (i = 0; i < num_visuals; i++) 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 { } else {
if (num_visuals == 0) { if (num_visuals == 0) {
if (template_mask == VisualIDMask) { if (template_mask == VisualIDMask) {
@ -467,15 +467,15 @@ VID_Init (unsigned char *palette)
} }
if (verbose) { if (verbose) {
Sys_Printf ("Using visualid %d:\n", (int) x_visinfo->visualid); Sys_DPrintf ("Using visualid %d:\n", (int) x_visinfo->visualid);
Sys_Printf (" class %d\n", x_visinfo->class); Sys_DPrintf (" class %d\n", x_visinfo->class);
Sys_Printf (" screen %d\n", x_visinfo->screen); Sys_DPrintf (" screen %d\n", x_visinfo->screen);
Sys_Printf (" depth %d\n", x_visinfo->depth); Sys_DPrintf (" depth %d\n", x_visinfo->depth);
Sys_Printf (" red_mask 0x%x\n", (int) x_visinfo->red_mask); Sys_DPrintf (" red_mask 0x%x\n", (int) x_visinfo->red_mask);
Sys_Printf (" green_mask 0x%x\n", (int) x_visinfo->green_mask); Sys_DPrintf (" green_mask 0x%x\n", (int) x_visinfo->green_mask);
Sys_Printf (" blue_mask 0x%x\n", (int) x_visinfo->blue_mask); Sys_DPrintf (" blue_mask 0x%x\n", (int) x_visinfo->blue_mask);
Sys_Printf (" colormap_size %d\n", x_visinfo->colormap_size); Sys_DPrintf (" colormap_size %d\n", x_visinfo->colormap_size);
Sys_Printf (" bits_per_rgb %d\n", x_visinfo->bits_per_rgb); Sys_DPrintf (" bits_per_rgb %d\n", x_visinfo->bits_per_rgb);
} }
/* Setup attributes for main window */ /* Setup attributes for main window */
@ -579,7 +579,7 @@ VID_SetPalette (unsigned char *palette)
void void
VID_Shutdown (void) VID_Shutdown (void)
{ {
Sys_Printf ("VID_Shutdown\n"); Sys_DPrintf ("VID_Shutdown\n");
X11_CloseDisplay (); X11_CloseDisplay ();
} }

View file

@ -35,9 +35,9 @@
#endif #endif
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/msg.h" #include "QF/msg.h"
#include "QF/sizebuf.h" #include "QF/sizebuf.h"
#include "QF/sys.h"
#include "client.h" #include "client.h"
@ -51,7 +51,7 @@ void
CL_Cmd_ForwardToServer (void) CL_Cmd_ForwardToServer (void)
{ {
if (cls.state != ca_connected) { 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; return;
} }

View file

@ -39,7 +39,6 @@ static __attribute__ ((used)) const char rcsid[] =
#endif #endif
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/keys.h" #include "QF/keys.h"
#include "QF/msg.h" #include "QF/msg.h"
@ -174,7 +173,7 @@ CL_GetMessage (void)
// discard nop keepalive message // discard nop keepalive message
if (net_message->message->cursize == 1 if (net_message->message->cursize == 1
&& net_message->message->data[0] == svc_nop) && net_message->message->data[0] == svc_nop)
Con_Printf ("<-- server to client keepalive\n"); Sys_Printf ("<-- server to client keepalive\n");
else else
break; break;
} }
@ -198,7 +197,7 @@ CL_Stop_f (void)
return; return;
if (!cls.demorecording) { if (!cls.demorecording) {
Con_Printf ("Not recording a demo.\n"); Sys_Printf ("Not recording a demo.\n");
return; return;
} }
// write a disconnect message to the demo file // write a disconnect message to the demo file
@ -210,7 +209,7 @@ CL_Stop_f (void)
Qclose (cls.demofile); Qclose (cls.demofile);
cls.demofile = NULL; cls.demofile = NULL;
cls.demorecording = false; cls.demorecording = false;
Con_Printf ("Completed demo\n"); Sys_Printf ("Completed demo\n");
} }
@ -231,24 +230,24 @@ CL_Record_f (void)
c = Cmd_Argc (); c = Cmd_Argc ();
if (c != 2 && c != 3 && c != 4) { if (c != 2 && c != 3 && c != 4) {
Con_Printf ("record <demoname> [<map> [cd track]]\n"); Sys_Printf ("record <demoname> [<map> [cd track]]\n");
return; return;
} }
if (strstr (Cmd_Argv (1), "..")) { if (strstr (Cmd_Argv (1), "..")) {
Con_Printf ("Relative pathnames are not allowed.\n"); Sys_Printf ("Relative pathnames are not allowed.\n");
return; return;
} }
if (c == 2 && cls.state == ca_connected) { 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"); ("Can not record - already connected to server\nClient demo recording must be started before connecting\n");
return; return;
} }
// write the forced cd track number, or -1 // write the forced cd track number, or -1
if (c == 4) { if (c == 4) {
track = atoi (Cmd_Argv (3)); 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 } else
track = -1; track = -1;
@ -274,11 +273,11 @@ CL_Record_f (void)
} }
if (!cls.demofile) { if (!cls.demofile) {
Con_Printf ("ERROR: couldn't open.\n"); Sys_Printf ("ERROR: couldn't open.\n");
return; return;
} }
Con_Printf ("recording to %s.\n", name); Sys_Printf ("recording to %s.\n", name);
cls.demorecording = true; cls.demorecording = true;
cls.forcetrack = track; cls.forcetrack = track;
@ -303,10 +302,10 @@ CL_StartDemo (void)
strncpy (name, demoname, sizeof (name)); strncpy (name, demoname, sizeof (name));
QFS_DefaultExtension (name, ".dem"); 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); QFS_FOpenFile (name, &cls.demofile);
if (!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 cls.demonum = -1; // stop demo loop
return; return;
} }
@ -340,7 +339,7 @@ CL_PlayDemo_f (void)
return; return;
if (Cmd_Argc () != 2) { if (Cmd_Argc () != 2) {
Con_Printf ("play <demoname> : plays a demo\n"); Sys_Printf ("play <demoname> : plays a demo\n");
return; return;
} }
strncpy (demoname, Cmd_Argv (1), sizeof (demoname)); strncpy (demoname, Cmd_Argv (1), sizeof (demoname));
@ -373,7 +372,7 @@ CL_FinishTimeDemo (void)
time = realtime - cls.td_starttime; time = realtime - cls.td_starttime;
if (!time) if (!time)
time = 1; 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); frames == 1 ? "" : "s", time, frames / time);
if (--timedemo_count > 0) if (--timedemo_count > 0)
CL_StartTimeDemo (); CL_StartTimeDemo ();
@ -392,7 +391,7 @@ CL_TimeDemo_f (void)
return; return;
if (Cmd_Argc () < 2 || Cmd_Argc () > 3) { if (Cmd_Argc () < 2 || Cmd_Argc () > 3) {
Con_Printf ("timedemo <demoname> [count]: gets demo speeds\n"); Sys_Printf ("timedemo <demoname> [count]: gets demo speeds\n");
return; return;
} }
if (Cmd_Argc () == 3) { if (Cmd_Argc () == 3) {

View file

@ -39,11 +39,11 @@ static __attribute__ ((used)) const char rcsid[] =
#endif #endif
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/input.h" #include "QF/input.h"
#include "QF/keys.h" #include "QF/keys.h"
#include "QF/msg.h" #include "QF/msg.h"
#include "QF/sys.h"
#include "chase.h" #include "chase.h"
#include "client.h" #include "client.h"
@ -97,7 +97,7 @@ KeyPress (kbutton_t *b)
else if (!b->down[1]) else if (!b->down[1])
b->down[1] = k; b->down[1] = k;
else { else {
Con_Printf ("Three keys down for a button!\n"); Sys_Printf ("Three keys down for a button!\n");
return; return;
} }
@ -587,7 +587,7 @@ CL_SendMove (usercmd_t *cmd)
return; return;
if (NET_SendUnreliableMessage (cls.netcon, &buf) == -1) { 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 (); CL_Disconnect ();
} }
} }

View file

@ -42,6 +42,7 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/render.h" #include "QF/render.h"
#include "QF/screen.h" #include "QF/screen.h"
#include "QF/skin.h" #include "QF/skin.h"
#include "QF/sys.h"
#include "QF/va.h" #include "QF/va.h"
#include "chase.h" #include "chase.h"
@ -217,7 +218,7 @@ CL_Disconnect (void)
if (cls.demorecording) if (cls.demorecording)
CL_Stop_f (); CL_Stop_f ();
Con_DPrintf ("Sending clc_disconnect\n"); Sys_DPrintf ("Sending clc_disconnect\n");
SZ_Clear (&cls.message); SZ_Clear (&cls.message);
MSG_WriteByte (&cls.message, clc_disconnect); MSG_WriteByte (&cls.message, clc_disconnect);
NET_SendUnreliableMessage (cls.netcon, &cls.message); NET_SendUnreliableMessage (cls.netcon, &cls.message);
@ -260,7 +261,7 @@ CL_EstablishConnection (const char *host)
cls.netcon = NET_Connect (host); cls.netcon = NET_Connect (host);
if (!cls.netcon) if (!cls.netcon)
Host_Error ("CL_Connect: connect failed\n"); 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 cls.demonum = -1; // not in the demo loop now
CL_SetState (ca_connected); CL_SetState (ca_connected);
@ -280,7 +281,7 @@ CL_SignonReply (void)
{ {
char str[8192]; char str[8192];
Con_DPrintf ("CL_SignonReply: %i\n", cls.signon); Sys_DPrintf ("CL_SignonReply: %i\n", cls.signon);
switch (cls.signon) { switch (cls.signon) {
case 1: case 1:
@ -328,7 +329,7 @@ CL_NextDemo (void)
if (!cls.demos[cls.demonum][0] || cls.demonum == MAX_DEMOS) { if (!cls.demos[cls.demonum][0] || cls.demonum == MAX_DEMOS) {
cls.demonum = 0; cls.demonum = 0;
if (!cls.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; cls.demonum = -1;
return; return;
} }
@ -346,12 +347,12 @@ CL_PrintEntities_f (void)
int i; int i;
for (i = 0, ent = cl_entities; i < cl.num_entities; i++, ent++) { for (i = 0, ent = cl_entities; i < cl.num_entities; i++, ent++) {
Con_Printf ("%3i:", i); Sys_Printf ("%3i:", i);
if (!ent->model) { if (!ent->model) {
Con_Printf ("EMPTY\n"); Sys_Printf ("EMPTY\n");
continue; 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->model->name, ent->frame, ent->origin[0],
ent->origin[1], ent->origin[2], ent->angles[0], ent->origin[1], ent->origin[2], ent->angles[0],
ent->angles[1], ent->angles[2]); ent->angles[1], ent->angles[2]);
@ -660,7 +661,7 @@ CL_ReadFromServer (void)
} while (ret && cls.state == ca_connected); } while (ret && cls.state == ca_connected);
if (cl_shownet->int_val) if (cl_shownet->int_val)
Con_Printf ("\n"); Sys_Printf ("\n");
R_ClearEnts (); R_ClearEnts ();
@ -696,7 +697,7 @@ CL_SendCmd (void)
return; // no message at all return; // no message at all
if (!NET_CanSendMessage (cls.netcon)) { if (!NET_CanSendMessage (cls.netcon)) {
Con_DPrintf ("CL_WriteToServer: can't send\n"); Sys_DPrintf ("CL_WriteToServer: can't send\n");
return; return;
} }

View file

@ -215,7 +215,7 @@ CL_KeepaliveMessage (void)
lastmsg = time; lastmsg = time;
// write out a nop // write out a nop
Con_Printf ("--> client to server keepalive\n"); Sys_Printf ("--> client to server keepalive\n");
MSG_WriteByte (&cls.message, clc_nop); MSG_WriteByte (&cls.message, clc_nop);
NET_SendMessage (cls.netcon, &cls.message); NET_SendMessage (cls.netcon, &cls.message);
@ -265,7 +265,7 @@ CL_ParseServerInfo (void)
const char *str; const char *str;
int nummodels, numsounds, i; int nummodels, numsounds, i;
Con_DPrintf ("Serverinfo packet received.\n"); Sys_DPrintf ("Serverinfo packet received.\n");
S_BlockSound (); S_BlockSound ();
S_StopAllSounds (); S_StopAllSounds ();
@ -276,13 +276,13 @@ CL_ParseServerInfo (void)
// parse protocol version number // parse protocol version number
i = MSG_ReadLong (net_message); i = MSG_ReadLong (net_message);
if (i != PROTOCOL_VERSION) { 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; goto done;
} }
// parse maxclients // parse maxclients
cl.maxclients = MSG_ReadByte (net_message); cl.maxclients = MSG_ReadByte (net_message);
if (cl.maxclients < 1 || cl.maxclients > MAX_SCOREBOARD) { 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; goto done;
} }
cl.scores = Hunk_AllocName (cl.maxclients * sizeof (*cl.scores), "scores"); 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); strncpy (cl.levelname, str, sizeof (cl.levelname) - 1);
// separate the printfs so the server message can have a color // 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" "\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\37\n"
"\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 // 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 // happens to be in the cache, so precaching something else doesn't
@ -311,7 +311,7 @@ CL_ParseServerInfo (void)
if (!str[0]) if (!str[0])
break; break;
if (nummodels == MAX_MODELS) { if (nummodels == MAX_MODELS) {
Con_Printf ("Server sent too many model precaches\n"); Sys_Printf ("Server sent too many model precaches\n");
goto done; goto done;
} }
strcpy (model_precache[nummodels], str); strcpy (model_precache[nummodels], str);
@ -325,7 +325,7 @@ CL_ParseServerInfo (void)
if (!str[0]) if (!str[0])
break; break;
if (numsounds == MAX_SOUNDS) { if (numsounds == MAX_SOUNDS) {
Con_Printf ("Server sent too many sound precaches\n"); Sys_Printf ("Server sent too many sound precaches\n");
goto done; goto done;
} }
strcpy (sound_precache[numsounds], str); strcpy (sound_precache[numsounds], str);
@ -338,7 +338,7 @@ CL_ParseServerInfo (void)
for (i = 1; i < nummodels; i++) { for (i = 1; i < nummodels; i++) {
cl.model_precache[i] = Mod_ForName (model_precache[i], false); cl.model_precache[i] = Mod_ForName (model_precache[i], false);
if (cl.model_precache[i] == NULL) { 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; goto done;
} }
CL_KeepaliveMessage (); CL_KeepaliveMessage ();
@ -739,7 +739,7 @@ CL_ParseStaticSound (void)
#define SHOWNET(x) \ #define SHOWNET(x) \
if (cl_shownet->int_val == 2) \ 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; int viewentity;
@ -750,9 +750,9 @@ CL_ParseServerMessage (void)
// if recording demos, copy the message out // if recording demos, copy the message out
if (cl_shownet->int_val == 1) 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) else if (cl_shownet->int_val == 2)
Con_Printf ("------------------\n"); Sys_Printf ("------------------\n");
cl.onground = false; // unless the server says otherwise cl.onground = false; // unless the server says otherwise
@ -809,7 +809,7 @@ CL_ParseServerMessage (void)
Host_EndGame ("Server disconnected\n"); Host_EndGame ("Server disconnected\n");
case svc_print: case svc_print:
Con_Printf ("%s", MSG_ReadString (net_message)); Sys_Printf ("%s", MSG_ReadString (net_message));
break; break;
case svc_centerprint: case svc_centerprint:

View file

@ -41,7 +41,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <math.h> #include <math.h>
#include <stdlib.h> #include <stdlib.h>
#include "QF/console.h"
#include "QF/model.h" #include "QF/model.h"
#include "QF/msg.h" #include "QF/msg.h"
#include "QF/sound.h" #include "QF/sound.h"
@ -176,7 +175,7 @@ beam_alloc (int ent)
for (i = 0, b = cl_beams; i < MAX_BEAMS; i++, b++) for (i = 0, b = cl_beams; i < MAX_BEAMS; i++, b++)
if (!b->model || b->endtime < cl.time) if (!b->model || b->endtime < cl.time)
return b; return b;
Con_Printf ("beam list overflow!\n"); Sys_Printf ("beam list overflow!\n");
return 0; return 0;
} }

View file

@ -32,10 +32,10 @@ static __attribute__ ((used)) const char rcsid[] =
"$Id$"; "$Id$";
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/qargs.h" #include "QF/qargs.h"
#include "QF/quakefs.h" #include "QF/quakefs.h"
#include "QF/sys.h"
#include "game.h" #include "game.h"
#include "server.h" #include "server.h"
@ -70,7 +70,7 @@ COM_CheckRegistered (void)
if (static_registered) { if (static_registered) {
Cvar_Set (registered, "1"); Cvar_Set (registered, "1");
Con_Printf ("Playing registered version.\n"); Sys_Printf ("Playing registered version.\n");
} }
} }

View file

@ -146,7 +146,7 @@ Host_EndGame (const char *message, ...)
va_start (argptr, message); va_start (argptr, message);
dvsprintf (str, message, argptr); dvsprintf (str, message, argptr);
va_end (argptr); va_end (argptr);
Con_DPrintf ("Host_EndGame: %s\n", str->str); Sys_DPrintf ("Host_EndGame: %s\n", str->str);
if (sv.active) if (sv.active)
Host_ShutdownServer (false); Host_ShutdownServer (false);
@ -194,7 +194,7 @@ Host_Error (const char *error, ...)
if (cls.state == ca_dedicated) if (cls.state == ca_dedicated)
Sys_Error ("Host_Error: %s", str->str); // dedicated servers exit 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 (); CL_Disconnect ();
cls.demonum = -1; cls.demonum = -1;
@ -299,7 +299,7 @@ Host_WriteConfiguration (void)
char *path = va ("%s/config.cfg", qfs_gamedir->dir.def); char *path = va ("%s/config.cfg", qfs_gamedir->dir.def);
f = QFS_WOpen (path, 0); f = QFS_WOpen (path, 0);
if (!f) { if (!f) {
Con_Printf ("Couldn't write config.cfg.\n"); Sys_Printf ("Couldn't write config.cfg.\n");
return; return;
} }
@ -410,7 +410,7 @@ SV_DropClient (qboolean crash)
*sv_globals.self = saveSelf; *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 // break the net connection
NET_Close (host_client->netconnection); NET_Close (host_client->netconnection);
@ -489,7 +489,7 @@ Host_ShutdownServer (qboolean crash)
MSG_WriteByte (&buf, svc_disconnect); MSG_WriteByte (&buf, svc_disconnect);
count = NET_SendToAll (&buf, 5); count = NET_SendToAll (&buf, 5);
if (count) if (count)
Con_Printf Sys_Printf
("Host_ShutdownServer: NET_SendToAll failed for %u clients\n", ("Host_ShutdownServer: NET_SendToAll failed for %u clients\n",
count); count);
@ -512,7 +512,7 @@ Host_ShutdownServer (qboolean crash)
void void
Host_ClearMemory (void) Host_ClearMemory (void)
{ {
Con_DPrintf ("Clearing memory\n"); Sys_DPrintf ("Clearing memory\n");
D_FlushCaches (); D_FlushCaches ();
Mod_ClearAll (); Mod_ClearAll ();
if (host_hunklevel) if (host_hunklevel)
@ -633,7 +633,7 @@ Host_ClientFrame (void)
time3 = Sys_DoubleTime (); time3 = Sys_DoubleTime ();
pass2 = (time2 - time1) * 1000; pass2 = (time2 - time1) * 1000;
pass3 = (time3 - time2) * 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); pass1 + pass2 + pass3, pass1, pass2, pass3);
} }
} }
@ -732,7 +732,7 @@ Host_Frame (float time)
c++; 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; const char *mp;
Con_Printf ("Host_Init\n"); Sys_Printf ("Host_Init\n");
host_cbuf = Cbuf_New (&id_interp); host_cbuf = Cbuf_New (&id_interp);
cmd_source = src_command; cmd_source = src_command;
@ -964,7 +964,7 @@ Host_Init (void)
SV_Progs_Init (); SV_Progs_Init ();
SV_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) { if (cls.state != ca_dedicated) {
host_basepal = (byte *) QFS_LoadHunkFile ("gfx/palette.lmp"); host_basepal = (byte *) QFS_LoadHunkFile ("gfx/palette.lmp");
@ -1004,10 +1004,10 @@ Host_Init (void)
Hunk_AllocName (0, "-HOST_HUNKLEVEL-"); Hunk_AllocName (0, "-HOST_HUNKLEVEL-");
host_hunklevel = Hunk_LowMark (); host_hunklevel = Hunk_LowMark ();
Con_Printf ("\nVersion %s (build %04d)\n\n", VERSION, Sys_Printf ("\nVersion %s (build %04d)\n\n", VERSION,
build_number ()); 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; host_initialized = true;

View file

@ -70,7 +70,7 @@ Host_Quit_f (void)
// return; // return;
// } // }
if (!con_module) if (!con_module)
Con_Printf ("I hope you wanted to quit\n"); Sys_Printf ("I hope you wanted to quit\n");
CL_Disconnect (); CL_Disconnect ();
Host_ShutdownServer (false); Host_ShutdownServer (false);
@ -92,7 +92,7 @@ Host_Status_f (void)
CL_Cmd_ForwardToServer (); CL_Cmd_ForwardToServer ();
return; return;
} }
print = Con_Printf; print = Sys_Printf;
} else } else
print = SV_ClientPrintf; print = SV_ClientPrintf;
@ -277,11 +277,11 @@ Host_Map_f (void)
return; return;
if (Cmd_Argc () > 2) { if (Cmd_Argc () > 2) {
Con_Printf ("map <levelname> : continue game on a new level\n"); Sys_Printf ("map <levelname> : continue game on a new level\n");
return; return;
} }
if (Cmd_Argc () == 1) { 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; return;
} }
@ -289,7 +289,7 @@ Host_Map_f (void)
expanded = va ("maps/%s.bsp", Cmd_Argv (1)); expanded = va ("maps/%s.bsp", Cmd_Argv (1));
QFS_FOpenFile (expanded, &f); QFS_FOpenFile (expanded, &f);
if (!f) { if (!f) {
Con_Printf ("Can't find %s\n", expanded); Sys_Printf ("Can't find %s\n", expanded);
return; return;
} }
Qclose (f); Qclose (f);
@ -337,12 +337,12 @@ Host_Changelevel_f (void)
char level[MAX_QPATH]; char level[MAX_QPATH];
if (Cmd_Argc () != 2) { if (Cmd_Argc () != 2) {
Con_Printf ("changelevel <levelname> : continue game on a new " Sys_Printf ("changelevel <levelname> : continue game on a new "
"level\n"); "level\n");
return; return;
} }
if (!sv.active || cls.demoplayback) { if (!sv.active || cls.demoplayback) {
Con_Printf ("Only the server may changelevel\n"); Sys_Printf ("Only the server may changelevel\n");
return; return;
} }
SV_SaveSpawnparms (); SV_SaveSpawnparms ();
@ -540,34 +540,34 @@ Host_Savegame_f (void)
return; return;
if (!sv.active) { if (!sv.active) {
Con_Printf ("Not playing a local game.\n"); Sys_Printf ("Not playing a local game.\n");
return; return;
} }
if (cl.intermission) { if (cl.intermission) {
Con_Printf ("Can't save in intermission.\n"); Sys_Printf ("Can't save in intermission.\n");
return; return;
} }
if (svs.maxclients != 1) { if (svs.maxclients != 1) {
Con_Printf ("Can't save multiplayer games.\n"); Sys_Printf ("Can't save multiplayer games.\n");
return; return;
} }
if (Cmd_Argc () != 2) { if (Cmd_Argc () != 2) {
Con_Printf ("save <savename> : save a game\n"); Sys_Printf ("save <savename> : save a game\n");
return; return;
} }
if (strstr (Cmd_Argv (1), "..")) { if (strstr (Cmd_Argv (1), "..")) {
Con_Printf ("Relative pathnames are not allowed.\n"); Sys_Printf ("Relative pathnames are not allowed.\n");
return; return;
} }
for (i = 0; i < svs.maxclients; i++) { for (i = 0; i < svs.maxclients; i++) {
if (svs.clients[i].active && (SVfloat (svs.clients[i].edict, health) if (svs.clients[i].active && (SVfloat (svs.clients[i].edict, health)
<= 0)) { <= 0)) {
Con_Printf ("Can't savegame with a dead player\n"); Sys_Printf ("Can't savegame with a dead player\n");
return; return;
} }
} }
@ -576,10 +576,10 @@ Host_Savegame_f (void)
qfs_gamedir->dir.def, Cmd_Argv (1)); qfs_gamedir->dir.def, Cmd_Argv (1));
QFS_DefaultExtension (name, ".sav"); 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); f = QFS_WOpen (name, 0);
if (!f) { if (!f) {
Con_Printf ("ERROR: couldn't open.\n"); Sys_Printf ("ERROR: couldn't open.\n");
return; return;
} }
@ -588,7 +588,7 @@ Host_Savegame_f (void)
free (save_text); free (save_text);
Qclose (f); Qclose (f);
Con_Printf ("done.\n"); Sys_Printf ("done.\n");
} }
static void static void
@ -612,7 +612,7 @@ Host_Loadgame_f (void)
goto end; goto end;
if (Cmd_Argc () != 2) { if (Cmd_Argc () != 2) {
Con_Printf ("load <savename> : load a game\n"); Sys_Printf ("load <savename> : load a game\n");
goto end; goto end;
} }
@ -629,10 +629,10 @@ Host_Loadgame_f (void)
// been used. The menu calls it before stuffing loadgame command // been used. The menu calls it before stuffing loadgame command
// SCR_BeginLoadingPlaque (); // 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"); f = QFS_Open (name->str, "rz");
if (!f) { if (!f) {
Con_Printf ("ERROR: couldn't open.\n"); Sys_Printf ("ERROR: couldn't open.\n");
goto end; goto end;
} }
script_data = malloc (Qfilesize (f) + 1); script_data = malloc (Qfilesize (f) + 1);
@ -646,14 +646,14 @@ Host_Loadgame_f (void)
Script_GetToken (script, 1); Script_GetToken (script, 1);
if (strequal (script->token->str, PROGRAM)) { if (strequal (script->token->str, PROGRAM)) {
if (!Script_TokenAvailable (script, 1)) { 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; goto end;
} }
game = PL_GetPropertyList (script->p); game = PL_GetPropertyList (script->p);
} else { } else {
sscanf (script->token->str, "%i", &version); sscanf (script->token->str, "%i", &version);
if (version != SAVEGAME_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); SAVEGAME_VERSION);
goto end; goto end;
} }
@ -674,7 +674,7 @@ Host_Loadgame_f (void)
SV_SpawnServer (mapname); SV_SpawnServer (mapname);
if (!sv.active) { if (!sv.active) {
Con_Printf ("Couldn't load map %s\n", mapname); Sys_Printf ("Couldn't load map %s\n", mapname);
goto end; goto end;
} }
sv.paused = true; // pause until all clients connect sv.paused = true; // pause until all clients connect
@ -741,7 +741,7 @@ Host_Name_f (void)
const char *newName; const char *newName;
if (Cmd_Argc () == 1) { if (Cmd_Argc () == 1) {
Con_Printf ("\"name\" is \"%s\"\n", cl_name->string); Sys_Printf ("\"name\" is \"%s\"\n", cl_name->string);
return; return;
} }
if (Cmd_Argc () == 2) if (Cmd_Argc () == 2)
@ -760,7 +760,7 @@ Host_Name_f (void)
if (host_client->name[0] && strcmp (host_client->name, "unconnected")) if (host_client->name[0] && strcmp (host_client->name, "unconnected"))
if (strcmp (host_client->name, newName) != 0) 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); strcpy (host_client->name, newName);
SVstring (host_client->edict, netname) = SVstring (host_client->edict, netname) =
PR_SetString (&sv_pr_state, host_client->name); PR_SetString (&sv_pr_state, host_client->name);
@ -774,8 +774,8 @@ Host_Name_f (void)
static void static void
Host_Version_f (void) Host_Version_f (void)
{ {
Con_Printf ("Version %s\n", VERSION); Sys_Printf ("Version %s\n", VERSION);
Con_Printf ("Exe: " __TIME__ " " __DATE__ "\n"); Sys_Printf ("Exe: " __TIME__ " " __DATE__ "\n");
} }
static void static void
@ -834,7 +834,7 @@ Host_Say (qboolean teamonly)
} }
host_client = save; host_client = save;
Con_Printf ("%s", &text[1]); Sys_Printf ("%s", &text[1]);
} }
static void static void
@ -951,12 +951,12 @@ static void
Host_PreSpawn_f (void) Host_PreSpawn_f (void)
{ {
if (cmd_source == src_command) { 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; return;
} }
if (host_client->spawned) { if (host_client->spawned) {
Con_Printf ("prespawn not valid -- already spawned\n"); Sys_Printf ("prespawn not valid -- already spawned\n");
return; return;
} }
@ -974,12 +974,12 @@ Host_Spawn_f (void)
edict_t *ent; edict_t *ent;
if (cmd_source == src_command) { 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; return;
} }
if (host_client->spawned) { if (host_client->spawned) {
Con_Printf ("Spawn not valid -- already spawned\n"); Sys_Printf ("Spawn not valid -- already spawned\n");
return; return;
} }
// run the entrance script // run the entrance script
@ -1004,7 +1004,7 @@ Host_Spawn_f (void)
*sv_globals.self = EDICT_TO_PROG (&sv_pr_state, sv_player); *sv_globals.self = EDICT_TO_PROG (&sv_pr_state, sv_player);
PR_ExecuteProgram (&sv_pr_state, sv_funcs.ClientConnect); PR_ExecuteProgram (&sv_pr_state, sv_funcs.ClientConnect);
if ((Sys_DoubleTime () - host_client->netconnection->connecttime) <= 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); PR_ExecuteProgram (&sv_pr_state, sv_funcs.PutClientInServer);
} }
@ -1077,7 +1077,7 @@ static void
Host_Begin_f (void) Host_Begin_f (void)
{ {
if (cmd_source == src_command) { 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; return;
} }
@ -1298,7 +1298,7 @@ FindViewthing (void)
"viewthing")) "viewthing"))
return e; return e;
} }
Con_Printf ("No viewthing on map\n"); Sys_Printf ("No viewthing on map\n");
return NULL; return NULL;
} }
@ -1314,7 +1314,7 @@ Host_Viewmodel_f (void)
m = Mod_ForName (Cmd_Argv (1), false); m = Mod_ForName (Cmd_Argv (1), false);
if (!m) { if (!m) {
Con_Printf ("Can't load %s\n", Cmd_Argv (1)); Sys_Printf ("Can't load %s\n", Cmd_Argv (1));
return; return;
} }
@ -1352,7 +1352,7 @@ PrintFrameName (model_t *m, int frame)
return; return;
pframedesc = &hdr->frames[frame]; 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); Cache_Release (&m->cache);
} }
@ -1408,10 +1408,10 @@ Host_Startdemos_f (void)
c = Cmd_Argc () - 1; c = Cmd_Argc () - 1;
if (c > MAX_DEMOS) { 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; 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++) for (i = 1; i < c + 1; i++)
strncpy (cls.demos[i - 1], Cmd_Argv (i), sizeof (cls.demos[0]) - 1); strncpy (cls.demos[i - 1], Cmd_Argv (i), sizeof (cls.demos[0]) - 1);

View file

@ -39,8 +39,6 @@ static __attribute__ ((used)) const char rcsid[] =
#endif #endif
#include "QF/cmd.h" #include "QF/cmd.h"
#include "compat.h"
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/msg.h" #include "QF/msg.h"
#include "QF/screen.h" #include "QF/screen.h"
@ -48,6 +46,7 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/sys.h" #include "QF/sys.h"
#include "QF/va.h" #include "QF/va.h"
#include "compat.h"
#include "client.h" #include "client.h"
#include "host.h" #include "host.h"
#include "server.h" #include "server.h"
@ -67,9 +66,9 @@ Host_Color_f (void)
char playercolor; char playercolor;
if (Cmd_Argc () == 1) { 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); (cl_color->int_val) & 0x0f);
Con_Printf ("color <0-13> [0-13]\n"); Sys_Printf ("color <0-13> [0-13]\n");
return; return;
} }

View file

@ -38,7 +38,6 @@ static __attribute__ ((used)) const char rcsid[] =
# include <strings.h> # include <strings.h>
#endif #endif
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/hash.h" #include "QF/hash.h"
#include "QF/image.h" #include "QF/image.h"
@ -165,7 +164,7 @@ Skin_Cache (skin_t *skin)
snprintf (name, sizeof (name), "skins/%s.pcx", skin->name); snprintf (name, sizeof (name), "skins/%s.pcx", skin->name);
QFS_FOpenFile (name, &file); QFS_FOpenFile (name, &file);
if (!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); snprintf (name, sizeof (name), "skins/%s.pcx", baseskin->string);
QFS_FOpenFile (name, &file); QFS_FOpenFile (name, &file);
if (!file) { if (!file) {
@ -185,7 +184,7 @@ Skin_Cache (skin_t *skin)
if (!tex || tex->width > 320 || tex->height > 200) { if (!tex || tex->width > 320 || tex->height > 200) {
skin->failedload = true; skin->failedload = true;
Con_Printf ("Bad skin %s\n", name); Sys_Printf ("Bad skin %s\n", name);
return NULL; return NULL;
} }

View file

@ -31,7 +31,6 @@
static __attribute__ ((used)) const char rcsid[] = static __attribute__ ((used)) const char rcsid[] =
"$Id$"; "$Id$";
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/sys.h" #include "QF/sys.h"
@ -65,7 +64,7 @@ SV_CheckStuck (edict_t *ent)
VectorCopy (SVvector (ent, origin), org); VectorCopy (SVvector (ent, origin), org);
VectorCopy (SVvector (ent, oldorigin), SVvector (ent, origin)); VectorCopy (SVvector (ent, oldorigin), SVvector (ent, origin));
if (!SV_TestEntityPosition (ent)) { if (!SV_TestEntityPosition (ent)) {
Con_DPrintf ("Unstuck.\n"); Sys_DPrintf ("Unstuck.\n");
SV_LinkEdict (ent, true); SV_LinkEdict (ent, true);
return; return;
} }
@ -77,14 +76,14 @@ SV_CheckStuck (edict_t *ent)
SVvector (ent, origin)[1] = org[1] + j; SVvector (ent, origin)[1] = org[1] + j;
SVvector (ent, origin)[2] = org[2] + z; SVvector (ent, origin)[2] = org[2] + z;
if (!SV_TestEntityPosition (ent)) { if (!SV_TestEntityPosition (ent)) {
Con_DPrintf ("Unstuck.\n"); Sys_DPrintf ("Unstuck.\n");
SV_LinkEdict (ent, true); SV_LinkEdict (ent, true);
return; return;
} }
} }
VectorCopy (org, SVvector (ent, origin)); VectorCopy (org, SVvector (ent, origin));
Con_DPrintf ("player is stuck.\n"); Sys_DPrintf ("player is stuck.\n");
} }
static qboolean static qboolean
@ -207,7 +206,7 @@ SV_TryUnstick (edict_t *ent, vec3_t oldvel)
if (fabs (oldorg[1] - SVvector (ent, origin)[1]) > 4 if (fabs (oldorg[1] - SVvector (ent, origin)[1]) > 4
|| fabs (oldorg[0] - SVvector (ent, origin)[0]) > 4) { || fabs (oldorg[0] - SVvector (ent, origin)[0]) > 4) {
// Con_DPrintf ("unstuck!\n"); // Sys_DPrintf ("unstuck!\n");
return clip; return clip;
} }
// go back to the original pos and try again // go back to the original pos and try again

View file

@ -36,7 +36,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/cdaudio.h" #include "QF/cdaudio.h"
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/csqc.h" #include "QF/csqc.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/draw.h" #include "QF/draw.h"
@ -141,9 +140,9 @@ color_f (void)
char playercolor; char playercolor;
if (Cmd_Argc () <= 1) { 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); (host_client->colors) & 0x0f);
Con_Printf ("color <0-13> [0-13]\n"); Sys_Printf ("color <0-13> [0-13]\n");
return; return;
} }

View file

@ -31,7 +31,6 @@
static __attribute__ ((used)) const char rcsid[] = static __attribute__ ((used)) const char rcsid[] =
"$Id$"; "$Id$";
#include "QF/console.h"
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/msg.h" #include "QF/msg.h"
@ -144,7 +143,7 @@ SV_StartSound (edict_t *entity, int channel, const char *sample, int volume,
break; break;
if (sound_num == MAX_SOUNDS || !sv.sound_precache[sound_num]) { 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; return;
} }
@ -248,7 +247,7 @@ SV_ConnectClient (int clientnum)
client = svs.clients + 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; edictnum = clientnum + 1;
@ -409,7 +408,7 @@ SV_WriteEntitiesToClient (edict_t *clent, sizebuf_t *msg)
} }
if (msg->maxsize - msg->cursize < 16) { if (msg->maxsize - msg->cursize < 16) {
Con_Printf ("packet overflow\n"); Sys_Printf ("packet overflow\n");
return; return;
} }
// send an update // send an update
@ -909,7 +908,7 @@ SV_SpawnServer (const char *server)
if (hostname->string[0] == 0) if (hostname->string[0] == 0)
Cvar_Set (hostname, "UNNAMED"); 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 svs.changelevel_issued = false; // now safe to issue another
// tell all connected clients that we are going to a new level // 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); snprintf (sv.modelname, sizeof (sv.modelname), "maps/%s.bsp", server);
sv.worldmodel = Mod_ForName (sv.modelname, false); sv.worldmodel = Mod_ForName (sv.modelname, false);
if (!sv.worldmodel) { 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; sv.active = false;
S_UnblockSound (); S_UnblockSound ();
return; return;
@ -1040,6 +1039,6 @@ SV_SpawnServer (const char *server)
if (host_client->active) if (host_client->active)
SV_SendServerinfo (host_client); SV_SendServerinfo (host_client);
Con_DPrintf ("Server spawned.\n"); Sys_DPrintf ("Server spawned.\n");
S_UnblockSound (); S_UnblockSound ();
} }

View file

@ -31,7 +31,6 @@
static __attribute__ ((used)) const char rcsid[] = static __attribute__ ((used)) const char rcsid[] =
"$Id$"; "$Id$";
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/sys.h" #include "QF/sys.h"
@ -85,7 +84,7 @@ SV_CheckAllEnts (void)
continue; continue;
if (SV_TestEntityPosition (check)) if (SV_TestEntityPosition (check))
Con_Printf ("entity in invalid position\n"); Sys_Printf ("entity in invalid position\n");
} }
} }
#endif #endif
@ -97,13 +96,13 @@ SV_CheckVelocity (edict_t *ent)
// bound velocity // bound velocity
for (i = 0; i < 3; i++) { for (i = 0; i < 3; i++) {
if (IS_NAN (SVvector (ent, velocity)[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, PR_GetString (&sv_pr_state, SVstring (ent,
classname))); classname)));
SVvector (ent, velocity)[i] = 0; SVvector (ent, velocity)[i] = 0;
} }
if (IS_NAN (SVvector (ent, origin)[i])) { 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, PR_GetString (&sv_pr_state, SVstring (ent,
classname))); classname)));
SVvector (ent, origin)[i] = 0; SVvector (ent, origin)[i] = 0;

View file

@ -41,7 +41,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/cbuf.h" #include "QF/cbuf.h"
#include "QF/clip_hull.h" #include "QF/clip_hull.h"
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/msg.h" #include "QF/msg.h"
#include "QF/ruamoko.h" #include "QF/ruamoko.h"
@ -73,7 +72,7 @@ PF_error (progs_t *pr)
edict_t *ed; edict_t *ed;
s = PF_VarString (pr, 0); 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); PR_GetString (pr, pr->pr_xfunction->descriptor->s_name), s);
ed = PROG_TO_EDICT (pr, *sv_globals.self); ed = PROG_TO_EDICT (pr, *sv_globals.self);
ED_Print (pr, ed); ED_Print (pr, ed);
@ -97,7 +96,7 @@ PF_objerror (progs_t *pr)
edict_t *ed; edict_t *ed;
s = PF_VarString (pr, 0); 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); PR_GetString (pr, pr->pr_xfunction->descriptor->s_name), s);
ed = PROG_TO_EDICT (pr, *sv_globals.self); ed = PROG_TO_EDICT (pr, *sv_globals.self);
ED_Print (pr, ed); ED_Print (pr, ed);
@ -305,7 +304,7 @@ PF_sprint (progs_t *pr)
s = PF_VarString (pr, 1); s = PF_VarString (pr, 1);
if (entnum < 1 || entnum > svs.maxclients) { 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; return;
} }
@ -334,7 +333,7 @@ PF_centerprint (progs_t *pr)
s = PF_VarString (pr, 1); s = PF_VarString (pr, 1);
if (entnum < 1 || entnum > svs.maxclients) { 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; return;
} }
@ -383,7 +382,7 @@ PF_ambientsound (progs_t *pr)
break; break;
if (!*check) { if (!*check) {
Con_Printf ("no precache: %s\n", samp); Sys_Printf ("no precache: %s\n", samp);
return; return;
} }

View file

@ -39,9 +39,9 @@ static __attribute__ ((used)) const char rcsid[] =
#endif #endif
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/quakefs.h" #include "QF/quakefs.h"
#include "QF/sys.h"
#include "compat.h" #include "compat.h"
#include "host.h" #include "host.h"
@ -129,7 +129,7 @@ ED_PrintEdict_f (void)
int i; int i;
i = atoi (Cmd_Argv (1)); 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); ED_PrintNum (&sv_pr_state, i);
} }
@ -143,7 +143,7 @@ static void
PR_Profile_f (void) PR_Profile_f (void)
{ {
if (!sv_pr_state.progs) { if (!sv_pr_state.progs) {
Con_Printf ("no progs loaded\n"); Sys_Printf ("no progs loaded\n");
return; return;
} }
PR_Profile (&sv_pr_state); PR_Profile (&sv_pr_state);
@ -480,7 +480,7 @@ SV_LoadProgs (void)
sv_range = PR_RANGE_NONE; sv_range = PR_RANGE_NONE;
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, PR_LoadProgs (&sv_pr_state, progs_name, sv.max_edicts,
sv_progs_zone->int_val * 1024); sv_progs_zone->int_val * 1024);

View file

@ -39,7 +39,6 @@ static __attribute__ ((used)) const char rcsid[] =
#endif #endif
#include "QF/cbuf.h" #include "QF/cbuf.h"
#include "QF/console.h"
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/keys.h" #include "QF/keys.h"
@ -462,7 +461,7 @@ SV_ReadClientMessage (void)
nextmsg: nextmsg:
ret = NET_GetMessage (host_client->netconnection); ret = NET_GetMessage (host_client->netconnection);
if (ret == -1) { if (ret == -1) {
Con_Printf ("SV_ReadClientMessage: NET_GetMessage failed\n"); Sys_Printf ("SV_ReadClientMessage: NET_GetMessage failed\n");
return false; return false;
} }
if (!ret) if (!ret)
@ -475,7 +474,7 @@ SV_ReadClientMessage (void)
return false; // a command caused an error return false; // a command caused an error
if (net_message->badread) { if (net_message->badread) {
Con_Printf ("SV_ReadClientMessage: badread\n"); Sys_Printf ("SV_ReadClientMessage: badread\n");
return false; return false;
} }
@ -486,7 +485,7 @@ SV_ReadClientMessage (void)
goto nextmsg; // end of message goto nextmsg; // end of message
default: default:
Con_Printf ("SV_ReadClientMessage: unknown command char\n"); Sys_Printf ("SV_ReadClientMessage: unknown command char\n");
return false; return false;
case clc_nop: case clc_nop:
@ -541,7 +540,7 @@ SV_ReadClientMessage (void)
else if (ret == 1) else if (ret == 1)
Cmd_ExecuteString (s, src_client); Cmd_ExecuteString (s, src_client);
else else
Con_DPrintf ("%s tried to %s\n", host_client->name, s); Sys_DPrintf ("%s tried to %s\n", host_client->name, s);
break; break;
case clc_disconnect: case clc_disconnect:

View file

@ -51,7 +51,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/time.h> #include <sys/time.h>
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/qargs.h" #include "QF/qargs.h"
#include "QF/sys.h" #include "QF/sys.h"
@ -92,7 +91,7 @@ main (int c, const char *v[])
if (!sys_nostdout->int_val) { if (!sys_nostdout->int_val) {
fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) | O_NONBLOCK); 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; oldtime = Sys_DoubleTime () - 0.1;

View file

@ -46,12 +46,12 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/cbuf.h" #include "QF/cbuf.h"
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/checksum.h" #include "QF/checksum.h"
#include "QF/dstring.h" #include "QF/dstring.h"
#include "QF/hash.h" #include "QF/hash.h"
#include "QF/idparse.h" #include "QF/idparse.h"
#include "QF/info.h" #include "QF/info.h"
#include "QF/sys.h"
#include "QF/va.h" #include "QF/va.h"
#include "qw/bothdefs.h" #include "qw/bothdefs.h"
@ -577,7 +577,7 @@ client_parse_message (client_t *cl)
MSG_GetReadCount (net_message) - MSG_GetReadCount (net_message) -
checksumIndex - 1, seq_hash); checksumIndex - 1, seq_hash);
if (calculatedChecksum != checksum) { if (calculatedChecksum != checksum) {
Con_DPrintf Sys_DPrintf
("Failed command checksum for %s(%d) (%d != %d)\n", ("Failed command checksum for %s(%d) (%d != %d)\n",
Info_ValueForKey (cl->userinfo, "name"), Info_ValueForKey (cl->userinfo, "name"),
cl->netchan.incoming_sequence, checksum, cl->netchan.incoming_sequence, checksum,

View file

@ -107,12 +107,12 @@ qtv_print (const char *fmt, va_list args)
char stamp[123]; char stamp[123];
if (pending) { if (pending) {
Con_Printf ("%s", msg->str); Sys_Printf ("%s", msg->str);
} else { } else {
mytime = time (NULL); mytime = time (NULL);
local = localtime (&mytime); local = localtime (&mytime);
strftime (stamp, sizeof (stamp), "[%b %e %X] ", local); 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') { if (msg->str[0] && msg->str[strlen (msg->str) - 1] != '\n') {
pending = 1; pending = 1;
@ -347,7 +347,7 @@ qtv_connectionless_packet (void)
default: default:
goto bad_packet; goto bad_packet;
case A2C_PRINT: case A2C_PRINT:
Con_Printf ("%s", str + 1); Sys_Printf ("%s", str + 1);
break; break;
case A2A_PING: case A2A_PING:
qtv_ping (); qtv_ping ();
@ -355,7 +355,7 @@ qtv_connectionless_packet (void)
} }
} else { } else {
bad_packet: 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); NET_AdrToString (net_from), str);
} }
} }
@ -381,7 +381,7 @@ main (int argc, const char *argv[])
qtv_init (); qtv_init ();
Con_Printf ("Ohayou gozaimasu\n"); Sys_Printf ("Ohayou gozaimasu\n");
while (1) { while (1) {
Cbuf_Execute_Stack (qtv_cbuf); Cbuf_Execute_Stack (qtv_cbuf);

View file

@ -45,7 +45,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <math.h> #include <math.h>
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/msg.h" #include "QF/msg.h"
@ -623,7 +622,7 @@ Cam_FinishMove (usercmd_t *cmd)
} }
oldbuttons |= BUTTON_JUMP; // don't jump again until released oldbuttons |= BUTTON_JUMP; // don't jump again until released
} }
// Con_Printf ("Selecting track target...\n"); // Sys_Printf ("Selecting track target...\n");
if (locked && autocam) if (locked && autocam)
end = (spec_track + 1) % MAX_CLIENTS; end = (spec_track + 1) % MAX_CLIENTS;
@ -647,7 +646,7 @@ Cam_FinishMove (usercmd_t *cmd)
ideal_track = i; ideal_track = i;
return; return;
} }
Con_Printf ("No target found ...\n"); Sys_Printf ("No target found ...\n");
autocam = locked = false; autocam = locked = false;
} }

View file

@ -40,8 +40,8 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/cbuf.h" #include "QF/cbuf.h"
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/msg.h" #include "QF/msg.h"
#include "QF/sys.h"
#include "QF/teamplay.h" #include "QF/teamplay.h"
#include "client.h" #include "client.h"
@ -58,7 +58,7 @@ void
CL_Cmd_ForwardToServer (void) CL_Cmd_ForwardToServer (void)
{ {
if (cls.state == ca_disconnected) { 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; return;
} }
@ -96,7 +96,7 @@ static void
CL_Cmd_ForwardToServer_f (void) CL_Cmd_ForwardToServer_f (void)
{ {
if (cls.state == ca_disconnected) { 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; return;
} }

View file

@ -47,7 +47,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include <time.h> #include <time.h>
#include "QF/cbuf.h" #include "QF/cbuf.h"
#include "QF/console.h"
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/msg.h" #include "QF/msg.h"
@ -391,7 +390,7 @@ readit:
goto readit; goto readit;
default: default:
Con_Printf ("Corrupted demo.\n"); Sys_Printf ("Corrupted demo.\n");
CL_StopPlayback (); CL_StopPlayback ();
return 0; return 0;
} }
@ -437,7 +436,7 @@ void
CL_Stop_f (void) CL_Stop_f (void)
{ {
if (!cls.demorecording) { if (!cls.demorecording) {
Con_Printf ("Not recording a demo.\n"); Sys_Printf ("Not recording a demo.\n");
return; return;
} }
// write a disconnect message to the demo file // write a disconnect message to the demo file
@ -451,7 +450,7 @@ CL_Stop_f (void)
Qclose (cls.demofile); Qclose (cls.demofile);
cls.demofile = NULL; cls.demofile = NULL;
cls.demorecording = false; 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); cls.demofile = QFS_WOpen (name, 0);
} }
if (!cls.demofile) { if (!cls.demofile) {
Con_Printf ("ERROR: couldn't open.\n"); Sys_Printf ("ERROR: couldn't open.\n");
return; return;
} }
Con_Printf ("recording to %s.\n", name); Sys_Printf ("recording to %s.\n", name);
cls.demorecording = true; cls.demorecording = true;
/*-------------------------------------------------*/ /*-------------------------------------------------*/
@ -819,12 +818,12 @@ CL_Record_f (void)
if (Cmd_Argc () > 2) { if (Cmd_Argc () > 2) {
// we use a demo name like year-month-day-hours-minutes-mapname.qwd // we use a demo name like year-month-day-hours-minutes-mapname.qwd
// if there is no argument // if there is no argument
Con_Printf ("record [demoname]\n"); Sys_Printf ("record [demoname]\n");
return; return;
} }
if (cls.demoplayback || cls.state != ca_active) { 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; return;
} }
@ -849,12 +848,12 @@ CL_ReRecord_f (void)
c = Cmd_Argc (); c = Cmd_Argc ();
if (c != 2) { if (c != 2) {
Con_Printf ("rerecord <demoname>\n"); Sys_Printf ("rerecord <demoname>\n");
return; return;
} }
if (!*cls.servername) { if (!*cls.servername) {
Con_Printf ("No server to reconnect to...\n"); Sys_Printf ("No server to reconnect to...\n");
return; return;
} }
@ -869,11 +868,11 @@ CL_ReRecord_f (void)
cls.demofile = QFS_WOpen (name, 0); cls.demofile = QFS_WOpen (name, 0);
if (!cls.demofile) { if (!cls.demofile) {
Con_Printf ("ERROR: couldn't open.\n"); Sys_Printf ("ERROR: couldn't open.\n");
return; return;
} }
Con_Printf ("recording to %s.\n", name); Sys_Printf ("recording to %s.\n", name);
cls.demorecording = true; cls.demorecording = true;
CL_Disconnect (); CL_Disconnect ();
@ -889,10 +888,10 @@ CL_StartDemo (void)
strncpy (name, demoname, sizeof (name)); strncpy (name, demoname, sizeof (name));
QFS_DefaultExtension (name, ".qwd"); 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); QFS_FOpenFile (name, &cls.demofile);
if (!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 cls.demonum = -1; // stop demo loop
return; return;
} }
@ -901,9 +900,9 @@ CL_StartDemo (void)
net_blocksend = 1; net_blocksend = 1;
if (strequal (QFS_FileExtension (name), ".mvd")) { if (strequal (QFS_FileExtension (name), ".mvd")) {
cls.demoplayback2 = true; cls.demoplayback2 = true;
Con_Printf ("mvd\n"); Sys_Printf ("mvd\n");
} else { } else {
Con_Printf ("qwd\n"); Sys_Printf ("qwd\n");
} }
CL_SetState (ca_demostart); CL_SetState (ca_demostart);
Netchan_Setup (&cls.netchan, net_from, 0, NC_SEND_QPORT); Netchan_Setup (&cls.netchan, net_from, 0, NC_SEND_QPORT);
@ -927,7 +926,7 @@ void
CL_PlayDemo_f (void) CL_PlayDemo_f (void)
{ {
if (Cmd_Argc () != 2) { if (Cmd_Argc () != 2) {
Con_Printf ("play <demoname> : plays a demo\n"); Sys_Printf ("play <demoname> : plays a demo\n");
return; return;
} }
timedemo_runs = timedemo_count = 1; // make sure looped timedemos stop timedemo_runs = timedemo_count = 1; // make sure looped timedemos stop
@ -978,7 +977,7 @@ CL_FinishTimeDemo (void)
time = Sys_DoubleTime () - cls.td_starttime; time = Sys_DoubleTime () - cls.td_starttime;
if (!time) if (!time)
time = 1; 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); frames == 1 ? "" : "s", time, frames / time);
CL_TimeFrames_DumpLog (); CL_TimeFrames_DumpLog ();
@ -1007,10 +1006,10 @@ CL_FinishTimeDemo (void)
for (i = 0; i < timedemo_runs; i++) for (i = 0; i < timedemo_runs; i++)
variance += sqr (timedemo_data[i].fps - average); variance += sqr (timedemo_data[i].fps - average);
variance /= timedemo_runs; variance /= timedemo_runs;
Con_Printf ("timedemo stats for %d runs:\n", timedemo_runs); Sys_Printf ("timedemo stats for %d runs:\n", timedemo_runs);
Con_Printf (" average fps: %.3f\n", average); Sys_Printf (" average fps: %.3f\n", average);
Con_Printf (" min/max fps: %.3f/%.3f\n", min, max); Sys_Printf (" min/max fps: %.3f/%.3f\n", min, max);
Con_Printf ("std deviation: %.3f fps\n", sqrt (variance)); Sys_Printf ("std deviation: %.3f fps\n", sqrt (variance));
} }
free (timedemo_data); free (timedemo_data);
timedemo_data = 0; timedemo_data = 0;
@ -1028,7 +1027,7 @@ void
CL_TimeDemo_f (void) CL_TimeDemo_f (void)
{ {
if (Cmd_Argc () < 2 || Cmd_Argc () > 3) { if (Cmd_Argc () < 2 || Cmd_Argc () > 3) {
Con_Printf ("timedemo <demoname> [count]: gets demo speeds\n"); Sys_Printf ("timedemo <demoname> [count]: gets demo speeds\n");
return; return;
} }
timedemo_runs = timedemo_count = 1; // make sure looped timedemos stop timedemo_runs = timedemo_count = 1; // make sure looped timedemos stop
@ -1101,10 +1100,10 @@ CL_TimeFrames_DumpLog (void)
if (demo_timeframes_isactive == 0) if (demo_timeframes_isactive == 0)
return; return;
Con_Printf ("Dumping Timed Frames log: %s\n", filename); Sys_Printf ("Dumping Timed Frames log: %s\n", filename);
outputfile = QFS_Open (filename, "w"); outputfile = QFS_Open (filename, "w");
if (!outputfile) { if (!outputfile) {
Con_Printf ("Could not open: %s\n", filename); Sys_Printf ("Could not open: %s\n", filename);
return; return;
} }
for (i = 1; i < demo_timeframes_index; i++) { for (i = 1; i < demo_timeframes_index; i++) {

View file

@ -38,12 +38,12 @@ static __attribute__ ((used)) const char rcsid[] =
# include <strings.h> # include <strings.h>
#endif #endif
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/locs.h" #include "QF/locs.h"
#include "QF/msg.h" #include "QF/msg.h"
#include "QF/render.h" #include "QF/render.h"
#include "QF/skin.h" #include "QF/skin.h"
#include "QF/sys.h"
#include "qw/msg_ucmd.h" #include "qw/msg_ucmd.h"
@ -262,7 +262,7 @@ FlushEntityPacket (void)
entity_state_t olde, newe; entity_state_t olde, newe;
int word; int word;
Con_DPrintf ("FlushEntityPacket\n"); Sys_DPrintf ("FlushEntityPacket\n");
memset (&olde, 0, sizeof (olde)); memset (&olde, 0, sizeof (olde));
@ -303,7 +303,7 @@ CL_ParsePacketEntities (qboolean delta)
if (cls.demoplayback2) if (cls.demoplayback2)
from = oldpacket = (cls.netchan.incoming_sequence - 1); from = oldpacket = (cls.netchan.incoming_sequence - 1);
if ((from & UPDATE_MASK) != (oldpacket & UPDATE_MASK)) if ((from & UPDATE_MASK) != (oldpacket & UPDATE_MASK))
Con_DPrintf ("WARNING: from mismatch\n"); Sys_DPrintf ("WARNING: from mismatch\n");
} else } else
oldpacket = -1; oldpacket = -1;
@ -351,7 +351,7 @@ CL_ParsePacketEntities (qboolean delta)
while (newnum > oldnum) { while (newnum > oldnum) {
if (full) { if (full) {
Con_Printf ("WARNING: oldcopy on full update"); Sys_Printf ("WARNING: oldcopy on full update");
FlushEntityPacket (); FlushEntityPacket ();
return; return;
} }
@ -370,7 +370,7 @@ CL_ParsePacketEntities (qboolean delta)
if (word & U_REMOVE) { if (word & U_REMOVE) {
if (full) { if (full) {
cl.validsequence = 0; cl.validsequence = 0;
Con_Printf ("WARNING: U_REMOVE on full update\n"); Sys_Printf ("WARNING: U_REMOVE on full update\n");
FlushEntityPacket (); FlushEntityPacket ();
return; return;
} }
@ -389,7 +389,7 @@ CL_ParsePacketEntities (qboolean delta)
if (newnum == oldnum) { // delta from previous if (newnum == oldnum) { // delta from previous
if (full) { if (full) {
cl.validsequence = 0; cl.validsequence = 0;
Con_Printf ("WARNING: delta on full update"); Sys_Printf ("WARNING: delta on full update");
} }
if (word & U_REMOVE) { // Clear the entity if (word & U_REMOVE) { // Clear the entity
entity_t *ent = &cl_packet_ents[newnum]; entity_t *ent = &cl_packet_ents[newnum];
@ -1010,7 +1010,7 @@ CL_SetSolidEntities (void)
if (cl.model_precache[state->modelindex]->hulls[1].firstclipnode if (cl.model_precache[state->modelindex]->hulls[1].firstclipnode
|| cl.model_precache[state->modelindex]->clipbox) { || cl.model_precache[state->modelindex]->clipbox) {
if (pmove.numphysent == MAX_PHYSENTS) { 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"); "quakeforge-devel@lists.quakeforge.net\n");
break; break;
} }
@ -1078,11 +1078,11 @@ CL_SetUpPlayerPrediction (qboolean dopred)
msec = 500 * (playertime - state->state_time); msec = 500 * (playertime - state->state_time);
if (msec <= 0 || !dopred) { if (msec <= 0 || !dopred) {
VectorCopy (state->pls.origin, pplayer->origin); VectorCopy (state->pls.origin, pplayer->origin);
// Con_DPrintf ("nopredict\n"); // Sys_DPrintf ("nopredict\n");
} else { } else {
// predict players movement // predict players movement
state->pls.cmd.msec = msec = min (msec, 255); 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); CL_PredictUsercmd (state, &exact, &state->pls.cmd, false);
VectorCopy (exact.pls.origin, pplayer->origin); VectorCopy (exact.pls.origin, pplayer->origin);
@ -1123,7 +1123,7 @@ CL_SetSolidPlayers (int playernum)
continue; // dead players aren't solid continue; // dead players aren't solid
if (pmove.numphysent == MAX_PHYSENTS) { 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"); "quakeforge-devel@lists.quakeforge.net\n");
break; break;
} }

View file

@ -38,8 +38,8 @@ static __attribute__ ((used)) const char rcsid[] =
#include <curl/curl.h> #include <curl/curl.h>
#include "QF/console.h"
#include "QF/dstring.h" #include "QF/dstring.h"
#include "QF/sys.h"
#include "cl_http.h" #include "cl_http.h"
#include "cl_parse.h" #include "cl_parse.h"
@ -60,7 +60,7 @@ static size_t
http_write (void *ptr, size_t size, size_t nmemb, void *stream) http_write (void *ptr, size_t size, size_t nmemb, void *stream)
{ {
if (!cls.download) { if (!cls.download) {
Con_Printf ("http_write: unexpected call\n"); Sys_Printf ("http_write: unexpected call\n");
return -1; return -1;
} }
return Qwrite (cls.download, ptr, size * nmemb); return Qwrite (cls.download, ptr, size * nmemb);
@ -114,7 +114,7 @@ CL_HTTP_Update (void)
if (response_code == 200) { if (response_code == 200) {
CL_FinishDownload (); CL_FinishDownload ();
} else { } else {
Con_Printf ("download failed: %ld\n", response_code); Sys_Printf ("download failed: %ld\n", response_code);
CL_FailDownload (); CL_FailDownload ();
} }
curl_multi_remove_handle (multi_handle, easy_handle); curl_multi_remove_handle (multi_handle, easy_handle);

View file

@ -40,11 +40,11 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/checksum.h" #include "QF/checksum.h"
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/input.h" #include "QF/input.h"
#include "QF/keys.h" #include "QF/keys.h"
#include "QF/msg.h" #include "QF/msg.h"
#include "QF/sys.h"
#include "QF/teamplay.h" #include "QF/teamplay.h"
#include "QF/va.h" #include "QF/va.h"
@ -109,7 +109,7 @@ KeyDown (kbutton_t *b)
else if (!b->down[1]) else if (!b->down[1])
b->down[1] = k; b->down[1] = k;
else { else {
Con_Printf ("Three keys down for a button!\n"); Sys_Printf ("Three keys down for a button!\n");
return; return;
} }

Some files were not shown because too many files have changed in this diff Show more