. .vector fieldtest; works now! woot!
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@540 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
2d90a24fbc
commit
1fbf42489a
1 changed files with 48 additions and 24 deletions
|
@ -3586,14 +3586,37 @@ reloop:
|
|||
if (QCC_PR_Check(".") || QCC_PR_Check("->"))
|
||||
{
|
||||
QCC_def_t *field;
|
||||
if (QCC_PR_Check("("))
|
||||
{
|
||||
field = QCC_PR_Expression(TOP_PRIORITY);
|
||||
QCC_PR_Expect(")");
|
||||
}
|
||||
else
|
||||
field = QCC_PR_ParseValue(d->type);
|
||||
if (field->type->type == ev_field)
|
||||
{
|
||||
if (!field->type->aux_type)
|
||||
{
|
||||
QCC_PR_ParseWarning(ERR_INTERNAL, "Field with null aux_type");
|
||||
return QCC_PR_Statement(&pr_opcodes[OP_LOAD_FLD], d, field, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch(field->type->aux_type->type)
|
||||
{
|
||||
default:
|
||||
QCC_PR_ParseError(ERR_INTERNAL, "Bad field type");
|
||||
return d;
|
||||
case ev_field:
|
||||
d = QCC_PR_Statement(&pr_opcodes[OP_LOAD_FLD], d, field, NULL);
|
||||
nd = (void *)qccHunkAlloc (sizeof(QCC_def_t));
|
||||
memset (nd, 0, sizeof(QCC_def_t));
|
||||
nd->type = field->type->aux_type;
|
||||
nd->ofs = d->ofs;
|
||||
nd->temp = d->temp;
|
||||
nd->constant = false;
|
||||
nd->name = d->name;
|
||||
return nd;
|
||||
case ev_float:
|
||||
return QCC_PR_Statement(&pr_opcodes[OP_LOAD_F], d, field, NULL);
|
||||
case ev_string:
|
||||
|
@ -3617,6 +3640,7 @@ reloop:
|
|||
return QCC_PR_Statement(&pr_opcodes[OP_LOAD_ENT], d, field, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
QCC_PR_IncludeChunk(".", false, NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue