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

Method render

source/src/renderhud.cpp:407–421  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

405 else consolebuffer<hudline>::addline(sf, totalmillis).type = type;
406 }
407 void render()
408 {
409 if(!conlines.length()) return;
410 glPushMatrix();
411 glLoadIdentity();
412 glOrtho(0, VIRTW*0.9f, VIRTH*0.9f, 0, -1, 1);
413 int dispmillis = arenaintermission ? 6000 : 3000;
414 loopi(min(conlines.length(), 3)) if(totalmillis-conlines[i].millis<dispmillis)
415 {
416 cline &c = conlines[i];
417 int tw = text_width(c.line);
418 draw_text(c.line, int(tw > VIRTW*0.9f ? 0 : (VIRTW*0.9f-tw)/2), int(((VIRTH*0.9f)/4*3)+FONTH*i+pow((totalmillis-c.millis)/(float)dispmillis, 4)*VIRTH*0.9f/4.0f));
419 }
420 glPopMatrix();
421 }
422};
423
424hudmessages hudmsgs;

Callers 1

gl_drawhudFunction · 0.45

Calls 5

minFunction · 0.85
text_widthFunction · 0.85
draw_textFunction · 0.85
loopiFunction · 0.70
lengthMethod · 0.45

Tested by

no test coverage detected