void SCR_DrawCenterString (void) { int i; int bx, by; int remaining; char temp[80]; // the finale prints the characters one at a time if (cl.intermission) remaining = scr_printspeed.value * (cl.time - scr_centertime_start); else remaining = 9999; scr_erase_center = 0; FindTextBreaks(scr_centerstring, 38); by = ((25-lines) * 8) / 2; for(i=0;i<lines;i++,by+=8) { strncpy(temp,&scr_centerstring[StartC[i]],EndC[i]-StartC[i]); temp[EndC[i]-StartC[i]] = 0; bx = ((40-strlen(temp)) * 8) / 2; M_Print2 (bx, by, temp); } }
void Plaque_Draw (char *message, qboolean AlwaysDraw) { int i; char temp[80]; int bx,by; if (scr_con_current == vid.height && !AlwaysDraw) return; // console is full screen if (!*message) return; scr_needfull = true; FindTextBreaks(message, PLAQUE_WIDTH); by = ((25-lines) * 8) / 2; M_DrawTextBox2 (32, by-16, PLAQUE_WIDTH+4, lines+2,false); for(i=0;i<lines;i++,by+=8) { strncpy(temp,&message[StartC[i]],EndC[i]-StartC[i]); temp[EndC[i]-StartC[i]] = 0; bx = ((40-strlen(temp)) * 8) / 2; M_Print2 (bx, by, temp); } }
void Info_Plaque_Draw (char *message) { int i; char temp[80]; int bx,by; if (scr_con_current == vid.height) return; // console is full screen if (!*message) return; scr_needfull = true; FindTextBreaks(message, PLAQUE_WIDTH+4); if (lines == MAXLINES) { Con_DPrintf("Info_Plaque_Draw: line overflow error\n"); lines = MAXLINES-1; } by = ((25-lines) * 8) / 2; M_DrawTextBox2 (15, by-16, PLAQUE_WIDTH+4+4, lines+2,false); for(i=0;i<lines;i++,by+=8) { strncpy(temp,&message[StartC[i]],EndC[i]-StartC[i]); temp[EndC[i]-StartC[i]] = 0; bx = ((40-strlen(temp)) * 8) / 2; M_Print2 (bx, by, temp); } }
static void SCR_DrawCenterString (void) { int i; int bx, by; char temp[80]; FindTextBreaks(scr_centerstring, 38); by = ((25-lines) * 8) / 2; for (i = 0; i < lines; i++, by += 8) { strncpy (temp, &scr_centerstring[StartC[i]], EndC[i] - StartC[i]); temp[EndC[i] - StartC[i]] = 0; bx = ((40-strlen(temp)) * 8) / 2; M_Print2 (bx, by, temp); } }