Commit 4ceb3a65 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ddraw: Build without -DWINE_NO_LONG_TYPES.

parent fa7c22e4
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = ddraw.dll MODULE = ddraw.dll
IMPORTLIB = ddraw IMPORTLIB = ddraw
IMPORTS = dxguid uuid wined3d user32 gdi32 advapi32 IMPORTS = dxguid uuid wined3d user32 gdi32 advapi32
......
...@@ -86,7 +86,7 @@ static ULONG WINAPI ddraw_clipper_AddRef(IDirectDrawClipper *iface) ...@@ -86,7 +86,7 @@ static ULONG WINAPI ddraw_clipper_AddRef(IDirectDrawClipper *iface)
} }
refcount = InterlockedIncrement(&clipper->ref); refcount = InterlockedIncrement(&clipper->ref);
TRACE("%p increasing refcount to %u.\n", clipper, refcount); TRACE("%p increasing refcount to %lu.\n", clipper, refcount);
return refcount; return refcount;
} }
...@@ -103,7 +103,7 @@ static ULONG WINAPI ddraw_clipper_Release(IDirectDrawClipper *iface) ...@@ -103,7 +103,7 @@ static ULONG WINAPI ddraw_clipper_Release(IDirectDrawClipper *iface)
refcount = InterlockedDecrement(&clipper->ref); refcount = InterlockedDecrement(&clipper->ref);
TRACE("%p decreasing refcount to %u.\n", clipper, refcount); TRACE("%p decreasing refcount to %lu.\n", clipper, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -120,14 +120,14 @@ static HRESULT WINAPI ddraw_clipper_SetHWnd(IDirectDrawClipper *iface, DWORD fla ...@@ -120,14 +120,14 @@ static HRESULT WINAPI ddraw_clipper_SetHWnd(IDirectDrawClipper *iface, DWORD fla
{ {
struct ddraw_clipper *clipper = impl_from_IDirectDrawClipper(iface); struct ddraw_clipper *clipper = impl_from_IDirectDrawClipper(iface);
TRACE("iface %p, flags %#x, window %p.\n", iface, flags, window); TRACE("iface %p, flags %#lx, window %p.\n", iface, flags, window);
if (!ddraw_clipper_is_valid(clipper)) if (!ddraw_clipper_is_valid(clipper))
return DDERR_INVALIDPARAMS; return DDERR_INVALIDPARAMS;
if (flags) if (flags)
{ {
FIXME("flags %#x, not supported.\n", flags); FIXME("flags %#lx, not supported.\n", flags);
return DDERR_INVALIDPARAMS; return DDERR_INVALIDPARAMS;
} }
...@@ -280,7 +280,7 @@ static HRESULT WINAPI ddraw_clipper_SetClipList(IDirectDrawClipper *iface, RGNDA ...@@ -280,7 +280,7 @@ static HRESULT WINAPI ddraw_clipper_SetClipList(IDirectDrawClipper *iface, RGNDA
{ {
struct ddraw_clipper *clipper = impl_from_IDirectDrawClipper(iface); struct ddraw_clipper *clipper = impl_from_IDirectDrawClipper(iface);
TRACE("iface %p, region %p, flags %#x.\n", iface, region, flags); TRACE("iface %p, region %p, flags %#lx.\n", iface, region, flags);
if (!ddraw_clipper_is_valid(clipper)) if (!ddraw_clipper_is_valid(clipper))
return DDERR_INVALIDPARAMS; return DDERR_INVALIDPARAMS;
...@@ -330,7 +330,7 @@ static HRESULT WINAPI ddraw_clipper_Initialize(IDirectDrawClipper *iface, ...@@ -330,7 +330,7 @@ static HRESULT WINAPI ddraw_clipper_Initialize(IDirectDrawClipper *iface,
{ {
struct ddraw_clipper *clipper = impl_from_IDirectDrawClipper(iface); struct ddraw_clipper *clipper = impl_from_IDirectDrawClipper(iface);
TRACE("iface %p, ddraw %p, flags %#x.\n", iface, ddraw, flags); TRACE("iface %p, ddraw %p, flags %#lx.\n", iface, ddraw, flags);
if (!ddraw_clipper_is_valid(clipper)) if (!ddraw_clipper_is_valid(clipper))
return DDERR_INVALIDPARAMS; return DDERR_INVALIDPARAMS;
......
...@@ -31,17 +31,17 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddraw); ...@@ -31,17 +31,17 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddraw);
*****************************************************************************/ *****************************************************************************/
static void _dump_executedata(const D3DEXECUTEDATA *lpData) { static void _dump_executedata(const D3DEXECUTEDATA *lpData) {
TRACE("dwSize : %d\n", lpData->dwSize); TRACE("dwSize : %ld\n", lpData->dwSize);
TRACE("Vertex Offset : %d Count : %d\n", lpData->dwVertexOffset, lpData->dwVertexCount); TRACE("Vertex Offset : %ld Count : %ld\n", lpData->dwVertexOffset, lpData->dwVertexCount);
TRACE("Instruction Offset : %d Length : %d\n", lpData->dwInstructionOffset, lpData->dwInstructionLength); TRACE("Instruction Offset : %ld Length : %ld\n", lpData->dwInstructionOffset, lpData->dwInstructionLength);
TRACE("HVertex Offset : %d\n", lpData->dwHVertexOffset); TRACE("HVertex Offset : %ld\n", lpData->dwHVertexOffset);
} }
static void _dump_D3DEXECUTEBUFFERDESC(const D3DEXECUTEBUFFERDESC *lpDesc) { static void _dump_D3DEXECUTEBUFFERDESC(const D3DEXECUTEBUFFERDESC *lpDesc) {
TRACE("dwSize : %d\n", lpDesc->dwSize); TRACE("dwSize : %ld\n", lpDesc->dwSize);
TRACE("dwFlags : %x\n", lpDesc->dwFlags); TRACE("dwFlags : %lx\n", lpDesc->dwFlags);
TRACE("dwCaps : %x\n", lpDesc->dwCaps); TRACE("dwCaps : %lx\n", lpDesc->dwCaps);
TRACE("dwBufferSize : %d\n", lpDesc->dwBufferSize); TRACE("dwBufferSize : %ld\n", lpDesc->dwBufferSize);
TRACE("lpData : %p\n", lpDesc->lpData); TRACE("lpData : %p\n", lpDesc->lpData);
} }
...@@ -215,7 +215,7 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d ...@@ -215,7 +215,7 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d
if (!a || !b || !c) if (!a || !b || !c)
{ {
ERR("Invalid matrix handle (a %#x -> %p, b %#x -> %p, c %#x -> %p).\n", ERR("Invalid matrix handle (a %#lx -> %p, b %#lx -> %p, c %#lx -> %p).\n",
ci->hDestMatrix, a, ci->hSrcMatrix1, b, ci->hSrcMatrix2, c); ci->hDestMatrix, a, ci->hSrcMatrix1, b, ci->hSrcMatrix2, c);
} }
else else
...@@ -238,7 +238,7 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d ...@@ -238,7 +238,7 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d
m = ddraw_get_object(&device->handle_table, ci->u2.dwArg[0] - 1, DDRAW_HANDLE_MATRIX); m = ddraw_get_object(&device->handle_table, ci->u2.dwArg[0] - 1, DDRAW_HANDLE_MATRIX);
if (!m) if (!m)
{ {
ERR("Invalid matrix handle %#x.\n", ci->u2.dwArg[0]); ERR("Invalid matrix handle %#lx.\n", ci->u2.dwArg[0]);
} }
else else
{ {
...@@ -292,7 +292,7 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d ...@@ -292,7 +292,7 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d
D3DPROCESSVERTICES *ci = (D3DPROCESSVERTICES *)instr; D3DPROCESSVERTICES *ci = (D3DPROCESSVERTICES *)instr;
DWORD op = ci->dwFlags & D3DPROCESSVERTICES_OPMASK; DWORD op = ci->dwFlags & D3DPROCESSVERTICES_OPMASK;
TRACE(" start %u, dest %u, count %u, flags %#x.\n", TRACE(" start %u, dest %u, count %lu, flags %#lx.\n",
ci->wStart, ci->wDest, ci->dwCount, ci->dwFlags); ci->wStart, ci->wDest, ci->dwCount, ci->dwFlags);
if (ci->dwFlags & D3DPROCESSVERTICES_UPDATEEXTENTS) if (ci->dwFlags & D3DPROCESSVERTICES_UPDATEEXTENTS)
...@@ -329,7 +329,7 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d ...@@ -329,7 +329,7 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d
break; break;
default: default:
FIXME("Unhandled vertex processing op %#x.\n", op); FIXME("Unhandled vertex processing op %#lx.\n", op);
break; break;
} }
...@@ -350,13 +350,13 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d ...@@ -350,13 +350,13 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d
if (!(dst = ddraw_get_object(&device->handle_table, if (!(dst = ddraw_get_object(&device->handle_table,
ci->hDestTexture - 1, DDRAW_HANDLE_SURFACE))) ci->hDestTexture - 1, DDRAW_HANDLE_SURFACE)))
{ {
WARN("Invalid destination texture handle %#x.\n", ci->hDestTexture); WARN("Invalid destination texture handle %#lx.\n", ci->hDestTexture);
continue; continue;
} }
if (!(src = ddraw_get_object(&device->handle_table, if (!(src = ddraw_get_object(&device->handle_table,
ci->hSrcTexture - 1, DDRAW_HANDLE_SURFACE))) ci->hSrcTexture - 1, DDRAW_HANDLE_SURFACE)))
{ {
WARN("Invalid source texture handle %#x.\n", ci->hSrcTexture); WARN("Invalid source texture handle %#lx.\n", ci->hSrcTexture);
continue; continue;
} }
...@@ -379,7 +379,7 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d ...@@ -379,7 +379,7 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d
{ {
if (!ci->bNegate) if (!ci->bNegate)
{ {
TRACE(" Branch to %d\n", ci->dwOffset); TRACE(" Branch to %ld\n", ci->dwOffset);
if (ci->dwOffset) { if (ci->dwOffset) {
instr = (char*)current + ci->dwOffset; instr = (char*)current + ci->dwOffset;
break; break;
...@@ -390,7 +390,7 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d ...@@ -390,7 +390,7 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d
{ {
if (ci->bNegate) if (ci->bNegate)
{ {
TRACE(" Branch to %d\n", ci->dwOffset); TRACE(" Branch to %ld\n", ci->dwOffset);
if (ci->dwOffset) { if (ci->dwOffset) {
instr = (char*)current + ci->dwOffset; instr = (char*)current + ci->dwOffset;
break; break;
...@@ -464,7 +464,7 @@ static ULONG WINAPI d3d_execute_buffer_AddRef(IDirect3DExecuteBuffer *iface) ...@@ -464,7 +464,7 @@ static ULONG WINAPI d3d_execute_buffer_AddRef(IDirect3DExecuteBuffer *iface)
struct d3d_execute_buffer *buffer = impl_from_IDirect3DExecuteBuffer(iface); struct d3d_execute_buffer *buffer = impl_from_IDirect3DExecuteBuffer(iface);
ULONG ref = InterlockedIncrement(&buffer->ref); ULONG ref = InterlockedIncrement(&buffer->ref);
TRACE("%p increasing refcount to %u.\n", buffer, ref); TRACE("%p increasing refcount to %lu.\n", buffer, ref);
return ref; return ref;
} }
...@@ -483,7 +483,7 @@ static ULONG WINAPI d3d_execute_buffer_Release(IDirect3DExecuteBuffer *iface) ...@@ -483,7 +483,7 @@ static ULONG WINAPI d3d_execute_buffer_Release(IDirect3DExecuteBuffer *iface)
struct d3d_execute_buffer *buffer = impl_from_IDirect3DExecuteBuffer(iface); struct d3d_execute_buffer *buffer = impl_from_IDirect3DExecuteBuffer(iface);
ULONG ref = InterlockedDecrement(&buffer->ref); ULONG ref = InterlockedDecrement(&buffer->ref);
TRACE("%p decreasing refcount to %u.\n", buffer, ref); TRACE("%p decreasing refcount to %lu.\n", buffer, ref);
if (!ref) if (!ref)
{ {
...@@ -593,7 +593,7 @@ static HRESULT WINAPI d3d_execute_buffer_SetExecuteData(IDirect3DExecuteBuffer * ...@@ -593,7 +593,7 @@ static HRESULT WINAPI d3d_execute_buffer_SetExecuteData(IDirect3DExecuteBuffer *
if (data->dwSize != sizeof(*data)) if (data->dwSize != sizeof(*data))
{ {
WARN("data->dwSize is %u, returning DDERR_INVALIDPARAMS.\n", data->dwSize); WARN("data->dwSize is %lu, returning DDERR_INVALIDPARAMS.\n", data->dwSize);
return DDERR_INVALIDPARAMS; return DDERR_INVALIDPARAMS;
} }
...@@ -714,7 +714,7 @@ static HRESULT WINAPI d3d_execute_buffer_GetExecuteData(IDirect3DExecuteBuffer * ...@@ -714,7 +714,7 @@ static HRESULT WINAPI d3d_execute_buffer_GetExecuteData(IDirect3DExecuteBuffer *
static HRESULT WINAPI d3d_execute_buffer_Validate(IDirect3DExecuteBuffer *iface, static HRESULT WINAPI d3d_execute_buffer_Validate(IDirect3DExecuteBuffer *iface,
DWORD *offset, LPD3DVALIDATECALLBACK callback, void *context, DWORD reserved) DWORD *offset, LPD3DVALIDATECALLBACK callback, void *context, DWORD reserved)
{ {
TRACE("iface %p, offset %p, callback %p, context %p, reserved %#x.\n", TRACE("iface %p, offset %p, callback %p, context %p, reserved %#lx.\n",
iface, offset, callback, context, reserved); iface, offset, callback, context, reserved);
WARN("Not implemented.\n"); WARN("Not implemented.\n");
...@@ -737,7 +737,7 @@ static HRESULT WINAPI d3d_execute_buffer_Validate(IDirect3DExecuteBuffer *iface, ...@@ -737,7 +737,7 @@ static HRESULT WINAPI d3d_execute_buffer_Validate(IDirect3DExecuteBuffer *iface,
*****************************************************************************/ *****************************************************************************/
static HRESULT WINAPI d3d_execute_buffer_Optimize(IDirect3DExecuteBuffer *iface, DWORD reserved) static HRESULT WINAPI d3d_execute_buffer_Optimize(IDirect3DExecuteBuffer *iface, DWORD reserved)
{ {
TRACE("iface %p, reserved %#x.\n", iface, reserved); TRACE("iface %p, reserved %#lx.\n", iface, reserved);
WARN("Not implemented.\n"); WARN("Not implemented.\n");
......
...@@ -123,7 +123,7 @@ static ULONG WINAPI d3d_light_AddRef(IDirect3DLight *iface) ...@@ -123,7 +123,7 @@ static ULONG WINAPI d3d_light_AddRef(IDirect3DLight *iface)
struct d3d_light *light = impl_from_IDirect3DLight(iface); struct d3d_light *light = impl_from_IDirect3DLight(iface);
ULONG ref = InterlockedIncrement(&light->ref); ULONG ref = InterlockedIncrement(&light->ref);
TRACE("%p increasing refcount to %u.\n", light, ref); TRACE("%p increasing refcount to %lu.\n", light, ref);
return ref; return ref;
} }
...@@ -133,7 +133,7 @@ static ULONG WINAPI d3d_light_Release(IDirect3DLight *iface) ...@@ -133,7 +133,7 @@ static ULONG WINAPI d3d_light_Release(IDirect3DLight *iface)
struct d3d_light *light = impl_from_IDirect3DLight(iface); struct d3d_light *light = impl_from_IDirect3DLight(iface);
ULONG ref = InterlockedDecrement(&light->ref); ULONG ref = InterlockedDecrement(&light->ref);
TRACE("%p decreasing refcount to %u.\n", light, ref); TRACE("%p decreasing refcount to %lu.\n", light, ref);
if (!ref) if (!ref)
{ {
......
...@@ -79,7 +79,7 @@ static void ddraw_enumerate_secondary_devices(struct wined3d *wined3d, LPDDENUMC ...@@ -79,7 +79,7 @@ static void ddraw_enumerate_secondary_devices(struct wined3d *wined3d, LPDDENUMC
wined3d_mutex_lock(); wined3d_mutex_lock();
if (FAILED(hr = wined3d_adapter_get_identifier(wined3d_adapter, 0x0, &adapter_id))) if (FAILED(hr = wined3d_adapter_get_identifier(wined3d_adapter, 0x0, &adapter_id)))
{ {
WARN("Failed to get adapter identifier, hr %#x.\n", hr); WARN("Failed to get adapter identifier, hr %#lx.\n", hr);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
break; break;
} }
...@@ -91,7 +91,7 @@ static void ddraw_enumerate_secondary_devices(struct wined3d *wined3d, LPDDENUMC ...@@ -91,7 +91,7 @@ static void ddraw_enumerate_secondary_devices(struct wined3d *wined3d, LPDDENUMC
wined3d_mutex_lock(); wined3d_mutex_lock();
if (FAILED(hr = wined3d_output_get_desc(wined3d_output, &output_desc))) if (FAILED(hr = wined3d_output_get_desc(wined3d_output, &output_desc)))
{ {
WARN("Failed to get output description, hr %#x.\n", hr); WARN("Failed to get output description, hr %#lx.\n", hr);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
break; break;
} }
...@@ -144,7 +144,7 @@ DWORD ddraw_allocate_handle(struct ddraw_handle_table *t, void *object, enum ddr ...@@ -144,7 +144,7 @@ DWORD ddraw_allocate_handle(struct ddraw_handle_table *t, void *object, enum ddr
entry = t->free_entries; entry = t->free_entries;
if (entry->type != DDRAW_HANDLE_FREE) if (entry->type != DDRAW_HANDLE_FREE)
{ {
ERR("Handle %#x (%p) is in the free list, but has type %#x.\n", idx, entry->object, entry->type); ERR("Handle %#lx (%p) is in the free list, but has type %#x.\n", idx, entry->object, entry->type);
return DDRAW_INVALID_HANDLE; return DDRAW_INVALID_HANDLE;
} }
t->free_entries = entry->object; t->free_entries = entry->object;
...@@ -183,14 +183,14 @@ void *ddraw_free_handle(struct ddraw_handle_table *t, DWORD handle, enum ddraw_h ...@@ -183,14 +183,14 @@ void *ddraw_free_handle(struct ddraw_handle_table *t, DWORD handle, enum ddraw_h
if (handle == DDRAW_INVALID_HANDLE || handle >= t->entry_count) if (handle == DDRAW_INVALID_HANDLE || handle >= t->entry_count)
{ {
WARN("Invalid handle %#x passed.\n", handle); WARN("Invalid handle %#lx passed.\n", handle);
return NULL; return NULL;
} }
entry = &t->entries[handle]; entry = &t->entries[handle];
if (entry->type != type) if (entry->type != type)
{ {
WARN("Handle %#x (%p) is not of type %#x.\n", handle, entry->object, type); WARN("Handle %#lx (%p) is not of type %#x.\n", handle, entry->object, type);
return NULL; return NULL;
} }
...@@ -208,14 +208,14 @@ void *ddraw_get_object(struct ddraw_handle_table *t, DWORD handle, enum ddraw_ha ...@@ -208,14 +208,14 @@ void *ddraw_get_object(struct ddraw_handle_table *t, DWORD handle, enum ddraw_ha
if (handle == DDRAW_INVALID_HANDLE || handle >= t->entry_count) if (handle == DDRAW_INVALID_HANDLE || handle >= t->entry_count)
{ {
WARN("Invalid handle %#x passed.\n", handle); WARN("Invalid handle %#lx passed.\n", handle);
return NULL; return NULL;
} }
entry = &t->entries[handle]; entry = &t->entries[handle];
if (entry->type != type) if (entry->type != type)
{ {
WARN("Handle %#x (%p) is not of type %#x.\n", handle, entry->object, type); WARN("Handle %#lx (%p) is not of type %#x.\n", handle, entry->object, type);
return NULL; return NULL;
} }
...@@ -319,7 +319,7 @@ static HRESULT DDRAW_Create(const GUID *guid, void **out, IUnknown *outer_unknow ...@@ -319,7 +319,7 @@ static HRESULT DDRAW_Create(const GUID *guid, void **out, IUnknown *outer_unknow
if (FAILED(hr = ddraw_init(ddraw, flags, device_type))) if (FAILED(hr = ddraw_init(ddraw, flags, device_type)))
{ {
WARN("Failed to initialize ddraw object, hr %#x.\n", hr); WARN("Failed to initialize ddraw object, hr %#lx.\n", hr);
heap_free(ddraw); heap_free(ddraw);
return hr; return hr;
} }
...@@ -442,7 +442,7 @@ HRESULT WINAPI DirectDrawEnumerateExA(LPDDENUMCALLBACKEXA callback, void *contex ...@@ -442,7 +442,7 @@ HRESULT WINAPI DirectDrawEnumerateExA(LPDDENUMCALLBACKEXA callback, void *contex
{ {
struct wined3d *wined3d; struct wined3d *wined3d;
TRACE("callback %p, context %p, flags %#x.\n", callback, context, flags); TRACE("callback %p, context %p, flags %#lx.\n", callback, context, flags);
if (flags & ~(DDENUM_ATTACHEDSECONDARYDEVICES | if (flags & ~(DDENUM_ATTACHEDSECONDARYDEVICES |
DDENUM_DETACHEDSECONDARYDEVICES | DDENUM_DETACHEDSECONDARYDEVICES |
...@@ -450,7 +450,7 @@ HRESULT WINAPI DirectDrawEnumerateExA(LPDDENUMCALLBACKEXA callback, void *contex ...@@ -450,7 +450,7 @@ HRESULT WINAPI DirectDrawEnumerateExA(LPDDENUMCALLBACKEXA callback, void *contex
return DDERR_INVALIDPARAMS; return DDERR_INVALIDPARAMS;
if (flags & ~DDENUM_ATTACHEDSECONDARYDEVICES) if (flags & ~DDENUM_ATTACHEDSECONDARYDEVICES)
FIXME("flags 0x%08x not handled\n", flags & ~DDENUM_ATTACHEDSECONDARYDEVICES); FIXME("flags %#lx not handled\n", flags & ~DDENUM_ATTACHEDSECONDARYDEVICES);
TRACE("Enumerating ddraw interfaces\n"); TRACE("Enumerating ddraw interfaces\n");
if (!(wined3d = wined3d_create(DDRAW_WINED3D_FLAGS))) if (!(wined3d = wined3d_create(DDRAW_WINED3D_FLAGS)))
...@@ -516,7 +516,7 @@ HRESULT WINAPI DirectDrawEnumerateW(LPDDENUMCALLBACKW callback, void *context) ...@@ -516,7 +516,7 @@ HRESULT WINAPI DirectDrawEnumerateW(LPDDENUMCALLBACKW callback, void *context)
***********************************************************************/ ***********************************************************************/
HRESULT WINAPI DirectDrawEnumerateExW(LPDDENUMCALLBACKEXW callback, void *context, DWORD flags) HRESULT WINAPI DirectDrawEnumerateExW(LPDDENUMCALLBACKEXW callback, void *context, DWORD flags)
{ {
TRACE("callback %p, context %p, flags %#x.\n", callback, context, flags); TRACE("callback %p, context %p, flags %#lx.\n", callback, context, flags);
return DDERR_UNSUPPORTED; return DDERR_UNSUPPORTED;
} }
...@@ -658,7 +658,7 @@ static ULONG WINAPI ddraw_class_factory_AddRef(IClassFactory *iface) ...@@ -658,7 +658,7 @@ static ULONG WINAPI ddraw_class_factory_AddRef(IClassFactory *iface)
struct ddraw_class_factory *factory = impl_from_IClassFactory(iface); struct ddraw_class_factory *factory = impl_from_IClassFactory(iface);
ULONG ref = InterlockedIncrement(&factory->ref); ULONG ref = InterlockedIncrement(&factory->ref);
TRACE("%p increasing refcount to %u.\n", factory, ref); TRACE("%p increasing refcount to %lu.\n", factory, ref);
return ref; return ref;
} }
...@@ -678,7 +678,7 @@ static ULONG WINAPI ddraw_class_factory_Release(IClassFactory *iface) ...@@ -678,7 +678,7 @@ static ULONG WINAPI ddraw_class_factory_Release(IClassFactory *iface)
struct ddraw_class_factory *factory = impl_from_IClassFactory(iface); struct ddraw_class_factory *factory = impl_from_IClassFactory(iface);
ULONG ref = InterlockedDecrement(&factory->ref); ULONG ref = InterlockedDecrement(&factory->ref);
TRACE("%p decreasing refcount to %u.\n", factory, ref); TRACE("%p decreasing refcount to %lu.\n", factory, ref);
if (!ref) if (!ref)
heap_free(factory); heap_free(factory);
...@@ -811,7 +811,7 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, void *reserved) ...@@ -811,7 +811,7 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, void *reserved)
wc.lpszClassName = DDRAW_WINDOW_CLASS_NAME; wc.lpszClassName = DDRAW_WINDOW_CLASS_NAME;
if (!RegisterClassA(&wc)) if (!RegisterClassA(&wc))
{ {
ERR("Failed to register ddraw window class, last error %#x.\n", GetLastError()); ERR("Failed to register ddraw window class, last error %#lx.\n", GetLastError());
return FALSE; return FALSE;
} }
...@@ -842,7 +842,7 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, void *reserved) ...@@ -842,7 +842,7 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, void *reserved)
size = sizeof(data); size = sizeof(data);
if (!RegQueryValueExA(hkey, "ForceRefreshRate", NULL, &type, (BYTE *)&data, &size) && type == REG_DWORD) if (!RegQueryValueExA(hkey, "ForceRefreshRate", NULL, &type, (BYTE *)&data, &size) && type == REG_DWORD)
{ {
TRACE("ForceRefreshRate set; overriding refresh rate to %d Hz\n", data); TRACE("ForceRefreshRate set; overriding refresh rate to %ld Hz\n", data);
force_refresh_rate = data; force_refresh_rate = data;
} }
RegCloseKey( hkey ); RegCloseKey( hkey );
...@@ -871,7 +871,7 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, void *reserved) ...@@ -871,7 +871,7 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, void *reserved)
{ {
struct ddraw_surface *surface; struct ddraw_surface *surface;
WARN("DirectDraw object %p has reference counts {%u, %u, %u, %u, %u}.\n", WARN("DirectDraw object %p has reference counts {%lu, %lu, %lu, %lu, %lu}.\n",
ddraw, ddraw->ref7, ddraw->ref4, ddraw->ref3, ddraw->ref2, ddraw->ref1); ddraw, ddraw->ref7, ddraw->ref4, ddraw->ref3, ddraw->ref2, ddraw->ref1);
if (ddraw->d3ddevice) if (ddraw->d3ddevice)
...@@ -879,7 +879,7 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, void *reserved) ...@@ -879,7 +879,7 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, void *reserved)
LIST_FOR_EACH_ENTRY(surface, &ddraw->surface_list, struct ddraw_surface, surface_list_entry) LIST_FOR_EACH_ENTRY(surface, &ddraw->surface_list, struct ddraw_surface, surface_list_entry)
{ {
WARN("Surface %p has reference counts {%u, %u, %u, %u, %u, %u}.\n", WARN("Surface %p has reference counts {%lu, %lu, %lu, %lu, %lu, %lu}.\n",
surface, surface->ref7, surface->ref4, surface->ref3, surface, surface->ref7, surface->ref4, surface->ref3,
surface->ref2, surface->ref1, surface->gamma_count); surface->ref2, surface->ref1, surface->gamma_count);
} }
......
...@@ -23,7 +23,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddraw); ...@@ -23,7 +23,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddraw);
static void dump_material(const D3DMATERIAL *mat) static void dump_material(const D3DMATERIAL *mat)
{ {
TRACE(" dwSize : %d\n", mat->dwSize); TRACE(" dwSize : %ld\n", mat->dwSize);
} }
static inline struct d3d_material *impl_from_IDirect3DMaterial(IDirect3DMaterial *iface) static inline struct d3d_material *impl_from_IDirect3DMaterial(IDirect3DMaterial *iface)
...@@ -116,7 +116,7 @@ static ULONG WINAPI d3d_material3_AddRef(IDirect3DMaterial3 *iface) ...@@ -116,7 +116,7 @@ static ULONG WINAPI d3d_material3_AddRef(IDirect3DMaterial3 *iface)
struct d3d_material *material = impl_from_IDirect3DMaterial3(iface); struct d3d_material *material = impl_from_IDirect3DMaterial3(iface);
ULONG ref = InterlockedIncrement(&material->ref); ULONG ref = InterlockedIncrement(&material->ref);
TRACE("%p increasing refcount to %u.\n", material, ref); TRACE("%p increasing refcount to %lu.\n", material, ref);
return ref; return ref;
} }
...@@ -136,7 +136,7 @@ static ULONG WINAPI d3d_material3_Release(IDirect3DMaterial3 *iface) ...@@ -136,7 +136,7 @@ static ULONG WINAPI d3d_material3_Release(IDirect3DMaterial3 *iface)
struct d3d_material *material = impl_from_IDirect3DMaterial3(iface); struct d3d_material *material = impl_from_IDirect3DMaterial3(iface);
ULONG ref = InterlockedDecrement(&material->ref); ULONG ref = InterlockedDecrement(&material->ref);
TRACE("%p decreasing refcount to %u.\n", material, ref); TRACE("%p decreasing refcount to %lu.\n", material, ref);
if (!ref) if (!ref)
{ {
...@@ -311,7 +311,7 @@ static HRESULT WINAPI d3d_material3_GetHandle(IDirect3DMaterial3 *iface, ...@@ -311,7 +311,7 @@ static HRESULT WINAPI d3d_material3_GetHandle(IDirect3DMaterial3 *iface,
material->Handle = h + 1; material->Handle = h + 1;
} }
*handle = material->Handle; *handle = material->Handle;
TRACE(" returning handle %08x.\n", *handle); TRACE(" returning handle %#lx.\n", *handle);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return D3D_OK; return D3D_OK;
......
...@@ -66,7 +66,7 @@ static ULONG WINAPI ddraw_palette_AddRef(IDirectDrawPalette *iface) ...@@ -66,7 +66,7 @@ static ULONG WINAPI ddraw_palette_AddRef(IDirectDrawPalette *iface)
struct ddraw_palette *This = impl_from_IDirectDrawPalette(iface); struct ddraw_palette *This = impl_from_IDirectDrawPalette(iface);
ULONG ref = InterlockedIncrement(&This->ref); ULONG ref = InterlockedIncrement(&This->ref);
TRACE("%p increasing refcount to %u.\n", This, ref); TRACE("%p increasing refcount to %lu.\n", This, ref);
return ref; return ref;
} }
...@@ -85,7 +85,7 @@ static ULONG WINAPI ddraw_palette_Release(IDirectDrawPalette *iface) ...@@ -85,7 +85,7 @@ static ULONG WINAPI ddraw_palette_Release(IDirectDrawPalette *iface)
struct ddraw_palette *palette = impl_from_IDirectDrawPalette(iface); struct ddraw_palette *palette = impl_from_IDirectDrawPalette(iface);
ULONG ref = InterlockedDecrement(&palette->ref); ULONG ref = InterlockedDecrement(&palette->ref);
TRACE("%p decreasing refcount to %u.\n", palette, ref); TRACE("%p decreasing refcount to %lu.\n", palette, ref);
if (ref == 0) if (ref == 0)
{ {
...@@ -121,7 +121,7 @@ static ULONG WINAPI ddraw_palette_Release(IDirectDrawPalette *iface) ...@@ -121,7 +121,7 @@ static ULONG WINAPI ddraw_palette_Release(IDirectDrawPalette *iface)
static HRESULT WINAPI ddraw_palette_Initialize(IDirectDrawPalette *iface, static HRESULT WINAPI ddraw_palette_Initialize(IDirectDrawPalette *iface,
IDirectDraw *ddraw, DWORD flags, PALETTEENTRY *entries) IDirectDraw *ddraw, DWORD flags, PALETTEENTRY *entries)
{ {
TRACE("iface %p, ddraw %p, flags %#x, entries %p.\n", TRACE("iface %p, ddraw %p, flags %#lx, entries %p.\n",
iface, ddraw, flags, entries); iface, ddraw, flags, entries);
return DDERR_ALREADYINITIALIZED; return DDERR_ALREADYINITIALIZED;
...@@ -163,7 +163,7 @@ static HRESULT WINAPI ddraw_palette_SetEntries(IDirectDrawPalette *iface, ...@@ -163,7 +163,7 @@ static HRESULT WINAPI ddraw_palette_SetEntries(IDirectDrawPalette *iface,
struct ddraw_palette *palette = impl_from_IDirectDrawPalette(iface); struct ddraw_palette *palette = impl_from_IDirectDrawPalette(iface);
HRESULT hr; HRESULT hr;
TRACE("iface %p, flags %#x, start %u, count %u, entries %p.\n", TRACE("iface %p, flags %#lx, start %lu, count %lu, entries %p.\n",
iface, flags, start, count, entries); iface, flags, start, count, entries);
if (!entries) if (!entries)
...@@ -202,7 +202,7 @@ static HRESULT WINAPI ddraw_palette_GetEntries(IDirectDrawPalette *iface, ...@@ -202,7 +202,7 @@ static HRESULT WINAPI ddraw_palette_GetEntries(IDirectDrawPalette *iface,
struct ddraw_palette *palette = impl_from_IDirectDrawPalette(iface); struct ddraw_palette *palette = impl_from_IDirectDrawPalette(iface);
HRESULT hr; HRESULT hr;
TRACE("iface %p, flags %#x, start %u, count %u, entries %p.\n", TRACE("iface %p, flags %#lx, start %lu, count %lu, entries %p.\n",
iface, flags, start, count, entries); iface, flags, start, count, entries);
if (!entries) if (!entries)
...@@ -262,7 +262,7 @@ HRESULT ddraw_palette_init(struct ddraw_palette *palette, ...@@ -262,7 +262,7 @@ HRESULT ddraw_palette_init(struct ddraw_palette *palette,
if ((entry_count = palette_size(flags)) == ~0u) if ((entry_count = palette_size(flags)) == ~0u)
{ {
WARN("Invalid flags %#x.\n", flags); WARN("Invalid flags %#lx.\n", flags);
return DDERR_INVALIDPARAMS; return DDERR_INVALIDPARAMS;
} }
...@@ -280,7 +280,7 @@ HRESULT ddraw_palette_init(struct ddraw_palette *palette, ...@@ -280,7 +280,7 @@ HRESULT ddraw_palette_init(struct ddraw_palette *palette,
if (FAILED(hr = wined3d_palette_create(ddraw->wined3d_device, if (FAILED(hr = wined3d_palette_create(ddraw->wined3d_device,
wined3d_flags, entry_count, entries, &palette->wined3d_palette))) wined3d_flags, entry_count, entries, &palette->wined3d_palette)))
{ {
WARN("Failed to create wined3d palette, hr %#x.\n", hr); WARN("Failed to create wined3d palette, hr %#lx.\n", hr);
return hr; return hr;
} }
......
...@@ -469,7 +469,7 @@ enum wined3d_format_id wined3dformat_from_ddrawformat(const DDPIXELFORMAT *DDPix ...@@ -469,7 +469,7 @@ enum wined3d_format_id wined3dformat_from_ddrawformat(const DDPIXELFORMAT *DDPix
return WINED3DFMT_L8_UNORM; return WINED3DFMT_L8_UNORM;
default: default:
WARN("Unknown luminance-only bit depth 0x%x.\n", DDPixelFormat->u1.dwLuminanceBitCount); WARN("Unknown luminance-only bit depth 0x%lx.\n", DDPixelFormat->u1.dwLuminanceBitCount);
return WINED3DFMT_UNKNOWN; return WINED3DFMT_UNKNOWN;
} }
} }
...@@ -483,19 +483,19 @@ enum wined3d_format_id wined3dformat_from_ddrawformat(const DDPIXELFORMAT *DDPix ...@@ -483,19 +483,19 @@ enum wined3d_format_id wined3dformat_from_ddrawformat(const DDPIXELFORMAT *DDPix
{ {
case 16: case 16:
if (DDPixelFormat->u2.dwStencilBitDepth == 1) return WINED3DFMT_S1_UINT_D15_UNORM; if (DDPixelFormat->u2.dwStencilBitDepth == 1) return WINED3DFMT_S1_UINT_D15_UNORM;
WARN("Unknown depth stencil format: 16 z bits, %u stencil bits.\n", WARN("Unknown depth stencil format: 16 z bits, %lu stencil bits.\n",
DDPixelFormat->u2.dwStencilBitDepth); DDPixelFormat->u2.dwStencilBitDepth);
return WINED3DFMT_UNKNOWN; return WINED3DFMT_UNKNOWN;
case 32: case 32:
if (DDPixelFormat->u2.dwStencilBitDepth == 8) return WINED3DFMT_D24_UNORM_S8_UINT; if (DDPixelFormat->u2.dwStencilBitDepth == 8) return WINED3DFMT_D24_UNORM_S8_UINT;
else if (DDPixelFormat->u2.dwStencilBitDepth == 4) return WINED3DFMT_S4X4_UINT_D24_UNORM; else if (DDPixelFormat->u2.dwStencilBitDepth == 4) return WINED3DFMT_S4X4_UINT_D24_UNORM;
WARN("Unknown depth stencil format: 32 z bits, %u stencil bits.\n", WARN("Unknown depth stencil format: 32 z bits, %lu stencil bits.\n",
DDPixelFormat->u2.dwStencilBitDepth); DDPixelFormat->u2.dwStencilBitDepth);
return WINED3DFMT_UNKNOWN; return WINED3DFMT_UNKNOWN;
default: default:
WARN("Unknown depth stencil format: %u z bits, %u stencil bits.\n", WARN("Unknown depth stencil format: %lu z bits, %lu stencil bits.\n",
DDPixelFormat->u1.dwZBufferBitDepth, DDPixelFormat->u2.dwStencilBitDepth); DDPixelFormat->u1.dwZBufferBitDepth, DDPixelFormat->u2.dwStencilBitDepth);
return WINED3DFMT_UNKNOWN; return WINED3DFMT_UNKNOWN;
} }
...@@ -514,12 +514,12 @@ enum wined3d_format_id wined3dformat_from_ddrawformat(const DDPIXELFORMAT *DDPix ...@@ -514,12 +514,12 @@ enum wined3d_format_id wined3dformat_from_ddrawformat(const DDPIXELFORMAT *DDPix
if (DDPixelFormat->u3.dwZBitMask == 0x00FFFFFF) return WINED3DFMT_X8D24_UNORM; if (DDPixelFormat->u3.dwZBitMask == 0x00FFFFFF) return WINED3DFMT_X8D24_UNORM;
else if (DDPixelFormat->u3.dwZBitMask == 0xFFFFFF00) return WINED3DFMT_X8D24_UNORM; else if (DDPixelFormat->u3.dwZBitMask == 0xFFFFFF00) return WINED3DFMT_X8D24_UNORM;
else if (DDPixelFormat->u3.dwZBitMask == 0xFFFFFFFF) return WINED3DFMT_D32_UNORM; else if (DDPixelFormat->u3.dwZBitMask == 0xFFFFFFFF) return WINED3DFMT_D32_UNORM;
WARN("Unknown depth-only format: 32 z bits, mask 0x%08x\n", WARN("Unknown depth-only format: 32 z bits, mask 0x%08lx\n",
DDPixelFormat->u3.dwZBitMask); DDPixelFormat->u3.dwZBitMask);
return WINED3DFMT_UNKNOWN; return WINED3DFMT_UNKNOWN;
default: default:
WARN("Unknown depth-only format: %u z bits, mask 0x%08x\n", WARN("Unknown depth-only format: %lu z bits, mask 0x%08lx\n",
DDPixelFormat->u1.dwZBufferBitDepth, DDPixelFormat->u3.dwZBitMask); DDPixelFormat->u1.dwZBufferBitDepth, DDPixelFormat->u3.dwZBitMask);
return WINED3DFMT_UNKNOWN; return WINED3DFMT_UNKNOWN;
} }
...@@ -678,7 +678,7 @@ fail: ...@@ -678,7 +678,7 @@ fail:
static void static void
DDRAW_dump_DWORD(const void *in) DDRAW_dump_DWORD(const void *in)
{ {
TRACE("%d\n", *((const DWORD *) in)); TRACE("%ld\n", *((const DWORD *) in));
} }
static void static void
DDRAW_dump_PTR(const void *in) DDRAW_dump_PTR(const void *in)
...@@ -688,7 +688,7 @@ DDRAW_dump_PTR(const void *in) ...@@ -688,7 +688,7 @@ DDRAW_dump_PTR(const void *in)
static void static void
DDRAW_dump_DDCOLORKEY(const DDCOLORKEY *ddck) DDRAW_dump_DDCOLORKEY(const DDCOLORKEY *ddck)
{ {
TRACE("Low : 0x%08x - High : 0x%08x\n", ddck->dwColorSpaceLowValue, ddck->dwColorSpaceHighValue); TRACE("Low : 0x%08lx - High : 0x%08lx\n", ddck->dwColorSpaceLowValue, ddck->dwColorSpaceHighValue);
} }
static void DDRAW_dump_flags_nolf(DWORD flags, const struct flag_info *names, size_t num_names) static void DDRAW_dump_flags_nolf(DWORD flags, const struct flag_info *names, size_t num_names)
...@@ -826,7 +826,7 @@ DDRAW_dump_pixelformat(const DDPIXELFORMAT *pf) ...@@ -826,7 +826,7 @@ DDRAW_dump_pixelformat(const DDPIXELFORMAT *pf)
TRACE("( "); TRACE("( ");
DDRAW_dump_pixelformat_flag(pf->dwFlags); DDRAW_dump_pixelformat_flag(pf->dwFlags);
if (pf->dwFlags & DDPF_FOURCC) if (pf->dwFlags & DDPF_FOURCC)
TRACE(", dwFourCC code '%c%c%c%c' (0x%08x) - %u bits per pixel", TRACE(", dwFourCC code '%c%c%c%c' (0x%08lx) - %lu bits per pixel",
(unsigned char)( pf->dwFourCC &0xff), (unsigned char)( pf->dwFourCC &0xff),
(unsigned char)((pf->dwFourCC>> 8)&0xff), (unsigned char)((pf->dwFourCC>> 8)&0xff),
(unsigned char)((pf->dwFourCC>>16)&0xff), (unsigned char)((pf->dwFourCC>>16)&0xff),
...@@ -835,22 +835,22 @@ DDRAW_dump_pixelformat(const DDPIXELFORMAT *pf) ...@@ -835,22 +835,22 @@ DDRAW_dump_pixelformat(const DDPIXELFORMAT *pf)
pf->u1.dwYUVBitCount); pf->u1.dwYUVBitCount);
if (pf->dwFlags & DDPF_RGB) if (pf->dwFlags & DDPF_RGB)
{ {
TRACE(", RGB bits: %u, R 0x%08x G 0x%08x B 0x%08x", TRACE(", RGB bits: %lu, R 0x%08lx G 0x%08lx B 0x%08lx",
pf->u1.dwRGBBitCount, pf->u1.dwRGBBitCount,
pf->u2.dwRBitMask, pf->u2.dwRBitMask,
pf->u3.dwGBitMask, pf->u3.dwGBitMask,
pf->u4.dwBBitMask); pf->u4.dwBBitMask);
if (pf->dwFlags & DDPF_ALPHAPIXELS) if (pf->dwFlags & DDPF_ALPHAPIXELS)
TRACE(" A 0x%08x", pf->u5.dwRGBAlphaBitMask); TRACE(" A 0x%08lx", pf->u5.dwRGBAlphaBitMask);
if (pf->dwFlags & DDPF_ZPIXELS) if (pf->dwFlags & DDPF_ZPIXELS)
TRACE(" Z 0x%08x", pf->u5.dwRGBZBitMask); TRACE(" Z 0x%08lx", pf->u5.dwRGBZBitMask);
} }
if (pf->dwFlags & DDPF_ZBUFFER) if (pf->dwFlags & DDPF_ZBUFFER)
TRACE(", Z bits: %u", pf->u1.dwZBufferBitDepth); TRACE(", Z bits: %lu", pf->u1.dwZBufferBitDepth);
if (pf->dwFlags & DDPF_ALPHA) if (pf->dwFlags & DDPF_ALPHA)
TRACE(", Alpha bits: %u", pf->u1.dwAlphaBitDepth); TRACE(", Alpha bits: %lu", pf->u1.dwAlphaBitDepth);
if (pf->dwFlags & DDPF_BUMPDUDV) if (pf->dwFlags & DDPF_BUMPDUDV)
TRACE(", Bump bits: %u, U 0x%08x V 0x%08x L 0x%08x", TRACE(", Bump bits: %lu, U 0x%08lx V 0x%08lx L 0x%08lx",
pf->u1.dwBumpBitCount, pf->u1.dwBumpBitCount,
pf->u2.dwBumpDuBitMask, pf->u2.dwBumpDuBitMask,
pf->u3.dwBumpDvBitMask, pf->u3.dwBumpDvBitMask,
...@@ -1138,7 +1138,7 @@ void DDRAW_dump_DDCAPS(const DDCAPS *lpcaps) ...@@ -1138,7 +1138,7 @@ void DDRAW_dump_DDCAPS(const DDCAPS *lpcaps)
FE(DDSVCAPS_STEREOSEQUENTIAL), FE(DDSVCAPS_STEREOSEQUENTIAL),
}; };
TRACE(" - dwSize : %d\n", lpcaps->dwSize); TRACE(" - dwSize : %ld\n", lpcaps->dwSize);
TRACE(" - dwCaps : "); DDRAW_dump_flags(lpcaps->dwCaps, flags1, ARRAY_SIZE(flags1)); TRACE(" - dwCaps : "); DDRAW_dump_flags(lpcaps->dwCaps, flags1, ARRAY_SIZE(flags1));
TRACE(" - dwCaps2 : "); DDRAW_dump_flags(lpcaps->dwCaps2, flags2, ARRAY_SIZE(flags2)); TRACE(" - dwCaps2 : "); DDRAW_dump_flags(lpcaps->dwCaps2, flags2, ARRAY_SIZE(flags2));
TRACE(" - dwCKeyCaps : "); DDRAW_dump_flags(lpcaps->dwCKeyCaps, flags3, ARRAY_SIZE(flags3)); TRACE(" - dwCKeyCaps : "); DDRAW_dump_flags(lpcaps->dwCKeyCaps, flags3, ARRAY_SIZE(flags3));
...@@ -1147,10 +1147,10 @@ void DDRAW_dump_DDCAPS(const DDCAPS *lpcaps) ...@@ -1147,10 +1147,10 @@ void DDRAW_dump_DDCAPS(const DDCAPS *lpcaps)
TRACE(" - dwPalCaps : "); DDRAW_dump_flags(lpcaps->dwPalCaps, flags6, ARRAY_SIZE(flags6)); TRACE(" - dwPalCaps : "); DDRAW_dump_flags(lpcaps->dwPalCaps, flags6, ARRAY_SIZE(flags6));
TRACE(" - dwSVCaps : "); DDRAW_dump_flags(lpcaps->dwSVCaps, flags7, ARRAY_SIZE(flags7)); TRACE(" - dwSVCaps : "); DDRAW_dump_flags(lpcaps->dwSVCaps, flags7, ARRAY_SIZE(flags7));
TRACE("...\n"); TRACE("...\n");
TRACE(" - dwNumFourCCCodes : %d\n", lpcaps->dwNumFourCCCodes); TRACE(" - dwNumFourCCCodes : %ld\n", lpcaps->dwNumFourCCCodes);
TRACE(" - dwCurrVisibleOverlays : %d\n", lpcaps->dwCurrVisibleOverlays); TRACE(" - dwCurrVisibleOverlays : %ld\n", lpcaps->dwCurrVisibleOverlays);
TRACE(" - dwMinOverlayStretch : %d\n", lpcaps->dwMinOverlayStretch); TRACE(" - dwMinOverlayStretch : %ld\n", lpcaps->dwMinOverlayStretch);
TRACE(" - dwMaxOverlayStretch : %d\n", lpcaps->dwMaxOverlayStretch); TRACE(" - dwMaxOverlayStretch : %ld\n", lpcaps->dwMaxOverlayStretch);
TRACE("...\n"); TRACE("...\n");
TRACE(" - ddsCaps : "); DDRAW_dump_DDSCAPS2(&lpcaps->ddsCaps); TRACE(" - ddsCaps : "); DDRAW_dump_DDSCAPS2(&lpcaps->ddsCaps);
} }
......
...@@ -66,7 +66,7 @@ static ULONG WINAPI d3d_vertex_buffer7_AddRef(IDirect3DVertexBuffer7 *iface) ...@@ -66,7 +66,7 @@ static ULONG WINAPI d3d_vertex_buffer7_AddRef(IDirect3DVertexBuffer7 *iface)
struct d3d_vertex_buffer *buffer = impl_from_IDirect3DVertexBuffer7(iface); struct d3d_vertex_buffer *buffer = impl_from_IDirect3DVertexBuffer7(iface);
ULONG ref = InterlockedIncrement(&buffer->ref); ULONG ref = InterlockedIncrement(&buffer->ref);
TRACE("%p increasing refcount to %u.\n", buffer, ref); TRACE("%p increasing refcount to %lu.\n", buffer, ref);
return ref; return ref;
} }
...@@ -76,7 +76,7 @@ static ULONG WINAPI d3d_vertex_buffer7_Release(IDirect3DVertexBuffer7 *iface) ...@@ -76,7 +76,7 @@ static ULONG WINAPI d3d_vertex_buffer7_Release(IDirect3DVertexBuffer7 *iface)
struct d3d_vertex_buffer *buffer = impl_from_IDirect3DVertexBuffer7(iface); struct d3d_vertex_buffer *buffer = impl_from_IDirect3DVertexBuffer7(iface);
ULONG ref = InterlockedDecrement(&buffer->ref); ULONG ref = InterlockedDecrement(&buffer->ref);
TRACE("%p decreasing refcount to %u.\n", buffer, ref); TRACE("%p decreasing refcount to %lu.\n", buffer, ref);
if (!ref) if (!ref)
{ {
...@@ -154,7 +154,7 @@ static HRESULT WINAPI d3d_vertex_buffer7_Lock(IDirect3DVertexBuffer7 *iface, ...@@ -154,7 +154,7 @@ static HRESULT WINAPI d3d_vertex_buffer7_Lock(IDirect3DVertexBuffer7 *iface,
struct wined3d_map_desc wined3d_map_desc; struct wined3d_map_desc wined3d_map_desc;
HRESULT hr; HRESULT hr;
TRACE("iface %p, flags %#x, data %p, data_size %p.\n", iface, flags, data, data_size); TRACE("iface %p, flags %#lx, data %p, data_size %p.\n", iface, flags, data, data_size);
if (buffer->version != 7) if (buffer->version != 7)
flags &= ~(DDLOCK_NOOVERWRITE | DDLOCK_DISCARDCONTENTS); flags &= ~(DDLOCK_NOOVERWRITE | DDLOCK_DISCARDCONTENTS);
...@@ -257,7 +257,7 @@ static HRESULT WINAPI d3d_vertex_buffer7_ProcessVertices(IDirect3DVertexBuffer7 ...@@ -257,7 +257,7 @@ static HRESULT WINAPI d3d_vertex_buffer7_ProcessVertices(IDirect3DVertexBuffer7
const struct wined3d_stateblock_state *state; const struct wined3d_stateblock_state *state;
HRESULT hr; HRESULT hr;
TRACE("iface %p, vertex_op %#x, dst_idx %u, count %u, src_buffer %p, src_idx %u, device %p, flags %#x.\n", TRACE("iface %p, vertex_op %#lx, dst_idx %lu, count %lu, src_buffer %p, src_idx %lu, device %p, flags %#lx.\n",
iface, vertex_op, dst_idx, count, src_buffer, src_idx, device, flags); iface, vertex_op, dst_idx, count, src_buffer, src_idx, device, flags);
/* Vertex operations: /* Vertex operations:
...@@ -369,11 +369,11 @@ static HRESULT WINAPI d3d_vertex_buffer7_Optimize(IDirect3DVertexBuffer7 *iface, ...@@ -369,11 +369,11 @@ static HRESULT WINAPI d3d_vertex_buffer7_Optimize(IDirect3DVertexBuffer7 *iface,
struct d3d_vertex_buffer *buffer = impl_from_IDirect3DVertexBuffer7(iface); struct d3d_vertex_buffer *buffer = impl_from_IDirect3DVertexBuffer7(iface);
static BOOL hide = FALSE; static BOOL hide = FALSE;
TRACE("iface %p, device %p, flags %#x.\n", iface, device, flags); TRACE("iface %p, device %p, flags %#lx.\n", iface, device, flags);
if (!hide) if (!hide)
{ {
FIXME("iface %p, device %p, flags %#x stub!\n", iface, device, flags); FIXME("iface %p, device %p, flags %#lx stub!\n", iface, device, flags);
hide = TRUE; hide = TRUE;
} }
...@@ -413,7 +413,7 @@ static HRESULT WINAPI d3d_vertex_buffer7_ProcessVerticesStrided(IDirect3DVertexB ...@@ -413,7 +413,7 @@ static HRESULT WINAPI d3d_vertex_buffer7_ProcessVerticesStrided(IDirect3DVertexB
DWORD vertex_op, DWORD dst_idx, DWORD count, D3DDRAWPRIMITIVESTRIDEDDATA *data, DWORD vertex_op, DWORD dst_idx, DWORD count, D3DDRAWPRIMITIVESTRIDEDDATA *data,
DWORD fvf, IDirect3DDevice7 *device, DWORD flags) DWORD fvf, IDirect3DDevice7 *device, DWORD flags)
{ {
FIXME("iface %p, vertex_op %#x, dst_idx %u, count %u, data %p, fvf %#x, device %p, flags %#x stub!\n", FIXME("iface %p, vertex_op %#lx, dst_idx %lu, count %lu, data %p, fvf %#lx, device %p, flags %#lx stub!\n",
iface, vertex_op, dst_idx, count, data, fvf, device, flags); iface, vertex_op, dst_idx, count, data, fvf, device, flags);
return DD_OK; return DD_OK;
...@@ -443,10 +443,10 @@ HRESULT d3d_vertex_buffer_create(struct d3d_vertex_buffer **vertex_buf, ...@@ -443,10 +443,10 @@ HRESULT d3d_vertex_buffer_create(struct d3d_vertex_buffer **vertex_buf,
HRESULT hr = D3D_OK; HRESULT hr = D3D_OK;
TRACE("Vertex buffer description:\n"); TRACE("Vertex buffer description:\n");
TRACE(" dwSize %u\n", desc->dwSize); TRACE(" dwSize %lu\n", desc->dwSize);
TRACE(" dwCaps %#x\n", desc->dwCaps); TRACE(" dwCaps %#lx\n", desc->dwCaps);
TRACE(" FVF %#x\n", desc->dwFVF); TRACE(" FVF %#lx\n", desc->dwFVF);
TRACE(" dwNumVertices %u\n", desc->dwNumVertices); TRACE(" dwNumVertices %lu\n", desc->dwNumVertices);
if (!(buffer = heap_alloc_zero(sizeof(*buffer)))) if (!(buffer = heap_alloc_zero(sizeof(*buffer))))
return DDERR_OUTOFMEMORY; return DDERR_OUTOFMEMORY;
...@@ -465,7 +465,7 @@ HRESULT d3d_vertex_buffer_create(struct d3d_vertex_buffer **vertex_buf, ...@@ -465,7 +465,7 @@ HRESULT d3d_vertex_buffer_create(struct d3d_vertex_buffer **vertex_buf,
if (FAILED(hr = d3d_vertex_buffer_create_wined3d_buffer(buffer, FALSE, &buffer->wined3d_buffer))) if (FAILED(hr = d3d_vertex_buffer_create_wined3d_buffer(buffer, FALSE, &buffer->wined3d_buffer)))
{ {
WARN("Failed to create wined3d vertex buffer, hr %#x.\n", hr); WARN("Failed to create wined3d vertex buffer, hr %#lx.\n", hr);
if (hr == WINED3DERR_INVALIDCALL) if (hr == WINED3DERR_INVALIDCALL)
hr = DDERR_INVALIDPARAMS; hr = DDERR_INVALIDPARAMS;
goto end; goto end;
...@@ -473,7 +473,7 @@ HRESULT d3d_vertex_buffer_create(struct d3d_vertex_buffer **vertex_buf, ...@@ -473,7 +473,7 @@ HRESULT d3d_vertex_buffer_create(struct d3d_vertex_buffer **vertex_buf,
if (!(buffer->wined3d_declaration = ddraw_find_decl(ddraw, desc->dwFVF))) if (!(buffer->wined3d_declaration = ddraw_find_decl(ddraw, desc->dwFVF)))
{ {
ERR("Failed to find vertex declaration for fvf %#x.\n", desc->dwFVF); ERR("Failed to find vertex declaration for fvf %#lx.\n", desc->dwFVF);
wined3d_buffer_decref(buffer->wined3d_buffer); wined3d_buffer_decref(buffer->wined3d_buffer);
hr = DDERR_INVALIDPARAMS; hr = DDERR_INVALIDPARAMS;
goto end; goto end;
......
...@@ -121,10 +121,9 @@ void viewport_deactivate(struct d3d_viewport *viewport) ...@@ -121,10 +121,9 @@ void viewport_deactivate(struct d3d_viewport *viewport)
void viewport_alloc_active_light_index(struct d3d_light *light) void viewport_alloc_active_light_index(struct d3d_light *light)
{ {
struct d3d_viewport *vp = light->active_viewport; struct d3d_viewport *vp = light->active_viewport;
unsigned int i; unsigned int i, map;
DWORD map;
TRACE("vp %p, light %p, index %u, active_lights_count %u.\n", TRACE("vp %p, light %p, index %lu, active_lights_count %lu.\n",
vp, light, light->active_light_index, vp->active_lights_count); vp, light, light->active_light_index, vp->active_lights_count);
if (light->active_light_index) if (light->active_light_index)
...@@ -161,7 +160,7 @@ void viewport_free_active_light_index(struct d3d_light *light) ...@@ -161,7 +160,7 @@ void viewport_free_active_light_index(struct d3d_light *light)
{ {
struct d3d_viewport *vp = light->active_viewport; struct d3d_viewport *vp = light->active_viewport;
TRACE("vp %p, light %p, index %u, active_lights_count %u, map_lights %#x.\n", TRACE("vp %p, light %p, index %lu, active_lights_count %lu, map_lights %#lx.\n",
vp, light, light->active_light_index, vp->active_lights_count, vp->map_lights); vp, light, light->active_light_index, vp->active_lights_count, vp->map_lights);
if (!light->active_light_index) if (!light->active_light_index)
...@@ -182,9 +181,9 @@ void viewport_free_active_light_index(struct d3d_light *light) ...@@ -182,9 +181,9 @@ void viewport_free_active_light_index(struct d3d_light *light)
*****************************************************************************/ *****************************************************************************/
static void _dump_D3DVIEWPORT(const D3DVIEWPORT *lpvp) static void _dump_D3DVIEWPORT(const D3DVIEWPORT *lpvp)
{ {
TRACE(" - dwSize = %d dwX = %d dwY = %d\n", TRACE(" - dwSize = %ld dwX = %ld dwY = %ld\n",
lpvp->dwSize, lpvp->dwX, lpvp->dwY); lpvp->dwSize, lpvp->dwX, lpvp->dwY);
TRACE(" - dwWidth = %d dwHeight = %d\n", TRACE(" - dwWidth = %ld dwHeight = %ld\n",
lpvp->dwWidth, lpvp->dwHeight); lpvp->dwWidth, lpvp->dwHeight);
TRACE(" - dvScaleX = %f dvScaleY = %f\n", TRACE(" - dvScaleX = %f dvScaleY = %f\n",
lpvp->dvScaleX, lpvp->dvScaleY); lpvp->dvScaleX, lpvp->dvScaleY);
...@@ -196,9 +195,9 @@ static void _dump_D3DVIEWPORT(const D3DVIEWPORT *lpvp) ...@@ -196,9 +195,9 @@ static void _dump_D3DVIEWPORT(const D3DVIEWPORT *lpvp)
static void _dump_D3DVIEWPORT2(const D3DVIEWPORT2 *lpvp) static void _dump_D3DVIEWPORT2(const D3DVIEWPORT2 *lpvp)
{ {
TRACE(" - dwSize = %d dwX = %d dwY = %d\n", TRACE(" - dwSize = %ld dwX = %ld dwY = %ld\n",
lpvp->dwSize, lpvp->dwX, lpvp->dwY); lpvp->dwSize, lpvp->dwX, lpvp->dwY);
TRACE(" - dwWidth = %d dwHeight = %d\n", TRACE(" - dwWidth = %ld dwHeight = %ld\n",
lpvp->dwWidth, lpvp->dwHeight); lpvp->dwWidth, lpvp->dwHeight);
TRACE(" - dvClipX = %f dvClipY = %f\n", TRACE(" - dvClipX = %f dvClipY = %f\n",
lpvp->dvClipX, lpvp->dvClipY); lpvp->dvClipX, lpvp->dvClipY);
...@@ -267,7 +266,7 @@ static ULONG WINAPI d3d_viewport_AddRef(IDirect3DViewport3 *iface) ...@@ -267,7 +266,7 @@ static ULONG WINAPI d3d_viewport_AddRef(IDirect3DViewport3 *iface)
struct d3d_viewport *viewport = impl_from_IDirect3DViewport3(iface); struct d3d_viewport *viewport = impl_from_IDirect3DViewport3(iface);
ULONG ref = InterlockedIncrement(&viewport->ref); ULONG ref = InterlockedIncrement(&viewport->ref);
TRACE("%p increasing refcount to %u.\n", viewport, ref); TRACE("%p increasing refcount to %lu.\n", viewport, ref);
return ref; return ref;
} }
...@@ -286,7 +285,7 @@ static ULONG WINAPI d3d_viewport_Release(IDirect3DViewport3 *iface) ...@@ -286,7 +285,7 @@ static ULONG WINAPI d3d_viewport_Release(IDirect3DViewport3 *iface)
struct d3d_viewport *viewport = impl_from_IDirect3DViewport3(iface); struct d3d_viewport *viewport = impl_from_IDirect3DViewport3(iface);
ULONG ref = InterlockedDecrement(&viewport->ref); ULONG ref = InterlockedDecrement(&viewport->ref);
TRACE("%p decreasing refcount to %u.\n", viewport, ref); TRACE("%p decreasing refcount to %lu.\n", viewport, ref);
if (!ref) if (!ref)
heap_free(viewport); heap_free(viewport);
...@@ -386,7 +385,7 @@ static HRESULT WINAPI d3d_viewport_SetViewport(IDirect3DViewport3 *iface, D3DVIE ...@@ -386,7 +385,7 @@ static HRESULT WINAPI d3d_viewport_SetViewport(IDirect3DViewport3 *iface, D3DVIE
if (vp->dwSize != sizeof(*vp)) if (vp->dwSize != sizeof(*vp))
{ {
WARN("Invalid D3DVIEWPORT size %u.\n", vp->dwSize); WARN("Invalid D3DVIEWPORT size %lu.\n", vp->dwSize);
return DDERR_INVALIDPARAMS; return DDERR_INVALIDPARAMS;
} }
...@@ -493,7 +492,7 @@ static HRESULT WINAPI d3d_viewport_TransformVertices(IDirect3DViewport3 *iface, ...@@ -493,7 +492,7 @@ static HRESULT WINAPI d3d_viewport_TransformVertices(IDirect3DViewport3 *iface,
struct d3d_device *device = viewport->active_device; struct d3d_device *device = viewport->active_device;
BOOL activate = device->current_viewport != viewport; BOOL activate = device->current_viewport != viewport;
TRACE("iface %p, vertex_count %u, data %p, flags %#x, offscreen %p.\n", TRACE("iface %p, vertex_count %lu, data %p, flags %#lx, offscreen %p.\n",
iface, dwVertexCount, data, dwFlags, offscreen); iface, dwVertexCount, data, dwFlags, offscreen);
/* Tests on windows show that Windows crashes when this occurs, /* Tests on windows show that Windows crashes when this occurs,
...@@ -614,7 +613,7 @@ static HRESULT WINAPI d3d_viewport_TransformVertices(IDirect3DViewport3 *iface, ...@@ -614,7 +613,7 @@ static HRESULT WINAPI d3d_viewport_TransformVertices(IDirect3DViewport3 *iface,
static HRESULT WINAPI d3d_viewport_LightElements(IDirect3DViewport3 *iface, static HRESULT WINAPI d3d_viewport_LightElements(IDirect3DViewport3 *iface,
DWORD element_count, D3DLIGHTDATA *data) DWORD element_count, D3DLIGHTDATA *data)
{ {
TRACE("iface %p, element_count %u, data %p.\n", iface, element_count, data); TRACE("iface %p, element_count %lu, data %p.\n", iface, element_count, data);
return DDERR_UNSUPPORTED; return DDERR_UNSUPPORTED;
} }
...@@ -624,13 +623,13 @@ static HRESULT WINAPI d3d_viewport_SetBackground(IDirect3DViewport3 *iface, D3DM ...@@ -624,13 +623,13 @@ static HRESULT WINAPI d3d_viewport_SetBackground(IDirect3DViewport3 *iface, D3DM
struct d3d_viewport *viewport = impl_from_IDirect3DViewport3(iface); struct d3d_viewport *viewport = impl_from_IDirect3DViewport3(iface);
struct d3d_material *m; struct d3d_material *m;
TRACE("iface %p, material %#x.\n", iface, material); TRACE("iface %p, material %#lx.\n", iface, material);
wined3d_mutex_lock(); wined3d_mutex_lock();
if (!(m = ddraw_get_object(&viewport->ddraw->d3ddevice->handle_table, material - 1, DDRAW_HANDLE_MATERIAL))) if (!(m = ddraw_get_object(&viewport->ddraw->d3ddevice->handle_table, material - 1, DDRAW_HANDLE_MATERIAL)))
{ {
WARN("Invalid material handle %#x.\n", material); WARN("Invalid material handle %#lx.\n", material);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return DDERR_INVALIDPARAMS; return DDERR_INVALIDPARAMS;
} }
...@@ -742,11 +741,11 @@ static HRESULT WINAPI d3d_viewport_Clear(IDirect3DViewport3 *iface, ...@@ -742,11 +741,11 @@ static HRESULT WINAPI d3d_viewport_Clear(IDirect3DViewport3 *iface,
IDirect3DViewport3 *current_viewport; IDirect3DViewport3 *current_viewport;
IDirect3DDevice3 *d3d_device3; IDirect3DDevice3 *d3d_device3;
TRACE("iface %p, rect_count %u, rects %p, flags %#x.\n", iface, rect_count, rects, flags); TRACE("iface %p, rect_count %lu, rects %p, flags %#lx.\n", iface, rect_count, rects, flags);
if (!rects || !rect_count) if (!rects || !rect_count)
{ {
WARN("rect_count = %u, rects = %p, ignoring clear\n", rect_count, rects); WARN("rect_count = %lu, rects = %p, ignoring clear\n", rect_count, rects);
return D3D_OK; return D3D_OK;
} }
...@@ -891,7 +890,7 @@ static HRESULT WINAPI d3d_viewport_NextLight(IDirect3DViewport3 *iface, ...@@ -891,7 +890,7 @@ static HRESULT WINAPI d3d_viewport_NextLight(IDirect3DViewport3 *iface,
struct list *entry; struct list *entry;
HRESULT hr; HRESULT hr;
TRACE("iface %p, light %p, next_light %p, flags %#x.\n", TRACE("iface %p, light %p, next_light %p, flags %#lx.\n",
iface, lpDirect3DLight, lplpDirect3DLight, flags); iface, lpDirect3DLight, lplpDirect3DLight, flags);
if (!lplpDirect3DLight) if (!lplpDirect3DLight)
...@@ -922,7 +921,7 @@ static HRESULT WINAPI d3d_viewport_NextLight(IDirect3DViewport3 *iface, ...@@ -922,7 +921,7 @@ static HRESULT WINAPI d3d_viewport_NextLight(IDirect3DViewport3 *iface,
default: default:
entry = NULL; entry = NULL;
WARN("Invalid flags %#x.\n", flags); WARN("Invalid flags %#lx.\n", flags);
break; break;
} }
...@@ -1015,7 +1014,7 @@ static HRESULT WINAPI d3d_viewport_SetViewport2(IDirect3DViewport3 *iface, D3DVI ...@@ -1015,7 +1014,7 @@ static HRESULT WINAPI d3d_viewport_SetViewport2(IDirect3DViewport3 *iface, D3DVI
if (vp->dwSize != sizeof(*vp)) if (vp->dwSize != sizeof(*vp))
{ {
WARN("Invalid D3DVIEWPORT2 size %u.\n", vp->dwSize); WARN("Invalid D3DVIEWPORT2 size %lu.\n", vp->dwSize);
return DDERR_INVALIDPARAMS; return DDERR_INVALIDPARAMS;
} }
...@@ -1136,12 +1135,12 @@ static HRESULT WINAPI d3d_viewport_Clear2(IDirect3DViewport3 *iface, DWORD rect_ ...@@ -1136,12 +1135,12 @@ static HRESULT WINAPI d3d_viewport_Clear2(IDirect3DViewport3 *iface, DWORD rect_
IDirect3DViewport3 *current_viewport; IDirect3DViewport3 *current_viewport;
IDirect3DDevice3 *d3d_device3; IDirect3DDevice3 *d3d_device3;
TRACE("iface %p, rect_count %u, rects %p, flags %#x, color 0x%08x, depth %.8e, stencil %u.\n", TRACE("iface %p, rect_count %lu, rects %p, flags %#lx, color 0x%08lx, depth %.8e, stencil %lu.\n",
iface, rect_count, rects, flags, color, depth, stencil); iface, rect_count, rects, flags, color, depth, stencil);
if (!rects || !rect_count) if (!rects || !rect_count)
{ {
WARN("rect_count = %u, rects = %p, ignoring clear\n", rect_count, rects); WARN("rect_count = %lu, rects = %p, ignoring clear\n", rect_count, rects);
return D3D_OK; return D3D_OK;
} }
......
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