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

Alexandre Julliard julliard at winehq.org
Mon Mar 1 09:27:35 CST 2010


Module: wine
Branch: master
Commit: 074465b6751189bf61cefc77850bb03f919b8a52
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=074465b6751189bf61cefc77850bb03f919b8a52

Author: Christian Costa <titan.costa at wanadoo.fr>
Date:   Mon Mar  1 09:36:19 2010 +0100

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

---

 dlls/d3dxof/d3dxof.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/dlls/d3dxof/d3dxof.c b/dlls/d3dxof/d3dxof.c
index 0f800bf..eccdf98 100644
--- a/dlls/d3dxof/d3dxof.c
+++ b/dlls/d3dxof/d3dxof.c
@@ -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;
 




More information about the wine-cvs mailing list