================== idRenderSystemLocal::DrawSmallString[Color] Draws a multi-colored string with a drop shadow, optionally forcing to a fixed color. Coordinates are at 640 by 480 virtual resolution ================== */
| 409 | ================== |
| 410 | */ |
| 411 | void idRenderSystemLocal::DrawSmallStringExt( int x, int y, const char *string, const idVec4 &setColor, bool forceColor, const idMaterial *material ) { |
| 412 | idVec4 color; |
| 413 | const unsigned char *s; |
| 414 | int xx; |
| 415 | |
| 416 | // draw the colored text |
| 417 | s = (const unsigned char*)string; |
| 418 | xx = x; |
| 419 | SetColor( setColor ); |
| 420 | while ( *s ) { |
| 421 | if ( idStr::IsColor( (const char*)s ) ) { |
| 422 | if ( !forceColor ) { |
| 423 | if ( *(s+1) == C_COLOR_DEFAULT ) { |
| 424 | SetColor( setColor ); |
| 425 | } else { |
| 426 | color = idStr::ColorForIndex( *(s+1) ); |
| 427 | color[3] = setColor[3]; |
| 428 | SetColor( color ); |
| 429 | } |
| 430 | } |
| 431 | s += 2; |
| 432 | continue; |
| 433 | } |
| 434 | DrawSmallChar( xx, y, *s, material ); |
| 435 | xx += SMALLCHAR_WIDTH; |
| 436 | s++; |
| 437 | } |
| 438 | SetColor( colorWhite ); |
| 439 | } |
| 440 | |
| 441 | /* |
| 442 | ===================== |
no outgoing calls
no test coverage detected