pr_strings:

remove a bogus 0x which caused confusion in an error message
def.c:
	vector fields still need an extra 3 globals for their component fields
This commit is contained in:
Bill Currie 2002-06-16 05:24:58 +00:00
parent 02d3b43e7e
commit 2264c28310
2 changed files with 8 additions and 2 deletions

View file

@ -211,7 +211,7 @@ PR_GetString (progs_t *pr, int num)
} }
bad_string_offset: bad_string_offset:
PR_RunError (pr, "Invalid string offset 0x%u", num); PR_RunError (pr, "Invalid string offset %u", num);
} }
int int

View file

@ -147,7 +147,10 @@ get_def (type_t *type, const char *name, scope_t *scope, int allocate)
if (name) if (name)
Hash_Add (defs_by_name, def); Hash_Add (defs_by_name, def);
def->ofs = new_location (type, scope->space); if (type->type == ev_field && type->aux_type == &type_vector)
def->ofs = new_location (type->aux_type, scope->space);
else
def->ofs = new_location (type, scope->space);
/* /*
make automatic defs for the vectors elements .origin can be accessed make automatic defs for the vectors elements .origin can be accessed
@ -185,18 +188,21 @@ get_def (type_t *type, const char *name, scope_t *scope, int allocate)
d->used = 1; // always `used' d->used = 1; // always `used'
d->parent = def; d->parent = def;
d->ofs = def->ofs + 0; d->ofs = def->ofs + 0;
G_INT (d->ofs) = G_INT (def->ofs) + 0;
Hash_Add (defs_by_name, d); Hash_Add (defs_by_name, d);
d = new_def (&type_floatfield, va ("%s_y", name), scope); d = new_def (&type_floatfield, va ("%s_y", name), scope);
d->used = 1; // always `used' d->used = 1; // always `used'
d->parent = def; d->parent = def;
d->ofs = def->ofs + 1; d->ofs = def->ofs + 1;
G_INT (d->ofs) = G_INT (def->ofs) + 1;
Hash_Add (defs_by_name, d); Hash_Add (defs_by_name, d);
d = new_def (&type_floatfield, va ("%s_z", name), scope); d = new_def (&type_floatfield, va ("%s_z", name), scope);
d->used = 1; // always `used' d->used = 1; // always `used'
d->parent = def; d->parent = def;
d->ofs = def->ofs + 2; d->ofs = def->ofs + 2;
G_INT (d->ofs) = G_INT (def->ofs) + 2;
Hash_Add (defs_by_name, d); Hash_Add (defs_by_name, d);
} }
} }