+/*
+============
+SCR_Centerprint_f
+
+Print something to the center of the screen using SCR_Centerprint
+============
+*/
+static void SCR_Centerprint_f (cmd_state_t *cmd)
+{
+ char msg[MAX_INPUTLINE];
+ unsigned int i, c, p;
+ c = Cmd_Argc(cmd);
+ if(c >= 2)
+ {
+ dp_strlcpy(msg, Cmd_Argv(cmd,1), sizeof(msg));
+ for(i = 2; i < c; ++i)
+ {
+ dp_strlcat(msg, " ", sizeof(msg));
+ dp_strlcat(msg, Cmd_Argv(cmd, i), sizeof(msg));
+ }
+ c = (unsigned int)strlen(msg);
+ for(p = 0, i = 0; i < c; ++i)
+ {
+ if(msg[i] == '\\')
+ {
+ if(msg[i+1] == 'n')
+ msg[p++] = '\n';
+ else if(msg[i+1] == '\\')
+ msg[p++] = '\\';
+ else {
+ msg[p++] = '\\';
+ msg[p++] = msg[i+1];
+ }
+ ++i;
+ } else {
+ msg[p++] = msg[i];
+ }
+ }
+ msg[p] = '\0';
+ SCR_CenterPrint(msg);
+ }
+}