Commit 074465b6 authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

d3dxof: Allow templates to be defined anywhere in objects file.

parent cf663d17
......@@ -1034,6 +1034,23 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE
return DXFILEERR_NOMOREOBJECTS;
}
/* Check if there are templates defined before the object */
while (This->buf.rem_bytes && is_template_available(&This->buf))
{
if (!parse_template(&This->buf))
{
TRACE("Template is not correct\n");
hr = DXFILEERR_BADVALUE;
goto error;
}
else
{
TRACE("Template successfully parsed:\n");
if (TRACE_ON(d3dxof))
dump_template(This->pDirectXFile->xtemplates, &This->pDirectXFile->xtemplates[This->pDirectXFile->nb_xtemplates - 1]);
}
}
if (!This->buf.rem_bytes)
return DXFILEERR_NOMOREOBJECTS;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment