================ DrawNotify Draws the last few lines of output transparently over the game top ================ */
| 1048 | ================ |
| 1049 | */ |
| 1050 | void idConsoleLocal::DrawNotify() { |
| 1051 | int x, v; |
| 1052 | short *text_p; |
| 1053 | int i; |
| 1054 | int time; |
| 1055 | int currentColor; |
| 1056 | |
| 1057 | if ( con_noPrint.GetBool() ) { |
| 1058 | return; |
| 1059 | } |
| 1060 | |
| 1061 | currentColor = idStr::ColorIndex( C_COLOR_WHITE ); |
| 1062 | renderSystem->SetColor( idStr::ColorForIndex( currentColor ) ); |
| 1063 | |
| 1064 | v = 0; |
| 1065 | for ( i = current-NUM_CON_TIMES+1; i <= current; i++ ) { |
| 1066 | if ( i < 0 ) { |
| 1067 | continue; |
| 1068 | } |
| 1069 | time = times[i % NUM_CON_TIMES]; |
| 1070 | if ( time == 0 ) { |
| 1071 | continue; |
| 1072 | } |
| 1073 | time = com_frameTime - time; |
| 1074 | if ( time > con_notifyTime.GetFloat() * 1000 ) { |
| 1075 | continue; |
| 1076 | } |
| 1077 | text_p = text + (i % TOTAL_LINES)*LINE_WIDTH; |
| 1078 | |
| 1079 | for ( x = 0; x < LINE_WIDTH; x++ ) { |
| 1080 | if ( ( text_p[x] & 0xff ) == ' ' ) { |
| 1081 | continue; |
| 1082 | } |
| 1083 | if ( idStr::ColorIndex(text_p[x]>>8) != currentColor ) { |
| 1084 | currentColor = idStr::ColorIndex(text_p[x]>>8); |
| 1085 | renderSystem->SetColor( idStr::ColorForIndex( currentColor ) ); |
| 1086 | } |
| 1087 | renderSystem->DrawSmallChar( (x+1)*SMALLCHAR_WIDTH, v, text_p[x] & 0xff, localConsole.charSetShader ); |
| 1088 | } |
| 1089 | |
| 1090 | v += SMALLCHAR_HEIGHT; |
| 1091 | } |
| 1092 | |
| 1093 | renderSystem->SetColor( colorCyan ); |
| 1094 | } |
| 1095 | |
| 1096 | /* |
| 1097 | ================ |
nothing calls this directly
no test coverage detected