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
05194507
Commit
05194507
authored
Jun 09, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 09, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: COM cleanup for the IDirect3DLight iface.
parent
90154979
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
40 deletions
+16
-40
ddraw.c
dlls/ddraw/ddraw.c
+1
-1
ddraw_private.h
dlls/ddraw/ddraw_private.h
+1
-1
light.c
dlls/ddraw/light.c
+14
-38
No files found.
dlls/ddraw/ddraw.c
View file @
05194507
...
...
@@ -4550,7 +4550,7 @@ static HRESULT WINAPI d3d3_CreateLight(IDirect3D3 *iface, IDirect3DLight **light
d3d_light_init
(
object
,
This
);
TRACE
(
"Created light %p.
\n
"
,
object
);
*
light
=
(
IDirect3DLight
*
)
object
;
*
light
=
&
object
->
IDirect3DLight_iface
;
return
D3D_OK
;
}
...
...
dlls/ddraw/ddraw_private.h
View file @
05194507
...
...
@@ -387,7 +387,7 @@ struct object_creation_info
******************************************************************************/
struct
IDirect3DLightImpl
{
const
IDirect3DLightVtbl
*
lpVtbl
;
IDirect3DLight
IDirect3DLight_iface
;
LONG
ref
;
/* IDirect3DLight fields */
...
...
dlls/ddraw/light.c
View file @
05194507
...
...
@@ -91,9 +91,10 @@ void light_deactivate(IDirect3DLightImpl *light)
}
}
/*****************************************************************************
* IUnknown Methods.
*****************************************************************************/
static
inline
IDirect3DLightImpl
*
impl_from_IDirect3DLight
(
IDirect3DLight
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirect3DLightImpl
,
IDirect3DLight_iface
);
}
/*****************************************************************************
* IDirect3DLight::QueryInterface
...
...
@@ -116,19 +117,9 @@ static HRESULT WINAPI IDirect3DLightImpl_QueryInterface(IDirect3DLight *iface, R
return
E_NOINTERFACE
;
}
/*****************************************************************************
* IDirect3DLight::AddRef
*
* Increases the refcount by 1
*
* Returns:
* The new refcount
*
*****************************************************************************/
static
ULONG
WINAPI
IDirect3DLightImpl_AddRef
(
IDirect3DLight
*
iface
)
static
ULONG
WINAPI
IDirect3DLightImpl_AddRef
(
IDirect3DLight
*
iface
)
{
IDirect3DLightImpl
*
This
=
(
IDirect3DLightImpl
*
)
iface
;
IDirect3DLightImpl
*
This
=
impl_from_IDirect3DLight
(
iface
)
;
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"%p increasing refcount to %u.
\n
"
,
This
,
ref
);
...
...
@@ -136,20 +127,9 @@ IDirect3DLightImpl_AddRef(IDirect3DLight *iface)
return
ref
;
}
/*****************************************************************************
* IDirect3DLight::Release
*
* Reduces the refcount by one. If the refcount falls to 0, the object
* is destroyed
*
* Returns:
* The new refcount
*
*****************************************************************************/
static
ULONG
WINAPI
IDirect3DLightImpl_Release
(
IDirect3DLight
*
iface
)
static
ULONG
WINAPI
IDirect3DLightImpl_Release
(
IDirect3DLight
*
iface
)
{
IDirect3DLightImpl
*
This
=
(
IDirect3DLightImpl
*
)
iface
;
IDirect3DLightImpl
*
This
=
impl_from_IDirect3DLight
(
iface
)
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
This
,
ref
);
...
...
@@ -207,12 +187,10 @@ static const float zero_value[] = {
0
.
0
,
0
.
0
,
0
.
0
,
0
.
0
};
static
HRESULT
WINAPI
IDirect3DLightImpl_SetLight
(
IDirect3DLight
*
iface
,
D3DLIGHT
*
lpLight
)
static
HRESULT
WINAPI
IDirect3DLightImpl_SetLight
(
IDirect3DLight
*
iface
,
D3DLIGHT
*
lpLight
)
{
IDirect3DLightImpl
*
This
=
(
IDirect3DLightImpl
*
)
iface
;
LPD3DLIGHT7
light7
=
&
(
This
->
light7
)
;
IDirect3DLightImpl
*
This
=
impl_from_IDirect3DLight
(
iface
)
;
LPD3DLIGHT7
light7
=
&
This
->
light7
;
TRACE
(
"iface %p, light %p.
\n
"
,
iface
,
lpLight
);
...
...
@@ -266,11 +244,9 @@ IDirect3DLightImpl_SetLight(IDirect3DLight *iface,
* D3D_OK on success
* DDERR_INVALIDPARAMS if Light is NULL
*****************************************************************************/
static
HRESULT
WINAPI
IDirect3DLightImpl_GetLight
(
IDirect3DLight
*
iface
,
D3DLIGHT
*
lpLight
)
static
HRESULT
WINAPI
IDirect3DLightImpl_GetLight
(
IDirect3DLight
*
iface
,
D3DLIGHT
*
lpLight
)
{
IDirect3DLightImpl
*
This
=
(
IDirect3DLightImpl
*
)
iface
;
IDirect3DLightImpl
*
This
=
impl_from_IDirect3DLight
(
iface
)
;
TRACE
(
"iface %p, light %p.
\n
"
,
iface
,
lpLight
);
...
...
@@ -301,7 +277,7 @@ static const struct IDirect3DLightVtbl d3d_light_vtbl =
void
d3d_light_init
(
IDirect3DLightImpl
*
light
,
IDirectDrawImpl
*
ddraw
)
{
light
->
lpVtbl
=
&
d3d_light_vtbl
;
light
->
IDirect3DLight_iface
.
lpVtbl
=
&
d3d_light_vtbl
;
light
->
ref
=
1
;
light
->
ddraw
=
ddraw
;
}
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