/*================Draw_CharDraws one 8*8 graphics characterIt can be clipped to the top of the screen to allow the console to besmoothly scrolled off.================*/void Draw_Char (int x, int y, int num){ byte *dest; byte *source; int drawline; int row, col; num &= 255; if (num == 32 || num == 32+128) return; if (y <= -8) return; // totally off screen// if ( ( y + 8 ) >= vid.height ) if ( ( y + 8 ) > vid.height ) // PGM - status text was missing in sw... return;#ifdef PARANOID if (y > vid.height - 8 || x < 0 || x > vid.width - 8) ri.Sys_Error (ERR_FATAL,"Con_DrawCharacter: (%i, %i)", x, y); if (num < 0 || num > 255) ri.Sys_Error (ERR_FATAL,"Con_DrawCharacter: char %i", num);#endif row = num>>4; col = num&15; source = draw_chars->pixels[0] + (row<<10) + (col<<3); if (y < 0) { // clipped drawline = 8 + y; source -= 128*y; y = 0; } else drawline = 8; dest = vid.buffer + y*vid.rowbytes + x; while (drawline--) { if (source[0] != TRANSPARENT_COLOR) dest[0] = source[0]; if (source[1] != TRANSPARENT_COLOR) dest[1] = source[1]; if (source[2] != TRANSPARENT_COLOR) dest[2] = source[2]; if (source[3] != TRANSPARENT_COLOR) dest[3] = source[3]; if (source[4] != TRANSPARENT_COLOR) dest[4] = source[4]; if (source[5] != TRANSPARENT_COLOR) dest[5] = source[5]; if (source[6] != TRANSPARENT_COLOR) dest[6] = source[6]; if (source[7] != TRANSPARENT_COLOR) dest[7] = source[7]; source += 128; dest += vid.rowbytes; }}