engine/EngineConsole.c
/*	Draws the last few lines of output transparently over the game top
*/
Draws the last few lines of output transparently over the game top
Draws the last few lines of output transparently over the game top
void Con_DrawNotify(void)
{
	int				x,v;
	char			*text;
	int				i;
	float			time;
	extern	char	chat_buffer[];
	GL_SetCanvas(CANVAS_CONSOLE); 
	v = vid.conheight; 
	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 = realtime-time;
		if(time > con_notifytime.value)
			continue;
		text = con_text + (i % con_totallines)*con_linewidth;
		for(x = 0; x < con_linewidth; x++)
			Draw_Character((x + 1) << 3, v, text[x]);
		v += 8;
		scr_tileclear_updates = 0; 
	}
	if (key_dest == key_message)
	{
		char *say_prompt; 
		x = 0;
		 -- distinguish say and say_team
		if (team_message)
			say_prompt = "Say (team):";
		else
			say_prompt = "Say (all):";
		Draw_String(8, v, say_prompt); 
		while(chat_buffer[x])
		{
			Draw_Character((x+strlen(say_prompt)+2)<<3,v,chat_buffer[x]); 
			x++;
		}
		Draw_Character((x+strlen(say_prompt)+2)<<3,v,10+((int)(realtime*con_cursorspeed)&1)); 
		v += 8;
		scr_tileclear_updates = 0; 
	}
}
void Con_DrawNotify ( void ) { int x , v ; char * text ; int i ; float time ; extern char chat_buffer [ ] ; GL_SetCanvas ( CANVAS_CONSOLE ) ; v = vid . conheight ; 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 = realtime - time ; if ( time > con_notifytime . value ) continue ; text = con_text + ( i % con_totallines ) * con_linewidth ; for ( x = 0 ; x < con_linewidth ; x ++ ) Draw_Character ( ( x + 1 ) << 3 , v , text [ x ] ) ; v += 8 ; scr_tileclear_updates = 0 ; } if ( key_dest == key_message ) { char * say_prompt ; x = 0 ; if ( team_message ) say_prompt = " " ; else say_prompt = " " ; Draw_String ( 8 , v , say_prompt ) ; while ( chat_buffer [ x ] ) { Draw_Character ( ( x + strlen ( say_prompt ) + 2 ) << 3 , v , chat_buffer [ x ] ) ; x ++ ; } Draw_Character ( ( x + strlen ( say_prompt ) + 2 ) << 3 , v , 10 + ( ( int ) ( realtime * con_cursorspeed ) & 1 ) ) ; v += 8 ; scr_tileclear_updates = 0 ; } }
Draws the last few lines of output transparently over the game top
Draws the last few lines of output transparently over the game top
//johnfitz //johnfitz //johnfitz //johnfitz //johnfitz -- distinguish say and say_team //johnfitz //johnfitz //johnfitz //johnfitz //johnfitz