Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
472a8f7a
Commit
472a8f7a
authored
Oct 17, 2011
by
Ričardas Barkauskas
Committed by
Alexandre Julliard
Oct 17, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: COM cleanup for IDirect3DDevice7 interface.
parent
7dc08745
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
67 additions
and
67 deletions
+67
-67
ddraw.c
dlls/ddraw/ddraw.c
+1
-1
ddraw_private.h
dlls/ddraw/ddraw_private.h
+2
-2
device.c
dlls/ddraw/device.c
+50
-50
executebuffer.c
dlls/ddraw/executebuffer.c
+3
-3
light.c
dlls/ddraw/light.c
+3
-3
main.c
dlls/ddraw/main.c
+1
-1
material.c
dlls/ddraw/material.c
+1
-1
vertexbuffer.c
dlls/ddraw/vertexbuffer.c
+3
-3
viewport.c
dlls/ddraw/viewport.c
+3
-3
No files found.
dlls/ddraw/ddraw.c
View file @
472a8f7a
...
...
@@ -4328,7 +4328,7 @@ static HRESULT WINAPI d3d7_CreateDevice(IDirect3D7 *iface, REFCLSID riid,
}
TRACE
(
"Created device %p.
\n
"
,
object
);
*
device
=
(
IDirect3DDevice7
*
)
object
;
*
device
=
&
object
->
IDirect3DDevice7_iface
;
LeaveCriticalSection
(
&
ddraw_cs
);
return
D3D_OK
;
...
...
dlls/ddraw/ddraw_private.h
View file @
472a8f7a
...
...
@@ -277,7 +277,7 @@ void *ddraw_get_object(struct ddraw_handle_table *t, DWORD handle, enum ddraw_ha
struct
IDirect3DDeviceImpl
{
/* IUnknown */
const
IDirect3DDevice7Vtbl
*
lpVtbl
;
IDirect3DDevice7
IDirect3DDevice7_iface
;
IDirect3DDevice3
IDirect3DDevice3_iface
;
IDirect3DDevice2
IDirect3DDevice2_iface
;
IDirect3DDevice
IDirect3DDevice_iface
;
...
...
@@ -342,7 +342,7 @@ static inline IDirect3DDeviceImpl *impl_from_IDirect3DDevice3(IDirect3DDevice3 *
static
inline
IDirect3DDeviceImpl
*
impl_from_IDirect3DDevice7
(
IDirect3DDevice7
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirect3DDeviceImpl
,
lpVtbl
);
return
CONTAINING_RECORD
(
iface
,
IDirect3DDeviceImpl
,
IDirect3DDevice7_iface
);
}
IDirect3DDeviceImpl
*
unsafe_impl_from_IDirect3DDevice
(
IDirect3DDevice
*
iface
)
DECLSPEC_HIDDEN
;
...
...
dlls/ddraw/device.c
View file @
472a8f7a
...
...
@@ -197,7 +197,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_QueryInterface(IDirect3DDevice3 *ifa
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice3
(
iface
);
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
obj
);
return
IDirect3DDevice7_QueryInterface
(
(
IDirect3DDevice7
*
)
This
,
riid
,
obj
);
return
IDirect3DDevice7_QueryInterface
(
&
This
->
IDirect3DDevice7_iface
,
riid
,
obj
);
}
static
HRESULT
WINAPI
IDirect3DDeviceImpl_2_QueryInterface
(
IDirect3DDevice2
*
iface
,
REFIID
riid
,
...
...
@@ -206,7 +206,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_2_QueryInterface(IDirect3DDevice2 *ifa
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice2
(
iface
);
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
obj
);
return
IDirect3DDevice7_QueryInterface
(
(
IDirect3DDevice7
*
)
This
,
riid
,
obj
);
return
IDirect3DDevice7_QueryInterface
(
&
This
->
IDirect3DDevice7_iface
,
riid
,
obj
);
}
static
HRESULT
WINAPI
IDirect3DDeviceImpl_1_QueryInterface
(
IDirect3DDevice
*
iface
,
REFIID
riid
,
...
...
@@ -215,7 +215,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_1_QueryInterface(IDirect3DDevice *ifac
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice
(
iface
);
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
obp
);
return
IDirect3DDevice7_QueryInterface
(
(
IDirect3DDevice7
*
)
This
,
riid
,
obp
);
return
IDirect3DDevice7_QueryInterface
(
&
This
->
IDirect3DDevice7_iface
,
riid
,
obp
);
}
/*****************************************************************************
...
...
@@ -246,7 +246,7 @@ static ULONG WINAPI IDirect3DDeviceImpl_3_AddRef(IDirect3DDevice3 *iface)
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice3
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
IDirect3DDevice7_AddRef
(
(
IDirect3DDevice7
*
)
This
);
return
IDirect3DDevice7_AddRef
(
&
This
->
IDirect3DDevice7_iface
);
}
static
ULONG
WINAPI
IDirect3DDeviceImpl_2_AddRef
(
IDirect3DDevice2
*
iface
)
...
...
@@ -254,7 +254,7 @@ static ULONG WINAPI IDirect3DDeviceImpl_2_AddRef(IDirect3DDevice2 *iface)
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice2
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
IDirect3DDevice7_AddRef
(
(
IDirect3DDevice7
*
)
This
);
return
IDirect3DDevice7_AddRef
(
&
This
->
IDirect3DDevice7_iface
);
}
static
ULONG
WINAPI
IDirect3DDeviceImpl_1_AddRef
(
IDirect3DDevice
*
iface
)
...
...
@@ -262,7 +262,7 @@ static ULONG WINAPI IDirect3DDeviceImpl_1_AddRef(IDirect3DDevice *iface)
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
IDirect3DDevice7_AddRef
(
(
IDirect3DDevice7
*
)
This
);
return
IDirect3DDevice7_AddRef
(
&
This
->
IDirect3DDevice7_iface
);
}
/*****************************************************************************
...
...
@@ -385,7 +385,7 @@ static ULONG WINAPI IDirect3DDeviceImpl_3_Release(IDirect3DDevice3 *iface)
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice3
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
IDirect3DDevice7_Release
(
(
IDirect3DDevice7
*
)
This
);
return
IDirect3DDevice7_Release
(
&
This
->
IDirect3DDevice7_iface
);
}
static
ULONG
WINAPI
IDirect3DDeviceImpl_2_Release
(
IDirect3DDevice2
*
iface
)
...
...
@@ -393,7 +393,7 @@ static ULONG WINAPI IDirect3DDeviceImpl_2_Release(IDirect3DDevice2 *iface)
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice2
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
IDirect3DDevice7_Release
(
(
IDirect3DDevice7
*
)
This
);
return
IDirect3DDevice7_Release
(
&
This
->
IDirect3DDevice7_iface
);
}
static
ULONG
WINAPI
IDirect3DDeviceImpl_1_Release
(
IDirect3DDevice
*
iface
)
...
...
@@ -401,7 +401,7 @@ static ULONG WINAPI IDirect3DDeviceImpl_1_Release(IDirect3DDevice *iface)
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
IDirect3DDevice7_Release
(
(
IDirect3DDevice7
*
)
This
);
return
IDirect3DDevice7_Release
(
&
This
->
IDirect3DDevice7_iface
);
}
/*****************************************************************************
...
...
@@ -1183,7 +1183,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_EnumTextureFormats(IDirect3DDevice3
TRACE
(
"iface %p, callback %p, context %p.
\n
"
,
iface
,
Callback
,
Arg
);
return
IDirect3DDevice7_EnumTextureFormats
(
(
IDirect3DDevice7
*
)
This
,
Callback
,
Arg
);
return
IDirect3DDevice7_EnumTextureFormats
(
&
This
->
IDirect3DDevice7_iface
,
Callback
,
Arg
);
}
/*****************************************************************************
...
...
@@ -1530,7 +1530,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_BeginScene(IDirect3DDevice3 *iface)
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice3
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
IDirect3DDevice7_BeginScene
(
(
IDirect3DDevice7
*
)
This
);
return
IDirect3DDevice7_BeginScene
(
&
This
->
IDirect3DDevice7_iface
);
}
static
HRESULT
WINAPI
IDirect3DDeviceImpl_2_BeginScene
(
IDirect3DDevice2
*
iface
)
...
...
@@ -1538,7 +1538,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_2_BeginScene(IDirect3DDevice2 *iface)
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice2
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
IDirect3DDevice7_BeginScene
(
(
IDirect3DDevice7
*
)
This
);
return
IDirect3DDevice7_BeginScene
(
&
This
->
IDirect3DDevice7_iface
);
}
static
HRESULT
WINAPI
IDirect3DDeviceImpl_1_BeginScene
(
IDirect3DDevice
*
iface
)
...
...
@@ -1546,7 +1546,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_1_BeginScene(IDirect3DDevice *iface)
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
IDirect3DDevice7_BeginScene
(
(
IDirect3DDevice7
*
)
This
);
return
IDirect3DDevice7_BeginScene
(
&
This
->
IDirect3DDevice7_iface
);
}
/*****************************************************************************
...
...
@@ -1602,7 +1602,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDeviceImpl_3_EndScene(IDirect3D
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice3
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
IDirect3DDevice7_EndScene
(
(
IDirect3DDevice7
*
)
This
);
return
IDirect3DDevice7_EndScene
(
&
This
->
IDirect3DDevice7_iface
);
}
static
HRESULT
WINAPI
DECLSPEC_HOTPATCH
IDirect3DDeviceImpl_2_EndScene
(
IDirect3DDevice2
*
iface
)
...
...
@@ -1610,7 +1610,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDeviceImpl_2_EndScene(IDirect3D
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice2
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
IDirect3DDevice7_EndScene
(
(
IDirect3DDevice7
*
)
This
);
return
IDirect3DDevice7_EndScene
(
&
This
->
IDirect3DDevice7_iface
);
}
static
HRESULT
WINAPI
DECLSPEC_HOTPATCH
IDirect3DDeviceImpl_1_EndScene
(
IDirect3DDevice
*
iface
)
...
...
@@ -1618,7 +1618,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDeviceImpl_1_EndScene(IDirect3D
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
IDirect3DDevice7_EndScene
(
(
IDirect3DDevice7
*
)
This
);
return
IDirect3DDevice7_EndScene
(
&
This
->
IDirect3DDevice7_iface
);
}
/*****************************************************************************
...
...
@@ -1982,7 +1982,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_GetRenderTarget(IDirect3DDevice3 *if
if
(
!
RenderTarget
)
return
DDERR_INVALIDPARAMS
;
hr
=
IDirect3DDevice7_GetRenderTarget
(
(
IDirect3DDevice7
*
)
This
,
&
RenderTarget7
);
hr
=
IDirect3DDevice7_GetRenderTarget
(
&
This
->
IDirect3DDevice7_iface
,
&
RenderTarget7
);
if
(
hr
!=
D3D_OK
)
return
hr
;
RenderTargetImpl
=
impl_from_IDirectDrawSurface7
(
RenderTarget7
);
*
RenderTarget
=
&
RenderTargetImpl
->
IDirectDrawSurface4_iface
;
...
...
@@ -2004,7 +2004,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_2_GetRenderTarget(IDirect3DDevice2 *if
if
(
!
RenderTarget
)
return
DDERR_INVALIDPARAMS
;
hr
=
IDirect3DDevice7_GetRenderTarget
(
(
IDirect3DDevice7
*
)
This
,
&
RenderTarget7
);
hr
=
IDirect3DDevice7_GetRenderTarget
(
&
This
->
IDirect3DDevice7_iface
,
&
RenderTarget7
);
if
(
hr
!=
D3D_OK
)
return
hr
;
RenderTargetImpl
=
impl_from_IDirectDrawSurface7
(
RenderTarget7
);
*
RenderTarget
=
&
RenderTargetImpl
->
IDirectDrawSurface_iface
;
...
...
@@ -2247,7 +2247,7 @@ IDirect3DDeviceImpl_3_End(IDirect3DDevice3 *iface,
TRACE
(
"iface %p, flags %#x.
\n
"
,
iface
,
Flags
);
return
IDirect3DDevice7_DrawPrimitive
(
(
IDirect3DDevice7
*
)
This
,
This
->
primitive_type
,
return
IDirect3DDevice7_DrawPrimitive
(
&
This
->
IDirect3DDevice7_iface
,
This
->
primitive_type
,
This
->
vertex_type
,
This
->
vertex_buffer
,
This
->
nb_vertices
,
This
->
render_flags
);
}
...
...
@@ -2547,7 +2547,7 @@ IDirect3DDeviceImpl_3_GetRenderState(IDirect3DDevice3 *iface,
}
default:
return
IDirect3DDevice7_GetRenderState
(
(
IDirect3DDevice7
*
)
This
,
dwRenderStateType
,
lpdwRenderState
);
return
IDirect3DDevice7_GetRenderState
(
&
This
->
IDirect3DDevice7_iface
,
dwRenderStateType
,
lpdwRenderState
);
}
}
...
...
@@ -2915,7 +2915,7 @@ IDirect3DDeviceImpl_3_SetRenderState(IDirect3DDevice3 *iface,
}
default:
hr
=
IDirect3DDevice7_SetRenderState
(
(
IDirect3DDevice7
*
)
This
,
RenderStateType
,
Value
);
hr
=
IDirect3DDevice7_SetRenderState
(
&
This
->
IDirect3DDevice7_iface
,
RenderStateType
,
Value
);
break
;
}
...
...
@@ -3030,7 +3030,7 @@ IDirect3DDeviceImpl_3_SetLightState(IDirect3DDevice3 *iface,
return
DDERR_INVALIDPARAMS
;
}
hr
=
IDirect3DDevice7_SetRenderState
(
(
IDirect3DDevice7
*
)
This
,
rs
,
Value
);
hr
=
IDirect3DDevice7_SetRenderState
(
&
This
->
IDirect3DDevice7_iface
,
rs
,
Value
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr
;
}
...
...
@@ -3124,7 +3124,7 @@ IDirect3DDeviceImpl_3_GetLightState(IDirect3DDevice3 *iface,
return
DDERR_INVALIDPARAMS
;
}
hr
=
IDirect3DDevice7_GetRenderState
(
(
IDirect3DDevice7
*
)
This
,
rs
,
Value
);
hr
=
IDirect3DDevice7_GetRenderState
(
&
This
->
IDirect3DDevice7_iface
,
rs
,
Value
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr
;
}
...
...
@@ -3224,7 +3224,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_SetTransform(IDirect3DDevice3 *iface
TRACE
(
"iface %p, state %#x, matrix %p.
\n
"
,
iface
,
TransformStateType
,
D3DMatrix
);
return
IDirect3DDevice7_SetTransform
(
(
IDirect3DDevice7
*
)
This
,
TransformStateType
,
D3DMatrix
);
return
IDirect3DDevice7_SetTransform
(
&
This
->
IDirect3DDevice7_iface
,
TransformStateType
,
D3DMatrix
);
}
static
HRESULT
WINAPI
IDirect3DDeviceImpl_2_SetTransform
(
IDirect3DDevice2
*
iface
,
...
...
@@ -3234,7 +3234,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_2_SetTransform(IDirect3DDevice2 *iface
TRACE
(
"iface %p, state %#x, matrix %p.
\n
"
,
iface
,
TransformStateType
,
D3DMatrix
);
return
IDirect3DDevice7_SetTransform
(
(
IDirect3DDevice7
*
)
This
,
TransformStateType
,
D3DMatrix
);
return
IDirect3DDevice7_SetTransform
(
&
This
->
IDirect3DDevice7_iface
,
TransformStateType
,
D3DMatrix
);
}
/*****************************************************************************
...
...
@@ -3314,7 +3314,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_GetTransform(IDirect3DDevice3 *iface
TRACE
(
"iface %p, state %#x, matrix %p.
\n
"
,
iface
,
TransformStateType
,
D3DMatrix
);
return
IDirect3DDevice7_GetTransform
(
(
IDirect3DDevice7
*
)
This
,
TransformStateType
,
D3DMatrix
);
return
IDirect3DDevice7_GetTransform
(
&
This
->
IDirect3DDevice7_iface
,
TransformStateType
,
D3DMatrix
);
}
static
HRESULT
WINAPI
IDirect3DDeviceImpl_2_GetTransform
(
IDirect3DDevice2
*
iface
,
...
...
@@ -3324,7 +3324,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_2_GetTransform(IDirect3DDevice2 *iface
TRACE
(
"iface %p, state %#x, matrix %p.
\n
"
,
iface
,
TransformStateType
,
D3DMatrix
);
return
IDirect3DDevice7_GetTransform
(
(
IDirect3DDevice7
*
)
This
,
TransformStateType
,
D3DMatrix
);
return
IDirect3DDevice7_GetTransform
(
&
This
->
IDirect3DDevice7_iface
,
TransformStateType
,
D3DMatrix
);
}
/*****************************************************************************
...
...
@@ -3403,7 +3403,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_MultiplyTransform(IDirect3DDevice3 *
TRACE
(
"iface %p, state %#x, matrix %p.
\n
"
,
iface
,
TransformStateType
,
D3DMatrix
);
return
IDirect3DDevice7_MultiplyTransform
(
(
IDirect3DDevice7
*
)
This
,
TransformStateType
,
D3DMatrix
);
return
IDirect3DDevice7_MultiplyTransform
(
&
This
->
IDirect3DDevice7_iface
,
TransformStateType
,
D3DMatrix
);
}
static
HRESULT
WINAPI
IDirect3DDeviceImpl_2_MultiplyTransform
(
IDirect3DDevice2
*
iface
,
...
...
@@ -3413,7 +3413,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_2_MultiplyTransform(IDirect3DDevice2 *
TRACE
(
"iface %p, state %#x, matrix %p.
\n
"
,
iface
,
TransformStateType
,
D3DMatrix
);
return
IDirect3DDevice7_MultiplyTransform
(
(
IDirect3DDevice7
*
)
This
,
TransformStateType
,
D3DMatrix
);
return
IDirect3DDevice7_MultiplyTransform
(
&
This
->
IDirect3DDevice7_iface
,
TransformStateType
,
D3DMatrix
);
}
/*****************************************************************************
...
...
@@ -3511,7 +3511,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_DrawPrimitive(IDirect3DDevice3 *ifac
TRACE
(
"iface %p, primitive_type %#x, FVF %#x, vertices %p, vertex_count %u, flags %#x.
\n
"
,
iface
,
PrimitiveType
,
VertexType
,
Vertices
,
VertexCount
,
Flags
);
return
IDirect3DDevice7_DrawPrimitive
(
(
IDirect3DDevice7
*
)
This
,
return
IDirect3DDevice7_DrawPrimitive
(
&
This
->
IDirect3DDevice7_iface
,
PrimitiveType
,
VertexType
,
Vertices
,
VertexCount
,
Flags
);
}
...
...
@@ -3535,7 +3535,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_2_DrawPrimitive(IDirect3DDevice2 *ifac
return
DDERR_INVALIDPARAMS
;
/* Should never happen */
}
return
IDirect3DDevice7_DrawPrimitive
(
(
IDirect3DDevice7
*
)
This
,
return
IDirect3DDevice7_DrawPrimitive
(
&
This
->
IDirect3DDevice7_iface
,
PrimitiveType
,
FVF
,
Vertices
,
VertexCount
,
Flags
);
}
...
...
@@ -3637,7 +3637,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_DrawIndexedPrimitive(IDirect3DDevice
TRACE
(
"iface %p, primitive_type %#x, FVF %#x, vertices %p, vertex_count %u, indices %p, index_count %u, flags %#x.
\n
"
,
iface
,
PrimitiveType
,
VertexType
,
Vertices
,
VertexCount
,
Indices
,
IndexCount
,
Flags
);
return
IDirect3DDevice7_DrawIndexedPrimitive
(
(
IDirect3DDevice7
*
)
This
,
return
IDirect3DDevice7_DrawIndexedPrimitive
(
&
This
->
IDirect3DDevice7_iface
,
PrimitiveType
,
VertexType
,
Vertices
,
VertexCount
,
Indices
,
IndexCount
,
Flags
);
}
...
...
@@ -3661,7 +3661,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_2_DrawIndexedPrimitive(IDirect3DDevice
return
DDERR_INVALIDPARAMS
;
/* Should never happen */
}
return
IDirect3DDevice7_DrawIndexedPrimitive
(
(
IDirect3DDevice7
*
)
This
,
return
IDirect3DDevice7_DrawIndexedPrimitive
(
&
This
->
IDirect3DDevice7_iface
,
PrimitiveType
,
FVF
,
Vertices
,
VertexCount
,
Indices
,
IndexCount
,
Flags
);
}
...
...
@@ -3700,7 +3700,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_SetClipStatus(IDirect3DDevice3 *ifac
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice3
(
iface
);
TRACE
(
"iface %p, clip_status %p.
\n
"
,
iface
,
ClipStatus
);
return
IDirect3DDevice7_SetClipStatus
(
(
IDirect3DDevice7
*
)
This
,
ClipStatus
);
return
IDirect3DDevice7_SetClipStatus
(
&
This
->
IDirect3DDevice7_iface
,
ClipStatus
);
}
static
HRESULT
WINAPI
IDirect3DDeviceImpl_2_SetClipStatus
(
IDirect3DDevice2
*
iface
,
...
...
@@ -3709,7 +3709,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_2_SetClipStatus(IDirect3DDevice2 *ifac
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice2
(
iface
);
TRACE
(
"iface %p, clip_status %p.
\n
"
,
iface
,
ClipStatus
);
return
IDirect3DDevice7_SetClipStatus
(
(
IDirect3DDevice7
*
)
This
,
ClipStatus
);
return
IDirect3DDevice7_SetClipStatus
(
&
This
->
IDirect3DDevice7_iface
,
ClipStatus
);
}
/*****************************************************************************
...
...
@@ -3741,7 +3741,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_GetClipStatus(IDirect3DDevice3 *ifac
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice3
(
iface
);
TRACE
(
"iface %p, clip_status %p.
\n
"
,
iface
,
ClipStatus
);
return
IDirect3DDevice7_GetClipStatus
(
(
IDirect3DDevice7
*
)
This
,
ClipStatus
);
return
IDirect3DDevice7_GetClipStatus
(
&
This
->
IDirect3DDevice7_iface
,
ClipStatus
);
}
static
HRESULT
WINAPI
IDirect3DDeviceImpl_2_GetClipStatus
(
IDirect3DDevice2
*
iface
,
...
...
@@ -3750,7 +3750,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_2_GetClipStatus(IDirect3DDevice2 *ifac
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice2
(
iface
);
TRACE
(
"iface %p, clip_status %p.
\n
"
,
iface
,
ClipStatus
);
return
IDirect3DDevice7_GetClipStatus
(
(
IDirect3DDevice7
*
)
This
,
ClipStatus
);
return
IDirect3DDevice7_GetClipStatus
(
&
This
->
IDirect3DDevice7_iface
,
ClipStatus
);
}
/*****************************************************************************
...
...
@@ -3892,7 +3892,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_DrawPrimitiveStrided(IDirect3DDevice
TRACE
(
"iface %p, primitive_type %#x, FVF %#x, strided_data %p, vertex_count %u, flags %#x.
\n
"
,
iface
,
PrimitiveType
,
VertexType
,
D3DDrawPrimStrideData
,
VertexCount
,
Flags
);
return
IDirect3DDevice7_DrawPrimitiveStrided
(
(
IDirect3DDevice7
*
)
This
,
return
IDirect3DDevice7_DrawPrimitiveStrided
(
&
This
->
IDirect3DDevice7_iface
,
PrimitiveType
,
VertexType
,
D3DDrawPrimStrideData
,
VertexCount
,
Flags
);
}
...
...
@@ -4039,7 +4039,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_DrawIndexedPrimitiveStrided(IDirect3
TRACE
(
"iface %p, primitive_type %#x, FVF %#x, strided_data %p, vertex_count %u, indices %p, index_count %u, flags %#x.
\n
"
,
iface
,
PrimitiveType
,
VertexType
,
D3DDrawPrimStrideData
,
VertexCount
,
Indices
,
IndexCount
,
Flags
);
return
IDirect3DDevice7_DrawIndexedPrimitiveStrided
(
(
IDirect3DDevice7
*
)
This
,
return
IDirect3DDevice7_DrawIndexedPrimitiveStrided
(
&
This
->
IDirect3DDevice7_iface
,
PrimitiveType
,
VertexType
,
D3DDrawPrimStrideData
,
VertexCount
,
Indices
,
IndexCount
,
Flags
);
}
...
...
@@ -4150,7 +4150,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_DrawPrimitiveVB(IDirect3DDevice3 *if
TRACE
(
"iface %p, primitive_type %#x, vb %p, start_vertex %u, vertex_count %u, flags %#x.
\n
"
,
iface
,
PrimitiveType
,
D3DVertexBuf
,
StartVertex
,
NumVertices
,
Flags
);
return
IDirect3DDevice7_DrawPrimitiveVB
(
(
IDirect3DDevice7
*
)
This
,
return
IDirect3DDevice7_DrawPrimitiveVB
(
&
This
->
IDirect3DDevice7_iface
,
PrimitiveType
,
&
vb
->
IDirect3DVertexBuffer7_iface
,
StartVertex
,
NumVertices
,
Flags
);
}
...
...
@@ -4313,7 +4313,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_DrawIndexedPrimitiveVB(IDirect3DDevi
TRACE
(
"iface %p, primitive_type %#x, vb %p, indices %p, index_count %u, flags %#x.
\n
"
,
iface
,
PrimitiveType
,
D3DVertexBuf
,
Indices
,
IndexCount
,
Flags
);
return
IDirect3DDevice7_DrawIndexedPrimitiveVB
(
(
IDirect3DDevice7
*
)
This
,
return
IDirect3DDevice7_DrawIndexedPrimitiveVB
(
&
This
->
IDirect3DDevice7_iface
,
PrimitiveType
,
&
vb
->
IDirect3DVertexBuffer7_iface
,
0
,
IndexCount
,
Indices
,
IndexCount
,
Flags
);
}
...
...
@@ -4437,7 +4437,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_ComputeSphereVisibility(IDirect3DDev
TRACE
(
"iface %p, centers %p, radii %p, sphere_count %u, flags %#x, return_values %p.
\n
"
,
iface
,
Centers
,
Radii
,
NumSpheres
,
Flags
,
ReturnValues
);
return
IDirect3DDevice7_ComputeSphereVisibility
(
(
IDirect3DDevice7
*
)
This
,
return
IDirect3DDevice7_ComputeSphereVisibility
(
&
This
->
IDirect3DDevice7_iface
,
Centers
,
Radii
,
NumSpheres
,
Flags
,
ReturnValues
);
}
...
...
@@ -4526,7 +4526,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_GetTexture(IDirect3DDevice3 *iface,
TRACE
(
"iface %p, stage %u, texture %p.
\n
"
,
iface
,
Stage
,
Texture2
);
ret
=
IDirect3DDevice7_GetTexture
(
(
IDirect3DDevice7
*
)
This
,
Stage
,
&
ret_val
);
ret
=
IDirect3DDevice7_GetTexture
(
&
This
->
IDirect3DDevice7_iface
,
Stage
,
&
ret_val
);
ret_val_impl
=
unsafe_impl_from_IDirectDrawSurface7
(
ret_val
);
*
Texture2
=
ret_val_impl
?
&
ret_val_impl
->
IDirect3DTexture2_iface
:
NULL
;
...
...
@@ -4611,7 +4611,7 @@ IDirect3DDeviceImpl_3_SetTexture(IDirect3DDevice3 *iface,
if
(
This
->
legacyTextureBlending
)
IDirect3DDevice3_GetRenderState
(
iface
,
D3DRENDERSTATE_TEXTUREMAPBLEND
,
&
texmapblend
);
hr
=
IDirect3DDevice7_SetTexture
(
(
IDirect3DDevice7
*
)
This
,
Stage
,
&
tex
->
IDirectDrawSurface7_iface
);
hr
=
IDirect3DDevice7_SetTexture
(
&
This
->
IDirect3DDevice7_iface
,
Stage
,
&
tex
->
IDirectDrawSurface7_iface
);
if
(
This
->
legacyTextureBlending
&&
texmapblend
==
D3DTBLEND_MODULATE
)
{
...
...
@@ -4816,7 +4816,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_GetTextureStageState(IDirect3DDevice
TRACE
(
"iface %p, stage %u, state %#x, value %p.
\n
"
,
iface
,
Stage
,
TexStageStateType
,
State
);
return
IDirect3DDevice7_GetTextureStageState
(
(
IDirect3DDevice7
*
)
This
,
return
IDirect3DDevice7_GetTextureStageState
(
&
This
->
IDirect3DDevice7_iface
,
Stage
,
TexStageStateType
,
State
);
}
...
...
@@ -4952,7 +4952,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_SetTextureStageState(IDirect3DDevice
TRACE
(
"iface %p, stage %u, state %#x, value %#x.
\n
"
,
iface
,
Stage
,
TexStageStateType
,
State
);
return
IDirect3DDevice7_SetTextureStageState
(
(
IDirect3DDevice7
*
)
This
,
return
IDirect3DDevice7_SetTextureStageState
(
&
This
->
IDirect3DDevice7_iface
,
Stage
,
TexStageStateType
,
State
);
}
...
...
@@ -5016,7 +5016,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_ValidateDevice(IDirect3DDevice3 *ifa
TRACE
(
"iface %p, pass_count %p.
\n
"
,
iface
,
Passes
);
return
IDirect3DDevice7_ValidateDevice
(
(
IDirect3DDevice7
*
)
This
,
Passes
);
return
IDirect3DDevice7_ValidateDevice
(
&
This
->
IDirect3DDevice7_iface
,
Passes
);
}
/*****************************************************************************
...
...
@@ -6774,7 +6774,7 @@ IDirect3DDeviceImpl *unsafe_impl_from_IDirect3DDevice7(IDirect3DDevice7 *iface)
{
if
(
!
iface
)
return
NULL
;
assert
((
iface
->
lpVtbl
==
&
d3d_device7_fpu_preserve_vtbl
)
||
(
iface
->
lpVtbl
==
&
d3d_device7_fpu_setup_vtbl
));
return
CONTAINING_RECORD
(
iface
,
IDirect3DDeviceImpl
,
lpVtbl
);
return
CONTAINING_RECORD
(
iface
,
IDirect3DDeviceImpl
,
IDirect3DDevice7_iface
);
}
IDirect3DDeviceImpl
*
unsafe_impl_from_IDirect3DDevice3
(
IDirect3DDevice3
*
iface
)
...
...
@@ -6836,9 +6836,9 @@ HRESULT d3d_device_init(IDirect3DDeviceImpl *device, IDirectDrawImpl *ddraw, IDi
HRESULT
hr
;
if
(
ddraw
->
cooperative_level
&
DDSCL_FPUPRESERVE
)
device
->
lpVtbl
=
&
d3d_device7_fpu_preserve_vtbl
;
device
->
IDirect3DDevice7_iface
.
lpVtbl
=
&
d3d_device7_fpu_preserve_vtbl
;
else
device
->
lpVtbl
=
&
d3d_device7_fpu_setup_vtbl
;
device
->
IDirect3DDevice7_iface
.
lpVtbl
=
&
d3d_device7_fpu_setup_vtbl
;
device
->
IDirect3DDevice3_iface
.
lpVtbl
=
&
d3d_device3_vtbl
;
device
->
IDirect3DDevice2_iface
.
lpVtbl
=
&
d3d_device2_vtbl
;
...
...
dlls/ddraw/executebuffer.c
View file @
472a8f7a
...
...
@@ -157,7 +157,7 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This,
* enable it before drawing. This overwrites any ALPHA*
* render state. */
wined3d_device_set_render_state
(
lpDevice
->
wined3d_device
,
WINED3DRS_COLORKEYENABLE
,
1
);
IDirect3DDevice7_DrawIndexedPrimitive
(
(
IDirect3DDevice7
*
)
lpDevi
ce
,
IDirect3DDevice7_DrawIndexedPrimitive
(
&
lpDevice
->
IDirect3DDevice7_ifa
ce
,
D3DPT_TRIANGLELIST
,
D3DFVF_TLVERTEX
,
tl_vx
,
0
,
This
->
indices
,
count
*
3
,
0
);
}
break
;
...
...
@@ -216,7 +216,7 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This,
lpDevice
->
view
=
ci
->
u2
.
dwArg
[
0
];
if
(
ci
->
u1
.
dtstTransformStateType
==
D3DTRANSFORMSTATE_PROJECTION
)
lpDevice
->
proj
=
ci
->
u2
.
dwArg
[
0
];
IDirect3DDevice7_SetTransform
(
(
IDirect3DDevice7
*
)
lpDevi
ce
,
IDirect3DDevice7_SetTransform
(
&
lpDevice
->
IDirect3DDevice7_ifa
ce
,
ci
->
u1
.
dtstTransformStateType
,
m
);
}
...
...
@@ -283,7 +283,7 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This,
break
;
}
IDirect3DDevice7_SetRenderState
(
(
IDirect3DDevice7
*
)
lpDevi
ce
,
rs
,
ci
->
u2
.
dwArg
[
0
]);
IDirect3DDevice7_SetRenderState
(
&
lpDevice
->
IDirect3DDevice7_ifa
ce
,
rs
,
ci
->
u2
.
dwArg
[
0
]);
}
instr
+=
size
;
...
...
dlls/ddraw/light.c
View file @
472a8f7a
...
...
@@ -41,7 +41,7 @@ static void light_update(IDirect3DLightImpl *light)
if
(
!
light
->
active_viewport
||
!
light
->
active_viewport
->
active_device
)
return
;
device
=
light
->
active_viewport
->
active_device
;
IDirect3DDevice7_SetLight
(
(
IDirect3DDevice7
*
)
devi
ce
,
light
->
dwLightIndex
,
&
light
->
light7
);
IDirect3DDevice7_SetLight
(
&
device
->
IDirect3DDevice7_ifa
ce
,
light
->
dwLightIndex
,
&
light
->
light7
);
}
/*****************************************************************************
...
...
@@ -62,7 +62,7 @@ void light_activate(IDirect3DLightImpl *light)
light_update
(
light
);
if
(
!
(
light
->
light
.
dwFlags
&
D3DLIGHT_ACTIVE
))
{
IDirect3DDevice7_LightEnable
(
(
IDirect3DDevice7
*
)
devi
ce
,
light
->
dwLightIndex
,
TRUE
);
IDirect3DDevice7_LightEnable
(
&
device
->
IDirect3DDevice7_ifa
ce
,
light
->
dwLightIndex
,
TRUE
);
light
->
light
.
dwFlags
|=
D3DLIGHT_ACTIVE
;
}
}
...
...
@@ -86,7 +86,7 @@ void light_deactivate(IDirect3DLightImpl *light)
/* If was not active, activate it */
if
(
light
->
light
.
dwFlags
&
D3DLIGHT_ACTIVE
)
{
IDirect3DDevice7_LightEnable
(
(
IDirect3DDevice7
*
)
devi
ce
,
light
->
dwLightIndex
,
FALSE
);
IDirect3DDevice7_LightEnable
(
&
device
->
IDirect3DDevice7_ifa
ce
,
light
->
dwLightIndex
,
FALSE
);
light
->
light
.
dwFlags
&=
~
D3DLIGHT_ACTIVE
;
}
}
...
...
dlls/ddraw/main.c
View file @
472a8f7a
...
...
@@ -960,7 +960,7 @@ DllMain(HINSTANCE hInstDLL,
if
(
ddraw
->
d3ddevice
)
{
WARN
(
"DDraw %p has d3ddevice %p attached
\n
"
,
ddraw
,
ddraw
->
d3ddevice
);
while
(
IDirect3DDevice7_Release
(
(
IDirect3DDevice7
*
)
ddraw
->
d3ddevi
ce
));
while
(
IDirect3DDevice7_Release
(
&
ddraw
->
d3ddevice
->
IDirect3DDevice7_ifa
ce
));
}
/* Try to release the objects
...
...
dlls/ddraw/material.c
View file @
472a8f7a
...
...
@@ -464,7 +464,7 @@ void material_activate(IDirect3DMaterialImpl* This)
d3d7mat
.
u3
.
emissive
=
This
->
mat
.
u3
.
emissive
;
d3d7mat
.
u4
.
power
=
This
->
mat
.
u4
.
power
;
IDirect3DDevice7_SetMaterial
(
(
IDirect3DDevice7
*
)
This
->
active_devi
ce
,
&
d3d7mat
);
IDirect3DDevice7_SetMaterial
(
&
This
->
active_device
->
IDirect3DDevice7_ifa
ce
,
&
d3d7mat
);
}
static
const
struct
IDirect3DMaterial3Vtbl
d3d_material3_vtbl
=
...
...
dlls/ddraw/vertexbuffer.c
View file @
472a8f7a
...
...
@@ -361,8 +361,8 @@ static HRESULT WINAPI IDirect3DVertexBufferImpl_1_ProcessVertices(IDirect3DVerte
iface
,
VertexOp
,
DestIndex
,
Count
,
SrcBuffer
,
SrcIndex
,
device
,
Flags
);
return
IDirect3DVertexBuffer7_ProcessVertices
(
&
This
->
IDirect3DVertexBuffer7_iface
,
VertexOp
,
DestIndex
,
Count
,
&
Src
->
IDirect3DVertexBuffer7_iface
,
SrcIndex
,
(
IDirect3DDevice7
*
)
device_impl
,
Flags
);
DestIndex
,
Count
,
&
Src
->
IDirect3DVertexBuffer7_iface
,
SrcIndex
,
device_impl
?
&
device_impl
->
IDirect3DDevice7_iface
:
NULL
,
Flags
);
}
/*****************************************************************************
...
...
@@ -459,7 +459,7 @@ static HRESULT WINAPI IDirect3DVertexBufferImpl_1_Optimize(IDirect3DVertexBuffer
TRACE
(
"iface %p, device %p, flags %#x.
\n
"
,
iface
,
device
,
Flags
);
return
IDirect3DVertexBuffer7_Optimize
(
&
This
->
IDirect3DVertexBuffer7_iface
,
(
IDirect3DDevice7
*
)
device_impl
,
Flags
);
device_impl
?
&
device_impl
->
IDirect3DDevice7_iface
:
NULL
,
Flags
);
}
/*****************************************************************************
...
...
dlls/ddraw/viewport.c
View file @
472a8f7a
...
...
@@ -72,7 +72,7 @@ void viewport_activate(IDirect3DViewportImpl *This, BOOL ignore_lights)
}
/* And also set the viewport */
IDirect3DDevice7_SetViewport
(
(
IDirect3DDevice7
*
)
This
->
active_devi
ce
,
&
vp
);
IDirect3DDevice7_SetViewport
(
&
This
->
active_device
->
IDirect3DDevice7_ifa
ce
,
&
vp
);
}
/*****************************************************************************
...
...
@@ -692,7 +692,7 @@ static HRESULT WINAPI IDirect3DViewportImpl_Clear(IDirect3DViewport3 *iface,
afterwards. */
viewport_activate
(
This
,
TRUE
);
hr
=
IDirect3DDevice7_Clear
(
(
IDirect3DDevice7
*
)
This
->
active_devi
ce
,
dwCount
,
lpRects
,
hr
=
IDirect3DDevice7_Clear
(
&
This
->
active_device
->
IDirect3DDevice7_ifa
ce
,
dwCount
,
lpRects
,
dwFlags
&
(
D3DCLEAR_ZBUFFER
|
D3DCLEAR_TARGET
),
color
,
1
.
0
,
0x00000000
);
IDirect3DDevice3_GetCurrentViewport
(
d3d_device3
,
&
current_viewport
);
...
...
@@ -1075,7 +1075,7 @@ IDirect3DViewportImpl_Clear2(IDirect3DViewport3 *iface,
* one will be restored afterwards. */
viewport_activate
(
This
,
TRUE
);
hr
=
IDirect3DDevice7_Clear
(
(
IDirect3DDevice7
*
)
This
->
active_devi
ce
,
hr
=
IDirect3DDevice7_Clear
(
&
This
->
active_device
->
IDirect3DDevice7_ifa
ce
,
dwCount
,
lpRects
,
dwFlags
,
dwColor
,
dvZ
,
dwStencil
);
IDirect3DDevice3_GetCurrentViewport
(
d3d_device3
,
&
current_viewport
);
if
(
current_viewport
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment