mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
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:
parent
02d3b43e7e
commit
2264c28310
2 changed files with 8 additions and 2 deletions
|
@ -211,7 +211,7 @@ PR_GetString (progs_t *pr, int num)
|
|||
}
|
||||
|
||||
bad_string_offset:
|
||||
PR_RunError (pr, "Invalid string offset 0x%u", num);
|
||||
PR_RunError (pr, "Invalid string offset %u", num);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -147,7 +147,10 @@ get_def (type_t *type, const char *name, scope_t *scope, int allocate)
|
|||
if (name)
|
||||
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
|
||||
|
@ -185,18 +188,21 @@ get_def (type_t *type, const char *name, scope_t *scope, int allocate)
|
|||
d->used = 1; // always `used'
|
||||
d->parent = def;
|
||||
d->ofs = def->ofs + 0;
|
||||
G_INT (d->ofs) = G_INT (def->ofs) + 0;
|
||||
Hash_Add (defs_by_name, d);
|
||||
|
||||
d = new_def (&type_floatfield, va ("%s_y", name), scope);
|
||||
d->used = 1; // always `used'
|
||||
d->parent = def;
|
||||
d->ofs = def->ofs + 1;
|
||||
G_INT (d->ofs) = G_INT (def->ofs) + 1;
|
||||
Hash_Add (defs_by_name, d);
|
||||
|
||||
d = new_def (&type_floatfield, va ("%s_z", name), scope);
|
||||
d->used = 1; // always `used'
|
||||
d->parent = def;
|
||||
d->ofs = def->ofs + 2;
|
||||
G_INT (d->ofs) = G_INT (def->ofs) + 2;
|
||||
Hash_Add (defs_by_name, d);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue