Commit 13e3219c authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3drm: Get rid of the Header typedef.

parent cc3cde51
...@@ -1326,7 +1326,7 @@ static HRESULT WINAPI IDirect3DRM3Impl_Load(IDirect3DRM3 *iface, void *source, v ...@@ -1326,7 +1326,7 @@ static HRESULT WINAPI IDirect3DRM3Impl_Load(IDirect3DRM3 *iface, void *source, v
HRESULT hr; HRESULT hr;
const GUID* pGuid; const GUID* pGuid;
DWORD size; DWORD size;
Header* pHeader; struct d3drm_file_header *header;
HRESULT ret = D3DRMERR_BADOBJECT; HRESULT ret = D3DRMERR_BADOBJECT;
DWORD i; DWORD i;
...@@ -1382,14 +1382,14 @@ static HRESULT WINAPI IDirect3DRM3Impl_Load(IDirect3DRM3 *iface, void *source, v ...@@ -1382,14 +1382,14 @@ static HRESULT WINAPI IDirect3DRM3Impl_Load(IDirect3DRM3 *iface, void *source, v
goto end; goto end;
} }
hr = IDirectXFileData_GetData(data, NULL, &size, (void **)&pHeader); hr = IDirectXFileData_GetData(data, NULL, &size, (void **)&header);
if ((hr != DXFILE_OK) || (size != sizeof(Header))) if ((hr != DXFILE_OK) || (size != sizeof(*header)))
goto end; goto end;
TRACE("Version is %d %d %d\n", pHeader->major, pHeader->minor, pHeader->flags); TRACE("Version is %u.%u, flags %#x.\n", header->major, header->minor, header->flags);
/* Version must be 1.0.x */ /* Version must be 1.0.x */
if ((pHeader->major != 1) || (pHeader->minor != 0)) if ((header->major != 1) || (header->minor != 0))
{ {
ret = D3DRMERR_BADFILE; ret = D3DRMERR_BADFILE;
goto end; goto end;
......
...@@ -37,11 +37,12 @@ HRESULT Direct3DRMTexture_create(REFIID riid, IUnknown** ret_iface) DECLSPEC_HID ...@@ -37,11 +37,12 @@ HRESULT Direct3DRMTexture_create(REFIID riid, IUnknown** ret_iface) DECLSPEC_HID
HRESULT load_mesh_data(IDirect3DRMMeshBuilder3 *iface, IDirectXFileData *data, HRESULT load_mesh_data(IDirect3DRMMeshBuilder3 *iface, IDirectXFileData *data,
D3DRMLOADTEXTURECALLBACK load_texture_proc, void *arg) DECLSPEC_HIDDEN; D3DRMLOADTEXTURECALLBACK load_texture_proc, void *arg) DECLSPEC_HIDDEN;
typedef struct { struct d3drm_file_header
{
WORD major; WORD major;
WORD minor; WORD minor;
DWORD flags; DWORD flags;
} Header; };
extern char templates[]; extern char templates[];
......
...@@ -1521,11 +1521,12 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_Load(IDirect3DRMMeshBuilder3* ...@@ -1521,11 +1521,12 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_Load(IDirect3DRMMeshBuilder3*
IDirectXFileData *data = NULL; IDirectXFileData *data = NULL;
const GUID* guid; const GUID* guid;
DWORD size; DWORD size;
Header* header; struct d3drm_file_header *header;
HRESULT hr; HRESULT hr;
HRESULT ret = D3DRMERR_BADOBJECT; HRESULT ret = D3DRMERR_BADOBJECT;
TRACE("(%p)->(%p,%p,%x,%p,%p)\n", This, filename, name, loadflags, cb, arg); TRACE("iface %p, filename %p, name %p, loadflags %#x, cb %p, arg %p.\n",
iface, filename, name, loadflags, cb, arg);
clean_mesh_builder_data(This); clean_mesh_builder_data(This);
...@@ -1573,10 +1574,10 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_Load(IDirect3DRMMeshBuilder3* ...@@ -1573,10 +1574,10 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_Load(IDirect3DRMMeshBuilder3*
} }
hr = IDirectXFileData_GetData(data, NULL, &size, (void**)&header); hr = IDirectXFileData_GetData(data, NULL, &size, (void**)&header);
if ((hr != DXFILE_OK) || (size != sizeof(Header))) if ((hr != DXFILE_OK) || (size != sizeof(*header)))
goto end; goto end;
TRACE("Version is %d %d %d\n", header->major, header->minor, header->flags); TRACE("Version is %u.%u, flags %#x.\n", header->major, header->minor, header->flags);
/* Version must be 1.0.x */ /* Version must be 1.0.x */
if ((header->major != 1) || (header->minor != 0)) if ((header->major != 1) || (header->minor != 0))
......
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