| 351 | void drawradarent(float x, float y, float yaw, int col, int row, float iconsize, bool pulse, const char *label = NULL, ...) PRINTFARGS(8, 9); |
| 352 | |
| 353 | void 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 | |
| 376 | struct hudline : cline |
| 377 | { |
no test coverage detected