MCPcopy Create free account
hub / github.com/JACoders/OpenJK / SCR_DrawDebugGraph

Function SCR_DrawDebugGraph

code/client/cl_scrn.cpp:355–382  ·  view source on GitHub ↗

============== SCR_DrawDebugGraph ============== */

Source from the content-addressed store, hash-verified

353==============
354*/
355void SCR_DrawDebugGraph (void)
356{
357 int a, x, y, w, i, h;
358 float v;
359
360 //
361 // draw the graph
362 //
363 w = cls.glconfig.vidWidth;
364 x = 0;
365 y = cls.glconfig.vidHeight;
366 re.SetColor( g_color_table[0] );
367 re.DrawStretchPic(x, y - cl_graphheight->integer,
368 w, cl_graphheight->integer, 0, 0, 0, 0, 0 );
369 re.SetColor( NULL );
370
371 for (a=0 ; a<w ; a++)
372 {
373 i = (current-1-a+1024) & 1023;
374 v = values[i].value;
375 v = v * cl_graphscale->integer + cl_graphshift->integer;
376
377 if (v < 0)
378 v += cl_graphheight->integer * (1+(int)(-v / cl_graphheight->integer));
379 h = (int)v % cl_graphheight->integer;
380 re.DrawStretchPic( x+w-1-a, y - h, 1, h, 0, 0, 0, 0, 0 );
381 }
382}
383//=============================================================================
384
385/*

Callers 1

SCR_DrawScreenFieldFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected