From e4253fd8b9e4ffe93043a6a8c992ebfd625f50ae Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Sat, 21 Apr 2007 22:16:34 +0100 Subject: [PATCH] ddraw: Constify some variables. --- dlls/ddraw/ddraw_private.h | 6 +++--- dlls/ddraw/executebuffer.c | 4 ++-- dlls/ddraw/light.c | 2 +- dlls/ddraw/main.c | 2 +- dlls/ddraw/material.c | 2 +- dlls/ddraw/utils.c | 8 ++++---- dlls/ddraw/viewport.c | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index 85f8ab244e6..b04c0630deb 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -598,10 +598,10 @@ const IDirect3DVertexBufferVtbl IDirect3DVertexBuffer1_Vtbl; (((((d3dvtVertexType) >> (16 + (2 * (tex_num)))) + 1) & 0x03) + 1) void PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat, WINED3DFORMAT WineD3DFormat); -WINED3DFORMAT PixelFormat_DD2WineD3D(DDPIXELFORMAT *DDPixelFormat); +WINED3DFORMAT PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat); void DDRAW_dump_surface_desc(const DDSURFACEDESC2 *lpddsd); void DDRAW_dump_pixelformat(const DDPIXELFORMAT *PixelFormat); -void dump_D3DMATRIX(D3DMATRIX *mat); +void dump_D3DMATRIX(const D3DMATRIX *mat); void DDRAW_dump_DDCAPS(const DDCAPS *lpcaps); DWORD get_flexible_vertex_size(DWORD d3dvtVertexType); void DDRAW_dump_DDSCAPS2(const DDSCAPS2 *in); @@ -609,7 +609,7 @@ void DDRAW_dump_cooperativelevel(DWORD cooplevel); /* This only needs to be here as long the processvertices functionality of * IDirect3DExecuteBuffer isn't in WineD3D */ -void multiply_matrix(LPD3DMATRIX dest, LPD3DMATRIX src1, LPD3DMATRIX src2); +void multiply_matrix(LPD3DMATRIX dest, const D3DMATRIX *src1, const D3DMATRIX *src2); /* Used for generic dumping */ typedef struct diff --git a/dlls/ddraw/executebuffer.c b/dlls/ddraw/executebuffer.c index 2b9d0973e55..2c064a95761 100644 --- a/dlls/ddraw/executebuffer.c +++ b/dlls/ddraw/executebuffer.c @@ -55,14 +55,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d7); * *****************************************************************************/ -static void _dump_executedata(LPD3DEXECUTEDATA lpData) { +static void _dump_executedata(const D3DEXECUTEDATA *lpData) { DPRINTF("dwSize : %d\n", lpData->dwSize); DPRINTF("Vertex Offset : %d Count : %d\n", lpData->dwVertexOffset, lpData->dwVertexCount); DPRINTF("Instruction Offset : %d Length : %d\n", lpData->dwInstructionOffset, lpData->dwInstructionLength); DPRINTF("HVertex Offset : %d\n", lpData->dwHVertexOffset); } -static void _dump_D3DEXECUTEBUFFERDESC(LPD3DEXECUTEBUFFERDESC lpDesc) { +static void _dump_D3DEXECUTEBUFFERDESC(const D3DEXECUTEBUFFERDESC *lpDesc) { DPRINTF("dwSize : %d\n", lpDesc->dwSize); DPRINTF("dwFlags : %x\n", lpDesc->dwFlags); DPRINTF("dwCaps : %x\n", lpDesc->dwCaps); diff --git a/dlls/ddraw/light.c b/dlls/ddraw/light.c index 8ff984fd35f..1eb79619f63 100644 --- a/dlls/ddraw/light.c +++ b/dlls/ddraw/light.c @@ -158,7 +158,7 @@ IDirect3DLightImpl_Initialize(IDirect3DLight *iface, * DDERR_INVALIDPARAMS if Light is NULL * *****************************************************************************/ -static void dump_light(LPD3DLIGHT2 light) +static void dump_light(const D3DLIGHT2 *light) { DPRINTF(" - dwSize : %d\n", light->dwSize); } diff --git a/dlls/ddraw/main.c b/dlls/ddraw/main.c index 4e3d3a6a430..c89afbf77b8 100644 --- a/dlls/ddraw/main.c +++ b/dlls/ddraw/main.c @@ -95,7 +95,7 @@ static CRITICAL_SECTION ddraw_list_cs = { &ddraw_list_cs_debug, -1, 0, 0, 0, 0 } * ***********************************************************************/ static HRESULT -DDRAW_Create(GUID *guid, +DDRAW_Create(const GUID *guid, void **DD, IUnknown *UnkOuter, REFIID iid) diff --git a/dlls/ddraw/material.c b/dlls/ddraw/material.c index 32a5091c241..06fecb0db49 100644 --- a/dlls/ddraw/material.c +++ b/dlls/ddraw/material.c @@ -47,7 +47,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d7); WINE_DECLARE_DEBUG_CHANNEL(ddraw_thunk); -static void dump_material(LPD3DMATERIAL mat) +static void dump_material(const D3DMATERIAL *mat) { DPRINTF(" dwSize : %d\n", mat->dwSize); } diff --git a/dlls/ddraw/utils.c b/dlls/ddraw/utils.c index e1f02bb1f3d..204342a1b95 100644 --- a/dlls/ddraw/utils.c +++ b/dlls/ddraw/utils.c @@ -337,7 +337,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat, * WINED3DFMT_UNKNOWN if a matching format wasn't found *****************************************************************************/ WINED3DFORMAT -PixelFormat_DD2WineD3D(DDPIXELFORMAT *DDPixelFormat) +PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat) { TRACE("Convert a DirectDraw Pixelformat to a WineD3D Pixelformat\n"); if(TRACE_ON(ddraw)) @@ -874,7 +874,7 @@ void DDRAW_dump_surface_desc(const DDSURFACEDESC2 *lpddsd) } void -dump_D3DMATRIX(D3DMATRIX *mat) +dump_D3DMATRIX(const D3DMATRIX *mat) { DPRINTF(" %f %f %f %f\n", mat->_11, mat->_12, mat->_13, mat->_14); DPRINTF(" %f %f %f %f\n", mat->_21, mat->_22, mat->_23, mat->_24); @@ -1129,8 +1129,8 @@ void DDRAW_dump_DDCAPS(const DDCAPS *lpcaps) *****************************************************************************/ void multiply_matrix(D3DMATRIX *dest, - D3DMATRIX *src1, - D3DMATRIX *src2) + const D3DMATRIX *src1, + const D3DMATRIX *src2) { D3DMATRIX temp; diff --git a/dlls/ddraw/viewport.c b/dlls/ddraw/viewport.c index a6438551d6e..2ce149073e8 100644 --- a/dlls/ddraw/viewport.c +++ b/dlls/ddraw/viewport.c @@ -95,7 +95,7 @@ void viewport_activate(IDirect3DViewportImpl* This) { * Writes viewport information to TRACE * *****************************************************************************/ -static void _dump_D3DVIEWPORT(D3DVIEWPORT *lpvp) +static void _dump_D3DVIEWPORT(const D3DVIEWPORT *lpvp) { TRACE(" - dwSize = %d dwX = %d dwY = %d\n", lpvp->dwSize, lpvp->dwX, lpvp->dwY); @@ -109,7 +109,7 @@ static void _dump_D3DVIEWPORT(D3DVIEWPORT *lpvp) lpvp->dvMinZ, lpvp->dvMaxZ); } -static void _dump_D3DVIEWPORT2(D3DVIEWPORT2 *lpvp) +static void _dump_D3DVIEWPORT2(const D3DVIEWPORT2 *lpvp) { TRACE(" - dwSize = %d dwX = %d dwY = %d\n", lpvp->dwSize, lpvp->dwX, lpvp->dwY);