]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
changed a ton of developer cvar checks into developer_extra/insane
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 27 Dec 2009 10:49:34 +0000 (10:49 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 27 Dec 2009 10:49:34 +0000 (10:49 +0000)
checks, or simply Con_DPrintf calls
made developer a saved cvar

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9703 d7cf8633-e32d-0410-b094-e92efae38249

39 files changed:
cd_shared.c
cl_collision.c
cl_gecko.c
cl_parse.c
cl_particles.c
cl_video.c
collision.c
console.c
cvar.c
fs.c
ft2.c
gl_backend.c
gl_rmain.c
gl_rsurf.c
host.c
image.c
keys.c
libcurl.c
makefile.inc
model_alias.c
model_brush.c
model_shared.c
netconn.c
prvm_cmds.c
prvm_edict.c
prvm_exec.c
prvm_execprogram.h
quakedef.h
r_shadow.c
snd_alsa.c
snd_coreaudio.c
snd_sdl.c
snd_win.c
sv_main.c
sv_phys.c
svvm_cmds.c
vid_wgl.c
world.c
zone.c

index f00f66123aae8d245015acc4a5ee2ac87751b3af..b87cd2980d906ce84b1a280238bd376c1ce52728 100644 (file)
@@ -136,8 +136,8 @@ qboolean CDAudio_Play_real (int track, qboolean looping, qboolean complain)
        if (CDAudio_SysPlay(track) == -1)
                return false;
 
-       if(cdaudio.integer != 3 || developer.integer)
-               Con_Printf ("CD track %u playing...\n", track);
+       if(cdaudio.integer != 3)
+               Con_DPrintf ("CD track %u playing...\n", track);
 
        return true;
 }
@@ -269,8 +269,8 @@ void CDAudio_Play_byName (const char *trackname, qboolean looping)
                        S_SetChannelFlag (faketrack, CHANNELFLAG_LOCALSOUND, true); // not pausable
                        if(track >= 1)
                        {
-                               if(cdaudio.integer != 0 || developer.integer) // we don't need these messages if only fake tracks can be played anyway
-                                       Con_Printf ("Fake CD track %u playing...\n", track);
+                               if(cdaudio.integer != 0) // we don't need these messages if only fake tracks can be played anyway
+                                       Con_DPrintf ("Fake CD track %u playing...\n", track);
                        }
                        else
                                Con_DPrintf ("BGM track %s playing...\n", trackname);
index e9fd16fcf0886e345d0e7116a8c61b7a156272c6..a98d0b5c6525e6e686415044fde4362020bddf82 100644 (file)
@@ -157,8 +157,8 @@ void CL_LinkEdict(prvm_edict_t *ent)
 
                if( model != NULL )
                {
-                       if (!model->TraceBox && developer.integer >= 1)
-                               Con_Printf("edict %i: SOLID_BSP with non-collidable model\n", PRVM_NUM_FOR_EDICT(ent));
+                       if (!model->TraceBox)
+                               Con_DPrintf("edict %i: SOLID_BSP with non-collidable model\n", PRVM_NUM_FOR_EDICT(ent));
 
                        if (ent->fields.client->angles[0] || ent->fields.client->angles[2] || ent->fields.client->avelocity[0] || ent->fields.client->avelocity[2])
                        {
index 2aade4b4b874a343ba96bccfed5f6a11a5aceb13..b4f6542a53b3071cfaaa178c520edd3c330d5ff3 100644 (file)
@@ -405,9 +405,7 @@ static clgecko_t * cl_gecko_findunusedinstance( void ) {
                        return instance;
                }
        }
-       if( developer.integer > 0 ) {
-               Con_Printf( "cl_gecko_findunusedinstance: out of geckos\n" );
-       }
+       Con_DPrintf( "cl_gecko_findunusedinstance: out of geckos\n" );
        return NULL;
 }
 
@@ -415,9 +413,7 @@ clgecko_t * CL_Gecko_FindBrowser( const char *name ) {
        int i;
 
        if( !name || !*name || strncmp( name, CLGECKOPREFIX, sizeof( CLGECKOPREFIX ) - 1 ) != 0 ) {
-               if( developer.integer > 0 ) {
-                       Con_Printf( "CL_Gecko_FindBrowser: Bad gecko texture name '%s'!\n", name );
-               }
+               Con_DPrintf( "CL_Gecko_FindBrowser: Bad gecko texture name '%s'!\n", name );
                return NULL;
        }
 
@@ -428,9 +424,7 @@ clgecko_t * CL_Gecko_FindBrowser( const char *name ) {
                }
        }
 
-       if( developer.integer > 0 ) {
-               Con_Printf( "CL_Gecko_FindBrowser: No browser named '%s'!\n", name );
-       }
+       Con_DPrintf( "CL_Gecko_FindBrowser: No browser named '%s'!\n", name );
 
        return NULL;
 }
@@ -570,9 +564,7 @@ static qboolean CL_Gecko_Embedding_Init (void)
 
        if( cl_geckoembedding != NULL ) return true;
 
-       if( developer.integer > 0 ) {
-               Con_Printf( "CL_Gecko_Embedding_Init: setting up gecko embedding\n" );
-       }
+       Con_DPrintf( "CL_Gecko_Embedding_Init: setting up gecko embedding\n" );
 
        options = osgk_embedding_options_create();
 #ifdef XULRUNNER_DIR_SUFFIX
@@ -589,9 +581,7 @@ static qboolean CL_Gecko_Embedding_Init (void)
                return false;
        } 
        
-       if( developer.integer > 0 ) {
-               Con_Printf( "CL_Gecko_Embedding_Init: Embedding set up correctly\n" );
-       }
+       Con_DPrintf( "CL_Gecko_Embedding_Init: Embedding set up correctly\n" );
 
        dpGlobalTemplate = osgk_sot_create( cl_geckoembedding, dpGlobal_create, NULL, NULL );
 
