MCPcopy Create free account
hub / github.com/assaultcube/AC / drawradarent

Function drawradarent

source/src/renderhud.cpp:353–374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351void drawradarent(float x, float y, float yaw, int col, int row, float iconsize, bool pulse, const char *label = NULL, ...) PRINTFARGS(8, 9);
352
353void drawradarent(float x, float y, float yaw, int col, int row, float iconsize, bool pulse, const char *label, ...)
354{
355 glPushMatrix();
356 if(pulse) glColor4f(1.0f, 1.0f, 1.0f, 0.2f+(sinf(lastmillis/30.0f)+1.0f)/2.0f);
357 else glColor4f(1, 1, 1, 1);
358 glTranslatef(x, y, 0);
359 glRotatef(yaw, 0, 0, 1);
360 drawradaricon(-iconsize/2.0f, -iconsize/2.0f, iconsize, col, row);
361 glPopMatrix();
362 if(label && showmap)
363 {
364 glPushMatrix();
365 glEnable(GL_BLEND);
366 glTranslatef(iconsize/2, iconsize/2, 0);
367 glScalef(1/2.0f, 1/2.0f, 1/2.0f);
368 defvformatstring(lbl, label, label);
369 draw_text(lbl, (int)(x*2), (int)(y*2));
370 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
371 glDisable(GL_BLEND);
372 glPopMatrix();
373 }
374}
375
376struct hudline : cline
377{

Callers 4

drawradar_showmapFunction · 0.85
loopvFunction · 0.85
drawradar_vicinityFunction · 0.85
gl_drawhudFunction · 0.85

Calls 2

drawradariconFunction · 0.85
draw_textFunction · 0.85

Tested by

no test coverage detected