MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / DrawBigStringExt

Method DrawBigStringExt

neo/renderer/RenderSystem.cpp:484–512  ·  view source on GitHub ↗

================== idRenderSystemLocal::DrawBigString[Color] Draws a multi-colored string with a drop shadow, optionally forcing to a fixed color. Coordinates are at 640 by 480 virtual resolution ================== */

Source from the content-addressed store, hash-verified

482==================
483*/
484void idRenderSystemLocal::DrawBigStringExt( int x, int y, const char *string, const idVec4 &setColor, bool forceColor, const idMaterial *material ) {
485 idVec4 color;
486 const char *s;
487 int xx;
488
489 // draw the colored text
490 s = string;
491 xx = x;
492 SetColor( setColor );
493 while ( *s ) {
494 if ( idStr::IsColor( s ) ) {
495 if ( !forceColor ) {
496 if ( *(s+1) == C_COLOR_DEFAULT ) {
497 SetColor( setColor );
498 } else {
499 color = idStr::ColorForIndex( *(s+1) );
500 color[3] = setColor[3];
501 SetColor( color );
502 }
503 }
504 s += 2;
505 continue;
506 }
507 DrawBigChar( xx, y, *s, material );
508 xx += BIGCHAR_WIDTH;
509 s++;
510 }
511 SetColor( colorWhite );
512}
513
514//======================================================================================
515

Callers 1

SCR_DrawFPSFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected