[D3DXOF] Sync with Wine Staging 4.18. CORE-16441
authorAmine Khaldi <amine.khaldi@reactos.org>
Sat, 26 Oct 2019 12:07:07 +0000 (13:07 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sat, 26 Oct 2019 12:07:07 +0000 (13:07 +0100)
dll/directx/wine/d3dxof/d3dxof.c
dll/directx/wine/d3dxof/d3dxof_private.h
dll/directx/wine/d3dxof/parsing.c
dll/directx/wine/d3dxof/precomp.h
media/doc/README.WINE

index 5499551..e16b0d8 100644 (file)
@@ -18,7 +18,6 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "config.h"
 #include "wine/debug.h"
 
 #define COBJMACROS
@@ -264,7 +263,7 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV
     ULONG i;
     TRACE("Registered templates (%d):\n", This->nb_xtemplates);
     for (i = 1; i < This->nb_xtemplates; i++)
-      DPRINTF("%s - %s\n", This->xtemplates[i].name, debugstr_guid(&This->xtemplates[i].class_id));
+      TRACE("%s - %s\n", This->xtemplates[i].name, debugstr_guid(&This->xtemplates[i].class_id));
   }
 
   *ppEnumObj = &object->IDirectXFileEnumObject_iface;
@@ -343,7 +342,7 @@ static HRESULT WINAPI IDirectXFileImpl_RegisterTemplates(IDirectXFile* iface, LP
     ULONG i;
     TRACE("Registered templates (%d):\n", This->nb_xtemplates);
     for (i = 1; i < This->nb_xtemplates; i++)
-      DPRINTF("%s - %s\n", This->xtemplates[i].name, debugstr_guid(&This->xtemplates[i].class_id));
+      TRACE("%s - %s\n", This->xtemplates[i].name, debugstr_guid(&This->xtemplates[i].class_id));
   }
 
   hr = DXFILE_OK;
