mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Resolve local def type encodings
They need to be resolved at load-time.
This commit is contained in:
parent
c51c9edd9d
commit
1cfac0f11a
1 changed files with 12 additions and 2 deletions
|
@ -234,6 +234,13 @@ dump_functions (progs_t *pr)
|
|||
const char *name;
|
||||
int start, count;
|
||||
const char *comment;
|
||||
pr_def_t *encodings_def;
|
||||
pointer_t type_encodings = 0;
|
||||
|
||||
encodings_def = PR_FindGlobal (pr, ".type_encodings");
|
||||
if (encodings_def) {
|
||||
type_encodings = encodings_def->ofs;
|
||||
}
|
||||
|
||||
for (i = 0; i < pr->progs->numfunctions; i++) {
|
||||
dfunction_t *func = &pr->pr_functions[i];
|
||||
|
@ -256,7 +263,7 @@ dump_functions (progs_t *pr)
|
|||
func->parm_size[j].size);
|
||||
printf (") %d @ %x", func->locals, func->parm_start);
|
||||
puts ("");
|
||||
if (pr->debug) {
|
||||
if (pr->debug && type_encodings) {
|
||||
pr_auxfunction_t *aux = pr->auxfunction_map[i];
|
||||
if (!aux)
|
||||
continue;
|
||||
|
@ -265,8 +272,11 @@ dump_functions (progs_t *pr)
|
|||
aux->line_info,
|
||||
aux->local_defs, aux->num_locals,
|
||||
aux->return_type);
|
||||
for (j = 0; j < (int)aux->num_locals; j++)
|
||||
for (j = 0; j < (int)aux->num_locals; j++) {
|
||||
pr->local_defs[+ aux->local_defs + j].type_encoding
|
||||
+= type_encodings;
|
||||
dump_def (pr, pr->local_defs + aux->local_defs + j, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue