aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/jake2/qcommon/Com.java23
-rw-r--r--src/jake2/qcommon/Qcommon.java10
2 files changed, 23 insertions, 10 deletions
diff --git a/src/jake2/qcommon/Com.java b/src/jake2/qcommon/Com.java
index c8d7117..d3386d2 100644
--- a/src/jake2/qcommon/Com.java
+++ b/src/jake2/qcommon/Com.java
@@ -2,7 +2,7 @@
* Com.java
* Copyright (C) 2003
*
- * $Id: Com.java,v 1.10 2005-01-23 20:04:02 cawe Exp $
+ * $Id: Com.java,v 1.11 2005-02-06 19:25:55 salomo Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -43,6 +43,9 @@ import java.io.*;
public final class Com
{
+ static String debugContext = "";
+ static String _debugContext = "";
+
static int com_argc;
static String[] com_argv= new String[Defines.MAX_NUM_ARGVS];
@@ -339,26 +342,34 @@ public final class Com
public static void DPrintf(String fmt)
{
+ _debugContext = debugContext;
DPrintf(fmt, null);
+ _debugContext = "";
+ }
+
+ public static void dprintln(String fmt)
+ {
+ DPrintf(_debugContext + fmt + "\n", null);
}
public static void Printf(String fmt)
{
- Printf(fmt, null);
+ Printf(_debugContext + fmt, null);
}
public static void DPrintf(String fmt, Vargs vargs)
{
if (Globals.developer == null || Globals.developer.value == 0)
return; // don't confuse non-developers with techie stuff...
-
+ _debugContext = debugContext;
Printf(fmt, vargs);
+ _debugContext="";
}
public static void Printf(String fmt, Vargs vargs)
{
- // TODO Com.Printf ist nur zum testen
- String msg= sprintf(fmt, vargs);
+ // Com.Printf is for testing only.
+ String msg= sprintf(_debugContext + fmt, vargs);
if (rd_target != 0)
{
@@ -424,7 +435,7 @@ public final class Com
public static void Println(String fmt)
{
- Printf(fmt + "\n");
+ Printf(_debugContext + fmt + "\n");
}
public static String sprintf(String fmt, Vargs vargs)
diff --git a/src/jake2/qcommon/Qcommon.java b/src/jake2/qcommon/Qcommon.java
index 9f8a6a9..c9edb2f 100644
--- a/src/jake2/qcommon/Qcommon.java
+++ b/src/jake2/qcommon/Qcommon.java
@@ -2,7 +2,7 @@
* Qcommon.java
* Copyright 2003
*
- * $Id: Qcommon.java,v 1.13 2004-12-20 13:20:31 hzi Exp $
+ * $Id: Qcommon.java,v 1.14 2005-02-06 19:26:11 salomo Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -91,7 +91,7 @@ public final class Qcommon extends Globals {
Globals.host_speeds= Cvar.Get("host_speeds", "0", 0);
Globals.log_stats= Cvar.Get("log_stats", "0", 0);
- Globals.developer= Cvar.Get("developer", "0", 0);
+ Globals.developer= Cvar.Get("developer", "0", CVAR_ARCHIVE);
Globals.timescale= Cvar.Get("timescale", "0", 0);
Globals.fixedtime= Cvar.Get("fixedtime", "0", 0);
Globals.logfile_active= Cvar.Get("logfile", "0", 0);
@@ -206,12 +206,14 @@ public final class Qcommon extends Globals {
if (Globals.host_speeds.value != 0.0f)
time_before= Sys.Milliseconds();
-
+
+ Com.debugContext = "SV:";
SV_MAIN.SV_Frame(msec);
if (Globals.host_speeds.value != 0.0f)
time_between= Sys.Milliseconds();
-
+
+ Com.debugContext = "CL:";
CL.Frame(msec);
if (Globals.host_speeds.value != 0.0f) {