index e924b18776551cdaa3b859640f6b1307fc35b405..72b1cbf81d3ff64345164a271cd5cb3565628bb9 100644 (file)
@@ -1508,8 +1508,7 @@ An svc_signonnum has been received, perform a client side setup
 */
 static void CL_SignonReply (void)
 {
-       if (developer.integer >= 100)
-               Con_Printf("CL_SignonReply: %i\n", cls.signon);
+       Con_DPrintf("CL_SignonReply: %i\n", cls.signon);
 
        switch (cls.signon)
        {
@@ -2848,8 +2847,8 @@ static void CL_IPLog_Add(const char *address, const char *name, qboolean checkex
                return;
        if (!cl_iplog_loaded)
                CL_IPLog_Load();
-       if (developer.integer >= 100)
-               Con_Printf("CL_IPLog_Add(\"%s\", \"%s\", %i, %i);\n", address, name, checkexisting, addtofile);
+       if (developer_extra.integer)
+               Con_DPrintf("CL_IPLog_Add(\"%s\", \"%s\", %i, %i);\n", address, name, checkexisting, addtofile);
        // see if it already exists
        if (checkexisting)
        {
@@ -2857,8 +2856,8 @@ static void CL_IPLog_Add(const char *address, const char *name, qboolean checkex
                {
                        if (!strcmp(cl_iplog_items[i].address, address) && !strcmp(cl_iplog_items[i].name, name))
                        {
-                               if (developer.integer >= 100)
-                                       Con_Printf("... found existing \"%s\" \"%s\"\n", cl_iplog_items[i].address, cl_iplog_items[i].name);
+                               if (developer_extra.integer)
+                                       Con_DPrintf("... found existing \"%s\" \"%s\"\n", cl_iplog_items[i].address, cl_iplog_items[i].name);
                                return;
                        }
                }
@@ -2889,8 +2888,8 @@ static void CL_IPLog_Add(const char *address, const char *name, qboolean checkex
                // TODO: this ought to open the one in the userpath version of the base
                // gamedir, not the current gamedir
                Log_Printf(cl_iplog_name.string, "%s %s\n", address, name);
-               if (developer.integer >= 100)
-                       Con_Printf("CL_IPLog_Add: appending this line to %s: %s %s\n", cl_iplog_name.string, address, name);
+               if (developer_extra.integer)
+                       Con_DPrintf("CL_IPLog_Add: appending this line to %s: %s %s\n", cl_iplog_name.string, address, name);
        }
 }
 
@@ -3141,12 +3140,12 @@ static void CL_NetworkTimeReceived(double newtime)
        else if (cls.protocol != PROTOCOL_QUAKEWORLD)
        {
                cl.mtime[1] = max(cl.mtime[1], cl.mtime[0] - 0.1);
-               if (developer.integer >= 100 && vid_activewindow)
+               if (developer_extra.integer && vid_activewindow)
                {
                        if (cl.time < cl.mtime[1] - (cl.mtime[0] - cl.mtime[1]))
-                               Con_Printf("--- cl.time < cl.mtime[1] (%f < %f ... %f)\n", cl.time, cl.mtime[1], cl.mtime[0]);
+                               Con_DPrintf("--- cl.time < cl.mtime[1] (%f < %f ... %f)\n", cl.time, cl.mtime[1], cl.mtime[0]);
                        else if (cl.time > cl.mtime[0] + (cl.mtime[0] - cl.mtime[1]))
-                               Con_Printf("--- cl.time > cl.mtime[0] (%f > %f ... %f)\n", cl.time, cl.mtime[1], cl.mtime[0]);
+                               Con_DPrintf("--- cl.time > cl.mtime[0] (%f > %f ... %f)\n", cl.time, cl.mtime[1], cl.mtime[0]);
                }
                cl.time += (cl.mtime[1] - cl.time) * bound(0, cl_nettimesyncfactor.value, 1);
                timehigh = cl.mtime[1] + (cl.mtime[0] - cl.mtime[1]) * cl_nettimesyncboundtolerance.value;
index cb64053c78ed25320afece5877509b1b2ab53e01..d0846c0d3ae08b09430cbe9e833233cadb2af098 100644 (file)
@@ -1294,8 +1294,8 @@ void CL_ParticleEffect_Fallback(int effectnameindex, float count, const vec3_t o
                if (ent)
                        ent->persistent.trail_time = len;
        }
-       else if (developer.integer >= 1)
-               Con_Printf("CL_ParticleEffect_Fallback: no fallback found for effect %s\n", particleeffectname[effectnameindex]);
+       else
+               Con_DPrintf("CL_ParticleEffect_Fallback: no fallback found for effect %s\n", particleeffectname[effectnameindex]);
 }
 
 // this is also called on point effects with spawndlight = true and
index 8e51872864f2945c8838dc84d67570948bb1affd..fcfd0d0a96b452ec84cace550305635de677753c 100644 (file)
@@ -116,9 +116,7 @@ clvideo_t* CL_OpenVideo( const char *filename, const char *name, int owner )
        clvideo_t *video;
        // sanity check
        if( !name || !*name || strncmp( name, CLVIDEOPREFIX, sizeof( CLVIDEOPREFIX ) - 1 ) != 0 ) {
-               if( developer.integer > 0 ) {
-                       Con_Printf( "CL_OpenVideo: Bad video texture name '%s'!\n", name );
-               }
+               Con_DPrintf( "CL_OpenVideo: Bad video texture name '%s'!\n", name );
                return NULL;
        }
 
index f17c9bfdf7d5449ed3d848535cd69c4a8bb519a1..cd587f28b2b41cfe9e4d53e638486040950a6e9c 100644 (file)
@@ -514,7 +514,7 @@ void Collision_CalcPlanesForPolygonBrushFloat(colbrushf_t *brush)
                        brush->planes[3].dist = DotProduct(brush->points[0].v, brush->planes[3].normal);
                        brush->planes[4].dist = DotProduct(brush->points[1].v, brush->planes[4].normal);
 
-                       if (developer.integer >= 100)
+                       if (developer_extra.integer)
                        {
                                // validation code
 #if 0
@@ -526,34 +526,34 @@ void Collision_CalcPlanesForPolygonBrushFloat(colbrushf_t *brush)
                                VectorNormalize(normal);
                                VectorSubtract(normal, brush->planes[0].normal, temp);
                                if (VectorLength(temp) > 0.01f)
-                                       Con_Printf("Collision_CalcPlanesForPolygonBrushFloat: TriangleNormal gave wrong answer (%f %f %f != correct answer %f %f %f)\n", brush->planes->normal[0], brush->planes->normal[1], brush->planes->normal[2], normal[0], normal[1], normal[2]);
+                                       Con_DPrintf("Collision_CalcPlanesForPolygonBrushFloat: TriangleNormal gave wrong answer (%f %f %f != correct answer %f %f %f)\n", brush->planes->normal[0], brush->planes->normal[1], brush->planes->normal[2], normal[0], normal[1], normal[2]);
                                if (fabs(DotProduct(brush->planes[1].normal, brush->planes[0].normal) - -1.0f) > 0.01f || fabs(brush->planes[1].dist - -brush->planes[0].dist) > 0.01f)
-                                       Con_Printf("Collision_CalcPlanesForPolygonBrushFloat: plane 1 (%f %f %f %f) is not opposite plane 0 (%f %f %f %f)\n", brush->planes[1].normal[0], brush->planes[1].normal[1], brush->planes[1].normal[2], brush->planes[1].dist, brush->planes[0].normal[0], brush->planes[0].normal[1], brush->planes[0].normal[2], brush->planes[0].dist);
+                                       Con_DPrintf("Collision_CalcPlanesForPolygonBrushFloat: plane 1 (%f %f %f %f) is not opposite plane 0 (%f %f %f %f)\n", brush->planes[1].normal[0], brush->planes[1].normal[1], brush->planes[1].normal[2], brush->planes[1].dist, brush->planes[0].normal[0], brush->planes[0].normal[1], brush->planes[0].normal[2], brush->planes[0].dist);
 #if 0
                                if (fabs(DotProduct(brush->planes[2].normal, brush->planes[0].normal)) > 0.01f)
-                                       Con_Printf("Collision_CalcPlanesForPolygonBrushFloat: plane 2 (%f %f %f %f) is not perpendicular to plane 0 (%f %f %f %f)\n", brush->planes[2].normal[0], brush->planes[2].normal[1], brush->planes[2].normal[2], brush->planes[2].dist, brush->planes[0].normal[0], brush->planes[0].normal[1], brush->planes[0].normal[2], brush->planes[2].dist);
+                                       Con_DPrintf("Collision_CalcPlanesForPolygonBrushFloat: plane 2 (%f %f %f %f) is not perpendicular to plane 0 (%f %f %f %f)\n", brush->planes[2].normal[0], brush->planes[2].normal[1], brush->planes[2].normal[2], brush->planes[2].dist, brush->planes[0].normal[0], brush->planes[0].normal[1], brush->planes[0].normal[2], brush->planes[2].dist);
                                if (fabs(DotProduct(brush->planes[3].normal, brush->planes[0].normal)) > 0.01f)
-                                       Con_Printf("Collision_CalcPlanesForPolygonBrushFloat: plane 3 (%f %f %f %f) is not perpendicular to plane 0 (%f %f %f %f)\n", brush->planes[3].normal[0], brush->planes[3].normal[1], brush->planes[3].normal[2], brush->planes[3].dist, brush->planes[0].normal[0], brush->planes[0].normal[1], brush->planes[0].normal[2], brush->planes[3].dist);
+                                       Con_DPrintf("Collision_CalcPlanesForPolygonBrushFloat: plane 3 (%f %f %f %f) is not perpendicular to plane 0 (%f %f %f %f)\n", brush->planes[3].normal[0], brush->planes[3].normal[1], brush->planes[3].normal[2], brush->planes[3].dist, brush->planes[0].normal[0], brush->planes[0].normal[1], brush->planes[0].normal[2], brush->planes[3].dist);
                                if (fabs(DotProduct(brush->planes[4].normal, brush->planes[0].normal)) > 0.01f)
-                                       Con_Printf("Collision_CalcPlanesForPolygonBrushFloat: plane 4 (%f %f %f %f) is not perpendicular to plane 0 (%f %f %f %f)\n", brush->planes[4].normal[0], brush->planes[4].normal[1], brush->planes[4].normal[2], brush->planes[4].dist, brush->planes[0].normal[0], brush->planes[0].normal[1], brush->planes[0].normal[2], brush->planes[4].dist);
+                                       Con_DPrintf("Collision_CalcPlanesForPolygonBrushFloat: plane 4 (%f %f %f %f) is not perpendicular to plane 0 (%f %f %f %f)\n", brush->planes[4].normal[0], brush->planes[4].normal[1], brush->planes[4].normal[2], brush->planes[4].dist, brush->planes[0].normal[0], brush->planes[0].normal[1], brush->planes[0].normal[2], brush->planes[4].dist);
                                if (fabs(DotProduct(brush->planes[2].normal, edge0)) > 0.01f)
-                                       Con_Printf("Collision_CalcPlanesForPolygonBrushFloat: plane 2 (%f %f %f %f) is not perpendicular to edge 0 (%f %f %f to %f %f %f)\n", brush->planes[2].normal[0], brush->planes[2].normal[1], brush->planes[2].normal[2], brush->planes[2].dist, brush->points[2].v[0], brush->points[2].v[1], brush->points[2].v[2], brush->points[0].v[0], brush->points[0].v[1], brush->points[0].v[2]);
+                                       Con_DPrintf("Collision_CalcPlanesForPolygonBrushFloat: plane 2 (%f %f %f %f) is not perpendicular to edge 0 (%f %f %f to %f %f %f)\n", brush->planes[2].normal[0], brush->planes[2].normal[1], brush->planes[2].normal[2], brush->planes[2].dist, brush->points[2].v[0], brush->points[2].v[1], brush->points[2].v[2], brush->points[0].v[0], brush->points[0].v[1], brush->points[0].v[2]);
                                if (fabs(DotProduct(brush->planes[3].normal, edge1)) > 0.01f)
-                                       Con_Printf("Collision_CalcPlanesForPolygonBrushFloat: plane 3 (%f %f %f %f) is not perpendicular to edge 1 (%f %f %f to %f %f %f)\n", brush->planes[3].normal[0], brush->planes[3].normal[1], brush->planes[3].normal[2], brush->planes[3].dist, brush->points[0].v[0], brush->points[0].v[1], brush->points[0].v[2], brush->points[1].v[0], brush->points[1].v[1], brush->points[1].v[2]);
+                                       Con_DPrintf("Collision_CalcPlanesForPolygonBrushFloat: plane 3 (%f %f %f %f) is not perpendicular to edge 1 (%f %f %f to %f %f %f)\n", brush->planes[3].normal[0], brush->planes[3].normal[1], brush->planes[3].normal[2], brush->planes[3].dist, brush->points[0].v[0], brush->points[0].v[1], brush->points[0].v[2], brush->points[1].v[0], brush->points[1].v[1], brush->points[1].v[2]);
                                if (fabs(DotProduct(brush->planes[4].normal, edge2)) > 0.01f)
-                                       Con_Printf("Collision_CalcPlanesForPolygonBrushFloat: plane 4 (%f %f %f %f) is not perpendicular to edge 2 (%f %f %f to %f %f %f)\n", brush->planes[4].normal[0], brush->planes[4].normal[1], brush->planes[4].normal[2], brush->planes[4].dist, brush->points[1].v[0], brush->points[1].v[1], brush->points[1].v[2], brush->points[2].v[0], brush->points[2].v[1], brush->points[2].v[2]);
+                                       Con_DPrintf("Collision_CalcPlanesForPolygonBrushFloat: plane 4 (%f %f %f %f) is not perpendicular to edge 2 (%f %f %f to %f %f %f)\n", brush->planes[4].normal[0], brush->planes[4].normal[1], brush->planes[4].normal[2], brush->planes[4].dist, brush->points[1].v[0], brush->points[1].v[1], brush->points[1].v[2], brush->points[2].v[0], brush->points[2].v[1], brush->points[2].v[2]);
 #endif
 #endif
                                if (fabs(DotProduct(brush->points[0].v, brush->planes[0].normal) - brush->planes[0].dist) > 0.01f || fabs(DotProduct(brush->points[1].v, brush->planes[0].normal) - brush->planes[0].dist) > 0.01f || fabs(DotProduct(brush->points[2].v, brush->planes[0].normal) - brush->planes[0].dist) > 0.01f)
-                                       Con_Printf("Collision_CalcPlanesForPolygonBrushFloat: edges (%f %f %f to %f %f %f to %f %f %f) off front plane 0 (%f %f %f %f)\n", brush->points[0].v[0], brush->points[0].v[1], brush->points[0].v[2], brush->points[1].v[0], brush->points[1].v[1], brush->points[1].v[2], brush->points[2].v[0], brush->points[2].v[1], brush->points[2].v[2], brush->planes[0].normal[0], brush->planes[0].normal[1], brush->planes[0].normal[2], brush->planes[0].dist);
+                                       Con_DPrintf("Collision_CalcPlanesForPolygonBrushFloat: edges (%f %f %f to %f %f %f to %f %f %f) off front plane 0 (%f %f %f %f)\n", brush->points[0].v[0], brush->points[0].v[1], brush->points[0].v[2], brush->points[1].v[0], brush->points[1].v[1], brush->points[1].v[2], brush->points[2].v[0], brush->points[2].v[1], brush->points[2].v[2], brush->planes[0].normal[0], brush->planes[0].normal[1], brush->planes[0].normal[2], brush->planes[0].dist);
                                if (fabs(DotProduct(brush->points[0].v, brush->planes[1].normal) - brush->planes[1].dist) > 0.01f || fabs(DotProduct(brush->points[1].v, brush->planes[1].normal) - brush->planes[1].dist) > 0.01f || fabs(DotProduct(brush->points[2].v, brush->planes[1].normal) - brush->planes[1].dist) > 0.01f)
-                                       Con_Printf("Collision_CalcPlanesForPolygonBrushFloat: edges (%f %f %f to %f %f %f to %f %f %f) off back plane 1 (%f %f %f %f)\n", brush->points[0].v[0], brush->points[0].v[1], brush->points[0].v[2], brush->points[1].v[0], brush->points[1].v[1], brush->points[1].v[2], brush->points[2].v[0], brush->points[2].v[1], brush->points[2].v[2], brush->planes[1].normal[0], brush->planes[1].normal[1], brush->planes[1].normal[2], brush->planes[1].dist);
+                                       Con_DPrintf("Collision_CalcPlanesForPolygonBrushFloat: edges (%f %f %f to %f %f %f to %f %f %f) off back plane 1 (%f %f %f %f)\n", brush->points[0].v[0], brush->points[0].v[1], brush->points[0].v[2], brush->points[1].v[0], brush->points[1].v[1], brush->points[1].v[2], brush->points[2].v[0], brush->points[2].v[1], brush->points[2].v[2], brush->planes[1].normal[0], brush->planes[1].normal[1], brush->planes[1].normal[2], brush->planes[1].dist);
                                if (fabs(DotProduct(brush->points[2].v, brush->planes[2].normal) - brush->planes[2].dist) > 0.01f || fabs(DotProduct(brush->points[0].v, brush->planes[2].normal) - brush->planes[2].dist) > 0.01f)
-                                       Con_Printf("Collision_CalcPlanesForPolygonBrushFloat: edge 0 (%f %f %f to %f %f %f) off front plane 2 (%f %f %f %f)\n", brush->points[2].v[0], brush->points[2].v[1], brush->points[2].v[2], brush->points[0].v[0], brush->points[0].v[1], brush->points[0].v[2], brush->planes[2].normal[0], brush->planes[2].normal[1], brush->planes[2].normal[2], brush->planes[2].dist);
+                                       Con_DPrintf("Collision_CalcPlanesForPolygonBrushFloat: edge 0 (%f %f %f to %f %f %f) off front plane 2 (%f %f %f %f)\n", brush->points[2].v[0], brush->points[2].v[1], brush->points[2].v[2], brush->points[0].v[0], brush->points[0].v[1], brush->points[0].v[2], brush->planes[2].normal[0], brush->planes[2].normal[1], brush->planes[2].normal[2], brush->planes[2].dist);
                                if (fabs(DotProduct(brush->points[0].v, brush->planes[3].normal) - brush->planes[3].dist) > 0.01f || fabs(DotProduct(brush->points[1].v, brush->planes[3].normal) - brush->planes[3].dist) > 0.01f)
-                                       Con_Printf("Collision_CalcPlanesForPolygonBrushFloat: edge 0 (%f %f %f to %f %f %f) off front plane 2 (%f %f %f %f)\n", brush->points[0].v[0], brush->points[0].v[1], brush->points[0].v[2], brush->points[1].v[0], brush->points[1].v[1], brush->points[1].v[2], brush->planes[3].normal[0], brush->planes[3].normal[1], brush->planes[3].normal[2], brush->planes[3].dist);
+                                       Con_DPrintf("Collision_CalcPlanesForPolygonBrushFloat: edge 0 (%f %f %f to %f %f %f) off front plane 2 (%f %f %f %f)\n", brush->points[0].v[0], brush->points[0].v[1], brush->points[0].v[2], brush->points[1].v[0], brush->points[1].v[1], brush->points[1].v[2], brush->planes[3].normal[0], brush->planes[3].normal[1], brush->planes[3].normal[2], brush->planes[3].dist);
                                if (fabs(DotProduct(brush->points[1].v, brush->planes[4].normal) - brush->planes[4].dist) > 0.01f || fabs(DotProduct(brush->points[2].v, brush->planes[4].normal) - brush->planes[4].dist) > 0.01f)
-                                       Con_Printf("Collision_CalcPlanesForPolygonBrushFloat: edge 0 (%f %f %f to %f %f %f) off front plane 2 (%f %f %f %f)\n", brush->points[1].v[0], brush->points[1].v[1], brush->points[1].v[2], brush->points[2].v[0], brush->points[2].v[1], brush->points[2].v[2], brush->planes[4].normal[0], brush->planes[4].normal[1], brush->planes[4].normal[2], brush->planes[4].dist);
+                                       Con_DPrintf("Collision_CalcPlanesForPolygonBrushFloat: edge 0 (%f %f %f to %f %f %f) off front plane 2 (%f %f %f %f)\n", brush->points[1].v[0], brush->points[1].v[1], brush->points[1].v[2], brush->points[2].v[0], brush->points[2].v[1], brush->points[2].v[2], brush->planes[4].normal[0], brush->planes[4].normal[1], brush->planes[4].normal[2], brush->planes[4].dist);
                        }
                }
        }
@@ -599,7 +599,7 @@ void Collision_CalcPlanesForPolygonBrushFloat(colbrushf_t *brush)
                }
        }
 
-       if (developer.integer >= 100)
+       if (developer_extra.integer)
        {
                // validity check - will be disabled later
                Collision_ValidateBrush(brush);
@@ -608,7 +608,7 @@ void Collision_CalcPlanesForPolygonBrushFloat(colbrushf_t *brush)
                        int j;
                        for (j = 0, p = brush->points;j < brush->numpoints;j++, p++)
                                if (DotProduct(p->v, brush->planes[i].normal) > brush->planes[i].dist + COLLISION_PLANE_DIST_EPSILON)
-                                       Con_Printf("Error in brush plane generation, plane %i\n", i);
+                                       Con_DPrintf("Error in brush plane generation, plane %i\n", i);
                }
        }
 }
index 8bb622aef09866685854faf3111a130ef981897c..d8912dd090b0dc8786b11c283dbc002375dd5abd 100644 (file)
--- a/console.c
+++ b/console.c
@@ -1312,14 +1312,11 @@ void Con_DPrintf(const char *fmt, ...)
        va_list argptr;
        char msg[MAX_INPUTLINE];
 
-       if (!developer.integer)
-               return;                 // don't confuse non-developers with techie stuff...
-
        va_start(argptr,fmt);
        dpvsnprintf(msg,sizeof(msg),fmt,argptr);
        va_end(argptr);
 
