void SCR_DrawConsoleFontUnichar( float x, float y, int ch ) { if ( cls.useLegacyConsoleFont ) { SCR_DrawSmallUnichar( ( int ) x, ( int ) y, ch ); return; } if ( ch != ' ' ) { glyphInfo_t *glyph = Glyph( ch ); float yadj = glyph->top; float xadj = ( SCR_ConsoleFontUnicharWidth( ch ) - glyph->xSkip ) / 2.0; re.DrawStretchPic( x + xadj, y - yadj, glyph->imageWidth, glyph->imageHeight, glyph->s, glyph->t, glyph->s2, glyph->t2, glyph->glyph ); } }
/* ================ Con_DrawNotify Draws the last few lines of output transparently over the game top ================ */ void Con_DrawNotify( void ) { int x, v; int i; int time; int skip = 0; int currentColor; conChar_t *text; currentColor = 7; re.SetColor( g_color_table[ currentColor ] ); v = 0; for ( i = con.current - NUM_CON_TIMES + 1; i <= con.current; i++ ) { if ( i < 0 ) { continue; } time = con.times[ i % NUM_CON_TIMES ]; if ( time == 0 ) { continue; } time = cls.realtime - time; if ( time > con_notifytime->value * 1000 ) { continue; } text = con.text + CON_LINE( i ); if ( cl.snap.ps.pm_type != PM_INTERMISSION && cls.keyCatchers & ( KEYCATCH_UI | KEYCATCH_CGAME ) ) { continue; } for ( x = 0; x < con.linewidth && text[ x ].ch; ++x ) { if ( text[ x ].ch == ' ' ) { continue; } if ( text[ x ].ink != currentColor ) { currentColor = text[ x ].ink; re.SetColor( g_color_table[ currentColor ] ); } SCR_DrawSmallUnichar( cl_conXOffset->integer + con.xadjust + ( x + 1 ) * SMALLCHAR_WIDTH, v, text[ x ].ch ); } v += SMALLCHAR_HEIGHT; } re.SetColor( NULL ); if ( cls.keyCatchers & ( KEYCATCH_UI | KEYCATCH_CGAME ) ) { return; } // draw the chat line if ( cls.keyCatchers & KEYCATCH_MESSAGE ) { if ( chat_irc ) { char buf[ 128 ]; SCR_DrawBigString( 8, v, "say_irc:", 1.0f, qfalse ); skip = strlen( buf ) + 2; } Field_BigDraw( &chatField, skip * BIGCHAR_WIDTH, 232, qtrue, qtrue ); v += BIGCHAR_HEIGHT; } }