[gamecode] Print operand widths when not 1

The widths for all three operands are printed if any is greater than 1.
Makes figuring out which instruction is executing a little easier.
This commit is contained in:
Bill Currie 2022-04-27 18:10:40 +09:00
parent 73d6e97e7b
commit 875c9bde7c
1 changed files with 6 additions and 3 deletions

View File

@ -1490,6 +1490,7 @@ PR_PrintStatement (progs_t *pr, dstatement_t *s, int contents)
int dump_code = contents & 2;
const char *fmt;
const char *mnemonic;
const char *width = "";
dfunction_t *call_func = 0;
pr_def_t *param_def = 0;
pr_auxfunction_t *aux_func = 0;
@ -1558,13 +1559,15 @@ PR_PrintStatement (progs_t *pr, dstatement_t *s, int contents)
print_raw_op (pr, s->a, PR_BASE_IND (s->op, A),
op_type[0], op_width[0]),
print_raw_op (pr, s->b, PR_BASE_IND (s->op, B),
op_type[0], op_width[0]),
op_type[1], op_width[1]),
print_raw_op (pr, s->c, PR_BASE_IND (s->op, C),
op_type[0], op_width[0]));
op_type[2], op_width[2]));
}
} else if (op_width[0] > 1 || op_width[1] > 1 || op_width[2] > 1) {
width = va (res->va, "{%d,%d,%d}", VectorExpand (op_width));
}
dasprintf (res->line, "%s ", mnemonic);
dasprintf (res->line, "%s%s ", mnemonic, width);
while (*fmt) {
if (*fmt == '%') {