d3dxof: Enable referencing of named subobjects too.
This commit is contained in:
parent
9d64f82554
commit
06c8d49e3e
|
@ -1843,7 +1843,7 @@ static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional)
|
||||||
{
|
{
|
||||||
if (check_TOKEN(buf) == TOKEN_OBRACE)
|
if (check_TOKEN(buf) == TOKEN_OBRACE)
|
||||||
{
|
{
|
||||||
int i;
|
int i, j;
|
||||||
get_TOKEN(buf);
|
get_TOKEN(buf);
|
||||||
if (get_TOKEN(buf) != TOKEN_NAME)
|
if (get_TOKEN(buf) != TOKEN_NAME)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1852,9 +1852,13 @@ static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional)
|
||||||
TRACE("Found optional reference %s\n", (char*)buf->value);
|
TRACE("Found optional reference %s\n", (char*)buf->value);
|
||||||
for (i = 0; i < buf->nb_pxo_globals; i++)
|
for (i = 0; i < buf->nb_pxo_globals; i++)
|
||||||
{
|
{
|
||||||
if (!strcmp(buf->pxo_globals[i*MAX_SUBOBJECTS].name, (char*)buf->value))
|
for (j = 0; j < buf->pxo_globals[i*MAX_SUBOBJECTS].nb_subobjects; j++)
|
||||||
break;
|
{
|
||||||
|
if (!strcmp(buf->pxo_globals[i*MAX_SUBOBJECTS+j].name, (char*)buf->value))
|
||||||
|
goto _exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
_exit:
|
||||||
if (i == buf->nb_pxo_globals)
|
if (i == buf->nb_pxo_globals)
|
||||||
{
|
{
|
||||||
ERR("Reference to unknown object %s\n", (char*)buf->value);
|
ERR("Reference to unknown object %s\n", (char*)buf->value);
|
||||||
|
|
Loading…
Reference in New Issue