mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-17 17:11:32 +00:00
Nicer -trace output in qcvm/exec
This commit is contained in:
parent
ef3e7231bd
commit
be18550b02
1 changed files with 6 additions and 2 deletions
8
exec.c
8
exec.c
|
@ -338,7 +338,11 @@ static void trace_print_global(qc_program *prog, unsigned int glob, int vtype)
|
||||||
value = (qcany*)(&prog->globals[glob]);
|
value = (qcany*)(&prog->globals[glob]);
|
||||||
|
|
||||||
if (def) {
|
if (def) {
|
||||||
len = printf("[%s] ", prog_getstring(prog, def->name));
|
const char *name = prog_getstring(prog, def->name);
|
||||||
|
if (name[0] == '#')
|
||||||
|
len = printf("$");
|
||||||
|
else
|
||||||
|
len = printf("%s ", name);
|
||||||
vtype = def->type;
|
vtype = def->type;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -350,7 +354,7 @@ static void trace_print_global(qc_program *prog, unsigned int glob, int vtype)
|
||||||
case TYPE_FIELD:
|
case TYPE_FIELD:
|
||||||
case TYPE_FUNCTION:
|
case TYPE_FUNCTION:
|
||||||
case TYPE_POINTER:
|
case TYPE_POINTER:
|
||||||
len += printf("%i,", value->_int);
|
len += printf("(%i),", value->_int);
|
||||||
break;
|
break;
|
||||||
case TYPE_VECTOR:
|
case TYPE_VECTOR:
|
||||||
len += printf("'%g %g %g',", value->vector[0],
|
len += printf("'%g %g %g',", value->vector[0],
|
||||||
|
|
Loading…
Reference in a new issue