X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=console.c;h=aeef3e6f414773c9b9639cc2f417e903e259fc91;hb=7857d388ddfb0152d67d0e808d630f515e523740;hp=1581aab2823031ed42007eb8219b4baf6ba9c090;hpb=1b60c42068f17e8d507ed262a07d67a376dc13d4;p=xonotic%2Fdarkplaces.git diff --git a/console.c b/console.c index 1581aab2..aeef3e6f 100644 --- a/console.c +++ b/console.c @@ -636,7 +636,12 @@ void Con_Print(const char *msg) { // play talk wav if (*msg == 1) - S_LocalSound ("sound/misc/talk.wav"); + { + if (msg[1] == '(' && cl.foundtalk2wav) + S_LocalSound ("sound/misc/talk2.wav"); + else + S_LocalSound ("sound/misc/talk.wav"); + } line[index++] = STRING_COLOR_TAG; line[index++] = '3'; msg++; @@ -925,7 +930,7 @@ void Con_DrawInput (void) text += 1 + key_linepos - con_linewidth; // draw it - DrawQ_ColoredString(0, con_vislines - con_textsize.value*2, text, con_linewidth, con_textsize.value, con_textsize.value, 1.0, 1.0, 1.0, 1.0, 0, NULL ); + DrawQ_String(0, con_vislines - con_textsize.value*2, text, con_linewidth, con_textsize.value, con_textsize.value, 1.0, 1.0, 1.0, 1.0, 0, NULL, false ); // remove cursor // key_lines[edit_line][key_linepos] = 0; @@ -994,7 +999,7 @@ void Con_DrawNotify (void) } else x = 0; - DrawQ_ColoredString( x, v, text, con_linewidth, con_textsize.value, con_textsize.value, 1.0, 1.0, 1.0, 1.0, 0, &colorindex ); + DrawQ_String( x, v, text, con_linewidth, con_textsize.value, con_textsize.value, 1.0, 1.0, 1.0, 1.0, 0, &colorindex, false ); v += con_textsize.value; } @@ -1013,13 +1018,13 @@ void Con_DrawNotify (void) sprintf(temptext, "say:%s%c", chat_buffer, (int) 10+((int)(realtime*con_cursorspeed)&1)); while ((int)strlen(temptext) >= con_linewidth) { - DrawQ_ColoredString( 0, v, temptext, con_linewidth, con_textsize.value, con_textsize.value, 1.0, 1.0, 1.0, 1.0, 0, &colorindex ); + DrawQ_String( 0, v, temptext, con_linewidth, con_textsize.value, con_textsize.value, 1.0, 1.0, 1.0, 1.0, 0, &colorindex, false ); strlcpy(temptext, &temptext[con_linewidth], sizeof(temptext)); v += con_textsize.value; } if (strlen(temptext) > 0) { - DrawQ_ColoredString( 0, v, temptext, 0, con_textsize.value, con_textsize.value, 1.0, 1.0, 1.0, 1.0, 0, &colorindex ); + DrawQ_String( 0, v, temptext, 0, con_textsize.value, con_textsize.value, 1.0, 1.0, 1.0, 1.0, 0, &colorindex, false ); v += con_textsize.value; } } @@ -1045,7 +1050,7 @@ void Con_DrawConsole (int lines) // draw the background DrawQ_Pic(0, lines - vid_conheight.integer, scr_conbrightness.value >= 0.01f ? Draw_CachePic("gfx/conback", true) : NULL, vid_conwidth.integer, vid_conheight.integer, scr_conbrightness.value, scr_conbrightness.value, scr_conbrightness.value, scr_conalpha.value, 0); - DrawQ_String(vid_conwidth.integer - strlen(engineversion) * con_textsize.value - con_textsize.value, lines - con_textsize.value, engineversion, 0, con_textsize.value, con_textsize.value, 1, 0, 0, 1, 0); + DrawQ_String(vid_conwidth.integer - strlen(engineversion) * con_textsize.value - con_textsize.value, lines - con_textsize.value, engineversion, 0, con_textsize.value, con_textsize.value, 1, 0, 0, 1, 0, NULL, true); // draw the text con_vislines = lines; @@ -1060,7 +1065,7 @@ void Con_DrawConsole (int lines) j = max(i - con_backscroll, 0); text = con_text + (j % con_totallines)*con_linewidth; - DrawQ_ColoredString( 0, y, text, con_linewidth, con_textsize.value, con_textsize.value, 1.0, 1.0, 1.0, 1.0, 0, &colorindex ); + DrawQ_String( 0, y, text, con_linewidth, con_textsize.value, con_textsize.value, 1.0, 1.0, 1.0, 1.0, 0, &colorindex, false ); } // draw the input prompt, user text, and cursor if desired @@ -1173,7 +1178,7 @@ qboolean GetMapList (const char *s, char *completedname, int completednamebuffer for (;;) { int l; - if (!COM_ParseTokenConsole(&data)) + if (!COM_ParseToken_Simple(&data, false)) break; if (com_token[0] == '{') continue; @@ -1184,7 +1189,7 @@ qboolean GetMapList (const char *s, char *completedname, int completednamebuffer for (l = 0;l < (int)sizeof(keyname) - 1 && com_token[k+l] && com_token[k+l] > ' ';l++) keyname[l] = com_token[k+l]; keyname[l] = 0; - if (!COM_ParseTokenConsole(&data)) + if (!COM_ParseToken_Simple(&data, false)) break; if (developer.integer >= 100) Con_Printf("key: %s %s\n", keyname, com_token);