MCPcopy Create free account
hub / github.com/demoth/jake2 / DrawDebugGraph

Method DrawDebugGraph

client/src/main/java/jake2/client/SCR.java:178–204  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

176 * ============== SCR_DrawDebugGraph ==============
177 */
178 static void DrawDebugGraph() {
179 int a, x, y, w, i, h;
180 float v;
181 int color;
182
183 // draw the graph
184
185 w = ClientGlobals.scr_vrect.width;
186
187 x = ClientGlobals.scr_vrect.x;
188 y = ClientGlobals.scr_vrect.y + ClientGlobals.scr_vrect.height;
189 ClientGlobals.re.DrawFill(x, (int) (y - scr_graphheight.value), w,
190 (int) scr_graphheight.value, 8);
191
192 for (a = 0; a < w; a++) {
193 i = (current - 1 - a + 1024) & 1023;
194 v = values[i].value;
195 color = values[i].color;
196 v = v * scr_graphscale.value + scr_graphshift.value;
197
198 if (v < 0)
199 v += scr_graphheight.value
200 * (1 + (int) (-v / scr_graphheight.value));
201 h = (int) v % (int) scr_graphheight.value;
202 ClientGlobals.re.DrawFill(x + w - 1 - a, y - h, 1, h, color);
203 }
204 }
205
206 /*
207 * ===============================================================================

Callers 1

UpdateScreen2Method · 0.95

Calls 1

DrawFillMethod · 0.65

Tested by

no test coverage detected