-       Con_Print(msg);
+       Con_DPrint(msg);
 }
 
 
@@ -1905,8 +1902,8 @@ qboolean GetMapList (const char *s, char *completedname, int completednamebuffer
                                        keyname[l] = 0;
                                        if (!COM_ParseToken_Simple(&data, false, false))
                                                break;
-                                       if (developer.integer >= 100)
-                                               Con_Printf("key: %s %s\n", keyname, com_token);
+                                       if (developer_extra.integer)
+                                               Con_DPrintf("key: %s %s\n", keyname, com_token);
                                        if (!strcmp(keyname, "message"))
                                        {
                                                // get the message contents
diff --git a/cvar.c b/cvar.c
index 30ba09fde88c87d399715ef14e48069f3b5481e0..859e37ba614abba96f6ce76e1a10f856f20f6dfa 100644 (file)
--- a/cvar.c
+++ b/cvar.c
@@ -360,8 +360,8 @@ void Cvar_SetQuick (cvar_t *var, const char *value)
                return;
        }
 
-       if (developer.integer >= 100)
-               Con_Printf("Cvar_SetQuick({\"%s\", \"%s\", %i, \"%s\"}, \"%s\");\n", var->name, var->string, var->flags, var->defstring, value);
+       if (developer_extra.integer)
+               Con_DPrintf("Cvar_SetQuick({\"%s\", \"%s\", %i, \"%s\"}, \"%s\");\n", var->name, var->string, var->flags, var->defstring, value);
 
        Cvar_SetQuick_Internal(var, value);
 }
@@ -419,8 +419,8 @@ void Cvar_RegisterVariable (cvar_t *variable)
        char *oldstr;
        size_t alloclen;
 
-       if (developer.integer >= 100)
-               Con_Printf("Cvar_RegisterVariable({\"%s\", \"%s\", %i});\n", variable->name, variable->string, variable->flags);
+       if (developer_extra.integer)
+               Con_DPrintf("Cvar_RegisterVariable({\"%s\", \"%s\", %i});\n", variable->name, variable->string, variable->flags);
 
 // first check to see if it has already been defined
        cvar = Cvar_FindVar (variable->name);
@@ -428,8 +428,8 @@ void Cvar_RegisterVariable (cvar_t *variable)
        {
                if (cvar->flags & CVAR_ALLOCATED)
                {
-                       if (developer.integer >= 100)
-                               Con_Printf("...  replacing existing allocated cvar {\"%s\", \"%s\", %i}\n", cvar->name, cvar->string, cvar->flags);
+                       if (developer_extra.integer)
+                               Con_DPrintf("...  replacing existing allocated cvar {\"%s\", \"%s\", %i}\n", cvar->name, cvar->string, cvar->flags);
                        // fixed variables replace allocated ones
                        // (because the engine directly accesses fixed variables)
                        // NOTE: this isn't actually used currently
@@ -512,8 +512,8 @@ cvar_t *Cvar_Get (const char *name, const char *value, int flags, const char *ne
        cvar_t *current, *next, *cvar;
        size_t alloclen;
 
-       if (developer.integer >= 100)
-               Con_Printf("Cvar_Get(\"%s\", \"%s\", %i);\n", name, value, flags);
+       if (developer_extra.integer)
+               Con_DPrintf("Cvar_Get(\"%s\", \"%s\", %i);\n", name, value, flags);
 
 // first check to see if it has already been defined
        cvar = Cvar_FindVar (name);
@@ -619,7 +619,7 @@ qboolean    Cvar_Command (void)
                return true;
        }
 
-       if (developer.integer >= 100)
+       if (developer_extra.integer)
                Con_DPrint("Cvar_Command: ");
 
        if (v->flags & CVAR_READONLY)
@@ -628,7 +628,7 @@ qboolean    Cvar_Command (void)
                return true;
        }
        Cvar_Set (v->name, Cmd_Argv(1));
-       if (developer.integer >= 100)
+       if (developer_extra.integer)
                Con_DPrint("\n");
        return true;
 }
@@ -787,7 +787,7 @@ void Cvar_Set_f (void)
                return;
        }
 
-       if (developer.integer >= 100)
+       if (developer_extra.integer)
                Con_DPrint("Set: ");
 
        // all looks ok, create/modify the cvar
@@ -813,7 +813,7 @@ void Cvar_SetA_f (void)
                return;
        }
 
-       if (developer.integer >= 100)
+       if (developer_extra.integer)
                Con_DPrint("SetA: ");
 
        // all looks ok, create/modify the cvar
diff --git a/fs.c b/fs.c
index 273b089872a987113d4d68ae55819e6fe5f0065d..d05da06427d5145f7a1c3c44be8c99f7d8a6666b 100644 (file)
--- a/fs.c
+++ b/fs.c
@@ -2020,16 +2020,16 @@ static searchpath_t *FS_FindFile (const char *name, int* index, qboolean quiet)
                                        if (fs_empty_files_in_pack_mark_deletions.integer && pak->files[middle].realsize == 0)
                                        {
                                                // yes, but the first one is empty so we treat it as not being there
-                                               if (!quiet && developer.integer >= 10)
-                                                       Con_Printf("FS_FindFile: %s is marked as deleted\n", name);
+                                               if (!quiet && developer_extra.integer)
+                                                       Con_DPrintf("FS_FindFile: %s is marked as deleted\n", name);
 
                                                if (index != NULL)
                                                        *index = -1;
                                                return NULL;
                                        }
 
-                                       if (!quiet && developer.integer >= 10)
-                                               Con_Printf("FS_FindFile: %s in %s\n",
+                                       if (!quiet && developer_extra.integer)
+                                               Con_DPrintf("FS_FindFile: %s in %s\n",
                                                                        pak->files[middle].name, pak->filename);
 
                                        if (index != NULL)
@@ -2050,8 +2050,8 @@ static searchpath_t *FS_FindFile (const char *name, int* index, qboolean quiet)
                        dpsnprintf(netpath, sizeof(netpath), "%s%s", search->filename, name);
                        if (FS_SysFileExists (netpath))
                        {
-                               if (!quiet && developer.integer >= 10)
-                                       Con_Printf("FS_FindFile: %s\n", netpath);
+                               if (!quiet && developer_extra.integer)
+                                       Con_DPrintf("FS_FindFile: %s\n", netpath);
 
                                if (index != NULL)
                                        *index = -1;
@@ -2060,8 +2060,8 @@ static searchpath_t *FS_FindFile (const char *name, int* index, qboolean quiet)
                }
        }
 
-       if (!quiet && developer.integer >= 10)
-               Con_Printf("FS_FindFile: can't find %s\n", name);
+       if (!quiet && developer_extra.integer)
+               Con_DPrintf("FS_FindFile: can't find %s\n", name);
 
        if (index != NULL)
                *index = -1;
diff --git a/ft2.c b/ft2.c
index 54b0985ea74ec970245a6bae07ddbf3a9b44b1f1..0e99c1e41a7cd979505bee9d56ed9398131a19b4 100644 (file)
--- a/ft2.c
+++ b/ft2.c
@@ -800,8 +800,7 @@ static qboolean Font_LoadMap(ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _
                        }
                        --mapstart->intSize;
                }
-               if (developer.integer)
-                       Con_Printf("Using size: %f for requested size %f\n", mapstart->intSize, mapstart->size);
+               Con_DPrintf("Using size: %f for requested size %f\n", mapstart->intSize, mapstart->size);
        }
 
        if (!font->image_font && !Font_SetSize(font, mapstart->intSize, mapstart->intSize))