index cf33ed2..ff29261 100644 (file)
@@ -130,7 +130,7 @@ typedef struct {
   BOOL list_separator;
   ULONG cur_pos_data;
   LPBYTE cur_pstrings;
-  BYTE value[100];
+  BYTE value[512];
   xobject** pxo_globals;
   ULONG nb_pxo_globals;
   xobject* pxo_tab;
index f7724ec..520dc5f 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "config.h"
-#include "wine/port.h"
 #include "wine/debug.h"
 
 #define COBJMACROS
 
 #include "winbase.h"
 #include "wingdi.h"
+#include "wine/winternl.h"
 
 #include "d3dxof_private.h"
 #include "dxfile.h"
@@ -132,38 +131,38 @@ static void dump_template(xtemplate* templates_array, xtemplate* ptemplate)
 
   clsid = &ptemplate->class_id;
 
-  DPRINTF("template %s\n", ptemplate->name);
-  DPRINTF("{\n");
-  DPRINTF(CLSIDFMT "\n", clsid->Data1, clsid->Data2, clsid->Data3, clsid->Data4[0],
+  wine_dbg_printf("template %s\n", ptemplate->name);
+  wine_dbg_printf("{\n");
+  wine_dbg_printf(CLSIDFMT "\n", clsid->Data1, clsid->Data2, clsid->Data3, clsid->Data4[0],
   clsid->Data4[1], clsid->Data4[2], clsid->Data4[3], clsid->Data4[4], clsid->Data4[5], clsid->Data4[6], clsid->Data4[7]);
   for (j = 0; j < ptemplate->nb_members; j++)
   {
     if (ptemplate->members[j].nb_dims)
-      DPRINTF("array ");
+      wine_dbg_printf("array ");
     if (ptemplate->members[j].type == TOKEN_NAME)
-      DPRINTF("%s ", templates_array[ptemplate->members[j].idx_template].name);
+      wine_dbg_printf("%s ", templates_array[ptemplate->members[j].idx_template].name);
     else
-      DPRINTF("%s ", get_primitive_string(ptemplate->members[j].type));
-    DPRINTF("%s", ptemplate->members[j].name);
+      wine_dbg_printf("%s ", get_primitive_string(ptemplate->members[j].type));
+    wine_dbg_printf("%s", ptemplate->members[j].name);
     for (k = 0; k < ptemplate->members[j].nb_dims; k++)
     {
       if (ptemplate->members[j].dim_fixed[k])
-        DPRINTF("[%d]", ptemplate->members[j].dim_value[k]);
+        wine_dbg_printf("[%d]", ptemplate->members[j].dim_value[k]);
       else
-        DPRINTF("[%s]", ptemplate->members[ptemplate->members[j].dim_value[k]].name);
+        wine_dbg_printf("[%s]", ptemplate->members[ptemplate->members[j].dim_value[k]].name);
     }
-    DPRINTF(";\n");
+    wine_dbg_printf(";\n");
   }
   if (ptemplate->open)
-    DPRINTF("[...]\n");
+    wine_dbg_printf("[...]\n");
   else if (ptemplate->nb_children)
   {
-    DPRINTF("[%s", ptemplate->children[0]);
+    wine_dbg_printf("[%s", ptemplate->children[0]);
     for (j = 1; j < ptemplate->nb_children; j++)
-      DPRINTF(",%s", ptemplate->children[j]);
-    DPRINTF("]\n");
+      wine_dbg_printf(",%s", ptemplate->children[j]);
+    wine_dbg_printf("]\n");
   }
-  DPRINTF("}\n");
+  wine_dbg_printf("}\n");
 }
 
 static BOOL read_bytes(parse_buffer * buf, LPVOID data, DWORD size)
@@ -405,7 +404,7 @@ static BOOL is_keyword(parse_buffer* buf, const char* keyword)
 
   if (!read_bytes(buf, tmp, len))
     return FALSE;
-  if (strncasecmp(tmp, keyword, len))
+  if (_strnicmp(tmp, keyword, len))
   {
     rewind_bytes(buf, len);
     return FALSE;
@@ -972,7 +971,7 @@ static BOOL parse_template_members_list(parse_buffer * buf)
         cur_member->idx_template = 1;
         while (cur_member->idx_template < buf->pdxf->nb_xtemplates)
         {
-          if (!strcasecmp((char*)buf->value, buf->pdxf->xtemplates[cur_member->idx_template].name))
+          if (!_strnicmp((char*)buf->value, buf->pdxf->xtemplates[cur_member->idx_template].name, -1))
             break;
           cur_member->idx_template++;
         }
@@ -1176,7 +1175,7 @@ static BOOL parse_object_members_list(parse_buffer * buf)
         /* To do template lookup */
         for (j = 0; j < buf->pdxf->nb_xtemplates; j++)
         {
-          if (!strcasecmp(buf->pdxf->xtemplates[pt->members[i].idx_template].name, buf->pdxf->xtemplates[j].name))
+          if (!_strnicmp(buf->pdxf->xtemplates[pt->members[i].idx_template].name, buf->pdxf->xtemplates[j].name, -1))
           {
             buf->pxt[buf->level] = &buf->pdxf->xtemplates[j];
             break;
@@ -1208,13 +1207,13 @@ static BOOL parse_object_members_list(parse_buffer * buf)
             return FALSE;
           if (pt->members[i].type == TOKEN_WORD)
           {
-            *(((WORD*)(buf->pdata + buf->cur_pos_data))) = (WORD)(*(DWORD*)buf->value);
-            buf->cur_pos_data += 2;
+              *(WORD *)(buf->pdata + buf->cur_pos_data) = *(DWORD *)buf->value;
+              buf->cur_pos_data += 2;
           }
           else if (pt->members[i].type == TOKEN_DWORD)
           {
-            *(((DWORD*)(buf->pdata + buf->cur_pos_data))) = (DWORD)(*(DWORD*)buf->value);
-            buf->cur_pos_data += 4;
+              *(DWORD *)(buf->pdata + buf->cur_pos_data) = *(DWORD *)buf->value;
+              buf->cur_pos_data += 4;
           }
           else
           {
@@ -1230,8 +1229,8 @@ static BOOL parse_object_members_list(parse_buffer * buf)
             return FALSE;
           if (pt->members[i].type == TOKEN_FLOAT)
           {
-            *(((float*)(buf->pdata + buf->cur_pos_data))) = (float)(*(float*)buf->value);
-            buf->cur_pos_data += 4;
+              *(float *)(buf->pdata + buf->cur_pos_data) = *(float *)buf->value;
+              buf->cur_pos_data += 4;
           }
           else
           {
@@ -1392,7 +1391,7 @@ BOOL parse_object(parse_buffer * buf)
   /* To do template lookup */
   for (i = 0; i < buf->pdxf->nb_xtemplates; i++)
   {
-    if (!strcasecmp((char*)buf->value, buf->pdxf->xtemplates[i].name))
+    if (!_strnicmp((char*)buf->value, buf->pdxf->xtemplates[i].name, -1))
     {
       buf->pxt[buf->level] = &buf->pdxf->xtemplates[i];
       memcpy(&buf->pxo->type, &buf->pdxf->xtemplates[i].class_id, 16);
index a787846..722cf3a 100644 (file)
@@ -2,8 +2,6 @@
 #ifndef _D3DXOF_PRECOMP_H_
 #define _D3DXOF_PRECOMP_H_
 
-#include <wine/config.h>
-
 #include <stdio.h>
 
 #define WIN32_NO_STATUS
index a2ab499..597a03c 100644 (file)
@@ -27,7 +27,7 @@ dll/directx/wine/d3d9           # Synced to WineStaging-3.3
 dll/directx/wine/d3dcompiler_43 # Synced to WineStaging-4.18
 dll/directx/wine/d3drm          # Synced to WineStaging-4.18
 dll/directx/wine/d3dx9_24 => 43 # Synced to WineStaging-4.0
-dll/directx/wine/d3dxof         # Synced to WineStaging-3.17
+dll/directx/wine/d3dxof         # Synced to WineStaging-4.18
 dll/directx/wine/ddraw          # Synced to WineStaging-3.3
 dll/directx/wine/devenum        # Synced to WineStaging-4.18
 dll/directx/wine/dinput         # Synced to WineStaging-4.18