Overhaul to console structure, a bit
This commit is contained in:
+19
-19
@@ -99,7 +99,7 @@ Max_Edicts_f -- johnfitz
|
||||
static void Max_Edicts_f(convar *var) {
|
||||
//TODO: clamp it here?
|
||||
if (cls.state == ca_connected || sv.active)
|
||||
Con_Printf("Changes to max_edicts will not take effect until the next time a map is loaded.\n");
|
||||
console::info("Changes to max_edicts will not take effect until the next time a map is loaded.\n");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -109,7 +109,7 @@ Max_Fps_f -- ericw
|
||||
*/
|
||||
static void Max_Fps_f(convar *var) {
|
||||
if (var->value > 72)
|
||||
Con_Warning("host_maxfps above 72 breaks physics.\n");
|
||||
console::warn("host_maxfps above 72 breaks physics.\n");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -124,7 +124,7 @@ void Host_EndGame(const char *message, ...) {
|
||||
va_start(argptr, message);
|
||||
q_vsnprintf(string, sizeof(string), message, argptr);
|
||||
va_end(argptr);
|
||||
Con_DPrintf("Host_EndGame: %s\n", string);
|
||||
console::debug("Host_EndGame: %s\n", string);
|
||||
|
||||
if (sv.active)
|
||||
Host_ShutdownServer(false);
|
||||
@@ -161,7 +161,7 @@ void Host_Error(const char *error, ...) {
|
||||
va_start(argptr, error);
|
||||
q_vsnprintf(string, sizeof(string), error, argptr);
|
||||
va_end(argptr);
|
||||
Con_Printf("Host_Error: %s\n", string);
|
||||
console::info("Host_Error: %s\n", string);
|
||||
|
||||
if (sv.active)
|
||||
Host_ShutdownServer(false);
|
||||
@@ -222,9 +222,9 @@ void Host_FindMaxClients(void) {
|
||||
}
|
||||
|
||||
void Host_Version_f(void) {
|
||||
Con_Printf("Quake Version %1.2f\n", VERSION);
|
||||
Con_Printf("QuakeSpasm Version " QUAKESPASM_VER_STRING "\n");
|
||||
Con_Printf("Exe: " __TIME__ " " __DATE__ "\n");
|
||||
console::info("Quake Version %1.2f\n", VERSION);
|
||||
console::info("QuakeSpasm Version " QUAKESPASM_VER_STRING "\n");
|
||||
console::info("Exe: " __TIME__ " " __DATE__ "\n");
|
||||
}
|
||||
|
||||
/* cvar callback functions : */
|
||||
@@ -298,7 +298,7 @@ void Host_WriteConfiguration(void) {
|
||||
if (host_initialized && !isDedicated && !host_parms->errstate) {
|
||||
f = fopen(va("%s/config.cfg", com_gamedir), "w");
|
||||
if (!f) {
|
||||
Con_Printf("Couldn't write config.cfg.\n");
|
||||
console::info("Couldn't write config.cfg.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -487,7 +487,7 @@ void Host_ShutdownServer(bool crash) {
|
||||
MSG_WriteByte(&buf, svc_disconnect);
|
||||
count = NET_SendToAll(&buf, 5.0);
|
||||
if (count)
|
||||
Con_Printf("Host_ShutdownServer: NET_SendToAll failed for %u clients\n", count);
|
||||
console::info("Host_ShutdownServer: NET_SendToAll failed for %u clients\n", count);
|
||||
|
||||
for (i = 0, host_client = svs.clients; i < svs.maxclients; i++, host_client++)
|
||||
if (host_client->active)
|
||||
@@ -510,7 +510,7 @@ not reinitialize anything.
|
||||
================
|
||||
*/
|
||||
void Host_ClearMemory(void) {
|
||||
Con_DPrintf("Clearing memory\n");
|
||||
console::debug("Clearing memory\n");
|
||||
D_FlushCaches();
|
||||
Mod_ClearAll();
|
||||
Sky_ClearAll();
|
||||
@@ -617,7 +617,7 @@ void Host_ServerFrame(void) {
|
||||
active++;
|
||||
}
|
||||
if (active > 600 && dev_peakstats.edicts <= 600)
|
||||
Con_DWarning("%i edicts exceeds standard limit of 600 (max = %d).\n", active, sv.max_edicts);
|
||||
console::dev_warn("%i edicts exceeds standard limit of 600 (max = %d).\n", active, sv.max_edicts);
|
||||
dev_stats.edicts = active;
|
||||
dev_peakstats.edicts = std::max(active, dev_peakstats.edicts);
|
||||
}
|
||||
@@ -720,7 +720,7 @@ void _Host_Frame(float time) {
|
||||
time3 = Sys_DoubleTime();
|
||||
pass2 = (time2 - time1) * 1000;
|
||||
pass3 = (time3 - time2) * 1000;
|
||||
Con_Printf("%3i tot %3i server %3i gfx %3i snd\n",
|
||||
console::info("%3i tot %3i server %3i gfx %3i snd\n",
|
||||
pass1 + pass2 + pass3, pass1, pass2, pass3);
|
||||
}
|
||||
|
||||
@@ -757,7 +757,7 @@ void Host_Frame(float time) {
|
||||
c++;
|
||||
}
|
||||
|
||||
Con_Printf("serverprofile: %2i clients %2i msec\n", c, m);
|
||||
console::info("serverprofile: %2i clients %2i msec\n", c, m);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -790,15 +790,15 @@ void Host_Init(void) {
|
||||
W_LoadWadFile(); //johnfitz -- filename is now hard-coded for honesty
|
||||
if (cls.state != ca_dedicated) {
|
||||
Key_Init();
|
||||
Con_Init();
|
||||
console::init();
|
||||
}
|
||||
PR_Init();
|
||||
Mod_Init();
|
||||
NET_Init();
|
||||
SV_Init();
|
||||
|
||||
Con_Printf("Exe: " __TIME__ " " __DATE__ "\n");
|
||||
Con_Printf("%4.1f megabyte heap\n", host_parms->memsize / (1024 * 1024.0));
|
||||
console::info("Exe: " __TIME__ " " __DATE__ "\n");
|
||||
console::info("%4.1f megabyte heap\n", host_parms->memsize / (1024 * 1024.0));
|
||||
|
||||
if (cls.state != ca_dedicated) {
|
||||
host_colormap = (byte *) COM_LoadHunkFile("gfx/colormap.lmp", NULL);
|
||||
@@ -830,7 +830,7 @@ void Host_Init(void) {
|
||||
host_hunklevel = Hunk_LowMark();
|
||||
|
||||
host_initialized = true;
|
||||
Con_Printf("\n========= Quake Initialized =========\n\n");
|
||||
console::info("\n========= Quake Initialized =========\n\n");
|
||||
|
||||
if (cls.state != ca_dedicated) {
|
||||
command::buffer::insert_text("exec quake.rc\n");
|
||||
@@ -866,7 +866,7 @@ void Host_Shutdown(void) {
|
||||
}
|
||||
isdown = true;
|
||||
|
||||
// keep Con_Printf from trying to update the screen
|
||||
// keep console::info from trying to update the screen
|
||||
scr_disabled_for_loading = true;
|
||||
|
||||
Host_WriteConfiguration();
|
||||
@@ -874,7 +874,7 @@ void Host_Shutdown(void) {
|
||||
NET_Shutdown();
|
||||
|
||||
if (cls.state != ca_dedicated) {
|
||||
if (con_initialized)
|
||||
if (console::initialized)
|
||||
History_Shutdown();
|
||||
music::shutdown();
|
||||
CDAudio_Shutdown();
|
||||
|
||||
Reference in New Issue
Block a user