Overhaul to console structure, a bit
This commit is contained in:
+15
-15
@@ -146,33 +146,33 @@ static void PR_PrintStatement (dstatement_t *s)
|
||||
|
||||
if ((unsigned int)s->op < std::size(pr_opnames))
|
||||
{
|
||||
Con_Printf("%s ", pr_opnames[s->op]);
|
||||
console::info("%s ", pr_opnames[s->op]);
|
||||
i = strlen(pr_opnames[s->op]);
|
||||
for ( ; i < 10; i++)
|
||||
Con_Printf(" ");
|
||||
console::info(" ");
|
||||
}
|
||||
|
||||
if (s->op == OP_IF || s->op == OP_IFNOT)
|
||||
Con_Printf("%sbranch %i", PR_GlobalString(s->a), s->b);
|
||||
console::info("%sbranch %i", PR_GlobalString(s->a), s->b);
|
||||
else if (s->op == OP_GOTO)
|
||||
{
|
||||
Con_Printf("branch %i", s->a);
|
||||
console::info("branch %i", s->a);
|
||||
}
|
||||
else if ((unsigned int)(s->op-OP_STORE_F) < 6)
|
||||
{
|
||||
Con_Printf("%s", PR_GlobalString(s->a));
|
||||
Con_Printf("%s", PR_GlobalStringNoContents(s->b));
|
||||
console::info("%s", PR_GlobalString(s->a));
|
||||
console::info("%s", PR_GlobalStringNoContents(s->b));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (s->a)
|
||||
Con_Printf("%s", PR_GlobalString(s->a));
|
||||
console::info("%s", PR_GlobalString(s->a));
|
||||
if (s->b)
|
||||
Con_Printf("%s", PR_GlobalString(s->b));
|
||||
console::info("%s", PR_GlobalString(s->b));
|
||||
if (s->c)
|
||||
Con_Printf("%s", PR_GlobalStringNoContents(s->c));
|
||||
console::info("%s", PR_GlobalStringNoContents(s->c));
|
||||
}
|
||||
Con_Printf("\n");
|
||||
console::info("\n");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -187,7 +187,7 @@ static void PR_StackTrace (void)
|
||||
|
||||
if (pr_depth == 0)
|
||||
{
|
||||
Con_Printf("<NO STACK>\n");
|
||||
console::info("<NO STACK>\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -197,11 +197,11 @@ static void PR_StackTrace (void)
|
||||
f = pr_stack[i].f;
|
||||
if (!f)
|
||||
{
|
||||
Con_Printf("<NO FUNCTION>\n");
|
||||
console::info("<NO FUNCTION>\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
Con_Printf("%12s : %s\n", PR_GetString(f->s_file), PR_GetString(f->s_name));
|
||||
console::info("%12s : %s\n", PR_GetString(f->s_file), PR_GetString(f->s_name));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -239,7 +239,7 @@ void PR_Profile_f (void)
|
||||
if (best)
|
||||
{
|
||||
if (num < 10)
|
||||
Con_Printf("%7i %s\n", best->profile, PR_GetString(best->s_name));
|
||||
console::info("%7i %s\n", best->profile, PR_GetString(best->s_name));
|
||||
num++;
|
||||
best->profile = 0;
|
||||
}
|
||||
@@ -266,7 +266,7 @@ void PR_RunError (const char *error, ...)
|
||||
PR_PrintStatement(pr_statements + pr_xstatement);
|
||||
PR_StackTrace();
|
||||
|
||||
Con_Printf("%s\n", string);
|
||||
console::info("%s\n", string);
|
||||
|
||||
pr_depth = 0; // dump the stack so host_error can shutdown functions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user