From b0bfffead808d7eae32a32cb8d4d7c67c8edd90c Mon Sep 17 00:00:00 2001 From: havoc Date: Sat, 7 Apr 2018 19:25:34 +0000 Subject: [PATCH] Delete unused Debug_PolygonBegin and associated code. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12370 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=4a6fac9f373f532d7d634b73af48e584571cffb4 --- client.h | 4 ---- clvm_cmds.c | 57 ----------------------------------------------------- 2 files changed, 61 deletions(-) diff --git a/client.h b/client.h index fd42d2b7..5486b1bf 100644 --- a/client.h +++ b/client.h @@ -1726,10 +1726,6 @@ void CL_ParticleExplosion (const vec3_t org); void CL_ParticleExplosion2 (const vec3_t org, int colorStart, int colorLength); void R_NewExplosion(const vec3_t org); -void Debug_PolygonBegin(const char *picname, int flags); -void Debug_PolygonVertex(float x, float y, float z, float s, float t, float r, float g, float b, float a); -void Debug_PolygonEnd(void); - #include "cl_screen.h" extern qboolean sb_showscores; diff --git a/clvm_cmds.c b/clvm_cmds.c index bff7c520..f15abe5d 100644 --- a/clvm_cmds.c +++ b/clvm_cmds.c @@ -3536,63 +3536,6 @@ static void VM_CL_R_PolygonEnd (prvm_prog_t *prog) VM_Warning(prog, "VM_CL_R_PolygonEnd: %i vertices isn't a good choice\n", polys->begin_vertices); } -static vmpolygons_t debugPolys; - -void Debug_PolygonBegin(const char *picname, int drawflag) -{ - if(!debugPolys.initialized) - VM_InitPolygons(&debugPolys); - if(debugPolys.begin_active) - { - Con_Printf("Debug_PolygonBegin: called twice without Debug_PolygonEnd after first\n"); - return; - } - debugPolys.begin_texture = picname[0] ? Draw_CachePic_Flags (picname, CACHEPICFLAG_NOTPERSISTENT)->tex : r_texture_white; - debugPolys.begin_drawflag = drawflag; - debugPolys.begin_vertices = 0; - debugPolys.begin_active = true; -} - -void Debug_PolygonVertex(float x, float y, float z, float s, float t, float r, float g, float b, float a) -{ - if(!debugPolys.begin_active) - { - Con_Printf("Debug_PolygonVertex: Debug_PolygonBegin wasn't called\n"); - return; - } - - if(debugPolys.begin_vertices >= VMPOLYGONS_MAXPOINTS) - { - Con_Printf("Debug_PolygonVertex: may have %i vertices max\n", VMPOLYGONS_MAXPOINTS); - return; - } - - debugPolys.begin_vertex[debugPolys.begin_vertices][0] = x; - debugPolys.begin_vertex[debugPolys.begin_vertices][1] = y; - debugPolys.begin_vertex[debugPolys.begin_vertices][2] = z; - debugPolys.begin_texcoord[debugPolys.begin_vertices][0] = s; - debugPolys.begin_texcoord[debugPolys.begin_vertices][1] = t; - debugPolys.begin_color[debugPolys.begin_vertices][0] = r; - debugPolys.begin_color[debugPolys.begin_vertices][1] = g; - debugPolys.begin_color[debugPolys.begin_vertices][2] = b; - debugPolys.begin_color[debugPolys.begin_vertices][3] = a; - debugPolys.begin_vertices++; -} - -void Debug_PolygonEnd(void) -{ - if (!debugPolys.begin_active) - { - Con_Printf("Debug_PolygonEnd: Debug_PolygonBegin wasn't called\n"); - return; - } - debugPolys.begin_active = false; - if (debugPolys.begin_vertices >= 3) - VMPolygons_Store(&debugPolys); - else - Con_Printf("Debug_PolygonEnd: %i vertices isn't a good choice\n", debugPolys.begin_vertices); -} - /* ============= CL_CheckBottom -- 2.39.2