@@ -870,8 +869,8 @@ static qboolean Font_LoadMap(ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _
 
                mapch = ch - map->start;
 
-               if (developer.integer)
-                       Con_Print("glyphinfo: ------------- GLYPH INFO -----------------\n");
+               if (developer_extra.integer)
+                       Con_DPrint("glyphinfo: ------------- GLYPH INFO -----------------\n");
 
                ++gC;
                if (gC >= FONT_CHARS_PER_LINE)
@@ -926,8 +925,7 @@ static qboolean Font_LoadMap(ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _
                        if (status)
                        {
                                //Con_Printf("failed to load glyph %lu for %s\n", glyphIndex, font->name);
-                               if (developer.integer)
-                                       Con_Printf("failed to load glyph for char %lx from font %s\n", (unsigned long)ch, font->name);
+                               Con_DPrintf("failed to load glyph for char %lx from font %s\n", (unsigned long)ch, font->name);
                                continue;
                        }
                }
@@ -949,24 +947,24 @@ static qboolean Font_LoadMap(ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _
                switch (bmp->pixel_mode)
                {
                case FT_PIXEL_MODE_MONO:
-                       if (developer.integer)
-                               Con_Print("glyphinfo:   Pixel Mode: MONO\n");
+                       if (developer_extra.integer)
+                               Con_DPrint("glyphinfo:   Pixel Mode: MONO\n");
                        break;
                case FT_PIXEL_MODE_GRAY2:
-                       if (developer.integer)
-                               Con_Print("glyphinfo:   Pixel Mode: GRAY2\n");
+                       if (developer_extra.integer)
+                               Con_DPrint("glyphinfo:   Pixel Mode: GRAY2\n");
                        break;
                case FT_PIXEL_MODE_GRAY4:
-                       if (developer.integer)
-                               Con_Print("glyphinfo:   Pixel Mode: GRAY4\n");
+                       if (developer_extra.integer)
+                               Con_DPrint("glyphinfo:   Pixel Mode: GRAY4\n");
                        break;
                case FT_PIXEL_MODE_GRAY:
-                       if (developer.integer)
-                               Con_Print("glyphinfo:   Pixel Mode: GRAY\n");
+                       if (developer_extra.integer)
+                               Con_DPrint("glyphinfo:   Pixel Mode: GRAY\n");
                        break;
                default:
-                       if (developer.integer)
-                               Con_Printf("glyphinfo:   Pixel Mode: Unknown: %i\n", bmp->pixel_mode);
+                       if (developer_extra.integer)
+                               Con_DPrintf("glyphinfo:   Pixel Mode: Unknown: %i\n", bmp->pixel_mode);
                        Mem_Free(data);
                        Con_Printf("ERROR: Unrecognized pixel mode for font %s size %f: %i\n", font->name, mapstart->size, bmp->pixel_mode);
                        return false;
@@ -1051,19 +1049,19 @@ static qboolean Font_LoadMap(ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _
                        mapglyph->advance_x = advance;
                        mapglyph->advance_y = 0;
 
-                       if (developer.integer)
+                       if (developer_extra.integer)
                        {
-                               Con_Printf("glyphinfo:   Glyph: %lu   at (%i, %i)\n", (unsigned long)ch, gC, gR);
-                               Con_Printf("glyphinfo:   %f, %f, %lu\n", bearingX, map->sfx, (unsigned long)glyph->metrics.horiBearingX);
+                               Con_DPrintf("glyphinfo:   Glyph: %lu   at (%i, %i)\n", (unsigned long)ch, gC, gR);
+                               Con_DPrintf("glyphinfo:   %f, %f, %lu\n", bearingX, map->sfx, (unsigned long)glyph->metrics.horiBearingX);
                                if (ch >= 32 && ch <= 128)
-                                       Con_Printf("glyphinfo:   Character: %c\n", (int)ch);
-                               Con_Printf("glyphinfo:   Vertex info:\n");
-                               Con_Printf("glyphinfo:     X: ( %f  --  %f )\n", mapglyph->vxmin, mapglyph->vxmax);
-                               Con_Printf("glyphinfo:     Y: ( %f  --  %f )\n", mapglyph->vymin, mapglyph->vymax);
-                               Con_Printf("glyphinfo:   Texture info:\n");
-                               Con_Printf("glyphinfo:     S: ( %f  --  %f )\n", mapglyph->txmin, mapglyph->txmax);
-                               Con_Printf("glyphinfo:     T: ( %f  --  %f )\n", mapglyph->tymin, mapglyph->tymax);
-                               Con_Printf("glyphinfo:   Advance: %f, %f\n", mapglyph->advance_x, mapglyph->advance_y);
+                                       Con_DPrintf("glyphinfo:   Character: %c\n", (int)ch);
+                               Con_DPrintf("glyphinfo:   Vertex info:\n");
+                               Con_DPrintf("glyphinfo:     X: ( %f  --  %f )\n", mapglyph->vxmin, mapglyph->vxmax);
+                               Con_DPrintf("glyphinfo:     Y: ( %f  --  %f )\n", mapglyph->vymin, mapglyph->vymax);
+                               Con_DPrintf("glyphinfo:   Texture info:\n");
+                               Con_DPrintf("glyphinfo:     S: ( %f  --  %f )\n", mapglyph->txmin, mapglyph->txmax);
+                               Con_DPrintf("glyphinfo:     T: ( %f  --  %f )\n", mapglyph->tymin, mapglyph->tymax);
+                               Con_DPrintf("glyphinfo:   Advance: %f, %f\n", mapglyph->advance_x, mapglyph->advance_y);
                        }
                }
                map->glyphs[mapch].image = false;
@@ -1071,8 +1069,9 @@ static qboolean Font_LoadMap(ft2_font_t *font, ft2_font_map_t *mapstart, Uchar _
 
        // create a texture from the data now
 
-       if (developer.integer)
+       if (developer_extra.integer)
        {
+               // LordHavoc: why are we writing this?  And why not write it as TGA using the appropriate function?
                // view using `display -depth 8 -size 512x512 name_page.rgba` (be sure to use a correct -size parameter)
                dpsnprintf(map_identifier, sizeof(map_identifier), "%s_%u.rgba", font->name, (unsigned)map->start/FONT_CHARS_PER_MAP);
                FS_WriteFile(map_identifier, data, pitch * FONT_CHAR_LINES * map->glyphSize);
index ecc972d94951293c17857d73713a89684d1782c8..55ae7baa30733572d3a185bd61e88660142dec06 100644 (file)
@@ -1043,14 +1043,14 @@ qboolean GL_Backend_CompileShader(int programobject, GLenum shadertypeenum, cons
        qglCompileShaderARB(shaderobject);CHECKGLERROR
        qglGetObjectParameterivARB(shaderobject, GL_OBJECT_COMPILE_STATUS_ARB, &shadercompiled);CHECKGLERROR
        qglGetInfoLogARB(shaderobject, sizeof(compilelog), NULL, compilelog);CHECKGLERROR
-       if (compilelog[0] && developer.integer > 0 && (strstr(compilelog, "error") || strstr(compilelog, "ERROR") || strstr(compilelog, "Error") || strstr(compilelog, "WARNING") || strstr(compilelog, "warning") || strstr(compilelog, "Warning")))
+       if (compilelog[0] && (strstr(compilelog, "error") || strstr(compilelog, "ERROR") || strstr(compilelog, "Error") || strstr(compilelog, "WARNING") || strstr(compilelog, "warning") || strstr(compilelog, "Warning")))
        {
                int i, j, pretextlines = 0;
                for (i = 0;i < numstrings - 1;i++)
                        for (j = 0;strings[i][j];j++)
                                if (strings[i][j] == '\n')
                                        pretextlines++;
-               Con_DPrintf("%s shader compile log:\n%s\n(line offset for any above warnings/errors: %i)\n", shadertype, compilelog, pretextlines);
+               Con_Printf("%s shader compile log:\n%s\n(line offset for any above warnings/errors: %i)\n", shadertype, compilelog, pretextlines);
        }
        if (!shadercompiled)
        {
@@ -1134,8 +1134,8 @@ void R_Mesh_Draw(int firstvertex, int numvertices, int firsttriangle, int numtri
        unsigned int numelements = numtriangles * 3;
        if (numvertices < 3 || numtriangles < 1)
        {
-               if (numvertices < 0 || numtriangles < 0 || developer.integer >= 100)
-                       Con_Printf("R_Mesh_Draw(%d, %d, %d, %d, %8p, %8p, %i, %i);\n", firstvertex, numvertices, firsttriangle, numtriangles, (void *)element3i, (void *)element3s, bufferobject3i, bufferobject3s);
+               if (numvertices < 0 || numtriangles < 0 || developer_extra.integer)
+                       Con_DPrintf("R_Mesh_Draw(%d, %d, %d, %d, %8p, %8p, %i, %i);\n", firstvertex, numvertices, firsttriangle, numtriangles, (void *)element3i, (void *)element3s, bufferobject3i, bufferobject3s);
                return;
        }
        if (!gl_mesh_prefer_short_elements.integer)
index e88b31efbaced40464eb4d6d1d82b30f8ea705e4..80fb2db45f91c0994cbb8effac2463989ae1dce1 100644 (file)
@@ -417,18 +417,18 @@ static void R_BuildFogTexture(void)
        for (x = 0;x < FOGMASKTABLEWIDTH;x++)
        {
                d = (x * r - r_refdef.fogmasktable_start);
-               if(developer.integer >= 100)
-                       Con_Printf("%f ", d);
+               if(developer_extra.integer)
+                       Con_DPrintf("%f ", d);
                d = max(0, d);
                if (r_fog_exp2.integer)
                        alpha = exp(-r_refdef.fogmasktable_density * r_refdef.fogmasktable_density * 0.0001 * d * d);
                else
                        alpha = exp(-r_refdef.fogmasktable_density * 0.004 * d);
-               if(developer.integer >= 100)
-                       Con_Printf(" : %f ", alpha);
+               if(developer_extra.integer)
+                       Con_DPrintf(" : %f ", alpha);
                alpha = 1 - (1 - alpha) * r_refdef.fogmasktable_alpha;
-               if(developer.integer >= 100)
-                       Con_Printf(" = %f\n", alpha);
+               if(developer_extra.integer)
+                       Con_DPrintf(" = %f\n", alpha);
                r_refdef.fogmasktable[x] = bound(0, alpha, 1);
        }
 
@@ -3571,8 +3571,7 @@ static void R_GLSL_CompilePermutation(r_glsl_permutation_t *p, unsigned int mode
                if (p->loc_Texture_ScreenDiffuse   >= 0) qglUniform1iARB(p->loc_Texture_ScreenDiffuse  , GL20TU_SCREENDIFFUSE);
                if (p->loc_Texture_ScreenSpecular  >= 0) qglUniform1iARB(p->loc_Texture_ScreenSpecular , GL20TU_SCREENSPECULAR);
                CHECKGLERROR
-               if (developer.integer)
-                       Con_Printf("^5GLSL shader %s compiled.\n", permutationname);
+               Con_DPrintf("^5GLSL shader %s compiled.\n", permutationname);
        }
        else
                Con_Printf("^1GLSL shader %s failed!  some features may not work properly.\n", permutationname);
index a85e9c5abdac9d01b5515d93f0c1356f5acc077c..96f2bc8acf7a12fdd389c7026a2b90eafc33950a 100644 (file)
@@ -918,11 +918,11 @@ static void R_Q1BSP_CallRecursiveGetLightInfo(r_q1bsp_getlightinfo_t *info, qboo
 
        info->svbsp_insertoccluder = false;
        R_Q1BSP_RecursiveGetLightInfo(info, info->model->brush.data_nodes);
-       if (developer.integer >= 100 && use_svbsp)
+       if (developer_extra.integer && use_svbsp)
        {
-               Con_Printf("GetLightInfo: svbsp built with %i nodes, polygon stats:\n", r_svbsp.numnodes);
-               Con_Printf("occluders: %i accepted, %i rejected, %i fragments accepted, %i fragments rejected.\n", r_svbsp.stat_occluders_accepted, r_svbsp.stat_occluders_rejected, r_svbsp.stat_occluders_fragments_accepted, r_svbsp.stat_occluders_fragments_rejected);
-               Con_Printf("queries  : %i accepted, %i rejected, %i fragments accepted, %i fragments rejected.\n", r_svbsp.stat_queries_accepted, r_svbsp.stat_queries_rejected, r_svbsp.stat_queries_fragments_accepted, r_svbsp.stat_queries_fragments_rejected);
+               Con_DPrintf("GetLightInfo: svbsp built with %i nodes, polygon stats:\n", r_svbsp.numnodes);
+               Con_DPrintf("occluders: %i accepted, %i rejected, %i fragments accepted, %i fragments rejected.\n", r_svbsp.stat_occluders_accepted, r_svbsp.stat_occluders_rejected, r_svbsp.stat_occluders_fragments_accepted, r_svbsp.stat_occluders_fragments_rejected);
+               Con_DPrintf("queries  : %i accepted, %i rejected, %i fragments accepted, %i fragments rejected.\n", r_svbsp.stat_queries_accepted, r_svbsp.stat_queries_rejected, r_svbsp.stat_queries_fragments_accepted, r_svbsp.stat_queries_fragments_rejected);
        }
 }
 
diff --git a/host.c b/host.c
index 67ab1b57f4c67dc6b92d938ecf27cee6c17d2657..09144230b9fbfdefd53dfcaef59c4fe3154e765f 100644 (file)
--- a/host.c
+++ b/host.c
@@ -71,7 +71,9 @@ cvar_t cl_maxfps = {CVAR_SAVE, "cl_maxfps", "0", "maximum fps cap, 0 = unlimited
 cvar_t cl_maxfps_alwayssleep = {0, "cl_maxfps_alwayssleep","1", "gives up some processing time to other applications each frame, value in milliseconds, disabled if cl_maxfps is 0"};
 cvar_t cl_maxidlefps = {CVAR_SAVE, "cl_maxidlefps", "20", "maximum fps cap when the game is not the active window (makes cpu time available to other programs"};
 
-cvar_t developer = {0, "developer","0", "prints additional debugging messages and information (recommended for modders and level designers)"};
+cvar_t developer = {CVAR_SAVE, "developer","0", "prints debugging messages and information (recommended for all developers and level designers)"};
+cvar_t developer_extra = {0, "developer_extra", "prints additional debugging messages, often very verbose!"};
+cvar_t developer_insane = {0, "developer_insane", "prints huge streams of information about internal workings, entire contents of files being read/written, etc.  Not recommended!"};
 cvar_t developer_loadfile = {0, "developer_loadfile","0", "prints name and size of every file loaded via the FS_LoadFile function (which is almost everything)"};
 cvar_t developer_loading = {0, "developer_loading","0", "prints information about files as they are loaded or unloaded successfully"};
 cvar_t developer_entityparsing = {0, "developer_entityparsing", "0", "prints detailed network entities information each time a packet is received"};
@@ -225,6 +227,8 @@ static void Host_InitLocal (void)
        Cvar_RegisterVariable (&cl_maxidlefps);
 
        Cvar_RegisterVariable (&developer);
+       Cvar_RegisterVariable (&developer_extra);
+       Cvar_RegisterVariable (&developer_insane);
        Cvar_RegisterVariable (&developer_loadfile);
        Cvar_RegisterVariable (&developer_loading);
        Cvar_RegisterVariable (&developer_entityparsing);
@@ -1006,11 +1010,9 @@ static void Host_Init (void)
 
        // FIXME: this is evil, but possibly temporary
        // LordHavoc: doesn't seem very temporary...
-       // LordHavoc: enabled this by default on debug
-#ifndef DEBUG
+       // LordHavoc: made this a saved cvar
 // COMMANDLINEOPTION: Console: -developer enables warnings and other notices (RECOMMENDED for mod developers)
        if (COM_CheckParm("-developer"))
-#endif
        {
                developer.value = developer.integer = 1;
                developer.string = "1";
@@ -1018,12 +1020,16 @@ static void Host_Init (void)
 
        if (COM_CheckParm("-developer2"))
        {
-               developer.value = developer.integer = 100;
-               developer.string = "100";
-               developer_memory.value = developer_memory.integer = 100;
-               developer.string = "100";
-               developer_memorydebug.value = developer_memorydebug.integer = 100;
-               developer_memorydebug.string = "100";
+               developer.value = developer.integer = 1;
+               developer.string = "1";
+               developer_extra.value = developer_extra.integer = 1;
+               developer_extra.string = "1";
+               developer_insane.value = developer_insane.integer = 1;
+               developer_insane.string = "1";
+               developer_memory.value = developer_memory.integer = 1;
+               developer_memory.string = "1";
+               developer_memorydebug.value = developer_memorydebug.integer = 1;
+               developer_memorydebug.string = "1";
        }
 
 // COMMANDLINEOPTION: Console: -nostdout disables text output to the terminal the game was launched from
diff --git a/image.c b/image.c
index 55828225a78a1ae623de6e9fd3bb536161b96c39..ef0aac4e90a2f547e60b9d46e6baaa124c29b8cd 100644 (file)
--- a/image.c
+++ b/image.c
@@ -912,8 +912,8 @@ unsigned char *loadimagepixelsbgra (const char *filename, qboolean complain, qbo
                        }
                        if (data)
                        {
-                               if (developer.integer >= 10)
-                                       Con_Printf("loaded image %s (%dx%d)\n", name, image_width, image_height);
+                               if (developer_loading.integer)
+                                       Con_DPrintf("loaded image %s (%dx%d)\n", name, image_width, image_height);
                                //if (developer_memorydebug.integer)
                                //      Mem_CheckSentinelsGlobal();
                                if(allowFixtrans && r_fixtrans_auto.integer)
diff --git a/keys.c b/keys.c
index 8c4aeff847ae7ca5caf6df07c081eecce5ae2da3..d9d7d067d1cf5789711c03093ea21fdd2d7c15ba 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -1420,8 +1420,8 @@ Key_Event (int key, int ascii, qboolean down)
        if (!bind)
                bind = keybindings[key_bmap2][key];
 
-       if (developer.integer >= 1000)
-               Con_Printf("Key_Event(%i, '%c', %s) keydown %i bind \"%s\"\n", key, ascii ? ascii : '?', down ? "down" : "up", keydown[key], bind ? bind : "");
+       if (developer_insane.integer)
+               Con_DPrintf("Key_Event(%i, '%c', %s) keydown %i bind \"%s\"\n", key, ascii ? ascii : '?', down ? "down" : "up", keydown[key], bind ? bind : "");
 
        if(key_consoleactive)
                keydest = key_console;
index 9824a46a32e490a450a5126e3afd6c4d588a6d6a..deba3b357229a31407dcad409b2a0f44b655f1dd 100644 (file)
--- a/libcurl.c
+++ b/libcurl.c
@@ -409,30 +409,29 @@ static void curl_default_callback(int status, size_t length_received, unsigned c
        switch(status)
        {
                case CURLCBSTATUS_OK:
-                       Con_Printf("Download of %s: OK\n", di->filename);
+                       Con_DPrintf("Download of %s: OK\n", di->filename);
                        break;
                case CURLCBSTATUS_FAILED:
-                       Con_Printf("Download of %s: FAILED\n", di->filename);
+                       Con_DPrintf("Download of %s: FAILED\n", di->filename);
                        break;
                case CURLCBSTATUS_ABORTED:
-                       Con_Printf("Download of %s: ABORTED\n", di->filename);
+                       Con_DPrintf("Download of %s: ABORTED\n", di->filename);
                        break;
                case CURLCBSTATUS_SERVERERROR:
-                       Con_Printf("Download of %s: (unknown server error)\n", di->filename);
+                       Con_DPrintf("Download of %s: (unknown server error)\n", di->filename);
                        break;
                case CURLCBSTATUS_UNKNOWN:
-                       Con_Printf("Download of %s: (unknown client error)\n", di->filename);
+                       Con_DPrintf("Download of %s: (unknown client error)\n", di->filename);
                        break;
                default:
-                       Con_Printf("Download of %s: %d\n", di->filename, status);
+                       Con_DPrintf("Download of %s: %d\n", di->filename, status);
                        break;
        }
 }
 
 static void curl_quiet_callback(int status, size_t length_received, unsigned char *buffer, void *cbdata)
 {
-       if(developer.integer)
-               curl_default_callback(status, length_received, buffer, cbdata);
+       curl_default_callback(status, length_received, buffer, cbdata);
 }
 
 /*
index eb05148e50bfeb92a7059a492c2922b695925a1a..fb737d21e926dbf41df3f6e5cf1bf705ff70991a 100644 (file)
@@ -18,9 +18,9 @@ CC?=gcc
 # 686 (Pentium Pro/II) optimizations
 #CPUOPTIMIZATIONS?=-march=i686
 # No specific CPU (386 compatible)
-CPUOPTIMIZATIONS?=
+#CPUOPTIMIZATIONS?=
 # Experimental
-#CPUOPTIMIZATIONS?=-fno-math-errno -ffinite-math-only -fno-rounding-math -fno-signaling-nans -fassociative-math -freciprocal-math -fno-signed-zeros -fno-trapping-math
+CPUOPTIMIZATIONS?=-fno-math-errno -ffinite-math-only -fno-rounding-math -fno-signaling-nans -fassociative-math -freciprocal-math -fno-signed-zeros -fno-trapping-math
 # NOTE: *never* *ever* use the -ffast-math or -funsafe-math-optimizations flag
 
 # Additional stuff for libode
@@ -186,7 +186,8 @@ OPTIM_DEBUG=$(CPUOPTIMIZATIONS)
 #OPTIM_RELEASE=-O2 -fno-strict-aliasing -ffast-math -funroll-loops $(CPUOPTIMIZATIONS)
 #OPTIM_RELEASE=-O2 -fno-strict-aliasing -fno-math-errno -fno-trapping-math -ffinite-math-only -fno-signaling-nans -fcx-limited-range -funroll-loops $(CPUOPTIMIZATIONS)
 #OPTIM_RELEASE=-O2 -fno-strict-aliasing -funroll-loops $(CPUOPTIMIZATIONS)
-OPTIM_RELEASE=-O2 -fno-strict-aliasing $(CPUOPTIMIZATIONS)
+#OPTIM_RELEASE=-O2 -fno-strict-aliasing $(CPUOPTIMIZATIONS)
+OPTIM_RELEASE=-O3 $(CPUOPTIMIZATIONS)
 # NOTE: *never* *ever* use the -ffast-math or -funsafe-math-optimizations flag
 
 DO_CC=$(CC) $(CFLAGS) -c $< -o $@
index 448b0c4328dcf09648c71272f9b954e548324c24..ef4b9e28ca6e854a3d8257d4961ffbdb5e249aca 100644 (file)
@@ -2400,8 +2400,8 @@ void Mod_PSKMODEL_Load(dp_model_t *mod, void *buffer, void *bufferend)
                version = LittleLong(pchunk->version);
                recordsize = LittleLong(pchunk->recordsize);
                numrecords = LittleLong(pchunk->numrecords);
-               if (developer.integer >= 100)
-                       Con_Printf("%s: %s %x: %i * %i = %i\n", loadmodel->name, pchunk->id, version, recordsize, numrecords, recordsize * numrecords);
+               if (developer_extra.integer)
+                       Con_DPrintf("%s: %s %x: %i * %i = %i\n", loadmodel->name, pchunk->id, version, recordsize, numrecords, recordsize * numrecords);
                if (version != 0x1e83b9 && version != 0x1e9179 && version != 0x2e && version != 0x12f2bc && version != 0x12f2f0)
                        Con_Printf ("%s: chunk %s has unknown version %x (0x1e83b9, 0x1e9179, 0x2e, 0x12f2bc, 0x12f2f0 are currently supported), trying to load anyway!\n", loadmodel->name, pchunk->id, version);
                if (!strcmp(pchunk->id, "ACTRHEAD"))
@@ -2571,8 +2571,8 @@ void Mod_PSKMODEL_Load(dp_model_t *mod, void *buffer, void *bufferend)
                version = LittleLong(pchunk->version);
                recordsize = LittleLong(pchunk->recordsize);
                numrecords = LittleLong(pchunk->numrecords);
-               if (developer.integer >= 100)
-                       Con_Printf("%s: %s %x: %i * %i = %i\n", animname, pchunk->id, version, recordsize, numrecords, recordsize * numrecords);
+               if (developer_extra.integer)
+                       Con_DPrintf("%s: %s %x: %i * %i = %i\n", animname, pchunk->id, version, recordsize, numrecords, recordsize * numrecords);
                if (version != 0x1e83b9 && version != 0x1e9179 && version != 0x2e && version != 0x12f2bc && version != 0x12f2f0)
                        Con_Printf ("%s: chunk %s has unknown version %x (0x1e83b9, 0x1e9179, 0x2e, 0x12f2bc, 0x12f2f0 are currently supported), trying to load anyway!\n", animname, pchunk->id, version);
                if (!strcmp(pchunk->id, "ANIMHEAD"))
index 4ab7e7d6bbe942c595c8f8d081729ab65b334225..c488b32e98bc7c26e68de1f13225c4ee27288649 100644 (file)
@@ -3725,8 +3725,7 @@ void Mod_Q1BSP_Load(dp_model_t *mod, void *buffer, void *bufferend)
 
        //Mod_Q1BSP_ProcessLightList();
 
-       if (developer.integer >= 10)
-               Con_Printf("Some stats for q1bsp model \"%s\": %i faces, %i nodes, %i leafs, %i visleafs, %i visleafportals\n", loadmodel->name, loadmodel->num_surfaces, loadmodel->brush.num_nodes, loadmodel->brush.num_leafs, mod->brush.num_pvsclusters, loadmodel->brush.num_portals);
+       Con_DPrintf("Some stats for q1bsp model \"%s\": %i faces, %i nodes, %i leafs, %i visleafs, %i visleafportals\n", loadmodel->name, loadmodel->num_surfaces, loadmodel->brush.num_nodes, loadmodel->brush.num_leafs, mod->brush.num_pvsclusters, loadmodel->brush.num_portals);
 }
 
 static void Mod_Q2BSP_LoadEntities(lump_t *l)
@@ -4862,8 +4861,8 @@ static void Mod_Q3BSP_LoadFaces(lump_t *l)
                n = LittleLong(in->effectindex);
                if (n < -1 || n >= loadmodel->brushq3.num_effects)
                {
-                       if (developer.integer >= 100)
-                               Con_Printf("Mod_Q3BSP_LoadFaces: face #%i (texture \"%s\"): invalid effectindex %i (%i effects)\n", i, out->texture->name, n, loadmodel->brushq3.num_effects);
+                       if (developer_extra.integer)
+                               Con_DPrintf("Mod_Q3BSP_LoadFaces: face #%i (texture \"%s\"): invalid effectindex %i (%i effects)\n", i, out->texture->name, n, loadmodel->brushq3.num_effects);
                        n = -1;
                }
                if (n == -1)
@@ -4967,8 +4966,8 @@ static void Mod_Q3BSP_LoadFaces(lump_t *l)
                        ++patchtesscount;
                        break;
                case Q3FACETYPE_FLARE:
-                       if (developer.integer >= 100)
-                               Con_Printf("Mod_Q3BSP_LoadFaces: face #%i (texture \"%s\"): Q3FACETYPE_FLARE not supported (yet)\n", i, out->texture->name);
+                       if (developer_extra.integer)
+                               Con_DPrintf("Mod_Q3BSP_LoadFaces: face #%i (texture \"%s\"): Q3FACETYPE_FLARE not supported (yet)\n", i, out->texture->name);
                        // don't render it
                        continue;
                }
@@ -5092,12 +5091,12 @@ static void Mod_Q3BSP_LoadFaces(lump_t *l)
 
                        out->num_triangles = Mod_RemoveDegenerateTriangles(out->num_triangles, (loadmodel->surfmesh.data_element3i + 3 * out->num_firsttriangle), (loadmodel->surfmesh.data_element3i + 3 * out->num_firsttriangle), loadmodel->surfmesh.data_vertex3f);
 
-                       if (developer.integer >= 100)
+                       if (developer_extra.integer)
                        {
                                if (out->num_triangles < finaltriangles)
-                                       Con_Printf("Mod_Q3BSP_LoadFaces: %ix%i curve subdivided to %i vertices / %i triangles, %i degenerate triangles removed (leaving %i)\n", patchsize[0], patchsize[1], out->num_vertices, finaltriangles, finaltriangles - out->num_triangles, out->num_triangles);
+                                       Con_DPrintf("Mod_Q3BSP_LoadFaces: %ix%i curve subdivided to %i vertices / %i triangles, %i degenerate triangles removed (leaving %i)\n", patchsize[0], patchsize[1], out->num_vertices, finaltriangles, finaltriangles - out->num_triangles, out->num_triangles);
                                else
-                                       Con_Printf("Mod_Q3BSP_LoadFaces: %ix%i curve subdivided to %i vertices / %i triangles\n", patchsize[0], patchsize[1], out->num_vertices, out->num_triangles);
+                                       Con_DPrintf("Mod_Q3BSP_LoadFaces: %ix%i curve subdivided to %i vertices / %i triangles\n", patchsize[0], patchsize[1], out->num_vertices, out->num_triangles);
                        }
                        // q3map does not put in collision brushes for curves... ugh
                        // build the lower quality collision geometry
@@ -5124,8 +5123,8 @@ static void Mod_Q3BSP_LoadFaces(lump_t *l)
                        Mod_Q3BSP_BuildBBoxes(out->data_collisionelement3i, out->num_collisiontriangles, out->data_collisionvertex3f, &out->data_collisionbbox6f, &out->num_collisionbboxstride, mod_q3bsp_curves_collisions_stride.integer);
                        Mod_Q3BSP_BuildBBoxes(loadmodel->surfmesh.data_element3i + 3 * out->num_firsttriangle, out->num_triangles, loadmodel->surfmesh.data_vertex3f, &out->data_bbox6f, &out->num_bboxstride, mod_q3bsp_curves_stride.integer);
 
-                       if (developer.integer >= 100)
-                               Con_Printf("Mod_Q3BSP_LoadFaces: %ix%i curve became %i:%i vertices / %i:%i triangles (%i:%i degenerate)\n", patchsize[0], patchsize[1], out->num_vertices, out->num_collisionvertices, oldnumtriangles, oldnumtriangles2, oldnumtriangles - out->num_triangles, oldnumtriangles2 - out->num_collisiontriangles);
+                       if (developer_extra.integer)
+                               Con_DPrintf("Mod_Q3BSP_LoadFaces: %ix%i curve became %i:%i vertices / %i:%i triangles (%i:%i degenerate)\n", patchsize[0], patchsize[1], out->num_vertices, out->num_collisionvertices, oldnumtriangles, oldnumtriangles2, oldnumtriangles - out->num_triangles, oldnumtriangles2 - out->num_collisiontriangles);
                        break;
                default:
                        break;
index 84bcd67a65a6514b02207f8e83fbd740a3fe249e..8aec8ba87daaee4fbfc3347ef9681a612ba0c8d6 100644 (file)
@@ -1600,12 +1600,12 @@ void Mod_LoadQ3Shaders(void)
                                                }
                                                //for (j = numparameters;j < TEXTURE_MAXFRAMES + 4;j++)
                                                //      parameter[j][0] = 0;
-                                               if (developer.integer >= 100)
+                                               if (developer_insane.integer)
                                                {
-                                                       Con_Printf("%s %i: ", shader.name, shader.numlayers - 1);
+                                                       Con_DPrintf("%s %i: ", shader.name, shader.numlayers - 1);
                                                        for (j = 0;j < numparameters;j++)
-                                                               Con_Printf(" %s", parameter[j]);
-                                                       Con_Print("\n");
+                                                               Con_DPrintf(" %s", parameter[j]);
+                                                       Con_DPrint("\n");
                                                }
                                                if (numparameters >= 2 && !strcasecmp(parameter[0], "blendfunc"))
                                                {
@@ -1821,12 +1821,12 @@ void Mod_LoadQ3Shaders(void)
                                //      parameter[j][0] = 0;
                                if (fileindex == 0 && !strcasecmp(com_token, "}"))
                                        break;
-                               if (developer.integer >= 100)
+                               if (developer_insane.integer)
                                {
-                                       Con_Printf("%s: ", shader.name);
+                                       Con_DPrintf("%s: ", shader.name);
                                        for (j = 0;j < numparameters;j++)
-                                               Con_Printf(" %s", parameter[j]);
-                                       Con_Print("\n");
+                                               Con_DPrintf(" %s", parameter[j]);
+                                       Con_DPrint("\n");
                                }
                                if (numparameters < 1)
                                        continue;
@@ -2210,21 +2210,21 @@ nothing                GL_ZERO GL_ONE
        }
        else if (!strcmp(texture->name, "noshader") || !texture->name[0])
        {
-               if (developer.integer >= 100)
-                       Con_Printf("^1%s:^7 using fallback noshader material for ^3\"%s\"\n", loadmodel->name, name);
+               if (developer_extra.integer)
+                       Con_DPrintf("^1%s:^7 using fallback noshader material for ^3\"%s\"\n", loadmodel->name, name);
                texture->surfaceparms = 0;
        }
        else if (!strcmp(texture->name, "common/nodraw") || !strcmp(texture->name, "textures/common/nodraw"))
        {
-               if (developer.integer >= 100)
-                       Con_Printf("^1%s:^7 using fallback nodraw material for ^3\"%s\"\n", loadmodel->name, name);
+               if (developer_extra.integer)
+                       Con_DPrintf("^1%s:^7 using fallback nodraw material for ^3\"%s\"\n", loadmodel->name, name);
                texture->surfaceparms = 0;
                texture->basematerialflags = MATERIALFLAG_NODRAW | MATERIALFLAG_NOSHADOW;
        }
        else
        {
-               if (developer.integer >= 100)
-                       Con_Printf("^1%s:^7 No shader found for texture ^3\"%s\"\n", loadmodel->name, texture->name);
+               if (developer_extra.integer)
+                       Con_DPrintf("^1%s:^7 No shader found for texture ^3\"%s\"\n", loadmodel->name, texture->name);
                texture->surfaceparms = 0;
                if (texture->surfaceflags & Q3SURFACEFLAG_NODRAW)
                        texture->basematerialflags |= MATERIALFLAG_NODRAW | MATERIALFLAG_NOSHADOW;
@@ -2482,7 +2482,7 @@ void Mod_MakeSortedSurfaces(dp_model_t *mod)
 
 static void Mod_BuildVBOs(void)
 {
-       if (developer.integer && loadmodel->surfmesh.data_element3s && loadmodel->surfmesh.data_element3i)
+       if (gl_paranoid.integer && loadmodel->surfmesh.data_element3s && loadmodel->surfmesh.data_element3i)
        {
                int i;
                for (i = 0;i < loadmodel->surfmesh.num_triangles*3;i++)
index ec278b5fbe16e270662c4eb124ec20ee5a78ed2e..865bcb8b1f493ae22723b150d6823e988fa6e023 100755 (executable)
--- a/netconn.c
+++ b/netconn.c
@@ -1801,8 +1801,8 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                }
                if (!strncmp(string, "ping", 4))
                {
-                       if (developer.integer >= 10)
-                               Con_Printf("Received ping from %s, sending ack\n", addressstring2);
+                       if (developer_extra.integer)
+                               Con_DPrintf("Received ping from %s, sending ack\n", addressstring2);
                        NetConn_WriteString(mysocket, "\377\377\377\377ack", peeraddress);
                        return true;
                }
@@ -1906,8 +1906,8 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                switch (c)
                {
                case CCREP_ACCEPT:
-                       if (developer.integer >= 10)
-                               Con_Printf("Datagram_ParseConnectionless: received CCREP_ACCEPT from %s.\n", addressstring2);
+                       if (developer_extra.integer)
+                               Con_DPrintf("Datagram_ParseConnectionless: received CCREP_ACCEPT from %s.\n", addressstring2);
                        if (cls.connect_trying)
                        {
                                lhnetaddress_t clientportaddress;
@@ -1920,14 +1920,14 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                        }
                        break;
                case CCREP_REJECT:
-                       if (developer.integer >= 10)
-                               Con_Printf("Datagram_ParseConnectionless: received CCREP_REJECT from %s.\n", addressstring2);
+                       if (developer_extra.integer)
+                               Con_DPrintf("Datagram_ParseConnectionless: received CCREP_REJECT from %s.\n", addressstring2);
                        cls.connect_trying = false;
                        M_Update_Return_Reason((char *)MSG_ReadString());
                        break;
                case CCREP_SERVER_INFO:
-                       if (developer.integer >= 10)
-                               Con_Printf("Datagram_ParseConnectionless: received CCREP_SERVER_INFO from %s.\n", addressstring2);
+                       if (developer_extra.integer)
+                               Con_DPrintf("Datagram_ParseConnectionless: received CCREP_SERVER_INFO from %s.\n", addressstring2);
                        // LordHavoc: because the quake server may report weird addresses
                        // we just ignore it and keep the real address
                        MSG_ReadString();
@@ -1949,19 +1949,19 @@ static int NetConn_ClientParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
 
                        break;
                case CCREP_RCON: // RocketGuy: ProQuake rcon support
-                       if (developer.integer >= 10)
-                               Con_Printf("Datagram_ParseConnectionless: received CCREP_RCON from %s.\n", addressstring2);
+                       if (developer_extra.integer)
+                               Con_DPrintf("Datagram_ParseConnectionless: received CCREP_RCON from %s.\n", addressstring2);
 
                        Con_Printf("%s\n", MSG_ReadString());
                        break;
                case CCREP_PLAYER_INFO:
                        // we got a CCREP_PLAYER_INFO??
-                       //if (developer.integer >= 10)
+                       //if (developer_extra.integer)
                                Con_Printf("Datagram_ParseConnectionless: received CCREP_PLAYER_INFO from %s.\n", addressstring2);
                        break;
                case CCREP_RULE_INFO:
                        // we got a CCREP_RULE_INFO??
-                       //if (developer.integer >= 10)
+                       //if (developer_extra.integer)
                                Con_Printf("Datagram_ParseConnectionless: received CCREP_RULE_INFO from %s.\n", addressstring2);
                        break;
                default:
@@ -2586,7 +2586,7 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                stringbuf[length] = 0;
                string = stringbuf;
 
-               if (developer.integer >= 10)
+               if (developer_extra.integer)
                {
                        Con_Printf("NetConn_ServerParsePacket: %s sent us a command:\n", addressstring2);
                        Com_HexDumpToConsole(data, length);
@@ -2634,7 +2634,7 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                        // check engine protocol
                        if(!(s = SearchInfostring(string, "protocol")) || strcmp(s, "darkplaces 3"))
                        {
-                               if (developer.integer >= 10)
+                               if (developer_extra.integer)
                                        Con_Printf("Datagram_ParseConnectionless: sending \"reject Wrong game protocol.\" to %s.\n", addressstring2);
                                NetConn_WriteString(mysocket, "\377\377\377\377reject Wrong game protocol.", peeraddress);
                                return true;
@@ -2651,7 +2651,7 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                                        {
                                                // client crashed and is coming back,
                                                // keep their stuff intact
-                                               if (developer.integer >= 10)
+                                               if (developer_extra.integer)
                                                        Con_Printf("Datagram_ParseConnectionless: sending \"accept\" to %s.\n", addressstring2);
                                                NetConn_WriteString(mysocket, "\377\377\377\377accept", peeraddress);
                                                SV_VM_Begin();
@@ -2662,7 +2662,7 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                                        {
                                                // client is still trying to connect,
                                                // so we send a duplicate reply
-                                               if (developer.integer >= 10)
+                                               if (developer_extra.integer)
                                                        Con_Printf("Datagram_ParseConnectionless: sending duplicate accept to %s.\n", addressstring2);
                                                NetConn_WriteString(mysocket, "\377\377\377\377accept", peeraddress);
                                        }
@@ -2680,7 +2680,7 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                                if (!client->active && (conn = NetConn_Open(mysocket, peeraddress)))
                                {
                                        // allocated connection
-                                       if (developer.integer >= 10)
+                                       if (developer_extra.integer)
                                                Con_Printf("Datagram_ParseConnectionless: sending \"accept\" to %s.\n", conn->address);
                                        NetConn_WriteString(mysocket, "\377\377\377\377accept", peeraddress);
                                        // now set up the client
@@ -2693,7 +2693,7 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                        }
 
                        // no empty slots found - server is full
-                       if (developer.integer >= 10)
+                       if (developer_extra.integer)
                                Con_Printf("Datagram_ParseConnectionless: sending \"reject Server is full.\" to %s.\n", addressstring2);
                        NetConn_WriteString(mysocket, "\377\377\377\377reject Server is full.", peeraddress);
 
@@ -2709,8 +2709,8 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
 
                        if (NetConn_BuildStatusResponse(challenge, response, sizeof(response), false))
                        {
-                               if (developer.integer >= 10)
-                                       Con_Printf("Sending reply to master %s - %s\n", addressstring2, response);
+                               if (developer_extra.integer)
+                                       Con_DPrintf("Sending reply to master %s - %s\n", addressstring2, response);
                                NetConn_WriteString(mysocket, response, peeraddress);
                        }
                        return true;
@@ -2725,8 +2725,8 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
 
                        if (NetConn_BuildStatusResponse(challenge, response, sizeof(response), true))
                        {
-                               if (developer.integer >= 10)
-                                       Con_Printf("Sending reply to client %s - %s\n", addressstring2, response);
+                               if (developer_extra.integer)
+                                       Con_DPrintf("Sending reply to client %s - %s\n", addressstring2, response);
                                NetConn_WriteString(mysocket, response, peeraddress);
                        }
                        return true;
@@ -2799,8 +2799,8 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                }
                if (!strncmp(string, "ping", 4))
                {
-                       if (developer.integer >= 10)
-                               Con_Printf("Received ping from %s, sending ack\n", addressstring2);
+                       if (developer_extra.integer)
+                               Con_DPrintf("Received ping from %s, sending ack\n", addressstring2);
                        NetConn_WriteString(mysocket, "\377\377\377\377ack", peeraddress);
                        return true;
                }
@@ -2829,8 +2829,8 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                switch (c)
                {
                case CCREQ_CONNECT:
-                       if (developer.integer >= 10)
-                               Con_Printf("Datagram_ParseConnectionless: received CCREQ_CONNECT from %s.\n", addressstring2);
+                       if (developer_extra.integer)
+                               Con_DPrintf("Datagram_ParseConnectionless: received CCREQ_CONNECT from %s.\n", addressstring2);
                        if(!islocal && sv_public.integer <= -2)
                                break;
 
@@ -2838,8 +2838,8 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                        protocolnumber = MSG_ReadByte();
                        if (strcmp(protocolname, "QUAKE") || protocolnumber != NET_PROTOCOL_VERSION)
                        {
-                               if (developer.integer >= 10)
-                                       Con_Printf("Datagram_ParseConnectionless: sending CCREP_REJECT \"Incompatible version.\" to %s.\n", addressstring2);
+                               if (developer_extra.integer)
+                                       Con_DPrintf("Datagram_ParseConnectionless: sending CCREP_REJECT \"Incompatible version.\" to %s.\n", addressstring2);
                                SZ_Clear(&net_message);
                                // save space for the header, filled in later
                                MSG_WriteLong(&net_message, 0);
@@ -2861,8 +2861,8 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                                        // (if so, keep their stuff intact)
 
                                        // send a reply
-                                       if (developer.integer >= 10)
-                                               Con_Printf("Datagram_ParseConnectionless: sending duplicate CCREP_ACCEPT to %s.\n", addressstring2);
+                                       if (developer_extra.integer)
+                                               Con_DPrintf("Datagram_ParseConnectionless: sending duplicate CCREP_ACCEPT to %s.\n", addressstring2);
                                        SZ_Clear(&net_message);
                                        // save space for the header, filled in later
                                        MSG_WriteLong(&net_message, 0);
@@ -2897,8 +2897,8 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                                        // connect to the client
                                        // everything is allocated, just fill in the details
                                        strlcpy (conn->address, addressstring2, sizeof (conn->address));
-                                       if (developer.integer >= 10)
-                                               Con_Printf("Datagram_ParseConnectionless: sending CCREP_ACCEPT to %s.\n", addressstring2);
+                                       if (developer_extra.integer)
+                                               Con_DPrintf("Datagram_ParseConnectionless: sending CCREP_ACCEPT to %s.\n", addressstring2);
                                        // send back the info about the server connection
                                        SZ_Clear(&net_message);
                                        // save space for the header, filled in later
@@ -2917,8 +2917,8 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                                }
                        }
 
-                       if (developer.integer >= 10)
-                               Con_Printf("Datagram_ParseConnectionless: sending CCREP_REJECT \"Server is full.\" to %s.\n", addressstring2);
+                       if (developer_extra.integer)
+                               Con_DPrintf("Datagram_ParseConnectionless: sending CCREP_REJECT \"Server is full.\" to %s.\n", addressstring2);
                        // no room; try to let player know
                        SZ_Clear(&net_message);
                        // save space for the header, filled in later
@@ -2930,16 +2930,16 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                        SZ_Clear(&net_message);
                        break;
                case CCREQ_SERVER_INFO:
-                       if (developer.integer >= 10)
-                               Con_Printf("Datagram_ParseConnectionless: received CCREQ_SERVER_INFO from %s.\n", addressstring2);
+                       if (developer_extra.integer)
+                               Con_DPrintf("Datagram_ParseConnectionless: received CCREQ_SERVER_INFO from %s.\n", addressstring2);
                        if(!islocal && sv_public.integer <= -1)
                                break;
                        if (sv.active && !strcmp(MSG_ReadString(), "QUAKE"))
                        {
                                int numclients;
                                char myaddressstring[128];
-                               if (developer.integer >= 10)
-                                       Con_Printf("Datagram_ParseConnectionless: sending CCREP_SERVER_INFO to %s.\n", addressstring2);
+                               if (developer_extra.integer)
+                                       Con_DPrintf("Datagram_ParseConnectionless: sending CCREP_SERVER_INFO to %s.\n", addressstring2);
                                SZ_Clear(&net_message);
                                // save space for the header, filled in later
                                MSG_WriteLong(&net_message, 0);
@@ -2961,8 +2961,8 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                        }
                        break;
                case CCREQ_PLAYER_INFO:
-                       if (developer.integer >= 10)
-                               Con_Printf("Datagram_ParseConnectionless: received CCREQ_PLAYER_INFO from %s.\n", addressstring2);
+                       if (developer_extra.integer)
+                               Con_DPrintf("Datagram_ParseConnectionless: received CCREQ_PLAYER_INFO from %s.\n", addressstring2);
                        if(!islocal && sv_public.integer <= -1)
                                break;
                        if (sv.active)
@@ -2994,8 +2994,8 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat
                        }
                        break;
                case CCREQ_RULE_INFO:
-                       if (developer.integer >= 10)
-                               Con_Printf("Datagram_ParseConnectionless: received CCREQ_RULE_INFO from %s.\n", addressstring2);
+                       if (developer_extra.integer)
+                               Con_DPrintf("Datagram_ParseConnectionless: received CCREQ_RULE_INFO from %s.\n", addressstring2);
                        if(!islocal && sv_public.integer <= -1)
                                break;
                        if (sv.active)
index 323cbb965665e23fe2765005e5a74289a80bec3d..894abfae07f22963c873a0a4fb98810eb10e9853 100644 (file)
@@ -25,7 +25,7 @@ void VM_Warning(const char *fmt, ...)
        dpvsnprintf(msg,sizeof(msg),fmt,argptr);
        va_end(argptr);
 
-       Con_Print(msg);
+       Con_DPrint(msg);
 
        // TODO: either add a cvar/cmd to control the state dumping or replace some of the calls with Con_Printf [9/13/2006 Black]
        if(prvm_backtraceforwarnings.integer && recursive != realtime) // NOTE: this compares to the time, just in case if PRVM_PrintState causes a Host_Error and keeps recursive set
@@ -744,15 +744,12 @@ void VM_dprint (void)
 {
        char string[VM_STRINGTEMP_LENGTH];
        VM_SAFEPARMCOUNTRANGE(1, 8, VM_dprint);
-       if (developer.integer)
-       {
-               VM_VarString(0, string, sizeof(string));
+       VM_VarString(0, string, sizeof(string));
 #if 1
-               Con_Printf("%s", string);
+       Con_DPrintf("%s", string);
 #else
-               Con_Printf("%s: %s", PRVM_NAME, string);
+       Con_DPrintf("%s: %s", PRVM_NAME, string);
 #endif
-       }
 }
 
 /*
@@ -974,12 +971,12 @@ void VM_remove (void)
        ed = PRVM_G_EDICT(OFS_PARM0);
        if( PRVM_NUM_FOR_EDICT(ed) <= prog->reserved_edicts )
        {
-               if (developer.integer >= 1)
+               if (developer.integer)
                        VM_Warning( "VM_remove: tried to remove the null entity or a reserved entity!\n" );
        }
        else if( ed->priv.required->free )
        {
-               if (developer.integer >= 1)
+               if (developer.integer)
                        VM_Warning( "VM_remove: tried to remove an already freed entity!\n" );
        }
        else
@@ -1845,14 +1842,14 @@ void VM_fopen(void)
        if (prog->openfiles[filenum] == NULL)
        {
                PRVM_G_FLOAT(OFS_RETURN) = -1;
-               if (developer.integer >= 100)
+               if (developer_extra.integer)
                        VM_Warning("VM_fopen: %s: %s mode %s failed\n", PRVM_NAME, filename, modestring);
        }
        else
        {
                PRVM_G_FLOAT(OFS_RETURN) = filenum;
-               if (developer.integer >= 100)
-                       Con_Printf("VM_fopen: %s: %s mode %s opened as #%i\n", PRVM_NAME, filename, modestring, filenum);
+               if (developer_extra.integer)
+                       Con_DPrintf("VM_fopen: %s: %s mode %s opened as #%i\n", PRVM_NAME, filename, modestring, filenum);
                prog->openfiles_origin[filenum] = PRVM_AllocationOrigin();
        }
 }
@@ -1886,8 +1883,8 @@ void VM_fclose(void)
        prog->openfiles[filenum] = NULL;
        if(prog->openfiles_origin[filenum])
                PRVM_Free((char *)prog->openfiles_origin[filenum]);
-       if (developer.integer >= 100)
-               Con_Printf("VM_fclose: %s: #%i closed\n", PRVM_NAME, filenum);
+       if (developer_extra.integer)
+               Con_DPrintf("VM_fclose: %s: #%i closed\n", PRVM_NAME, filenum);
 }
 
 /*
@@ -1937,8 +1934,8 @@ void VM_fgets(void)
                if (c != '\n')
                        FS_UnGetc(prog->openfiles[filenum], (unsigned char)c);
        }
-       if (developer.integer >= 100)
-               Con_Printf("fgets: %s: %s\n", PRVM_NAME, string);
+       if (developer_extra.integer)
+               Con_DPrintf("fgets: %s: %s\n", PRVM_NAME, string);
        if (c >= 0 || end)
                PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(string);
 }
@@ -1973,8 +1970,8 @@ void VM_fputs(void)
        VM_VarString(1, string, sizeof(string));
        if ((stringlength = (int)strlen(string)))
                FS_Write(prog->openfiles[filenum], string, stringlength);
-       if (developer.integer >= 100)
-               Con_Printf("fputs: %s: %s\n", PRVM_NAME, string);
+       if (developer_extra.integer)
+               Con_DPrintf("fputs: %s: %s\n", PRVM_NAME, string);
 }
 
 /*
index c6a1a8590c6357f4d5c3cc6c679fb252ea7a08a3..80125f77d734fcf93920fa10d4896f771360c69a 100644 (file)
@@ -2878,8 +2878,8 @@ int PRVM_SetEngineString(const char *s)
                if (prog->knownstrings[i] == s)
                        return -1 - i;
        // new unknown engine string
-       if (developer.integer >= 200)
-               Con_Printf("new engine string %p = \"%s\"\n", s, s);
+       if (developer_insane.integer)
+               Con_DPrintf("new engine string %p = \"%s\"\n", s, s);
        for (i = prog->firstfreeknownstring;i < prog->numknownstrings;i++)
                if (!prog->knownstrings[i])
                        break;
@@ -2929,8 +2929,8 @@ int PRVM_SetTempString(const char *s)
        if (!s)
                return 0;
        size = (int)strlen(s) + 1;
-       if (developer.integer >= 300)
-               Con_Printf("PRVM_SetTempString: cursize %i, size %i\n", vm_tempstringsbuf.cursize, size);
+       if (developer_insane.integer)
+               Con_DPrintf("PRVM_SetTempString: cursize %i, size %i\n", vm_tempstringsbuf.cursize, size);
        if (vm_tempstringsbuf.maxsize < vm_tempstringsbuf.cursize + size)
        {
                sizebuf_t old = vm_tempstringsbuf;
@@ -2941,8 +2941,7 @@ int PRVM_SetTempString(const char *s)
                        vm_tempstringsbuf.maxsize *= 2;
                if (vm_tempstringsbuf.maxsize != old.maxsize || vm_tempstringsbuf.data == NULL)
                {
-                       if (developer.integer >= 100)
-                               Con_Printf("PRVM_SetTempString: enlarging tempstrings buffer (%iKB -> %iKB)\n", old.maxsize/1024, vm_tempstringsbuf.maxsize/1024);
+                       Con_DPrintf("PRVM_SetTempString: enlarging tempstrings buffer (%iKB -> %iKB)\n", old.maxsize/1024, vm_tempstringsbuf.maxsize/1024);
                        vm_tempstringsbuf.data = (unsigned char *) Mem_Alloc(sv_mempool, vm_tempstringsbuf.maxsize);
                        if (old.cursize)
                                memcpy(vm_tempstringsbuf.data, old.data, old.cursize);
index 97130220029d56a6a55f86bebe5a486658edac58..4544e5b03f2dab5914711f475d06139431f42d06 100644 (file)
@@ -836,8 +836,8 @@ chooseexecprogram:
        }
 
 cleanup:
-       if (developer.integer >= 200 && vm_tempstringsbuf.cursize > restorevm_tempstringsbuf_cursize)
-               Con_Printf("MVM_ExecuteProgram: %s used %i bytes of tempstrings\n", PRVM_GetString(prog->functions[fnum].s_name), vm_tempstringsbuf.cursize - restorevm_tempstringsbuf_cursize);
+       if (developer_insane.integer && vm_tempstringsbuf.cursize > restorevm_tempstringsbuf_cursize)
+               Con_DPrintf("MVM_ExecuteProgram: %s used %i bytes of tempstrings\n", PRVM_GetString(prog->functions[fnum].s_name), vm_tempstringsbuf.cursize - restorevm_tempstringsbuf_cursize);
        // delete tempstrings created by this function
        vm_tempstringsbuf.cursize = restorevm_tempstringsbuf_cursize;
 
@@ -1040,8 +1040,8 @@ chooseexecprogram:
        }
 
 cleanup:
-       if (developer.integer >= 200 && vm_tempstringsbuf.cursize > restorevm_tempstringsbuf_cursize)
-               Con_Printf("CLVM_ExecuteProgram: %s used %i bytes of tempstrings\n", PRVM_GetString(prog->functions[fnum].s_name), vm_tempstringsbuf.cursize - restorevm_tempstringsbuf_cursize);
+       if (developer_insane.integer && vm_tempstringsbuf.cursize > restorevm_tempstringsbuf_cursize)
+               Con_DPrintf("CLVM_ExecuteProgram: %s used %i bytes of tempstrings\n", PRVM_GetString(prog->functions[fnum].s_name), vm_tempstringsbuf.cursize - restorevm_tempstringsbuf_cursize);
        // delete tempstrings created by this function
        vm_tempstringsbuf.cursize = restorevm_tempstringsbuf_cursize;
 
@@ -1244,8 +1244,8 @@ chooseexecprogram:
        }
 
 cleanup:
-       if (developer.integer >= 200 && vm_tempstringsbuf.cursize > restorevm_tempstringsbuf_cursize)
-               Con_Printf("SVVM_ExecuteProgram: %s used %i bytes of tempstrings\n", PRVM_GetString(prog->functions[fnum].s_name), vm_tempstringsbuf.cursize - restorevm_tempstringsbuf_cursize);
+       if (developer_insane.integer && vm_tempstringsbuf.cursize > restorevm_tempstringsbuf_cursize)
+               Con_DPrintf("SVVM_ExecuteProgram: %s used %i bytes of tempstrings\n", PRVM_GetString(prog->functions[fnum].s_name), vm_tempstringsbuf.cursize - restorevm_tempstringsbuf_cursize);
        // delete tempstrings created by this function
        vm_tempstringsbuf.cursize = restorevm_tempstringsbuf_cursize;
 
index ff5a94abf5845a834a3dbe539ca1b961bc36af10..99666756ba90ea59a495173026baeaf8296f562c 100644 (file)
@@ -53,7 +53,7 @@
                                }
                                else
                                {
-                                       if( developer.integer >= 1 )
+                                       if (developer.integer)
                                        {
                                                prog->xfunction->profile += (st - startst);
                                                startst = st;
index a3efa6a1f5b873c674b47cc3e798d5d261cdbb48..159edfdd687fcef4308a85470ba049377903bc1c 100644 (file)
@@ -361,6 +361,8 @@ extern char engineversion[128];
 extern qboolean noclip_anglehack;
 
 extern cvar_t developer;
+extern cvar_t developer_extra;
+extern cvar_t developer_insane;
 extern cvar_t developer_loadfile;
 extern cvar_t developer_loading;
 
index f5b4e204a2ff8a5ff6fb8aa494a8cb92f15954c8..7e0b2ecf0af80817e3f6100f3c49885045c01ce5 100644 (file)
@@ -3047,8 +3047,8 @@ void R_RTLight_Compile(rtlight_t *rtlight)
                        if (CHECKPVSBIT(rtlight->static_shadowtrispvs, i))
                                shadowtris++;
 
-       if (developer.integer >= 10)
-               Con_Printf("static light built: %f %f %f : %f %f %f box, %i light triangles, %i shadow triangles, %i zpass/%i zfail compiled shadow volume triangles\n", rtlight->cullmins[0], rtlight->cullmins[1], rtlight->cullmins[2], rtlight->cullmaxs[0], rtlight->cullmaxs[1], rtlight->cullmaxs[2], lighttris, shadowtris, shadowzpasstris, shadowzfailtris);
+       if (developer_extra.integer)
+               Con_DPrintf("static light built: %f %f %f : %f %f %f box, %i light triangles, %i shadow triangles, %i zpass/%i zfail compiled shadow volume triangles\n", rtlight->cullmins[0], rtlight->cullmins[1], rtlight->cullmins[2], rtlight->cullmaxs[0], rtlight->cullmaxs[1], rtlight->cullmaxs[2], lighttris, shadowtris, shadowzpasstris, shadowzfailtris);
 }
 
 void R_RTLight_Uncompile(rtlight_t *rtlight)
index f5922f0f2241ff586095cab5d7d2ec8d91a9bf36..3f4292c84e7f73edf2a2f49a7f36707c0980a374 100644 (file)
@@ -353,8 +353,8 @@ static snd_pcm_sframes_t SndSys_Write (const unsigned char* buffer, unsigned int
        written = snd_pcm_writei (pcm_handle, buffer, nbframes);
        if (written < 0)
        {
-               if (developer.integer >= 1000 && vid_activewindow)
-                       Con_Printf ("SndSys_Write: audio write returned %ld (%s)!\n",
+               if (developer_insane.integer && vid_activewindow)
+                       Con_DPrintf ("SndSys_Write: audio write returned %ld (%s)!\n",
                                                 written, snd_strerror (written));
 
                if (SndSys_Recover (written))
@@ -431,7 +431,7 @@ unsigned int SndSys_GetSoundTime (void)
        err = snd_pcm_delay (pcm_handle, &delay);
        if (err < 0)
        {
-               if (developer.integer >= 1000 && vid_activewindow)
+               if (developer_insane.integer && vid_activewindow)
                        Con_DPrintf ("SndSys_GetSoundTime: can't get playback delay (%s)\n",
                                                 snd_strerror (err));
 
index bbc97c07a92094ed0657bf0143aa36449660649a..ce8fff5bcf7d02073d025d78cc6b9bb20c929f9d 100644 (file)
@@ -124,8 +124,8 @@ static OSStatus audioDeviceIOProc(AudioDeviceID inDevice,
                unsigned int missingFrames;
 
                missingFrames = submissionChunk - frameCount;
-               if (developer.integer >= 1000 && vid_activewindow)
-                       Con_Printf("audioDeviceIOProc: %u sample frames missing\n", missingFrames);
+               if (developer_insane.integer && vid_activewindow)
+                       Con_DPrintf("audioDeviceIOProc: %u sample frames missing\n", missingFrames);
                memset(&outBuffer[frameCount * snd_renderbuffer->format.channels], 0, missingFrames * sizeof(outBuffer[0]));
        }
 
index 88dfade64486e4826f44f9f2f0c1ba6e5d91043f..793fc6a2554718d995084186ce79a4490a4bf7d0 100644 (file)
--- a/snd_sdl.c
+++ b/snd_sdl.c
@@ -73,8 +73,8 @@ static void Buffer_Callback (void *userdata, Uint8 *stream, int len)
 
                snd_renderbuffer->startframe += FrameCount;
 
-               if (FrameCount < RequestedFrames && developer.integer >= 1000 && vid_activewindow)
-                       Con_Printf("SDL sound: %u sample frames missing\n", RequestedFrames - FrameCount);
+               if (FrameCount < RequestedFrames && developer_insane.integer && vid_activewindow)
+                       Con_DPrintf("SDL sound: %u sample frames missing\n", RequestedFrames - FrameCount);
 
                sdlaudiotime += RequestedFrames;
 
index ca33b89d7ab471159a2f8f1129cb614dd3d510d9..92ff70dd564972d4d5f83945322107c4d8fb260a 100644 (file)
--- a/snd_win.c
+++ b/snd_win.c
@@ -716,8 +716,8 @@ void SndSys_Submit (void)
                        snd_sent++;
                else if (wResult == WAVERR_STILLPLAYING)
                {
-                       if(developer.integer >= 1000)
-                               Con_Print("waveOutWrite failed (too much sound data)\n");
+                       if(developer_insane.integer)
+                               Con_DPrint("waveOutWrite failed (too much sound data)\n");
                        //h->dwFlags |= WHDR_DONE;
                        //snd_sent++;
                }
index 69208a95fc58c0786575ae2f727279d1886a8ca2..f25c85bddd2397a4978c68b6c927014da5cd1d70 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -2442,8 +2442,8 @@ static void SV_Download_f(void)
        extension = FS_FileExtension(host_client->download_name);
 
        // host_client is asking to download a specified file
-       if (developer.integer >= 100)
-               Con_Printf("Download request for %s by %s\n", host_client->download_name, host_client->name);
+       if (developer_extra.integer)
+               Con_DPrintf("Download request for %s by %s\n", host_client->download_name, host_client->name);
 
        if(is_csqc)
        {
index b3d981005a66eb79d49c55510bd56a583d14daa6..ab3e7d9cadb957aa2e6160a2fb142b268fcef9ec 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -824,8 +824,8 @@ void SV_LinkEdict (prvm_edict_t *ent)
        {
                if (model != NULL)
                {
-                       if (!model->TraceBox && developer.integer >= 1)
-                               Con_Printf("edict %i: SOLID_BSP with non-collidable model\n", PRVM_NUM_FOR_EDICT(ent));
+                       if (!model->TraceBox)
+                               Con_DPrintf("edict %i: SOLID_BSP with non-collidable model\n", PRVM_NUM_FOR_EDICT(ent));
 
                        if (ent->fields.server->angles[0] || ent->fields.server->angles[2] || ent->fields.server->avelocity[0] || ent->fields.server->avelocity[2])
                        {
@@ -1968,8 +1968,8 @@ qboolean SV_UnstickEntity (prvm_edict_t *ent)
                        Con_DPrintf("Unstuck entity %i (classname \"%s\") with offset %f %f %f.\n", (int)PRVM_EDICT_TO_PROG(ent), PRVM_GetString(ent->fields.server->classname), offset[0], offset[1], offset[2]);
                        return true;
                case UNSTICK_STUCK:
-                       if (developer.integer >= 100)
-                               Con_Printf("Stuck entity %i (classname \"%s\").\n", (int)PRVM_EDICT_TO_PROG(ent), PRVM_GetString(ent->fields.server->classname));
+                       if (developer_extra.integer)
+                               Con_DPrintf("Stuck entity %i (classname \"%s\").\n", (int)PRVM_EDICT_TO_PROG(ent), PRVM_GetString(ent->fields.server->classname));
                        return false;
                default:
                        Con_Printf("SV_UnstickEntityReturnOffset returned a value outside its enum.\n");
index c923b83fffff85d48f1086ba18f3db2079bf279b..db253573c72cde7c5a7445321e2d54a80bef775d 100644 (file)
@@ -2765,8 +2765,8 @@ static void VM_SV_gettagindex (void)
        {
                tag_index = SV_GetTagIndex(ent, tag_name);
                if (tag_index == 0)
-                       if(developer.integer >= 100)
-                               Con_Printf("VM_SV_gettagindex(entity #%i): tag \"%s\" not found\n", PRVM_NUM_FOR_EDICT(ent), tag_name);
+                       if(developer_extra.integer)
+                               Con_DPrintf("VM_SV_gettagindex(entity #%i): tag \"%s\" not found\n", PRVM_NUM_FOR_EDICT(ent), tag_name);
        }
        PRVM_G_FLOAT(OFS_RETURN) = tag_index;
 }
index 0133c09641a7cf691962ce31237135539f0c7ba0..1902eef76d7a3c1f71296175105f979621d3a255 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -961,24 +961,24 @@ qboolean VID_InitMode(viddef_mode_t *mode)
                                        Con_DPrintf("enumerating modes yielded a bogus item... please debug this\n");
                                        continue;
                                }
-                               if(developer.integer >= 100)
-                                       Con_Printf("Found mode %dx%dx%dbpp %dHz... ", (int)thismode.dmPelsWidth, (int)thismode.dmPelsHeight, (int)thismode.dmBitsPerPel, (int)thismode.dmDisplayFrequency);
+                               if(developer_extra.integer)
+                                       Con_DPrintf("Found mode %dx%dx%dbpp %dHz... ", (int)thismode.dmPelsWidth, (int)thismode.dmPelsHeight, (int)thismode.dmBitsPerPel, (int)thismode.dmDisplayFrequency);
                                if(thismode.dmBitsPerPel != (DWORD)bpp)
                                {
-                                       if(developer.integer >= 100)
-                                               Con_Printf("wrong bpp\n");
+                                       if(developer_extra.integer)
+                                               Con_DPrintf("wrong bpp\n");
                                        continue;
                                }
                                if(thismode.dmPelsWidth != (DWORD)width)
                                {
-                                       if(developer.integer >= 100)
-                                               Con_Printf("wrong width\n");
+                                       if(developer_extra.integer)
+                                               Con_DPrintf("wrong width\n");
                                        continue;
                                }
                                if(thismode.dmPelsHeight != (DWORD)height)
                                {
-                                       if(developer.integer >= 100)
-                                               Con_Printf("wrong height\n");
+                                       if(developer_extra.integer)
+                                               Con_DPrintf("wrong height\n");
                                        continue;
                                }
 
@@ -987,14 +987,14 @@ qboolean VID_InitMode(viddef_mode_t *mode)
                                        // if we have a good mode, make sure this mode is better than the previous one, and allowed by the refreshrate
                                        if(thismode.dmDisplayFrequency > (DWORD)refreshrate)
                                        {
-                                               if(developer.integer >= 100)
-                                                       Con_Printf("too high refresh rate\n");
+                                               if(developer_extra.integer)
+                                                       Con_DPrintf("too high refresh rate\n");
                                                continue;
                                        }
                                        else if(thismode.dmDisplayFrequency <= gdevmode.dmDisplayFrequency)
                                        {
-                                               if(developer.integer >= 100)
-                                                       Con_Printf("doesn't beat previous best match (too low)\n");
+                                               if(developer_extra.integer)
+                                                       Con_DPrintf("doesn't beat previous best match (too low)\n");
                                                continue;
                                        }
                                }
@@ -1003,8 +1003,8 @@ qboolean VID_InitMode(viddef_mode_t *mode)
                                        // we do have one, but it isn't good... make sure it has a lower frequency than the previous one
                                        if(thismode.dmDisplayFrequency >= gdevmode.dmDisplayFrequency)
                                        {
-                                               if(developer.integer >= 100)
-                                                       Con_Printf("doesn't beat previous best match (too high)\n");
+                                               if(developer_extra.integer)
+                                                       Con_DPrintf("doesn't beat previous best match (too high)\n");
                                                continue;
                                        }
                                }
@@ -1015,12 +1015,12 @@ qboolean VID_InitMode(viddef_mode_t *mode)
                                        foundgoodmode = true;
                                else
                                {
-                                       if(developer.integer >= 100)
-                                               Con_Printf("(out of range)\n");
+                                       if(developer_extra.integer)
+                                               Con_DPrintf("(out of range)\n");
                                }
                                foundmode = true;
-                               if(developer.integer >= 100)
-                                       Con_Printf("accepted\n");
+                               if(developer_extra.integer)
+                                       Con_DPrintf("accepted\n");
                        }
                }
 
diff --git a/world.c b/world.c
index 935abfbfb163d7ba15c51f8b0e9de7608928b006..7f5509080123c370ca996f01e66a64038969c59a 100644 (file)
--- a/world.c
+++ b/world.c
@@ -131,8 +131,8 @@ void World_SetSize(world_t *world, const char *filename, const vec3_t mins, cons
        World_ClearLink(&world->areagrid_outside);
        for (i = 0;i < AREA_GRIDNODES;i++)
                World_ClearLink(&world->areagrid[i]);
-       if (developer.integer >= 10)
-               Con_Printf("areagrid settings: divisions %ix%ix1 : box %f %f %f : %f %f %f size %f %f %f grid %f %f %f (mingrid %f)\n", AREA_GRID, AREA_GRID, world->areagrid_mins[0], world->areagrid_mins[1], world->areagrid_mins[2], world->areagrid_maxs[0], world->areagrid_maxs[1], world->areagrid_maxs[2], world->areagrid_size[0], world->areagrid_size[1], world->areagrid_size[2], 1.0f / world->areagrid_scale[0], 1.0f / world->areagrid_scale[1], 1.0f / world->areagrid_scale[2], sv_areagrid_mingridsize.value);
+       if (developer_extra.integer)
+               Con_DPrintf("areagrid settings: divisions %ix%ix1 : box %f %f %f : %f %f %f size %f %f %f grid %f %f %f (mingrid %f)\n", AREA_GRID, AREA_GRID, world->areagrid_mins[0], world->areagrid_mins[1], world->areagrid_mins[2], world->areagrid_maxs[0], world->areagrid_maxs[1], world->areagrid_maxs[2], world->areagrid_size[0], world->areagrid_size[1], world->areagrid_size[2], 1.0f / world->areagrid_scale[0], 1.0f / world->areagrid_scale[1], 1.0f / world->areagrid_scale[2], sv_areagrid_mingridsize.value);
 }
 
 /*
diff --git a/zone.c b/zone.c
index d61def1a021559333501f7d60432131eca9dfe55..889adc9d0c86bc54bb9c2eb97bb5451fa88452ad 100644 (file)
--- a/zone.c
+++ b/zone.c
@@ -327,8 +327,8 @@ void *_Mem_Alloc(mempool_t *pool, void *olddata, size_t size, size_t alignment,
        }
        if (pool == NULL)
                Sys_Error("Mem_Alloc: pool == NULL (alloc at %s:%i)", filename, fileline);
-       if (developer.integer && developer_memory.integer)
-               Con_Printf("Mem_Alloc: pool %s, file %s:%i, size %i bytes\n", pool->name, filename, fileline, (int)size);
+       if (developer_memory.integer)
+               Con_DPrintf("Mem_Alloc: pool %s, file %s:%i, size %i bytes\n", pool->name, filename, fileline, (int)size);
        //if (developer.integer && developer_memorydebug.integer)
        //      _Mem_CheckSentinelsGlobal(filename, fileline);
        pool->totalsize += size;
@@ -397,8 +397,8 @@ static void _Mem_FreeBlock(memheader_t *mem, const char *filename, int fileline)
                Sys_Error("Mem_Free: trashed header sentinel 2 (alloc at %s:%i, free at %s:%i)", mem->filename, mem->fileline, filename, fileline);
 
        pool = mem->pool;
-       if (developer.integer && developer_memory.integer)
-               Con_Printf("Mem_Free: pool %s, alloc %s:%i, free %s:%i, size %i bytes\n", pool->name, mem->filename, mem->fileline, filename, fileline, (int)(mem->size));
+       if (developer_memory.integer)
+               Con_DPrintf("Mem_Free: pool %s, alloc %s:%i, free %s:%i, size %i bytes\n", pool->name, mem->filename, mem->fileline, filename, fileline, (int)(mem->size));
        // unlink memheader from doubly linked list
        if ((mem->prev ? mem->prev->next != mem : pool->chain != mem) || (mem->next && mem->next->prev != mem))
                Sys_Error("Mem_Free: not allocated or double freed (free at %s:%i)", filename, fileline);
@@ -424,7 +424,7 @@ void _Mem_Free(void *data, const char *filename, int fileline)
                return;
        }
 
-       if (developer.integer && developer_memorydebug.integer)
+       if (developer_memorydebug.integer)
        {
                //_Mem_CheckSentinelsGlobal(filename, fileline);
                if (!Mem_IsAllocated(NULL, data))
@@ -437,8 +437,8 @@ void _Mem_Free(void *data, const char *filename, int fileline)
 mempool_t *_Mem_AllocPool(const char *name, int flags, mempool_t *parent, const char *filename, int fileline)
 {
        mempool_t *pool;
-       //if (developer.integer && developer_memorydebug.integer)
-       //      _Mem_CheckSentinelsGlobal(filename, fileline);
+       if (developer_memorydebug.integer)
+               _Mem_CheckSentinelsGlobal(filename, fileline);
        pool = (mempool_t *)Clump_AllocBlock(sizeof(mempool_t));
        if (pool == NULL)
        {
@@ -469,8 +469,8 @@ void _Mem_FreePool(mempool_t **poolpointer, const char *filename, int fileline)
        mempool_t *pool = *poolpointer;
        mempool_t **chainaddress, *iter, *temp;
 
-       //if (developer.integer && developer_memorydebug.integer)
-       //      _Mem_CheckSentinelsGlobal(filename, fileline);
+       if (developer_memorydebug.integer)
+               _Mem_CheckSentinelsGlobal(filename, fileline);
        if (pool)
        {
                // unlink pool from chain
@@ -503,7 +503,7 @@ void _Mem_EmptyPool(mempool_t *pool, const char *filename, int fileline)
 {
        mempool_t *chainaddress;
 
-       if (developer.integer && developer_memorydebug.integer)
+       if (developer_memorydebug.integer)
        {
                //_Mem_CheckSentinelsGlobal(filename, fileline);
                // check if this pool is in the poolchain