mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
Fix qfo function dumping.
This commit is contained in:
parent
2b3436beed
commit
58ac212b54
1 changed files with 17 additions and 7 deletions
|
@ -356,17 +356,27 @@ qfo_functions (qfo_t *qfo)
|
|||
{
|
||||
qfo_def_t *def;
|
||||
qfo_func_t *func;
|
||||
int i;
|
||||
int i, d;
|
||||
int space;
|
||||
|
||||
for (i = 0; i < qfo->num_funcs; i++) {
|
||||
func = &qfo->funcs[i];
|
||||
def = &qfo->defs[func->def];
|
||||
// printf ("%-5d %-5d %s %s %d %s", i, def->offset,
|
||||
// flags_string (def->flags),
|
||||
// QFO_GETSTR (qfo, func->name), func->def,
|
||||
// QFO_GETSTR (qfo, def->name));
|
||||
// if (!(def->flags & QFOD_EXTERNAL))
|
||||
// printf (" %d", qfo->data[def->offset].integer_var);
|
||||
for (space = 0; space < qfo->num_spaces; space++) {
|
||||
if (!qfo->spaces[space].num_defs)
|
||||
continue;
|
||||
d = qfo->spaces[space].defs - qfo->defs;
|
||||
if (func->def >= d && func->def < d + qfo->spaces[space].num_defs)
|
||||
break;
|
||||
}
|
||||
if (space == qfo->num_spaces)
|
||||
space = qfo_near_data_space;
|
||||
printf ("%-5d %-5d %s %s %d %s", i, def->offset,
|
||||
flags_string (def->flags),
|
||||
QFO_GETSTR (qfo, func->name), func->def,
|
||||
QFO_GETSTR (qfo, def->name));
|
||||
if (!(def->flags & QFOD_EXTERNAL))
|
||||
printf (" %d", QFO_FUNCTION (qfo, space, def->offset));
|
||||
if (func->code > 0)
|
||||
printf (" @ %x", func->code);
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue