int con_current;
// offset in current line for next print
int con_x;
-char *con_text = 0;
+char con_text[CON_TEXTSIZE];
//seconds
cvar_t con_notifytime = {CVAR_SAVE, "con_notifytime","3"};
qboolean con_initialized;
-mempool_t *console_mempool;
-
/*
==============================================================================
*/
void Con_Init (void)
{
- console_mempool = Mem_AllocPool("console", 0, NULL);
- con_text = Mem_Alloc(console_mempool, CON_TEXTSIZE);
memset (con_text, ' ', CON_TEXTSIZE);
con_linewidth = -1;
Con_CheckResize ();
if (txt[0] == 1)
{
mask = 128; // go to colored text
- S_LocalSound ("sound/misc/talk.wav");
- // play talk wav
txt++;
}
else if (txt[0] == 2)
}
}
+
+ if( txt[0] == 1 ) {
+ // play talk wav
+ S_LocalSound ("sound/misc/talk.wav");
+ }
}
/* The translation table between the graphical font and plain ASCII --KB */
// iterate until we get the next color tag or reach the end of the text part to draw
for( ; len && *last != _con_color_tag ; len--, last++ )
;
- // dont do anything if we havent read anything yet
- if( last != text ) {
+ // only draw the partial string if we have read anything
+ if( last != first ) {
// draw the string
DrawQ_String( x, y, first, last - first, scalex, scaley, color[0], color[1], color[2], color[3], flags );
// update x to be at the new start position